:root{
  --paper: #f7f2e9;
  --paper-deep: #efe6d8;
  --ink: #2c2a26;
  --muted: #6b6257;
  --accent: #c47d3a;
  --accent-soft: #f2d7bc;
  --line: rgba(60,50,40,0.12);
  --shadow: 0 18px 45px rgba(60,50,40,.18);
  --radius: 18px;
  --max: 1080px;
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--paper), var(--paper-deep)),
    repeating-linear-gradient(90deg, rgba(60,50,40,.03) 0 1px, transparent 1px 18px);
  background-blend-mode: normal;
  overflow-x:hidden;
}

a{color: inherit}
.paper-canvas{
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 18px 140px;
}

.paper-cover{
  background: #fffaf2;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}

.split{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:20px;
  align-items:stretch;
}
.split-text h1{
  margin:10px 0 12px;
  font-size:28px;
  line-height:1.25;
}
.split-text p{line-height:1.7;}

.brand-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-photo{
  width:44px;
  height:44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.brand-title{margin:0; font-weight:800;}
.brand-sub{margin:2px 0 0; font-size:12px; color: var(--muted);}
.cover-eyebrow{
  margin:10px 0 0;
  font-size:12px;
  letter-spacing:.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cover-lead{margin:0 0 16px; color: var(--muted); font-size:14.5px;}

.cover-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.tag-row{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tag-row span{
  background: var(--accent-soft);
  color: var(--accent);
  padding:6px 10px;
  border-radius: 999px;
  font-size:12px;
}

.paper-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.paper-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.paper-card-label{margin:0; font-size:12px; color: var(--muted);}
.paper-card-name{margin:4px 0 0; font-weight:700;}
.paper-card-photo{
  width:54px;
  height:54px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.paper-card-note{margin:8px 0 0; font-size:12px; color: var(--muted);}
.paper-card ul{margin:8px 0 0; padding-left: 18px; color: var(--muted); font-size:12.5px; line-height:1.6;}
.paper-card.wide{padding:0;}
.paper-card.wide img{width:100%; height:200px; object-fit:cover; border-bottom:1px solid var(--line);}
.paper-card.wide div{padding:14px;}

.paper-note{
  margin-top: 12px;
  background: #fffdf6;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--muted);
}

.paper-strip{
  margin-top: 20px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.paper-strip div{
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.strip-title{margin:0 0 4px; font-size:12px; color: var(--accent);}
.strip-text{margin:0; color: var(--muted); font-size:12.5px;}

.paper-panel{
  margin-top: 22px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-head h2{margin:0 0 6px; font-size:20px;}
.panel-head p{margin:0; color: var(--muted); font-size:13.5px; line-height:1.6;}

.step-list{
  margin:12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size:13px;
  line-height:1.7;
}
.step-list strong{color: var(--ink);}

.paper-flow{
  display:grid;
  gap:10px;
}
.paper-flow div{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align:center;
  font-weight:700;
}
.paper-flow-note{margin-top: 10px; font-size:12.5px; color: var(--muted);}

.paper-gallery{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
}

.log-box{
  margin-top: 12px;
  display:grid;
  gap:10px;
}
.log-box div{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.log-box span{display:block; font-weight:700; margin-bottom:4px;}
.log-box p{margin:0; color: var(--muted); font-size:12.5px;}
.log-sheet{
  background: #fffef9;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
}
.log-title{margin:0 0 8px; font-weight:700;}
.log-sheet ul{margin:0; padding-left: 18px; color: var(--muted); font-size:12.5px; line-height:1.6;}

.glossary{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
.glossary div{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12.5px;
  color: var(--muted);
}
.glossary strong{color: var(--ink); font-size:13px;}

.faq{
  margin-top: 12px;
  display:grid;
  gap:10px;
}
.faq details{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.faq summary{
  cursor: pointer;
  font-weight:700;
}
.faq p{margin:8px 0 0; color: var(--muted); font-size:12.5px;}

.notice-block{
  margin-top: 22px;
  padding: 16px;
  border-radius: 14px;
  background: #fff1e4;
  border: 1px solid #eac7a5;
  color: #7a4b1c;
}
.notice-block h3{margin:0 0 6px; font-size:15px;}
.notice-block p{margin:0; font-size:12.5px; line-height:1.7;}

.entry{
  margin-top: 22px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.entry-list{
  margin-top: 12px;
  display:grid;
  gap:10px;
}
.entry-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.entry-item input{
  width:18px;
  height:18px;
  margin-top: 4px;
  accent-color: var(--accent);
}
.entry-item strong{display:block; font-size:14px;}
.entry-item small{display:block; color: var(--muted); margin-top:4px; font-size:12px;}
.entry-cta{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.entry-note{margin:0; color: var(--muted); font-size:12px;}

.paper-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  border: 1px solid var(--line);
  cursor:pointer;
}
.paper-btn.primary{
  background: linear-gradient(135deg, var(--accent), #e2a162);
  color: #fff;
  border: none;
  box-shadow: var(--shadow);
}
.paper-btn.ghost{
  color: var(--accent);
  background: transparent;
}
.paper-btn-icon{
  width:20px;
  height:20px;
  border-radius: 6px;
  background: rgba(255,255,255,.4);
  padding:2px;
}

.paper-footer{
  margin-top: 22px;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  color: var(--muted);
  font-size:12.5px;
}
.footer-links{display:flex; gap:12px; flex-wrap:wrap;}
.footer-links a{text-decoration:none; color: var(--muted);}
.footer-links a:hover{color: var(--accent);}

.floating-cta{
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--safe-area-inset-bottom));
  z-index: 60;
}

#notification-toast{
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: #fffdf6;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0;
  pointer-events:none;
  transition: opacity .2s ease;
  z-index: 60;
  max-width: 92vw;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
#notification-toast.show{opacity:1}

.legal-document-modal-overlay{
  display:none;
  position: fixed;
  inset:0;
  background: rgba(30,25,18,.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.legal-document-modal-overlay.active{display:flex;}
.legal-document-modal-container{
  background: #fffdf7;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  padding: 22px;
}
.legal-document-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.legal-document-modal-title{
  margin:0;
  font-size:18px;
  font-weight:800;
  color: var(--accent);
}
.legal-document-modal-close-button{
  background: rgba(0,0,0,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
}
.legal-document-modal-close-button:hover{color: var(--ink);}
.legal-document-modal-content{
  color: var(--muted);
  font-size:14px;
  line-height:1.7;
}
.legal-document-modal-content h2,
.legal-document-modal-content h3{color: var(--ink);}
.legal-document-modal-content ul{padding-left: 20px;}

@media (max-width: 980px){
  .split{grid-template-columns: 1fr;}
  .paper-strip{grid-template-columns: 1fr;}
  .paper-gallery{grid-template-columns: 1fr;}
  .glossary{grid-template-columns: 1fr;}
}

@media (max-width: 600px){
  .paper-canvas{padding: 16px 14px 140px;}
  .paper-cover{padding: 16px;}
  .floating-cta{left: 14px; right: 14px;}
  .floating-cta .paper-btn{width:100%;}
}