/* 見聞帖 app.css — モックv7fの意匠を本番へ移植
   色：藍 #1d2a4a ／ 生成り #ede9da ／ 墨 #2b2620 ／ 薄墨 #5f5747 ／ 朱 #b3392b ／ 弁柄 #8a3b12 ／ 金 #c9a23a
   朱は「落款」と「引く」札だけに使う。金は表装と軸だけに使う。 */
* { margin:0; padding:0; box-sizing:border-box; }
html { background-color:#171208; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body {
  background-color:#171208;
  background-image:repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, rgba(0,0,0,0) 2px 118px), linear-gradient(180deg,#1d160d,#130e07);
  color:#2b2620;
  font-family:"Shippori Mincho","Hiragino Mincho ProN","Hiragino Mincho Pro","Yu Mincho","YuMincho",serif;
  padding:64px 8px 44px;
}
.defs { position:absolute; }
.wrap { max-width:480px; margin:0 auto; }
a { color:#1d2a4a; }

/* ---------- 巻物：表装・軸・紙 ---------- */
.scroll {
  padding:20px 18px 22px; background-color:#26315a;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2748%27%20height%3D%2748%27%3E%3Crect%20width%3D%2748%27%20height%3D%2748%27%20fill%3D%27%2326315a%27%2F%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23c9a23a%27%20stroke-opacity%3D%27.34%27%3E%3Cpath%20d%3D%27M0%2024%20L24%200%20L48%2024%20L24%2048%20Z%27%2F%3Ccircle%20cx%3D%2724%27%20cy%3D%2724%27%20r%3D%275.5%27%2F%3E%3Cpath%20d%3D%27M24%2018.5%20a5.5%205.5%200%201%201%20-5.5%205.5%27%20stroke-opacity%3D%27.5%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%270%27%20r%3D%273%27%2F%3E%3Ccircle%20cx%3D%2748%27%20cy%3D%270%27%20r%3D%273%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%2748%27%20r%3D%273%27%2F%3E%3Ccircle%20cx%3D%2748%27%20cy%3D%2748%27%20r%3D%273%27%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%27%23c9a23a%27%20fill-opacity%3D%27.4%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%271.3%27%2F%3E%3Ccircle%20cx%3D%2736%27%20cy%3D%2712%27%20r%3D%271.3%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2736%27%20r%3D%271.3%27%2F%3E%3Ccircle%20cx%3D%2736%27%20cy%3D%2736%27%20r%3D%271.3%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size:48px 48px;
  margin-bottom:18px;
}
.rod3 { position:relative; z-index:3; height:22px; margin:0 -4px; filter:drop-shadow(0 3px 3px rgba(10,6,2,.42)); }
.rod3.top { margin-bottom:-10px; }
.rod3.bottom { margin-top:-10px; }
.rod3 .rod3-bar { position:absolute; left:0; top:0; width:100%; height:100%; display:block; }
.rod3 .rod3-knob { position:absolute; top:50%; width:30px; height:40px; transform:translateY(-50%); display:block; }
.rod3 .kl { left:-9px; }
.rod3 .kr { right:-9px; }
.rod3.heavy { height:26px; }
.rod3.heavy .rod3-knob { width:34px; height:46px; }
.rod3.heavy .kl { left:-11px; }
.rod3.heavy .kr { right:-11px; }

.paper {
  position:relative; margin:0 6px; padding:24px 18px 26px;
  background-color:#ede9da; color:#2b2620;
  background-image:
    linear-gradient(180deg, rgba(74,52,20,.30) 1px, rgba(74,52,20,.12) 10px, rgba(74,52,20,0) 27px),
    linear-gradient(0deg, rgba(74,52,20,.30) 1px, rgba(74,52,20,.12) 10px, rgba(74,52,20,0) 27px),
    repeating-linear-gradient(0deg, rgba(120,100,70,.075) 0 2px, rgba(120,100,70,0) 2px 6px),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27400%27%20height%3D%27600%27%3E%3Cfilter%20id%3D%27a%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.005%200.0067%27%20numOctaves%3D%273%27%20seed%3D%274%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.97%200%200%200%200%200.95%200%200%200%200%200.89%20-0.4%20-0.4%20-0.4%200%200.72%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27b%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.005%200.0067%27%20numOctaves%3D%273%27%20seed%3D%274%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.45%200%200%200%200%200.41%200%200%200%200%200.33%200.4%200.4%200.4%200%20-0.68%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27c%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.0075%200.55%27%20numOctaves%3D%272%27%20seed%3D%2711%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.38%200%200%200%200%200.33%200%200%200%200%200.22%200.55%200.55%200.55%200%20-0.95%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27d%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.02%200.4%27%20numOctaves%3D%272%27%20seed%3D%2723%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.99%200%200%200%200%200.97%200%200%200%200%200.92%200.5%200.5%200.5%200%20-0.88%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27e%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.5%27%20numOctaves%3D%272%27%20seed%3D%2731%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.23%200%200%200%200%200.20%200%200%200%200%200.16%202.6%202.6%202.6%200%20-6.2%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27400%27%20height%3D%27600%27%20filter%3D%27url%28%23a%29%27%2F%3E%3Crect%20width%3D%27400%27%20height%3D%27600%27%20filter%3D%27url%28%23b%29%27%2F%3E%3Crect%20width%3D%27400%27%20height%3D%27600%27%20filter%3D%27url%28%23c%29%27%2F%3E%3Crect%20width%3D%27400%27%20height%3D%27600%27%20filter%3D%27url%28%23d%29%27%2F%3E%3Crect%20width%3D%27400%27%20height%3D%27600%27%20filter%3D%27url%28%23e%29%27%2F%3E%3C%2Fsvg%3E");
  background-size:auto, auto, auto, 400px 600px;
  border-left:2px solid #d8cba6; border-right:2px solid #d8cba6;
  box-shadow:inset 0 0 24px rgba(138,107,63,.18), inset 3px 0 7px rgba(90,66,30,.16), inset -3px 0 7px rgba(90,66,30,.16);
}
.paper.tint-b { background-color:#eae2ca; }
.paper.tint-c { background-color:#e9e7dc; }

/* ---------- 共通の部品 ---------- */
.note { font-size:12px; line-height:1.75; color:#5f5747; }
.brush {
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  font-size:21px; font-weight:700; color:#1d2a4a; letter-spacing:.2em; line-height:1.4;
  text-shadow:.7px 0 0 rgba(29,42,74,.55), -.4px 0 0 rgba(29,42,74,.35);
}
h2.page-title { font-size:20px; margin-bottom:6px; }
.sec-title {
  display:flex; align-items:baseline; gap:10px; margin:26px 0 10px;
  font-size:15px; font-weight:700; color:#1d2a4a; letter-spacing:.1em;
}

/* 札（隅切りの角。紙ものの札の形）。朱は「引く」札（.hiku）だけ */
.btn {
  position:relative; z-index:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:100%; min-height:52px; padding:9px 16px; cursor:pointer; text-decoration:none; text-align:center;
  color:#1d2a4a; background-color:#1d2a4a; border:none; font-family:inherit;
  font-size:16px; font-weight:700; letter-spacing:.14em; line-height:1.4;
  clip-path:polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.btn::before {
  content:""; position:absolute; inset:2px; z-index:-1; background-color:#f6f1e1;
  clip-path:polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}
.btn.hiku {
  min-height:56px; color:#fff8ea; background-color:#6d2014;
  font-size:19px; letter-spacing:.22em;
}
.btn.hiku::before { background-color:#b3392b; }
.btn.small { min-height:48px; font-size:14.5px; letter-spacing:.08em; }
.btn:active { transform:translateY(1px); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition:transform .08s ease-out; }
}

/* 落款 */
.seal { display:block; width:46px; height:46px; pointer-events:none; flex:none; }
.seal svg { display:block; width:100%; height:100%; }

/* ---------- 頭と足（木の色の地に札型チップ） ---------- */
.site-nav {
  display:flex; gap:4px; padding:7px 8px 9px; margin:0 0 14px;
  background-color:#171208; border:1px solid #4a3a22;
}
.site-nav a {
  flex:1; min-height:44px; display:flex; align-items:center; justify-content:center;
  text-decoration:none; white-space:nowrap; padding:4px 2px;
  font-size:13.5px; letter-spacing:.06em; color:#d9cfb4;
}
.site-nav a.here {
  background-color:#ede9da; color:#1d2a4a; font-weight:700;
  clip-path:polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
/* ---------- 言語切替（右上の札） ---------- */
.lang-chip {
  position:fixed; top:10px; right:max(10px, calc(50% - 230px)); z-index:60;
  min-height:44px; min-width:44px; display:flex; align-items:center; justify-content:center;
  padding:6px 15px; text-decoration:none;
  background-color:#3b2a14; color:#f6f0dd; border:1px solid #8a6b3f;
  font-size:13px; letter-spacing:.08em;
  clip-path:polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));
}
.site-foot { margin:4px 2px 0; color:#9c8f74; font-size:11px; line-height:1.8; }
.site-foot a { color:#d9cfb4; }
.site-foot .site-home { margin-top:10px; font-size:12px; }
.yt-brand {
  display:inline-flex; align-items:center; gap:7px; text-decoration:none;
  background-color:#f6f0dd; border-radius:6px; padding:5px 10px 5px 7px; margin:8px 0;
}
.yt-brand .yt-name { color:#0f0f0f; font-size:14px; font-weight:700; letter-spacing:.02em;
  font-family:Arial, sans-serif; }

/* ---------- TOP ---------- */
.titleblock { display:flex; gap:14px; }
.daisen {
  writing-mode:vertical-rl; flex:none;
  background-color:#f6f1e1; color:#1d2a4a; border:2.5px solid #1d2a4a;
  outline:1px solid #c9a23a; outline-offset:-6px;
  padding:18px 10px; font-size:28px; font-weight:700; letter-spacing:.15em; line-height:1.45;
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  text-shadow:1px 1px 0 rgba(29,42,74,.2);
  filter:url(#inkRough);
}
.daisen .dc { display:inline-block; }
.daisen .dc1 { transform:rotate(-1.1deg) translateY(.4px); }
.daisen .dc2 { transform:rotate(.5deg); }
.daisen .dc3 { transform:rotate(-.4deg) translateX(.4px); }
.title-side { flex:1; display:flex; flex-direction:column; min-width:0; }
.title-top { display:flex; align-items:flex-end; gap:10px; margin-bottom:10px; }
.title-top .seal { transform:rotate(2.5deg); }
.ruby { font-size:12px; color:#5f5747; letter-spacing:.12em; padding-bottom:3px; }
.narr { font-size:13.5px; line-height:2; color:#3a332a; }
.yakusoku {
  margin-top:auto; padding-top:11px; border-top:3px double #1d2a4a;
  font-size:15px; font-weight:700; line-height:1.75; color:#1d2a4a; letter-spacing:.04em;
}
.yakusoku span { display:block; }
.draw { margin-top:20px; }
.draw .btn + .btn { margin-top:10px; }
.draw .note { margin-top:12px; }
.pack-grid { display:flex; flex-wrap:wrap; gap:8px; }
.pack {
  width:calc(50% - 4px); background-color:#f6f1e1; color:#2b2620; cursor:pointer;
  border:1px solid #b9ad8d; border-top:7px solid #5d4220; padding:10px 10px 8px;
  text-align:left; font-family:inherit;
}
.pack .pk-name { font-size:15px; font-weight:700; color:#1d2a4a; letter-spacing:.06em; }
.pack .pk-desc { font-size:11.5px; color:#4a4234; margin-top:3px; line-height:1.6; }
.pack .pk-num { font-size:11px; color:#2b2620; margin-top:4px; }
.pack.c1 { border-top-color:#a24a24; } .pack.c2 { border-top-color:#33507e; }
.pack.c3 { border-top-color:#b0821a; } .pack.c4 { border-top-color:#8a8a3c; }
.pack.c5 { border-top-color:#8f3f24; } .pack.c6 { border-top-color:#2b2620; }
.pack.c7 { border-top-color:#5d4220; }

/* ---------- 結果（横に開く絵巻） ---------- */
#result-area { display:none; }
.sub2 { font-size:13px; line-height:1.8; color:#3a332a; margin-top:6px; }
.howto { font-size:12px; color:#5f5747; margin:2px 0 12px; }
.emaki { display:flex; align-items:stretch; margin:0 -8px; }
.erod3 { flex:0 0 21px; position:relative; z-index:3; filter:drop-shadow(2px 0 3px rgba(10,6,2,.32)); }
.erod3 .erod3-bar { position:absolute; left:0; top:0; width:100%; height:100%; display:block; }
.erod3 .rod3-knob { position:absolute; left:50%; width:40px; height:30px; transform:translateX(-50%); display:block; }
.erod3 .kt { top:-9px; }
.erod3 .kb { bottom:-9px; }
.estrip {
  flex:1; min-width:0; display:flex; overflow-x:auto; background-color:#f6f1e1;
  border-top:3px solid #8a6b3f; border-bottom:3px solid #8a6b3f; scrollbar-width:thin;
}
.ecard {
  flex:0 0 232px; display:flex; gap:10px; padding:15px 13px 13px;
  background-color:#f6f1e1; color:#2b2620; border-right:1px solid #b9ad8d;
}
.ecard .e-no {
  writing-mode:vertical-rl; flex:none; align-self:flex-start;
  background-color:#1d2a4a; color:#f6f0dd; font-size:12px; padding:8px 3px; letter-spacing:.2em;
}
.ecard .e-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.ecard .e-name { font-size:16px; font-weight:700; color:#1d2a4a; line-height:1.45; }
.ecard .e-handle { font-size:12px; color:#5f5747; margin-top:2px; }
.ecard .e-charm { font-size:13px; color:#3a332a; margin-top:8px; line-height:1.7; }
.ecard .e-edo {
  font-size:13px; font-weight:700; color:#8a3b12; margin-top:9px; padding-top:8px;
  line-height:1.6; border-top:1px dotted #8a7a5c; text-wrap:balance;
}
.ecard .e-open {
  margin-top:auto; padding-top:12px; font-size:13px; color:#1d2a4a;
  text-decoration:underline; text-underline-offset:4px;
}
.escene, .ekotoba { flex:0 0 auto; border-right:1px solid #b9ad8d; background-color:#e9dfc2; }
.escene { width:118px; }
.ekotoba { width:62px; }
.escene svg, .ekotoba svg { display:block; width:100%; height:100%; }

.share { position:relative; background-color:#1d2a4a; padding:9px; margin-top:18px; }
.share .seal { position:absolute; top:-10px; right:6px; width:38px; height:38px; transform:rotate(6deg); }
.sh-sheet { background-color:#f6f1e1; color:#2b2620; padding:16px 16px 14px; }
.sh-title { font-size:16px; font-weight:700; color:#1d2a4a; letter-spacing:.14em; }
.sh-date { font-size:11px; color:#5f5747; margin:2px 0 4px; }
.sh-person { padding:9px 0 8px; border-top:1px solid #b9ad8d; }
.sh-person .sp-name { display:block; font-size:15px; font-weight:700; color:#1d2a4a; }
.sh-person .sp-line { display:block; font-size:12.5px; color:#3a332a; margin-top:2px; line-height:1.6; }
.sh-sengen {
  border-top:3px double #1d2a4a; padding-top:9px; margin-top:4px;
  font-size:12.5px; font-weight:700; color:#1d2a4a; line-height:1.7;
}
.share + .btn { margin-top:12px; }

/* ---------- 図鑑 ---------- */
.total { margin:10px 0 6px; font-size:14.5px; color:#2b2620; line-height:1.8; }
.mini-scroll {
  display:flex; align-items:stretch; background-color:#f6f1e1; color:#2b2620;
  border:1px solid #b9ad8d; margin-bottom:9px; box-shadow:2px 2px 0 rgba(138,107,63,.25);
}
.mini-scroll .roll {
  flex:0 0 42px; display:flex; align-items:center; justify-content:center;
  background-color:#8a6b3f;
  background-image:linear-gradient(90deg,#4a3315 0%,#7d5c2e 30%,#e0bd7d 50%,#7d5c2e 72%,#3c2a10 100%);
  border-right:2px solid #5f4726; box-shadow:inset -3px 0 5px rgba(40,26,8,.45);
  color:#f6f0dd; font-size:15px; font-family:"Yuji Syuku",serif;
}
.mini-scroll .ms-main { flex:1; padding:8px 10px 9px; }
.mini-scroll .ms-name { font-size:14.5px; font-weight:700; color:#1d2a4a; }
.mini-scroll .ms-bar { height:9px; background-color:#e2d9bf; border:1px solid #b3a888; border-radius:99px; margin-top:5px; overflow:hidden; }
.mini-scroll .ms-fill { height:100%; background-color:#1d2a4a; }
.mini-scroll .ms-num { flex:none; align-self:center; padding:0 10px 0 2px; font-size:13px; color:#5f5747; white-space:nowrap; }
.owned-list { list-style:none; }
.owned-list li { padding:7px 2px; border-bottom:1px dashed #b3a888; font-size:13.5px; }
.owned-list li a { text-decoration:none; }
.owned-list .o-genre { font-size:11px; color:#8a3b12; margin-left:6px; }

/* ---------- カード詳細（開いた巻物） ---------- */
.d-head { padding-bottom:13px; border-bottom:3px double #1d2a4a; }
.d-head .d-name { font-size:22px; letter-spacing:.08em; }
.d-head .d-handle { font-size:12.5px; color:#5f5747; margin-top:2px; }
.d-badge {
  display:inline-block; margin-top:8px; padding:2px 8px; border:1px solid #1d2a4a;
  font-size:12px; color:#1d2a4a; letter-spacing:.04em; background-color:transparent;
}
.d-label {
  display:flex; align-items:center; gap:10px; margin:20px 0 6px;
  font-size:14px; font-weight:700; color:#1d2a4a; letter-spacing:.1em;
}
.d-label::after { content:""; flex:1; border-top:1px solid #b9ad8d; }
.d-text { font-size:14px; line-height:1.95; color:#2b2620; }
ul.d-charm { list-style:none; }
ul.d-charm li { font-size:13.5px; line-height:1.8; color:#2b2620; padding-left:15px; position:relative; margin-bottom:3px; }
ul.d-charm li::before {
  content:""; position:absolute; left:2px; top:.78em; width:5px; height:5px;
  background-color:#1d2a4a; transform:rotate(45deg);
}
.edo-box { margin-top:4px; }
.edo-box .e-row { font-size:13.5px; line-height:1.85; color:#2b2620; padding:7px 0 6px; border-bottom:1px dotted #8a7a5c; }
.edo-box .e-row b { color:#8a3b12; }
.edo-box .e-note { font-size:10.5px; color:#5f5747; margin-top:6px; }
.d-video {
  display:block; background-color:#1d2a4a; color:#f6f0dd; border-radius:4px; padding:10px 12px;
  font-size:13px; line-height:1.65; text-decoration:none; margin-top:4px;
}
.d-video .v-tag { font-size:10.5px; color:#b8c2da; letter-spacing:.15em; }
.d-foot { font-size:11px; color:#5f5747; margin-top:16px; line-height:1.7; padding-right:58px; }
.d-icon { width:72px; height:72px; border-radius:50%; border:3px solid #c9a23a; margin-top:12px; }
.paper > .seal.seal-card { position:absolute; right:14px; bottom:24px; width:42px; height:42px; transform:rotate(-5deg); }

/* ---------- 申請フォーム ---------- */
form.f { margin-bottom:8px; }
form.f label { display:block; font-size:13px; color:#1d2a4a; margin:12px 0 4px; font-weight:700; }
form.f input[type="text"], form.f input[type="url"], form.f textarea {
  width:100%; padding:9px 10px; font-size:14px; font-family:inherit;
  border:1.5px solid #8a7a5c; border-radius:4px; background-color:#fffdf4; color:#2b2620;
}
form.f .choices { font-size:13px; line-height:2; color:#2b2620; }
form.f .choices label { display:inline; font-weight:400; margin:0 12px 0 0; color:#2b2620; }
.form-msg { display:none; margin-top:12px; padding:10px 12px; border-radius:4px; font-size:13px; line-height:1.7;
  background-color:#eef3e4; color:#2e4a1e; border:1.5px solid #7a9a52; }
.form-msg.err { background-color:#f6ecdd; color:#8a3b12; border-color:#8a3b12; }

/* ---------- 法定ページ ---------- */
.legal h3 { font-size:15px; color:#1d2a4a; margin:16px 0 5px; letter-spacing:.06em; }
.legal p, .legal li { font-size:13px; line-height:1.9; color:#2b2620; }
.legal ul { padding-left:20px; }

/* ---------- 開封の儀式（結果の巻物が開く。動きは no-preference のときだけ） ---------- */
@media (prefers-reduced-motion: no-preference) {
  #result-area.opening .paper { animation:kb-unroll .8s cubic-bezier(.25,.8,.3,1) both; }
  #result-area.opening .estrip > * {
    animation:kb-reveal .5s ease-out both;
    animation-delay:calc(.3s + var(--d, 0) * .12s);
  }
  #result-area.opening .share {
    animation:kb-fade .55s ease-out both;
    animation-delay:calc(.45s + var(--n, 3) * .12s);
  }
  #result-area.opening #share-x {
    animation:kb-fade .55s ease-out both;
    animation-delay:calc(.6s + var(--n, 3) * .12s);
  }
}
@keyframes kb-unroll { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0% 0 0); } }
@keyframes kb-reveal { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
@keyframes kb-fade { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ---------- 節目の祝い（帖が閉じて、落款が押される） ---------- */
.ms-overlay {
  position:fixed; inset:0; z-index:90; display:flex; align-items:center; justify-content:center;
  padding:22px; background-color:rgba(18,12,5,.74);
}
.ms-card {
  position:relative; width:min(330px, 88vw); background-color:#ede9da; color:#2b2620;
  padding:34px 24px 26px; text-align:center;
  border-left:2px solid #d8cba6; border-right:2px solid #d8cba6;
  box-shadow:0 14px 44px rgba(0,0,0,.5);
}
.ms-card::before, .ms-card::after {
  content:""; position:absolute; left:-8px; right:-8px; height:15px; border-radius:8px;
  background-image:linear-gradient(180deg,#4c3517 0%,#a87f45 30%,#e8c98c 48%,#7d5c2e 72%,#503a1a 100%);
  box-shadow:0 2px 4px rgba(10,6,2,.4);
}
.ms-card::before { top:-8px; }
.ms-card::after { bottom:-8px; }
.ms-seal { width:62px; height:62px; margin:0 auto 12px; transform:rotate(-5deg); }
.ms-seal svg { display:block; width:100%; height:100%; }
.ms-block + .ms-block { margin-top:16px; padding-top:14px; border-top:1px solid #b9ad8d; }
.ms-title {
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  font-size:21px; font-weight:700; color:#1d2a4a; letter-spacing:.1em; line-height:1.5;
}
.ms-line { font-size:13.5px; line-height:1.9; color:#3a332a; margin-top:5px; }
.ms-btn { margin-top:20px; }
@media (prefers-reduced-motion: no-preference) {
  .ms-card { animation:kb-fade .45s ease-out both; }
  .ms-seal { animation:ms-stamp .55s cubic-bezier(.25,1.6,.45,1) .4s both; }
}
@keyframes ms-stamp {
  0% { opacity:0; transform:scale(1.8) rotate(-16deg); }
  55% { opacity:1; }
  100% { opacity:1; transform:scale(1) rotate(-5deg); }
}

/* ---------- 本人の一言（カード詳細） ---------- */
.d-owner {
  margin-top:4px; padding:11px 13px; background-color:#f6f1e1;
  border-left:4px solid #1d2a4a;
}
.d-owner .o-text { font-size:14px; line-height:1.95; color:#2b2620; }
.d-owner .o-sign { font-size:11.5px; color:#5f5747; margin-top:5px; }

/* ---------- 収録証（カード詳細。本人がそのまま知らせるための帖） ---------- */
.cert { position:relative; background-color:#1d2a4a; padding:9px; margin-top:22px; }
.cert .seal { position:absolute; top:-10px; right:6px; width:38px; height:38px; transform:rotate(6deg); }
.cert-sheet { background-color:#f6f1e1; color:#2b2620; padding:18px 16px 15px; text-align:center; }
.cert-kicker { font-size:11px; letter-spacing:.34em; color:#5f5747; }
.cert-title {
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  font-size:24px; font-weight:700; color:#1d2a4a; letter-spacing:.3em; margin-top:5px;
}
.cert-name { font-size:17px; font-weight:700; color:#1d2a4a; line-height:1.55; margin-top:13px; }
.cert-name .c-sama { font-size:12.5px; font-weight:400; color:#5f5747; margin-left:4px; }
.cert-body { font-size:13px; line-height:1.95; color:#3a332a; margin-top:9px; }
.cert-edo {
  border-top:3px double #1d2a4a; border-bottom:3px double #1d2a4a;
  padding:9px 4px; margin-top:13px;
  font-size:13.5px; font-weight:700; color:#8a3b12; line-height:1.75;
}
.cert-sign { font-size:11.5px; color:#5f5747; margin-top:11px; letter-spacing:.14em; }
.cert + .btn { margin-top:12px; }

/* ---------- 江戸換算の帖（道具ページ） ---------- */
.k-tabs { display:flex; gap:6px; margin:16px 0 4px; }
.k-tab {
  flex:1; min-height:46px; padding:7px 4px; cursor:pointer; font-family:inherit;
  font-size:13.5px; font-weight:700; letter-spacing:.05em; color:#1d2a4a;
  background-color:#e7dfc8; border:1.5px solid #8a7a5c; border-radius:4px;
}
.k-tab.on { background-color:#1d2a4a; color:#f6f0dd; border-color:#1d2a4a; }
.k-panel { display:none; }
.k-panel.on { display:block; }
form.f input[type="number"], form.f select {
  width:100%; padding:9px 10px; font-size:14px; font-family:inherit;
  border:1.5px solid #8a7a5c; border-radius:4px; background-color:#fffdf4; color:#2b2620;
}
.food-grid { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.food-btn {
  padding:9px 13px; cursor:pointer; font-family:inherit; font-size:13.5px; color:#1d2a4a;
  background-color:#f6f1e1; border:1.5px solid #8a7a5c; border-radius:99px;
}
.food-btn.on { background-color:#1d2a4a; color:#f6f0dd; border-color:#1d2a4a; }
.k-result { display:none; }
.k-result .kr-big {
  font-size:16.5px; font-weight:700; color:#1d2a4a; line-height:1.75; text-align:left;
}
.k-result .kr-line { font-size:13px; line-height:1.9; color:#3a332a; margin-top:7px; text-align:left; }
.k-result .kr-note { font-size:11px; line-height:1.7; color:#5f5747; margin-top:9px; text-align:left; }

/* 幅の狭い端末（〜400px）：表装と紙の余白を詰めて、本文の幅を確保する */
@media (max-width:400px) {
  .scroll { padding-left:12px; padding-right:12px; }
  .paper { padding-left:14px; padding-right:14px; }
  .titleblock { gap:12px; }
  .yakusoku { font-size:14px; letter-spacing:0; }
  .d-head .d-name { font-size:20px; letter-spacing:.04em; }
  .d-badge { font-size:11.5px; letter-spacing:0; padding:2px 6px; }
  .site-nav a { font-size:12px; letter-spacing:.02em; }
}

/* ---------- 実況モード（引いた結果を1人ずつ、筆で書かれるように見せる） ---------- */
/* ---------- 城下町（自分の町×みんなの町） ---------- */
.town-castle { border:2px solid #5f4726; background-color:#e6dfc6; margin:14px 0 2px; }
.town-castle-head { background-color:#2e3440; color:#f6f0dd; padding:5px 10px; font-size:12.5px; letter-spacing:.14em; }
.town-castle-img { display:block; width:100%; max-width:168px; height:auto; margin:6px auto 4px; }
.district { border:2px solid #5f4726; background-color:#eae3cb; margin-top:14px; }
.district-head { color:#f6f0dd; padding:6px 10px; display:flex; justify-content:space-between; align-items:baseline; font-size:14px; letter-spacing:.06em; }
.district-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(84px, 1fr)); gap:6px; padding:8px; }
.lot { display:flex; flex-direction:column; align-items:center; gap:2px; padding:5px 3px 6px; background-color:#f7f2df; border:1px solid #b3a888; color:#2b2620; text-decoration:none; font:inherit; text-align:center; }
button.lot { cursor:pointer; }
.lot .shop-img { width:100%; max-width:84px; height:auto; display:block; }
.lot.vacant .vacant-tile { width:100%; max-width:56px; height:auto; display:block; opacity:.5; }
.lot-name { font-size:9.5px; line-height:1.35; color:#1d2a4a; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.lot-name.lot-veiled { color:#8a7a5c; letter-spacing:.08em; }
.lot.other { background-color:#f1ead2; }
.lot.vacant { background-color:#e3dcc4; border:1px dashed #a3977d; justify-content:center; min-height:84px; color:#8a7a5c; font-size:11px; letter-spacing:.3em; }
.town-msg { margin-top:12px; font-size:13px; line-height:1.9; color:#8a3b12; }
.town-msg:empty { margin-top:0; }
.town-river { margin-top:14px; background:linear-gradient(180deg, #7d99ad, #68859c); color:#2c4a61; text-align:right; padding:5px 12px; font-size:11px; letter-spacing:.4em; }

/* ---------- 城下町：店の札（タップでその場に開くモーダル。町を歩く流れを切らない） ---------- */
body.tm-lock { overflow:hidden; }
.tm-overlay {
  position:fixed; inset:0; z-index:85; overflow-y:auto;
  display:flex; align-items:flex-start; justify-content:center;
  padding:36px 14px; background-color:rgba(18,12,5,.74);
}
.tm-overlay[hidden] { display:none; }
.tm-card {
  position:relative; width:min(400px, 94vw); margin:auto;
  background-color:#ede9da; color:#2b2620;
  padding:28px 22px 24px; text-align:left;
  border-left:2px solid #d8cba6; border-right:2px solid #d8cba6;
  box-shadow:0 14px 44px rgba(0,0,0,.5);
}
.tm-card::before, .tm-card::after {
  content:""; position:absolute; left:-8px; right:-8px; height:15px; border-radius:8px;
  background-image:linear-gradient(180deg,#4c3517 0%,#a87f45 30%,#e8c98c 48%,#7d5c2e 72%,#503a1a 100%);
  box-shadow:0 2px 4px rgba(10,6,2,.4);
}
.tm-card::before { top:-8px; }
.tm-card::after { bottom:-8px; }
@media (prefers-reduced-motion: no-preference) {
  .tm-card { animation:kb-fade .4s ease-out both; }
}
.tm-close {
  position:absolute; top:10px; right:10px; z-index:2;
  width:40px; height:40px; padding:0; cursor:pointer;
  background:none; border:none; color:#5f5747;
  font-family:inherit; font-size:23px; line-height:1;
}
.tm-close:hover, .tm-close:focus-visible { color:#1d2a4a; }
.tm-genre {
  display:inline-block; color:#f6f0dd; background-color:#1d2a4a;
  font-size:11.5px; letter-spacing:.14em; padding:3px 10px; border-radius:2px;
}
.tm-name {
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  font-size:21px; font-weight:700; color:#1d2a4a;
  letter-spacing:.05em; line-height:1.5; margin-top:10px; overflow-wrap:anywhere;
}
.tm-handle { font-size:12.5px; color:#5f5747; margin-top:2px; overflow-wrap:anywhere; }
.tm-card .d-label { margin-top:16px; }
.tm-links { margin-top:20px; display:flex; flex-direction:column; gap:10px; }
.tm-veiled-title {
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  font-size:19px; font-weight:700; color:#1d2a4a; letter-spacing:.08em; line-height:1.6;
}
.tm-veiled-text { font-size:13.5px; line-height:2; color:#3a332a; margin-top:10px; }

/* ---------- お財布（文） ― サイトナビの下に出る小さな札 ---------- */
.mon-bar {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:-8px 0 14px; padding:0 2px;
}
.mon-chip {
  display:inline-block; padding:4px 12px; font-size:13px; letter-spacing:.06em;
  background-color:#3b2a14; color:#f6f0dd; border:1px solid #8a6b3f;
  clip-path:polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.mon-chip b { color:#e8c98c; font-size:15px; }
.mon-note { font-size:12px; color:#cbbd97; letter-spacing:.04em; }
.draw-note {
  display:none; margin-top:12px; padding:10px 12px; border-radius:4px;
  font-size:13px; line-height:1.8; color:#8a3b12;
  background-color:#f6ecdd; border:1.5px solid #8a3b12;
}

/* ---------- 双六（みんなの町を歩く、もうひとつの出会い方） ---------- */
.sg-intro-visual { display:flex; align-items:flex-end; justify-content:center; gap:2px; margin:8px 0 2px; }
.sg-intro-visual img { image-rendering:pixelated; display:block; }
.sg-intro-visual .iv-castle { width:104px; }
.sg-intro-visual .iv-tree { width:46px; }
.sg-panel {
  margin-top:14px; padding:13px 14px; background-color:#f6f1e1;
  border:1px solid #b9ad8d; box-shadow:2px 2px 0 rgba(138,107,63,.25);
}
.sg-status { font-size:14px; line-height:1.9; color:#2b2620; }
.sg-status b { color:#8a3b12; }
.sg-dice-row { display:flex; align-items:center; gap:14px; margin-top:10px; }
.sg-die {
  flex:none; width:58px; height:58px; display:flex; align-items:center; justify-content:center;
  background-color:#f6f0dd; border:2.5px solid #1d2a4a; border-radius:9px;
  font-size:27px; font-weight:700; color:#1d2a4a;
  font-family:"Yuji Syuku","Shippori Mincho",serif;
  box-shadow:2px 2px 0 rgba(138,107,63,.35);
}
.sg-roll { flex:1; }
.sg-msg { margin-top:11px; font-size:13.5px; line-height:1.9; color:#8a3b12; min-height:1em; }
.sg-msg:empty { margin-top:0; }
.sg-progress { margin-top:14px; }
.sg-prow { display:flex; align-items:center; gap:9px; padding:4px 2px; border-bottom:1px dashed #b3a888; }
.sg-prow .p-name { flex:0 0 118px; font-size:12.5px; padding-left:7px; color:#1d2a4a; }
.sg-prow .p-bar { flex:1; height:9px; background-color:#e2d9bf; border:1px solid #b3a888; border-radius:3px; overflow:hidden; }
.sg-prow .p-fill { display:block; height:100%; background-color:#8a6b3f; }
.sg-prow .p-num { flex:none; font-size:12px; color:#8a3b12; white-space:nowrap; }
.sg-banner {
  margin:18px 0 8px; padding:6px 12px; color:#f6f0dd; font-size:14px;
  letter-spacing:.08em; display:flex; justify-content:space-between; align-items:baseline;
}
.sg-row { display:flex; gap:6px; margin-bottom:6px; }
.sg-row.rev { flex-direction:row-reverse; }
.sg-cell {
  position:relative; flex:1 1 0; min-width:0; aspect-ratio:1 / 1.18;
  background-color:#e9e2c9; border:1px solid #b3a888; overflow:hidden;
}
.sg-cell .sg-tile {
  position:absolute; left:50%; bottom:1px; transform:translateX(-50%);
  width:92%; image-rendering:pixelated; opacity:.95;
}
.sg-cell .sg-bld {
  position:absolute; left:50%; bottom:16%; transform:translateX(-50%);
  width:88%; image-rendering:pixelated;
  filter:drop-shadow(1px 2px 1px rgba(60,44,18,.35));
}
.sg-cell.vacant { background-color:#e3dcc4; }
.sg-cell .sg-name {
  position:absolute; left:2px; right:2px; bottom:2px; z-index:3;
  font-size:8.5px; line-height:1.3; text-align:center; color:#1d2a4a;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  overflow-wrap:anywhere;
}
.sg-cell .sg-name.veiled { color:#8a7a5c; letter-spacing:.06em; }
.sg-cell .sg-num {
  position:absolute; top:2px; left:4px; z-index:3;
  font-size:9px; color:#5f5747; letter-spacing:.05em;
}
.sg-cell .sg-pawn {
  position:absolute; top:3px; right:3px; z-index:4; width:19px; height:19px;
  display:flex; align-items:center; justify-content:center;
  background-color:#1d2a4a; color:#f6f0dd; border:1.5px solid #c9a23a; border-radius:50%;
  font-size:9.5px; font-weight:700; line-height:1;
}
.sg-cell.here { outline:2.5px solid #1d2a4a; outline-offset:-2.5px; background-color:#f3ecd4; }
.sg-cell.pass { animation:sg-pass .32s ease-out; }
@keyframes sg-pass {
  0% { background-color:#e8c98c; }
  100% { background-color:#e9e2c9; }
}
@media (prefers-reduced-motion: no-preference) {
  .sg-die.rolling { animation:sg-shake .12s linear infinite; }
}
@keyframes sg-shake {
  0% { transform:rotate(-4deg) translateY(0); }
  50% { transform:rotate(3deg) translateY(-2px); }
  100% { transform:rotate(-2deg) translateY(0); }
}

/* ---------- 歩ける城下町（townmap.js） ---------- */
.tw-wrap { position:relative; margin-top:12px; border:2px solid #5f4726; background-color:#4f6a43; overflow:hidden; }
.tw-canvas { display:block; width:100%; height:clamp(340px, 64vh, 560px); touch-action:pan-y; cursor:default; background-color:#4f6a43; }
.tw-hud {
  position:absolute; left:8px; top:8px; max-width:calc(100% - 62px); line-height:1.45; padding:3px 10px; font-size:12.5px; letter-spacing:.06em;
  background-color:rgba(246,240,221,.93); color:#1d2a4a; border:1px solid #5f4726; pointer-events:none;
}
.tw-zoom { position:absolute; right:8px; top:8px; display:flex; flex-direction:column; gap:6px; }
.tw-btn {
  width:34px; height:34px; font:700 17px/1 "Shippori Mincho",serif; color:#1d2a4a; cursor:pointer;
  background-color:rgba(246,240,221,.95); border:1.5px solid #5f4726; box-shadow:1px 1px 0 rgba(60,44,18,.35);
}
.tw-btn:active { transform:translate(1px,1px); box-shadow:none; }
.tw-mini {
  position:absolute; left:8px; bottom:8px; width:clamp(84px, 26%, 132px); height:auto; cursor:pointer;
  image-rendering:pixelated; background-color:rgba(23,18,8,.55); border:1px solid rgba(246,240,221,.7);
}
.tw-hint { margin-top:6px; }
/* 区の入口へ移るメニュー（城下町の掲示板から） */
.tw-menu { position:absolute; inset:0; background:rgba(20,14,6,.55); display:flex; align-items:center; justify-content:center; z-index:5; }
.tw-menu-box { max-height:calc(100% - 16px); overflow-y:auto; overscroll-behavior:contain; background:#f4ead0; border:3px solid #5d4220; border-radius:6px; padding:14px; width:min(300px,86%); box-shadow:0 6px 20px rgba(0,0,0,.4); }
.tw-menu-title { font-weight:700; text-align:center; margin-bottom:10px; color:#2b2620; }
.tw-menu-item { display:block; width:100%; text-align:left; padding:9px 12px; margin-top:6px; background:#fbf6e6; border:1px solid #8a7348; border-radius:4px; font:inherit; color:#2b2620; cursor:pointer; }
.tw-menu-item:active { background:#efe3c0; }
.tw-menu-x { text-align:center; border-left:1px solid #8a7348; }
.tw-sharebar { margin:8px 0 2px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* 町ページ：言語札はページと一緒に流れる（地図の拡大ボタンを覆わない） */
.tw-page .lang-chip { position:absolute; }
.tw-canvas:focus { outline:none; }
.tw-canvas:focus-visible { outline:2px solid #1d2a4a; outline-offset:-4px; }
.tw-home { position:absolute; left:8px; top:60px; width:max-content; min-width:0; height:30px; padding:0 10px; font-size:12.5px; letter-spacing:.06em; white-space:nowrap; }
.tw-home[hidden] { display:none; }
/* 地図の中の吹き出しとサイコロ（地図から目を離さずに遊べる） */
.tw-toast {
  position:absolute; left:8px; right:8px; bottom:120px; padding:8px 12px; font-size:13px; line-height:1.7;
  background-color:rgba(246,240,221,.96); color:#8a3b12; border:1.5px solid #5f4726; box-shadow:2px 2px 0 rgba(60,44,18,.35);
  pointer-events:none;
}
.tw-toast:empty { display:none; }
.tw-dice { position:absolute; right:8px; bottom:8px; display:flex; align-items:center; gap:6px; max-width:calc(100% - 16px - clamp(84px, 26%, 132px) - 8px); }
.tw-dice .sg-die { width:46px; height:46px; font-size:22px; }
.tw-dice .sg-roll { flex:1 1 auto; min-height:46px; padding:6px 10px; font-size:12.5px; line-height:1.4; }
.tw-menu-item:not(.tw-menu-x) { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:7px 10px; }
.tw-menu-n { flex:none; font-size:11.5px; color:#8a3b12; white-space:nowrap; }

/* ---------- キーボードの焦点：clip-path で枠が切れないよう、内側に描く ---------- */
.btn:focus-visible, .lang-chip:focus-visible, .site-nav a:focus-visible, .tw-btn:focus-visible, .tw-menu-item:focus-visible {
  outline:none; box-shadow:inset 0 0 0 3px #f6f0dd, inset 0 0 0 6px #1d2a4a;
}
.btn:focus-visible::before { background-color:#fffbe8; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline:3px solid #1d2a4a; outline-offset:2px; }
.btn:focus-visible, .lang-chip:focus-visible, .site-nav a:focus-visible, .tw-btn:focus-visible, .tw-menu-item:focus-visible { outline:none; }

/* ---------- 城下町：読み込み中・失敗・店の一覧・文が足りないとき ---------- */
.tw-loading {
  position:absolute; inset:0; z-index:3; display:flex; align-items:center; justify-content:center;
  background-color:#e6dfc6; color:#5d4220; font-size:15px; letter-spacing:.2em;
}
.tw-loading[hidden], .tw-fail[hidden] { display:none; }
.tw-fail { margin-top:12px; padding:14px; text-align:center; background-color:#f6f0dd; border:1.5px solid #8a3b12; color:#8a3b12; }
.tw-fail p { margin:0 0 10px; line-height:1.8; }
.tw-list { margin:10px 0 4px; font-size:13px; }
.tw-list summary { cursor:pointer; min-height:44px; display:flex; align-items:center; color:#1d2a4a; font-weight:700; }
.tw-list ul { list-style:none; margin:6px 0 0; padding:0; max-height:300px; overflow-y:auto; border:1px solid #b3a888; background-color:#fbf6e6; }
.tw-list li + li { border-top:1px dashed #cdbf98; }
.tw-list li button { display:block; width:100%; min-height:44px; padding:8px 12px; text-align:left; font:inherit; color:#2b2620; background:none; border:none; cursor:pointer; }
.tw-list li button:hover { background-color:#efe3c0; }
.sg-roll.is-short { opacity:.62; }

/* ---------- PC・横向き：町を広く ---------- */
@media (min-width:900px) {
  .tw-page .wrap { max-width:900px; }
  .tw-page .tw-canvas { height:clamp(460px, 72vh, 680px); }
  .tw-page .tw-toast { right:auto; max-width:460px; }
  .tw-page .tw-dice .sg-roll { max-width:260px; }
}
@media (orientation:landscape) and (max-height:560px) {
  .tw-page .tw-canvas { height:calc(100vh - 24px); min-height:300px; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-toast, .tw-menu { animation:none !important; }
}

/* ---------- 見えない見出し／導入の一行／タップ領域／英語の字間 ---------- */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.lead { margin:12px 2px 4px; font-size:14px; line-height:1.9; color:#3a2f1c; text-align:center; }
.draw .btn.sub + .btn.sub { margin-top:10px; }
.tw-btn { width:44px; height:44px; font-size:19px; }
.tw-zoom { gap:8px; }
.site-foot a { display:inline-block; padding:10px 3px; }
html[lang="en"] .btn, html[lang="en"] .site-nav a { letter-spacing:.03em; }

/* ---------- 図鑑：検索と絞り込み ---------- */
.zk-tools { display:grid; grid-template-columns:auto 1fr; gap:8px 10px; align-items:center; margin:6px 0 4px; font-size:13px; }
.zk-tools[hidden] { display:none; }
.zk-tools input, .zk-tools select { min-height:44px; padding:6px 10px; font:inherit; color:#2b2620; background-color:#fbf6e6; border:1px solid #8a7348; border-radius:4px; }
/* 「城前へ」は文字の幅に合わせる（.tw-btn の 44px 固定に負けない） */
.tw-btn.tw-home { width:max-content; min-width:44px; height:36px; padding:0 12px; font-size:13px; white-space:nowrap; }

/* TOP：ひと目で「何をするページか」が分かる見せ方 */
.hero-line { margin:14px 2px 8px; font-size:19px; line-height:1.6; font-weight:700; color:#1d2a4a; text-align:center; }
.steps { list-style:none; margin:0 0 14px; padding:0; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.steps li { position:relative; background:#fbf6e6; border:1px solid #8a7348; border-radius:6px; padding:22px 8px 10px; text-align:center; }
.st-n { position:absolute; left:50%; top:-11px; transform:translateX(-50%); width:24px; height:24px; line-height:24px; border-radius:50%; background:#b3392b; color:#fdf6e3; font-size:13px; }
.st-t { display:block; font-weight:700; font-size:15px; color:#2b2620; }
.st-d { display:block; margin-top:4px; font-size:12px; line-height:1.6; color:#4a4030; }
.about { margin:14px 0 4px; }
.about summary { cursor:pointer; font-weight:700; color:#3a2f1c; padding:6px 0; }
@media (max-width:360px) { .steps { grid-template-columns:1fr; } }
.hero-line { text-wrap:balance; }

/* 図鑑：開くと巻物がするすると広がり、出会った人々が順に現れる */
@media (prefers-reduced-motion: no-preference) {
  .zk-unroll { animation:zk-roll 1.1s cubic-bezier(.22,.8,.3,1) both; }
  .scroll:has(.zk-unroll) > .rod3.bottom { animation:zk-rod 1.1s cubic-bezier(.22,.8,.3,1) both; }
  .owned-list li { animation:kb-fade .5s ease-out both; }
  .owned-list li:nth-child(1) { animation-delay:.7s; } .owned-list li:nth-child(2) { animation-delay:.78s; }
  .owned-list li:nth-child(3) { animation-delay:.86s; } .owned-list li:nth-child(4) { animation-delay:.94s; }
  .owned-list li:nth-child(5) { animation-delay:1.02s; } .owned-list li:nth-child(n+6) { animation-delay:1.1s; }
}
@keyframes zk-roll { from { clip-path:inset(0 0 100% 0); } to { clip-path:inset(0 0 0 0); } }
@keyframes zk-rod { 0%,60% { opacity:0; transform:translateY(-14px); } 100% { opacity:1; transform:translateY(0); } }

/* 図鑑の巻：タップで、出会った人の一覧が巻物のように開く */
.mini-scroll[role="button"] { cursor:pointer; position:relative; }
.mini-scroll[role="button"]::after { content:"▾"; position:absolute; right:6px; top:2px; font-size:12px; color:#8a7348; transition:transform .25s; }
.mini-scroll[aria-expanded="true"]::after { transform:rotate(180deg); }
.mini-scroll[role="button"]:focus-visible { outline:2px solid #1d2a4a; outline-offset:2px; }
.ms-panel { margin:-4px 0 12px; padding:10px 12px; background-color:#fbf6e6; border:1px solid #b9ad8d; border-top:5px solid #8a6b3f; border-radius:0 0 4px 4px; }
.ms-panel[hidden] { display:none; }
.ms-panel ul { list-style:none; margin:0; padding:0; max-height:50vh; overflow-y:auto; }
.ms-panel li { padding:6px 0; border-bottom:1px dotted #b9ad8d; font-size:14px; }
.ms-panel li:last-child { border-bottom:0; }
.ms-panel a { color:#1d2a4a; }
@media (prefers-reduced-motion: no-preference) {
  .ms-panel:not([hidden]) { animation:zk-roll .55s cubic-bezier(.22,.8,.3,1) both; }
}

.walk-note { margin:4px 2px 12px; font-size:13px; line-height:1.7; color:#4a4030; text-align:center; }

.tw-drawlink { font-size:13.5px; color:#1d2a4a; text-underline-offset:3px; }
.hero-line { font-size:17px; }

/* 図鑑：巻の中（別画面）。集めた店は絵になり、まだの店は空き地のまま並ぶ */
.mini-scroll { text-decoration:none; }
.mini-scroll .ms-num { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; line-height:1.3; }
.mini-scroll .ms-num b { font-size:16px; color:#b3392b; }
.mini-scroll .ms-num small { font-size:12px; color:#5f5747; }
.zk-back { display:inline-block; margin:4px 0 6px; color:#1d2a4a; font-size:14px; text-underline-offset:3px; }
.zk-dtitle { margin:4px 0 8px; font-size:24px; }
.zk-rate { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.zk-pct { font-size:34px; font-weight:700; color:#b3392b; line-height:1.1; }
.zk-done { font-size:14px; color:#3a2f1c; }
.zk-frac { margin-left:auto; font-size:14px; color:#5f5747; }
.zk-bar { height:12px; margin:6px 0 14px; }
.zk-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px; }
.zk-cell { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 4px 6px; background:#fbf6e6; border:1px solid #b9ad8d; border-radius:4px; text-decoration:none; color:#2b2620; min-height:112px; }
.zk-cell img { width:100%; height:64px; object-fit:contain; image-rendering:pixelated; }
.zk-cell span { font-size:11.5px; line-height:1.35; text-align:center; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; word-break:break-all; }
.zk-cell.lock { background:#ece4cc; border-style:dashed; }
.zk-cell.lock img { opacity:.35; filter:grayscale(1); }
.zk-cell.lock span { font-size:18px; color:#9c8f74; }
a.zk-cell:focus-visible { outline:2px solid #1d2a4a; outline-offset:2px; }
#zk-gmore { margin-top:12px; }

/* 詳細ページの「店を訪ねる」：ボタンが並ぶときは間をあける */
#card-paper .btn + .btn, #card-paper .btn + a.btn { margin-top:14px; }

/* お気に入りボタン */
.fav-btn { font:inherit; font-size:14px; padding:9px 16px; border:1px solid #b3392b; background:#fffdf2; color:#b3392b; border-radius:999px; cursor:pointer; }
.fav-btn.on { background:#b3392b; color:#fffdf2; }
.fav-btn:focus-visible { outline:3px solid #1d2a4a; outline-offset:2px; }

/* カードページの「店主になる」案内 */
.owner-cta { margin:14px 0; padding:14px 16px; border:1px dashed #8a6b3a; background:#fffdf2; border-radius:4px; }
.owner-cta .oc-t { font-weight:700; margin-bottom:4px; }
.owner-cta p { font-size:13px; line-height:1.8; margin:0 0 10px; }
