/* 渋谷ダンジョン、配信中。 */
:root, :root[data-theme], :root:not([data-theme="light"]) {
  --bg: #0b0e1c; --surface: #161a2e; --surface-2: #1f2440; --text: #eef0f7; --text-sub: #a3a9be; --line: #2a3050;
  --accent: #8ea2ff; --accent-ink: #0b0e1c; --accent-soft: #232b52; --live: #ef233c; --gold: #ffd166; color-scheme: dark;
}
body { background: #0b0e1c; color: #eef0f7; color-scheme: dark; }
body .mn-header { background: rgba(11, 14, 28, .92); color: #eef0f7; border-color: #232845; }
.mn-about, .mn-footer { color: #d8dcea; }
.mn-about a, .mn-footer a { color: #a9b8ff; }
.mn-card { background: #161a2e; border-color: #2a3050; color: #eef0f7; }
.mn-btn { background: #1f2440; color: #eef0f7; border-color: #343b63; }
.mn-btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mn-modal { background: #151a2e; color: #eef0f7; }
.mn-small, .mn-muted { color: #a3a9be; }

#app.sd-app { max-width: 980px; padding: 10px 12px 24px; }
.sd-hidden { display: none !important; }

/* ===== 拠点 ===== */
.sd-hero { position: relative; border-radius: 18px; overflow: hidden; background: #0d1124; border: 1px solid #262c4c; }
.sd-hero canvas { display: block; width: 100%; height: auto; }
.sd-hero-in { padding: 4px 16px 14px; background: #0d1124; }
@media (min-width: 700px) { .sd-hero-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; background: linear-gradient(transparent, rgba(8, 10, 22, .92) 45%); } }
.sd-title { font-size: clamp(24px, 6.4vw, 40px); font-weight: 900; letter-spacing: .02em; line-height: 1.15; margin: 0; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.sd-title small { display: block; font-size: 13px; font-weight: 700; color: #c7d2fe; letter-spacing: .06em; margin-bottom: 4px; }
.sd-sub { margin: 6px 0 0; font-size: 14px; color: #d8dcea; }
.sd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.sd-stat { background: #161a2e; border: 1px solid #262c4c; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.sd-stat span { display: block; font-size: 11px; color: #a3a9be; white-space: nowrap; }
.sd-stat b { display: block; font-size: 18px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sd-stat b.gold { color: var(--gold); }
.sd-idle { font-size: 12px; color: #a3a9be; margin: -4px 0 10px; }
.sd-idle b { color: var(--gold); }
.sd-go { display: grid; gap: 8px; }
.sd-go .mn-btn { width: 100%; }
.sd-go-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-daily { display: flex; align-items: center; gap: 10px; background: #161a2e; border: 1px solid #2a3050; border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.sd-daily b { font-size: 15px; }
.sd-daily p { margin: 0; font-size: 12px; color: #a3a9be; }
.sd-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 10px; }
.sd-tabs button { position: relative; padding: 10px 4px; border-radius: 12px; border: 1px solid #2a3050; background: #12162a; font-weight: 800; font-size: 14px; cursor: pointer; }
.sd-tabs button[aria-selected=true] { background: #232a52; border-color: var(--accent); }
.sd-dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.sd-panel { min-height: 120px; }
.sd-friend { background: #2a1d3f; border: 1px solid #6a4c9c; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-weight: 700; }

/* スキルツリー */
.sd-tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .sd-tree { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sd-branch { background: #12162a; border: 1px solid #262c4c; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sd-branch h4 { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.sd-branch h4 i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #0b0e1c; font-style: normal; font-weight: 900; }
.sd-branch h4 small { color: #a3a9be; font-weight: 600; font-size: 10px; }
.sd-node { text-align: left; border-radius: 10px; border: 1px solid #343b63; background: #1a1f38; padding: 7px 8px; cursor: pointer; font-size: 12px; line-height: 1.4; }
.sd-node b { display: block; font-size: 13px; }
.sd-node .pips { display: flex; gap: 3px; margin: 3px 0; }
.sd-node .pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #5a6390; }
.sd-node .pips i.on { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
.sd-node .cost { color: var(--gold); font-weight: 800; }
.sd-node.locked { opacity: .45; }
.sd-node.can { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 1px var(--c, var(--accent)) inset; }
.sd-node.max { opacity: .8; }

/* ロッカー・図鑑・アーカイブ */
.sd-list { display: grid; gap: 6px; }
.sd-li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #12162a; border: 1px solid #262c4c; text-align: left; width: 100%; cursor: pointer; font-size: 14px; }
.sd-li canvas { flex: none; }
.sd-li .grow { flex: 1; min-width: 0; }
.sd-li small { display: block; color: #a3a9be; font-size: 12px; }
.sd-li.sel { border-color: var(--gold); background: #2a2614; }
.sd-li.lock { opacity: .5; cursor: default; }
.sd-zukan { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sd-zk { background: #12162a; border: 1px solid #262c4c; border-radius: 12px; padding: 8px; font-size: 12px; text-align: center; }
.sd-zk b { display: block; font-size: 13px; }
.sd-zk.no { opacity: .4; }

/* 物語 */
.sd-novel { font-family: var(--font-serif); font-size: 17px; line-height: 2.05; letter-spacing: .02em; }
.sd-novel p { margin: 0 0 1.1em; text-indent: 1em; }
.sd-novel h2 { font-family: var(--font); font-size: 20px; margin: 0 0 .2em; }
.sd-novel .sd-ch { font-family: var(--font); color: #a9b8ff; font-weight: 800; font-size: 13px; letter-spacing: .1em; }
.mn-modal.sd-read { max-width: 620px; }

/* ===== 潜行画面 ===== */
.sd-play { display: grid; gap: 6px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (min-width: 900px) {
  .sd-play { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "hud side" "stage side" "log side" "ctrl side" "keys side"; align-items: start; column-gap: 14px; }
  .sd-play > .sd-hud { grid-area: hud; } .sd-play > .sd-stage { grid-area: stage; } .sd-play > .sd-side { grid-area: side; } .sd-play > .sd-log { grid-area: log; } .sd-play > .sd-ctrl { grid-area: ctrl; } .sd-play > .sd-keys { grid-area: keys; }
  .sd-ctrl { grid-template-columns: auto 320px; justify-content: start; }
}
.sd-hud { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; flex-wrap: wrap; }
.sd-hud .fl { background: #232a52; border-radius: 8px; padding: 2px 8px; font-size: 15px; }
.sd-hud .bar { flex: 1; min-width: 110px; height: 16px; background: #2a1520; border-radius: 99px; position: relative; overflow: hidden; }
.sd-hud .bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ef476f, #ff8fa3); border-radius: 99px; transition: width .2s; }
.sd-hud .bar i.mid { background: linear-gradient(90deg, #f4a261, #ffd166); }
.sd-hud .bar i.ok { background: linear-gradient(90deg, #2dc653, #80ed99); }
.sd-hud .bar em { position: absolute; inset: 0; text-align: center; font-style: normal; font-size: 11px; line-height: 16px; color: #fff; text-shadow: 0 1px 2px #000; }
.sd-hud .chip { white-space: nowrap; color: #c7d2fe; }
.sd-hud .chip.warn { color: #ffd166; }
.sd-hud .chip.bad { color: #ff6b81; }
.sd-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid #262c4c; touch-action: none; }
.sd-stage canvas { display: block; width: 100%; }
.sd-live { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; font-size: 12px; font-weight: 800; pointer-events: none; }
.sd-live span { background: var(--live); color: #fff; border-radius: 5px; padding: 1px 6px; }
.sd-live em { font-style: normal; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.sd-chat { position: absolute; right: 6px; bottom: 6px; width: min(54%, 260px); display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.sd-chat p { margin: 0; background: rgba(8, 10, 22, .62); border-radius: 8px; padding: 2px 7px; font-size: 11.5px; line-height: 1.45; color: #eef0f7; animation: sdIn .25s ease-out; transition: opacity .6s; }
.sd-chat p b { color: #a9b8ff; font-weight: 700; margin-right: 4px; }
.sd-chat p.gift { background: rgba(120, 90, 0, .7); }
.sd-chat p.gift b { color: #ffd166; }
.sd-chat p.old { opacity: 0; }
@keyframes sdIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.sd-voice { position: absolute; left: 8px; right: 8px; top: 38px; background: rgba(20, 24, 50, .9); border: 1px solid #5a6390; border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.6; pointer-events: none; animation: sdIn .3s ease-out; }
.sd-banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(8, 10, 22, .85); border: 1px solid #8ea2ff; padding: 10px 20px; border-radius: 12px; font-weight: 900; font-size: 22px; white-space: nowrap; pointer-events: none; animation: sdIn .3s; }
.sd-log { background: #10132a; border: 1px solid #222846; border-radius: 10px; padding: 5px 9px; font-size: 13px; line-height: 1.55; height: calc(1.55em * 2 + 10px); overflow: hidden; }
.sd-log p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-log p:first-child { color: #a3a9be; }
.sd-ctrl { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.sd-pad { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 54px); gap: 4px; }
.sd-pad button, .sd-acts button { border-radius: 12px; border: 1px solid #343b63; background: #1a1f38; color: #eef0f7; font-weight: 900; font-size: 20px; cursor: pointer; touch-action: manipulation; }
.sd-pad button:active, .sd-acts button:active, .sd-pad button.on { background: #2e3870; }
.sd-pad .c { font-size: 11px; line-height: 1.2; }
.sd-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd-acts button { font-size: 14px; padding: 12px 4px; min-height: 52px; line-height: 1.2; }
.sd-acts button.on { background: #3d2f00; border-color: var(--gold); color: var(--gold); }
.sd-acts button small { display: block; font-size: 10px; color: #a3a9be; font-weight: 600; }
.sd-acts button.hot { border-color: #8ea2ff; box-shadow: 0 0 0 1px #8ea2ff inset; }
.sd-side { display: none; }
@media (min-width: 900px) { .sd-side { display: block; background: #10132a; border: 1px solid #222846; border-radius: 12px; padding: 10px; font-size: 13px; } .sd-side h4 { margin: 0 0 6px; font-size: 13px; color: #a9b8ff; } .sd-side .inv p { margin: 0; padding: 2px 0; border-bottom: 1px dashed #222846; } }
.sd-keys { font-size: 11px; color: #7d84a3; margin: 4px 0 0; }

/* 道具の一覧 */
.sd-inv { display: grid; gap: 4px; max-height: 58vh; overflow: auto; }
.sd-inv button { display: flex; align-items: center; gap: 8px; text-align: left; border-radius: 10px; border: 1px solid #2a3050; background: #12162a; padding: 6px 8px; font-size: 14px; cursor: pointer; }
.sd-inv button .eq { margin-left: auto; font-size: 11px; color: #0b0e1c; background: var(--accent); border-radius: 5px; padding: 0 5px; font-weight: 800; }
.sd-inv button .unk { color: #ffd166; }
.sd-acts-m { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sd-desc { white-space: pre-wrap; font-size: 14px; color: #c9cee3; background: #10132a; border-radius: 10px; padding: 8px 10px; }
.sd-dirpad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 64px); gap: 6px; justify-content: center; margin: 10px auto; }
.sd-dirpad button { border-radius: 12px; border: 1px solid #343b63; background: #1a1f38; font-size: 24px; font-weight: 900; cursor: pointer; }
.sd-dirpad button.cur { border-color: var(--gold); color: var(--gold); }

/* ===== 結果 ===== */
.sd-result { text-align: center; }
.sd-result .end { font-size: 13px; letter-spacing: .2em; color: #ff8fa3; font-weight: 800; }
.sd-result .depth { font-size: 72px; font-weight: 900; line-height: 1.05; color: var(--gold); margin: 4px 0; font-variant-numeric: tabular-nums; }
.sd-result .line { font-size: 17px; font-weight: 800; margin: 0 0 12px; }
.sd-rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; text-align: left; }
.sd-pay { background: #161a2e; border: 1px solid #2a3050; border-radius: 12px; padding: 10px 12px; text-align: left; font-size: 14px; }
.sd-pay p { display: flex; justify-content: space-between; margin: 0; padding: 2px 0; }
.sd-pay p.tot { border-top: 1px solid #2a3050; margin-top: 4px; padding-top: 6px; font-weight: 900; font-size: 17px; color: var(--gold); }
.sd-newch { background: #1d1636; border: 1px solid #8f6ad6; border-radius: 12px; padding: 10px; margin: 10px 0; }
.sd-newch b { color: #d6c3ff; }

@media (max-width: 400px) {
  .sd-pad { grid-template-columns: repeat(3, 50px); grid-template-rows: repeat(3, 50px); }
  .sd-stats { grid-template-columns: repeat(2, 1fr); }
  .sd-tabs button { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .sd-chat p, .sd-voice, .sd-banner { animation: none; } }
body.pui-full .sd-app { padding-top: 4px; }

@media (max-width: 520px) { .sd-chat p:nth-last-child(n+4) { display: none; } .sd-chat p { font-size: 11px; } }
.mn-footer .mn-more { background: #161a2e; color: #eef0f7; border-color: #2a3050; }
.sd-hero-media { position: relative; aspect-ratio: 16 / 9; background: #0d1124; }
.sd-hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.sd-hero-live { top: 10px; left: 10px; }
@media (min-width: 700px) { .sd-hero-in { max-width: 55%; background: none; } .sd-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,8,20,.85), rgba(6,8,20,.2) 60%, transparent); pointer-events: none; } .sd-hero-in { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: flex-end; } }
.sd-ch-art { display: block; width: 100%; height: auto; border-radius: 12px; margin: 0 0 12px; }
.sd-hero-live { z-index: 2; }
.sd-acts { grid-template-columns: 1fr 1fr 1fr; }
.sd-acts button.ab { grid-row: span 1; background: #2a2160; border-color: #ffd166; color: #ffd166; font-size: 15px; }
.sd-acts button.ab.dim { opacity: .55; border-color: #5a6390; color: #c7d2fe; }
.sd-acts button.ab small { color: #e9d9a6; }
.sd-hud .bar.en { min-width: 90px; max-width: 130px; flex: 0 1 130px; background: #13213a; }
.sd-hud .bar.en i { background: linear-gradient(90deg, #4cc9f0, #8ea2ff); }
@media (max-width: 400px) { .sd-acts button { font-size: 13px; min-height: 48px; padding: 8px 2px; } .sd-hud .bar.en { min-width: 70px; } }
.sd-acts button.ab { grid-column: span 2; }
@media (max-width: 520px) {
  .sd-acts { gap: 5px; }
  .sd-acts button { font-size: 13px; padding: 6px 2px; min-height: 48px; white-space: nowrap; }
  .sd-acts button:not(.ab) small { display: none; }
  .sd-acts button.ab { font-size: 15px; }
  .sd-voice { font-size: 12px; line-height: 1.5; padding: 6px 8px; }
}
.sd-voice { pointer-events: auto; cursor: pointer; }

/* ===== 潜行画面 v4：画面を大きく、ヘッダーは▼で開く、ログはコメント欄に ===== */
body.sd-playing .mn-header { display: none; }
body.sd-playing.sd-hdr .mn-header { display: block; }
body.sd-playing #app.sd-app { padding-top: 4px; }
body.sd-playing.pui-full #app.sd-app, body.pui-full .sd-play { max-width: none; }
.sd-play { gap: 6px; }
.sd-stage { border-radius: 12px; }
.sd-tab { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 4; width: 52px; height: 18px; border: 0; border-radius: 0 0 10px 10px; background: rgba(26, 33, 64, .85); color: #c7d2fe; font-size: 11px; line-height: 18px; cursor: pointer; padding: 0; }
.sd-hud { position: absolute; left: 6px; right: 6px; top: 20px; z-index: 3; display: block; pointer-events: none; font-size: 12px; }
.sd-hud .r1 { display: flex; align-items: center; gap: 5px; }
.sd-hud .fl, .sd-hud .chip { background: rgba(14, 18, 40, .82); border-radius: 7px; padding: 2px 6px; }
.sd-hud .fl { font-size: 13px; }
.sd-hud .bar { min-width: 0; height: 17px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.sd-hud .bar em { line-height: 17px; }
.sd-hud .bar.en { flex: 0 0 74px; }
.sd-live { top: 44px; left: 6px; right: 52px; flex-wrap: wrap; z-index: 3; }
.sd-live em { background: rgba(14, 18, 40, .82); }
.sd-icons { position: absolute; right: 6px; top: 46px; z-index: 3; display: flex; flex-direction: column; gap: 7px; }
.sd-ic { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #39406a; background: rgba(20, 26, 51, .86); color: #eef0f7; font-size: 18px; cursor: pointer; padding: 0; touch-action: manipulation; }
.sd-ic.on { background: #3d2f00; border-color: var(--gold); }
.sd-ic.hot { border-color: #8ea2ff; box-shadow: 0 0 0 2px #8ea2ff inset; background: #2e3870; }
.sd-chat { left: 6px; right: auto; bottom: 6px; width: min(76%, 330px); z-index: 3; }
.sd-chat p { font-size: 12px; }
.sd-chat p.sys { background: rgba(8, 10, 22, .72); color: #ffe7a3; }
.sd-chat p.gift { background: rgba(124, 58, 237, .82); }
.sd-chat p.gift b { color: #ffe7a3; }
.sd-chat p.ally { background: rgba(14, 116, 144, .8); }
.sd-voice { z-index: 5; }
.sd-banner { z-index: 5; }
.sd-ctrl { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.sd-pad { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 50px); }
.sd-acts { position: relative; display: block; width: 176px; height: 160px; flex: 0 0 auto; }
.sd-acts .sd-ab { position: absolute; width: 66px; height: 66px; border-radius: 50%; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 35%, #3a2d7a, #1d1740); color: #ffe7a3; cursor: pointer; padding: 0; touch-action: none; display: flex; align-items: center; justify-content: center; }
.sd-acts .sd-ab canvas { width: 46px; height: 46px; pointer-events: none; }
.sd-acts .sd-ab small { position: absolute; bottom: -4px; right: -2px; background: #ffd166; color: #1a1300; font-size: 10px; font-weight: 900; border-radius: 8px; padding: 0 5px; line-height: 15px; pointer-events: none; }
.sd-acts .sd-ab.dim { opacity: .5; border-color: #6b6f8a; }
.sd-acts .sd-ab.empty { border-style: dashed; border-color: #4a5078; background: #141832; color: #6b7299; }
.sd-acts .sd-ab.empty small { position: static; background: none; color: #6b7299; }
.sd-acts .sd-ab.on { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255, 209, 102, .3); }
.sd-acts .sd-ab:nth-child(1) { left: 0; top: 4px; }
.sd-acts .sd-ab:nth-child(2) { left: 78px; top: 0; }
.sd-acts .sd-ab:nth-child(3) { left: 30px; top: 82px; }
.sd-acts .sd-inv-b { position: absolute; right: 0; bottom: 0; width: 56px; height: 56px; border-radius: 14px; border: 1px solid #343b63; background: #1a1f38; color: #eef0f7; font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.sd-acts .sd-inv-b small { display: block; font-size: 10px; color: #a3a9be; margin-top: 2px; }
.sd-keys { display: none; }
@media (min-width: 900px) {
  .sd-play { grid-template-areas: "stage side" "ctrl side" "keys side"; }
  .sd-keys { display: block; }
  .sd-ctrl { justify-content: flex-start; gap: 40px; }
}
/* 機材のパレット（押している間だけ） */
.sd-pal { position: fixed; z-index: 60; pointer-events: none; }
.sd-pal-ring { position: absolute; left: 0; top: 0; }
.sd-pal-ring::before { content: ""; position: absolute; left: -104px; top: -104px; width: 208px; height: 208px; border-radius: 50%; background: radial-gradient(circle, rgba(20, 16, 50, .2) 30%, rgba(20, 16, 50, .78) 31%, rgba(20, 16, 50, .78) 70%, rgba(20, 16, 50, 0) 71%); }
.sd-pal-a { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #2a2160; border: 2px solid #6d5fd6; color: #fff; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.sd-pal-a.on { background: #ffd166; border-color: #fff; color: #1a1300; transform: scale(1.25); }
.sd-pal-c { position: absolute; left: -32px; top: -20px; width: 64px; text-align: center; font-size: 10px; color: #c7d2fe; line-height: 1.25; }
.sd-pal.aim .sd-pal-c { opacity: 0; }
.sd-pal-tip { position: absolute; left: 50%; bottom: 112px; transform: translateX(-60%); white-space: nowrap; background: rgba(10, 8, 24, .92); border: 1px solid #6d5fd6; border-radius: 10px; padding: 5px 10px; font-size: 12px; color: #eef0f7; text-align: center; }
.sd-pal-tip b { color: #ffd166; }
.sd-pal.ng .sd-pal-a { opacity: .45; }
.sd-stage .sd-voice { top: 72px; right: 52px; }
.sd-inv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 34px; }
.sd-inv-head h3 { margin: 0; }
.sd-inv-head .mn-btn { padding: 6px 12px; font-size: 13px; }
.sd-mv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 4px; }
.sd-mv-n { font-size: 13px; color: #aab; min-width: 4em; text-align: center; }
.sd-mv .mn-btn[disabled] { opacity: .35; }
/* ウーパーイーツ・アマゾネス */
.sd-shop-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 13px; margin-right: 30px; }
.sd-shop-h b { font-size: 17px; white-space: nowrap; }
.sd-shop-h.uber { background: #10301b; color: #b8f5c8; } .sd-shop-h.uber b { color: #5ee08a; }
.sd-shop-h.amazon { background: #2a2010; color: #ffe3b0; } .sd-shop-h.amazon b { color: #ffb347; }
.sd-shop { display: flex; flex-direction: column; gap: 8px; }
.sd-shop-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; background: #161a2e; border: 1px solid #2a3050; border-radius: 12px; padding: 8px; }
.sd-shop-t b { display: block; font-size: 14px; }
.sd-shop-t small { display: block; font-size: 11.5px; color: #a3a9be; line-height: 1.45; }
.sd-shop-row .mn-btn { display: flex; flex-direction: column; align-items: center; padding: 6px 10px; min-width: 76px; }
.sd-shop-row .mn-btn small { font-size: 10px; opacity: .8; }
.sd-speed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sd-speed button { border: 1px solid #343b63; background: #161a2e; color: #eef0f7; border-radius: 10px; padding: 6px 4px; cursor: pointer; line-height: 1.25; }
.sd-speed button b { display: block; font-size: 13px; }
.sd-speed button small { display: block; font-size: 10px; color: #a3a9be; }
.sd-speed button.on { border-color: var(--gold); background: #3d2f00; }
.sd-speed button.on small { color: #ffe3b0; }
/* メルカル（フリマアプリ） */
.sd-inv button .eq.merc { background: #ff5a5f; color: #fff; } .sd-inv button .eq + .eq.merc { margin-left: 4px; }
.sd-shop-h.merc { background: #2a1214; color: #ffd9da; } .sd-shop-h.merc b { color: #ff6b6f; }
.sd-sell { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 12px; }
.sd-sell p { display: flex; justify-content: space-between; margin: 4px 0; font-size: 14px; }
.sd-sell b { font-size: 16px; color: #ffd166; }
.sd-shop-h.stall { background: #2b1a0e; color: #ffe1c2; } .sd-shop-h.stall b { color: #ffa94d; }
.sd-sell b.minus { color: #ff6b81; }
.sd-warn { color: #ff9aa8; }
.sd-npc { display: flex; gap: 10px; align-items: center; }
.sd-npc b { font-size: 17px; color: #ffd166; } .sd-npc p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
/* ステージのテロップ */
.sd-stagecard { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(5,6,14,.55) 0%, rgba(5,6,14,.88) 70%); animation: sdScIn .45s ease-out both; cursor: pointer; }
.sd-stagecard.out { animation: sdScOut .35s ease-in both; }
.sd-sc-sub { font-size: 12px; letter-spacing: .2em; color: var(--zc); font-weight: 800; text-shadow: 0 0 10px var(--zc); }
.sd-sc-title { margin: 6px 0 10px; font-size: clamp(26px, 8vw, 44px); font-weight: 900; line-height: 1.15; color: #fff;
  text-shadow: 0 0 6px var(--zc), 0 0 18px var(--zc), 0 0 36px var(--zc); animation: sdScGlow 1.4s ease-in-out infinite alternate; }
.sd-sc-lead { max-width: 34em; font-size: 14px; line-height: 1.6; color: #e9ecff; }
.sd-sc-tip { max-width: 34em; margin-top: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.55; color: #fff; border: 1px solid var(--zc); border-radius: 10px; background: rgba(255,255,255,.06); box-shadow: 0 0 14px var(--zc) inset; }
@keyframes sdScIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes sdScOut { to { opacity: 0; transform: scale(.96); } }
@keyframes sdScGlow { from { filter: brightness(1); } to { filter: brightness(1.25); } }
/* 音量 */
.sd-volrow { text-align: center; margin: 10px 0 0; }
.sd-vol { display: grid; grid-template-columns: 4.5em 1fr 2.5em; align-items: center; gap: 10px; font-weight: 700; }
.sd-vol input { width: 100%; accent-color: var(--gold, #ffd166); }
.sd-vol b { text-align: right; font-variant-numeric: tabular-nums; }
