/* シェルのスタイル。既定値は元のプロトタイプ集のもので、バウハウス調のテーマは index.html の <style> が上書きする。 */
:root {
  --bg: #0b0d14;
  --text: #f3f1ea;
  --muted: rgba(243, 241, 234, .6);
  --accent: #ffcc33;
  --accent2: #ff6a3d;
  --panel: rgba(14, 16, 26, .82);
  --panel2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .14);
  --good: #7dff9a;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --font-title: var(--font);
  --radius: 14px;
  --blur: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: var(--font); -webkit-user-select: none; user-select: none; touch-action: none; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; background: var(--bg); }
#cv { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; display: block; }
button { font-family: inherit; }

/* ---- HUD ---- */
.hud-top { position: absolute; left: 0; top: 0; right: 0; height: 76px; display: flex; align-items: center; gap: 18px; padding: 0 18px; z-index: 20;
  background: linear-gradient(180deg, var(--panel), transparent); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-title { font-family: var(--font-title); font-size: 30px; font-weight: 900; letter-spacing: .04em; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); white-space: nowrap; }
.hud-curs { display: flex; gap: 12px; flex: 1; justify-content: center; }
.hud-cur { --cur: var(--accent); display: flex; align-items: baseline; gap: 8px; padding: 8px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(var(--blur)); min-width: 200px; }
.hud-cur .ic { font-size: 24px; align-self: center; display: flex; }
.hud-cur .nm { font-size: 15px; color: var(--muted); }
.hud-cur b { font-size: 30px; color: var(--cur); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px color-mix(in srgb, var(--cur) 50%, transparent); }
.hud-cur small { font-size: 15px; color: var(--muted); }
.hud-clock { display: flex; align-items: baseline; gap: 12px; padding: 8px 16px; background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
.hud-clock b { font-size: 28px; font-variant-numeric: tabular-nums; }
.hud-clock span { font-size: 17px; font-weight: 700; }
.hud-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 22px; cursor: pointer; backdrop-filter: blur(var(--blur)); display: grid; place-items: center; padding: 0; }
.hud-btn:hover { border-color: var(--accent); }

/* ---- オーバーレイ ---- */
.ov { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; backdrop-filter: blur(4px); }
.ov.show { opacity: 1; }
.ov .card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 40px 54px; min-width: 520px; max-width: 900px; text-align: center; box-shadow: var(--shadow); transform: translateY(16px) scale(.97); transition: transform .3s; }
.ov.show .card { transform: none; }
.ov .ttl { font-family: var(--font-title); font-size: 54px; font-weight: 900; color: var(--accent); margin-bottom: 18px; }
.btn { display: inline-block; font-weight: 900; font-size: 20px; padding: 12px 28px; border-radius: 999px; border: none; background: var(--accent); color: #111; cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 50%, #000); }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.big { font-size: 26px; padding: 14px 44px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.row { display: flex; gap: 16px; justify-content: center; margin-top: 22px; }

/* ---- トースト ---- */
.toasts { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 24px; border-radius: 999px; background: var(--panel); border: 1px solid var(--accent); font-weight: 800; font-size: 20px; box-shadow: var(--shadow); animation: tIn .3s; transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes tIn { from { opacity: 0; transform: translateY(10px); } }

/* ---- 版台（ページつきツリー。ui/tree.js）。色は config.js と同じ: 墨 #161412 / 赤 #e63b2e / 黄 #f2b90f / 青 #1f4fa8 / 金 #b07d00 / 紙 #ece3cf #f4ecda #f6efde ---- */
.ov.ov-tree, .ov.ov-select { display: block; background: repeating-linear-gradient(135deg, rgba(22, 20, 18, .05) 0 2px, transparent 2px 14px), #ece3cf; }
.tree-head { position: absolute; left: 0; right: 0; top: 0; height: 92px; display: flex; align-items: center; gap: 24px; padding: 0 36px; z-index: 2; background: #161412; }
.tree-ttl { font-family: var(--font-title); font-size: 38px; font-weight: 900; color: #f4ecda; white-space: nowrap; }
.tree-sum { flex: 1; font-size: 20px; color: rgba(244, 236, 218, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-sum b { color: #f2b90f; }
.tree-sum .ts-fin { display: block; font-size: 18px; margin-top: 2px; }
.tree-sum .ts-fin b.ok { color: #ffd84a; text-decoration: underline; }
.tree-cur { display: flex; gap: 14px; }
.tree-cur .tc { padding: 8px 18px; background: #f4ecda; color: #161412; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.tree-cur b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tree-head .btn.big { font-size: 24px; padding: 12px 34px; box-shadow: 5px 5px 0 rgba(244, 236, 218, .35); white-space: nowrap; }

/* タブ（8ページ） */
.tree-tabs { position: absolute; left: 40px; top: 108px; width: 1260px; height: 78px; display: flex; gap: 8px; align-items: flex-start; }
.ttab { --col: #161412; position: relative; flex: 1; height: 68px; padding: 0 10px 0 12px; border: 4px solid #161412; background: #f4ecda; color: #161412; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr 1fr; column-gap: 10px; align-items: center; transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), height .16s; }
.ttab b { grid-row: 1 / 3; font: 900 46px/1 var(--font-title); }
.ttab .tt-nm { font-size: 19px; font-weight: 900; align-self: end; white-space: nowrap; line-height: 1.1; }
.ttab .tt-ct { font-size: 15px; font-weight: 700; align-self: start; opacity: .7; font-variant-numeric: tabular-nums; }
.ttab .tt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(22, 20, 18, .12); }
.ttab .tt-bar i { display: block; height: 100%; width: 0; background: var(--col); transition: width .4s cubic-bezier(.2, .9, .3, 1); }
.ttab.open:not(.empty):hover { transform: translateY(-4px); }
.ttab.cur { background: #161412; color: #f4ecda; height: 84px; transform: none !important; }
.ttab.cur .tt-bar { background: rgba(244, 236, 218, .25); } .ttab.cur .tt-bar i { background: #f2b90f; }
.ttab.locked, .ttab.empty { border-style: dashed; border-color: rgba(22, 20, 18, .4); background: transparent; color: rgba(22, 20, 18, .4); cursor: default; }
.ttab.locked .tt-nm svg { font-size: 22px; display: block; }
.ttab.can::after { content: ''; position: absolute; right: -9px; top: -9px; width: 18px; height: 18px; background: #1f4fa8; border: 3px solid #161412; animation: bob 1s ease-in-out infinite; }
.ttab.newmove:not(.cur) { border-color: #b07d00; animation: goldPulse 1.2s ease-in-out infinite; }
.ttab.nope { animation: nope .3s; }
.tree-note { position: absolute; left: 40px; top: 196px; z-index: 6; padding: 10px 18px; background: #161412; color: #f4ecda; font-size: 20px; font-weight: 700; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.tree-note.show { opacity: 1; transform: none; }

/* ノードを置く台 */
.tree-board { --col: #161412; position: absolute; left: 40px; top: 196px; width: 1260px; height: 854px; border: 4px solid #161412; background:
  linear-gradient(rgba(22, 20, 18, .07) 2px, transparent 2px) 0 0 / 49px 49px, linear-gradient(90deg, rgba(22, 20, 18, .07) 2px, transparent 2px) 0 0 / 49px 49px, #f6efde;
  box-shadow: 10px 10px 0 rgba(22, 20, 18, .9); overflow: hidden; }
.tb-deco { position: absolute; left: -150px; bottom: -190px; width: 470px; height: 470px; border-radius: 50%; background: var(--col); opacity: .16; mix-blend-mode: multiply; }
.tb-deco::after { content: ''; position: absolute; left: 1090px; top: -560px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, #f2b90f 0 3.6px, transparent 4.2px) 0 0 / 13px 13px; }
.tb-num { position: absolute; right: 40px; bottom: -40px; font: 900 420px/1 var(--font-title); color: rgba(22, 20, 18, .07); pointer-events: none; }
.tb-name { position: absolute; left: 26px; top: 20px; font: 700 18px/1.2 var(--font-title); letter-spacing: .12em; color: rgba(22, 20, 18, .6); pointer-events: none; }
.tb-name b { display: block; font-size: 46px; font-weight: 900; letter-spacing: 0; color: #161412; margin-top: 4px; }
.tree-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
.tree-lines line { stroke: rgba(22, 20, 18, .3); stroke-width: 4; stroke-dasharray: 6 9; }
.tree-lines line.half { stroke: #161412; stroke-dasharray: none; }
.tree-lines line.on { stroke: #161412; stroke-width: 9; stroke-dasharray: none; }
.tb-nodes, .tb-fx { position: absolute; inset: 0; }
.tb-fx { pointer-events: none; overflow: hidden; z-index: 6; }

.tnode { --col: #161412; position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; padding: 0; border: 4px solid #161412; border-radius: 0; background: #f6efde; color: #161412; cursor: pointer;
  display: grid; place-items: center; box-shadow: 6px 6px 0 rgba(22, 20, 18, .9); transition: transform .14s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s; animation: nodeIn .4s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.tnode.k0 { border-radius: 50%; }
.tnode:hover { transform: scale(1.07); z-index: 3; }
.tnode:active { transform: scale(.95); }
/* 色版: Lv が進むほど濃く刷る（網点 → ハッチング → ベタ）。墨の枠から少しずれている */
.tn-fill { position: absolute; inset: -4px; border-radius: inherit; transform: translate(7px, 6px); mix-blend-mode: multiply; opacity: 0; pointer-events: none; transition: opacity .25s; }
.tnode[data-f="1"] .tn-fill { opacity: 1; background: radial-gradient(circle, var(--col) 0 3.3px, transparent 3.9px) 0 0 / 12px 12px, radial-gradient(circle, var(--col) 0 3.3px, transparent 3.9px) 6px 6px / 12px 12px; }
.tnode[data-f="2"] .tn-fill { opacity: 1; background: repeating-linear-gradient(135deg, var(--col) 0 5px, transparent 5px 10px); }
.tnode[data-f="3"] .tn-fill { opacity: 1; background: var(--col); }
.tn-ic { position: relative; width: 64px; height: 64px; border-radius: 50%; background: #f6efde; display: grid; place-items: center; font-size: 44px; line-height: 1; }
.tn-ic svg { display: block; }
.tn-lv { position: absolute; bottom: -8px; right: -14px; font-size: 15px; font-weight: 900; background: #161412; color: #f4ecda; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.tn-lv:empty { display: none; }
.tn-cost { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); font-size: 19px; font-weight: 900; white-space: nowrap; background: #ece3cf; padding: 0 7px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.tn-cost:empty { display: none; }
.tn-cost svg { display: block; font-size: 18px; margin: 4px 0; }
.tn-nm { position: absolute; top: calc(100% + 42px); left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 700; white-space: nowrap; background: rgba(246, 239, 222, .9); padding: 0 6px; pointer-events: none; }
.tnode.maxed .tn-nm { top: calc(100% + 14px); }
/* 前提がまだ: 点線の下書き */
.tnode.locked { border-style: dashed; border-color: rgba(22, 20, 18, .45); background: rgba(246, 239, 222, .6); box-shadow: none; }
.tnode.locked .tn-ic { opacity: .35; background: none; } .tnode.locked .tn-cost, .tnode.locked .tn-nm { opacity: .55; } .tnode.locked .tn-lv { opacity: .45; }
/* 買える: 青い影と、はねる値札 */
.tnode.afford { box-shadow: 6px 6px 0 #1f4fa8; }
.tnode.afford .tn-cost { background: #1f4fa8; color: #f6efde; animation: bobX 1s ease-in-out infinite; }
/* 刷り上がり: 二重の枠と「済」 */
.tnode.maxed { box-shadow: inset 0 0 0 5px #f6efde, inset 0 0 0 9px #161412, 6px 6px 0 rgba(22, 20, 18, .9); }
.tnode.maxed .tn-lv { background: #e63b2e; }
/* 動きのノード: 金の枠で 1.4 倍。未購入の間は脈打つ */
.tnode.move { width: 146px; height: 146px; margin: -73px 0 0 -73px; border: 7px solid #b07d00; box-shadow: 7px 7px 0 #161412; }
.tnode.move .tn-ic { width: 92px; height: 92px; font-size: 64px; }
.tnode.move:not(.have)::after { content: 'NEU'; position: absolute; left: -22px; top: -20px; padding: 2px 9px; background: #e63b2e; color: #f6efde; font: 900 17px/1.3 var(--font-title); border: 3px solid #161412; transform: rotate(-9deg); animation: bob 1s ease-in-out infinite; }
.tnode.move:not(.have) { animation: nodeIn .4s cubic-bezier(.34, 1.56, .64, 1) backwards, goldPulse 1.2s ease-in-out .4s infinite; }
.tnode.move.maxed { box-shadow: inset 0 0 0 5px #f6efde, inset 0 0 0 9px #161412, 7px 7px 0 #161412; }
/* 選んでいる: 四隅に赤い見当の印 */
.tnode.sel::before { content: ''; position: absolute; inset: -20px; pointer-events: none; animation: selPulse 1s ease-in-out infinite; background:
  linear-gradient(#e63b2e, #e63b2e) left top / 26px 5px no-repeat, linear-gradient(#e63b2e, #e63b2e) left top / 5px 26px no-repeat,
  linear-gradient(#e63b2e, #e63b2e) right top / 26px 5px no-repeat, linear-gradient(#e63b2e, #e63b2e) right top / 5px 26px no-repeat,
  linear-gradient(#e63b2e, #e63b2e) left bottom / 26px 5px no-repeat, linear-gradient(#e63b2e, #e63b2e) left bottom / 5px 26px no-repeat,
  linear-gradient(#e63b2e, #e63b2e) right bottom / 26px 5px no-repeat, linear-gradient(#e63b2e, #e63b2e) right bottom / 5px 26px no-repeat; }
.tnode.sel { z-index: 2; }
/* 刷った瞬間: 押されて弾み、色版が大きくずれた所から落ち着く。墨のローラーが上から下へ通る */
.tnode.stamp { animation: stamp .42s cubic-bezier(.3, 1.4, .5, 1) !important; z-index: 4; }
.tnode.stamp .tn-fill { animation: fillIn .6s cubic-bezier(.2, .9, .3, 1); }
.tn-roll { position: absolute; left: -12px; right: -12px; height: 14px; background: #161412; top: -14px; pointer-events: none; animation: roll .4s cubic-bezier(.5, 0, .3, 1) forwards; box-shadow: 0 5px 0 var(--col); }
.tb-drop { position: absolute; pointer-events: none; }
.tb-ring { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 8px solid; border-radius: 50%; pointer-events: none; animation: ring .65s cubic-bezier(.1, .7, .3, 1) forwards; }
/* 動きを刷ったときの札と実演 */
.tb-banner { position: absolute; left: 0; right: 0; top: 330px; height: 190px; background: #161412; color: #f6efde; padding: 22px 0 0 760px; animation: banner 2.9s cubic-bezier(.2, .9, .3, 1) forwards; box-shadow: 0 14px 0 #b07d00; }
.tb-banner i { display: block; font: 900 22px/1 var(--font-title); letter-spacing: .2em; color: #f2b90f; font-style: normal; }
.tb-banner b { display: block; font: 900 72px/1.15 var(--font-title); }
.tb-banner span { font-size: 20px; font-weight: 700; opacity: .85; }
.tb-hop { position: absolute; left: 0; bottom: 6px; width: 64px; height: 64px; margin-left: -32px; border-radius: 50%; background: #e63b2e; border: 4px solid #f6efde; transform-origin: 50% 100%; box-shadow: 5px 4px 0 #f2b90f; }
.tb-hop u { position: absolute; left: 10px; top: -34px; border: 20px solid transparent; border-bottom: 36px solid #f2b90f; border-top: 0; }

/* 説明欄 */
.tree-side { position: absolute; left: 1340px; top: 108px; width: 540px; height: 942px; padding: 24px 26px; border: 4px solid #161412; background: #f4ecda; box-shadow: 10px 10px 0 #e63b2e; display: flex; flex-direction: column; color: #161412; }
.tree-side.nope { animation: nope .3s; }
.ts-top { display: flex; gap: 22px; }
.ts-cv { width: 236px; height: 265.5px; flex: none; }
.ts-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ts-kind { font-size: 17px; font-weight: 700; letter-spacing: .06em; opacity: .7; }
.ts-kind em { font-style: normal; background: #b07d00; color: #f6efde; padding: 2px 12px; font-weight: 900; opacity: 1; }
.tree-side .ts-kind:has(em) { opacity: 1; }
.ts-name { font-size: 36px; font-weight: 900; line-height: 1.2; }
.ts-pips { --col: #161412; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ts-pips i { width: 20px; height: 20px; border: 3px solid #161412; background: #f6efde; }
.ts-pips i.on { background: var(--col); }
.ts-pips span { width: 100%; font-size: 18px; font-weight: 900; margin-top: 2px; }
.ts-where { font-size: 16px; opacity: .7; line-height: 1.4; }
.ts-notice { display: none; margin-top: 18px; padding: 10px 14px; background: #f2b90f; border: 4px solid #b07d00; font-size: 20px; font-weight: 900; line-height: 1.4; }
.ts-notice.show { display: block; animation: goldPulse 1.2s ease-in-out infinite; }
.ts-desc { flex: 1; margin-top: 20px; padding-top: 18px; border-top: 4px solid #161412; font-size: 23px; line-height: 1.65; font-weight: 500; }
.ts-desc b { font-weight: 900; font-size: 26px; }
.ts-prog { font-size: 17px; font-weight: 700; padding: 10px 0 14px; display: flex; align-items: center; gap: 12px; }
.ts-prog i { flex: 1; height: 14px; border: 3px solid #161412; background: repeating-linear-gradient(135deg, rgba(22, 20, 18, .18) 0 2px, transparent 2px 7px); position: relative; }
.ts-prog i u { position: absolute; left: 0; top: 0; bottom: 0; background: #161412; transition: width .4s cubic-bezier(.2, .9, .3, 1); }
.ts-foot { border-top: 4px solid #161412; padding-top: 16px; }
.ts-cost { height: 64px; display: flex; align-items: center; gap: 10px; font-size: 30px; }
.ts-cost b { font: 900 54px/1 var(--font-title); font-variant-numeric: tabular-nums; }
.ts-cost .after { margin-left: auto; font-size: 18px; font-weight: 700; opacity: .7; }
.ts-cost .short { margin-left: auto; font-size: 20px; font-weight: 700; color: #e63b2e; }
.ts-cost .done { font-size: 30px; font-weight: 900; color: #b07d00; } .ts-cost .lock { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ts-buy { width: 100%; margin-top: 10px; font-size: 40px !important; padding: 20px 10px !important; transition: transform .08s; }
.ts-buy.move { background: #b07d00; font-size: 30px !important; padding: 26px 10px !important; }
.ts-buy.off { background: #d9cfb6; color: rgba(22, 20, 18, .45); box-shadow: none; border-style: dashed; cursor: default; }
.ts-buy.hit { animation: hit .3s cubic-bezier(.3, 1.4, .5, 1); }
.ts-hint { height: 24px; margin-top: 14px; font-size: 17px; font-weight: 700; opacity: .65; text-align: center; }
.tree-side.peek { box-shadow: 10px 10px 0 #1f4fa8; }

@keyframes nodeIn { from { transform: scale(.3); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes bobX { 50% { transform: translateX(-50%) translateY(-5px); } }
@keyframes goldPulse { 50% { box-shadow: 7px 7px 0 #161412, 0 0 0 9px rgba(176, 125, 0, .38); } }
@keyframes selPulse { 50% { inset: -26px; } }
@keyframes stamp { 0% { transform: scale(1); } 22% { transform: scale(.8); } 60% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes fillIn { from { transform: translate(26px, 21px); opacity: .3; } }
@keyframes roll { to { top: calc(100% + 4px); } }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(3.2); opacity: 0; border-width: 1px; } }
@keyframes banner { 0% { transform: translateX(-102%); } 14% { transform: translateX(1.5%); } 20%, 82% { transform: none; } 100% { transform: translateX(102%); } }
@keyframes nope { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes hit { 30% { transform: translate(4px, 4px) scale(.97); box-shadow: 1px 1px 0 #161412; } }

/* ---- 幕選択（ui/panels.js） ---- */
.sel-grid { position: absolute; left: 40px; top: 114px; width: 1840px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 18px; }
.scard { --col: #161412; position: relative; height: 384px; padding: 18px 20px; border: 4px solid #161412; background: #f6efde; color: #161412; box-shadow: 7px 7px 0 rgba(22, 20, 18, .9); overflow: hidden; animation: cardIn .4s cubic-bezier(.34, 1.4, .64, 1) backwards; }
.scard::before { content: ''; position: absolute; right: -70px; top: -70px; width: 230px; height: 230px; border-radius: 50%; background: var(--col); opacity: .14; mix-blend-mode: multiply; }
.scard.cur { box-shadow: 7px 7px 0 #e63b2e; }
.scard.locked { border-style: dashed; border-color: rgba(22, 20, 18, .4); background: transparent; box-shadow: none; color: rgba(22, 20, 18, .4); }
.scard.locked::before { display: none; }
.sc-n { font: 900 120px/.9 var(--font-title); }
.scard.open .sc-n { text-shadow: 6px 5px 0 #f2b90f; }
.sc-clock { position: absolute; right: 20px; top: 20px; font: 900 34px/1 var(--font-title); }
.sc-nm { font-size: 30px; font-weight: 900; margin-top: 8px; white-space: nowrap; }
.sc-secs { display: flex; gap: 10px; margin-top: 14px; height: 54px; align-items: center; }
.sc-soon { font-size: 22px; font-weight: 900; padding: 4px 14px; border: 3px dashed #161412; }
.ssec { width: 54px; height: 54px; padding: 0; border: 4px solid #161412; background: #f6efde; color: #161412; font: 900 30px/1 var(--font-title); cursor: pointer; transition: transform .12s cubic-bezier(.34, 1.56, .64, 1); position: relative; }
.ssec:hover { transform: translateY(-4px); }
.ssec.got { background: #e63b2e; color: #f6efde; }
.ssec.fin { border-radius: 50%; font-size: 24px; }
.ssec.fin.got { background: #b07d00; }
.ssec.off { border-style: dashed; opacity: .4; cursor: default; }
.ssec.off:hover { transform: none; }
.ssec.sel { box-shadow: 0 0 0 4px #f6efde, 0 0 0 9px #1f4fa8; }
.ssec.sel::after { content: ''; position: absolute; left: 50%; top: -24px; margin-left: -10px; border: 10px solid transparent; border-top: 14px solid #f2b90f; border-bottom: 0; animation: bob 1s ease-in-out infinite; filter: drop-shadow(0 0 0 #161412); }
.ssec.nope { animation: nope .3s; }
.sc-fin { margin-top: 14px; font-size: 19px; line-height: 1.5; font-weight: 500; }
.sc-fin b { font-weight: 900; }
.sc-best { font-size: 17px; opacity: .7; margin-top: 4px; }
.sc-plate { position: absolute; right: 16px; bottom: 16px; padding: 4px 12px 4px 8px; border: 3px solid #b07d00; color: #b07d00; font-size: 19px; font-weight: 900; transform: rotate(-6deg); display: flex; align-items: center; gap: 6px; background: #f6efde; }
.sc-plate i { width: 16px; height: 16px; background: var(--col); border: 2px solid #161412; }
.sc-lock { position: absolute; left: 20px; bottom: 20px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sc-lock svg { font-size: 26px; }
.sel-foot { position: absolute; left: 40px; right: 40px; top: 922px; height: 128px; padding: 0 30px; border: 4px solid #161412; background: #f4ecda; box-shadow: 10px 10px 0 #e63b2e; display: flex; align-items: center; gap: 30px; color: #161412; }
.sf-info { flex: 1; min-width: 0; }
.sf-ttl { font-size: 32px; font-weight: 700; } .sf-ttl b { font-weight: 900; }
.sf-sub { font-size: 21px; margin-top: 6px; } .sf-sub b { font-weight: 900; font-size: 24px; } .sf-sub em { font-style: normal; font-weight: 900; color: #b07d00; }
.sel-run { font-size: 34px !important; padding: 18px 60px !important; }
@keyframes cardIn { from { transform: translateY(26px) scale(.96); opacity: 0; } }

/* ---- 設定（枠） ---- */
.opt-rows { display: flex; flex-direction: column; gap: 16px; margin: 8px 0 18px; }
.opt-rows .btn { font-size: 24px; padding: 14px 24px; display: flex; gap: 12px; align-items: center; justify-content: center; }
.opt-note { font-size: 17px; opacity: .65; margin: 0; }
.opt-rows .btn small { font-size: 16px; opacity: .7; font-weight: 500; }

/* ---- 場面の DOM ボタン（タイトル・拠点・物語）。scenes.js が出し入れする ---- */
.scene-ui { position: absolute; z-index: 30; display: none; flex-direction: column; gap: 20px; align-items: stretch; }
.scene-ui.show { display: flex; }
.scene-ui .btn { font-size: 30px; padding: 16px 40px; min-width: 0; text-align: center; white-space: nowrap; transition: transform .12s cubic-bezier(.34, 1.56, .64, 1); }
.scene-ui .btn:hover { transform: translate(-2px, -2px); }
.scene-ui .btn:active { transform: translate(3px, 3px); }
.scene-ui .btn.small { font-size: 20px; padding: 9px 20px; }
.scene-ui.ui-title { left: 1380px; top: 560px; width: 440px; }
.scene-ui.ui-hub { left: 1400px; top: 706px; width: 460px; gap: 16px; }
.ui-hub .btn.main { font-size: 38px; padding: 20px 10px; }
.ui-hub .btn.main.guide { background: #b07d00; font-size: 27px; padding: 27px 6px; animation: goldPulse 1.2s ease-in-out infinite; }
.ui-hub .hrow { display: flex; gap: 16px; }
.ui-hub .hrow .btn { flex: 1; padding-left: 0; padding-right: 0; position: relative; }
.ui-hub .btn i { display: none; }
.ui-hub .btn.can i { display: block; position: absolute; right: -9px; top: -9px; width: 20px; height: 20px; background: #1f4fa8; border: 3px solid #161412; animation: bob 1s ease-in-out infinite; }
.scene-ui.ui-story { left: 64px; top: 968px; }
.scene-ui.ui-card { left: 96px; top: 742px; }
.scene-ui.ui-card .btn.small { font-size: 22px; padding: 10px 22px; }

/* ---- スマホ縦向きのヒント（ゲームは 16:9 固定なので小さくなる） ---- */
.rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  .rotate-hint { display: block; position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 100; padding: 10px 18px; border-radius: 0;
    background: #f4ecda; color: #161412; font: 700 15px/1.2 var(--font); box-shadow: 4px 4px 0 #161412; white-space: nowrap; border: 2px solid #161412; display: flex; gap: 8px; align-items: center; }
  .rotate-hint svg { font-size: 20px; }
}

/* 提案の札（試し刷りの紙・中間の見当標からの再開。ui/panels.js の openOffer） */
.ov-offer .card { max-width: 860px; padding: 36px 56px 40px; }
.ov-offer .of-art { height: 120px; margin-bottom: 6px; transform: rotate(-4deg) scale(.6); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) .08s; }
.ov-offer.show .of-art { transform: rotate(-4deg) scale(1); }
.ov-offer .ttl { font-size: 46px; margin-bottom: 14px; }
.ov-offer p { font-size: 24px; line-height: 1.6; margin: 4px 0; }
.ov-offer p b { background: linear-gradient(transparent 62%, #f2b90f 62%); padding: 0 2px; }
.ov-offer .row { margin-top: 26px; }
