:root {
  color-scheme: dark;
  --bg: #101a19;
  --panel: #182522;
  --panel-raised: #1d2b27;
  --field: #121d1b;
  --text: #eee9dc;
  --muted: #a9b5aa;
  --gold: #e7bd72;
  --gold-light: #f3cf8b;
  --gold-dark: #4a3e29;
  --green: #84be9d;
  --line: #33423a;
  --red: #f1a199;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 42% 2%, #1c2a23, transparent 56%), var(--bg); }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button, input, select { border: 1px solid var(--line); border-radius: 6px; min-height: 43px; }
button { padding: .56rem .9rem; font-weight: 650; color: var(--text); background: var(--panel-raised); }
button:hover:not(:disabled) { background: #294036; border-color: #697759; }
button:disabled { opacity: .53; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: var(--gold); text-decoration: none; }
input, select { background: var(--field); color: var(--text); padding: .62rem .72rem; width: 100%; }
input::placeholder { color: #788a7e; opacity: 1; }
input[type=checkbox] { width: auto; min-height: auto; accent-color: var(--gold); }
button.primary { background: var(--gold); border-color: var(--gold); color: #221e17; }
button.primary:hover:not(:disabled) { background: var(--gold-light); border-color: var(--gold-light); }
button.danger { color: var(--red); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: .99rem; font-weight: 670; }
.frame { width: min(1190px, calc(100% - 64px)); margin-inline: auto; }
main { flex: 1; padding-bottom: 46px; }
.masthead { min-height: 67px; border-bottom: 1px solid #2c4035; background: #111d1b; }
.bar, .bar-right { display: flex; align-items: center; gap: .9rem; }
.bar { justify-content: space-between; min-height: 67px; }
.brand { display: flex; align-items: center; gap: .69rem; font: 1.15rem var(--serif); color: #f0eadc; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 500; }
.brand-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #947747; border-radius: 4px; background: #2b2c20; }
.brand-icon i { height: 8px; width: 15px; border: 1px solid var(--gold); border-radius: 9px 9px 0 0; position: relative; }
.brand-icon i::before { content: ''; position: absolute; width: 3px; height: 3px; background: var(--gold); border-radius: 50%; left: 5px; top: -4px; }
.brand-icon i::after { content: ''; position: absolute; width: 19px; height: 1px; background: var(--gold); left: -3px; bottom: -3px; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.connection i, .presence { width: 7px; height: 7px; border-radius: 50%; background: #ad9662; flex: 0 0 7px; }
.connection.online i, .presence.online { background: #8bc7a3; box-shadow: 0 0 10px #8bc7a34d; }
.header-room { color: var(--gold); font-weight: 700; font-size: .82rem; letter-spacing: .13em; }
.hero { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: clamp(28px, 5vw, 78px); padding: 41px 0 41px; border-bottom: 1px solid var(--line); }
.hero-copy { padding: 4px 0 0; }
.eyebrow { color: var(--gold); display: flex; align-items: center; gap: 10px; font-size: .68rem; font-weight: 760; letter-spacing: .20em; }
.eyebrow span { display: inline-block; width: 19px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(3.35rem, 6.3vw, 6.3rem); line-height: .96; letter-spacing: -.066em; margin: 17px 0 22px; white-space: nowrap; }
.hero h1 em { color: var(--gold); display: block; font-weight: inherit; }
.hero p { max-width: 370px; min-height: 3lh; color: #bec7bb; font-size: clamp(.95rem, 1.16vw, 1.1rem); line-height: 1.57; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 21px; color: var(--muted); font-size: .78rem; }
.hero-meta span { display: inline-flex; gap: 7px; align-items: center; }
.hero-meta i { color: var(--gold); font-style: normal; font-size: 1rem; }
.hero-art { position: relative; aspect-ratio: 620 / 394; border-radius: 8px; border: 1px solid #4a4b35; padding: 6px; background: #13211d; box-shadow: 0 15px 32px #080f0d47; }
.hero-art picture { display: block; width: 100%; height: 100%; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; image-rendering: pixelated; }
.corner { position: absolute; width: 16px; height: 16px; border: solid #b08d54; pointer-events: none; }
.top-left { top: 3px; left: 3px; border-width: 1px 0 0 1px; border-radius: 4px 0 0; }
.top-right { top: 3px; right: 3px; border-width: 1px 1px 0 0; border-radius: 0 4px 0 0; }
.bottom-left { bottom: 3px; left: 3px; border-width: 0 0 1px 1px; border-radius: 0 0 0 4px; }
.bottom-right { bottom: 3px; right: 3px; border-width: 0 1px 1px 0; border-radius: 0 0 4px; }
.entry-grid { display: grid; grid-template-columns: 1.24fr .76fr; gap: 27px; padding-top: 28px; align-items: start; }
.mode-section h2, .join-panel h2 { margin-bottom: 14px; }
.mode-list { display: grid; gap: 8px; }
.mode-tile { text-align: left; width: 100%; min-height: 66px; padding: 9px 13px; display: grid; grid-template-columns: 39px 1fr 18px; align-items: center; gap: 11px; background: #192622; border-color: #334239; }
.mode-tile.solo { background: #2d2c20; border-color: #695839; }
.mode-tile.solo:hover { background: #3a3525; border-color: #a98955; }
.mode-tile strong { display: block; font-size: .94rem; }
.mode-tile small { display: block; color: var(--muted); font-size: .77rem; font-weight: 440; margin-top: 2px; }
.mode-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 5px; color: var(--gold); background: #27382f; font-size: 1.16rem; }
.solo .mode-icon { background: #4b3b23; }
.mode-tag { color: #bec2a5; font: 700 .59rem system-ui; margin-left: .33rem; letter-spacing: .075em; white-space: nowrap; }
.arrow { color: var(--gold); font-size: 1.05rem; justify-self: end; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 17px; }
.join-panel { padding: 17px 20px; }
form { display: grid; gap: 7px; }
form label, .setting label { margin-top: 3px; font-size: .78rem; color: #cbd0bd; font-weight: 650; }
form button[type=submit] { margin-top: 5px; }
.join-panel form .primary { display: flex; align-items: center; justify-content: space-between; }
.code-input { text-transform: uppercase; letter-spacing: .18em; font-weight: 700; }
summary { color: #bfcbbe; font-size: .82rem; padding: 11px 1px 0; }
#public-list { display: grid; gap: 6px; padding-block-start: 10px; font-size: .82rem; color: var(--muted); }
#public-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
.text-button { border: 0; background: transparent; padding-left: 0; color: var(--gold); font-size: .85rem; text-align: left; }
.footer { border-top: 1px solid #392540; background: #130e1c; color: #bfb4cf; font-size: .76rem; }
.footer-inner { display: grid; justify-items: center; gap: 12px; padding-block: 27px 15px; }
.visitor-counter {
  width: min(100%,316px); padding: 14px 18px 16px;
  color: #f8f3fc; background: #20162c; border: 1px solid #654575; border-radius: 14px;
}
.visitor-counter h2 { color: #ffda7d; font: bold 1.55rem/1.2 var(--serif); text-align: center; }
.visitor-display {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: fit-content; max-width: 100%; margin: 10px auto 13px;
  padding: 3px 5px; border: 1px solid #634a30; border-radius: 4px; background: #1d1510;
  color: #a57934; line-height: 28px; min-height: 37px;
}
.visitor-digit { position: relative; display: block; width: 18px; height: 28px; }
.visitor-digit i { position: absolute; display: block; background: #493219; }
.visitor-digit .lit { background: #ffcf65; filter: drop-shadow(0 0 2px #f7a640); }
.visitor-digit i:nth-child(1), .visitor-digit i:nth-child(4), .visitor-digit i:nth-child(7) {
  left: 1px; width: 16px; height: 3px; clip-path: polygon(0 50%,13% 0,87% 0,100% 50%,87% 100%,13% 100%);
}
.visitor-digit i:nth-child(1) { top: 0; }
.visitor-digit i:nth-child(4) { bottom: 0; }
.visitor-digit i:nth-child(7) { top: 12.5px; }
.visitor-digit i:nth-child(2), .visitor-digit i:nth-child(3), .visitor-digit i:nth-child(5), .visitor-digit i:nth-child(6) {
  width: 3px; height: 12px; clip-path: polygon(50% 0,100% 17%,100% 83%,50% 100%,0 83%,0 17%);
}
.visitor-digit i:nth-child(2), .visitor-digit i:nth-child(3) { right: 0; }
.visitor-digit i:nth-child(5), .visitor-digit i:nth-child(6) { left: 0; }
.visitor-digit i:nth-child(2), .visitor-digit i:nth-child(6) { top: 1.5px; }
.visitor-digit i:nth-child(3), .visitor-digit i:nth-child(5) { bottom: 1.5px; }
.visitor-stats { display: grid; gap: 7px; margin: 0; font-size: .82rem; }
.visitor-stats > div, .visitor-stats dt { display: flex; align-items: center; gap: 7px; }
.visitor-stats > div { justify-content: space-between; }
.visitor-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.visitor-icon { display: inline-block; flex: 0 0 14px; height: 14px; position: relative; color: #edbe69; }
.visitor-icon.person::before, .visitor-icon.people::before {
  content: ''; position: absolute; inset: 0 auto auto 4px; width: 6px; height: 6px; border: 1px solid; border-radius: 50%;
}
.visitor-icon.person::after, .visitor-icon.people::after {
  content: ''; position: absolute; inset: auto auto 0 2px; width: 10px; height: 7px; border: 1px solid;
  border-bottom: 0; border-radius: 6px 6px 0 0;
}
.visitor-icon.people::before, .visitor-icon.people::after { margin-left: -1px; box-shadow: 3px 0 0 -2px currentColor; }
.visitor-icon.calendar::before {
  content: '· ·'; position: absolute; inset: 1px; border: 1px solid; border-radius: 2px;
  font: bold 8px/8px system-ui; text-align: center; background: linear-gradient(currentColor,currentColor) center 2px/100% 1px no-repeat;
}
.visitor-icon.bars::before {
  content: ''; position: absolute; inset: 1px; background: linear-gradient(currentColor,currentColor) left bottom/1.5px 35% no-repeat,
    linear-gradient(currentColor,currentColor) center bottom/1.5px 65% no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/1.5px 95% no-repeat;
}
.visitor-credit { margin-top: 14px; text-align: center; color: #c9b8de; font-size: .72rem; }
.room-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 23px 0 17px; }
.room-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.room-header .eyebrow { margin-bottom: 7px; }
.toolbar, .actions, .dialog-actions, .chat-form, .setting-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar button { font-size: .82rem; white-space: nowrap; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); gap: 16px; }
.lobby-grid > div { display: grid; gap: 13px; align-content: start; min-width: 0; }
.lobby-invite { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, #26342a, #1a2823); }
.lobby-invite img { display: block; width: min(36%, 152px); height: auto; border: 4px solid #f4ede0; border-radius: 6px; }
.room-code { display: block; color: var(--gold-light); font-variant-numeric: tabular-nums; font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 780; letter-spacing: .15em; margin: 4px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.section-head span, .muted, .setting-readonly { color: var(--muted); font-size: .82rem; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 7px; }
.player { min-width: 0; display: flex; gap: 8px; align-items: center; padding: 8px; background: #121e1b; border: 1px solid #293b32; border-radius: 6px; }
.player.active { border-color: var(--gold); background: #2d2c20; }
.player.eliminated { opacity: .65; }
.avatar { display: inline-grid; place-items: center; background: var(--character); color: #171d18; font-size: .72rem; font-weight: 800; border-radius: 4px; height: 31px; width: 31px; flex: 0 0 31px; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.player-info { min-width: 0; flex: 1; }
.player-info strong, .player-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-info strong { font-size: .84rem; }
.player-info small { color: var(--muted); font-size: .68rem; margin-top: 2px; }
.settings { display: grid; gap: 8px; }
.setting-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(112px, 1fr); align-items: center; }
.setting-row select { min-width: 0; }
.bot-list { display: grid; gap: 6px; }
.bot-setting { display: grid; grid-template-columns: minmax(65px, 1fr) minmax(96px, 1fr) auto; gap: 6px; align-items: center; }
.bot-setting label { font-size: .8rem; color: var(--muted); }
.full { width: 100%; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(290px, 1fr); gap: 13px; align-items: start; }
.game-main, .game-side, .game-private { display: grid; gap: 12px; min-width: 0; }
.game-topline { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin-bottom: 12px; }
.game-topline strong { color: var(--gold-light); font-size: 1rem; }
.timer { white-space: nowrap; color: var(--gold-light); font: 760 1rem system-ui; font-variant-numeric: tabular-nums; min-width: 45px; text-align: right; }
.timer.urgent { color: var(--red); }

.section-lite { display: grid; gap: 8px; }
.clue-row, .hand { display: flex; gap: 6px; flex-wrap: wrap; align-items: start; }
.card { display: inline-flex; flex-direction: column; gap: 2px; background: #2c3029; border: 1px solid #555149; border-left: 3px solid #d5b983; border-radius: 5px; padding: 6px 8px; font-size: .77rem; }
.card small { font-size: .59rem; letter-spacing: .065em; text-transform: uppercase; color: #d3c7b1; }
.card.suspect { border-left-color: #e88986; background: #352a2a; }
.card.room { border-left-color: #87c6b3; background: #273936; }
.card.item { border-left-color: #d6ad70; background: #3c3327; }
.card.card-with-art { display: inline-grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 6px; max-width: 100%; }
.card-with-art img { display: block; width: 40px; height: 40px; object-fit: contain; }
.card-label { display: grid; gap: 2px; overflow-wrap: anywhere; }
.status-player { display: flex; align-items: center; gap: 9px; }
.status-player strong, .status-player small { display: block; }
.status-player small { color: var(--muted); font-size: .78rem; }
.status-player .avatar { height: 38px; width: 38px; flex-basis: 38px; }
.turn-label { color: var(--gold-light); font-weight: 700; }
.actions button { flex: 1 1 113px; }
.targets { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; max-height: 235px; overflow: auto; }
.targets button { display: flex; justify-content: space-between; align-items: center; gap: 4px; width: 100%; text-align: left; font-size: .81rem; }
.targets button span:last-child { color: var(--gold); white-space: nowrap; }
.section-label { font-size: .75rem; color: var(--muted); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.reveal { color: var(--gold-light); font-size: .83rem; }
.log { list-style: none; padding: 0; margin: 0; max-height: 229px; overflow: auto; font-size: .82rem; }
.log li { border-top: 1px solid #334239; padding: 7px 1px; overflow-wrap: anywhere; }
.log li:first-child { border-top: 0; }
.log .turn, .log .system { color: var(--gold-light); }
.log .chat { color: #a5cfb6; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.chat-form button[type=submit] { margin-top: 0; }
.notice { position: fixed; z-index: 20; right: 16px; bottom: 16px; max-width: min(390px, calc(100% - 32px)); padding: 13px 15px; border: 1px solid #8e7550; border-radius: 7px; background: #302d22; box-shadow: 0 6px 28px #0007; font-size: .88rem; }
dialog { width: min(460px, calc(100% - 28px)); color: var(--text); border: 1px solid #7d6948; border-radius: 9px; background: #1c2a25; padding: 19px; }
dialog::backdrop { background: #080e0bba; }
dialog h2 { margin-bottom: 7px; }
dialog p { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.dialog-actions { justify-content: flex-end; margin-top: 8px; }
#action-dialog .card { align-items: flex-start; }
.refutation-list { display: grid; gap: 6px; margin-top: 10px; }
.refutation-list button { text-align: left; }
.notebook h3 { margin-top: 7px; color: var(--gold); }
.note-list { display: grid; gap: 3px; padding: 0; margin: 5px 0 0; list-style: none; }
.note-row { display: grid; grid-template-columns: minmax(0,1fr) auto 1fr; gap: 5px; align-items: center; min-height: 37px; padding: 3px 4px; border-bottom: 1px solid #314238; font-size: .78rem; }
.note-row span { overflow-wrap: anywhere; }
.note-row em { font-size: .63rem; font-style: normal; color: #aad1b6; text-align: right; }
.note-row select { min-height: 35px; min-width: 44px; padding: 3px 4px; }
.tablist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tablist button[aria-selected=true] { border-color: #b8965b; color: var(--gold-light); background: #332e22; }
.result { background: #2d2e22; border-color: #89744e; display: grid; gap: 8px; }
.controller-grid { max-width: 650px; margin-inline: auto; display: grid; gap: 9px; }
.controller-header { max-width: 650px; margin-inline: auto; }
.controller-grid button, .controller-grid select { min-height: 46px; }
.controller-grid .tablist button { min-height: 45px; }
.display-room .game-grid { grid-template-columns: minmax(0, 2.45fr) minmax(240px, 1fr); }
.display-room .player-grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
body:has(.display-room) .frame { width: min(1700px, calc(100% - 48px)); }
.room-open .masthead { position: sticky; top: 0; z-index: 3; }
.fullscreen-toggle { min-height: 36px; font-size: .79rem; white-space: nowrap; }
.fullscreen-toggle[aria-pressed=true] { border-color: var(--gold); color: var(--gold-light); }
#game-menus { display: flex; gap: 5px; }
#launch-wait { margin-block-start: 24px; color: var(--muted); }
.hud-menu { position: relative; }
.hud-menu summary { min-height: 36px; padding: .53rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-raised); color: var(--text); white-space: nowrap; font-weight: 650; font-size: .79rem; }
.hud-menu[open] summary { border-color: var(--gold); }
.hud-popover { position: absolute; z-index: 2; top: calc(100% + 5px); right: 0; width: min(295px, calc(100vw - 28px)); display: grid; gap: 8px; max-height: min(66vh, 500px); overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 6px 24px #080e0b99; font-size: .82rem; }
.hud-popover dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.hud-popover dt { color: var(--muted); }
.hud-popover dd { margin: 0; }
.hud-popover p { line-height: 1.4; }
.hud-popover input[type=range] { accent-color: var(--gold); min-height: 32px; padding: 0; }
html:fullscreen { overflow: auto; }
@media (prefers-reduced-motion: reduce) {
}
@media (min-width: 1500px) {
  .display-room .game-grid { grid-template-columns: minmax(0, 2.55fr) minmax(300px, 1fr); }
  .display-room .log { max-height: 360px; }
}
@media (max-width: 890px) {
  .frame { width: min(100% - 38px, 1190px); }
  .hero { gap: 19px; padding: 30px 0; }
  .hero h1 { font-size: clamp(2.85rem, 7.7vw, 5rem); }
  .entry-grid { gap: 13px; }
  .game-grid, .display-room .game-grid { grid-template-columns: minmax(0, 1fr); }
  .game-side { grid-row: 2; }
}
@media (max-width: 600px) {
  .frame, body:has(.display-room) .frame { width: calc(100% - 28px); }
  main { padding-bottom: 25px; }
  .bar, .masthead { min-height: 57px; }
  .brand { font-size: .98rem; gap: 7px; }
  .brand-icon { width: 27px; height: 27px; }
  .connection { font-size: .68rem; gap: 5px; }
  .bar-right { gap: 6px; }
  .header-room { font-size: .67rem; }
  .hero { grid-template-columns: 1fr; gap: 17px; padding: 22px 0; }
  .hero h1 { font-size: clamp(2.55rem, 11vw, 4.1rem); line-height: 1; margin: 10px 0; white-space: normal; }
  .hero h1 em { display: inline; }
  .hero p { font-size: .92rem; min-height: 0; }
  .hero-meta { margin-top: 10px; }
  .hero-art { aspect-ratio: 620 / 330; }
  .entry-grid, .lobby-grid { grid-template-columns: 1fr; gap: 15px; padding-top: 17px; }
  .join-panel { padding: 13px; }
  .mode-tile { min-height: 67px; }
  .room-header { padding: 17px 0 11px; align-items: flex-start; flex-wrap: wrap; }
  .room-header h1 { font-size: 2rem; }
  .room-header .toolbar { gap: 5px; }
  .bar:has(#game-menus:not([hidden])) { position: relative; padding-bottom: 48px; }
  #game-menus { position: absolute; inset: auto 0 6px; }
  #game-menus .hud-menu { flex: 1; position: static; }
  .hud-menu summary { min-height: 40px; }
  .fullscreen-toggle { min-height: 40px; padding-inline: .5rem; }
  .room-open .bar-right { gap: 5px; }
  .room-open .connection span { display: none; }
  .panel { padding: 12px; }
  .player-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  #landing.invited .entry-grid { display: flex; flex-direction: column-reverse; }
  #landing.invited .entry-grid > section { width: 100%; }
}

.desktop-targets { display: grid; gap: 7px; }
.touch-targets { display: none; }
.controller-grid .desktop-targets { display: none; }
.controller-grid .touch-targets { display: grid; gap: 6px; min-width: 0; }
.center-carousel { min-width: 0; max-width: 100%; }
.center-controls { display: grid; grid-template-columns: 35px minmax(0, 1fr) 35px; align-items: center; gap: 3px; }
.center-controls > button { padding: .2rem; min-height: 42px; font-size: 1.25rem; }
.center-window { --cell: min(60%, 186px); position: relative; min-width: 0; }
.center-window::after {
  content: ''; pointer-events: none; position: absolute; z-index: 1;
  inset-block: 4px; left: 50%; width: var(--cell); transform: translateX(-50%) scale(1.10);
  border: 1px solid #dbb26e; box-shadow: inset 0 0 14px #c38d302c, 0 0 10px #dca35b38; border-radius: 8px;
}
.center-track {
  position: relative; display: flex; align-items: center; gap: 7px; width: 100%;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 5px;
  touch-action: pan-x pan-y; cursor: grab; -webkit-overflow-scrolling: touch;
}
.center-track::-webkit-scrollbar { display: none; }
.center-track::before, .center-track::after { content: ''; flex: 0 0 max(0px, calc((100% - var(--cell)) / 2 - 7px)); }
.center-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.center-track:focus-visible { outline: 1px solid #ddb771; outline-offset: -2px; border-radius: 8px; }
.center-card {
  flex: 0 0 var(--cell); min-width: 0; align-self: stretch; min-height: 100px; padding: 4px 5px;
  display: grid; place-items: center; align-content: center; gap: 1px; border-color: #79634088;
  background: #222b23; border-radius: 7px; text-align: center; scroll-snap-align: center;
  scale: .86; opacity: .53; transition: scale 130ms ease-out, opacity 130ms ease-out;
  user-select: none; line-height: 1.16;
}
.center-card[aria-selected="true"] { scale: 1.08; opacity: 1; background: #3a3827; }
.center-card img { width: 74px; height: 50px; display: block; object-fit: contain; pointer-events: none; transition: transform 130ms ease-out; }
.center-card[data-side="left"] img { transform: translateX(18px); }
.center-card[data-side="right"] img { transform: translateX(-18px); }
.center-card strong { display: block; font-size: .79rem; overflow-wrap: anywhere; }
.center-card small { font-size: .71rem; color: var(--muted); }
.carousel-field { margin: 0 0 5px; padding: 2px 3px 4px; min-width: 0; border: 0; }
.carousel-field legend { color: #efd09a; padding: 0; font-size: .84rem; }
.select-alternative { padding: 0 .25rem; font-size: .76rem; }
.select-alternative summary { margin: 2px 0; }
@media (max-width: 767px) {
  .desktop-targets { display: none; }
  .touch-targets { display: grid; gap: 6px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .center-card, .center-card img { transition: none; }
}

/* Filmische Startseite */
:root { --gold: #dfb678; --bg: #101714; --panel: #19241e; }
body { min-height: 100dvh; overflow-x: clip; }
body:has(#landing:not([hidden])) {
  background: #101714;
}
body:has(#landing:not([hidden])) .masthead { background: #111915; border-bottom-color: #9c794344; }
#landing > .hero {
  isolation: isolate;
  position: relative;
  min-height: clamp(450px,64dvh,710px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) 1fr;
  align-items: end;
  padding: 48px 0 clamp(45px,9vh,100px);
  border: 0;
}
.hero-photo { position: absolute; z-index: -2; inset: 0 auto -62px 50%; width: 100vw; transform: translateX(-50%); overflow: hidden; background: #13211b; }
.hero-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #0d1412f0, #0d141295 35%, transparent 76%),
    linear-gradient(0deg,#101714 1%,#10171413 43%,#10171431 87%,#1017145c);
}
.hero-copy { z-index: 1; text-shadow: 0 2px 18px #09110dc9; }
.hero h1 { font-size: clamp(3.9rem,8vw,8.8rem); margin: 14px 0 14px; letter-spacing: -.055em; }
.hero p { min-height: 0; color: #ede3cb; }
.hero h1 em { font-style: italic; color: #efd1a0; }
.hero-meta { color: #eee0be; }
#landing .entry-grid { position: relative; z-index: 1; padding-top: 21px; }
#landing .mode-section, #landing .join-panel { border: 1px solid #aa85534d; background: linear-gradient(150deg,#1d2821f5,#131d18f7); border-radius: 8px; padding: 1.15rem; }
#landing .mode-tile { background: #263027b5; border-color: #a8865440; }
#landing .mode-tile.solo { background: #4434219e; border-color: #b38b51a0; }
#landing .mode-tile:hover { border-color: #d3a76a; }
.room-credit { font-size: .79rem; color: #beac88; margin-top: .2rem; }
.hotel-lobby {
  --hotel-lobby-photo: image-set(url('/assets/world/hotel-wide-9653e474ff77.avif') type('image/avif'),
    url('/assets/world/hotel-wide-e4c9e9a28835.webp') type('image/webp'));
  background: linear-gradient(180deg,#0d1814c4 0,#101714 86dvh) top center / 100% 100% no-repeat,
    var(--hotel-lobby-photo) center top / max(100%,1300px) auto no-repeat, #101714;
}
@media (orientation: portrait) {
  #landing > .hero {
    min-height: clamp(425px,66dvh,650px);
    grid-template-columns: minmax(0,1fr);
    padding-block: 35px 20px;
  }
  .hero-photo { inset-block-end: -42px; }
  .hero-photo img { object-position: center 49%; }
  .hero-photo::after {
    background: linear-gradient(0deg,#101714 0,#101714f0 10%,#10171463 46%,#10171404 69%,#10171421);
  }
  .hero h1 { font-size: clamp(3.1rem, 11vw, 6rem); }
  .hero h1 em { display: inline; }
  .hotel-lobby {
    --hotel-lobby-photo: image-set(url('/assets/world/hotel-portrait-6b91cca0e41d.avif') type('image/avif'),
      url('/assets/world/hotel-portrait-8ffb061a0049.webp') type('image/webp'));
    background: linear-gradient(#0d1814c4,#101714 85dvh),
      var(--hotel-lobby-photo) center top / 100% auto no-repeat, #101714;
  }
}
@media (orientation: portrait) and (min-width: 768px) {
  .hotel-lobby {
    --hotel-lobby-photo: image-set(url('/assets/world/hotel-portraitwide-c05ed345ace9.avif') type('image/avif'),
      url('/assets/world/hotel-portraitwide-6b34acaaddc3.webp') type('image/webp'));
  }
}

/* Spieltisch und gemeinsamer Kartenstil */
.tabletop-game main.frame { width: min(1540px,calc(100% - 46px)); }
.tabletop-game .game-grid { grid-template-columns: minmax(0,1fr) clamp(215px,21vw,340px); }
.tabletop-game .game-side { gap: .55rem; }
.tabletop-game .room-header { padding-block: 15px 9px; }
.tabletop-game .room-header h1 { font-size: clamp(2rem,4vw,2.7rem); }
.table-panel { min-width: 0; }
.table-head { min-height: 48px; display: flex; gap: .8rem; align-items: baseline; padding-inline: .5rem; }
.table-head h2 { font-size: 1.6rem; }
.table-head p { margin-left: auto; font-size: .85rem; text-align: right; color: #dccaac; }
.table-surface {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16/9; width: 100%;
  container-type: inline-size; border-radius: 9px; background: #122a1c;
  box-shadow: 0 20px 55px #070d09aa, 0 0 0 1px #885e32;
}
.table-photo, .table-routes, .table-rooms, .table-pieces, .table-bubbles { position: absolute; inset: 0; width: 100%; height: 100%; }
.table-photo { object-fit: cover; }
.table-routes, .table-pieces, .table-bubbles { pointer-events:none; }
.table-routes i, .table-routes span { position: absolute; }
.table-routes i { transform-origin: left center; height: max(1px,.24cqw); background: #cbab67; opacity: .63; box-shadow: 0 0 .4cqw #e3c18f90; }
.table-routes span {
  transform: translate(-50%,-50%); border: 1px solid #b69258; border-radius: 3px; padding: 0 .3em;
  font-size: max(.61rem,1.3cqw); color: #ebd0a1; background: #1b2b1d; font-variant-numeric: tabular-nums;
}
.table-location, .table-waypoint { position: absolute; translate: -50% -50%; }
.table-location {
  width: 12.2%; height: 32.5%; padding: 0; z-index: 1; overflow: hidden; opacity: 1;
  background: #19231b; border: 1px solid #b28a52; border-radius: .65cqw;
  box-shadow: 0 3px 8px #000b, inset 0 0 0 2px #d5a35b33;
}
.table-location img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .98; }
.table-location strong, .table-lift {
  position: absolute; inset: auto 0 0; padding: .38em .1em; background: #141d16ea;
  color: #f5e1b5; font: 600 max(.58rem,1.5cqw) var(--serif); line-height: 1.05; text-shadow: 0 1px 5px #000;
}
.table-lift { inset: 0 0 auto auto; padding: .25em .35em; font: 725 max(.45rem,.95cqw) system-ui; color: #f5d490; }
.table-location:disabled { opacity:1; }
.table-location.off-deck { filter: grayscale(.6) brightness(.53); }
.table-location.reachable, .table-location.reachable:hover:enabled { border: 2px solid #ffdc84; box-shadow: 0 0 1.4cqw #ffd876b9, inset 0 0 1cqw #ffdb6670; }
.table-waypoint { z-index: 2; padding: 0; min-height: 0; width: 3.8cqw; aspect-ratio: 1; border-radius: 50%; font-size: 1.7cqw; color: #ffde9a; border-color: #e4b85a; background: #413421; }
.table-middle { position: absolute; inset: 36.5% 34% auto; display: flex; align-items: center; justify-content: center; gap: .95cqw; }
.table-case { flex: 0 0 62%; position: relative; text-align: center; }
.envelope-art { aspect-ratio: 252/174; background-image: var(--envelope); background-size: 600% 100%; background-repeat:no-repeat; }
.table-case strong { position: absolute; inset: auto 6% 14%; font: 700 1.03cqw var(--serif); letter-spacing: .06em; text-transform: uppercase; color: #261b12; }
.table-case.open .envelope-art { animation: seal-open 1s steps(5,end) both; }
@keyframes seal-open { to { background-position: 100% 0; } }
.table-deck, .table-clues { min-width: 0; flex: 0 0 35%; text-align: center; color: #dbc5a0; font-size: max(.54rem,.95cqw); }
.table-deck { display:flex; align-items:center; justify-content:center; padding-inline:.75cqw; }
.table-deck img {
  flex:0 0 42%; width:42%; min-width:0; aspect-ratio:112/164; position:relative;
  border-radius:.4cqw; box-shadow:.12cqw .38cqw .5cqw #071009d9; margin-inline-start:-1.1cqw;
}
.table-deck img:first-child { rotate:-13deg; margin-inline-start:0; }
.table-deck img:last-child { rotate:13deg; }
.table-decoration { position:absolute; inset:0; pointer-events:none; }
.table-decoration .prop-block, .table-decoration .prop-die { position:absolute; width:6%; height:auto; bottom:2%; opacity:.92; }
.prop-block { left:3%; rotate:-17deg; }
.prop-die { right:4%; rotate:21deg; }
.candle-light {
  position:absolute; top:-.4%; left:1.75%; width:5%; aspect-ratio:36/48;
  background:var(--candle-atlas) no-repeat 0 0 / 600% 100%; opacity:.48; mix-blend-mode:screen;
  animation:candle-flicker 1.6s steps(6,jump-none) infinite alternate;
}
.candle-light.right { left:auto; right:1.55%; animation-delay:-.72s; }
@keyframes candle-flicker { to { background-position:100% 0; opacity:.72; } }
.table-dice {
  position:absolute; z-index:6; left:50%; top:53%; translate:-50% -50%; width:17%;
  border:1px solid #dcb06c; border-radius:.7cqw; background:#0e1c14ee; text-align:center;
  padding:.55cqw; box-shadow:0 0 2cqw #d1a96b80; color:#f8deb3; font:700 max(.75rem,1.35cqw) var(--serif);
}
.table-dice span {
  display:block; width:86%; margin:auto; aspect-ratio:112/78;
  background:var(--dice-atlas) no-repeat 0 0 / 600% 100%;
}
.table-dice.rolling span { animation:dice-rattle .67s steps(6,jump-none) both,dice-travel .77s ease-out both; }
.table-dice.rolling output { animation:verdict-in .22s .58s both; }
@keyframes dice-rattle { to { background-position:100% 0; } }
@keyframes dice-travel { from { transform:translateX(-22%) scale(.8); } 76% { transform:none; opacity:1; } to { opacity:0; } }
.table-clues .card { padding: .1cqw .25cqw; font-size: max(.42rem,.82cqw); min-width: 0; max-width: 100%; line-height:1.04; overflow-wrap:anywhere; }
.table-clues img, .table-clues .card small { display:none; }
.table-clues > div { display: grid; gap:.3cqw; color:#e4caa2; }
.table-pieces { z-index: 3; }
.table-pieces canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.table-figure { position: absolute; translate: -50% -90%; width: 4%; height: auto; filter: drop-shadow(0 3px 3px #0009); }
.table-figure.active { filter: drop-shadow(0 2px 3px #ffd983ae); }
.table-bubbles { z-index: 5; }
.table-bubbles span {
  position: absolute; translate: -50% -100%; width: max-content; max-width: 26cqw;
  border: 1px solid #d5aa62; border-radius: 5px; background: #101a14f5; color: #f3e5c8;
  font-size: max(.63rem,1.35cqw); padding: .35em .6em; overflow-wrap: anywhere;
}
.table-credit {
  position: absolute; z-index: 4; left: 50%; bottom: 1.6%; translate: -50%;
  width: max-content; color: #281d15; text-shadow: 0 1px #f4d29691; letter-spacing: .07em;
  font: 700 max(.55rem,1.02cqw) var(--serif); background: linear-gradient(105deg,#846334,#dabb7c 43%,#a48049);
  box-shadow: 0 2px 4px #000c; border: 1px solid #e6bf828f; border-radius: 3px; padding: .25em .8em;
}
.table-verdict {
  position: absolute; z-index: 6; inset: 33% 21% auto; padding: .6cqw;
  display: grid; justify-items: center; gap: .45cqw; color: #f1dcb0; background: #111f18f5;
  border: 1px solid #e0b372; border-radius: 6px; font-size: max(.7rem,1.4cqw);
  animation: verdict-in .45s 1s ease-out both;
}
@keyframes verdict-in { from { opacity:0; transform:translateY(.6rem); } to { opacity:1; transform:none; } }
.table-verdict button { min-height: 29px; font-size: max(.62rem,1.15cqw); padding: .2em .6em; }
.table-solution { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45cqw; width:100%; }
.table-solution .card { min-width:0; padding:.25em; font-size:max(.57rem,1.1cqw); text-align:center; }
.table-solution .card img { width: 3.9cqw; height: 3.9cqw; }
.table-legend { flex-wrap:wrap; display:flex; gap: .35rem 1rem; color:#bdb293; font-size:.72rem; padding:.55rem .3rem; }

#desktop-hand { grid-column:1/-1; background: linear-gradient(#222b2233,#101814); border:1px solid #9a7a4c55; border-radius:8px; padding:.5rem .75rem; }
.card-fan { display:flex; justify-content:center; padding:1.15rem 1.25rem .4rem; isolation:isolate; }
.playing-card, .playing-card:hover:not(:disabled) {
  background: #171f17; border:1px solid #ae8751; box-shadow: inset 0 0 0 2px #302b1b,0 6px 12px #080f0bc9;
  border-radius:7px; color:#f1dbb2; min-width:0; padding:5px;
}
.playing-card .card { position:relative; width:100%; height:auto; display:block; text-align:center; border:0; padding:0; background:transparent; color:inherit; }
.playing-card .card img { width:100%; height:auto; aspect-ratio:2/3; object-fit:contain; border:1px solid #9777435c; border-radius:4px; }
.playing-card .card-label { font:600 clamp(.73rem,1.12vw,1.02rem) var(--serif); overflow-wrap:anywhere; display:block; }
.playing-card .card-label small { display:block; font:650 .58rem/1.05 system-ui; letter-spacing:.025em; margin:0 0 .11rem; }
.playing-card .card-with-art .card-label {
  position:absolute; inset:auto 2.8% 2.8%; min-height:18%; padding:0 .2rem; align-content:center;
  text-shadow:0 1px 5px #0f140c;
}
.card-fan .playing-card .card-label small { font-size:.52rem; margin:0 0 .11rem; }
.compact-game .playing-card .card-label { font-size:.94rem; }
.card-fan .playing-card {
  position:relative; width:clamp(76px,10vw,138px); flex:0 1 auto; margin:0 clamp(-21px,-1vw,-4px);
  transform:translateY(var(--dip)) rotate(var(--tilt)); transform-origin:50% 90%;
  transition:transform .23s ease-out;
}
.card-fan .playing-card:is(:hover,:focus-visible,[aria-pressed=true]) {
  z-index:2; transform:translateY(-13px) rotate(0) scale(1.12); border-color:#ffe098; animation:none;
}
.dealing-card { position:fixed; z-index:40; pointer-events:none; object-fit:fill; border-radius:6px; box-shadow:0 7px 16px #0a100dbb; }

.compact-game { background: #131d17 url('/assets/tabletop/filz-8548dda949f6.webp') repeat; }
.compact-game main.frame { width: min(1120px,calc(100% - 24px)); }
.compact-game .game-grid, .compact-game .controller-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:.7rem; }
.compact-game .game-main { order:2; }
.compact-game .game-side { order:1; }
.compact-game .panel { background:#19241eea; }
.controller-grid .panel { width:100%; }
.compact-game .desktop-targets { display:none; }
.compact-game .touch-targets { display:grid; gap:.5rem; min-width:0; }
.compact-game .card-hand { display:grid; gap:.65rem; grid-template-columns:repeat(auto-fit,minmax(min(126px,100%),1fr)); margin-block:.5rem 0; }
.compact-game .playing-card { padding:7px; }
.compact-game .center-card { min-height:137px; }
.compact-game .center-card img { width: min(100%,132px); height:106px; border-radius:4px; }
.compact-game .center-card strong { font:700 .94rem var(--serif); }
.compact-game .center-controls > button { min-width:38px; min-height:44px; }
#rooms-pane, #public-rooms { min-width:0; margin-top:.65rem; }
.room-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(265px,100%),1fr)); gap:.7rem; margin:.65rem 0; }
.catalog-card { min-width:0; display:grid; align-content:start; gap:.5rem; padding:.65rem; background:#141e17; border:1px solid #9e7947; border-radius:7px; }
.catalog-card.reachable { border-color:#e8bc73; box-shadow: inset 0 0 0 1px #e8bc734d; }
.catalog-card > img { display:block; width:100%; height:158px; object-fit:contain; background:#101a15; border-radius:5px; }
.catalog-card h3 { font:600 1.2rem var(--serif); color:#f2d5a0; }
.catalog-links, .catalog-pieces { display:flex; gap:.35rem; flex-wrap:wrap; }
.catalog-links button { min-height:39px; font-size:.74rem; padding:.25rem .42rem; }
.catalog-pieces > span { display:flex; align-items:center; gap:5px; }
.catalog-pieces small { font-size:.7rem; }
.transit-list { font-size:.81rem; color:#ddc8a4; }
.private-reveal { perspective:400px; }
.private-reveal > .card { margin-top:.5rem; transform-origin:center; animation:card-turn .65s ease-out both; }
.private-reveal > .card-with-art { grid-template-columns:68px minmax(0,1fr); }
.private-reveal > .card-with-art img { width:68px; height:102px; }
@keyframes card-turn { from { opacity:0; transform:rotateY(-85deg); } to { opacity:1; transform:none; } }
@media (max-width: 880px) and (orientation: landscape) {
  .tabletop-game .game-grid { grid-template-columns:minmax(0,1fr); }
  .tabletop-game .game-side { grid-row:3; }
}
@media (prefers-reduced-motion: reduce) {
  .table-dice span { display:none; }
  .table-verdict, .table-case.open .envelope-art, .table-dice.rolling span, .table-dice.rolling output, .candle-light, .private-reveal > .card { animation:none; }
  .table-case.open .envelope-art { background-position:100% 0; }
  .card-fan .playing-card { transition:none; }
}
