:root{
  --paper: #f8f3ea;
  --paper-dark: #eee3d3;
  --ink: #2d2b27;
  --muted: #6d6258;
  --accent: #c0732f;
  --accent-soft: #f0d6b7;
  --line: rgba(58,48,38,0.14);
  --shadow: 0 16px 38px rgba(58,48,38,.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-dark)),
    repeating-linear-gradient(0deg, rgba(58,48,38,.03) 0 1px, transparent 1px 20px);
  background-blend-mode: normal;
  overflow-x:hidden;
}

a{color: inherit}
.folio{
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 18px 140px;
}

.spread{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:20px;
  align-items:stretch;
  background: #fffaf3;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero-left h1{margin:10px 0 12px; font-size:28px; line-height:1.25;}
.hero-text{margin:0 0 16px; color: var(--muted); font-size:14.5px; line-height:1.7;}
.hero-kicker{margin:10px 0 0; font-size:12px; letter-spacing:.12em; text-transform: uppercase; color: var(--accent);}
.brand-line{display:flex; align-items:center; gap:12px;}
.brand-avatar{width:44px; height:44px; border-radius:12px; border:1px solid var(--line); object-fit:cover;}
.brand-name{margin:0; font-weight:800;}
.brand-desc{margin:2px 0 0; font-size:12px; color: var(--muted);}
.hero-cta{display:flex; gap:10px; flex-wrap:wrap;}
.hero-tags{margin-top: 14px; display:flex; flex-wrap:wrap; gap:8px;}
.hero-tags span{background: var(--accent-soft); color: var(--accent); padding:6px 10px; border-radius:999px; font-size:12px;}

.hero-right{display:flex; flex-direction:column; gap:12px;}
.card-note{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}
.card-label{margin:0; font-size:12px; color: var(--muted);}
.card-header{display:flex; align-items:center; justify-content:space-between;}
.card-name{margin:4px 0 0; font-weight:700;}
.card-photo{width:54px; height:54px; border-radius:14px; border:1px solid var(--line); object-fit:cover;}
.card-note ul{margin:8px 0 0; padding-left:18px; color: var(--muted); font-size:12.5px; line-height:1.6;}
.card-footnote{margin:8px 0 0; font-size:12px; color: var(--muted);}
.memo{
  background:#fffdf7;
  border:1px dashed var(--line);
  border-radius:14px;
  padding:14px;
  color: var(--muted);
}

.ribbon{
  margin-top: 20px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.ribbon div{
  background:#fffdf7;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
}
.ribbon-title{margin:0 0 4px; font-size:12px; color: var(--accent);}
.ribbon-text{margin:0; color: var(--muted); font-size:12.5px;}

.route{
  margin-top:22px;
}
.route-left h2{margin:0 0 6px; font-size:20px;}
.route-left p{margin:0; color: var(--muted); font-size:13.5px; line-height:1.6;}
.route-steps{margin:12px 0 0; padding-left:18px; color: var(--muted); font-size:13px; line-height:1.7;}
.route-steps strong{color: var(--ink);}
.route-flow{display:grid; gap:10px;}
.route-flow div{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  text-align:center;
  font-weight:700;
}
.route-note{margin-top:10px; font-size:12.5px; color: var(--muted);}

.sheet{
  margin-top:22px;
  background:#fffdf7;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px;
}
.sheet-head h2{margin:0 0 6px; font-size:20px;}
.sheet-head p{margin:0; color: var(--muted); font-size:13.5px; line-height:1.6;}
.sheet-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
}
.sheet-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}
.sheet-card img{width:100%; height:200px; object-fit:cover; border-bottom:1px solid var(--line);}
.sheet-card div{padding:14px;}
.sheet-card h3{margin:0 0 6px; font-size:16px;}
.sheet-card p{margin:0; color: var(--muted); font-size:13px; line-height:1.6;}

.log{
  margin-top:22px;
}
.log-left h2{margin:0 0 6px; font-size:20px;}
.log-left p{margin:0; color: var(--muted); font-size:13.5px; line-height:1.6;}
.log-cards{margin-top:12px; display:grid; gap:10px;}
.log-cards div{background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px;}
.log-cards span{display:block; font-weight:700; margin-bottom:4px;}
.log-cards p{margin:0; color: var(--muted); font-size:12.5px;}
.log-paper{
  background:#fffef9;
  border:1px dashed var(--line);
  border-radius:14px;
  padding:16px;
}
.log-title{margin:0 0 8px; font-weight:700;}
.log-paper ul{margin:0; padding-left:18px; color: var(--muted); font-size:12.5px; line-height:1.6;}

.glossary-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
.glossary-grid 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-grid strong{color: var(--ink); font-size:13px;}

.faq-list{
  margin-top:12px;
  display:grid;
  gap:10px;
}
.faq-list details{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
}
.faq-list summary{cursor:pointer; font-weight:700;}
.faq-list p{margin:8px 0 0; color: var(--muted); font-size:12.5px;}

.diagnose{
  margin-top:22px;
}
.diagnose-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.diagnose-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}
.diagnose-card h3{margin:0 0 6px; font-size:15px;}
.diagnose-card ul{
  margin:8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size:12.5px;
  line-height:1.6;
}
.diagnose-card p{margin:8px 0 0; color: var(--muted); font-size:12.5px; line-height:1.6;}
.diagnose-card ol{
  margin:8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size:12.5px;
  line-height:1.6;
}
.diagnose-note{font-size:12px;}

.notice{
  margin-top:22px;
  padding:16px;
  border-radius:14px;
  background:#fff1e4;
  border:1px solid #eac7a5;
  color:#7a4b1c;
}
.notice h3{margin:0 0 6px; font-size:15px;}
.notice 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;}

.btn-paper{
  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;
}
.btn-paper.primary{
  background: linear-gradient(135deg, var(--accent), #e2a162);
  color:#fff;
  border:none;
  box-shadow: var(--shadow);
}
.btn-paper.ghost{
  color: var(--accent);
  background: transparent;
}
.btn-icon{
  width:20px;
  height:20px;
  border-radius:6px;
  background: rgba(255,255,255,.4);
  padding:2px;
}

.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){
  .spread{grid-template-columns: 1fr;}
  .ribbon{grid-template-columns: 1fr;}
  .sheet-grid{grid-template-columns: 1fr;}
  .glossary-grid{grid-template-columns: 1fr;}
  .diagnose-grid{grid-template-columns: 1fr;}
}

@media (max-width: 600px){
  .folio{padding: 16px 14px 140px;}
  .floating-cta{left:14px; right:14px;}
  .floating-cta .btn-paper{width:100%;}
}