:root {
  --coal: #11100d;
  --soot: #1b1914;
  --iron: #302c23;
  --paper: #d7cba7;
  --dim: #817961;
  --amber: #d99a3d;
  --rust: #a54d2e;
  --cold: #809a92;
  --pixel: "Courier New", "Microsoft YaHei", monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background: var(--coal);
  font-family: var(--pixel);
  overflow-x: hidden;
}
button { font: inherit; }
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 5;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #000 3px 4px),
    radial-gradient(circle at 50% 20%, #4a3b24 0, transparent 55%);
}
.cabinet { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.cabinet::after { content: ""; position: fixed; inset: 0; z-index: 8; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(255,239,190,.8), rgba(165,77,46,.78)); }
.cabinet.impact { animation: screen-impact .42s steps(3); }
.cabinet.impact::after { animation: impact-flash .42s steps(3); }
.cabinet.blank-wave::after { animation: blank-wave .42s ease-out; background: radial-gradient(circle, transparent 25%, rgba(128,154,146,.26) 26%, transparent 55%); }
.cabinet.load-surge .topbar { animation: load-light .8s steps(4); }
@keyframes screen-impact { 25% { transform: translate(-5px, 3px); } 50% { transform: translate(4px, -2px); } }
@keyframes impact-flash { 0% { opacity: .95; } 35% { opacity: .24; } 100% { opacity: 0; } }
@keyframes blank-wave { 0% { opacity: 0; transform: scale(.35); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes load-light { 0%,100% { filter: none; } 40% { filter: brightness(1.8); } 65% { filter: brightness(.5); } }
.topbar {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  padding: 24px clamp(20px, 4vw, 64px) 18px; border-bottom: 2px solid var(--iron);
}
.kicker { margin: 0 0 6px; color: var(--amber); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 56px); line-height: .9; letter-spacing: -.08em; text-shadow: 3px 3px 0 #5b2e1e; }
.top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.horror-control, .difficulty-control { width: 148px; display: grid; gap: 5px; padding: 7px 9px; color: var(--dim); border: 1px solid var(--iron); background: #0c0b09; box-shadow: inset 0 0 12px #000; font-size: 9px; font-style: normal; letter-spacing: .08em; }
.horror-control span, .difficulty-control span { display: flex; justify-content: space-between; }.horror-control i, .difficulty-control i { font-style: normal; }
.horror-control output, .difficulty-control output { color: var(--amber); font-weight: bold; }
.horror-control input, .difficulty-control input { width: 100%; height: 5px; margin: 1px 0; accent-color: var(--rust); cursor: pointer; }
.horror-control input { background: linear-gradient(90deg, #5f786f, #bd873e 38%, #8d2318 65%, #310308); }
.index-name { min-height: 14px; color: var(--paper); font-size: 10px; letter-spacing: .14em; text-align: center; }
.index-scale { display: flex; justify-content: space-between; color: #514b3d; font-size: 7px; }.index-scale i { font-style: normal; }
body[data-horror-band="0"] .horror-control { border-color: #ffffff; } body[data-horror-band="1"] .horror-control { border-color: #76603b; }
/* body[data-horror-band="0"] .horror-control { border-color: #445a53; } body[data-horror-band="1"] .horror-control { border-color: #76603b; } */
body[data-horror-band="2"] .horror-control { border-color: #8f3525; box-shadow: inset 0 0 16px rgba(135,37,25,.2); }
body[data-horror-band="3"] .horror-control, body[data-horror-band="4"] .horror-control { border-color: #ac261b; background: #160504; box-shadow: inset 0 0 18px #000, 0 0 12px rgba(160,28,18,.22); }
body[data-difficulty="1"] .difficulty-control { border-color: #485a54; } body[data-difficulty="2"] .difficulty-control { border-color: #71603d; }
body[data-difficulty="3"] .difficulty-control { border-color: #78402d; } body[data-difficulty="4"] .difficulty-control { border-color: #8e241a; background: #150806; }
.text-button { padding: 6px 2px; color: var(--dim); background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; }
.text-button:hover, .text-button:focus-visible { color: var(--paper); }
#musicButton.playing { color: #aef1cf; border-color: #5e9c7d; text-shadow: 0 0 8px rgba(91,255,187,.35); }
#musicButton.playing::before { content: "♪ "; }
.stage {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(150px, 1fr) minmax(280px, 2fr) minmax(150px, 1fr);
  align-items: center; gap: clamp(16px, 4vw, 60px); width: min(1180px, 100%); margin: auto; padding: 28px clamp(18px, 4vw, 60px);
}
.stage::before {
  content: ""; position: absolute; left: 5%; right: 5%; top: 58%; height: 26%; z-index: 0;
  border: 4px solid #29251d; border-bottom-width: 10px; background: #171510;
  box-shadow: 0 12px 0 #090806;
}
.fighter { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; transition: filter .25s, transform .25s; }
.fighter.shielded .portrait { box-shadow: 0 0 0 3px #758f83, 0 0 22px rgba(128,154,146,.42), 8px 8px 0 #090806; }
.cabinet[data-turn="dealer"] .dealer-card, .cabinet[data-turn="player"] .player-card { filter: drop-shadow(0 0 12px rgba(217,154,61,.32)); }
.cabinet[data-turn="dealer"] .dealer-card::after, .cabinet[data-turn="player"] .player-card::after {
  content: "行动"; position: absolute; top: -22px; padding: 3px 7px; color: var(--coal); background: var(--amber); font-size: 9px; letter-spacing: .12em;
  animation: turn-blink 1.1s steps(2) infinite;
}
@keyframes turn-blink { 50% { opacity: .45; } }
.portrait {
  position: relative; width: clamp(94px, 13vw, 156px); aspect-ratio: 1; display: grid; place-items: center;
  border: 4px solid var(--iron); background: #171510; box-shadow: 8px 8px 0 #090806;
  image-rendering: pixelated;
}
.portrait-art { width: 78%; height: 78%; fill: #332e25; shape-rendering: crispEdges; }
.portrait-light { fill: var(--amber); }
.portrait.player .portrait-art { fill: #40524d; }
.portrait.player .portrait-light { fill: #b8cdc5; }
.portrait.dealer .portrait-art { filter: drop-shadow(4px 4px 0 #080705); }
.portrait.player { border-color: #3c4945; transform: rotate(2deg); }
.portrait.dealer { border-color: #563222; transform: rotate(-2deg); }
.fighter-copy { min-width: 118px; padding: 8px 10px; text-align: center; border: 1px solid var(--iron); background: #11100d; }
.role-badge { width: min(230px,100%); padding: 9px 11px; border: 1px solid #49392a; background: #0d0b09; text-align: center; }
.role-badge b, .role-badge small { display: block; }.role-badge b { color: var(--amber); font-size: 12px; letter-spacing: .1em; }.role-badge small { margin-top: 5px; color: var(--dim); font-size: 10px; line-height: 1.45; }
.fighter-label { margin: 0 0 8px; color: var(--dim); font-size: 12px; letter-spacing: .12em; }
.hearts { display: flex; justify-content: center; gap: 5px; min-height: 18px; }
.heart { width: 14px; height: 14px; background: var(--rust); box-shadow: inset -3px -3px 0 #632b1c; }
.heart.empty { background: #28251e; box-shadow: none; }
.hp-number { display: block; margin-top: 7px; color: var(--paper); font-size: 12px; letter-spacing: .04em; }
.inventory-label, .inventory-heading { display: flex; justify-content: space-between; gap: 14px; color: var(--dim); font-size: 9px; letter-spacing: .09em; }
.inventory-label b, .inventory-heading b { color: var(--amber); }
.dealer-inventory { width: min(180px, 100%); min-height: 60px; display: grid; grid-template-columns: repeat(4, 24px); align-content: center; justify-content: center; gap: 5px; padding: 5px; border: 1px dashed #4b3327; background: rgba(9,8,6,.7); }
.dealer-inventory small { align-self: center; color: var(--dim); font-size: 8px; }
.dealer-item { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #5b3928; background: #1a130f; }
.dealer-item svg { width: 18px; height: 18px; fill: var(--rust); shape-rendering: crispEdges; }
.machine { position: relative; z-index: 1; text-align: center; padding: 13px 18px 18px; border: 2px solid #302c23; background: #12110e; box-shadow: 8px 8px 0 #080705; }
.machine.item-surge { animation: item-surge .42s steps(3); }
@keyframes item-surge { 30% { border-color: var(--amber); box-shadow: 0 0 26px rgba(217,154,61,.45), 8px 8px 0 #080705; } 65% { transform: scale(1.015); } }
.machine::before, .machine::after { content: ""; position: absolute; top: 50%; width: clamp(20px, 5vw, 76px); height: 4px; background: var(--iron); box-shadow: 0 -6px 0 #0a0907; }
.machine::before { right: 100%; }.machine::after { left: 100%; }
.machine.blank-kick { animation: blank-kick .32s steps(3); }
@keyframes blank-kick { 25% { transform: translateY(5px) rotate(-1deg); } 60% { transform: translateY(-3px) rotate(1deg); } }
.round-readout { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed var(--dim); padding: 0 4px 8px; color: var(--dim); font-size: 11px; }
.round-readout strong { padding: 7px 10px; color: #17130d; background: var(--amber); font-size: 13px; letter-spacing: .09em; box-shadow: 3px 3px 0 #080705; }
.cabinet[data-turn="dealer"] .round-readout strong { color: var(--paper); background: var(--rust); }
.spark { position: absolute; inset: 0; opacity: 0; background: #f8e8b2; clip-path: polygon(50% 0, 58% 34%, 94% 11%, 69% 43%, 100% 52%, 65% 57%, 84% 95%, 55% 66%, 42% 100%, 43% 64%, 4% 86%, 35% 54%, 0 43%, 39% 40%); }
.spark.fire { animation: flash .32s steps(2); }
@keyframes flash { 0% { opacity: 1; transform: scale(.2) rotate(0); } 100% { opacity: 0; transform: scale(1.4) rotate(18deg); } }
.ammo-ledger { display: flex; justify-content: center; gap: 9px; color: var(--dim); font-size: 11px; }
.ammo-ledger.sealed { opacity: .62; }
.ammo-ledger.sealed::after { content: var(--sealed-label, "数量已封存"); align-self: center; padding: 4px 6px; color: var(--rust); border: 1px solid #4e291f; font-size: 8px; }
.ammo-ledger span { min-width: 108px; padding: 8px 10px; border: 2px solid var(--iron); background: #0d0c0a; }
.ammo-ledger em { font-style: normal; }
.ammo-ledger b { margin-left: 6px; color: var(--paper); font-size: 24px; line-height: 1; }
.ammo-ledger i { display: inline-block; width: 11px; height: 11px; margin-right: 3px; }
.live-dot { background: var(--rust); }.blank-dot { border: 1px solid var(--cold); }
.machine-status { width: fit-content; margin: 10px auto -4px; padding: 4px 8px; color: var(--dim); border: 1px solid var(--iron); font-size: 9px; letter-spacing: .08em; }
.machine-status.powered { color: #24180a; border-color: var(--amber); background: var(--amber); animation: power-pulse .7s steps(2) infinite; }
.machine-status.peek-active { color: #aef1cf; border-color: #477761; background: #10231b; box-shadow: 0 0 12px rgba(91,255,187,.18); }
@keyframes power-pulse { 50% { filter: brightness(1.35); } }
.message { max-width: 430px; min-height: 42px; margin: 18px auto 0; color: var(--paper); line-height: 1.5; }
.console { padding: 14px clamp(18px, 4vw, 60px) 28px; border-top: 2px solid var(--iron); background: #14130f; }
.injury-strip { display: flex; justify-content: center; gap: 12px; margin-bottom: 12px; color: var(--dim); font-size: 11px; }
.injury-strip strong { max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 8px; color: #e6a185; border: 1px solid #663725; background: #21120e; font-weight: bold; }
.inventory-heading { width: min(1040px, 100%); margin: 20px auto 5px; }
.items { min-height: 58px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.item {
  min-width: 154px; padding: 7px 9px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 8px; border: 2px solid var(--iron); color: var(--paper); background: #1d1b16; cursor: pointer; text-align: left;
  box-shadow: 3px 3px 0 #090806;
}
.item:hover:not(:disabled), .item:focus-visible { border-color: var(--amber); transform: translateY(-2px); }
.item:disabled { opacity: .35; cursor: not-allowed; }
.item-image { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #3a352a; background: #11100d; }
.item-image svg { width: 30px; height: 30px; fill: var(--amber); shape-rendering: crispEdges; }
.item-copy { min-width: 0; }.item b, .item small { display: block; }.item b { color: var(--amber); font-size: 12px; }.item small { margin-top: 3px; color: var(--dim); font-size: 9px; line-height: 1.25; }
.item-used { animation: tray-kick .28s steps(2); }
@keyframes tray-kick { 50% { transform: translateY(-4px); } }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.action { padding: 13px 20px; border: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .08em; box-shadow: 5px 5px 0 #090806; }
.action:hover:not(:disabled), .action:focus-visible { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 #090806; }
.action:disabled { opacity: .35; cursor: not-allowed; }
.primary { color: #17130d; background: var(--amber); }
.target { color: var(--paper); background: var(--rust); }.target.self { color: var(--paper); background: #40524d; }
.role-action { color: #d9c89f; background: #40304b; }
dialog { width: min(560px, calc(100% - 30px)); max-height: 90vh; overflow: auto; color: var(--paper); background: #181611; border: 3px solid var(--iron); box-shadow: 12px 12px 0 #080705; }
dialog::backdrop { background: rgba(5,4,3,.86); }
.dialog-inner { padding: clamp(18px, 4vw, 34px); }.dialog-inner h2 { margin: 4px 0 18px; font-size: clamp(22px, 4vw, 34px); }
.dialog-inner ol { padding-left: 22px; color: var(--dim); line-height: 1.7; }.dialog-inner .action { margin-top: 12px; }
.ending-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.danger { color: var(--rust); }
.hit { animation: hit .45s steps(3); }
@keyframes hit { 0%,100% { transform: translate(0); filter: none; } 25% { transform: translate(-8px, 4px); filter: invert(1); } 50% { transform: translate(7px,-3px); } }

/* 强化对局节奏与关键操作 */
.admin-entry { opacity: .45; font-size: 10px; }
.cabinet[data-busy="true"] .machine { box-shadow: 0 0 22px rgba(217,154,61,.16), 8px 8px 0 #080705; }
.cabinet[data-busy="true"] .round-readout strong::after { content: " …"; animation: wait-dots 1s steps(3) infinite; }
.cabinet.steal-flash .dealer-card { animation: stolen-shake .65s steps(4); }
.cabinet.admin-flash::after { animation: admin-flash .65s steps(3); background: rgba(91,255,187,.34); }
@keyframes wait-dots { 50% { opacity: .2; } }
@keyframes stolen-shake { 25% { transform: translateX(-12px); filter: invert(1); } 60% { transform: translateX(8px); } }
@keyframes admin-flash { 0%,40% { opacity: .6; } 100% { opacity: 0; } }

.console { border-top-width: 4px; box-shadow: 0 -12px 32px rgba(0,0,0,.42); }
.action-heading { width: min(680px, 100%); margin: 8px auto 10px; padding: 8px 12px; color: var(--dim); border: 1px dashed var(--iron); text-align: center; font-size: 11px; letter-spacing: .08em; }
.action-heading.ready { color: var(--amber); border-color: var(--amber); background: rgba(217,154,61,.07); box-shadow: inset 0 0 18px rgba(217,154,61,.12); }
.actions { width: min(680px, 100%); margin: auto; gap: 16px; padding: 13px; border: 3px solid #3b352a; background: #0d0c0a; box-shadow: inset 0 0 0 3px #181611, 7px 7px 0 #080705; }
.action { padding: 15px 24px; }
.action b, .action small { display: block; }.action b { font-size: 15px; }.action small { margin-top: 5px; font-size: 9px; opacity: .75; letter-spacing: .02em; text-transform: none; }
.action.target { min-width: 230px; position: relative; overflow: hidden; }

.steal-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 16px 0; }
.steal-choice { min-height: 72px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; gap: 3px 9px; align-items: center; padding: 9px; color: var(--paper); border: 2px solid var(--iron); background: #11100d; text-align: left; cursor: pointer; }
.steal-choice:hover, .steal-choice:focus-visible { border-color: var(--amber); transform: translateY(-2px); }
.steal-choice span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; background: #211c14; }
.steal-choice svg { width: 28px; fill: var(--amber); }.steal-choice small { color: var(--dim); }
.character-panel { width: min(900px,100%); }.character-panel p { color: var(--dim); line-height: 1.5; }
#characterDialog { width: min(960px,calc(100% - 30px)); }
.character-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.character-card { min-height: 192px; padding: 17px; color: var(--paper); border: 3px solid #49392a; background: linear-gradient(145deg,#1c1712,#0b0907); text-align: left; cursor: pointer; box-shadow: 5px 5px 0 #060504; }
.character-card:hover, .character-card:focus-visible { border-color: var(--amber); transform: translateY(-3px); }
.character-card .file-no { display: block; color: var(--rust); font-size: 11px; letter-spacing: .22em; }.character-card b { display: block; margin: 12px 0 10px; color: var(--amber); font-size: 20px; }.character-card small { color: var(--dim); font-size: 14px; line-height: 1.55; }
.declare-panel label { display: grid; gap: 7px; margin: 16px 0; color: var(--dim); }.declare-panel input { width: 100%; padding: 11px; color: var(--paper); border: 2px solid var(--iron); background: #090806; font: 16px var(--pixel); }
.password-label { display: block; margin-bottom: 7px; color: var(--dim); font-size: 11px; }
.password-input { width: 100%; padding: 13px; color: var(--paper); border: 2px solid var(--iron); outline: 0; background: #090806; font: 18px var(--pixel); letter-spacing: .12em; }
.password-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217,154,61,.15); }
.admin-error { min-height: 20px; color: #df7958; font-size: 11px; }
.cheat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 14px 0 20px; }
.cheat { padding: 15px 10px; color: #aef1cf; border: 1px solid #477761; background: #10231b; cursor: pointer; }
.cheat:hover, .cheat:focus-visible { color: #08130e; background: #72d6a7; transform: translateY(-2px); }

/* 恐怖指数：只提升色调与事件特效，不增加持续动画负担 */
body.horror-mid { --coal: #090706; --soot: #120d0b; --paper: #d2bea0; --amber: #c77938; --rust: #8b2b1d; }
body.horror-mid .machine { border-color: #64271c; box-shadow: 0 0 48px rgba(112,18,10,.3), 10px 12px 0 #030201; }
body.horror-high { background: #030202; }
body.horror-high .portrait.dealer { border-color: #781f16; background: #0b0303; box-shadow: 0 0 28px rgba(153,23,13,.35), 8px 8px 0 #020101; }
body.horror-high .portrait.dealer .portrait-light { fill: #c32718; }
body.horror-high h1 { color: #cbb59a; text-shadow: 4px 4px 0 #58150e; }
body.horror-max .machine { box-shadow: 0 0 60px rgba(148,13,7,.42), inset 0 0 38px #000, 10px 12px 0 #000; }
.blood-fx { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.blood-fx i { position: absolute; left: 50%; top: 43%; width: 7px; height: 7px; opacity: 0; background: #6e100c; box-shadow: 3px 3px 0 #260403; }
.blood-fx[data-target="player"] i { left: 76%; }.blood-fx[data-target="dealer"] i { left: 24%; }
.blood-fx i:nth-child(1) { --dx: -38px; --dy: -45px; }.blood-fx i:nth-child(2) { --dx: 31px; --dy: -34px; width: 5px; }
.blood-fx i:nth-child(3) { --dx: 48px; --dy: 14px; }.blood-fx i:nth-child(4) { --dx: -46px; --dy: 25px; width: 4px; height: 9px; }
.blood-fx i:nth-child(5) { --dx: 13px; --dy: 49px; width: 9px; height: 4px; }.blood-fx i:nth-child(6) { --dx: -12px; --dy: -58px; width: 4px; height: 4px; }
.blood-fx.splash i { animation: blood-pixel .55s steps(5); }
body.horror-high .blood-fx.splash i { animation-duration: .68s; filter: brightness(.8); }
@keyframes blood-pixel { 0% { opacity: .85; transform: translate(0,0) scale(1.2); } 75% { opacity: .65; } 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(90deg) scale(.6); } }

/* 线性弹格闸机：取代圆形轮盘 */
body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; box-shadow: inset 0 0 18vw 7vw #050403; }
.machine { border-color: #4a2920; background: linear-gradient(180deg, #17120f, #090807 48%, #15100d); box-shadow: 0 0 42px rgba(114,28,16,.2), 10px 12px 0 #050403; }
.chamber-wrap { position: relative; width: clamp(250px, 32vw, 380px); margin: 22px auto 16px; }
.chamber.pressure-rig {
  position: relative; width: 100%; height: 220px; aspect-ratio: auto; overflow: hidden;
  border: 6px solid #393027; border-radius: 0; background: #090807;
  box-shadow: 0 0 0 4px #050403, inset 0 0 28px #000, 12px 14px 0 #050403;
  transform: none; transition: none;
}
.pressure-rig::before, .pressure-rig::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8px; z-index: 4; background: repeating-linear-gradient(0deg, #9e3f27 0 7px, #341a14 7px 14px); }
.pressure-rig::before { left: 0; }.pressure-rig::after { right: 0; }
.press-jaw { position: absolute; left: 10px; right: 10px; height: 49px; z-index: 3; border: 3px solid #4b4134; background: repeating-linear-gradient(135deg, #2e2921 0 13px, #171410 13px 26px); box-shadow: inset 0 -6px 0 #0b0907; transition: transform .45s steps(3); }
.jaw-top { top: 8px; }.jaw-bottom { bottom: 8px; transform: rotate(180deg); }
.cabinet[data-busy="true"] .jaw-top { transform: translateY(7px); }.cabinet[data-busy="true"] .jaw-bottom { transform: rotate(180deg) translateY(7px); }
.pressure-label { position: absolute; left: 17px; top: 70px; bottom: 70px; width: 50px; z-index: 2; display: grid; place-content: center; border: 1px solid #4d2d23; background: #160c09; color: var(--rust); writing-mode: vertical-rl; }
.pressure-label b { font-size: 13px; letter-spacing: .12em; }.pressure-label span { margin-top: 7px; color: var(--dim); font-size: 8px; }
#chamberSlots { position: absolute; left: 78px; right: 18px; top: 69px; bottom: 69px; display: grid; grid-template-columns: repeat(var(--slot-count), minmax(0,1fr)); gap: 5px; }
.pressure-rig .chamber-hole { position: relative; left: auto !important; top: auto !important; width: auto; height: auto; aspect-ratio: auto; display: grid; place-items: center; border: 3px solid #3f352a; border-radius: 2px; background: linear-gradient(180deg, #17130f, #050403); transform: none; opacity: 1; }
.pressure-rig .chamber-hole i { color: #51483a; font-size: 9px; font-style: normal; }
.pressure-rig .chamber-hole.used { opacity: .18; border-style: solid; transform: scaleY(.72); }
.pressure-rig .chamber-hole.next { border-color: #d25735; background: #2a0d08; box-shadow: 0 0 18px rgba(210,87,53,.7), inset 0 0 12px #6b1c10; }
.pressure-rig .chamber-hole.next i { color: #ffd0b9; }
.pressure-rig .chamber-hole.tail-live { border-color: #b64a32; background: #2a0d08; box-shadow: inset 0 0 18px rgba(182,74,50,.28); }
.pressure-rig .chamber-hole.tail-blank { border-color: #668b85; background: #0b1b19; box-shadow: inset 0 0 18px rgba(102,139,133,.28); }
.pressure-rig .chamber-hole.tail-special { border-color: #d7b766; background: #211806; box-shadow: 0 0 14px rgba(215,183,102,.34), inset 0 0 18px rgba(215,183,102,.2); }
.pressure-rig .chamber-hole.tail-live i { color: #ffb39d; }.pressure-rig .chamber-hole.tail-blank i { color: #b5d9d0; }.pressure-rig .chamber-hole.tail-special i { color: #ffe39b; }
.chamber-pointer { position: absolute; z-index: 2; left: -7px; top: 50%; padding: 4px 7px; color: #f09470; background: #351008; transform: translate(-100%,-50%); font-size: 8px; text-shadow: 0 2px 0 #000; }
.chamber.pressure-rig.spin { animation: gate-load 1.05s steps(5); transform: none; }
.chamber.pressure-rig.advance { animation: gate-step .62s steps(4); }
.chamber.pressure-rig.invert-spin { animation: gate-invert 1s steps(6); }
@keyframes gate-load { 0% { clip-path: inset(50% 0); filter: brightness(2); } 100% { clip-path: inset(0); filter: none; } }
@keyframes gate-step { 25% { transform: translateY(6px); filter: brightness(1.5); } 55% { transform: translateY(-4px); } }
@keyframes gate-invert { 35% { transform: scaleX(.05); filter: invert(1); } 70% { transform: scaleX(1); } }

/* 第一人称视角：对手在正前方，移除录屏中两块手部占位方块 */
body.first-person .stage { width: min(760px, 100%); min-height: 510px; grid-template-columns: 1fr; grid-template-rows: 175px 300px; align-content: center; gap: 8px; perspective: 900px; padding: 8px clamp(18px,4vw,52px) 26px; }
body.first-person .stage::before { display: block; left: 6%; right: 6%; top: 30%; height: 54%; transform: perspective(700px) rotateX(10deg); transform-origin: center top; }
body.first-person .dealer-card { grid-column: 1; grid-row: 1; align-self: center; justify-self: center; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(540px,100%); transform: scale(.82); }
body.first-person .dealer-card .dealer-inventory { flex-basis: 180px; }
body.first-person .dealer-card .inventory-label { position: fixed; left: 18px; top: 136px; z-index: 9; width: 190px; padding: 7px 9px; border: 1px solid #4b3327; background: rgba(9,8,6,.92); }
body.first-person .dealer-card .dealer-inventory { position: fixed; left: 18px; top: 168px; z-index: 9; width: 190px; min-height: 72px; grid-template-columns: repeat(4,28px); gap: 7px; background: rgba(9,8,6,.92); }
body.first-person .dealer-card .dealer-item { width: 28px; height: 28px; }
body.first-person .machine { grid-column: 1; grid-row: 2; justify-self: center; width: min(610px,100%); transform: rotateX(2deg) scale(.86); transform-origin: center top; }
body.first-person .machine::before, body.first-person .machine::after { display: none; }
body.first-person .chamber-wrap { margin: 10px auto 8px; }
body.first-person .chamber.pressure-rig { height: 176px; }
body.first-person .press-jaw { height: 38px; }
body.first-person .pressure-label { top: 53px; bottom: 53px; }
body.first-person #chamberSlots { top: 52px; bottom: 52px; }
body.first-person .message { min-height: 28px; margin-top: 8px; }
body.first-person .player-card { position: fixed; right: 18px; top: 118px; z-index: 7; transform: scale(.78); transform-origin: top right; }
body.first-person .player-card .portrait { display: none; }
body.first-person .player-card::before { content: var(--hud-label, "乘客状态"); padding: 3px 8px; color: var(--cold); border: 1px solid var(--cold); font-size: 8px; }

@media (max-width: 720px) {
  .topbar { align-items: center; }.horror-control, .difficulty-control { width: 92px; }.stage { grid-template-columns: 1fr 1fr; }
  .machine { grid-column: 1 / -1; grid-row: 1; }.machine::before, .machine::after, .stage::before { display: none; }.fighter { grid-row: 2; flex-direction: row; justify-content: center; }
  .portrait { width: 72px; }.fighter-copy { text-align: left; }.hearts { justify-content: flex-start; }
  .dealer-card { flex-wrap: wrap; }.dealer-inventory { flex-basis: 100%; }
  .items { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 9px; }
  .item { flex: 0 0 154px; }.action { flex: 1 1 140px; }
  .action.target { min-width: 0; }.steal-options, .cheat-grid { grid-template-columns: 1fr; }.character-grid { grid-template-columns: repeat(2,1fr); }
  body.first-person .stage { min-height: 570px; grid-template-columns: 1fr; grid-template-rows: 210px 340px; }
  body.first-person .dealer-card { flex-direction: column; flex-wrap: nowrap; transform: scale(.92); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
