/* 『十七時の残響』 画面。舞台は 1280x720 で作り、窓に合わせて拡大縮小する。 */
:root {
  --ink: #070a17; --navy: #0d1330; --navy2: #17204a; --line: #2b3670;
  --dusk: #ff7a3c; --rose: #ff3d77; --cyan: #37e6d2; --gold: #ffd76a; --uv: #8a4dff; --glow: #5dff8f;
  --text: #eef0ff; --dim: #9aa2c8;
  --ui: "Zen Kaku Gothic New", "Yu Gothic UI", "Meiryo", sans-serif;
  --serif: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --impact: "Dela Gothic One", "Zen Kaku Gothic New", "Yu Gothic UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; font-family: var(--ui); color: var(--text); user-select: none; -webkit-user-select: none; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
#app { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; overflow: clip; background: var(--ink); }

/* ---------------------------------------------------------------- 舞台 */
#stage { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s ease; }
.bg.on { opacity: 1; }
#stage.scene .bg { filter: brightness(.72) saturate(.9); transition: opacity .6s ease, filter .4s; }
#rain { position: absolute; inset: -20%; pointer-events: none; opacity: .0; transition: opacity 1s;
  background-image: repeating-linear-gradient(104deg, transparent 0 9px, rgba(190, 210, 255, .10) 9px 10px, transparent 10px 23px);
  background-size: 220px 220px; animation: rain .45s linear infinite; }
#rain.on { opacity: .55; }
@keyframes rain { to { background-position: -60px 220px; } }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 42%, transparent 48%, rgba(4, 6, 18, .72) 100%); }

#chars { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
#stage.scene #chars, #stage.scene #hs, #stage.scene #hsuv { opacity: 0; pointer-events: none; }
.lchar { position: absolute; pointer-events: auto; cursor: pointer;
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, .55)) brightness(.9); transition: filter .2s, transform .2s; animation: charIn .5s ease both; }
.lchar:hover { filter: drop-shadow(0 0 20px rgba(255, 160, 80, .55)) brightness(1.05); transform: translateY(-6px); }
.lchar-tag { position: absolute; bottom: 118px; transform: translateX(-50%) skewX(-10deg); background: var(--ink); border-left: 5px solid var(--c, var(--dusk));
  padding: 4px 16px 5px 12px; font-weight: 900; font-size: 19px; letter-spacing: .08em; pointer-events: none; white-space: nowrap; box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); }
.lchar-tag i { font-style: normal; display: inline-block; margin-left: 8px; background: var(--rose); color: #fff; font-size: 13px; padding: 1px 6px; vertical-align: 2px; animation: blink 1.1s infinite; }
@keyframes charIn { from { opacity: 0; transform: translateY(18px); } }

#sprite { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .22s; }
#sprite.on { opacity: 1; }
#sprite img { position: absolute; left: 50%; filter: drop-shadow(0 6px 26px rgba(0, 0, 0, .6)); }
#sprite.pop img { animation: pop .28s ease; }
#sprite.enter img { animation: enter .3s ease; }
#sprite.dim img { filter: drop-shadow(0 6px 26px rgba(0, 0, 0, .6)) brightness(.62) saturate(.8); }
@keyframes pop { 30% { transform: translateY(-12px); } }
@keyframes enter { from { opacity: 0; transform: translateX(26px); } }

/* 調べられる場所 */
#hs, #hsuv { position: absolute; inset: 0; transition: opacity .3s; }
#hsuv { pointer-events: none; }
.hs { position: absolute; cursor: pointer; pointer-events: auto; }
/* 調べられる場所の印。夕焼けの背景でも沈まないよう、水色の枠に濃い地と黒いふちを付ける */
.hs::before { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px; transform: rotate(45deg);
  border: 3px solid var(--cyan); background: rgba(5, 8, 22, .72); box-shadow: 0 0 0 3px rgba(5, 8, 22, .85), 0 0 18px 4px rgba(55, 230, 210, .9), inset 0 0 10px rgba(55, 230, 210, .55); animation: hsPulse 1.6s ease-in-out infinite; }
.hs::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; transform: rotate(45deg); background: #fff; box-shadow: 0 0 10px #fff; }
.hs.seen::before { width: 26px; height: 26px; margin: -13px; border-width: 2px; border-color: rgba(200, 208, 240, .85); background: rgba(5, 8, 22, .55); box-shadow: 0 0 0 2px rgba(5, 8, 22, .7); animation: none; }
.hs.seen::after { width: 8px; height: 8px; margin: -4px; background: rgba(200, 208, 240, .85); box-shadow: none; }
.hs:hover::before { transform: rotate(45deg) scale(1.35); border-color: #fff; }
.hs span { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%) skewX(-10deg); white-space: nowrap; background: var(--ink); border-bottom: 3px solid var(--cyan);
  padding: 3px 12px; font-size: 17px; font-weight: 700; letter-spacing: .06em; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 3; }
.hs:hover span { opacity: 1; }
.hs.seen span { border-color: var(--dim); }
@keyframes hsPulse { 50% { box-shadow: 0 0 0 3px rgba(5, 8, 22, .85), 0 0 30px 8px rgba(55, 230, 210, 1), inset 0 0 10px rgba(55, 230, 210, .55); transform: rotate(45deg) scale(1.16); } }

/* ブラックライト */
#uv { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle 250px at var(--mx, 50%) var(--my, 50%), rgba(150, 90, 255, .12) 0, rgba(60, 20, 150, .5) 60%, rgba(12, 4, 44, .93) 100%); mix-blend-mode: multiply; }
#stage.uvon #uv { opacity: 1; }
#stage.uvon #hs { opacity: 0; pointer-events: none; }
#stage.uvon .bg { filter: saturate(.5) hue-rotate(20deg); }
.hs.uvh::before { width: 90%; height: 90%; left: 5%; top: 5%; margin: 0; transform: none; border: 0; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(120, 255, 150, .95) 0, rgba(80, 255, 130, .5) 35%, transparent 70%); box-shadow: none; filter: blur(5px); animation: uvGlow 1.4s ease-in-out infinite; }
.hs.uvh::after { display: none; }
.hs.uvh span { border-color: var(--glow); }
@keyframes uvGlow { 50% { opacity: .55; transform: scale(1.08); } }

/* ---------------------------------------------------------------- 上の帯 */
#hud { position: absolute; left: 0; top: 0; right: 0; height: 84px; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 10; }
#hud.off { opacity: 0; transform: translateY(-20px); }
#hud > * { pointer-events: auto; }
#locPlate { position: absolute; left: -18px; top: 16px; padding: 8px 36px 9px 40px; transform: skewX(-14deg); background: linear-gradient(90deg, var(--ink) 70%, rgba(7, 10, 23, .82));
  border-right: 6px solid var(--dusk); box-shadow: 6px 6px 0 rgba(255, 122, 60, .25); }
#locPlate > * { display: block; transform: skewX(14deg); }
#locSub { font-size: 14px; letter-spacing: .28em; color: var(--dusk); font-weight: 700; }
#locName { font-size: 27px; font-weight: 900; letter-spacing: .08em; line-height: 1.15; }
#objective { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: 520px;
  background: rgba(7, 10, 23, .78); border: 1px solid var(--line); border-left: 0; padding: 7px 20px 7px 0; font-size: 17px; font-weight: 700; backdrop-filter: blur(4px); }
#objective i { font-style: normal; background: var(--dusk); color: var(--ink); padding: 7px 12px; margin: -7px 0; font-weight: 900; font-size: 15px; letter-spacing: .2em; }
#objective.flash { animation: objFlash .9s ease; }
@keyframes objFlash { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 60, .9); } 100% { box-shadow: 0 0 0 26px rgba(255, 122, 60, 0); } }
#hudBtns { position: absolute; right: 14px; top: 12px; display: flex; gap: 8px; }
.hb { position: relative; width: 62px; height: 58px; background: rgba(7, 10, 23, .82); border: 1px solid var(--line); transform: skewX(-10deg); transition: .15s; backdrop-filter: blur(4px); }
.hb > * { display: block; transform: skewX(10deg); }
.hb i { font-style: normal; font-size: 22px; font-weight: 900; line-height: 1.1; }
.hb span { font-size: 13px; letter-spacing: .12em; color: var(--dim); font-weight: 700; }
.hb:hover { background: var(--dusk); border-color: var(--dusk); color: var(--ink); transform: skewX(-10deg) translateY(-3px); }
.hb:hover span { color: var(--ink); }
.hb em { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--rose); font-style: normal; font-size: 14px; font-weight: 900; line-height: 20px; display: none; }
.hb em.on { display: block; animation: blink 1.1s infinite; }
.uvb { display: none; border-color: var(--uv); }
.uvb.have { display: block; }
.uvb i { color: #c7a8ff; font-family: var(--impact); font-size: 19px; }
.uvb.on { background: var(--uv); box-shadow: 0 0 22px var(--uv); }
.uvb.on i, .uvb.on span { color: #fff; }
@keyframes blink { 50% { opacity: .35; } }

#life { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); display: none; gap: 8px; z-index: 11; align-items: center; }
#life.on { display: flex; }
#life b { font-size: 14px; letter-spacing: .3em; color: var(--dim); margin-right: 6px; }
#life i { width: 30px; height: 12px; transform: skewX(-24deg); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transition: .3s; }
#life i.lost { background: #2a3055; box-shadow: none; }
#life.hit { animation: shake .4s; }

/* ---------------------------------------------------------------- 行動 */
#actions { position: absolute; right: 26px; bottom: 26px; display: flex; gap: 14px; align-items: flex-end; z-index: 11; transition: opacity .25s, transform .25s; }
#actions.off { opacity: 0; transform: translateY(30px); pointer-events: none; }
.act { position: relative; min-width: 168px; padding: 14px 30px 12px; transform: skewX(-12deg); background: linear-gradient(180deg, #1b2452, #0c1130); border: 2px solid var(--line); border-bottom: 5px solid var(--dusk);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .45); transition: .14s; text-align: left; }
.act > * { display: block; transform: skewX(12deg); }
.act b { font-size: 27px; font-weight: 900; letter-spacing: .1em; }
.act span { font-size: 13px; letter-spacing: .34em; color: var(--dusk); font-weight: 700; }
.act:hover { background: var(--dusk); border-color: #ffc09b; color: var(--ink); transform: skewX(-12deg) translate(-3px, -5px); box-shadow: 10px 11px 0 rgba(0, 0, 0, .45); }
.act:hover span { color: var(--ink); }
.act:disabled { opacity: .32; pointer-events: none; }
.act.gather { display: none; background: linear-gradient(180deg, #ff4d7f, #b3123f); border-color: #ff9bb6; border-bottom-color: #fff; animation: gather 1.4s ease-in-out infinite; }
.act.gather.on { display: block; }
.act.gather span { color: #fff; }
@keyframes gather { 50% { box-shadow: 6px 6px 0 rgba(0, 0, 0, .45), 0 0 34px rgba(255, 61, 119, .9); } }
#idleTip { position: absolute; left: 26px; bottom: 30px; font-size: 16px; color: var(--dim); letter-spacing: .08em; z-index: 11; text-shadow: 0 2px 6px #000; transition: opacity .3s; }
#idleTip.off { opacity: 0; }
#idleTip b { color: var(--cyan); }

/* ---------------------------------------------------------------- 会話 */
#dlg { position: absolute; left: 0; right: 0; bottom: 0; height: 214px; z-index: 12; opacity: 0; transform: translateY(30px); pointer-events: none; transition: opacity .2s, transform .2s;
  background: linear-gradient(180deg, transparent 0, rgba(7, 10, 23, .9) 22%, rgba(7, 10, 23, .97) 100%); }
#dlg.on { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
#dlg::before { content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 3px; background: linear-gradient(90deg, var(--c, var(--dusk)) 0, var(--c, var(--dusk)) 36%, transparent 78%); }
#dlg::after { content: ""; position: absolute; right: 0; top: 49px; bottom: 0; width: 320px; pointer-events: none; opacity: .22;
  background-image: radial-gradient(circle, var(--c, var(--dusk)) 1.6px, transparent 2px); background-size: 12px 12px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
#namePlate { position: absolute; left: 150px; top: 12px; min-width: 210px; padding: 6px 30px 7px; transform: skewX(-14deg); background: var(--c, var(--dusk)); color: var(--ink); box-shadow: 5px 5px 0 rgba(0, 0, 0, .5); transition: background .2s; }
#namePlate span { display: block; transform: skewX(14deg); font-size: 24px; font-weight: 900; letter-spacing: .12em; text-align: center; }
#namePlate.none { display: none; }
#dlgText { position: absolute; left: 172px; right: 172px; top: 68px; font-size: 32px; line-height: 1.42; font-weight: 700; letter-spacing: .04em; text-shadow: 0 2px 4px rgba(0, 0, 0, .8); }
#dlgText.narr { font-family: var(--serif); font-weight: 700; color: #d9def5; text-align: center; top: 76px; }
#dlgText.mono { color: #b9c6ff; }
#dlgText .c { opacity: 0; }
#dlgText .c.on { opacity: 1; }
#dlgText .kw { color: var(--gold); text-shadow: 0 0 12px rgba(255, 215, 106, .65), 0 2px 4px rgba(0, 0, 0, .8); }
#dlgText .kw.on { animation: kwIn .5s ease; }
@keyframes kwIn { 0% { transform: scale(1.7); filter: brightness(3); } }
#dlgText .kw { display: inline-block; }
.pick { display: inline; border-bottom: 3px dotted var(--cyan); color: #c9fff8; cursor: pointer; padding: 0 2px; transition: .15s; }
.pick.live { animation: pickGlow 1.2s ease-in-out infinite; }
.pick.live:hover { background: var(--cyan); color: var(--ink); text-shadow: none; }
.pick.done { border-bottom-style: solid; border-color: var(--dim); color: var(--dim); animation: none; }
@keyframes pickGlow { 50% { text-shadow: 0 0 14px var(--cyan); } }
#pickTip { position: absolute; left: 50%; top: -34px; transform: translateX(-50%) skewX(-12deg); background: var(--cyan); color: var(--ink); font-weight: 900; font-size: 19px; letter-spacing: .2em; padding: 5px 26px; display: none; box-shadow: 5px 5px 0 rgba(0, 0, 0, .5); }
#pickTip.on { display: block; animation: tipIn .3s ease, blinkSoft 1.4s 0.3s infinite; }
@keyframes tipIn { from { opacity: 0; transform: translateX(-50%) skewX(-12deg) translateY(10px); } }
@keyframes blinkSoft { 50% { opacity: .7; } }
#dlgNext { position: absolute; right: 150px; bottom: 22px; color: var(--c, var(--dusk)); font-size: 20px; opacity: 0; }
#dlgNext.on { opacity: 1; animation: nextBob .7s ease-in-out infinite; }
@keyframes nextBob { 50% { transform: translateY(6px); } }
#dlgTools { position: absolute; right: 28px; top: -6px; display: flex; flex-direction: row; gap: 34px; }
#dlgTools button { font-size: 17px; letter-spacing: .14em; font-weight: 700; color: var(--dim); border: 1px solid var(--line); padding: 10px 0; width: 112px; text-align: center; background: rgba(13, 19, 48, .92); }
#dlgTools button:hover, #dlgTools button.on { color: var(--ink); background: var(--gold); border-color: var(--gold); }

/* 話題の一覧 */
#menu { position: absolute; right: 40px; top: 110px; width: 400px; z-index: 13; display: none; flex-direction: column; gap: 9px; }
#menu.on { display: flex; }
/* 話題が多いとき：字と間を詰める（10〜13個）／2列にする（14個から）。いちばん下の「つきつける」「話を終える」が画面の外へ出ないように */
#menu.wide { top: auto; bottom: 24px; left: 44px; right: 44px; width: auto; display: none; grid-template-columns: 1fr 1fr 1fr; gap: 9px 16px; }
#menu.wide.on { display: grid; }
#menu.wide .m-h { grid-column: 1 / -1; }
#menu.wide .mi { padding: 15px 16px 15px 22px; font-size: 19px; letter-spacing: .02em; }
#menu.wide .mi.new { padding-right: 62px; }
#menu.wide .mi > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#menu.wide .mi.back { font-size: 19px; }
#menu.wide.tight { gap: 7px 14px; }
#menu.wide.tight .mi { padding: 11px 16px 11px 22px; }
#menu.nofx .mi { transition: none !important; }
#menu .m-h { font-size: 15px; letter-spacing: .3em; color: var(--dim); font-weight: 700; padding-left: 8px; margin-bottom: 2px; text-shadow: 0 2px 4px #000; }
#menu .m-h b { color: var(--c, var(--dusk)); font-size: 22px; letter-spacing: .1em; margin-right: 10px; }
.mi { position: relative; text-align: left; padding: 11px 22px 11px 26px; font-size: 22px; font-weight: 700; letter-spacing: .05em; background: rgba(9, 13, 34, .93); border-left: 5px solid var(--line); transform: skewX(-10deg);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .4); transition: .12s; animation: miIn .25s ease both; }
.mi > span { display: block; transform: skewX(10deg); }
.mi:hover { background: var(--text); color: var(--ink); border-left-color: var(--dusk); transform: skewX(-10deg) translateX(-10px); }
.mi.new { border-left-color: var(--gold); }
.mi.new::after { content: "NEW"; position: absolute; right: 12px; top: 50%; margin-top: -10px; font-size: 13px; font-weight: 900; letter-spacing: .1em; background: var(--gold); color: var(--ink); padding: 2px 7px; }
.mi.read { color: var(--dim); }
.mi.sp { border-left-color: var(--rose); background: rgba(60, 10, 34, .93); }
.mi.back { border-left-color: var(--dim); color: var(--dim); font-size: 19px; }
@keyframes miIn { from { opacity: 0; transform: skewX(-10deg) translateX(40px); } }

#choices { position: absolute; inset: 0; z-index: 14; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(4, 6, 18, .55); padding-bottom: 120px; }
#choices.on { display: flex; }
#choices .q { font-family: var(--serif); font-size: 30px; font-weight: 800; letter-spacing: .08em; margin-bottom: 14px; text-shadow: 0 0 20px rgba(255, 122, 60, .7); padding: 0 40px; text-align: center; }
.ch { min-width: 560px; max-width: 900px; padding: 16px 40px; font-size: 26px; font-weight: 700; letter-spacing: .06em; background: rgba(9, 13, 34, .95); border: 2px solid var(--line); transform: skewX(-12deg); transition: .12s; box-shadow: 6px 6px 0 rgba(0, 0, 0, .45); animation: chIn .3s ease both; }
.ch > span { display: block; transform: skewX(12deg); }
.ch:hover { background: var(--dusk); color: var(--ink); border-color: #ffc09b; transform: skewX(-12deg) scale(1.04); }
@keyframes chIn { from { opacity: 0; transform: skewX(-12deg) translateY(16px); } }

/* ---------------------------------------------------------------- 重ねる画面の共通 */
.ov { position: absolute; inset: 0; z-index: 20; display: none; background: rgba(4, 6, 18, .88); backdrop-filter: blur(6px); }
.ov.on { display: block; animation: ovIn .22s ease; }
@keyframes ovIn { from { opacity: 0; } }
.ov-h { position: absolute; left: -10px; top: 26px; padding: 8px 60px 10px 50px; transform: skewX(-14deg); background: var(--dusk); color: var(--ink); }
.ov-h > * { display: inline-block; transform: skewX(14deg); }
.ov-h b { font-size: 30px; font-weight: 900; letter-spacing: .14em; }
.ov-h span { font-size: 15px; letter-spacing: .34em; margin-left: 16px; font-weight: 700; }
.ov-x { position: absolute; right: 26px; top: 26px; width: 120px; height: 46px; transform: skewX(-12deg); border: 2px solid var(--line); background: rgba(9, 13, 34, .9); font-weight: 900; font-size: 18px; letter-spacing: .14em; z-index: 3; }
.ov-x:hover { background: var(--text); color: var(--ink); }
.ov-q { position: absolute; left: 50%; top: 22px; transform: translateX(-50%) skewX(-12deg); background: var(--rose); padding: 10px 44px; font-size: 23px; font-weight: 900; letter-spacing: .06em; box-shadow: 6px 6px 0 rgba(0, 0, 0, .5); z-index: 3; white-space: nowrap; animation: blinkSoft 1.6s infinite; }
.ov-q > span { display: block; transform: skewX(12deg); }
.ov-q .kw { color: var(--gold); }

/* ---------------------------------------------------------------- 地図 */
#mapBody { position: absolute; left: 160px; top: 110px; width: 960px; height: 560px; }
#mapBody svg { position: absolute; inset: 0; }
.mblock { position: absolute; border: 1px solid rgba(90, 105, 190, .55); background: repeating-linear-gradient(135deg, rgba(40, 52, 120, .22) 0 12px, rgba(40, 52, 120, .10) 12px 24px); }
.mblock span { position: absolute; left: 10px; top: -13px; background: var(--ink); padding: 0 12px; font-size: 16px; letter-spacing: .36em; font-weight: 900; color: var(--dusk); }
.mnode { position: absolute; width: 132px; height: 58px; margin: -29px 0 0 -66px; transform: skewX(-10deg); background: #121a40; border: 2px solid var(--line); transition: .14s; text-align: center; }
.mnode > * { transform: skewX(10deg); display: block; }
.mnode b { font-size: 18px; font-weight: 900; letter-spacing: .04em; margin-top: 8px; white-space: nowrap; }
.mnode small { font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.mnode:hover { background: var(--dusk); border-color: #ffc09b; color: var(--ink); transform: skewX(-10deg) scale(1.1); z-index: 5; }
.mnode:hover small { color: var(--ink); }
.mnode.here { background: var(--text); color: var(--ink); border-color: #fff; box-shadow: 0 0 26px rgba(255, 255, 255, .5); }
.mnode.here small { color: #445; }
.mnode .dot { position: absolute; right: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: blink 1.1s infinite; transform: none; }
.mnode .faces { position: absolute; left: 50%; bottom: -24px; display: flex; gap: 3px; transform: translateX(-50%) skewX(10deg); }
.face { display: inline-block; border-radius: 50%; background-color: #232c5c; background-repeat: no-repeat; border: 2px solid var(--c, var(--line)); flex: none; }
#mapLegend { position: absolute; left: 160px; bottom: 16px; font-size: 15px; color: var(--dim); letter-spacing: .08em; }
#mapLegend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); margin: 0 6px 0 18px; vertical-align: -1px; }

/* ---------------------------------------------------------------- 捜査メモ */
#noteWrap { position: absolute; left: 70px; right: 70px; top: 96px; bottom: 30px; display: flex; }
#noteTabs { width: 170px; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.ntab { position: relative; text-align: left; padding: 13px 18px; font-size: 21px; font-weight: 900; letter-spacing: .12em; background: rgba(18, 26, 64, .9); border-left: 5px solid var(--line); color: var(--dim); transition: .12s; }
.ntab small { display: block; font-size: 13px; letter-spacing: .3em; font-weight: 700; opacity: .7; }
.ntab:hover { color: var(--text); border-left-color: var(--dusk); }
.ntab.on { background: var(--text); color: var(--ink); border-left-color: var(--dusk); transform: translateX(10px); }
.ntab em { position: absolute; right: 10px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--rose); display: none; }
.ntab em.on { display: block; animation: blink 1.1s infinite; }
#notePage { flex: 1; margin-left: 22px; background: linear-gradient(160deg, rgba(20, 28, 70, .92), rgba(9, 13, 34, .96)); border: 1px solid var(--line); position: relative; overflow: hidden; }
#notePage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(rgba(90, 105, 190, .12) 1px, transparent 1px); background-size: 100% 34px; }
.npad { position: absolute; inset: 0; padding: 22px 26px; overflow-y: auto; }
.npad::-webkit-scrollbar { width: 8px; } .npad::-webkit-scrollbar-thumb { background: var(--line); }
.empty { color: var(--dim); font-size: 19px; padding: 40px; text-align: center; }

/* 証拠品 */
.ev-wrap { display: flex; height: 100%; gap: 22px; }
.ev-grid { width: 464px; overflow-x: hidden; display: grid; grid-template-columns: repeat(4, 104px); gap: 10px; align-content: start; overflow-y: auto; padding: 4px 6px 4px 4px; }
.ev-grid::-webkit-scrollbar { width: 6px; } .ev-grid::-webkit-scrollbar-thumb { background: var(--line); }
.evc { position: relative; width: 104px; height: 124px; background: #0b1030; border: 2px solid var(--line); transition: .12s; overflow: hidden; }
.evc img { width: 100%; height: 86px; object-fit: cover; display: block; filter: saturate(.9); }
.evc b { display: block; font-size: 13px; font-weight: 700; padding: 3px 3px 0; line-height: 1.25; letter-spacing: 0; height: 34px; overflow: hidden; }
.evc:hover { border-color: var(--dusk); transform: translateY(-3px); }
.evc.on { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 215, 106, .6); }
.evc.tool::before { content: "道具"; position: absolute; left: 0; top: 0; background: var(--cyan); color: var(--ink); font-size: 13px; font-weight: 900; padding: 1px 6px; z-index: 2; }
.evc .nw { position: absolute; right: 0; top: 0; background: var(--rose); font-size: 13px; font-weight: 900; padding: 1px 6px; z-index: 2; }
.ev-sec { grid-column: 1 / -1; font-size: 14px; letter-spacing: .3em; color: var(--dusk); font-weight: 900; margin-top: 4px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.ev-detail { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ev-detail .pic { width: 250px; height: 250px; align-self: center; border: 3px solid var(--text); box-shadow: 10px 10px 0 rgba(255, 122, 60, .35); transform: rotate(-2deg); background-size: cover; background-position: center; flex: none; }
.ev-detail h3 { font-size: 27px; font-weight: 900; letter-spacing: .08em; margin: 22px 0 8px; border-left: 6px solid var(--dusk); padding-left: 14px; }
.ev-detail p { font-size: 19px; line-height: 1.75; font-weight: 500; color: #dfe3fa; }
.ev-btns { display: flex; gap: 12px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.nbtn { padding: 10px 24px; font-size: 19px; font-weight: 900; letter-spacing: .1em; background: #1b2452; border: 2px solid var(--line); border-bottom: 4px solid var(--dusk); transform: skewX(-10deg); transition: .12s; }
.nbtn > span { display: block; transform: skewX(10deg); }
.nbtn:hover { background: var(--dusk); color: var(--ink); }
.nbtn.hot { background: var(--rose); border-color: #ff9bb6; border-bottom-color: #fff; animation: gather 1.4s infinite; }
.nbtn.use { background: #0f5a55; border-color: var(--cyan); border-bottom-color: var(--cyan); animation: useGlow 1.2s infinite; }
@keyframes useGlow { 50% { box-shadow: 0 0 22px var(--cyan); } }
.kw { color: var(--gold); font-weight: 700; }

/* 証言 */
.tes { display: flex; gap: 16px; align-items: flex-start; padding: 13px 16px; margin-bottom: 10px; background: rgba(9, 13, 34, .8); border-left: 5px solid var(--c, var(--cyan)); transition: .12s; position: relative; }
.tes.sel:hover { background: rgba(55, 230, 210, .14); cursor: pointer; transform: translateX(6px); }
.tes h4 { font-size: 21px; font-weight: 900; letter-spacing: .06em; }
.tes h4 small { font-size: 15px; color: var(--c, var(--cyan)); margin-left: 12px; letter-spacing: .1em; }
.tes p { font-size: 18px; line-height: 1.65; color: #dfe3fa; margin-top: 3px; font-weight: 500; }
.tes .nw { position: absolute; right: 8px; top: 8px; background: var(--rose); font-size: 13px; font-weight: 900; padding: 1px 6px; }

/* 人物 */
.pf-wrap { display: flex; height: 100%; gap: 20px; }
.pf-list { width: 190px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.pf-i { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(9, 13, 34, .8); border-left: 4px solid var(--c); font-size: 18px; font-weight: 700; text-align: left; transition: .12s; }
.pf-i:hover, .pf-i.on { background: var(--text); color: var(--ink); }
.pf-main { flex: 1; position: relative; overflow: hidden; }
.pf-pic { position: absolute; right: -30px; bottom: -240px; height: 760px; filter: drop-shadow(0 0 30px rgba(0, 0, 0, .7)); pointer-events: none; }
.pf-pic.gone { filter: grayscale(1) brightness(.75) drop-shadow(0 0 30px rgba(0, 0, 0, .7)); -webkit-mask-image: linear-gradient(transparent 0, #000 10%); mask-image: linear-gradient(transparent 0, #000 10%); }
.pf-txt { position: relative; width: 470px; z-index: 2; }
.pf-txt .role { display: inline-block; background: var(--c); color: var(--ink); font-size: 15px; font-weight: 900; letter-spacing: .14em; padding: 3px 14px; transform: skewX(-12deg); }
.pf-txt h3 { font-family: var(--serif); font-size: 46px; font-weight: 800; letter-spacing: .1em; line-height: 1.2; margin-top: 8px; }
.pf-txt .kana { font-size: 15px; letter-spacing: .5em; color: var(--dim); margin-bottom: 12px; }
.pf-txt li { list-style: none; font-size: 18px; line-height: 1.7; font-weight: 500; padding: 8px 12px; margin-bottom: 7px; background: rgba(7, 10, 23, .82); border-left: 3px solid var(--c); }
.pf-txt li.nw { animation: liNew 1s ease; }
@keyframes liNew { from { background: rgba(255, 215, 106, .5); } }

/* 相関図 */
#relSvg { position: absolute; left: 50%; top: 50%; width: 900px; height: 500px; margin: -250px 0 0 -450px; }
#relSvg .edge { stroke: #5a69be; stroke-width: 2.5; fill: none; }
#relSvg .edge.hot { stroke: var(--rose); stroke-width: 3.5; }
#relSvg .elabel { font-family: var(--ui); font-size: 16px; font-weight: 900; fill: var(--text); paint-order: stroke; stroke: var(--ink); stroke-width: 6px; text-anchor: middle; letter-spacing: .04em; }
#relSvg .elabel.hot { fill: #ffb3c8; }
.rnode { position: absolute; transform: translate(-50%, -50%); text-align: center; z-index: 2; }
.rnode b { display: block; margin-top: 2px; font-size: 16px; font-weight: 900; background: var(--ink); padding: 1px 10px; border-bottom: 3px solid var(--c); white-space: nowrap; }
.rnode.victim .face { filter: grayscale(.9); box-shadow: 0 0 24px rgba(201, 167, 255, .7); }
.rnode.me .face { background: #1c2552; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: var(--c); }
#relWrap { position: absolute; left: 50%; top: 50%; width: 900px; height: 500px; margin: -250px 0 0 -450px; }

/* 時系列 */
.tl { width: 100%; border-collapse: separate; border-spacing: 5px; }
.tl th { font-size: 17px; font-weight: 900; letter-spacing: .12em; padding: 8px; background: var(--dusk); color: var(--ink); }
.tl th:first-child { background: transparent; }
.tl td { vertical-align: top; background: rgba(7, 10, 23, .8); padding: 5px 8px; font-size: 14px; line-height: 1.4; font-weight: 700; width: 22.5%; height: 50px; }
.tl td.who { width: 10%; text-align: center; background: transparent; border-left: 4px solid var(--c); font-size: 17px; }
.tl td span { display: block; padding: 2px 7px; margin-bottom: 3px; border-left: 3px solid var(--dim); background: rgba(40, 52, 120, .35); }
.tl td span.ok { border-color: var(--cyan); color: #bafff7; }
.tl td span.q { border-color: var(--gold); color: #ffe9a8; }
.tl td span.bad { border-color: var(--rose); color: #ffb3c8; background: rgba(120, 20, 60, .35); }
.tl-note { font-size: 15px; color: var(--dim); margin-top: 8px; }
.tl-note i { display: inline-block; width: 10px; height: 10px; margin: 0 5px 0 16px; }

/* 推理 */
.lg-wrap { display: flex; height: 100%; gap: 20px; }
.lg-left { width: 400px; overflow-y: auto; padding-right: 6px; }
.lg-left::-webkit-scrollbar { width: 6px; } .lg-left::-webkit-scrollbar-thumb { background: var(--line); }
.lg-h { font-size: 15px; letter-spacing: .3em; color: var(--dusk); font-weight: 900; margin-bottom: 8px; }
.mys { padding: 10px 14px; margin-bottom: 8px; background: rgba(7, 10, 23, .82); border-left: 5px solid var(--gold); font-size: 17.5px; font-weight: 700; line-height: 1.5; }
.mys small { display: block; font-size: 14.5px; color: var(--dim); font-weight: 500; margin-top: 4px; }
.mys.solved { border-left-color: var(--cyan); }
.mys.solved q { quotes: none; display: block; color: #bafff7; font-size: 16px; margin-top: 5px; font-weight: 700; }
.mys.solved q::before { content: "▶ "; }
.mys.solved > span { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(154, 162, 200, .5); }
.lg-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lg-slots { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0 10px; }
.slot { width: 200px; height: 92px; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; font-size: 17px; font-weight: 900; padding: 8px; color: var(--dim); background: rgba(7, 10, 23, .6); transition: .15s; cursor: pointer; line-height: 1.35; }
.slot.fill { border-style: solid; border-color: var(--gold); color: var(--text); background: rgba(255, 215, 106, .12); }
.slot small { display: block; font-size: 13px; letter-spacing: .2em; color: var(--dusk); margin-bottom: 3px; }
.lg-x { font-family: var(--impact); font-size: 26px; color: var(--dusk); }
.lg-go { padding: 14px 20px; }
.lg-go:disabled { opacity: .35; pointer-events: none; }
.lg-wrap.shake .lg-slots { animation: shake .4s; }
.lg-msg { text-align: center; height: 22px; font-size: 16px; color: #ffb3c8; font-weight: 700; }
.chips { flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; padding: 4px 4px 4px 0; }
.chips::-webkit-scrollbar { width: 6px; } .chips::-webkit-scrollbar-thumb { background: var(--line); }
.chip { padding: 6px 12px; font-size: 16px; font-weight: 700; background: #121a40; border: 1px solid var(--line); border-left: 4px solid var(--dusk); transition: .1s; }
.chip.t { border-left-color: var(--cyan); } .chip.d { border-left-color: var(--rose); }
.chip:hover { background: var(--text); color: var(--ink); }
.chip.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.chips-h { width: 100%; font-size: 13px; letter-spacing: .3em; color: var(--dim); font-weight: 900; margin-top: 4px; }

/* ---------------------------------------------------------------- 書類 */
#docOv { display: none; place-items: center; cursor: pointer; z-index: 25; }
#docOv.on { display: grid; }
#docOv .doc-tip { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: var(--dim); font-size: 16px; letter-spacing: .2em; }
#docOv .bigimg { width: 470px; height: 470px; background-size: cover; border: 4px solid #fff; box-shadow: 0 0 70px rgba(93, 255, 143, .6); animation: docIn .4s ease; }
.paper { width: 440px; min-height: 380px; padding: 34px 40px; background: #f4efe2; color: #2b2622; font-family: var(--serif); box-shadow: 0 20px 60px rgba(0, 0, 0, .7); transform: rotate(-1.5deg); animation: docIn .35s ease; font-size: 19px; line-height: 1.9; font-weight: 700; }
@keyframes docIn { from { opacity: 0; transform: translateY(30px) rotate(3deg); } }
.paper .p-h { font-size: 23px; font-weight: 800; border-bottom: 2px solid #2b2622; padding-bottom: 6px; margin-bottom: 14px; letter-spacing: .1em; }
.paper .p-sign { text-align: right; font-size: 15px; margin-top: 16px; }
.paper .big { font-size: 40px; text-align: center; color: #b3202a; letter-spacing: .06em; line-height: 1.5; font-family: var(--ui); font-weight: 900; }
.paper.memo { background: #fff3a6; width: 360px; min-height: 300px; }
.paper.memo b { color: #b3202a; }
.paper table { width: 100%; border-collapse: collapse; font-size: 17px; font-family: var(--ui); }
.paper td, .paper th { border-bottom: 1px solid #b9b0a0; padding: 5px 6px; text-align: left; }
.paper th { font-size: 13px; color: #6d655a; }
.paper.log td b, .paper .fix { color: #b3202a; }
.paper .fix { background: #fff; padding: 0 5px; box-shadow: inset 0 0 0 1px #ddd; font-style: italic; }
.paper.ledger td:last-child, .paper.receipt p { font-variant-numeric: tabular-nums; }
.paper.ledger td:last-child { text-align: right; }
.paper tr.sum td { border-top: 3px double #2b2622; font-weight: 900; font-size: 20px; }
.paper.receipt p { font-family: var(--ui); white-space: pre-line; font-size: 17px; }
.paper.receipt .sum { border-top: 3px double #2b2622; margin-top: 8px; font-size: 21px; font-weight: 900; }
.paper.receipt .hand { margin-top: 14px; color: #2a3f9c; font-family: var(--serif); transform: rotate(-3deg); font-size: 20px; }
.paper.credit { transform: none; width: 520px; min-height: 0; font-size: 18px; line-height: 1.7; }
.paper.credit p { margin-bottom: 12px; }
.paper.credit small { font-family: var(--ui); font-size: 14px; color: #6d655a; letter-spacing: .02em; }
.paper.rub { background: #dcd6c8; }
.paper.rub .rub-t { font-size: 28px; line-height: 1.7; color: #fbf8f0; padding: 18px; letter-spacing: .08em;
  background: repeating-linear-gradient(62deg, #4a4a4c 0 3px, #5d5d60 3px 5px, #3f3f41 5px 9px); text-shadow: 0 0 1px #fff; }
.paper .p-sub { font-size: 13px; color: #6d655a; margin-top: 10px; font-family: var(--ui); }
.timer-doc { width: 680px; padding: 26px 30px; background: #06120c; border: 3px solid #1f5a3c; box-shadow: 0 0 60px rgba(93, 255, 143, .25), inset 0 0 40px rgba(0, 0, 0, .8); font-family: "Consolas", "MS Gothic", monospace; color: #6dffa0; animation: docIn .35s ease; text-shadow: 0 0 8px rgba(93, 255, 143, .7); }
.timer-doc .td-h { font-size: 17px; letter-spacing: .14em; margin-bottom: 12px; border-bottom: 1px solid #1f5a3c; padding-bottom: 8px; }
.timer-doc table { width: 100%; border-collapse: collapse; font-size: 18px; }
.timer-doc th { text-align: left; font-size: 13px; opacity: .6; padding: 4px 8px; font-weight: 400; }
.timer-doc td { padding: 8px; }
.timer-doc tr.hot td { background: rgba(255, 215, 106, .14); color: var(--gold); text-shadow: 0 0 8px rgba(255, 215, 106, .7); animation: blinkSoft 1.2s infinite; }
.phone-doc { width: 330px; height: 560px; border-radius: 38px; border: 8px solid #1c1c22; background: linear-gradient(170deg, #4b3a8f, #1a1438 70%); padding: 46px 18px 20px; box-shadow: 0 20px 70px rgba(0, 0, 0, .8); animation: docIn .35s ease; text-align: center; font-family: var(--ui); }
.phone-doc .ph-time { font-size: 62px; font-weight: 500; letter-spacing: .02em; line-height: 1; }
.phone-doc .ph-date { font-size: 14px; margin: 4px 0 26px; opacity: .8; }
.phone-doc .ph-n { position: relative; text-align: left; background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 9px 14px; margin-bottom: 9px; backdrop-filter: blur(6px); }
.phone-doc .ph-n b { font-size: 14px; } .phone-doc .ph-n span { position: absolute; right: 14px; top: 9px; font-size: 12px; opacity: .75; }
.phone-doc .ph-n p { font-size: 15px; margin-top: 2px; font-weight: 500; }
.phone-doc .ph-n:nth-of-type(5) { box-shadow: 0 0 0 2px var(--gold); }
.phone-doc .ph-note { font-size: 13px; color: var(--gold); margin-top: 14px; letter-spacing: .2em; }

/* ---------------------------------------------------------------- ピアノ */
#pianoBox { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 820px; text-align: center; }
#pianoBox h3 { font-family: var(--serif); font-size: 28px; letter-spacing: .14em; margin-bottom: 6px; }
#pianoBox p { color: var(--dim); font-size: 18px; margin-bottom: 22px; height: 24px; }
#pianoBox p.dead { color: var(--rose); font-weight: 900; font-size: 22px; animation: shake .4s; }
#keys { position: relative; width: 784px; height: 300px; margin: 0 auto; background: #111; padding: 10px 12px 12px; border-top: 16px solid #1a1a1f; box-shadow: 0 30px 70px rgba(0, 0, 0, .8); }
.wk { position: absolute; top: 0; width: 92px; height: 268px; background: linear-gradient(#f7f4ec, #e3ded0); border: 1px solid #555; border-radius: 0 0 7px 7px; cursor: pointer; transition: .05s; }
.wk:active, .wk.down { background: linear-gradient(#d8d2c2, #c9c2b0); transform: translateY(4px); }
.wk span { position: absolute; bottom: 12px; left: 0; right: 0; color: #8b8577; font-weight: 900; font-size: 17px; }
.bk { position: absolute; top: 0; width: 56px; height: 168px; background: linear-gradient(#333, #0a0a0c); border-radius: 0 0 5px 5px; z-index: 2; cursor: pointer; box-shadow: 0 5px 6px rgba(0, 0, 0, .6); }
.bk:active { transform: translateY(3px); }
.wk.deadkey.down { background: linear-gradient(#f0cfcf, #dba9a9); }
#keysIn { position: relative; width: 760px; height: 268px; }

/* ---------------------------------------------------------------- 犯人の指名 */
#accGrid { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); display: flex; gap: 16px; }
.acc { width: 190px; height: 400px; position: relative; overflow: hidden; background: #0b1030; border: 3px solid var(--line); transform: skewX(-8deg); transition: .16s; animation: chIn .4s ease both; }
.acc img { position: absolute; left: 50%; top: 0; height: 620px; transform: translateX(-50%) skewX(8deg); filter: saturate(.7) brightness(.8); transition: .16s; }
.acc b { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 0; background: var(--ink); font-size: 21px; font-weight: 900; letter-spacing: .1em; border-top: 4px solid var(--c); }
.acc b > span { display: block; transform: skewX(8deg); }
.acc:hover { transform: skewX(-8deg) translateY(-14px) scale(1.05); border-color: var(--rose); box-shadow: 0 0 40px rgba(255, 61, 119, .7); z-index: 2; }
.acc:hover img { filter: none; }

/* ---------------------------------------------------------------- 記録・設定 */
#logBody { position: absolute; left: 180px; right: 180px; top: 100px; bottom: 30px; overflow-y: auto; padding-right: 16px; }
#logBody::-webkit-scrollbar { width: 8px; } #logBody::-webkit-scrollbar-thumb { background: var(--line); }
.lg { display: flex; gap: 18px; padding: 8px 0; border-bottom: 1px solid rgba(43, 54, 112, .5); font-size: 19px; line-height: 1.65; }
.lg b { width: 120px; flex: none; text-align: right; color: var(--c, var(--dim)); font-weight: 900; }
.lg.n { color: var(--dim); font-family: var(--serif); }
#setBody { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 520px; display: flex; flex-direction: column; gap: 14px; }
#setBody .row { display: flex; align-items: center; justify-content: space-between; font-size: 21px; font-weight: 700; background: rgba(9, 13, 34, .9); padding: 14px 22px; border-left: 5px solid var(--dusk); }
#setBody .seg { display: flex; gap: 6px; }
#setBody .seg button { padding: 6px 16px; border: 1px solid var(--line); font-weight: 700; font-size: 17px; }
#setBody .seg button.on { background: var(--dusk); color: var(--ink); border-color: var(--dusk); }
#setBody .note { font-size: 15px; color: var(--dim); line-height: 1.7; }

/* ---------------------------------------------------------------- 演出 */
#fx { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#fx.block { pointer-events: auto; cursor: pointer; }
#flash { position: absolute; inset: 0; z-index: 31; pointer-events: none; background: #fff; opacity: 0; }
#flash.go { animation: flash .5s ease-out; }
#flash.black { background: #000; }
#flash.fadeout { opacity: 1; transition: opacity .45s; }
#flash.fadein { opacity: 0; transition: opacity .6s; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
#app.shake #stage, #app.shake #dlg { animation: shake .45s; }
@keyframes shake { 0%, 100% { transform: translate(0); } 15% { transform: translate(-12px, 5px); } 30% { transform: translate(10px, -6px); } 45% { transform: translate(-8px, 3px); } 60% { transform: translate(6px, -2px); } 80% { transform: translate(-3px, 1px); } }
#toast { position: absolute; left: 50%; top: 96px; transform: translateX(-50%) skewX(-12deg); z-index: 32; background: var(--ink); border: 2px solid var(--gold); padding: 8px 30px; font-size: 19px; font-weight: 900; letter-spacing: .08em; opacity: 0; pointer-events: none; transition: opacity .25s; white-space: nowrap; }
#toast.on { opacity: 1; }

/* 入手 */
.get { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(13, 19, 48, .82) 0, rgba(4, 6, 18, .96) 75%); display: grid; place-items: center; overflow: hidden; animation: ovIn .2s; }
.get .rays { position: absolute; left: 50%; top: 50%; width: 1800px; height: 1800px; margin: -900px; background: repeating-conic-gradient(from 0deg, rgba(255, 215, 106, .13) 0 6deg, transparent 6deg 15deg); animation: spin 26s linear infinite; mask-image: radial-gradient(circle, #000 12%, transparent 62%); -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 62%); }
.get.tool .rays { background: repeating-conic-gradient(from 0deg, rgba(55, 230, 210, .14) 0 6deg, transparent 6deg 15deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.get .band { position: absolute; left: -5%; right: -5%; top: 50%; height: 310px; margin-top: -155px; background: linear-gradient(90deg, rgba(255, 122, 60, .0), rgba(255, 122, 60, .2) 30%, rgba(255, 61, 119, .2) 70%, rgba(255, 61, 119, 0)); transform: skewY(-4deg); border-top: 2px solid rgba(255, 215, 106, .6); border-bottom: 2px solid rgba(255, 215, 106, .6); animation: bandIn .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bandIn { from { transform: skewY(-4deg) scaleY(0); } }
.get .card { position: relative; display: flex; align-items: center; gap: 40px; width: 900px; }
.get .pic { width: 290px; height: 290px; flex: none; background-size: cover; background-position: center; border: 4px solid #fff; box-shadow: 14px 14px 0 var(--dusk), 0 0 60px rgba(255, 215, 106, .5); transform: rotate(-4deg); animation: picIn .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.get.tool .pic { box-shadow: 14px 14px 0 var(--cyan), 0 0 60px rgba(55, 230, 210, .5); }
@keyframes picIn { from { transform: rotate(18deg) scale(2.2); opacity: 0; } }
.get .txt { animation: txtIn .45s .15s ease both; }
@keyframes txtIn { from { opacity: 0; transform: translateX(50px); } }
.get .lab { display: inline-block; font-family: var(--impact); font-size: 24px; letter-spacing: .2em; padding: 3px 26px 5px; background: var(--gold); color: var(--ink); transform: skewX(-14deg); }
.get.tool .lab { background: var(--cyan); }
.get.up .lab { background: var(--rose); color: #fff; }
.get h2 { font-family: var(--serif); font-size: 46px; font-weight: 800; letter-spacing: .08em; margin: 14px 0 10px; text-shadow: 0 0 26px rgba(255, 215, 106, .6); line-height: 1.25; }
.get p { font-size: 20px; line-height: 1.75; color: #e6e9fb; font-weight: 500; }
.get .tap { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 15px; letter-spacing: .4em; color: var(--dim); animation: blinkSoft 1.4s infinite; }

/* 証言 */
.tesfx { position: absolute; inset: 0; background: rgba(4, 6, 18, .72); animation: ovIn .2s; overflow: hidden; }
.tesfx .slash { position: absolute; left: -10%; right: -10%; top: 50%; height: 250px; margin-top: -125px; transform: skewY(3deg); background: linear-gradient(90deg, #0a4f58, #0c8f88 40%, #0a4f58); border-top: 4px solid var(--cyan); border-bottom: 4px solid var(--cyan); animation: slashIn .3s cubic-bezier(.2, 1.3, .4, 1); box-shadow: 0 0 80px rgba(55, 230, 210, .5); }
.tesfx .slash::after { content: ""; position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(circle, #fff 1.4px, transparent 2px); background-size: 11px 11px; }
@keyframes slashIn { from { transform: skewY(3deg) translateX(-110%); } }
.tesfx .in { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 30px; padding: 0 150px; animation: txtIn .4s .12s ease both; }
.tesfx .lab { font-family: var(--impact); font-size: 20px; letter-spacing: .26em; color: var(--ink); background: var(--cyan); padding: 2px 20px 4px; display: inline-block; transform: skewX(-14deg); }
.tesfx h2 { font-size: 34px; font-weight: 900; letter-spacing: .08em; margin: 8px 0 4px; }
.tesfx h2 small { font-size: 19px; margin-left: 14px; color: #bafff7; }
.tesfx p { font-size: 21px; line-height: 1.65; font-weight: 700; }

/* 閃き */
.dedfx { position: absolute; inset: 0; background: #04060f; overflow: hidden; animation: ovIn .15s; }
.dedfx .crack { position: absolute; left: 50%; top: 50%; width: 2000px; height: 3px; margin-left: -1000px; background: linear-gradient(90deg, transparent, #fff 40%, #fff 60%, transparent); transform: rotate(var(--r)) scaleX(0); animation: crack .5s var(--d) cubic-bezier(.2, 1, .3, 1) forwards; box-shadow: 0 0 20px #fff, 0 0 50px var(--rose); }
@keyframes crack { to { transform: rotate(var(--r)) scaleX(1); } }
.dedfx .word { position: absolute; left: 0; right: 0; top: 76px; text-align: center; font-family: var(--impact); font-size: 112px; letter-spacing: .5em; text-indent: .5em; color: #fff; text-shadow: 0 0 30px var(--rose), 6px 6px 0 var(--rose); animation: wordIn .5s .35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes wordIn { from { opacity: 0; transform: scale(3); } }
.dedfx .box { position: absolute; left: 50%; top: 290px; width: 860px; margin-left: -430px; background: rgba(7, 10, 23, .92); border: 2px solid var(--rose); padding: 26px 40px 30px; transform: skewX(-6deg); animation: txtIn .4s .8s ease both; box-shadow: 12px 12px 0 rgba(255, 61, 119, .35); }
.dedfx .box > * { transform: skewX(6deg); }
.dedfx .lnk { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 18px; font-weight: 900; color: var(--gold); margin-bottom: 14px; }
.dedfx .lnk span { border: 1px solid var(--gold); padding: 4px 14px; }
.dedfx .lnk i { font-style: normal; font-family: var(--impact); color: var(--rose); font-size: 22px; }
.dedfx h2 { font-family: var(--serif); font-size: 38px; font-weight: 800; text-align: center; letter-spacing: .06em; line-height: 1.35; }
.dedfx p { font-size: 20px; line-height: 1.75; margin-top: 12px; color: #e6e9fb; font-weight: 500; }
.dedfx .tap, .tesfx .tap { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 15px; letter-spacing: .4em; color: var(--dim); animation: blinkSoft 1.4s infinite; }

/* 章の題 */
.chap { position: absolute; inset: 0; background: #03040b; display: grid; place-items: center; animation: ovIn .5s; }
.chap .in { text-align: center; }
.chap .no { font-size: 22px; letter-spacing: .8em; text-indent: .8em; color: var(--dusk); font-weight: 900; animation: txtIn .7s .3s ease both; }
.chap h2 { font-family: var(--serif); font-size: 78px; font-weight: 800; letter-spacing: .26em; text-indent: .26em; margin-top: 12px; animation: chapIn 1.2s .5s ease both; }
.chap .ln { width: 0; height: 2px; margin: 22px auto 0; background: linear-gradient(90deg, transparent, var(--dusk), transparent); animation: lnIn 1.2s .8s ease forwards; }
@keyframes chapIn { from { opacity: 0; letter-spacing: .6em; filter: blur(8px); } }
@keyframes lnIn { to { width: 620px; } }
.chap.out { animation: ovOut .5s forwards; }
@keyframes ovOut { to { opacity: 0; } }

/* カットイン */
.cut { position: absolute; inset: 0; overflow: hidden; background: rgba(4, 6, 18, .5); }
.cut .bar { position: absolute; left: -10%; right: -10%; top: 50%; height: 240px; margin-top: -120px; transform: skewY(-6deg); background: linear-gradient(90deg, var(--rose), var(--dusk)); animation: cutIn .22s cubic-bezier(.2, 1.3, .4, 1), cutOut .25s 1.05s forwards; box-shadow: 0 0 0 8px var(--ink), 0 0 0 12px #fff; overflow: hidden; }
.cut .bar::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, .22) 34px 37px, transparent 37px 90px); animation: speed .25s linear infinite; }
@keyframes speed { to { transform: translateX(-90px); } }
.cut b { position: absolute; left: 0; right: 0; top: 50%; text-align: center; transform: translateY(-50%) skewY(-6deg); font-family: var(--impact); font-size: 92px; letter-spacing: .08em; color: #fff; text-shadow: 6px 6px 0 var(--ink); animation: cutTxt .3s .1s cubic-bezier(.2, 1.6, .4, 1) both, cutOut .25s 1.05s forwards; white-space: nowrap; }
@keyframes cutIn { from { transform: skewY(-6deg) scaleY(0); } }
@keyframes cutTxt { from { opacity: 0; transform: translateY(-50%) skewY(-6deg) translateX(300px) scale(1.4); } }
@keyframes cutOut { to { opacity: 0; transform: skewY(-6deg) scaleY(.2); } }

/* ---------------------------------------------------------------- タイトル */
#title { position: absolute; inset: 0; z-index: 40; background: #05060f; display: none; overflow: hidden; overflow: clip; }
#title.on { display: block; }
#titleBg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: brightness(.7) saturate(1.15); animation: tbg 40s ease-in-out infinite alternate; }
@keyframes tbg { to { transform: scale(1.1) translate(-18px, -10px); } }
#titleRain { position: absolute; inset: -20%; pointer-events: none; opacity: .5; background-image: repeating-linear-gradient(104deg, transparent 0 9px, rgba(190, 210, 255, .12) 9px 10px, transparent 10px 23px); background-size: 220px 220px; animation: rain .45s linear infinite; }
#title::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 6, 15, .95) 0, rgba(5, 6, 15, .7) 38%, transparent 70%), linear-gradient(0deg, rgba(5, 6, 15, .8), transparent 40%); }
#titleBox { position: absolute; left: 86px; top: 70px; z-index: 2; }
.t-sub { font-size: 16px; letter-spacing: .6em; color: var(--dusk); font-weight: 900; }
#titleBox h1 { font-family: var(--serif); font-weight: 800; font-size: 118px; letter-spacing: .1em; line-height: 1.16; margin-top: 10px; text-shadow: 0 0 46px rgba(255, 122, 60, .55); }
#titleBox h1 span { display: block; }
#titleBox h1 span:last-child { padding-left: 260px; margin-top: -20px; }
#titleBox h1 i { position: absolute; left: 400px; top: 108px; font-style: normal; font-size: 50px; color: var(--dusk); }
.t-line { width: 520px; height: 3px; margin: 18px 0 14px; background: linear-gradient(90deg, var(--dusk), var(--rose) 60%, transparent); }
.t-copy { font-family: var(--serif); font-size: 23px; line-height: 1.9; letter-spacing: .14em; color: #d9def5; }
#titleBtns { display: flex; flex-direction: column; gap: 12px; margin-top: 110px; width: 320px; }
#titleBtns button { text-align: left; padding: 12px 30px; font-size: 24px; font-weight: 900; letter-spacing: .2em; background: rgba(9, 13, 34, .82); border-left: 6px solid var(--dusk); transform: skewX(-12deg); transition: .14s; }
#titleBtns button:hover { background: var(--dusk); color: var(--ink); transform: skewX(-12deg) translateX(14px); }
#titleBtns button:disabled { opacity: .3; pointer-events: none; }
#titleBtns #tQuit { font-size: 17px; padding: 8px 30px; border-left-color: var(--rose); width: 220px; }
/* 音のボタンと版の表示は、画面の右下（#app が基準になる） */
#titleBtns #tSound { position: fixed; right: 24px; bottom: 40px; width: 190px; font-size: 17px; padding: 8px 26px; border-left-color: var(--dim); }
#titleBtns.four #tQuit { padding-top: 5px; padding-bottom: 5px; }
/* ブラウザでは、ページのほうから窓を閉じられないことがある。そのときに出す画面 */
#quitOv { position: absolute; inset: 0; z-index: 90; background: #03040b; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
#quitOv.on { display: flex; }
#quitOv p { font-family: var(--serif); font-size: 28px; line-height: 2; letter-spacing: .14em; text-align: center; color: #d9def5; }
#quitOv button { padding: 10px 34px; font-size: 18px; font-weight: 900; letter-spacing: .2em; background: rgba(9, 13, 34, .82); border-left: 6px solid var(--dim); color: var(--dim); }
.t-ver { position: fixed; right: 16px; bottom: 10px; text-align: right; white-space: nowrap; font-size: 14px; color: var(--dim); letter-spacing: .2em; }

/* ---------------------------------------------------------------- 結末 */
#ending { z-index: 41; background: #03040b; }
#endBox { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 760px; text-align: center; }
#endBox .e-sub { letter-spacing: .7em; color: var(--dusk); font-weight: 900; font-size: 17px; }
#endBox h2 { font-family: var(--serif); font-size: 76px; letter-spacing: .24em; margin: 10px 0 6px; }
#endBox .rank { font-family: var(--impact); font-size: 40px; color: var(--gold); letter-spacing: .14em; margin: 22px 0 6px; text-shadow: 0 0 30px rgba(255, 215, 106, .6); }
#endBox .rank small { display: block; font-family: var(--ui); font-size: 15px; letter-spacing: .5em; color: var(--dim); }
#endBox table { margin: 16px auto; font-size: 20px; border-collapse: collapse; }
#endBox td { padding: 6px 26px; border-bottom: 1px solid var(--line); text-align: left; } #endBox td:last-child { text-align: right; font-weight: 900; }
#endBox p { color: var(--dim); font-size: 17px; line-height: 1.9; margin-top: 12px; }
#endBox button { margin-top: 26px; }

/* ---------- 時計（左上、場所の札の下） */
#clock { position: absolute; left: 0; top: 88px; display: flex; align-items: baseline; gap: 12px; padding: 5px 22px 6px 22px; background: rgba(7, 10, 23, .8);
  border-left: 5px solid var(--cyan); clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); backdrop-filter: blur(4px); }
#clock b { font-family: var(--impact); font-size: 22px; letter-spacing: .08em; color: #fff; }
#clock span { font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--dim); }
#clock.hurry { border-left-color: var(--rose); }
#clock.hurry b { color: var(--rose); animation: blink 1.1s infinite; }
#clock.hurry span { color: #ffb3c4; }
/* ---------- 結末の画面：真相以外・結末の一覧 */
#endBox.bad .e-sub { color: var(--rose); }
#endBox.bad h2 { color: #d9dcf0; text-shadow: 0 0 40px rgba(255, 80, 120, .35); }
#endBox .e-note { font-family: var(--serif); font-size: 23px; color: var(--text); margin-top: 22px; }
#endBox .e-tip { font-size: 17px; color: var(--dim); margin-top: 16px; }
#endBox .e-tip b { display: inline-block; margin-right: 12px; padding: 2px 10px; background: var(--dusk); color: var(--ink); font-size: 14px; letter-spacing: .2em; }
#endBox .ends { margin-top: 24px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
#endBox .ends small { font-size: 14px; letter-spacing: .2em; color: var(--dim); margin-right: 8px; }
#endBox .ends span { padding: 5px 14px; font-size: 16px; font-weight: 700; border: 1px solid var(--line); color: #4a5180; transform: skewX(-10deg); }
#endBox .ends span.got { color: var(--text); border-color: var(--dusk); }
#endBox .ends span.now { background: var(--dusk); color: var(--ink); }
#endBox .e-btns { display: flex; gap: 18px; justify-content: center; }

/* ---------- 主人公の名前を付ける画面 */
#nameOv { z-index: 42; background: rgba(3, 4, 11, .94); }
#nameBody { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 640px; display: flex; flex-direction: column; gap: 18px; }
#nameBody .lead { font-family: var(--serif); font-size: 21px; line-height: 1.8; color: var(--text); }
#nameBody .nrow { display: flex; gap: 18px; }
#nameBody label { flex: 1; display: flex; align-items: center; gap: 14px; background: rgba(9, 13, 34, .9); padding: 12px 18px; border-left: 5px solid var(--dusk); font-size: 18px; font-weight: 900; letter-spacing: .2em; color: var(--dusk); white-space: nowrap; }
#nameBody label small { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--dim); }
#nameBody input { flex: 1; min-width: 0; width: 100%; background: #0b1030; border: 0; border-bottom: 2px solid var(--line); color: #fff; font-family: var(--serif); font-size: 26px; font-weight: 700;
  letter-spacing: .12em; padding: 4px 8px; outline: none; user-select: text; -webkit-user-select: text; }
#nameBody input:focus { border-bottom-color: var(--gold); background: #111a48; }
#nameBody label.wide input { flex: 0 0 240px; }
#nameBody .nprev { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; border: 1px dashed var(--line); font-size: 17px; color: var(--dim); min-height: 62px; }
#nameBody .nbtns { display: flex; gap: 18px; justify-content: center; margin-top: 4px; }

/* ---------- 「記録しました」の印 */
#saved { position: absolute; right: 22px; top: 116px; z-index: 45; padding: 5px 16px 5px 34px; font-size: 16px; font-weight: 900; letter-spacing: .1em; color: var(--ink); background: var(--cyan);
  transform: skewX(-12deg) translateX(20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; box-shadow: 4px 4px 0 rgba(0, 0, 0, .45); white-space: nowrap; }
#saved::before { content: ""; position: absolute; left: 13px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--ink); }
#saved.on { opacity: 1; transform: skewX(-12deg); }
#saved.ng { background: var(--rose); color: #fff; }
#saved.ng::before { background: #fff; }

/* ---------- 推理への誘導 */
.hb.think { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 215, 106, .85); animation: thinkPulse 1.4s ease-in-out infinite; }
.hb.think::after { content: "推理できる"; position: absolute; left: 50%; top: 100%; margin-top: 5px; transform: translateX(-50%); white-space: nowrap; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 900; letter-spacing: .06em; padding: 1px 8px; }
@keyframes thinkPulse { 50% { box-shadow: 0 0 28px rgba(255, 215, 106, 1); } }
.mys.ready { border-left-color: var(--gold); background: rgba(60, 46, 8, .7); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 215, 106, .55); }
.mys.ready em { display: block; font-style: normal; font-size: 14px; font-weight: 900; color: var(--gold); margin-top: 5px; letter-spacing: .04em; }
.mys.ready.focus { background: rgba(255, 215, 106, .2); box-shadow: inset 0 0 0 2px var(--gold); }
.lg-msg i { font-style: normal; color: var(--gold); }
.chip.cand { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 215, 106, .55); }
.chip.mate { border-color: var(--gold); background: #4a3a08; color: #fff3c4; box-shadow: 0 0 16px rgba(255, 215, 106, .95); animation: thinkPulse 1.1s ease-in-out infinite; }

/* ---------- 再現（校内図の上で、時刻ごとの居場所を見る） */
.rc { display: grid; grid-template-columns: 590px 1fr; grid-template-rows: auto auto auto; gap: 8px 14px; height: 100%; }
.rc-map { grid-column: 1; grid-row: 1; height: 338px; position: relative; border: 1px solid var(--line); background: rgba(5, 8, 22, .55); }
.rc-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rc-blk { fill: rgba(40, 52, 120, .2); stroke: rgba(90, 105, 190, .6); stroke-width: 1.5; }
.rc-bn { fill: var(--dusk); font-size: 13px; font-weight: 900; letter-spacing: .3em; }
.rc-ln { stroke: #5a69be; stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.rc-spot rect { fill: #121a40; stroke: var(--line); stroke-width: 1.5; transition: .3s; }
.rc-spot text { fill: var(--dim); font-size: 15px; font-weight: 900; text-anchor: middle; letter-spacing: .02em; transition: .3s; }
.rc-spot.in rect { fill: #1d2a66; stroke: #8fa0ff; }
.rc-spot.in text { fill: #fff; }
.rc-tray { fill: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.rc-ring { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.rc-ring.on { animation: rcRing 1.3s ease-out infinite; }
@keyframes rcRing { 0% { opacity: .95; transform: scale(.5); } 100% { opacity: 0; transform: scale(2.6); } }
.rcd { cursor: pointer; transition: transform .5s cubic-bezier(.3, .8, .3, 1); }
.rcd circle { fill: var(--c); stroke: #fff; stroke-width: 2; }
.rcd text { fill: var(--ink); font-size: 15.5px; font-weight: 900; text-anchor: middle; pointer-events: none; }
.rcd .bang { display: none; fill: #fff; font-size: 18px; paint-order: stroke; stroke: var(--rose); stroke-width: 6px; stroke-linejoin: round; }
.rcd.clash .bang { display: block; animation: blink 1s infinite; }
.rcd.k-say circle, .rcd.k-q circle { fill: rgba(5, 8, 22, .9); stroke: var(--c); stroke-width: 3; stroke-dasharray: 5 4; }
.rcd.k-say text, .rcd.k-q text { fill: var(--c); }
.rcd.k-q circle { stroke: var(--gold); }
.rcd.k-lie circle, .rcd.k-none circle { fill: #141a3a; stroke: #7780aa; stroke-width: 2; stroke-dasharray: 3 4; }
.rcd.k-lie text, .rcd.k-none text { fill: #a9b0d0; }
.rcd.k-lie circle { stroke: var(--rose); }
.rcd.k-none { opacity: .5; }
.rcd.k-dead circle { fill: #2b2f45; stroke: var(--rose); stroke-width: 3; }
.rcd.k-dead text { fill: #b9bdd6; }
.rcd.k-true circle { stroke: var(--rose); stroke-width: 4; }
.rcd.sel circle { filter: drop-shadow(0 0 8px var(--gold)); stroke: var(--gold); }
.rc-side { display: flex; flex-direction: column; min-width: 0; grid-column: 2; grid-row: 1; }
.rc-clock { display: flex; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--dusk); padding-bottom: 2px; }
.rc-clock b { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: .04em; color: #fff; text-shadow: 0 0 16px rgba(255, 122, 60, .6); }
.rc-clock span { font-size: 14px; letter-spacing: .14em; color: var(--dim); }
.rc-evt { min-height: 42px; padding: 4px 0 2px; }
.rc-evt p { font-size: 15px; line-height: 1.35; color: var(--dim); }
.rc-evt p b { margin-right: 6px; color: inherit; }
.rc-evt p.hot { color: var(--gold); font-weight: 700; }
.rc-evt p.tr { color: #ff9db9; font-weight: 700; }
.rc-list { display: flex; flex-direction: column; gap: 2px; }
.rc-row { display: grid; grid-template-columns: 22px 82px 1fr auto; align-items: center; gap: 5px; text-align: left; padding: 2px 4px; height: 27px; background: rgba(18, 26, 64, .7); border-left: 3px solid transparent; font-size: 15px; }
.rc-row i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: var(--ink); font-style: normal; font-weight: 900; font-size: 13px; line-height: 20px; text-align: center; }
.rc-row b { font-weight: 900; white-space: nowrap; overflow: hidden; }
.rc-row span { color: #d9def5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row em { font-style: normal; font-size: 13px; font-weight: 900; padding: 0 5px; white-space: nowrap; }
.rc-row.k-ok em { color: var(--cyan); } .rc-row.k-say em, .rc-row.k-q em { color: var(--gold); }
.rc-row.k-lie em, .rc-row.k-true em, .rc-row.k-dead em { color: var(--rose); } .rc-row.k-none { opacity: .55; }
.rc-row.clash em { background: var(--rose); color: #fff; animation: blink 1s infinite; }
.rc-row.sel { border-left-color: var(--gold); background: rgba(255, 215, 106, .16); }
.rc-det { grid-column: 1 / 3; margin-top: 5px; font-size: 15px; line-height: 1.4; min-height: 40px; }
.rc-det b { color: var(--gold); margin-right: 8px; } .rc-det u { display: block; text-decoration: none; color: #ff9db9; font-weight: 700; }
.rc-det .kw { color: var(--gold); }
.rc .dim { color: var(--dim); }
.rc-ctl { grid-column: 1 / 3; display: flex; align-items: stretch; gap: 8px; margin-top: 16px; }
.rc-b { padding: 0 12px; height: 40px; font-size: 15px; font-weight: 900; background: #121a40; border: 2px solid var(--line); white-space: nowrap; }
.rc-b.play { background: var(--dusk); border-color: #ffc09b; color: var(--ink); min-width: 104px; }
.rc-ticks { flex: 1; display: flex; gap: 2px; }
.rc-t { position: relative; flex: 1; height: 40px; background: #121a40; border-bottom: 4px solid var(--line); }
.rc-t.big { border-left: 2px solid #5a69be; }
.rc-t i { position: absolute; left: 2px; top: -17px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.rc-t.past { background: #26315f; }
.rc-t.on { background: var(--gold); border-bottom-color: #fff; box-shadow: 0 0 12px rgba(255, 215, 106, .8); }
.rc-keys { grid-column: 1 / 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-keys > span { font-size: 13px; letter-spacing: .14em; color: var(--dim); margin-right: 4px; }
.rc-k { padding: 3px 9px; font-size: 14px; font-weight: 900; background: rgba(18, 26, 64, .9); border: 1px solid var(--line); color: #fff; }
.rc-k i { font-style: normal; font-weight: 700; font-size: 13px; color: var(--dim); margin-left: 6px; }
.rc-k.clash { border-color: var(--rose); } .rc-k.clash i { color: #ff9db9; }
.rc.mini .rc-keys { display: none; }
.rc-cap { display: none; }
.rc.auto .rc-cap { display: block; grid-column: 1 / 3; padding-top: 8px; min-height: 120px; }
.rc-cap p { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1.5; color: #f1f3ff; }
.rc-cap p b { display: inline-block; min-width: 118px; font-family: inherit; }
.rc.auto .rc-ctl, .rc.auto .rc-keys { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
#reconOv { z-index: 43; background: rgba(3, 4, 11, .95); }
#rcBody { position: absolute; left: 150px; right: 150px; top: 100px; bottom: 72px; background: linear-gradient(160deg, rgba(20, 28, 70, .92), rgba(9, 13, 34, .96)); border: 1px solid var(--line); }
#rcBody .npad { overflow: hidden; padding: 12px 22px; }
#rcGo { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%) skewX(-10deg); }
#titleBtns #tEcho { font-size: 20px; letter-spacing: .12em; border-left-color: var(--gold); color: #fff3c4; }
#titleBtns #tEcho[hidden] { display: none; }
#titleBtns.four { gap: 8px; margin-top: 110px; }
#titleBtns.four button { padding-top: 6px; padding-bottom: 6px; }
#titleBtns.four ~ .t-ver { margin-top: 8px; }
#titleBtns.four #tNew, #titleBtns.four #tCont { font-size: 22px; }
#titleBtns.four #tSound { padding-top: 8px; padding-bottom: 8px; }
#reconOv .ov-q { top: 30px; }
/* 画面を暗くする（背景だけ） */
#stage.dark #bgA, #stage.dark #bgB { filter: brightness(0); transition: filter .5s; }

/* ---------- 複数人の立ち絵（3人まで。話している人が明るく前に出る） */
#cast { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; }
#cast.on { opacity: 1; }
#cast img { position: absolute; transition: left .4s cubic-bezier(.3, .8, .3, 1), filter .25s, transform .25s; transform-origin: 50% 30%;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .6)) brightness(.5) saturate(.75); }
#cast img.spk { filter: drop-shadow(0 8px 28px rgba(0, 0, 0, .7)); transform: translateY(-12px) scale(1.04); }
#cast img.in { animation: enter .3s ease; }
#cast img.pop { animation: castPop .26s ease; }
@keyframes castPop { 40% { margin-top: -10px; } }
