/* 十年目の招待状：色と、地図・部屋・記録の画面 */
:root{
  --bg:#0d1114; --bg2:#131a1e; --panel:#182126; --panel2:#212c33; --line:rgba(220,232,236,.10); --line2:rgba(220,232,236,.18);
  --ink:#e6ebe8; --ink2:#9fadb0; --ink3:#6c7a7e;
  --gold:#c8b07a; --gold2:#e6d6a8; --blood:#a8393a; --lake:#3d6f86;
}
body{background:var(--bg)}
.ph{background:radial-gradient(120% 90% at 50% 0%,#2a3c44 0%,#141c20 60%,#0b1013 100%)}
.ph.person{background:radial-gradient(90% 80% at 50% 25%,#34464d 0%,#182024 55%,#0c1113 100%)}
.hud,.nav,.screen.game .talk-foot{background:#0f1518}

/* 地図 */
.mapbox{margin:12px 0 4px;border:1px solid var(--line2);border-radius:12px;background:#0b1013;padding:8px}
.floor-tabs{display:flex;gap:6px;margin-bottom:6px}
.floor-tabs button{flex:1;font-size:13px;padding:5px 0;border-radius:99px;border:1px solid var(--line2);color:var(--ink2);position:relative}
.floor-tabs button.on{border-color:var(--gold);color:var(--gold2);background:rgba(200,176,122,.12)}
.floor-tabs button i{position:absolute;top:4px;right:10px;width:6px;height:6px;border-radius:50%;background:var(--gold)}
.map{display:block;width:100%;height:auto;user-select:none}
.map .rm{cursor:pointer}
.map .rm.locked{cursor:default}
.map .rm.locked .nm{fill:var(--ink3)}
.map text{text-anchor:middle;dominant-baseline:middle;pointer-events:none}
.map .nm{font-size:3.4px;fill:var(--ink);font-family:var(--mincho);font-weight:700;letter-spacing:.1px}
.map .pp{font-size:2.5px;fill:var(--gold2)}
.map .sn{font-size:2.4px;fill:#9cc3d3}
.map .me{fill:var(--gold)}
.map .corr{fill:#10171b;stroke:rgba(220,232,236,.12);stroke-width:.3}
.map .cn{font-size:2.6px;fill:var(--ink3)}
.map .lake{fill:rgba(61,111,134,.35)}

/* 部屋 */
.room-head{display:flex;gap:12px;align-items:center;margin:14px 0 0}
.room-head .pic{flex:0 0 96px;height:64px;border-radius:10px}
.room-head .ph svg{display:none}
.room-head .ph b{font-size:12px}
.room-title small{display:block;font-size:11px;color:var(--ink3);letter-spacing:.1em}
.room-title b{font-family:var(--mincho);font-size:21px;letter-spacing:.08em}
.room-desc{margin:10px 0 4px;font-size:15px}
.here-list{display:flex;flex-direction:column;gap:8px}
.here{display:flex;gap:10px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:8px 10px}
.here .av{flex:0 0 40px;width:40px;height:40px;border-radius:50%;overflow:hidden}
.here .av .pic{width:100%;height:100%}
.here .av .ph svg{width:22px;height:22px}
.here .av .ph b{display:none}
.here b{display:block;font-family:var(--mincho);font-size:15px;line-height:1.3}
.here span{display:block;font-size:12px;color:var(--ink2)}
.spot-list{display:flex;flex-wrap:wrap;gap:8px}
.spot-btn small{margin-left:6px;font-size:10px;color:var(--ink3)}
.present-row{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 10px}
.present-row span{font-size:12px;padding:2px 10px;border:1px solid var(--line2);border-radius:99px;color:var(--ink2)}

/* 見たこと */
.journal{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0;font-size:13px;line-height:1.8}
.journal b{display:block;font-family:var(--mincho);color:var(--gold2);font-size:14px;margin-bottom:2px}
.journal .jr{display:inline-block;min-width:6.5em;color:var(--ink3)}
.profile.dead{opacity:.55}

/* 待ち */
.loading{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;background:rgba(8,11,13,.72);text-align:center}
.loading p{font-family:var(--mincho);color:var(--ink2);margin:10px 0 0;letter-spacing:.1em}
.loading .typing{justify-content:center}
.vote-row b{text-align:right}
.loading .typing{display:inline-flex}
.toast{pointer-events:none}
.aim-one{font-size:12px;color:var(--ink2);padding:4px 2px}

/* 画面の左右分け（広い画面だけ。スマホは地図を部屋の上に出す） */
.split{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.split-main{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;min-width:0}
.split-main .main{flex:1 1 auto;min-height:0}
.split-map{display:none}
@media (min-width:900px){
  .split.has-map{flex-direction:row}
  .split.has-map .split-map{display:block;flex:0 0 48%;max-width:620px;overflow-y:auto;padding:14px 18px 20px;border-right:1px solid var(--line);background:#0b1013}
  .split.has-map .map-inline{display:none}
  .split.has-map .split-main .wrap{max-width:680px}
  .side-head small{display:block;font-size:11px;color:var(--ink3);letter-spacing:.12em}
  .side-head b{font-family:var(--mincho);font-size:18px;letter-spacing:.1em}
  .split-map .mapbox{margin-top:10px}
  .side-note{margin:10px 2px 0;line-height:1.8}
}
/* 黒鳴館の額縁スタイルを地図には使わない・色を湖の館向けに */
:root{--frame:rgba(200,176,122,.35);--frame2:rgba(200,176,122,.12);--panelbg:#141c21}
.map{border:0;background:none;box-shadow:none;border-radius:0}
.tl.them.mc .bubble{border-color:rgba(156,195,211,.45);background:#16222a}.tl.them.mc .who{color:#9cc3d3}

/* 紙芝居の操作（大きなボタン。次へはボタンだけ） */
.story{cursor:default}
.story-sub{display:flex;align-items:center;justify-content:space-between;color:var(--ink3);font-size:12px;padding:6px 0}
.story-ctrl{display:flex;gap:10px;padding:8px 0 calc(16px + env(safe-area-inset-bottom))}
.story-ctrl .btn{min-height:54px;font-size:16px}
.story-ctrl .story-pause{flex:1}
.story-ctrl .story-prev{flex:0 0 auto;padding:12px 18px}
.story-ctrl .story-go{flex:1.4}

/* 会話ログ */
.talklog{border:1px solid var(--line);border-radius:12px;margin:8px 0;background:var(--panel);overflow:hidden}
.talklog-head{display:flex;justify-content:space-between;align-items:center;width:100%;padding:11px 14px;text-align:left}
.talklog-head b{font-family:var(--mincho);font-size:15px}
.talklog-head span{font-size:12px;color:var(--ink3)}
.talklog.open .talklog-head{border-bottom:1px solid var(--line)}
.talklog .tlog{padding:6px 12px 12px;margin:0}

/* ---- あかつき丸：夜の海と真鍮の配色 ---- */
:root{
  --bg:#0a1018; --bg2:#101a26; --panel:#142233; --panel2:#1b2c40; --line:rgba(214,226,240,.10); --line2:rgba(214,226,240,.18);
  --ink:#e8edf3; --ink2:#9fb0c2; --ink3:#6a7d90;
  --gold:#d2a85a; --gold2:#ecd29a; --frame:rgba(210,168,90,.35); --frame2:rgba(210,168,90,.12); --panelbg:#122031;
}
body{background:var(--bg)}
.ph{background:radial-gradient(120% 90% at 50% 0%,#23384f 0%,#111d2b 60%,#0a1018 100%)}
.ph.person{background:radial-gradient(90% 80% at 50% 25%,#2c4560 0%,#15212f 55%,#0b121b 100%)}
.hud,.nav,.screen.game .talk-foot{background:#0c1520}
.mapbox{background:#08101a}
.split.has-map .split-map{background:#08101a}
.map .hull{fill:rgba(210,168,90,.05);stroke:rgba(210,168,90,.25);stroke-width:.4}
.map .lake{fill:none;stroke:rgba(120,170,210,.35);stroke-width:.6}
.tl.them.mc .bubble{border-color:rgba(210,168,90,.45);background:#172434}
.tl.them.mc .who{color:var(--gold2)}

/* ---- 船内図（部屋の絵を敷き、船体の板目と海） ---- */
.mapbox{padding:8px;border-radius:14px;box-shadow:inset 0 0 0 1px rgba(210,168,90,.2),0 10px 30px rgba(0,0,0,.4)}
.map{border-radius:10px;overflow:hidden}
.map .rm{cursor:pointer}
.map .rm .bg{fill:#16263a}
.map .rm .pic{opacity:.62;transition:opacity .2s,filter .2s}
.map .rm:hover .pic{opacity:.9}
.map .rm .frame{fill:none;stroke:rgba(236,210,154,.4);stroke-width:.35}
.map .rm.out .frame{stroke-dasharray:1.2 .7}
.map .rm.cur .frame{stroke:#ecd29a;stroke-width:.8}
.map .rm.cur .pic{opacity:.95}
.map .rm .halo{fill:none;stroke:rgba(236,210,154,.5);stroke-width:1.2;filter:blur(.6px);animation:halo 2.4s ease-in-out infinite}
@keyframes halo{0%,100%{opacity:.45}50%{opacity:1}}
.map .rm.locked{cursor:default}
.map .rm.locked .pic{opacity:.18;filter:grayscale(1)}
.map .rm.locked .nm{fill:rgba(232,237,243,.45)}
.map .nm{fill:#fff;font-family:var(--mincho);font-weight:700;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:rgba(0,0,0,.8);stroke-width:.7px;pointer-events:none}
.map .lk{fill:rgba(232,237,243,.5);font-size:2.4px;text-anchor:middle;pointer-events:none}
.map .sn{fill:#bfe3f2;font-size:2.4px;text-anchor:middle;paint-order:stroke;stroke:rgba(0,0,0,.8);stroke-width:.5px;pointer-events:none}
.map .dot{fill:#bfe3f2}
.map .pulse{animation:pulse 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes pulse{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}
.map .face{fill:none;stroke:#ecd29a;stroke-width:.35}
.map .face.nf{fill:#253a52}
.map .fi{fill:#fff;font-size:2.4px;text-anchor:middle;dominant-baseline:middle;pointer-events:none}
.map .hull{stroke:rgba(236,210,154,.35);stroke-width:.5}
.map .corr{fill:rgba(0,0,0,.25);stroke:rgba(236,210,154,.18);stroke-width:.3}
.map .cn{fill:rgba(236,210,154,.55);font-size:2.4px;text-anchor:middle;letter-spacing:.3px}
.map .lake{fill:none;stroke:rgba(120,170,210,.35);stroke-width:.6}

/* ---- シリアルコードと語りの灯 ---- */
.mm-serial-form{max-width:340px;margin:0 auto;display:flex;flex-direction:column;gap:10px;text-align:center}
.mm-serial-form p{margin:0;font-size:13px;color:var(--ink2)}
.mm-serial-form input{font-family:ui-monospace,Menlo,monospace;font-size:17px;letter-spacing:.08em;text-align:center;padding:12px;border-radius:10px;border:1px solid var(--line2);background:rgba(0,0,0,.35);color:var(--ink);text-transform:uppercase}
.mm-serial-msg{min-height:1.4em;color:#f0b4a8!important}
.mm-buy{font-size:13px;color:var(--gold2);text-decoration:underline}
.mm-serial-line{margin:12px 0 0;font-size:12px;color:var(--ink3)}
.mm-serial-line span{font-family:ui-monospace,Menlo,monospace;color:var(--ink2)}
.mm-serial-line button{font-size:12px;color:var(--gold2);text-decoration:underline}
.mm-lamp{display:flex;align-items:center;gap:5px;margin-left:4px}
.mm-lamp small{font-family:var(--mincho);font-size:12px;color:var(--gold2)}
.mm-lamp span{width:54px;height:6px;border-radius:99px;background:rgba(255,255,255,.1);overflow:hidden}
.mm-lamp i{display:block;height:100%;background:linear-gradient(90deg,#e8a64a,#ffe3a0);box-shadow:0 0 6px rgba(255,210,130,.6)}

