/* Host screen: a fixed 1920x1080 stage, scaled to the window by host.js. Readable from 5 m. */
body.host { overflow: hidden; background: #2E0F14; }

.wall, .stage { position: absolute; width: 1920px; height: 1080px; transform-origin: top left; overflow: hidden; }


.topbar { position: absolute; left: 70px; right: 70px; top: 34px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; }
.logo { font-weight: 800; font-size: 76px; line-height: .9; color: var(--paper); letter-spacing: -2px; }
.logo .bang { display: inline-block; color: var(--accent); transform: rotate(12deg) translateY(-4px); margin-left: 4px; }
.tagline { color: #E9C9A8; font-size: 26px; font-weight: 600; margin-top: 8px; }
.topbar .lang-switch { font-size: 24px; }

/* Entrance: the QR code hangs as the main painting, with its exhibit label. */
.entrance { position: absolute; left: 90px; top: 172px; width: 470px; z-index: 1; }
.lamp { position: absolute; left: 150px; top: -30px; width: 170px; z-index: 2; }
.lamp::after { /* light cone on the wall, kept subtle */
  content: ''; position: absolute; left: -60px; top: 40px; width: 320px; height: 300px;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 220, 150, .16), transparent 70%); pointer-events: none;
}
.qr-frame { width: 470px; height: 470px; }
.qr-paper { background: var(--paper); display: grid; place-items: center; }
#qr { width: 276px; height: 276px; }
#qr svg { width: 100%; height: 100%; display: block; }
#qr svg rect[fill="#ffffff"], #qr svg rect[fill="white"] { fill: var(--paper); }

.join-plate { position: relative; margin: 22px 0 0 -6px; width: 460px; font-size: 24px; padding: 14px 24px 16px; transform: rotate(-.6deg); }
.join-plate .label-title { font-size: 26px; }
.join-how { display: block; font-size: 19px; line-height: 1.35; margin-top: 6px; }
.help { display: block; font-size: 16px; font-style: italic; opacity: .7; margin-top: 2px; }
.code-cap { display: block; margin-top: 8px; font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 3px; color: var(--brand); }
.code { display: block; font-weight: 800; font-size: 88px; white-space: nowrap; line-height: 1; letter-spacing: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Gallery wall: the players' portraits. */
.gallery { position: absolute; left: 650px; top: 180px; width: 970px; height: 720px; z-index: 1; }
.slot { position: absolute; }
.slot.filled { animation: hang .5s cubic-bezier(.3, 1.6, .5, 1) both; transform-origin: 50% 0; }
@keyframes hang { from { transform: translateY(-40px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.portrait { width: 100%; }
.portrait-bg { background: #F3E6CF; display: grid; place-items: center; padding: 6%; }
.slot.away .portrait-bg { filter: grayscale(.9) brightness(.8); }
.plate { margin: 10px auto 0; width: 94%; font-size: 24px; padding: .35em .7em .45em; }
.plate .label-title { font-size: 27px; overflow-wrap: anywhere; }
.plate .label-sub { font-size: 15px; }
.slot:nth-child(2n) .plate { transform: rotate(.8deg); }
.slot:nth-child(3n) .plate { transform: rotate(-1deg); }

.slot.empty { border: 3px dashed rgba(233, 201, 168, .35); border-radius: 4px; display: grid; place-items: center; }
.slot.empty .hook { position: absolute; top: -18px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #8A6A2A; box-shadow: 0 2px 0 #24150E; }
.slot.empty .reserved { width: 78%; text-align: center; font-size: 22px; background: rgba(246, 238, 223, .9); box-shadow: 2px 3px 0 rgba(0,0,0,.3); transform: rotate(-2deg); }
.slot.empty .reserved .label-sub { font-size: 17px; margin: 0; }

.kick { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; padding: 8px; opacity: 0; transition: opacity .15s; }
.kick img { width: 100%; height: 100%; object-fit: contain; }
.slot:hover .kick, .kick:focus-visible, .kick.confirm { opacity: 1; }
.kick.confirm { width: auto; height: auto; border-radius: 6px; padding: 8px 12px; font-size: 18px; font-weight: 800; background: var(--brand); color: #fff; }

/* The Curator, with a paper speech bubble. */
.curator { position: absolute; right: 44px; top: 176px; width: 270px; z-index: 2; }
.curator-says { position: relative; margin: 0 0 30px; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 18px 20px; font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--paper-ink); }
.curator-says::after { content: ''; position: absolute; left: 90px; bottom: -22px; width: 30px; height: 30px; background: var(--paper); border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(30deg) rotate(45deg); }
.curator-figure { width: 230px; margin-left: 20px; }
.curator { display: flex; flex-direction: column; }

.stage-bust { position: absolute; right: 90px; bottom: 40px; width: 200px; }

/* Controls along the wainscot. */
.controls { position: absolute; left: 70px; right: 70px; bottom: 30px; height: 96px; display: flex; align-items: center; gap: 32px; z-index: 3; }
.next-show { font-size: 22px; padding: 10px 18px; transform: rotate(-1deg); margin-left: 520px; }
.next-show .label-title { font-size: 26px; }
.count { color: var(--paper); font-size: 30px; font-weight: 800; margin-left: auto; }
.btn-start { border: 4px solid var(--ink); background: var(--accent); color: var(--ink); font-weight: 800; font-size: 34px; padding: 14px 40px; border-radius: 16px; box-shadow: 0 6px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn-start:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn-start:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-start:disabled { background: #B9A58A; color: #4A3D33; cursor: default; font-size: 26px; }
.btn-quiet { border: 2px solid rgba(246, 238, 223, .5); background: transparent; color: var(--paper); font-weight: 600; font-size: 20px; padding: 10px 18px; border-radius: 10px; }
.btn-quiet.confirm { background: var(--brand); border-color: var(--ink); }

.status { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-size: 24px; font-weight: 600; padding: 12px 24px; border-radius: 12px; z-index: 5; }

/* Stage (gameplay): pastel lavender with crisp confetti dots. */
.stage {
  background-color: var(--lavender);
  background-image: url('/assets/bg/stage-tv.webp'); background-size: cover;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
.stage-bubble { max-width: 1400px; padding: 30px 60px; border-radius: 48px; }
.stage-bubble::after { content: ''; position: absolute; left: 50%; bottom: -30px; margin-left: -20px; border: 20px solid transparent; border-top: 22px solid var(--ink); border-bottom: 0; }
.stage-bubble h1 { margin: 0; font-size: 84px; line-height: 1.1; text-align: center; }
.stage-sub { font-size: 32px; font-weight: 600; color: #4A3F66; margin: 10px 0 0; }
.stage-cast { display: flex; gap: 28px; }
.cast-member { width: 140px; text-align: center; font-weight: 800; font-size: 24px; color: var(--ink); }
.cast-member:nth-child(odd) { transform: translateY(-10px); }
.stage-timer { font-size: 64px; font-weight: 800; color: var(--brand); min-height: 80px; }

.overlay { position: fixed; inset: 0; background: rgba(30, 26, 29, .75); display: grid; place-items: center; z-index: 10; }
.overlay-card { font-size: 32px; padding: 40px; display: flex; flex-direction: column; gap: 24px; align-items: center; max-width: 700px; text-align: center; }

/* Share the player link (for a laptop host: paste it into the class chat). */
.share-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-share { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 800; font-size: 18px; padding: 8px 16px; border-radius: 10px; min-height: 48px; box-shadow: 0 3px 0 var(--ink); }
.btn-share:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
