:root{--nav-h:56px;--peek-h:60px;--safe-b:env(safe-area-inset-bottom,0px);--paper:#f9f6e9;--ink:#27263b;--accent:#ffdd68;font-family:system-ui,-apple-system,"Segoe UI","Hiragino Sans","Yu Gothic UI",sans-serif;color:#fff;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;overflow:hidden;background:#171b32;-webkit-tap-highlight-color:transparent}
button,input{font:inherit}
button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid #fff176;outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#world{position:fixed;inset:0;width:100%;height:100%;touch-action:none}
#fg{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.brand{position:fixed;right:18px;top:22px;text-align:right;font-size:12px;line-height:1.5;text-shadow:0 2px 8px #0009;pointer-events:none}
.brand b,.brand span{display:block}.brand b{letter-spacing:.12em}
#hint{position:fixed;left:50%;top:44%;transform:translateX(-50%);width:240px;display:flex;justify-content:space-between;font-weight:700;font-size:13px;text-shadow:0 2px 5px #000;pointer-events:none;opacity:0;transition:opacity .3s}
#hint.show{opacity:1}

/* 看板（標柱の札）。位置は world.js が transform で置く。柱は canvas に描く。 */
#signs,#edge-tags{position:fixed;inset:0;pointer-events:none}
/* 44px の操作領域の中に、小さな札を置く。 */
.sign{position:absolute;left:0;top:0;min-height:44px;height:44px;border:0;background:transparent;color:#fff;text-align:left;padding:0 7px;font-size:12px;line-height:1.3;box-shadow:none;pointer-events:auto;overflow:visible;display:flex;align-items:center;gap:4px}
.sign::before{content:"";position:absolute;z-index:-1;left:0;right:22%;top:7px;bottom:7px;background:#272744d9;border:1px solid #fff8d7;box-shadow:2px 2px #16172a80}
.sign small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 看板の題は 44px の中で 2 行まで折る（切れる字数を減らす） */
.sign span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;word-break:normal;overflow-wrap:anywhere;line-height:1.2;font-size:12px}
.sign small{display:none}.sign span{min-width:0;max-width:74%}
.sign.focus{outline:none}.sign.focus::before{outline:2px solid #fff7a0;outline-offset:1px}
[data-era="0"] .sign::before{background:#101b2bc9;border-color:#a6fff1;box-shadow:0 0 7px #86ffeb}
[data-era="0"] .sign small{color:#86ffeb}
[data-era="1"] .sign::before{background:#6c4d3cdb;border:2px solid #e6c78f;box-shadow:2px 2px #382b31}
[data-era="2"] .sign::before{background:#314d73d9;border:3px double #e8d6a8;box-shadow:2px 2px #1a2e5588}
[data-era="3"] .sign::before{background:linear-gradient(125deg,#7891a5db 0 20%,#334b68d9 21%);border:1px solid #c6d4d8;box-shadow:3px 3px #263a4e99}
[data-era="4"] .sign::before{background:#334e609e;border:1px solid #ffffffa8;border-radius:7px;box-shadow:0 4px 12px #243c4a55;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.tag{position:absolute;min-height:44px;max-width:min(46vw,240px);padding:4px 10px;font-size:12px;font-weight:700;line-height:1.3;pointer-events:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #fff7a0;background:#1b1f3ae6;color:#fff7a0;border-radius:6px}
.tag.left{left:4px}.tag.right{right:4px}
[data-era="4"] .tag{background:#ffffffd9;color:#263e4a;border-color:#fff}

#bit{position:fixed;border:0;background:transparent;z-index:2;padding:0}
.ask{position:fixed;left:50%;transform:translateX(-50%);top:calc(62% + 16px);display:flex;z-index:4;filter:drop-shadow(0 4px 0 #292849)}
.ask::before{content:"";position:absolute;left:50%;top:-9px;margin-left:-9px;border:9px solid transparent;border-top:0;border-bottom-color:#fff9db}
.ask[hidden]{display:none}
#ask,#resume{white-space:nowrap;border:0;background:#fff9db;color:#242444;border-radius:18px 0 0 18px;padding:10px 12px 10px 16px;min-height:44px;font-weight:800}
#ask-close,#resume-close{border:0;background:#fff9db;color:#55546b;border-radius:0 18px 18px 0;min-width:44px;min-height:44px;border-left:1px solid #e3dcbc}
#birth-big{position:fixed;left:50%;transform:translateX(-50%);top:calc(62% + 16px);z-index:6;min-height:56px;padding:0 28px;border:0;border-radius:28px;background:var(--accent);color:#282139;font-size:18px;font-weight:900;box-shadow:0 6px 0 #8c6a1e,0 10px 30px #0006;white-space:nowrap}
#birth-big[hidden]{display:none}

/* 作品の説明のシート（スマホは下から。初期は 1 行だけ見える高さ） */
#sheet{position:fixed;left:0;right:0;bottom:calc(var(--nav-h) + var(--safe-b));height:min(76dvh,680px);z-index:5;background:var(--paper);color:var(--ink);border-radius:18px 18px 0 0;box-shadow:0 -6px 30px #0004;transform:translateY(calc(100% - var(--peek-h)));transition:transform .2s cubic-bezier(.3,0,.8,.15);display:flex;flex-direction:column}
#sheet[data-state="open"]{transform:none;transition:transform .25s cubic-bezier(.05,.7,.1,1)}
.sheet-head{display:flex;align-items:stretch;min-height:var(--peek-h);flex:none}
#sheet-peek{flex:1;min-width:0;border:0;background:transparent;color:inherit;text-align:left;padding:10px 6px 8px 18px;display:flex;flex-direction:column;justify-content:center;position:relative}
#sheet-peek .grip{position:absolute;left:50%;top:5px;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:#c9c3ad}
#peek-title,#peek-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#peek-title{font-size:15px}
#peek-meta{font-size:12px;color:#5b5a70;margin-top:2px}
#sheet-close{border:0;background:transparent;color:#55546b;min-width:52px;font-size:24px}
#sheet[data-state="peek"] #sheet-close{display:none}
#sheet-body{flex:1;overflow:auto;padding:4px 20px 28px;overscroll-behavior:contain}
#sheet-body h2{font-size:22px;line-height:1.3;margin:6px 0 8px}
#sheet-body h3,#dialog h3{font-size:15px;margin:22px 0 8px}
#sheet-body p,#dialog p{line-height:1.7;font-size:14px}
.meta{font-size:13px;color:#56566b}
.note{font-size:13px;background:#efe9d3;padding:8px 10px;border-radius:6px}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.actions.center,.center{justify-content:center;text-align:center}
#sheet button:not(#sheet-peek):not(#sheet-close),#dialog button:not(#close):not(.wheel-item),.action{min-height:44px;padding:10px 16px;border:1px solid #33334a;background:#fff;color:#24243b;border-radius:8px;font-size:14px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
#sheet .primary,#dialog .primary{background:#35335d!important;color:#fff!important;border-color:#35335d!important}
#dialog .big{min-width:200px;font-size:17px;font-weight:800}
.list{display:grid;gap:8px}
.link-item{display:grid!important;justify-items:start;justify-content:start!important;text-align:left;gap:2px;width:100%}
.link-item b{font-size:14px}
.link-item small{font-size:12px;color:#5b5a70;line-height:1.5}
.kind{font-size:12px;font-weight:700;color:#5d4a00;background:#ffe9a6;border-radius:4px;padding:0 6px}
.kind-influence{background:#d9e8ff;color:#1d3b6b}.kind-similar{background:#e9e3f7;color:#43356b}
.sources{padding-left:18px;font-size:13px;line-height:1.8}
#sheet a,#dialog a:not(.action){color:#383c9d;display:inline-flex;align-items:center;min-height:44px;min-width:44px}
.today{background:#fff3c4;border-radius:10px;padding:8px 12px;margin:6px 0}
.today p{margin:4px 0}
button.inline{min-height:44px;padding:4px 10px!important}
.ctx{border-left:3px solid #d9d3bb;padding-left:10px;margin:8px 0}
.badge{display:inline-block;font-size:12px;font-weight:700;background:#35335d;color:#fff;border-radius:4px;padding:0 6px}
.badge-line{font-size:13px;color:#56566b}
.play{background:#eef6ee;border-radius:10px;padding:4px 12px 8px;margin:12px 0}
.play ul{padding-left:18px;font-size:14px;line-height:1.7}

/* 下の帯 */
#nav{position:fixed;bottom:0;left:0;right:0;display:flex;align-items:stretch;background:#171b31f2;z-index:7;padding-bottom:var(--safe-b);box-shadow:0 -1px #ffffff33}
#nav button{flex:1 1 0;width:0;min-width:0;min-height:var(--nav-h);border:0;background:transparent;color:#fff;font-size:13px;font-weight:700;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;line-height:1.2;white-space:nowrap;padding:0 2px}
#today .full{display:none}#today .short{display:flex;flex-direction:column;align-items:center;line-height:1.2}#today .short small{font-size:12px;font-weight:600;opacity:.85}
#sound-label{font-size:12px}
#nav #birth{background:var(--accent);color:#282139;font-size:13px}
#sound .mute{display:inline}#sound .wave{display:none}
#sound[aria-pressed="true"] .mute{display:none}#sound[aria-pressed="true"] .wave{display:inline}

/* 起動 */
#boot{position:fixed;inset:0;background:radial-gradient(ellipse at 50% 43%,#263b50 0%,#111b30 55%,#050914 100%);z-index:20;display:grid;place-items:center;text-align:center;overflow:hidden}
#boot[hidden]{display:none}
#boot::before{content:"";position:absolute;inset:12px;border-radius:7% / 4%;border:1px solid #b5f8ef30;box-shadow:inset 0 0 70px #000c,0 0 24px #000;pointer-events:none}
#boot::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(transparent 0 2px,#0003 3px 4px),radial-gradient(ellipse at center,transparent 40%,#0007 100%);pointer-events:none}
#boot-sky{background:radial-gradient(ellipse 80% 15% at 50% 7%,#a4d7d62b,transparent 72%),linear-gradient(155deg,transparent 46%,#a8c6d72b 47% 62%,transparent 63%) top right/70% 22% no-repeat,linear-gradient(205deg,transparent 45%,#829dbb30 46% 65%,transparent 66%) top left/75% 24% no-repeat,repeating-linear-gradient(90deg,transparent 0 8px,#ffe4a21a 8px 11px,transparent 11px 16px) center 16%/70% 7% no-repeat,linear-gradient(165deg,transparent 46%,#82b9b52b 47% 62%,transparent 63%) left 87%/70% 24% no-repeat,linear-gradient(195deg,transparent 46%,#798bb62b 47% 62%,transparent 63%) right 89%/70% 24% no-repeat}
.boot-content{position:relative;text-shadow:0 0 12px #a8fff588;width:min(90%,540px);animation:appear .7s .5s both}
#boot.ready .boot-content{animation:none;opacity:1}
.boot-content canvas{width:min(100%,500px);height:auto;image-rendering:pixelated}
.boot-content p{font-size:13px;line-height:1.6}
/* 一文は句読点の位置で折る（.ph の中では折らない）。1 字だけの行を出さない。balance は効く環境での上乗せ */
.boot-content p{text-wrap:balance}
.boot-content .ph{display:inline-block;max-width:100%}
.press{font-weight:800;letter-spacing:.18em;margin:44px 0 20px;animation:blink 1.1s steps(2) infinite}
.boot-buttons{display:flex;justify-content:center;gap:12px}
.boot-buttons button{min-width:140px;min-height:48px;background:transparent;color:#fff;border:1px solid #fff}
.boot-buttons button:first-child{background:#ffde73;color:#1a1c30;border-color:#ffde73;font-weight:800}
.boot-line{box-shadow:0 0 14px 4px #a9fff1;position:absolute;left:0;top:50%;width:100%;height:2px;background:#fff;animation:boot .7s both;pointer-events:none}
@keyframes boot{0%{transform:scaleX(0);opacity:0}30%{transform:scaleX(1);opacity:1}100%{transform:scaleY(500);opacity:0}}
@keyframes appear{from{opacity:0}to{opacity:1}}
@keyframes blink{50%{opacity:.3}}

/* ダイアログ */
#overlay{position:fixed;inset:0;background:#0a1025b8;z-index:10;display:flex;align-items:flex-end;justify-content:center}
#overlay[hidden]{display:none}
#dialog{position:relative;width:100%;max-height:88dvh;overflow:auto;background:var(--paper);color:var(--ink);padding:24px 20px calc(24px + var(--safe-b));border-radius:20px 20px 0 0;box-shadow:0 -8px 40px #0003}
#dialog h1{font-size:22px;line-height:1.3;margin:0 48px 12px 0}
#close{position:absolute;right:10px;top:10px;font-size:25px;min-width:44px;min-height:44px;border:0;background:transparent;color:#444}
#dialog input{width:100%;min-height:48px;padding:10px;border:1px solid #777;border-radius:8px;background:#fff;color:#222;font-size:16px}
#dialog.card{background:#101326;color:#fff;max-height:100dvh;height:100dvh;border-radius:0;padding:56px 16px calc(16px + var(--safe-b))}
#dialog.card h1{color:#fff;text-align:center;margin:0 48px 12px}
#dialog.card #close{color:#fff}
#dialog.card .meta{color:#cfd2e6}
#dialog.card img{display:block;height:auto;width:auto;max-width:100%;max-height:calc(100dvh - 260px);margin:0 auto;border-radius:6px;box-shadow:0 10px 40px #000a}
.wheel-wrap{position:relative;height:220px;margin:12px auto;max-width:280px}
.wheel{height:220px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;border-radius:12px;background:#fff;border:1px solid #d6d0b9}
.wheel::-webkit-scrollbar{display:none}
.wheel-pad{height:88px}
.wheel-item{height:44px;line-height:44px;text-align:center;scroll-snap-align:center;font-size:18px;color:#8a8899;cursor:pointer}
.wheel-item[aria-selected="true"]{color:#1d1c33;font-weight:900;font-size:22px}
.wheel-window{position:absolute;left:8px;right:8px;top:88px;height:44px;border-top:2px solid #35335d;border-bottom:2px solid #35335d;pointer-events:none}

#toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + var(--peek-h) + 24px);transform:translateX(-50%);background:#24243d;color:#fff;border-radius:8px;padding:12px 14px;z-index:30;opacity:0;pointer-events:none;transition:opacity .2s;white-space:pre-line;font-size:14px;max-width:90vw}
#toast.show{opacity:1}
#crt{display:none;position:fixed;inset:0;z-index:40;pointer-events:none;background:repeating-linear-gradient(transparent 0 2px,#0005 3px 4px),radial-gradient(ellipse at center,transparent 55%,#000b 100%)}
body.crt #crt{display:block}
body.crt #world{transform:scale(1.015);border-radius:28px;filter:saturate(1.15) contrast(1.05)}

@media (min-width:768px){
  .brand{right:40px;top:36px}
  #sheet{left:auto;right:16px;bottom:16px;width:400px;height:calc(100dvh - 32px);border-radius:14px}
  #hint{top:52%}
  .ask{top:calc(70% + 18px)}
  #birth-big{top:calc(70% + 20px)}
  #nav{left:30px;bottom:24px;right:auto;background:#171b31d9;border-radius:8px;padding:0;box-shadow:none}
  #nav button{flex:none;width:104px;padding:0 6px;min-height:48px;flex-direction:row;gap:6px;font-size:13px}
  #today .full{display:inline}#today .short{display:none}
  #nav #birth{border-radius:8px 0 0 8px}
  #overlay{align-items:center}
  #dialog{width:520px;max-height:86dvh;border-radius:14px;padding:32px 28px}
  #dialog.card{width:100%;border-radius:0}
  #toast{bottom:96px}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.boot-line{display:none}}

/* 起動画面: トップ（音の 2 択）と、共有リンクで着いた時（生まれ年の入口・「はじめる」1 つ） */
.lead-arrival,#start-arrival{display:none}
#boot[data-mode="arrival"] .lead-top,#boot[data-mode="arrival"] #start-sound,#boot[data-mode="arrival"] #start-muted,#boot[data-mode="arrival"] #anniversary{display:none}
#boot[data-mode="arrival"] .lead-arrival{display:block;font-size:15px;font-weight:700}
#boot[data-mode="arrival"] #start-arrival{display:inline-block;background:#ffde73;color:#1a1c30;border-color:#ffde73;font-weight:800;min-width:200px}
.boot-buttons button[aria-busy="true"]{opacity:.75}
.boot-buttons button[aria-busy="true"]::after{content:"…";margin-left:4px}
/* 生まれ年カードの後に 1 回だけ出す「今日は何の日」 */
#today-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--nav-h) + var(--peek-h) + 12px + var(--safe-b));z-index:8;display:flex;align-items:center;gap:6px;width:min(calc(100vw - 24px),520px);background:#fff3c4;color:#2a2440;border-radius:12px;padding:0 0 0 12px;box-shadow:0 6px 20px #0005}
#today-bar[hidden]{display:none}
#today-bar p{margin:0;font-size:13px;font-weight:700;line-height:1.35;flex:1;min-width:0}
#today-bar button{min-height:44px;min-width:44px;border:0;background:transparent;color:#2a2440;font-weight:800;font-size:13px}
#today-share{background:#35335d!important;color:#fff!important;border-radius:8px;padding:0 12px}
/* つながる作品の行: 作品へ移るボタン＋根拠・注意書き・出典 */
.link-row{border:1px solid #d9d3bb;border-radius:10px;padding:6px 10px 8px;background:#fffdf5}
.link-row .link-item{border:0!important;padding:4px 0!important;background:transparent!important}
.link-row .basis{font-size:13px;line-height:1.6;margin:2px 0;color:#3c3b52}
.caveat{font-size:12px;line-height:1.6;margin:2px 0;color:#6b4a14}
.rel-src{font-size:12px;margin:2px 0}
.supports{display:block;font-size:12px;color:#5b5a70;line-height:1.5}
.about-list{padding-left:18px;font-size:13px;line-height:1.7}
/* スマホ: つながる作品へ移る間は、シートを 1 行に下げて弧とワープを見せる */
@media (max-width:767px){
  body.traveling #sheet[data-state="open"]{transform:translateY(calc(100% - var(--peek-h)))}
  body[data-arrival="1"] #edge-tags{visibility:hidden}
  body[data-selected="1"] .ask{display:none}
}
/* 404（年表の外） */
body.page-404{overflow:auto;background:radial-gradient(ellipse at 50% 40%,#263b50 0%,#111b30 55%,#050914 100%);min-height:100dvh;display:grid;place-items:center;text-align:center;padding:24px}
.lost{max-width:520px}
.lost-code{font:900 96px/1 ui-monospace,Consolas,monospace;letter-spacing:.12em;color:#ffdf7d;text-shadow:6px 6px 0 #6b4a14;margin:0 0 12px}
.lost h1{font-size:22px;margin:0 0 12px}
.lost p{font-size:15px;line-height:1.7}
.lost-home{display:inline-flex;align-items:center;min-height:48px;padding:0 24px;border-radius:24px;background:#ffde73;color:#1a1c30;font-weight:800;text-decoration:none}
/* ← 過去／未来 → の案内: 地面の上の空いた所に、読みやすい札で */
#hint{top:calc(62% + 72px);width:auto;gap:12px;padding:0}
#hint span{background:#171b32d9;border:1px solid #ffffff55;border-radius:16px;padding:6px 12px;font-size:13px}
@media (min-width:768px){#hint{top:calc(70% + 76px)}#today-bar{bottom:88px;left:30px;transform:none}}
/* 狭い幅: 右上は名前だけにして、年の数字と重ならないようにする（年の数字は layout.js で縮める） */
@media (max-width:379px){.brand span{display:none}}
/* 低い画面（横向きのスマホ・拡大した PC）: 大きいボタンと吹き出しは上側の空に小さく出し、シートの 1 行と重ねない */
@media (max-height:479px) and (max-width:767px){
  #birth-big{top:84px;min-height:44px;font-size:14px;padding:0 18px;box-shadow:0 4px 0 #8c6a1e,0 6px 16px #0006}
  .ask{top:84px}
  .ask::before{display:none}
  #hint{top:auto;bottom:calc(var(--nav-h) + var(--peek-h) + 8px + var(--safe-b))}
}
.alias-note{font-size:13px;font-weight:700;color:#35335d;background:#ece8fa;border-radius:6px;padding:6px 10px;margin:8px 0}
/* 共有リンクで来た人の起動画面では PRESS START を出さない（押す物ではないので。トップの起動画面は残す） */
#boot[data-mode="arrival"] .press{display:none}
#boot[data-mode="arrival"] .boot-buttons{margin-top:32px}
/* シートを開いた時は、上の 1 行（題・年・機種・開発）を隠す（本文の題と重なるので） */
#sheet[data-state="open"] #peek-title,#sheet[data-state="open"] #peek-meta{display:none}
#sheet[data-state="open"] .sheet-head{min-height:44px}
#sheet[data-state="open"] #sheet-peek{min-height:44px}
/* 起動の失敗 */
#boot.failed .boot-buttons,#boot.failed .press,#boot.failed #anniversary{display:none}
.boot-error p{font-size:16px;font-weight:700;margin:28px 0 12px}
#boot-reload{min-width:160px;min-height:48px;background:#ffde73;color:#1a1c30;border:0;font-weight:800}
/* 看板の束の札「＋N 作」: 見た目は小さく、押せる所は 44px */
.bundle{position:absolute;left:0;top:0;height:44px;min-width:44px;border:0;background:transparent;color:#fff;font-size:12px;font-weight:800;padding:0 8px;text-align:left;pointer-events:auto;display:flex;align-items:center}
.bundle::before{content:"";position:absolute;z-index:-1;left:0;right:0;top:10px;bottom:10px;border-radius:12px;background:#171b32cc;border:1px solid #ffffff99;box-shadow:0 2px 6px #0005}
[data-era="0"] .bundle::before{background:#101b2bd9;border-color:#a6fff1}
[data-era="4"] .bundle{color:#263e4a}
[data-era="4"] .bundle::before{background:#ffffffd9;border-color:#fff}
/* 起動画面の主役のビットと、うっすらとしたベクター線の地平線と星 */
#boot-sky{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#boot-bit{display:block;width:140px;height:150px;margin:0 auto 6px;image-rendering:pixelated}
@media (max-height:600px){#boot-bit{width:96px;height:103px}}
.play-meta{font-size:12px;line-height:1.55;color:#56566b;margin:6px 0 0}
#sheet-body .desc{margin:6px 0 4px}
.nolink{color:#56566b}

/* スマホのシート: 開いた時は最初は画面の 62%（高さは ui.js の --open-y）。中をスクロールすると全体へ（.tall） */
@media (max-width:767px){
  #sheet{height:calc(100dvh - var(--nav-h) - var(--safe-b) - 8px)}
  #sheet[data-state="open"]{transform:translateY(var(--open-y,38dvh))}
  #sheet[data-state="open"].tall{transform:none}
}

/* 看板の板を上下に広げ、題の 2 行目が板の枠にかからないようにする（題 12px×1.2 の 2 行＝約 29px が入る高さ） */
#signs .sign::before{top:3px;bottom:3px}

/* 買う・遊ぶ: 店の名前のリンク（押せる高さ 44px） */
.buy-links{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0}
.buy-link{display:inline-flex;align-items:center;min-height:44px;min-width:44px;padding:0 16px;border:1px solid #33334d55;border-radius:22px;font-size:14px;font-weight:700;color:inherit;text-decoration:none;background:#fffdf4}
.buy-link:focus-visible{outline:2px solid #3a3aa0;outline-offset:2px}

/* 歩くこと自体がゲーム（v2 の決定 1・5・8・10） */
/* 叩いた看板が跳ねる（位置は transform で毎フレーム置くので、跳ねは translate で重ねる） */
.sign.struck{animation:sign-bump .32s cubic-bezier(.2,.9,.3,1.3)}
@keyframes sign-bump{0%{translate:0 0}35%{translate:0 -14px}70%{translate:0 2px}100%{translate:0 0}}
/* 見た看板: 色を少し変える（時代ごと。印は左上の小さな点） */
.sign.seen::before{filter:saturate(.55) brightness(1.18)}
.sign.seen::after{content:"";position:absolute;left:4px;top:9px;width:6px;height:6px;border-radius:50%;background:#fff7a0;box-shadow:0 0 0 1px #0006}
[data-era="0"] .sign.seen::after{background:#86ffeb;border-radius:0}
#signs .sign.seen::after{top:5px}
/* 持ち物（ミニゲームの入口）。絵は fg の canvas に描き、ここは押せる範囲だけ */
#item{position:fixed;border:0;background:transparent;z-index:3;padding:0;border-radius:50%;cursor:pointer}
#item[hidden]{display:none}
#item:focus-visible{outline:2px solid #a9fff1;outline-offset:2px}
/* 時代の境の帯（1 秒・操作を止めない） */
#stage{position:fixed;left:50%;top:30%;transform:translate(-50%,-6px);z-index:5;pointer-events:none;opacity:0;padding:8px 16px;font:900 15px/1.2 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.12em;white-space:nowrap;color:#fff8dc;background:#171b32d9;border:1px solid #ffffff66;border-radius:4px}
#stage.show{animation:stage-band 1s ease-out forwards}
@keyframes stage-band{0%{opacity:0;transform:translate(-50%,-6px)}15%{opacity:1;transform:translate(-50%,0)}75%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,0)}}
#stage[data-era="0"]{color:#a9fff1;border-color:#a9fff1;background:#060b1cd9;text-shadow:0 0 6px #74f8ed}
#stage[data-era="1"]{color:#ffe47f;border:2px solid #ffe47f;border-radius:0;background:#272744e6}
#stage[data-era="2"]{color:#fff;border:3px double #ffe39a;background:#203864e6}
#stage[data-era="3"]{color:#f4f8fb;border-color:#ffda8a;background:linear-gradient(125deg,#4a6688e6 0 30%,#334b68e6 31%)}
#stage[data-era="4"]{color:#263e4a;border-color:#fff;background:#ffffffe0;border-radius:14px}
/* スタンプが付いた瞬間（1 秒で消える。押さなくてよい） */
#stamp-pop{position:fixed;left:50%;top:38%;transform:translateX(-50%);z-index:6;pointer-events:none;display:flex;align-items:center;gap:8px;padding:4px 14px 4px 4px;background:#171b32e6;color:#fff8dc;border-radius:40px;font-size:13px;font-weight:800;white-space:nowrap;opacity:0}
#stamp-pop[hidden]{display:none}
#stamp-pop canvas{width:56px;height:56px}
#stamp-pop.show{animation:stamp-pop 1s ease-out forwards}
@keyframes stamp-pop{0%{opacity:0;scale:1.5}18%{opacity:1;scale:.94}28%{scale:1}80%{opacity:1}100%{opacity:0}}
@media (min-width:768px){#stage{top:34%;font-size:16px;padding:8px 18px}#stamp-pop{top:42%;font-size:15px}#stamp-pop canvas{width:72px;height:72px}}
@media (prefers-reduced-motion:reduce){#stage.show,#stamp-pop.show{opacity:1}}
/* スタンプ帳 */
.stamps{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px 4px;padding:0;margin:8px 0 12px}
.stamps li{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:800}
.stamps canvas{width:88px;height:88px;border-radius:50%;background:#171b32}
/* ミニゲーム: 画面いっぱい。持ち物の位置から広がる */
#dialog.minigame{position:fixed;inset:0;width:100%;height:100dvh;max-height:none;border-radius:0;padding:0;background:#02040c;color:#d8fff8;overflow:hidden;transform-origin:var(--ox,50%) var(--oy,50%);animation:mg-open .26s cubic-bezier(.2,.8,.2,1)}
@keyframes mg-open{from{transform:scale(.06);opacity:.3}to{transform:none;opacity:1}}
#dialog.minigame #close{color:#a9fff1;z-index:2;top:max(10px,env(safe-area-inset-top))}
#dialog.minigame #dialog-body{height:100%}
@media (min-width:768px){#dialog.minigame{width:100%;max-height:none;border-radius:0;padding:0}}
@media (prefers-reduced-motion:reduce){#dialog.minigame{animation:none}}
.mg{position:relative;height:100%}
#mg-canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}
.mg-hint{position:absolute;left:50%;top:58%;transform:translateX(-50%);margin:0;padding:8px 14px;border:1px solid #a9fff1;border-radius:4px;background:#02040cd9;color:#a9fff1;font-weight:800;font-size:14px;white-space:nowrap;pointer-events:none;text-shadow:0 0 6px #74f8ed}
.mg-hint[hidden]{display:none}
.mg-result{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(340px,calc(100% - 32px));padding:20px 16px;border:2px solid #a9fff1;background:#02040cf0;color:#d8fff8;text-align:center;box-shadow:0 0 18px #74f8ed66}
.mg-result[hidden]{display:none}
.mg-score{margin:0;font-size:18px}.mg-score b{font-size:56px;color:#a9fff1;font-family:ui-monospace,Menlo,Consolas,monospace}
.mg-best{margin:4px 0;font-weight:800}
.mg-src{margin:8px 0 4px;font-size:13px;color:#86ffeb}
.mg-result .actions{flex-direction:column;align-items:stretch}
/* 年の数字の下の「この年表に収録 n 作」（淡く・小さく） */
#year-count{position:fixed;margin:0;z-index:3;font-size:12px;font-weight:700;color:#ffffffd0;text-shadow:0 1px 3px #000c;pointer-events:none;white-space:nowrap}
#year-count[hidden]{display:none}
/* 「…」のメニュー: スタンプ帳とこのサイトについてを同じ高さに */
.menu-list{display:flex;flex-direction:column;gap:10px;margin:8px 0 4px}
.menu-list button{justify-content:flex-start!important;font-weight:800;font-size:16px!important}
/* 下の操作の帯を、時代の機械の操作盤に（決定 4・案 A。場所・言葉・押し方は同じ。境では 0.4 秒で混ざって移る） */
#nav{transition:background-color .4s,border-color .4s,box-shadow .4s,color .4s;border:0 solid transparent}
#nav button{transition:color .4s,background-color .4s,box-shadow .4s}
/* ベクター: 黒地に発光の線の枠 */
#nav[data-era="0"]{background:#02040cf2;border-top:1px solid #a9fff1;box-shadow:0 -2px 12px #74f8ed66,inset 0 1px 0 #a9fff133}
#nav[data-era="0"] button:not(#birth){color:#c9fff6;text-shadow:0 0 6px #74f8ed}
#nav[data-era="0"] button+button{box-shadow:inset 1px 0 0 #a9fff144}
/* 8bit: ドットの枠と 4 色 */
#nav[data-era="1"]{background:#272744;border-top:4px solid #fff0bb;box-shadow:0 -4px 0 #16172a}
#nav[data-era="1"] button:not(#birth){color:#fff8dc}
#nav[data-era="1"] button+button{box-shadow:inset 4px 0 0 #16172a}
/* 16bit: 灰色の樹脂とボタンのくぼみ */
#nav[data-era="2"]{background:linear-gradient(#cfcfd6,#a9a9b4);border-top:2px solid #e9e9ef;box-shadow:0 -1px 0 #6d6d7a}
#nav[data-era="2"] button:not(#birth){color:#24243a;box-shadow:inset 0 0 0 5px #b9b9c3,inset 0 4px 5px 5px #0000002a,inset 0 -2px 0 5px #ffffff80;border-radius:14px}
/* ポリゴン: 半透明の樹脂 */
#nav[data-era="3"]{background:linear-gradient(160deg,#6c9cc4cc 0 35%,#3f6f9ccc 36%);border-top:1px solid #d4ecff;box-shadow:inset 0 1px 0 #ffffff66;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#nav[data-era="3"] button:not(#birth){color:#fff;text-shadow:0 1px 2px #0008}
/* 今: 滑らかな面 */
#nav[data-era="4"]{background:#f7f5eef5;box-shadow:0 -6px 24px #243c4a2e}
#nav[data-era="4"] button:not(#birth){color:#263e4a}
@media (min-width:768px){
  #nav[data-era="0"]{border:1px solid #a9fff1}
  #nav[data-era="1"]{border:4px solid #fff0bb;border-radius:0;box-shadow:4px 4px 0 #16172a}
  #nav[data-era="1"] #birth{border-radius:0}
  #nav[data-era="2"]{border:2px solid #e9e9ef;border-radius:12px;box-shadow:0 3px 0 #6d6d7a}
  #nav[data-era="3"]{border:1px solid #d4ecff;border-radius:6px}
  #nav[data-era="4"]{border-radius:16px}
  #nav[data-era="4"] #birth{border-radius:16px 0 0 16px}
}
@media (prefers-reduced-motion:reduce){#nav,#nav button{transition:none}}
/* ミニゲームの結果の枠は、その時代の様式で */
.mg[data-era="1"] .mg-result{border:4px solid #fff0bb;background:#272744f2;color:#fff8dc;box-shadow:6px 6px 0 #16172a}
.mg[data-era="1"] .mg-score b,.mg[data-era="1"] .mg-src{color:#ffdc74}
.mg[data-era="1"] .mg-hint{border:3px solid #fff0bb;color:#fff8dc;background:#272744e6;text-shadow:none;border-radius:0}
.mg[data-era="2"] .mg-result{border:3px double #ffe39a;background:#203864f2;color:#fff;box-shadow:0 6px 20px #0006}
.mg[data-era="2"] .mg-score b,.mg[data-era="2"] .mg-src{color:#ffe39a}
.mg[data-era="2"] .mg-hint{border:3px double #ffe39a;color:#fff;background:#203864e6;text-shadow:none}
.mg[data-era="3"] .mg-result{border:1px solid #d4ecff;background:linear-gradient(160deg,#4a6688f2 0 35%,#334b68f2 36%);color:#f4f8fb;box-shadow:0 8px 24px #0006}
.mg[data-era="3"] .mg-score b,.mg[data-era="3"] .mg-src{color:#ffda8a}
.mg[data-era="3"] .mg-hint{border-color:#ffda8a;color:#f4f8fb;background:#334b68e6;text-shadow:none}
.mg[data-era="4"] .mg-result{border:0;border-radius:18px;background:#fffffff2;color:#263e4a;box-shadow:0 12px 36px #243c4a40}
.mg[data-era="4"] .mg-score b{color:#263e4a;font-family:system-ui,sans-serif}.mg[data-era="4"] .mg-src{color:#6a8296}
.mg[data-era="4"] .mg-hint{border:0;border-radius:14px;color:#263e4a;background:#ffffffe6;text-shadow:none}
#dialog.minigame:has(.mg[data-era="4"]) #close{color:#263e4a}
#dialog.minigame:has(.mg[data-era="1"]) #close,#dialog.minigame:has(.mg[data-era="2"]) #close,#dialog.minigame:has(.mg[data-era="3"]) #close{color:#fff8dc}
/* スタンプ帳の「着替え」（集めた服だけ） */
.wardrobe{list-style:none;display:flex;flex-wrap:wrap;gap:10px 6px;padding:0;margin:6px 0 4px}
.wardrobe li{display:flex;flex-direction:column;align-items:center;width:72px;font-size:12px;font-weight:800}
.wardrobe img{width:56px;height:auto}
.menu-list a{justify-content:flex-start!important;font-weight:800;font-size:16px!important}
.index-links{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 8px}

/* 収益の入口（PR の印・紹介料の一文・応援・制作のご依頼） */
.pr{display:inline-block;margin-left:6px;padding:0 4px;border:1px solid currentColor;border-radius:3px;font-size:12px;font-weight:700;line-height:1.4;opacity:.75}
.pr-note{margin:6px 0 0;font-size:13px}
.pr-note a{display:inline-flex;align-items:center;min-height:44px}
/* 案内役の名前（起動画面・スタンプ帳。小さく） */
.boot-content .boot-guide{margin:2px 0 6px;font-size:12px;letter-spacing:.08em;opacity:.8}
.stamp-guide{margin:0 0 6px;font-size:13px;text-align:center;opacity:.8}
