:root {
  color-scheme: dark;
  --bg: #080b10; --panel: #111821; --line: rgba(173,205,210,.15); --text: #e8f1ef;
  --muted: #76888e; --cyan: #82e3cf; --cyan-dim: rgba(130,227,207,.12);
  --amber: #f0ba70; --red: #ef716d; --shadow: 0 24px 80px rgba(0,0,0,.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: radial-gradient(circle at 28% 12%, #101a22 0, #080b10 42%, #05070a 100%); color: var(--text); }
button, textarea { font: inherit; } button { color: inherit; }
.app-shell { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 28px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.brand, .top-status, .live-state, .feed-topline, .feed-status-row, .queue-state, .card-title { display: flex; align-items: center; }
.brand { gap: 11px; }.brand-mark { width: 29px; height: 29px; display: flex; align-items: end; gap: 3px; padding: 6px; border: 1px solid rgba(130,227,207,.35); }.brand-mark i { width: 4px; background: var(--cyan); }.brand-mark i:nth-child(1) { height: 8px; }.brand-mark i:nth-child(2) { height: 15px; }.brand-mark i:nth-child(3) { height: 11px; }
.brand strong { display: block; font-size: 12px; letter-spacing: .15em; }.brand em { color: var(--cyan); font-style: normal; }.brand small { display: block; margin-top: 4px; color: #60737a; font-size: 9px; letter-spacing: .1em; }
.top-status { gap: 14px; }.mode-chip { padding: 6px 8px; border: 1px solid rgba(240,186,112,.28); color: var(--amber); background: rgba(240,186,112,.06); font: 9px ui-monospace, monospace; }.live-state { gap: 8px; color: #708188; font-size: 10px; }.live-state i, .queue-state i { width: 6px; height: 6px; border-radius: 50%; background: #55636a; }.live-state.on i, .queue-state i { background: var(--cyan); box-shadow: 0 0 12px rgba(130,227,207,.8); }.live-state.on b { color: var(--cyan); }
.main-grid { display: grid; grid-template-columns: minmax(0,1.58fr) minmax(330px,.62fr); gap: 24px; padding-top: 26px; }
.section-heading { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 2px 10px; }.eyebrow { color: var(--cyan); font: 9px ui-monospace,monospace; letter-spacing: .17em; text-transform: uppercase; }.signal { color: #7d9196; font: 9px ui-monospace,monospace; letter-spacing: .12em; white-space: nowrap; }.signal span { display: inline-flex; align-items: end; gap: 2px; height: 13px; margin-left: 8px; }.signal i { width: 3px; height: 5px; background: var(--cyan); }.signal i:nth-child(2) { height: 8px; }.signal i:nth-child(3) { height: 11px; opacity: .75; }.signal i:nth-child(4) { height: 13px; opacity: .35; }
.feed { position: relative; aspect-ratio: 16/9; min-height: 470px; overflow: hidden; border: 1px solid rgba(182,219,216,.25); background: #101820; box-shadow: var(--shadow); isolation: isolate; }
.standby-video, .generated-video, .opening-idle, .idle-feed, .room-wall, .room-floor, .scanlines, .vignette, .barrage-layer { position: absolute; inset: 0; }.standby-video, .generated-video, .opening-idle { width: 100%; height: 100%; object-fit: cover; background: #080b0e; }.standby-video { z-index: 4; opacity: 0; filter: contrast(1.25) brightness(.72); transition: opacity .22s ease; }.standby-video.visible { opacity: 1; }.generated-video { z-index: 5; visibility: hidden; opacity: 0; transition: opacity .22s ease; }.generated-video.visible { visibility: visible; opacity: 1; }.opening-idle { z-index: 3; opacity: 0; transition: opacity .22s ease; }.opening-idle.visible { opacity: 1; }.idle-feed { z-index: 1; overflow: hidden; background: #111920; transition: filter .5s, transform .5s; }.scene-photo { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .28s ease; }.scene-photo.visible { opacity: 1; }.idle-feed.photo-mode .room-wall,.idle-feed.photo-mode .room-floor,.idle-feed.photo-mode .pipe,.idle-feed.photo-mode .valve-stub,.idle-feed.photo-mode .ceiling-light,.idle-feed.photo-mode .iron-bed,.idle-feed.photo-mode .vent,.idle-feed.photo-mode .breaker-box,.idle-feed.photo-mode .locked-door,.idle-feed.photo-mode .floor-drain,.idle-feed.photo-mode .cleaner-bottle,.idle-feed.photo-mode .girl { display: none; }.room-wall { bottom: 31%; background: linear-gradient(112deg,#16222b 0%,#29363b 52%,#11191f 100%); }.room-wall::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg,transparent 0 17%,rgba(226,241,231,.035) 17.2% 17.4%); }.room-floor { top: 66%; background: repeating-linear-gradient(166deg,#11171b 0 42px,#0c1114 43px 44px); }
.pipe { position: absolute; z-index: 2; width: 58%; height: 8px; background: linear-gradient(#737e7a,#1d272a 65%,#909996); box-shadow: 0 3px 0 rgba(0,0,0,.5); }.pipe-a { top: 17%; left: -7%; transform: rotate(-8deg); }.pipe-b { top: 25%; left: 3%; transform: rotate(15deg); opacity: .67; }.valve-stub { position: absolute; z-index: 3; width: 18px; height: 11px; border: 2px solid #697471; background: #1d272a; }.stub-a { left: 24%; top: 17%; }.stub-b { left: 34%; top: 30%; }.water-valve { display: none; position: absolute; z-index: 4; width: 30px; height: 30px; border: 5px solid #59625e; border-radius: 50%; box-shadow: 0 0 0 3px #20282a; transition: transform .4s,border-color .4s,left .4s,top .4s; }.feed.wheel-on-a .water-valve { display: block; left: 23%; top: 15%; }.feed.wheel-on-b .water-valve { display: block; left: 33%; top: 28%; }.water-valve::before,.water-valve::after { content: ""; position: absolute; left: 50%; top: 50%; width: 38px; height: 5px; background: #59625e; transform: translate(-50%,-50%); }.water-valve::after { transform: translate(-50%,-50%) rotate(90deg); }.water-valve i { position: absolute; inset: 8px; border-radius: 50%; background: #222b2d; }.water-leak { position: absolute; z-index: 2; left: 29%; top: 26%; width: 7px; height: 0; opacity: 0; background: linear-gradient(rgba(121,205,220,.8),rgba(73,139,157,.15)); box-shadow: 0 0 12px rgba(121,205,220,.5); transition: height .5s,opacity .3s; }.feed.state-water-leak .water-valve { transform: rotate(52deg); border-color: #7fcbd5; }.feed.state-water-leak .water-leak { height: 58%; opacity: .85; }.ceiling-light { position: absolute; z-index: 2; top: 8%; left: 43%; width: 20%; height: 4px; background: #b8c8b9; box-shadow: 0 0 42px 18px rgba(182,211,190,.16); transition: background .4s,box-shadow .4s; }.feed.state-power-backup .ceiling-light { background: #9b78d0; box-shadow: 0 0 48px 22px rgba(151,94,213,.28); }.password-overlay { position: absolute; z-index: 2; left: 57%; top: 34%; padding: 5px 10px 7px; color: rgba(154,243,184,.78); background: radial-gradient(ellipse at center,rgba(104,255,164,.08),transparent 72%); font: 700 clamp(20px,2.4vw,32px)/1 ui-monospace,monospace; letter-spacing: .2em; text-shadow: 0 0 4px rgba(109,255,163,.58),0 0 13px rgba(109,255,163,.34); opacity: 0; filter: blur(.18px); mix-blend-mode: screen; transform: perspective(360px) rotateY(-9deg) rotateZ(-1.2deg); transform-origin: left center; transition: opacity .4s; pointer-events: none; }.password-overlay::after { content: ""; position: absolute; inset: 2px 5px; border-bottom: 1px solid rgba(128,255,175,.13); opacity: .65; }.feed.state-code-revealed .password-overlay { opacity: .86; }.door-keypad { position: absolute; z-index: 3; right: 4.2%; top: 43%; width: 54px; padding: 6px 5px 5px; border: 1px solid rgba(130,227,207,.72); border-left: 3px solid var(--cyan); background: linear-gradient(145deg,rgba(5,11,14,.94),rgba(24,33,36,.96)); box-shadow: 0 0 0 2px rgba(5,10,12,.7),0 0 18px rgba(130,227,207,.2); color: #d9ebe7; text-align: center; transform: perspective(190px) rotateY(-8deg); transition: opacity .25s,transform .35s; }.door-keypad small,.door-keypad span,.door-keypad b { display: block; }.door-keypad small { color: var(--cyan); font: 6px/1 ui-monospace,monospace; letter-spacing: .16em; }.door-keypad span { margin: 5px 0 4px; padding: 3px 1px; background: rgba(130,227,207,.08); color: var(--cyan); font: 8px/1 ui-monospace,monospace; letter-spacing: .14em; }.door-keypad b { font-size: 7px; letter-spacing: .08em; }.feed.state-door-open .door-keypad { opacity: 0; transform: translateX(28px) perspective(190px) rotateY(-32deg); }
.object-label { position: absolute; z-index: 4; padding: 4px 7px 4px 9px; border: 1px solid rgba(130,227,207,.36); border-left: 2px solid var(--cyan); background: rgba(5,12,16,.84); box-shadow: 0 5px 14px rgba(0,0,0,.35); color: #d7e8e4; font: 600 9px/1 ui-monospace,"PingFang SC","Microsoft YaHei",sans-serif; letter-spacing: .08em; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 4px #000; }
.object-label::after { content: ""; position: absolute; width: 13px; height: 1px; top: 50%; right: -13px; background: rgba(130,227,207,.58); transform-origin: left center; }
.label-pipe-a { left: 4%; top: 10%; }.label-pipe-a::after { transform: rotate(28deg); }
.label-pipe-b { left: 25%; top: 23%; }.label-pipe-b::after { transform: rotate(32deg); }
.label-light { left: 49%; top: 12%; }.label-light::after { top: -13px; right: 50%; bottom: auto; width: 1px; height: 13px; }
.label-bed { left: 7%; bottom: 47%; }.label-bed::after { transform: rotate(28deg); }
.label-sheet { left: 37%; bottom: 43%; }.label-sheet::after { top: auto; right: 50%; bottom: -16px; width: 1px; height: 16px; }
.label-vent { right: 8%; top: 18%; }.label-vent::after { top: auto; right: 50%; bottom: -18px; width: 1px; height: 18px; }
.label-breaker { right: 17%; bottom: 52%; }.label-breaker::after { top: auto; right: 17px; bottom: -18px; width: 1px; height: 18px; }
.label-door { right: 2%; bottom: 66%; }.label-door::after { top: auto; right: 50%; bottom: -16px; width: 1px; height: 16px; }
.label-keypad { display: none; right: 9%; top: 36%; }.label-keypad::after { top: auto; right: 14px; bottom: -25px; width: 1px; height: 25px; transform: rotate(-12deg); }.feed.scene-live-start .label-keypad { display: block; }
.label-drain { left: 58%; bottom: 18%; }.label-drain::after { top: auto; right: 10px; bottom: -15px; width: 1px; height: 15px; transform: rotate(18deg); }
.label-cleaner { right: 27%; bottom: 27%; }.label-cleaner::after { top: auto; right: 50%; bottom: -14px; width: 1px; height: 14px; }
.feed.scene-live-start .door-keypad { display: none; }
.revealed-valve-prop { display: none; position: absolute; z-index: 3; left: 24%; bottom: 13%; width: clamp(48px,7.5%,78px); height: auto; opacity: .92; filter: sepia(.3) saturate(.72) brightness(.72) drop-shadow(0 7px 7px rgba(0,0,0,.75)); transform: perspective(260px) rotateX(58deg) rotateZ(-13deg); transform-origin: center; pointer-events: none; }.feed.state-valve-revealed .revealed-valve-prop { display: block; }.label-revealed-valve { display: none; left: 18%; bottom: 21%; }.label-revealed-valve::after { right: -25px; width: 25px; transform: rotate(31deg); }.feed.state-valve-revealed .label-revealed-valve { display: block; }
.iron-bed { position: absolute; z-index: 2; left: 10%; bottom: 18%; width: 49%; height: 29%; border: 6px solid #29343b; background: #0f171c; box-shadow: 18px 16px 35px rgba(0,0,0,.45); transition: left .65s,bottom .65s,width .65s; }.feed.state-bed-under-vent .iron-bed { left: 48%; bottom: 12%; width: 34%; }.iron-bed .mattress { position: absolute; inset: 0 0 36%; background: #5b6462; }.iron-bed .blanket { position: absolute; right: 4%; bottom: 28%; width: 47%; height: 48%; background: linear-gradient(135deg,#344245,#152025); transform: skewY(-6deg); }.iron-bed > i { position: absolute; bottom: -34%; width: 8px; height: 35%; background: #263237; }.iron-bed > i:first-of-type { left: 10%; }.iron-bed > i:last-of-type { right: 10%; }
.vent { position: absolute; z-index: 2; right: 11%; top: 24%; width: 15%; height: 18%; padding: 12px 14px; border: 1px solid rgba(192,216,211,.3); background: #10171b; box-shadow: inset 0 0 22px rgba(0,0,0,.75); transition: transform .45s ease,border-color .45s ease,box-shadow .45s ease; transform-origin: top left; }.vent i { display: block; height: 2px; margin: 8px 0; background: rgba(174,200,197,.45); }.feed.state-vent-open .vent { transform: perspective(220px) rotateY(-58deg); border-color: var(--cyan); box-shadow: 16px 3px 24px rgba(0,0,0,.55),inset 0 0 22px rgba(0,0,0,.75); }.breaker-box { position: absolute; z-index: 3; right: 19%; bottom: 40%; width: 42px; height: 54px; border: 2px solid #4a5657; background: #172024; box-shadow: 0 6px 14px rgba(0,0,0,.45); }.breaker-box i,.breaker-box span { position: absolute; left: 9px; right: 9px; height: 4px; background: #78817e; }.breaker-box i { top: 16px; }.breaker-box span { top: 31px; }.locked-door { position: absolute; z-index: 2; right: -3%; bottom: 0; width: 21%; height: 64%; border-left: 8px solid #202b31; background: linear-gradient(90deg,#182228,#0e1519); box-shadow: -14px 0 30px rgba(0,0,0,.35); transition: transform .55s ease,box-shadow .4s; }.locked-door span { position: absolute; left: 12%; top: 42%; width: 20%; height: 8%; border: 1px solid #59686a; }.locked-door i { position: absolute; left: 17%; top: 47%; width: 4px; height: 4%; border-radius: 50%; background: var(--amber); }.feed.state-door-open .locked-door { transform: translateX(72%); box-shadow: -25px 0 45px rgba(0,0,0,.72); }.feed.state-door-open .locked-door i { background: #334245; box-shadow: none; }.loose-brick { position: absolute; z-index: 2; left: 62%; bottom: 10%; width: 10%; height: 6%; border: 1px solid rgba(189,209,203,.5); transform: rotate(-9deg); }
.girl { position: absolute; z-index: 3; left: 48%; bottom: 15%; width: 11%; height: 35%; animation: breathe 4.5s ease-in-out infinite; transition: left .7s,opacity .5s,transform .5s; }.girl .head { position: absolute; left: 29%; top: 0; width: 44%; aspect-ratio: 1; border-radius: 50%; background: #101619; }.girl .body { position: absolute; left: 13%; top: 25%; width: 73%; height: 72%; border-radius: 45% 45% 10% 10%; background: linear-gradient(110deg,#2b3d3f,#0c161a); }.girl .arm { position: absolute; left: 2%; top: 42%; width: 18%; height: 48%; border-radius: 20px; background: #162427; transform: rotate(12deg); transform-origin: top; }
.floor-drain { position: absolute; z-index: 2; left: 62%; bottom: 10%; width: 10%; height: 6%; border: 2px solid rgba(119,145,142,.62); background: repeating-linear-gradient(90deg,#192326 0 6px,#53615f 7px 9px); transform: rotate(-7deg); }.cleaner-bottle { position: absolute; z-index: 3; right: 29%; bottom: 18%; width: 18px; height: 45px; border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg,#d4ddd8,#6baea4); box-shadow: 0 5px 10px rgba(0,0,0,.4); }.cleaner-bottle::before { content: ""; position: absolute; left: 5px; top: -8px; width: 8px; height: 9px; background: #e4e7df; }.breaker-key-prop { display: none; position: absolute; z-index: 3; left: 64%; bottom: 12%; width: 23px; height: 4px; background: #b8ab7d; transform: rotate(15deg); }.breaker-key-prop::after { content: ""; position: absolute; right: -7px; top: -4px; width: 12px; height: 12px; border: 3px solid #b8ab7d; border-radius: 50%; background: transparent; }.feed.state-key-drain .breaker-key-prop { display: block; }
.scanlines { z-index: 6; pointer-events: none; opacity: .07; background: repeating-linear-gradient(0deg,rgba(255,255,255,.24) 0 1px,transparent 1px 4px); animation: scan 8s linear infinite; }.vignette { z-index: 7; pointer-events: none; box-shadow: inset 0 0 95px rgba(0,0,0,.8); background: linear-gradient(180deg,rgba(0,0,0,.1),transparent 30%,rgba(0,0,0,.32)); }
.feed-topline, .feed-bottomline { position: absolute; z-index: 12; left: 18px; right: 18px; font: 9px ui-monospace,monospace; letter-spacing: .11em; }.feed-topline { top: 15px; justify-content: space-between; color: rgba(214,235,230,.6); }.feed-topline span:first-child { color: #f2a09a; }.rec-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px rgba(239,113,109,.8); }.feed-bottomline { bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }.feed-bottomline small { display: block; color: rgba(174,203,199,.52); }.feed-bottomline strong { display: block; max-width: 580px; margin-top: 7px; color: #dbe8e5; font: 13px/1.4 ui-sans-serif,system-ui; letter-spacing: 0; text-shadow: 0 2px 12px #000; }
.inventory-hud { position: absolute; z-index: 13; right: 18px; bottom: 69px; width: min(280px,40%); padding: 9px 10px 10px; border: 1px solid rgba(130,227,207,.3); background: rgba(5,12,16,.86); box-shadow: 0 10px 30px rgba(0,0,0,.38); backdrop-filter: blur(5px); }.inventory-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px solid rgba(173,205,210,.12); }.inventory-heading span { color: var(--cyan); font: 9px ui-monospace,monospace; letter-spacing: .14em; }.inventory-heading small { color: #70868a; font: 8px ui-monospace,monospace; }.inventory-slots { min-height: 37px; display: flex; gap: 7px; align-items: stretch; padding-top: 7px; }.inventory-empty { flex: 1; display: grid; place-items: center; border: 1px dashed rgba(173,205,210,.15); color: #65777d; font-size: 9px; }.inventory-item { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 7px; align-items: center; padding: 6px; border: 1px solid rgba(130,227,207,.22); background: rgba(130,227,207,.07); color: inherit; cursor: pointer; } .inventory-item:hover, .inventory-item:focus { border-color: rgba(130,227,207,.7); background: rgba(130,227,207,.16); }.inventory-icon { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(130,227,207,.36); background: radial-gradient(circle,rgba(130,227,207,.12),rgba(4,10,13,.72)); color: var(--cyan); font: 700 10px ui-monospace,monospace; }.inventory-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.7)); }.inventory-copy { min-width: 0; }.inventory-copy b,.inventory-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.inventory-copy b { color: #d7e4e1; font-size: 9px; }.inventory-copy small { margin-top: 3px; color: #6f8387; font-size: 7px; }
.item-acquired { position: absolute; z-index: 18; left: 50%; top: 70px; width: min(310px,calc(100% - 34px)); display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 13px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid rgba(130,227,207,.72); border-left: 3px solid var(--cyan); background: linear-gradient(110deg,rgba(5,13,17,.97),rgba(16,31,34,.94)); box-shadow: 0 16px 50px rgba(0,0,0,.62),0 0 28px rgba(130,227,207,.16); opacity: 0; transform: translate(-50%,-16px) scale(.96); transition: opacity .2s ease,transform .28s ease; pointer-events: none; }.item-acquired[hidden] { display: none; }.item-acquired.show { opacity: 1; transform: translate(-50%,0) scale(1); }.item-acquired-icon { width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(130,227,207,.34); background: radial-gradient(circle,rgba(130,227,207,.15),rgba(3,8,11,.9)); }.item-acquired-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0,0,0,.72)); }.item-acquired-copy,.item-acquired-copy small,.item-acquired-copy b,.item-acquired-copy em { display: block; min-width: 0; }.item-acquired-copy small { color: var(--cyan); font: 7px/1.2 ui-monospace,monospace; letter-spacing: .12em; }.item-acquired-copy b { margin-top: 7px; color: #ecf6f3; font-size: 16px; letter-spacing: .04em; }.item-acquired-copy em { margin-top: 5px; overflow: hidden; color: #84999c; font: normal 8px/1.45 ui-sans-serif,system-ui; text-overflow: ellipsis; white-space: nowrap; }
.barrage-layer { z-index: 11; pointer-events: none; overflow: hidden; }.barrage { position: absolute; right: -70%; max-width: 72%; padding: 5px 9px; border-left: 2px solid var(--cyan); background: rgba(4,10,13,.62); color: #e4eeeb; font-size: 12px; white-space: nowrap; text-shadow: 0 1px 4px #000; animation: barrageMove 8s linear forwards; }
.generation-overlay { position: absolute; z-index: 16; inset: 0; display: grid; place-items: end center; padding: 0 22px 72px; background: linear-gradient(0deg,rgba(4,10,13,.88),transparent 58%); }.generation-card { width: min(560px,100%); padding: 14px 16px; border: 1px solid rgba(130,227,207,.38); background: rgba(10,19,24,.92); box-shadow: 0 15px 45px rgba(0,0,0,.4); }.generation-card > div { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; }.generation-card b { font-size: 11px; font-weight: 600; }.generation-card em { color: var(--cyan); font: normal 10px ui-monospace,monospace; }.generation-card p { margin: 8px 0 11px; color: #82979a; font-size: 10px; }.spinner { width: 10px; height: 10px; border: 1px solid rgba(130,227,207,.28); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }.progress { display: block; height: 3px; background: rgba(130,227,207,.15); }.progress i { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 12px rgba(130,227,207,.7); }
.start-cover { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 25px; background: rgba(4,8,11,.64); backdrop-filter: blur(5px); }.start-panel { width: min(450px,100%); padding: 30px; border: 1px solid rgba(130,227,207,.3); background: linear-gradient(145deg,rgba(20,31,38,.96),rgba(9,14,19,.98)); box-shadow: 0 30px 90px rgba(0,0,0,.5); }.start-panel h2 { margin: 14px 0 9px; font-size: 27px; line-height: 1.08; letter-spacing: -.05em; font-weight: 520; }.start-panel p { margin: 0 0 23px; color: #91a3a7; font-size: 12px; line-height: 1.6; }
.primary-button, .chat-form button { border: 0; cursor: pointer; background: var(--cyan); color: #071311; font-weight: 700; transition: transform .2s,background .2s; }.primary-button { width: 100%; display: flex; justify-content: space-between; padding: 13px 14px; font-size: 12px; }.primary-button:hover, .chat-form button:hover:not(:disabled) { transform: translateY(-2px); background: #a8f1e3; }
.feed-status-row { min-height: 62px; justify-content: space-between; gap: 20px; padding: 12px 15px; border: 1px solid var(--line); border-top: 0; background: rgba(16,24,32,.84); }.feed-status-row > span:first-child b, .feed-status-row > span:first-child small { display: block; }.feed-status-row b { font-size: 11px; font-weight: 600; }.feed-status-row small { margin-top: 5px; color: #71858a; font-size: 9px; }.queue-state { gap: 8px; color: var(--cyan); white-space: nowrap; }.queue-state.busy i { background: var(--amber); box-shadow: 0 0 12px rgba(240,186,112,.7); }.queue-state.busy b { color: var(--amber); }
.chat-column { display: flex; flex-direction: column; gap: 12px; padding-top: 38px; }.chat-card, .memory-card { border: 1px solid var(--line); background: linear-gradient(145deg,rgba(19,28,37,.96),rgba(11,16,22,.98)); box-shadow: var(--shadow); }.chat-card { min-height: 470px; display: flex; flex-direction: column; }.card-title { min-height: 67px; justify-content: space-between; gap: 15px; padding: 15px 17px; border-bottom: 1px solid var(--line); }.card-title strong { display: block; margin-top: 6px; font-size: 12px; }.card-title > span { color: #6f8288; font: 9px ui-monospace,monospace; }.chat-log { height: 286px; flex: 1; overflow: auto; padding: 12px 15px; }.chat-log::-webkit-scrollbar { width: 3px; }.chat-log::-webkit-scrollbar-thumb { background: rgba(130,227,207,.3); }.chat-empty { padding: 14px 5px; color: #62747b; font-size: 11px; line-height: 1.7; }.chat-message { display: grid; grid-template-columns: 50px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(173,205,210,.07); font-size: 11px; line-height: 1.5; }.chat-message span { color: var(--cyan); font: 9px ui-monospace,monospace; padding-top: 2px; }.chat-message p { margin: 0; color: #cdd9d6; }.chat-message.system p { color: #87999e; }.chat-message.warning span, .chat-message.warning p { color: var(--amber); }.chat-message.rejected span, .chat-message.rejected p { color: var(--red); }
.chat-form { padding: 12px; border-top: 1px solid var(--line); }.chat-form textarea { width: 100%; resize: none; outline: 0; padding: 11px; border: 1px solid rgba(173,205,210,.16); background: rgba(3,7,10,.38); color: var(--text); font-size: 11px; line-height: 1.5; }.chat-form textarea:focus { border-color: rgba(130,227,207,.5); box-shadow: 0 0 0 2px rgba(130,227,207,.05); }.chat-form textarea:disabled { opacity: .45; }.chat-form > div { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }.chat-form small { color: #65777d; font: 9px ui-monospace,monospace; }.chat-form button { padding: 9px 12px; font-size: 10px; }.chat-form button:disabled { opacity: .35; cursor: not-allowed; }
.world-facts { padding: 13px 17px 6px; }.world-facts p { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin: 0; padding: 7px 0; border-bottom: 1px solid rgba(173,205,210,.07); }.world-facts span { color: #677a81; font-size: 9px; }.world-facts b { color: #bdcbc8; font-size: 10px; font-weight: 500; line-height: 1.45; }.rule-legend { padding: 8px 17px 14px; }.rule-legend p { display: grid; grid-template-columns: 8px 1fr; gap: 9px; align-items: start; margin: 8px 0; }.rule-legend i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; }.rule-pass { background: var(--cyan); }.rule-warn { background: var(--amber); }.rule-stop { background: var(--red); }.rule-legend span, .rule-legend b { display: block; }.rule-legend b { color: #bac9c6; font-size: 10px; font-weight: 600; }.rule-legend span { color: #71848a; font-size: 9px; line-height: 1.5; }
.memory-list { min-height: 140px; max-height: 270px; overflow-y: auto; padding: 8px 17px 14px; }.memory-list::-webkit-scrollbar { width: 3px; }.memory-list::-webkit-scrollbar-thumb { background: rgba(130,227,207,.3); }.memory-empty { display: block; margin-top: 5px; padding: 8px 9px; border: 1px solid rgba(130,227,207,.14); color: #71868a; font-size: 9px; line-height: 1.5; }.memory-step { position: relative; display: grid; min-height: 52px; grid-template-columns: 37px minmax(0,1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(173,205,210,.08); }.memory-step:last-child { border-bottom: 0; }.memory-step::before { content: ""; position: absolute; left: 31px; top: 0; bottom: 0; width: 1px; background: rgba(130,227,207,.13); }.memory-step-index { position: relative; z-index: 1; align-self: start; padding: 4px 3px; border: 1px solid rgba(130,227,207,.25); background: #101920; color: var(--cyan); font: 8px/1 ui-monospace,monospace; text-align: center; }.memory-step-copy { min-width: 0; }.memory-step-copy b { display: block; color: #d3dfdc; font-size: 10px; font-weight: 600; line-height: 1.35; }.memory-step-copy small { display: block; margin-top: 4px; color: #71858a; font-size: 9px; line-height: 1.5; }.memory-step.progress .memory-step-index { background: var(--cyan-dim); }.memory-step.warning .memory-step-index { border-color: rgba(240,186,112,.42); color: var(--amber); background: rgba(240,186,112,.08); }.memory-step.warning .memory-step-copy b { color: #dfbd8c; }.memory-step.success .memory-step-index { border-color: rgba(130,227,207,.7); background: var(--cyan); color: #071311; box-shadow: 0 0 15px rgba(130,227,207,.22); }.memory-step.success .memory-step-copy b { color: var(--cyan); }
.feed.event-search .girl { transform: translate(-30px,8px) rotate(-6deg); }.feed.event-hide .girl { left: 26%; opacity: .45; }.feed.event-door .locked-door { box-shadow: -14px 0 34px rgba(240,186,112,.18); }.feed.event-vent .vent { border-color: var(--cyan); box-shadow: 0 0 25px rgba(130,227,207,.12),inset 0 0 22px rgba(0,0,0,.75); }.feed.event-pipe .water-valve { border-color: #7fcbd5; box-shadow: 0 0 20px rgba(121,205,220,.28); }.feed.event-electric .breaker-box { border-color: var(--amber); box-shadow: 0 0 20px rgba(240,186,112,.2); }.feed.event-fire .idle-feed { filter: sepia(.5) contrast(1.15); }.fire-effect { position: absolute; z-index: 5; inset: auto 22% 0 22%; height: 55%; opacity: 0; pointer-events: none; transition: opacity .4s; }.fire-effect i { position: absolute; bottom: -5%; width: 28%; height: 55%; border-radius: 50% 50% 20% 20%; background: radial-gradient(ellipse at bottom,#ffdd78,#ef6a3d 47%,transparent 72%); filter: blur(4px); animation: flame .55s ease-in-out infinite alternate; }.fire-effect i:nth-child(2) { left: 33%; height: 80%; animation-delay: -.2s; }.fire-effect i:nth-child(3) { right: 0; height: 62%; animation-delay: -.35s; }.feed.event-fire .fire-effect { opacity: .9; }
.scene-photo { transition: opacity .28s ease,filter .45s ease; }
.feed.state-breaker-open .breaker-box { border-color: var(--cyan); box-shadow: inset 7px 0 12px rgba(0,0,0,.55); }
.stub-a { border-style: double; opacity: .4; }
.feed.wheel-on-a .water-valve { display: none; }
.inventory-slots { flex-wrap: wrap; }
.inventory-item { flex: 1 1 calc(50% - 4px); }
.ending-screen { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 25px; background: rgba(3,6,9,.84); backdrop-filter: blur(12px); }.ending-panel { width: min(520px,100%); padding: 33px; border: 1px solid rgba(239,113,109,.42); background: linear-gradient(150deg,#17232a,#0a1015 75%); box-shadow: 0 35px 110px rgba(0,0,0,.58); }.ending-panel h2 { margin: 14px 0 10px; font-size: 30px; letter-spacing: -.055em; font-weight: 520; }.ending-panel p { color: #96a7aa; font-size: 12px; line-height: 1.7; }.ending-trace { margin: 20px 0; padding: 11px 12px; border-left: 2px solid var(--red); background: rgba(239,113,109,.06); color: #aebbb9; font-size: 10px; line-height: 1.6; }.toast { position: fixed; z-index: 60; left: 50%; bottom: 22px; max-width: min(500px,calc(100% - 30px)); padding: 10px 13px; border: 1px solid rgba(130,227,207,.35); background: rgba(9,18,22,.96); color: #dce8e5; font-size: 10px; transform: translate(-50%,22px); opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; }.toast.show { opacity: 1; transform: translate(-50%,0); }
@keyframes breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } } @keyframes scan { to { transform: translateY(8px); } } @keyframes spin { to { transform: rotate(360deg); } } @keyframes dangerPulse { 50% { text-shadow: 0 0 17px rgba(239,113,109,.7); } } @keyframes barrageMove { from { transform: translateX(0); } to { transform: translateX(-180vw); } } @keyframes flame { to { transform: translateY(-8px) scaleX(.84); } }
@media (max-width: 1050px) { .main-grid { grid-template-columns: 1fr; }.chat-column { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; }.chat-card { grid-row: span 2; }.feed { min-height: 420px; } }
@media (max-width: 700px) { .app-shell { width: min(100% - 22px,1440px); }.topbar { height: 58px; }.mode-chip { display: none; }.main-grid { padding-top: 12px; }.section-heading { min-height: 24px; }.feed { min-height: 390px; aspect-ratio: 4/3; }.feed-topline span:nth-child(2) { display: none; }.inventory-hud { left: 14px; right: 14px; bottom: 74px; width: auto; }.inventory-slots { min-height: 34px; }.item-acquired { top: 54px; grid-template-columns: 58px minmax(0,1fr); }.item-acquired-icon { width: 58px; height: 58px; }.feed-bottomline strong { max-width: 100%; font-size: 11px; }.chat-column { display: flex; }.chat-card { min-height: 430px; }.start-panel { padding: 23px; }.start-panel h2 { font-size: 24px; }.barrage { max-width: 90%; }.object-label { padding: 3px 5px 3px 7px; font-size: 8px; letter-spacing: .03em; }.ending-panel { padding: 25px; } }

/* ── H5 移动端适配层 ─────────────────────────────────────────────────────────
   与参考交付包（万象大会 / 纸外）的验收口径对齐：窄屏单列、禁止水平溢出、
   dynamic viewport、安全区、触控热区 44×44。

   实测根因：.feed 同时设了 min-height 与 aspect-ratio，容器比 min-height 推算
   出的宽度更窄时，盒子会反向把自己撑宽（390px × 4/3 = 520px），在 375px 的
   视口里外溢 156px，并连带把它内部的开场面板一起顶出屏幕。
   因此窄屏下让宽度说了算，高度由比例推出，不再给 min-height。           */

@media (max-width: 700px) {
  /* 宽度优先：由容器宽度决定，高度按比例推出 */
  .feed { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
  .chat-card { min-height: 0; }
  .broadcast-column, .chat-column, .main-grid { min-width: 0; }

  /* 安全区：刘海与底部横条 */
  .app-shell {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* 触控热区不小于 44×44 */
  button, .btn, input[type="text"], input[type="submit"], textarea, [role="button"] {
    min-height: 44px;
  }
  .start-panel button, .start-panel .btn { min-height: 48px; }
}

/* 任何宽度下都不允许整页横向滚动 */
html, body { max-width: 100%; overflow-x: hidden; }
/* 长中文与连续英文都要能断行，不得把父容器撑开 */
.feed-bottomline strong, .barrage, .card-title, .start-panel h2, .start-panel p { overflow-wrap: anywhere; }

/* 手机横屏：竖向空间很少，压缩非必要留白 */
@media (max-height: 460px) and (orientation: landscape) {
  .topbar { height: 44px; }
  .main-grid { padding-top: 8px; }
  .section-heading { min-height: 20px; margin-bottom: 6px; }
}

/* 窄屏下 16:9 的画面框只有约 210px 高，装不下开场面板与结局面板，
   而 .feed 是 overflow:hidden，会把按钮直接切掉。让这两层覆盖面板自身可滚动，
   并收紧内边距，保证操作按钮在任何机型上都够得着。 */
@media (max-width: 700px) {
  .start-cover, .ending-cover { overflow-y: auto; padding: 12px; align-items: start; }
  .start-panel, .ending-panel { padding: 16px; margin: auto 0; }
  .start-panel h2 { font-size: 19px; margin: 8px 0 6px; }
  .start-panel p { margin: 0 0 14px; font-size: 11px; }
}

/* 物体标注开关。标注只是试玩辨认用的网页层叠加，不属于世界画面。 */
.label-toggle { padding: 6px 10px; border: 1px solid rgba(130,227,207,.34); background: rgba(9,20,26,.7); color: var(--cyan); font: 600 10px/1 var(--mono, ui-monospace, monospace); letter-spacing: .08em; cursor: pointer; }
.label-toggle.off { border-color: rgba(150,170,175,.26); color: #7d8c90; background: rgba(9,14,18,.6); }
.feed.labels-off .object-label { display: none; }

/* 真实生成模式的顶栏标识：与演示模式区分开 */
.mode-chip.live { border-color: rgba(130,227,207,.34); color: var(--cyan); background: rgba(9,20,26,.7); }

/* Reviewed anchors already contain the room props; do not draw duplicates. */
/* V2 wall patch sits between the pipe outlet and the woman, not on her body. */
.password-overlay { left: 47%; top: 34%; }
.idle-feed.photo-mode .water-valve,
.idle-feed.photo-mode .water-leak,
.idle-feed.photo-mode .breaker-key-prop,
.idle-feed.photo-mode .door-keypad { display: none; }
.scene-photo-status { margin: 0; padding: 10px 14px; color: var(--amber); font-size: 11px; line-height: 1.5; }
.resume-task-button { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid rgba(240,186,112,.4); background: #182124; color: var(--amber); cursor: pointer; }
.resume-task-button:disabled { cursor: default; }
.feed-status-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.brand { min-width: 0; }
.brand strong { letter-spacing: .04em; }
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 64px; padding: 10px 0; }
  .brand strong { font-size: 12px; }
  .brand small { font-size: 9px; letter-spacing: 0; }
  .top-status { flex-shrink: 0; gap: 6px; }
  .feed-status-row { flex-wrap: wrap; gap: 10px; }
  .inventory-hud { max-height: calc(100% - 100px); overflow-y: auto; }
  .inventory-item { min-height: 44px; }
  .generation-overlay { padding: 8px; place-items: center; }
  .generation-card { max-height: 100%; overflow-y: auto; }
  .ending-screen { overflow-y: auto; align-items: start; padding: 12px; }
  .ending-panel { margin: auto 0; }
}

/* In-world clue is permanent, unlike optional playtest labels. Keep raw video text-free. */
.brick-hint-overlay { position:absolute; z-index:6; left:56%; top:80%; width:17%; color:#c6c3aa; font:700 clamp(8px,1.25vw,18px)/1.25 serif; text-align:center; letter-spacing:.08em; transform:perspective(400px) rotateX(40deg) rotateZ(-10deg); transform-origin:center; text-shadow:0 1px 2px #111; pointer-events:none; }
.brick-hint-overlay span { display:block; white-space:nowrap; }
.brick-hint-overlay[hidden], .feed:has(.standby-video.visible) .brick-hint-overlay { display:none; }

/* Inventory is a normal-flow sibling BELOW the feed, never a video overlay. */
.inventory-hud { position:relative; z-index:auto; inset:auto; width:100%; max-height:none; padding:10px 14px; background:#0d171c; box-shadow:none; backdrop-filter:none; }
.inventory-slots { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.inventory-empty { grid-column:1/-1; min-height:32px; }
.inventory-item { min-height:48px; }
.inventory-hud .item-acquired { position:static; width:100%; margin:8px 0 0; transform:none; grid-template-columns:32px minmax(0,1fr); padding:6px; box-shadow:none; }
.inventory-hud .item-acquired-icon { width:32px; height:32px; }
.inventory-hud .item-acquired-copy em { display:none; }
.inventory-hud .item-acquired-copy b { font-size:12px; }
.inventory-hud .item-acquired[hidden] { display:none; }
@media(max-width:700px) {
  .feed { aspect-ratio:16/9; min-height:0; }
  .inventory-hud { inset:auto; width:100%; padding:8px; max-height:none; overflow:visible; }
  .inventory-slots { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .inventory-item { grid-template-columns:26px minmax(0,1fr); gap:6px; padding:6px; min-height:44px; }
  .inventory-icon { width:26px; height:26px; }
  .inventory-copy small { display:block; font-size:8px; }
  .feed-bottomline { left:10px; right:10px; bottom:8px; }
  .feed-bottomline strong { font-size:9px; }
}

/* v39: signal disturbances are baked into the waiting clip; no extra dark tint. */
.standby-video { filter:none; }

/* v3.15: persistent in-world clue above action video/held tail, not inside idleFeed.
   Fixed initial-state waiting footage must not display a later-state password. */
#passwordOverlay { z-index:6; }
#passwordOverlay[hidden], .feed:has(.standby-video.visible) #passwordOverlay { display:none; }

/* 3.17: input/progress belong to the video column; chat growth scrolls locally. */
.broadcast-column > .chat-form { border:1px solid var(--line); background:#101920; }
.broadcast-column > .chat-form textarea { min-height:64px; font-size:14px; }
.chat-column { align-self:start; min-height:0; }
.chat-card { height:min(72vh,760px); min-height:0; overflow:hidden; }
.chat-log { height:0; min-height:0; flex:1 1 0; overflow-y:auto; overflow-wrap:anywhere; }
.broadcast-column .memory-list { max-height:220px; min-height:60px; }
.clip-source { margin:0; padding:8px 12px; color:var(--cyan); font-size:11px; }
@media(max-width:1050px) { .chat-column { display:block; } .chat-card { height:320px; } }

/* 3.18: optional assistance and restart confirmation stay below the picture. */
.player-help { border:1px solid var(--line); border-left:3px solid var(--cyan); padding:12px 16px; background:#101920; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.player-help[hidden] { display:none; }
.player-help p { margin:0 0 8px; }
.player-help button { background:transparent; color:var(--cyan); border:1px solid var(--line); padding:8px 12px; margin:2px 8px 2px 0; cursor:pointer; }
#hintExample { color:var(--cyan); }
.feed-bottomline { inset:0; display:grid; place-items:center; pointer-events:none; text-align:center; padding:15%; }
.feed-bottomline > div { width:100%; }
.feed-bottomline strong { max-width:none; margin:0; font-size:clamp(23px,3.2vw,46px); line-height:1.4; font-weight:750; text-shadow:0 2px 5px #000,0 0 14px #000; }
.feed-bottomline small { position:absolute; left:12px; bottom:10px; font-size:9px; }
.inventory-hud { display:block; position:relative; inset:auto; width:100%; min-height:76px; flex-shrink:0; }
.inventory-heading span { font-size:13px; }
.inventory-heading small { font-size:12px; }
.inventory-copy b { font-size:14px; }
.inventory-copy small, .inventory-empty { font-size:12px; }
.inventory-item { grid-template-columns:38px minmax(0,1fr); }
.inventory-icon { width:38px; height:38px; }
/* Waiting and reaction captions share the central subtitle, not a second tiny caption. */
.generation-overlay { pointer-events:none; background:none; padding:10px; }
.generation-card { width:100%; padding:8px; box-shadow:none; background:rgba(10,19,24,.65); }
.generation-card p { display:none; }
#newGameButton:disabled, .player-help button:disabled { opacity:.5; cursor:wait; }
@media(max-width:700px) { .topbar { flex-wrap:wrap; gap:8px; } .top-status { flex-wrap:wrap; } }

/* 3.21: the live viewport owns the available height, not the length of chat.
   Reserve the inventory and composer rows; only history/details may scroll. */
html, body { height:100%; min-height:0; overflow:hidden; }
.app-shell { height:100vh; height:var(--app-height,100dvh); display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom,0px); }
.topbar { height:52px; min-height:52px; flex:none; }
.main-grid { flex:1; min-height:0; padding:10px 0; gap:16px; overflow:hidden; }
.broadcast-column { min-height:0; min-width:0; display:flex; flex-direction:column; container-type:inline-size; }
.section-heading { flex:0 0 22px; min-height:0; margin:0; }
.video-slot { position:relative; container-type:size; flex:1 1 56.25cqw; max-height:56.25cqw; min-width:0; min-height:0; background:#05090c; }
.video-slot .feed { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(100cqw,calc(100cqh * 16 / 9)); height:min(100cqh,calc(100cqw * 9 / 16)); min-height:0; aspect-ratio:16/9; }
.inventory-hud { min-height:58px; height:58px; padding:5px 8px; display:flex; gap:8px; align-items:center; overflow:visible; }
.inventory-heading { flex:none; display:grid; gap:2px; border:0; padding:0; }
.inventory-heading span { font-size:11px; }
.inventory-heading small { font-size:10px; }
.inventory-slots { flex:1; min-width:0; min-height:44px; padding:0; display:flex; flex-wrap:nowrap; overflow-x:auto; gap:5px; }
.inventory-item { flex:0 0 auto; min-height:44px; grid-template-columns:30px minmax(0,1fr); padding:4px 6px; gap:5px; }
.inventory-icon { width:30px; height:30px; }
.inventory-copy b { font-size:12px; }
.inventory-copy small { display:none; }
.inventory-empty { flex:1; min-width:0; font-size:11px; padding:3px 6px; }
.inventory-hud .item-acquired { position:absolute; z-index:15; bottom:calc(100% + 6px); left:8px; width:min(260px,calc(100% - 16px)); margin:0; background:#10201f; pointer-events:none; }
.broadcast-column > .chat-form { flex:none; display:flex; align-items:center; gap:8px; padding:6px 8px; }
.broadcast-column > .chat-form textarea { flex:1; min-width:0; min-height:48px; height:48px; padding:7px; font-size:16px; }
.chat-form > div { flex:none; display:flex; flex-direction:column-reverse; gap:2px; margin:0; }
.chat-form button { min-height:44px; padding:8px 12px; font-size:12px; }
.chat-form small { display:none; }
.broadcast-details { flex:1 1 100px; min-height:0; overflow-y:auto; overscroll-behavior:contain; border:1px solid var(--line); }
.broadcast-details .feed-status-row { min-height:36px; padding:5px 8px; gap:8px; }
.broadcast-details .clip-source { padding:4px 8px; }
.broadcast-details .memory-card { margin:0; }
.broadcast-details .card-title { padding:8px; }
.broadcast-details .memory-list { min-height:0; max-height:none; }
.chat-column { align-self:stretch; padding-top:22px; min-height:0; display:flex; }
.chat-card { height:100%; min-height:0; width:100%; }
@media(max-width:1050px) {
  .main-grid { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,20%); gap:8px; }
  .chat-column { padding:0; }
  .chat-card { height:100%; }
  .chat-card .card-title { padding:6px 10px; }
  .chat-card .card-title .eyebrow { display:none; }
  .chat-log { padding:6px 10px; }
  .section-heading { flex-basis:18px; }
  .broadcast-details { flex-basis:65px; }
}
@media(max-width:700px) {
  .app-shell { width:calc(100% - 12px); }
  .topbar { min-height:46px; height:46px; padding:3px 0; flex-wrap:nowrap; }
  .brand small { display:none; }
  .top-status { gap:4px; flex-wrap:nowrap; }
  #newGameButton { display:inline-block; padding:5px; font-size:10px; }
  .brand strong { font-size:11px; }
  .main-grid { padding:5px 0; }
  .inventory-hud { height:56px; min-height:56px; padding:4px; }
  .feed-bottomline { padding:10%; }
  .feed-bottomline strong { font-size:clamp(18px,5vw,26px); }
}
@media(max-height:500px) and (min-width:701px) {
  .topbar { height:38px; min-height:38px; }
  .main-grid { grid-template-columns:minmax(0,1fr) minmax(200px,.4fr); grid-template-rows:minmax(0,1fr); padding:4px 0; }
  .section-heading { flex-basis:0; overflow:hidden; }
  .broadcast-details { flex-basis:28px; }
  .chat-column { padding:0; }
}

/* 3.22: one-line bottom captions, with the inventory above their safe area. */
.feed-bottomline { inset:auto 12px 12px; z-index:14; display:block; padding:0; text-align:center; pointer-events:none; }
.feed-bottomline > div { width:100%; min-width:0; }
.feed-bottomline strong { display:inline-block; width:auto; max-width:100%; padding:7px 12px; border-radius:6px; background:rgba(3,8,12,.68); color:#f4f6f5; font-size:clamp(18px,2.25vw,30px); font-weight:650; line-height:1.35; white-space:nowrap; overflow:hidden; overflow-wrap:normal; vertical-align:bottom; text-shadow:0 1px 3px #000; }
.feed-bottomline strong[data-kind="dialogue"] { color:#9ef0df; background:rgba(4,26,25,.72); }
.feed-bottomline small { display:none; }
.feed > .inventory-hud { position:absolute; z-index:13; left:auto; top:auto; right:10px; bottom:70px; width:48px; height:auto; min-height:0; max-height:calc(100% - 110px); padding:0; display:block; border:0; background:none; box-shadow:none; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; }
.inventory-hud .inventory-heading, .inventory-hud .inventory-copy { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.inventory-hud .inventory-slots { display:flex; flex-direction:column; flex-wrap:nowrap; gap:6px; width:100%; min-height:0; padding:0; overflow:visible; }
.inventory-hud .inventory-item { flex:0 0 48px; display:grid; place-items:center; width:48px; height:48px; min-height:48px; padding:5px; margin:0; border:1px solid rgba(130,227,207,.55); background:rgba(5,15,19,.78); border-radius:5px; }
.inventory-hud .inventory-icon { width:36px; height:36px; border:0; background:none; }
.inventory-hud .inventory-empty { flex:0 0 48px; width:48px; height:48px; min-height:48px; padding:0; font-size:0; background:rgba(5,15,19,.6); border-radius:5px; }
.inventory-hud .inventory-empty::before { content:"◇"; font-size:24px; color:#7a918c; }
.feed > .item-acquired { position:absolute; z-index:14; top:auto; bottom:74px; left:auto; right:70px; width:min(240px,calc(100% - 86px)); margin:0; transform:none; padding:7px; grid-template-columns:32px minmax(0,1fr); background:rgba(5,18,21,.88); }
.feed > .item-acquired .item-acquired-icon { width:32px; height:32px; }
.feed > .item-acquired .item-acquired-copy em { display:none; }
.feed > .item-acquired .item-acquired-copy b { font-size:13px; }
/* Names are UI-only fixed-camera targets. Higher UI layers remain interactive. */
.scene-hotspots { position:absolute; inset:0; z-index:10; pointer-events:none; }
.scene-hotspot { position:absolute; display:block; min-width:0; min-height:0; margin:0; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:transparent; pointer-events:auto; cursor:help; touch-action:manipulation; }
.scene-hotspot:focus-visible { outline:2px solid #9ef0df; outline-offset:1px; background:rgba(130,227,207,.08); }
@media(hover:hover) { .scene-hotspot:hover { border-color:rgba(158,240,223,.55); background:rgba(130,227,207,.06); } }
.scene-object-name { position:absolute; top:42px; left:50%; transform:translateX(-50%); z-index:15; max-width:calc(100% - 24px); padding:6px 12px; border:1px solid rgba(158,240,223,.4); border-radius:5px; background:rgba(3,15,18,.86); color:#dffff7; font-size:16px; line-height:1.3; white-space:nowrap; pointer-events:none; }
@media(max-width:700px) { .scene-object-name { top:28px; padding:4px 8px; font-size:14px; } }
/* Loading status stays above the caption, never covering its semi-transparent strip. */
/* Player presentation: diagnostics remain in CaptiveDebug, not the live feed. */
#modeFeedback, #eventDetail, #clipSource, #scenePhotoStatus, #sceneCode, #modeChip,
.feed-status-row { display:none !important; }
.signal-interference { display:none; position:absolute; inset:0; z-index:6; pointer-events:none; opacity:0; }
.signal-active .signal-interference { display:block; background:repeating-linear-gradient(0deg,rgba(190,200,200,.3) 0 1px,transparent 1px 5px),linear-gradient(172deg,transparent 36%,rgba(20,25,25,.7) 37% 43%,transparent 44%); animation:signal-tear 3.8s steps(1,end) infinite; }
.signal-active .standby-video.visible { animation:signal-dim 3.8s steps(1,end) infinite; }
@keyframes signal-tear { 0%,28%,48%,75%,100%{opacity:.03;transform:none} 32%{opacity:.62;transform:translateX(5px)} 39%{opacity:.2;transform:translateX(-4px)} 80%{opacity:.5;transform:translateY(7px)} 89%{opacity:.08;transform:none} }
@keyframes signal-dim { 0%,28%,48%,75%,100%{filter:none} 32%{filter:brightness(.38) grayscale(.6)} 39%{filter:brightness(.82)} 80%{filter:brightness(.5) grayscale(.4)} 89%{filter:brightness(.9)} }
@media(prefers-reduced-motion:reduce) { .signal-active .signal-interference { animation:none;opacity:.1; } .signal-active .standby-video.visible { animation:none; } }
.generation-overlay { place-items:start center; padding-top:30px; }
.generation-card { max-width:80%; }
.generation-card p { display:block; font-size:12px; margin:7px 0; color:#c0d5d1; }
.generation-card b { font-size:14px; }
.generation-card em { font-size:12px; white-space:nowrap; }
.generation-card .progress { display:block; height:6px; border-radius:3px; overflow:hidden; }
.generation-card .progress i { transition:width .3s ease; background:linear-gradient(90deg,#4a9e90,#a9ffed); }
.input-feedback { flex:0 0 auto; margin:0; padding:4px 10px; font-size:12px; line-height:1.5; color:#9bdccc; background:#0c191c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:700px) {
  .feed-bottomline { inset:auto 8px 8px; }
  .feed-bottomline strong { padding:5px 10px; font-size:18px; }
  .feed > .inventory-hud { right:7px; bottom:52px; width:44px; max-height:calc(100% - 86px); }
  .inventory-hud .inventory-item, .inventory-hud .inventory-empty { width:44px; height:44px; min-height:44px; flex-basis:44px; }
  .inventory-hud .inventory-icon { width:32px; height:32px; }
  .feed > .item-acquired { bottom:56px; right:59px; }
}
