:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0c1421; color: #e9edf4; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 90% 10%, #203a57 0, #0c1421 48%); min-height: 100vh; }
.layout { max-width: 1120px; margin: auto; padding: 32px 24px 80px; }
.header { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.emblem { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #7e94b1; border-radius: 14px; font-size: 25px; }
.header h1 { margin: 0; font-size: 23px; }
.eyebrow, label, .name-caption { color: #a4b7d0; font-size: 13px; letter-spacing: .04em; }
.status { margin-left: auto; border: 1px solid #52647d; border-radius: 30px; padding: 7px 11px; font-size: 12px; color: #cfdbec; }
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 350px; overflow: hidden; border: 1px solid #36506b; border-radius: 18px; background: #152339; }
.hero-content { padding: 38px; align-self: center; }
.hero h2 { font-size: clamp(28px, 4vw, 52px); line-height: 1.1; margin: 15px 0; }
.hero-content p:not(.eyebrow) { color: #becbe0; line-height: 1.6; }
select { width: 100%; max-width: 280px; margin: 10px 0 30px; padding: 12px; background: #172941; color: #f5f7fb; border: 1px solid #647d9c; border-radius: 9px; font: inherit; }
.scene-panel { position: relative; overflow: hidden; background: radial-gradient(ellipse at center, #30577c 0%, #122038 55%, #0c1729 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 36px; }
.scene-panel p { font-size: 23px; margin: 0 0 8px; }
.scene-panel small { color: #b9c9db; max-width: 320px; line-height: 1.4; }
.scene-orbit { position: absolute; width: 290px; height: 290px; top: 0; right: -15px; border: 2px solid #6f92bb; border-radius: 50%; box-shadow: 0 0 0 30px #405c7920, 0 0 0 65px #52749a15; transform: rotate(-28deg) scaleY(.7); pointer-events: none; }
.names-section { margin-top: 34px; }
.names-section h3 { font-size: 20px; }
.names-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.name-card { display: flex; flex-direction: column; gap: 9px; padding: 20px; background: #17253a; border: 1px solid #334b68; border-radius: 12px; overflow-wrap: anywhere; }
.name-card strong { font-size: 19px; }
.footnote { margin-top: 25px; color: #9fafc4; font-size: 13px; }
@media (max-width: 740px) { .layout { padding: 20px 14px; } .hero { grid-template-columns: 1fr; } .hero-content { padding: 25px; } .scene-panel { min-height: 240px; padding: 25px; } .status { font-size: 10px; } }

.play-area { margin-top: 32px; border: 1px solid #375a75; border-radius: 18px; padding: 26px; background: #14243a; }
.play-area h3 { font-size: 24px; margin: 0 0 12px; }
.play-area h4 { margin: 24px 0 12px; }
.play-disclaimer { color: #b7c7de; line-height: 1.5; }
.play-area input, .play-area textarea { display: block; width: 100%; max-width: 720px; border-radius: 8px; border: 1px solid #6e88a8; background: #0b192c; color: #fff; padding: 12px; margin: 10px 0; font: inherit; }
.play-area button { background: #2d6087; color: #fff; border: 1px solid #8bb5ce; padding: 11px 17px; border-radius: 9px; cursor: pointer; font: inherit; margin-right: 10px; }
.play-area a { display: inline-block; color: #e9edf4; border: 1px solid #8bb5ce; background: #2d6087; border-radius: 9px; padding: 11px 17px; text-decoration: none; }
.play-area button:disabled { opacity: .6; cursor: wait; }
.play-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; }
#play-log { padding: 12px 0; color: #dce5f2; }
#play-log p { border-left: 3px solid #6287a5; padding: 10px 14px; background: #122033; }
.character-roll-row { display: grid; grid-template-columns: minmax(0,1fr) 190px; align-items: start; gap: 14px; margin-top: 18px; }
#active-character-panel { min-width: 0; padding: 0 14px 12px 0; }
.dice-roll-window { position: sticky; top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border: 1px solid #c69b54; border-radius: 14px; color: #fff0ca; background: linear-gradient(145deg,#43351f,#1b2430 72%); box-shadow: 0 12px 35px #0006; text-align: center; }
.dice-roll-window h4 { margin: 0; color: #f2d291; }
.dice-roll-window p { margin: 0; min-height: 2.8em; color: #ded4c2; font-size: 13px; line-height: 1.4; }
.die-gem { width: 78px; height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; clip-path: polygon(50% 0%,88% 12%,100% 44%,83% 86%,50% 100%,17% 86%,0% 44%,12% 12%); border: 2px solid #edce8a; background: linear-gradient(145deg,#e0b45f,#78552c 70%); color: #17140f; filter: drop-shadow(0 5px 5px #0008); }
.die-gem small { font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.die-gem span { font-size: 31px; font-weight: 850; line-height: 1; }
.dice-roll-window.is-rolling .die-gem { animation: d10-result 650ms cubic-bezier(.16,.72,.28,1); }
@keyframes d10-result { 0% { transform: rotate(-40deg) scale(.7); filter: brightness(1.5) drop-shadow(0 0 12px #ffd985); } 70% { transform: rotate(15deg) scale(1.12); } 100% { transform: rotate(0) scale(1); } }
@media (max-width: 740px) { .character-roll-row { grid-template-columns: 1fr; } .dice-roll-window { position: static; max-width: 260px; } }

#game-map-dialog { width: min(1440px, 96vw); max-width: none; height: min(900px, 92vh); max-height: none; padding: 0; border: 1px solid #b18a54; border-radius: 18px; color: #f5ead5; background: #111c25; box-shadow: 0 28px 100px #000d; }
#game-map-dialog::backdrop { background: #020508dc; backdrop-filter: blur(5px); }
.map-dialog-shell { height: 100%; display: flex; flex-direction: column; }
.map-dialog-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; border-bottom: 1px solid #59636a; background: linear-gradient(100deg,#192b30,#30271d); }
.map-dialog-header .eyebrow { margin: 0 0 3px; color: #d7b879; }
.map-dialog-header h2 { margin: 0; font: 700 26px Georgia,serif; color: #f3e5c7; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.map-tools button { margin: 0; min-width: 42px; padding: 9px 12px; border-color: #aa8a58; background: #39433f; }
.map-dialog-content { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0,1fr) 290px; }
.map-viewport { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #16262b; touch-action: none; box-shadow: inset 0 0 0 3px #6f5431, inset 0 0 0 5px #1a130b, inset 0 0 0 6px #c9a465, inset 0 0 60px #000c; }
.map-viewport #game-map-canvas { position: relative; z-index: 0; }
.map-viewport::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 3px #6f5431, inset 0 0 0 5px #1a130b, inset 0 0 0 6px #c9a465, inset 0 0 70px #000b; }
#game-map-canvas { display: block; width: 100%; height: 100%; min-height: 400px; cursor: grab; user-select: none; }
#game-map-canvas.is-panning { cursor: grabbing; }
.map-fog-hint { position: absolute; left: 14px; bottom: 10px; max-width: 255px; margin: 0; padding: 8px 11px; border: 1px solid #657078; border-radius: 8px; color: #eee5d5; background: #111a1de6; font-size: 12px; pointer-events: none; }
.map-location-panel { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 19px; border-left: 1px solid #59636a; background: linear-gradient(160deg,#202c2e,#1b1d1d); }
.map-location-panel h3 { margin: 0; font: 700 21px Georgia,serif; color: #f0d6a2; }
.map-location-panel p { margin: 0; color: #d0c9ba; line-height: 1.45; }
.map-location-panel label { margin-top: 8px; color: #e7d8b8; }
.map-location-panel textarea { width: 100%; resize: vertical; border: 1px solid #83765e; border-radius: 9px; padding: 10px; color: #f9f2e4; background: #12191a; font: inherit; }
.map-location-panel textarea:disabled { opacity: .5; }
.map-location-panel button { margin: 0; border-color: #c19b5e; color: #fff0cf; background: #625039; }
.map-location-panel button:disabled { opacity: .45; cursor: not-allowed; }
#map-note-status { min-height: 2.8em; font-size: 12px; }
#character-sheet-dialog { width: min(1320px, 98vw); max-width: none; height: min(920px, 98vh); max-height: none; padding: 0; overflow: hidden; border: 1px solid #6988aa; border-radius: 16px; color: #e9edf4; background: #101b2b; box-shadow: 0 28px 100px #000d; }
#character-sheet-dialog::backdrop, #character-save-dialog::backdrop { background: #020812d9; backdrop-filter: blur(5px); }
.character-dialog-shell { height: 100%; display: flex; flex-direction: column; }
.character-dialog-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 3px 12px; border-bottom: 1px solid #435d7d; }
/* 2026-11-21: the sheet itself names the character; the window bar stays thin so the sheet fits one screen. */
.character-dialog-header .eyebrow { display: none; }
.character-dialog-header h2 { margin: 0; font-size: 15px; }
.character-dialog-header .dialog-close { width: 32px; height: 32px; font-size: 22px !important; }
.dialog-close { width: 44px; height: 44px; padding: 0 !important; margin: 0 !important; border-radius: 50% !important; font-size: 29px !important; line-height: 1; }
#character-sheet-frame { width: 100%; flex: 1; min-height: 0; border: 0; background: #0c1421; }
#character-save-dialog { width: min(520px, 92vw); padding: 0; border: 1px solid #8da3bf; border-radius: 14px; color: #e9edf4; background: #17253a; box-shadow: 0 24px 80px #000e; }
.character-save-shell { padding: 22px; }
.character-save-shell h2 { margin-top: 0; }
.character-save-shell p { line-height: 1.5; }
.character-save-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.character-save-actions button { margin: 0; }
#character-save-status { min-height: 1.5em; color: #ffd48a; }
@media (max-width: 760px) {
  #game-map-dialog { width: 98vw; height: 94vh; border-radius: 12px; }
  #character-sheet-dialog { width: 98vw; height: 94vh; border-radius: 12px; }
  .map-dialog-header { align-items: flex-start; flex-direction: column; padding: 12px; }
  .map-tools { width: 100%; }
  .map-tools button:last-child { margin-left: auto; }
  .map-dialog-content { grid-template-columns: 1fr; grid-template-rows: minmax(260px,1fr) auto; }
  #game-map-canvas { min-height: 270px; }
  .map-location-panel { max-height: 230px; border-left: 0; border-top: 1px solid #59636a; padding: 12px; }
  .map-location-panel textarea { min-height: 72px; }
}

/* Active play: let the authored 3D location fill the display. All game tools
   remain real controls, arranged as floating, readable panels above it. */
body:has(#play-session:not([hidden])) { overflow: hidden; background: #090c0d; background-image: none; }
body:has(#play-session:not([hidden])) .layout { position: relative; width: 100vw; height: 100dvh; min-height: 0; padding: 0; gap: 0; overflow: hidden; }
body:has(#play-session:not([hidden])) .header { position: fixed; inset: 0 0 auto; z-index: 40; min-height: 46px; display: flex; align-items: center; padding: 5px 14px; border-bottom: 1px solid rgba(224, 190, 137, .2); background: linear-gradient(180deg, rgba(13, 16, 18, .84), rgba(13, 16, 18, .38)); backdrop-filter: blur(12px); }
body:has(#play-session:not([hidden])) .header .emblem { width: 32px; height: 32px; margin-right: 8px; }
body:has(#play-session:not([hidden])) .header h1 { margin: 0; font-size: 14px; }
body:has(#play-session:not([hidden])) .header .eyebrow,
body:has(#play-session:not([hidden])) .header .status { display: none; }
body:has(#play-session:not([hidden])) .language-picker { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; color: #ead8b8; font-size: 12px; }
body:has(#play-session:not([hidden])) .language-picker select { width: auto; min-width: 112px; max-width: 150px; margin: 0; padding: 6px 9px; background: rgba(28, 25, 21, .84); border-color: rgba(211, 175, 125, .38); }
body:has(#play-session:not([hidden])) .play-area { position: static; flex: 1 1 auto; min-height: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; }
body:has(#play-session:not([hidden])) .game-heading-box { display: contents; }
body:has(#play-session:not([hidden])) .game-heading-main { display: none; }
body:has(#play-session:not([hidden])) #play-session { position: static; display: contents; }
body:has(#play-session:not([hidden])) .play-controls { position: fixed; top: 112px; right: 16px; z-index: 35; width: min(290px, calc(100vw - 32px)); background: rgba(27, 24, 20, .8); border-color: rgba(211, 175, 125, .42); box-shadow: 0 10px 34px rgba(0, 0, 0, .28); backdrop-filter: blur(14px); }
body:has(#play-session:not([hidden])) .play-controls > span { overflow: hidden; color: #f1dfbd; text-overflow: ellipsis; white-space: nowrap; }
body:has(#play-session:not([hidden])) .scene-stage,
body:has(#play-session:not([hidden])) .scene-stage.combat-active { position: fixed; inset: 0; z-index: 1; display: block; width: 100vw; height: 100dvh; min-height: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: #29241c; }
body:has(#play-session:not([hidden])) .scene-3d-frame { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #29241c; }
body:has(#play-session:not([hidden])) #scene-3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
body:has(#play-session:not([hidden])) .scene-stage-heading { position: fixed; top: 58px; left: 16px; z-index: 30; display: block; width: min(330px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid rgba(221, 187, 139, .55); border-radius: 12px; background: rgba(30, 25, 19, .78); box-shadow: 0 12px 36px rgba(0, 0, 0, .32); backdrop-filter: blur(12px); }
body:has(#play-session:not([hidden])) .scene-stage-heading .eyebrow { color: #d3ac75; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
body:has(#play-session:not([hidden])) .scene-stage-heading h3 { color: #fff0d4; font: 700 23px/1.15 Georgia, serif; }
body:has(#play-session:not([hidden])) .scene-stage-heading .play-disclaimer { max-width: none; margin-top: 5px; color: #d8c9b2; font-size: 12px; text-align: left; }
body:has(#play-session:not([hidden])) .scene-3d-status { right: 50%; bottom: 12px; transform: translateX(50%); width: max-content; max-width: min(90vw, 680px); padding: 7px 11px; border: 1px solid rgba(221, 187, 139, .32); border-radius: 8px; color: #f4e6cf; background: rgba(18, 15, 12, .76); font-size: 12px; }
body:has(#play-session:not([hidden])) .scene-content { position: fixed; top: 164px; right: 16px; z-index: 30; display: flex; flex-direction: column; width: min(290px, calc(100vw - 32px)); max-height: min(34vh, 360px); gap: 8px; overflow: auto; }
body:has(#play-session:not([hidden])) .scene-actors,
body:has(#play-session:not([hidden])) .scene-exits { flex: 0 0 auto; max-height: 190px; padding: 11px; border-color: rgba(221, 187, 139, .38); background: rgba(28, 24, 19, .82); box-shadow: 0 8px 28px rgba(0, 0, 0, .24); backdrop-filter: blur(12px); }
body:has(#play-session:not([hidden])) .scene-actors h4,
body:has(#play-session:not([hidden])) .scene-exits h4 { color: #f0d6aa; }
body:has(#play-session:not([hidden])) .scene-interaction-card { background: rgba(48, 38, 27, .78); border-color: rgba(211, 175, 125, .3); }
body:has(#play-session:not([hidden])) .scene-interaction-card strong { color: #ffe1ab; }
body:has(#play-session:not([hidden])) .scene-stage button { color: #fff1d8; border-color: rgba(211, 175, 125, .42); background: rgba(78, 53, 32, .86); }
body:has(#play-session:not([hidden])) .scene-status { position: fixed; left: 50%; bottom: 54px; z-index: 34; width: max-content; max-width: min(90vw, 680px); padding: 6px 10px; border-radius: 7px; color: #fff0d5; background: rgba(24, 20, 16, .85); transform: translateX(-50%); }
body:has(#play-session:not([hidden])) .game-dashboard { display: contents; }
body:has(#play-session:not([hidden])) .story-box { position: fixed; left: 16px; bottom: 16px; z-index: 32; width: min(380px, calc(100vw - 32px)); max-height: min(42vh, 440px); padding: 13px; border-color: rgba(221, 187, 139, .48); background: rgba(29, 24, 19, .86); box-shadow: 0 12px 38px rgba(0, 0, 0, .34); backdrop-filter: blur(14px); }
body:has(#play-session:not([hidden])) .story-box h3 { color: #f3d8ac; font: 700 17px Georgia, serif; }
body:has(#play-session:not([hidden])) #play-log { min-height: 28px; }
body:has(#play-session:not([hidden])) #play-log p { color: #eee0cb; background: rgba(77, 59, 41, .52); }
body:has(#play-session:not([hidden])) .story-box button { background: #a96a35; border-color: #d09251; color: #fff4e3; }
body:has(#play-session:not([hidden])) .game-sidebar { position: fixed; right: 16px; bottom: 16px; z-index: 32; width: min(290px, calc(100vw - 32px)); max-height: min(39vh, 410px); padding: 8px; border: 1px solid rgba(221, 187, 139, .42); border-radius: 12px; background: rgba(29, 24, 19, .78); box-shadow: 0 12px 38px rgba(0, 0, 0, .3); backdrop-filter: blur(14px); }
body:has(#play-session:not([hidden])) .game-sidebar .dashboard-box { padding: 10px; border-color: rgba(211, 175, 125, .28); background: rgba(44, 35, 26, .72); }
body:has(#play-session:not([hidden])) .game-sidebar h4,
body:has(#play-session:not([hidden])) .character-status-heading span:first-child { color: #f5dfbd; }
body:has(#play-session:not([hidden])) .combat-panel { position: fixed; left: 492px; right: 322px; bottom: 18px; z-index: 40; width: auto; max-width: 860px; margin: 0 auto; max-height: 46vh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 18px; color: #f4e4cb; background: rgba(35, 26, 19, .94); box-shadow: 0 18px 50px rgba(0, 0, 0, .46); }
/* Combat: who is who with their target buttons; the panel scrolls if the fight is large. */
body:has(#play-session:not([hidden])) .combat-panel .combat-roster { display: grid; gap: 6px; font-size: 13px; }
body:has(#play-session:not([hidden])) .combat-panel #combat-roster > li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body:has(#play-session:not([hidden])) .combat-panel #combat-actions { max-height: 92px; overflow-y: auto; gap: 2px; color: #cdbb9f; font-size: 12px; }
/* One column: who is who with their target buttons, then your own choices in a row, so neither crowds the other. */
body:has(#play-session:not([hidden])) .combat-panel { grid-template-columns: minmax(0, 1fr); }
body:has(#play-session:not([hidden])) .combat-panel > div:first-child { grid-column: 1; grid-row: auto; min-width: 0; }
body:has(#play-session:not([hidden])) #combat-join { grid-column: 1; grid-row: auto; justify-self: start; }
/* Narrow windows: the panel spans the width above the log instead of between the side panels. */
@media (max-width: 1180px) { body:has(#play-session:not([hidden])) .combat-panel { left: 16px; right: 16px; bottom: auto; top: 112px; } }
body:has(#play-session:not([hidden])) .combat-panel #combat-self-actions { position: static; grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; gap: 6px; width: auto; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body:has(#play-session:not([hidden])) .combat-panel[hidden] { display: none !important; }
body:has(#play-session:not([hidden])) .combat-panel strong { color: #ffd795; }
/* Keep live-game panels translucent without backdrop blur; it is costly on this PC. */
body:has(#play-session:not([hidden])) .header,
body:has(#play-session:not([hidden])) .play-controls,
body:has(#play-session:not([hidden])) .scene-stage-heading,
body:has(#play-session:not([hidden])) .scene-exits,
body:has(#play-session:not([hidden])) .story-box,
body:has(#play-session:not([hidden])) .game-sidebar,
body:has(#play-session:not([hidden])) .scene-actors,
body:has(#play-session:not([hidden])) .combat-panel { backdrop-filter: none; }

@media (max-width: 760px) {
  body:has(#play-session:not([hidden])) .header { min-height: 42px; padding: 4px 8px; }
  body:has(#play-session:not([hidden])) .header h1 { font-size: 12px; }
  body:has(#play-session:not([hidden])) .language-picker span { display: none; }
  body:has(#play-session:not([hidden])) .language-picker select { min-width: 88px; padding: 5px 6px; }
  body:has(#play-session:not([hidden])) .scene-stage-heading { top: 52px; left: 8px; width: min(250px, 56vw); padding: 9px 10px; }
  body:has(#play-session:not([hidden])) .scene-stage-heading h3 { font-size: 18px; }
  body:has(#play-session:not([hidden])) .play-controls { top: 100px; right: 8px; width: min(190px, 44vw); padding: 6px; }
  body:has(#play-session:not([hidden])) .scene-content { top: 150px; right: 8px; width: min(210px, 46vw); max-height: 32vh; }
  body:has(#play-session:not([hidden])) .scene-actors, body:has(#play-session:not([hidden])) .scene-exits { padding: 8px; }
  body:has(#play-session:not([hidden])) .story-box { left: 8px; bottom: 8px; width: min(280px, 64vw); max-height: 36vh; padding: 8px; }
  body:has(#play-session:not([hidden])) .story-box h3 { font-size: 14px; }
  body:has(#play-session:not([hidden])) .story-box label { font-size: 11px; }
  body:has(#play-session:not([hidden])) .game-sidebar { right: 8px; bottom: 8px; width: min(210px, 48vw); max-height: 36vh; padding: 5px; }
}
[hidden] { display: none !important; }

/* The external-text acknowledgement is a compact checkbox, not a full-width text input. */
#external-translation-notice { border: 1px solid #8299b4; border-radius: 10px; padding: 14px; margin: 18px 0; background: #1b3049; }
#external-translation-notice label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; line-height: 1.5; }
.play-area #external-translation-ack { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; padding: 0; accent-color: #82b9e5; }

/* Compact, single-screen game dashboard. */
body { overflow: hidden; background-color: #0c1421; background-image: radial-gradient(ellipse at 55% 0%, #203a57 0, #0c1421 70%); }
.layout { width: min(1600px, 100%); max-width: none; height: 100dvh; display: flex; flex-direction: column; gap: 10px; padding: 10px 18px; overflow: hidden; }
.header { flex: 0 0 auto; min-height: 46px; margin: 0; }
.header .status { padding: 5px 10px; }
.play-area { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px; overflow: hidden; border-radius: 14px; border-color: rgba(135, 169, 201, .45); background: rgba(9, 21, 37, .18); backdrop-filter: none; }
.game-heading-box { flex: 0 0 auto; min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid rgba(130, 166, 199, .48); border-radius: 12px; background: rgba(18, 37, 59, .54); backdrop-filter: none; }
.game-heading-main { min-width: 0; }
.game-heading-main .eyebrow { margin: 0; }
.game-heading-main h2 { margin: 3px 0; font-size: clamp(20px, 2.2vw, 28px); }
.game-heading-main .play-disclaimer { margin: 3px 0 0; font-size: 12px; }
#play-entry { flex: 1; display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 12px; }
#play-entry form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#play-entry form label { width: 100%; }
#play-entry input { width: min(320px, 55vw); margin: 0; }
#play-entry .play-disclaimer { flex-basis: 100%; margin: 0; }
#play-session { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.play-controls { flex: 0 0 auto; min-height: 44px; margin: 0; padding: 6px 10px; }
.play-controls.dashboard-box { background: rgba(16, 34, 55, .58); }
.play-controls > span { flex: 1; min-width: 0; }
.scene-stage { flex: 0 0 min(58vh, 560px); min-height: 370px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; background: linear-gradient(145deg, rgba(14, 32, 48, .82), rgba(12, 23, 37, .68)); }
.scene-stage.combat-active { flex-basis: min(64vh, 640px); }
.scene-stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.scene-stage-heading .eyebrow, .scene-stage-heading h3 { margin: 0; }
.scene-stage-heading h3 { margin-top: 2px; font-size: 20px; }
.scene-stage-heading .play-disclaimer { margin: 0; max-width: 55%; text-align: right; }
.scene-3d-frame { position: relative; flex: 1 1 280px; min-height: 210px; overflow: hidden; border: 1px solid rgba(183, 151, 103, .46); border-radius: 11px; background: #151a20; }
.scene-3d-fps { position: absolute; top: 58px; left: 50%; z-index: 8; transform: translateX(-50%); padding: 5px 8px; border: 1px solid rgba(225, 184, 120, .4); border-radius: 6px; background: rgba(16, 13, 10, .82); color: #f1d6ad; font: 600 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; pointer-events: none; }
#scene-3d-canvas { display: block; width: 100%; height: 100%; min-height: 210px; outline: none; touch-action: none; }
.scene-3d-status { position: absolute; right: 9px; bottom: 7px; max-width: calc(100% - 18px); margin: 0; padding: 3px 7px; border-radius: 5px; color: #f2e5c6; background: rgba(8, 13, 18, .72); font-size: 11px; pointer-events: none; }
.scene-3d-status:empty { display: none; }
.scene-content { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(180px, .8fr); gap: 12px; }
.scene-actors, .scene-exits { min-width: 0; overflow: auto; padding: 10px; border: 1px solid rgba(130, 166, 199, .3); border-radius: 10px; background: rgba(4, 13, 24, .28); }
.scene-actors h4, .scene-exits h4 { margin: 0 0 8px; color: #dce9f5; font-size: 13px; }
.scene-interaction-list, .scene-destination-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; }
.scene-interaction-card { display: grid; gap: 6px; min-width: min(190px, 100%); padding: 8px; border: 1px solid rgba(130, 166, 199, .42); border-radius: 9px; background: rgba(18, 38, 58, .55); }
.scene-interaction-card strong { color: #f3d69a; font-size: 12px; }
.scene-stage button { margin: 0; padding: 7px 10px; font-size: 12px; }
.scene-interaction-card button { width: 100%; text-align: left; background: rgba(27, 58, 83, .64); }
.scene-destination-list button { background: rgba(12, 31, 48, .62); }
.scene-status { flex: 0 0 auto; min-height: 1em; margin: 0; color: #b7c7de; font-size: 11px; }
.combat-panel { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid rgba(230, 192, 122, .55); border-radius: 10px; background: rgba(65, 44, 25, .42); }
.combat-panel[hidden] { display: none; }
.combat-panel strong { color: #f3d69a; }
.combat-panel p { margin: 3px 0 0; }
.combat-roster { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 0; padding: 0; list-style: none; color: #d5dfeb; font-size: 11px; }
.game-dashboard { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 300px); gap: 10px; overflow: hidden; }
.dashboard-box { min-width: 0; padding: 12px; border: 1px solid rgba(130, 166, 199, .45); border-radius: 12px; background: rgba(16, 34, 55, .58); backdrop-filter: none; }
.story-box { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: rgba(12, 28, 46, .48); }
.story-box h3 { flex: 0 0 auto; margin: 0 0 6px; font-size: 18px; }
#play-log { flex: 1 1 auto; min-height: 36px; overflow-y: auto; padding: 4px 0; }
#play-log p { margin: 5px 0; padding: 8px 10px; border-radius: 0 8px 8px 0; font-size: 14px; }
#play-connection { flex: 0 0 auto; margin: 4px 0 0; padding: 4px 8px; border: 1px solid #c9a24a; border-radius: 4px;
  background: #3a2f12; color: #f1d38a; font-size: 12px; }
#play-connection[hidden] { display: none; }
#play-status { flex: 0 0 auto; min-height: 1em; margin: 4px 0 0; color: #b7c7de; font-size: 12px; }
.game-sidebar { min-height: 0; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; }
.character-status-box { flex: 0 0 auto; }
.character-status-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.character-status-heading span:first-child { overflow: hidden; font-size: 17px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.character-status-heading span:last-child { color: #a4b7d0; font-size: 12px; }
.life-status { padding: 9px 10px; border: 1px solid #49657a; border-radius: 9px; background: #10253a; }
.life-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.life-label span { color: #e6c07a; font-weight: 700; }
.life-label strong { font-size: 18px; font-variant-numeric: tabular-nums; }
#character-life-progress { display: block; width: 100%; height: 15px; margin: 8px 0 3px; accent-color: #59b779; }
.life-status small { color: #a4b7d0; font-size: 11px; }
.game-sidebar h4 { margin: 0 0 7px; font-size: 15px; }
.game-sidebar .play-disclaimer { margin: 4px 0 8px; font-size: 12px; }
.game-sidebar button { margin: 0; padding: 8px 10px; }
#play-knowledge-panel { flex: 0 0 auto; }
#play-knowledge-status { margin: 6px 0 0; font-size: 12px; }
#play-knowledge-list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
#skill-check-buttons { gap: 6px; }
#skill-check-buttons button { width: 100%; text-align: left; }
.dice-roll-window { position: static; flex: 0 0 auto; flex-direction: row; justify-content: space-between; min-height: 82px; padding: 8px 12px; }
.dice-roll-window h4 { margin: 0; }
.dice-roll-window .die-gem { width: 58px; height: 60px; }
.dice-roll-window .die-gem span { font-size: 23px; }
.footnote { display: none; }
@media (max-width: 760px) {
  body { overflow: auto; }
  .layout { height: auto; min-height: 100dvh; overflow: visible; padding: 8px; }
  .header { margin-bottom: 0; }
  .play-area { flex: 1 0 auto; min-height: 75vh; overflow: visible; }
  .game-heading-box { align-items: stretch; flex-direction: column; }
  #play-session { overflow: visible; }
  .scene-stage { flex-basis: auto; min-height: 520px; overflow: visible; }
  .scene-3d-frame { flex-basis: 270px; }
  .scene-content { grid-template-columns: 1fr; }
  .scene-stage-heading { align-items: flex-start; flex-direction: column; }
  .scene-stage-heading .play-disclaimer { max-width: none; text-align: left; }
  .game-dashboard { grid-template-columns: 1fr; overflow: visible; }
  .story-box { min-height: 42vh; }
  .game-sidebar { overflow: visible; }
}

.scene-world-label { position: absolute; z-index: 4; max-width: 180px; padding: 4px 9px; border: 1px solid rgba(239, 205, 150, .55); border-radius: 999px; color: #fff0d4; background: rgba(34, 25, 17, .88); box-shadow: 0 3px 12px rgba(0, 0, 0, .45); font: 700 12px Georgia, serif; letter-spacing: .035em; text-align: center; text-shadow: 0 1px 3px #000; white-space: nowrap; transform: translate(-50%, -100%); pointer-events: none; }
.scene-stage.combat-first-person .scene-3d-frame::after { content: ""; position: absolute; z-index: 3; top: 50%; left: 50%; width: 9px; height: 9px; border: 1px solid rgba(246, 218, 166, .85); border-radius: 50%; box-shadow: 0 0 0 2px rgba(17, 12, 7, .45), 0 0 12px rgba(246, 218, 166, .34); transform: translate(-50%, -50%); pointer-events: none; }
.scene-stage.combat-first-person .scene-actors,
.scene-stage.combat-first-person .scene-exits { display: none !important; }
.scene-speech-bubble { position: absolute; z-index: 5; max-width: 260px; padding: 7px 11px; border: 1px solid rgba(96, 70, 40, .35); border-radius: 12px; color: #2b1d10; background: rgba(252, 244, 226, .96); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); font: 13px/1.38 Georgia, serif; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none; }
.scene-speech-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: inherit; border-right: inherit; border-bottom: inherit; transform: translateX(-50%) rotate(45deg); }

/* Floating play windows (panels.js): each box moves by its title and resizes from its corner. */
body:has(#play-session:not([hidden])) .game-sidebar { display: contents; }
body:has(#play-session:not([hidden])) .floating-panel { position: fixed; z-index: 33; resize: both; overflow: auto;
  min-width: 180px; min-height: 48px; max-width: 92vw; max-height: 88vh; box-sizing: border-box; padding: 10px;
  border: 1px solid rgba(221, 187, 139, .46); border-radius: 12px; background: rgba(29, 24, 19, .86);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .34); backdrop-filter: blur(14px); }
body:has(#play-session:not([hidden])) .floating-handle { cursor: move; user-select: none; touch-action: none; }
/* The knowledge window opens from its icon: small, see-through, moved by its title, resized from its corner. */
body:has(#play-session:not([hidden])) #play-knowledge-panel { right: 16px; top: 192px; width: 290px; height: 220px;
  background: rgba(29, 24, 19, .6); }
body:has(#play-session:not([hidden])) #skill-checks { left: 492px; bottom: 16px; width: 260px; max-height: 200px; }
body:has(#play-session:not([hidden])) #play-dice-roll { top: auto; left: 492px; bottom: 232px; width: 190px; }
body:has(#play-session:not([hidden])) #play-party-panel { top: 180px; right: 300px; width: 240px; max-height: 40vh; }
#play-party-panel ul { margin: 4px 0 8px; padding-left: 18px; }
#play-party-panel li button { padding: 2px 8px; font-size: 12px; }
#play-party-members { list-style: none; padding-left: 0; }
#play-party-members .party-mate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; padding: 2px 0; }
#play-party-members .party-mate.is-away { opacity: .6; }
#play-party-members .party-place { min-width: 1.6em; color: #c9b98f; }
#play-party-members .party-mate.is-leader .party-name { font-weight: 700; }
#play-party-members .party-tag { font-size: 11px; padding: 0 5px; border-radius: 3px; background: rgba(255,255,255,.1); }
#play-party-members .party-tag-leader { background: #c9a227; color: #1b1406; }
@media (max-width: 760px) {
  body:has(#play-session:not([hidden])) #play-knowledge-panel { right: 8px; top: 150px; width: min(260px, 60vw); height: 160px; }
  body:has(#play-session:not([hidden])) #active-character-panel { left: 8px; top: 52px; width: min(210px, 48vw); }
}
body:has(#play-session:not([hidden])) .combat-countdown { display: inline-block; margin-left: 12px; padding: 2px 10px;
  border-radius: 999px; font: 700 18px Georgia, serif; color: #1d140c; background: #f1c27d; }
body:has(#play-session:not([hidden])) .combat-countdown.urgent { background: #e2553f; color: #fff; }
body:has(#play-session:not([hidden])) .combat-countdown[hidden] { display: none; }

/* "Ötletek" names who and what is here; ready-made actions and checks are never listed. */
body:not(.play-hints) #scene-interactions, #scene-interactions button, #skill-checks { display: none !important; }
#play-log-toggle[aria-pressed="true"] { background: #c69b54; color: #1b2430; }
#play-hints[aria-pressed="true"] { background: #c69b54; color: #1b2430; }
.retell-button { margin-left: 6px; padding: 1px 8px; font-size: 12px; }

/* ----- The message window (2026-11-20): one place for story, speech, combat and system lines ----- */
body:has(#play-session:not([hidden])) #play-story-box { left: 16px; bottom: 16px; top: auto; width: min(460px, calc(100vw - 32px));
  height: min(40vh, 400px); display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 8px; background: rgba(14, 12, 10, .78); }
body:has(#play-session:not([hidden])) #play-story-box:has(#play-log.expanded) { height: min(78vh, 760px) !important; }
.chat-head { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
body:has(#play-session:not([hidden])) .chat-head h3 { margin: 0 4px 0 2px; font: 700 13px Georgia, serif; color: #f3d8ac; white-space: nowrap; }
.chat-tabs { display: flex; flex: 1 1 auto; gap: 2px; min-width: 0; overflow-x: auto; }
body:has(#play-session:not([hidden])) .chat-tabs button { margin: 0; padding: 2px 8px; border: 1px solid rgba(211, 175, 125, .28); border-radius: 6px 6px 0 0;
  background: rgba(60, 46, 32, .55); color: #d9c7a8; font-size: 11px; white-space: nowrap; }
body:has(#play-session:not([hidden])) .chat-tabs button[aria-selected="true"] { background: #a96a35; border-color: #d09251; color: #fff4e3; }
body:has(#play-session:not([hidden])) #play-story-box .log-toggle { flex: 0 0 auto; margin: 0; padding: 1px 7px; font-size: 13px; background: rgba(60, 46, 32, .7); border-color: rgba(211, 175, 125, .35); }
/* Newest first in the page; drawn from the bottom up, so the newest line sits just above the input. */
#play-log { flex: 1 1 auto; min-height: 60px; display: flex; flex-direction: column-reverse; overflow-y: auto; padding: 4px 6px;
  border: 1px solid rgba(211, 175, 125, .2); border-radius: 0 6px 6px 6px; background: rgba(0, 0, 0, .35); }
#play-log p { margin: 0; padding: 1px 0; border: 0; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; background: none; border-radius: 0; }
body:has(#play-session:not([hidden])) #play-log p { background: none; }
#play-log p::before { content: attr(data-time); margin-right: 6px; color: #7d7466; font: 11px ui-monospace, Consolas, monospace; }
body:has(#play-session:not([hidden])) #play-log .msg-story { color: #f4e6cf; }
body:has(#play-session:not([hidden])) #play-log .msg-local { color: #bfe3ff; }
body:has(#play-session:not([hidden])) #play-log .msg-world { color: #ffd27a; }
body:has(#play-session:not([hidden])) #play-log .msg-party { color: #9fe39b; }
body:has(#play-session:not([hidden])) #play-log .msg-private { color: #f0a6ff; }
body:has(#play-session:not([hidden])) #play-log .msg-npc { color: #e8c9a0; }
#play-log p[data-reply-to] { cursor: pointer; }
body:has(#play-session:not([hidden])) #play-log .msg-combat { color: #ffab8a; }
body:has(#play-session:not([hidden])) #play-log .msg-system { color: #93d6c4; }
body:has(#play-session:not([hidden])) #play-log .msg-blurred { color: #8aa3b5; font-style: italic; }
body:has(#play-session:not([hidden])) #play-log .retelling { font-style: italic; color: #f2d291; }
#play-log[data-filter="story"] > p:not(.msg-story),
#play-log[data-filter="local"] > p:not(.msg-local),
#play-log[data-filter="world"] > p:not(.msg-world),
#play-log[data-filter="party"] > p:not(.msg-party),
#play-log[data-filter="private"] > p:not(.msg-private),
#play-log[data-filter="npc"] > p:not(.msg-npc),
#play-log[data-filter="combat"] > p:not(.msg-combat),
#play-log[data-filter="system"] > p:not(.msg-system) { display: none; }
.chat-line { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 5px; margin: 0; }
/* Channel, (addressee,) words, send: the addressee box shows only for a private line. */
.speech-form.chat-line { display: flex; }
.speech-form.chat-line #play-speech-text { flex: 1 1 auto; min-width: 0; }
.speech-form.chat-line #play-chat-to { flex: 0 0 90px; }
.speech-form.chat-line select.chat-mode { width: auto; margin: 0; }
body:has(#play-session:not([hidden])) .chat-mode { min-width: 58px; padding: 4px 6px; border-radius: 6px; background: rgba(60, 46, 32, .7);
  color: #e8cf9f; font-size: 11px; font-weight: 700; text-align: center; }
body:has(#play-session:not([hidden])) .speech-form .chat-mode { color: #bfe3ff; }
body:has(#play-session:not([hidden])) .chat-line input { width: 100%; max-width: none; margin: 0; padding: 6px 8px; font-size: 13px;
  color: #f9efdf; background: rgba(0, 0, 0, .55); border: 1px solid rgba(211, 175, 125, .35); border-radius: 6px; }
body:has(#play-session:not([hidden])) .chat-line button { min-height: 0; margin: 0; padding: 6px 10px; font-size: 12px; }
body:has(#play-session:not([hidden])) #play-status:empty { display: none; }

/* ----- Life in numbers: own frame top left, party mates under it, fighters in the fight window ----- */
body:has(#play-session:not([hidden])) #active-character-panel { left: 16px; top: 58px; right: auto; bottom: auto; width: 270px; max-height: 60vh; padding: 8px 10px; }
body:has(#play-session:not([hidden])) .character-status-heading { margin-bottom: 5px; }
body:has(#play-session:not([hidden])) .life-status { display: grid; gap: 4px; padding: 0; border: 0; background: none; }
.life-bar { position: relative; }
.life-bar progress { display: block; width: 100%; height: 20px; margin: 0; border: 1px solid rgba(0, 0, 0, .6); border-radius: 4px; overflow: hidden; appearance: none; background: #2b1c16; }
.life-bar progress::-webkit-progress-bar { background: #2b1c16; }
.life-vitality progress::-webkit-progress-value { background: linear-gradient(180deg, #e0574a, #9c2219); }
.life-vitality progress::-moz-progress-bar { background: linear-gradient(180deg, #e0574a, #9c2219); }
.life-soul progress::-webkit-progress-value { background: linear-gradient(180deg, #5b8fe8, #23489c); }
.life-soul progress::-moz-progress-bar { background: linear-gradient(180deg, #5b8fe8, #23489c); }
#character-life-progress { height: 20px; margin: 0; }
.life-bar .life-label { position: absolute; inset: 0; padding: 0 8px; pointer-events: none; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
body:has(#play-session:not([hidden])) .life-bar .life-label span { color: #fff1dc; font-size: 11px; }
body:has(#play-session:not([hidden])) .life-bar .life-label strong { color: #fff; font-size: 13px; }
.life-row { background: linear-gradient(90deg, rgba(176, 45, 36, .85) var(--life, 0%), rgba(43, 28, 22, .85) var(--life, 0%)); }
.party-frames { display: grid; gap: 3px; margin: 8px 0 0; padding: 0; list-style: none; }
.party-frames li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 12px; text-shadow: 0 1px 2px #000; }
.party-frames li.is-away { opacity: .6; }
body:has(#play-session:not([hidden])) .combat-panel #combat-roster > li.life-row { padding: 2px 8px; border-radius: 4px; color: #fff; text-shadow: 0 1px 2px #000; }
body:has(#play-session:not([hidden])) .combat-panel #combat-roster > li.is-foe { background: linear-gradient(90deg, rgba(150, 30, 24, .9) var(--life, 0%), rgba(35, 22, 18, .9) var(--life, 0%)); }

/* Players in the 3D scene: their name tag is blue, a party mate's has a green mark; out of earshot, a bubble cannot be read. */
.scene-player-label { border-color: rgba(150, 196, 240, .7); background: rgba(18, 30, 46, .88); }
.scene-player-label.is-mate { border-color: rgba(130, 220, 150, .85); color: #dfffe6; }
.scene-speech-bubble.is-murmur { color: transparent; text-shadow: 0 0 7px rgba(43, 29, 16, .9); user-select: none; }

/* Location name at the top centre; the frame rate in the top right corner. */
body:has(#play-session:not([hidden])) .scene-stage-heading { left: 50%; top: 52px; width: auto; max-width: min(460px, calc(100vw - 600px)); padding: 6px 16px; text-align: center; transform: translateX(-50%); }
body:has(#play-session:not([hidden])) .scene-stage-heading h3 { font-size: 18px; }
body:has(#play-session:not([hidden])) .scene-stage-heading .play-disclaimer { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
/* 2026-11-29: left of the minimap, so the minimap does not cover it. */
body:has(#play-session:not([hidden])) .scene-3d-fps { top: 58px; left: auto; right: 182px; transform: none; }
@media (max-width: 760px) { body:has(#play-session:not([hidden])) .scene-3d-fps { top: 54px; right: 120px; } }
/* Backpack (4c2): worn places on the left, thirty places on the right; it moves and resizes like the others. */
/* Opened on purpose, so above the other windows, but below the icon bar (top) and the fight window. */
body:has(#play-session:not([hidden])) #play-backpack-panel { right: 16px; top: 192px; z-index: 36; width: 470px; max-height: calc(100vh - 192px); }
#play-backpack-panel[hidden] { display: none !important; }
/* The questionnaire (2026-12-02): only from its icon, see-through, moved by its title, resized from its corner. */
body:has(#play-session:not([hidden])) #play-feedback-panel { right: 16px; top: 192px; z-index: 36; width: 400px;
  max-height: calc(100vh - 210px); background: rgba(29, 24, 19, .72); }
#play-feedback-panel[hidden] { display: none !important; }
/* Its own small tab at the right edge, apart from the icon bar; it lights up only when pointed at. */
body:has(#play-session:not([hidden])) #open-feedback { position: fixed; right: 0; top: 50%; z-index: 30; padding: 6px 10px;
  border-radius: 10px 0 0 10px; font-size: 12px; opacity: .55; }
#open-feedback:hover, #open-feedback:focus-visible, #open-feedback[aria-expanded="true"] { opacity: 1; }
#play-feedback-panel .feedback-intro, #play-feedback-panel .feedback-thanks { margin: 4px 0 10px; font-size: 13px; line-height: 1.45; }
#play-feedback-panel .feedback-question { margin: 0 0 10px; }
#play-feedback-panel .feedback-label { margin: 0 0 4px; font-size: 13px; }
#play-feedback-panel .feedback-star { padding: 0 2px; border: 0; background: none; color: #6f6250; font-size: 20px; cursor: pointer; }
#play-feedback-panel .feedback-star[aria-pressed="true"] { color: #eac57e; }
#play-feedback-panel .feedback-choice { margin: 0 4px 4px 0; padding: 2px 8px; font-size: 12px; }
#play-feedback-panel .feedback-choice[aria-pressed="true"] { outline: 2px solid #eac57e; }
#play-feedback-panel .feedback-text { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-size: 12px; resize: vertical; }
#play-feedback-panel .feedback-sign { display: block; margin: 6px 0 10px; font-size: 12px; }
#play-feedback-panel .feedback-actions { display: flex; gap: 8px; }
.backpack-body { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; margin-top: 6px; }
.backpack-worn { display: grid; gap: 3px; align-content: start; font-size: 12px; color: #e7d8b8; }
.backpack-worn .backpack-slot { min-height: 40px; margin: 0 0 4px; }
.backpack-tabs { display: flex; gap: 3px; margin-bottom: 6px; }
.backpack-tabs button { margin: 0; padding: 3px 8px; font-size: 12px; }
.backpack-tabs button[aria-selected="true"] { background: #c69b54; color: #1b2430; }
.backpack-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.backpack-slot { aspect-ratio: 1; min-width: 0; margin: 0; padding: 2px; overflow: hidden; border: 1px solid rgba(211, 175, 125, .3); border-radius: 7px; color: #f3dfb8; background: rgba(0, 0, 0, .3); font-size: 11px; line-height: 1.15; text-overflow: ellipsis; }
.backpack-slot.is-worn { aspect-ratio: auto; border-color: #c69b54; background: rgba(60, 46, 32, .9); }
.backpack-slot:not(:disabled):not(.is-worn) { border-color: #c69b54; background: rgba(60, 46, 32, .9); cursor: pointer; }
.backpack-slot:disabled { opacity: 1; cursor: default; }
/* Hotbar (4b): 2×10 slots at the bottom; the slots grow and shrink with the window's width. */
body:has(#play-session:not([hidden])) #play-hotbar { left: 768px; bottom: 16px; width: 430px; min-width: 260px; padding: 4px 8px 8px; }
.play-hotbar[hidden] { display: none !important; }
.hotbar-grip { display: block; height: 12px; margin-bottom: 4px; color: rgba(239, 205, 150, .55); font-size: 11px; line-height: 12px; text-align: center; letter-spacing: 3px; }
.hotbar-slots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; container-type: inline-size; }
.hotbar-slot { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(211, 175, 125, .22); border-radius: 7px; background: rgba(0, 0, 0, .3); }
.hotbar-slot:has(button:not([hidden])) { border-color: #c69b54; background: rgba(60, 46, 32, .9); }
.hotbar-slot kbd { position: absolute; right: 3px; bottom: 1px; color: rgba(239, 205, 150, .7); font: 9px/1 system-ui, sans-serif; pointer-events: none; }
.hotbar-slot .spell-toggle { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 6px; color: #f3dfb8; background: transparent; font-size: clamp(12px, 5cqi, 30px); }
.hotbar-slot .spell-toggle:hover:not(:disabled) { background: rgba(198, 155, 84, .28); }
.hotbar-slot button:disabled { opacity: .45; }
.hotbar-slot .hotbar-item.is-missing { opacity: .35; filter: grayscale(1); }
.play-hotbar .spell-menu { margin: 0 0 6px; }
/* Spells: an icon on the character panel opens the spells, then the targets. */
.spell-toggle { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; }
.spell-toggle[aria-expanded="true"] { background: #c69b54; color: #1b2430; }
/* Map, knowledge, narration and the like: small icon buttons; the name shows on hover. */
.icon-button { width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 8px; font-size: 18px; line-height: 1; }
.icon-button[aria-expanded="true"] { background: #c69b54; color: #1b2430; }
.icon-button[aria-busy="true"] { opacity: .55; cursor: progress; }
/* 2026-11-22: the icon bar stays on one row above the right-hand windows; its icons are larger and have no box
   behind them, only a soft highlight on hover and a gold line under an open window's icon. */
/* 2026-11-23: the bar is as wide as its buttons (no global button margin), so the last icon never spills over the edge,
   and the scene panel starts below it instead of under it. */
body:has(#play-session:not([hidden])) .play-controls { flex-wrap: nowrap; gap: 6px; width: auto; max-width: calc(100vw - 32px); justify-content: flex-end; }
body:has(#play-session:not([hidden])) #player-greeting { display: none; } /* the name is on the life frame */
body:has(#play-session:not([hidden])) .play-controls.dashboard-box > button,
.play-controls .icon-button { margin: 0; }
body:has(#play-session:not([hidden])) .scene-content { top: 192px; }
@media (max-width: 760px) { body:has(#play-session:not([hidden])) .scene-content { top: 166px; } }
.play-controls .icon-button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 26px; }
.play-controls .icon-button:hover:not(:disabled) { background: rgba(198, 155, 84, .22); }
.play-controls .icon-button[aria-expanded="true"] { background: transparent; color: inherit; box-shadow: inset 0 -3px 0 #c69b54; }
.icon-slot { display: contents; }
.icon-slot[hidden] { display: none; }
.window-heading { display: flex; align-items: center; gap: 6px; }
.window-heading h4 { flex: 1; min-width: 0; margin: 0; }
.window-heading .icon-button { width: 26px; height: 26px; font-size: 14px; }
.spell-menu { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spell-menu[hidden] { display: none; }
.spell-menu p { flex-basis: 100%; margin: 0; }
/* The fight window moves like the others but stays above them. */
body:has(#play-session:not([hidden])) #combat-panel.floating-panel { z-index: 40; }
/* Once moved, it keeps its own width instead of stretching between the default edges. */
body:has(#play-session:not([hidden])) #combat-panel.floating-panel[style*="left"] { width: min(760px, calc(100vw - 32px)); }
/* Invite mode: nothing to play before signing in. */
body.needs-sign-in #play-entry, body.needs-sign-in #play-session { display: none !important; }
#play-account form { display: grid; gap: 6px; max-width: 360px; }
#play-account-recovery { display: grid; gap: 6px; max-width: 360px; }
#play-account-recovery[hidden] { display: none; }
#play-account-recovery code { font-size: 1.3em; letter-spacing: 0.08em; user-select: all; }
/* 2026-11-25: the character-sheet and icon bar moves like the other windows, by its grip on the left. */
body:has(#play-session:not([hidden])) .play-controls > span.panel-grip { flex: 0 0 auto; align-self: stretch; display: flex;
  align-items: center; padding: 0 2px; color: rgba(239, 205, 150, .55); font-size: 14px; }

/* An authored, server-filtered top-down view of the current 3D room. */
.scene-stage .scene-minimap { position: absolute; top: 12px; right: 12px; z-index: 12; display: block; width: 158px; height: 158px; margin: 0; padding: 0; overflow: hidden; border: 4px solid #b18b50; border-radius: 50%; background: radial-gradient(circle, #263238, #0b1015 78%); box-shadow: 0 0 0 2px rgba(11, 8, 5, .9), 0 8px 28px #000b, inset 0 0 20px #000b; cursor: pointer; touch-action: manipulation; }
.scene-stage .scene-minimap:hover, .scene-stage .scene-minimap:focus-visible { border-color: #f2cc81; box-shadow: 0 0 0 3px #d6b371, 0 10px 30px #000c; }
.scene-minimap svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.scene-minimap-north { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); color: #ffdc91; font: 800 11px/1 Georgia, serif; text-shadow: 0 1px 4px #000; pointer-events: none; }
body:has(#play-session:not([hidden])) .scene-stage .scene-minimap { position: fixed; top: 58px; right: 16px; z-index: 32; padding: 0; background: radial-gradient(circle, #263238, #0b1015 78%); border: 4px solid #b18b50; }
/* 2026-11-29: the character-sheet and icon bar sits just above the hotbar (same left edge), the scene text right under the minimap. */
body:has(#play-session:not([hidden])) .play-controls:not([style*="top:"]) { top: auto; right: auto; left: 768px; bottom: 134px; }
body:has(#play-session:not([hidden])) .scene-content:not([style*="top:"]) { top: 232px; }
/* It ends above the icon bar (bottom 134px + its height), so the bar never covers its last buttons. */
body:has(#play-session:not([hidden])) #scene-content:not([style*="height:"]) { max-height: max(140px, calc(100vh - 445px)); }
@media (max-width: 760px) {
  body:has(#play-session:not([hidden])) .scene-stage .scene-minimap { top: 54px; right: 8px; width: 104px; height: 104px; border-width: 3px; }
  body:has(#play-session:not([hidden])) .play-controls:not([style*="top:"]) { top: auto; left: auto; right: 8px; bottom: 8px; }
  body:has(#play-session:not([hidden])) .scene-content:not([style*="top:"]) { top: 172px; }
}
