  .cup-chute { height: 3.4em; width: auto; vertical-align: middle; margin: -1em 0 -0.9em; }
  :root {
    --table-deep:   #17102b;
    --table-felt:   #241640;
    --table-edge:   #3a2a63;
    --purple-glow:  #8b5cf6;
    --lamp:         #d9a441;
    --lamp-soft:    #e8c987;
    --gold-text:    #e2b500;
    --back-top: #7c5ce0; --back-bot: #4a3390; --back-edge: #e2b500; --back-tuck: #e2b500;
    --ink:          #e8e2f5;
    --ink-dim:      #9a8fc0;
    --card:         #f3edda;
    --card-ink:     #2a2038;
    --card-line:    #b9ad8d;
    --good:         #6fcf7c;
    --bad:          #e06c6c;
    --die-face:     #f5f0e6;
    --die-pip:      #2a2038;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    background: radial-gradient(ellipse at 50% 30%, var(--table-felt) 0%, var(--table-deep) 70%);
    color: var(--ink);
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    min-height: 100vh;
  }
  .screen { display: none; }
  .screen.active { display: block; }
  #joinScreen.active {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; gap: 18px;
    position: relative; z-index: 0;
  }
  #joinScreen h1 { position: relative; z-index: 0; }
  #joinTuck {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(420px, 70vw); z-index: -1; pointer-events: none;
    opacity: .22;
    filter: invert(1) sepia(1) saturate(4.5) hue-rotate(-14deg) brightness(1.05);
  }
  #joinScreen h1 {
    font-size: 2.6em; letter-spacing: 3px; color: var(--gold-text);
    text-shadow: 0 0 30px rgba(226,181,0,.35);
    text-align: center; padding: 0 14px; max-width: 100%;
  }
  #joinScreen .sub { color: var(--ink-dim); margin-bottom: 12px; font-style: italic; }
  #joinFoot { margin-top: -6px; font-size: .8em; text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 0 16px; }
  #joinFoot .join-beta { color: var(--ink-dim); line-height: 1.5; max-width: 420px; }
  #joinFoot a { color: var(--ink-dim); text-underline-offset: 3px; }
  #joinFoot a:hover { color: var(--gold-text); }
  #joinVer { color: var(--ink-dim); line-height: 1.5; }
  .join-box {
    background: linear-gradient(180deg, var(--table-felt), #1d1236);
    border: 1px solid var(--table-edge); border-radius: 14px;
    padding: 28px 34px; display: flex; flex-direction: column; gap: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    width: 340px;
  }
  .join-box label { color: var(--ink-dim); font-size: .85em; letter-spacing: 1px; text-transform: uppercase; }
  .join-box input {
    background: #140d26; border: 1px solid var(--table-edge); border-radius: 8px;
    color: var(--ink); font-size: 1.15em; padding: 10px 12px; font-family: inherit;
    letter-spacing: 1px;
  }
  .join-box input:focus { outline: none; border-color: var(--purple-glow); }
  #joinCode { text-transform: uppercase; }
  .avatar-row { display: flex; align-items: center; gap: 12px; }
  #avatarBtn {
    width: 52px; height: 52px; border-radius: 50%; padding: 0; overflow: hidden; flex: none;
    background: #140d26; border: 1px dashed var(--table-edge); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  #avatarBtn:hover { border-color: var(--purple-glow); }
  #avatarBtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
  #avatarPlus { color: var(--ink-dim); font-size: 1.6em; line-height: 1; }
  .avatar-note { color: var(--ink-dim); font-size: .8em; line-height: 1.5; }
  .avatar-note a { color: var(--ink-dim); }
  .pav {
    width: 1.55em; height: 1.55em; border-radius: 50%; object-fit: cover;
    vertical-align: -.5em; margin-right: .3em; flex: none;
    border: 1px solid rgba(255,255,255,.3);
  }
  .btn {
    background: linear-gradient(180deg, #7c5ce0, #5b3fb8);
    border: 1px solid #9d85e8; border-radius: 8px; color: #fff;
    font-family: inherit; font-size: 1.05em; padding: 10px 20px; cursor: pointer;
    letter-spacing: 1px; transition: filter .15s, transform .1s;
  }
  .btn:hover { filter: brightness(1.15); }
  .btn:active { transform: translateY(1px); }
  .btn:disabled { filter: grayscale(.7) brightness(.6); cursor: default; }
  .btn.gold {
    background: linear-gradient(180deg, #d9a441, #a97a25);
    border-color: var(--lamp-soft); color: #241640; font-weight: bold;
  }
  .btn.ghost { background: transparent; border: 1px solid var(--table-edge); color: var(--ink-dim); }
  #shuffleBtn, #closeRoomBtn, #leaveRoomBtn { background: linear-gradient(180deg, #3b3350 0%, #3a2766 100%);
    color: #fff; border: 2px solid #7c5ce0; }
  #closeRoomBtn, #leaveRoomBtn { background: linear-gradient(180deg, #ff007d 0%, #a8004f 100%); border-color: #ff007d; }
  .btn.ghost:hover { color: var(--ink); border-color: var(--purple-glow); }
  .or-rule { display: flex; align-items: center; gap: 10px; color: var(--ink-dim); font-size: .85em; }
  .or-rule::before, .or-rule::after { content: ''; flex: 1; height: 1px; background: var(--table-edge); }
  #joinErr { color: var(--bad); font-size: .9em; min-height: 1.2em; text-align: center; }
  #lobbyScreen { zoom: 1.25; font-size: 110%; }
  #lobbyScreen.active {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 80vh; gap: 20px;
  }
  #lobbyWelcome { color: var(--gold-text); font-size: 3em; font-weight: 800; text-align: center;
    text-shadow: 0 0 22px rgba(226,181,0,.35); margin-top: 48px; line-height: 1.15; }
  .room-code-big {
    font-size: 3em; letter-spacing: 12px; color: var(--gold-text); font-weight: bold;
    text-shadow: 0 0 24px rgba(226,181,0,.4);
    border: 2px dashed var(--table-edge); border-radius: 12px; padding: 10px 20px 10px 32px;
  }
  .lobby-note { color: var(--ink-dim); font-style: italic; }
  #lobbyTop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
    width: min(960px, 94vw); align-items: start; }
  #lobbyTop { position: relative; z-index: 0; margin-top: 20px; }
  #lobbyTop .tuckwash { position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: min(420px, 70vw); z-index: -1; pointer-events: none; opacity: .22; }
  #tuckNews { display: flex; align-items: flex-start; width: min(960px, 94vw); box-sizing: border-box; }
  #tuckNewsFace { width: 104px; height: 104px; flex: none; }
  #tuckNewsBubble { position: relative; flex: 1; min-width: 0; margin: 40px 0 0 -6px; display: flex; align-items: center; gap: 10px;
    min-height: 50px; box-sizing: border-box; padding: 8px 10px 8px 20px;
    background: var(--table-felt); border: 2px solid var(--gold-text); border-radius: 14px; }
  #tuckNewsBubble::before, #tuckNewsBubble::after { content: ''; position: absolute; top: 15px;
    border-style: solid; border-color: transparent; border-width: 8px 18px 8px 0; }
  #tuckNewsBubble::before { left: -19px; border-right-color: var(--gold-text); }
  #tuckNewsBubble::after { left: -15px; border-right-color: var(--table-felt); }
  #tuckNewsText { flex: 1; min-width: 0; display: grid; align-items: center; color: var(--gold-text); font-size: 1.1em; font-weight: 400; line-height: 1.3; }
  #tuckNewsText .tn-msg { grid-area: 1 / 1; opacity: 0; transform: translateX(28px); pointer-events: none; color: inherit;
    text-underline-offset: 3px; }
  #tuckNewsText .tn-msg.on { opacity: 1; transform: none; pointer-events: auto; transition: transform .4s ease, opacity .4s ease; }
  #tuckNewsText .tn-msg.out { opacity: 0; transform: translateX(-28px); transition: transform .4s ease, opacity .4s ease; }
  #tuckNewsClose { flex: none; background: none; border: 0; color: var(--ink-dim); font: inherit; font-size: 1em;
    padding: 4px 8px; cursor: pointer; }
  #tuckNewsClose:hover { color: var(--gold-text); }
  .lobby-col { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
  .lobby-col .lobby-players, .lobby-col #colorPick { width: 100%; box-sizing: border-box; }
  .lobby-col .room-code-big { max-width: 100%; box-sizing: border-box; text-align: center; cursor: pointer;
    font-size: min(3em, 4.4vw); letter-spacing: .25em; }
  #customColorRow input[type="color"] { width: 40px; height: 40px; padding: 0;
    border: 3px solid transparent; border-radius: 50%; background: none;
    box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 0 0 1.5px rgba(255,255,255,.25);
    vertical-align: middle; cursor: pointer; overflow: hidden; }
  #customColorRow input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  #customColorRow input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
  #customColorRow input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }
  #colorWarnModal { position: fixed; inset: 0; background: rgba(10,6,20,.75); z-index: 90;
    display: flex; align-items: center; justify-content: center; }
  #colorWarnText { color: var(--ink); line-height: 1.5; max-width: 340px; text-align: center; }
  #itchModal { position: fixed; inset: 0; background: rgba(10,6,20,.75); z-index: 90;
    display: flex; align-items: center; justify-content: center; }
  #itchText { color: var(--ink); line-height: 1.5; max-width: 340px; text-align: center; }
  #itchBtns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
  #colorWarnText .cw-dot { display: inline-block; width: 1em; height: 1em; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.4); vertical-align: -.15em; }
  .lobby-players {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 12px; padding: 18px 22px;
  }
  .lobby-players { position: relative; }
  .lobby-players .p .lw { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-text); font-weight: 700; white-space: nowrap; }
  .lobby-players .p .lw.tip { cursor: pointer; }
  .lobby-players .p .lw svg { width: 1.1em; height: 1.1em; }
  .lobby-players .p .lw.on { text-shadow: 0 0 6px var(--gold-text), 0 0 14px var(--gold-text); }
  .lobby-players .p .lw.on svg { filter: drop-shadow(0 0 4px var(--gold-text)) drop-shadow(0 0 8px var(--gold-text)); }
  #lwTip { position: absolute; z-index: 6; background: #221c54; border: 1.5px solid var(--gold-text); border-radius: 12px; padding: 10px 18px; color: #fff; font-size: 1.15em; line-height: 1.4; white-space: nowrap; pointer-events: none; }
  .lobby-players .p { display: grid; grid-template-columns: 9px 1.6em 1.75em 1fr auto;
    align-items: center; column-gap: 10px; font-size: 1.15em; }
  .lobby-players .p.solo { display: block; }
  .lobby-players .p .num { text-align: right; }
  .lobby-players .p .pname { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .lobby-players .p .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); }
  .lobby-players .p .tag { color: var(--gold-text); font-size: .75em; letter-spacing: 1px; }
  .lobby-players .p .pav { box-sizing: border-box; width: 1.75em; height: 1.75em;
    border-width: 2.5px; margin: 0; vertical-align: 0; display: block; }
  .lobby-players .p .pav-ringed { border-width: 2.5px; border-style: solid; }
  .lobby-players .p .pav-disc { display: inline-block; background: #4a4453;
    border: 2.5px solid rgba(255,255,255,.25); }
  #setupHead { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  #setupName { color: var(--gold-text); font-size: 2em; font-weight: 800; text-align: center;
    text-shadow: 0 0 22px rgba(226,181,0,.35); line-height: 1.15; }
  #setupSub { color: var(--gold-text); letter-spacing: 2px; text-transform: uppercase; font-size: .9em; }
  #setupInfo { color: var(--ink); font-size: .92em; line-height: 1.45; text-align: center;
    max-width: 620px; margin: 2px auto 6px; padding: 0 12px; }
  #setupInfo:empty { display: none; }
  #lobbyFoot { position: relative; text-align: center; color: var(--ink-dim); font-size: .8em;
    line-height: 1.8; padding: 44px 18px 30px; max-width: 96vw; }
  #lobbyFoot .tuckwash { position: absolute; inset: 0; margin: auto; width: 250px; height: auto;
    filter: blur(7px); opacity: .16; pointer-events: none; }
  #lobbyFoot > div { position: relative; }
  #lobbyFoot a { color: var(--ink-dim); text-underline-offset: 3px; }
  #lobbyFoot a:hover { color: var(--gold-text); }
  .die.tinted .face { background: linear-gradient(145deg,
      color-mix(in srgb, var(--pcol) 25%, #fff), var(--pcol) 60%,
      color-mix(in srgb, var(--pcol) 55%, #000));
    border-color: color-mix(in srgb, var(--pcol) 60%, #000); }
  .die.tinted .face .pip { background: radial-gradient(circle at 35% 30%,
      color-mix(in srgb, var(--pdip) 72%, #888), var(--pdip)); }
  #rulesDrawer { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 80;
    display: none; }
  #rulesDrawer.sl, #rulesDrawer.wide { top: 86px; transform: none; }
  #rulesDrawer.sl #rulesDrawerTab, #rulesDrawer.wide #rulesDrawerTab { top: calc(50vh - 86px); }
  #rulesDrawer.sl #rulesDrawerBody, #rulesDrawer.wide #rulesDrawerBody { width: min(860px, 92vw); max-height: calc(100vh - 106px); }
  #rulesDrawer.sl #rulesDrawerBody p, #rulesDrawer.wide #rulesDrawerBody p { margin: 0 0 8px; }
  #rulesDrawer.sl #rulesDrawerBody ul, #rulesDrawer.wide #rulesDrawerBody ul { margin: 0 0 10px; padding-left: 22px; }
  #rulesDrawer.sl #rulesDrawerBody h4, #rulesDrawer.wide #rulesDrawerBody h4 { margin: 18px 0 6px; }
  #rulesDrawer.sl #rulesDrawerBody h5, #rulesDrawer.wide #rulesDrawerBody h5 { margin: 12px 0 4px; }
  #rulesDrawerTab { position: absolute; left: 100%; top: 50%;
    transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
    background: linear-gradient(0deg, #d9a441, #a97a25); color: #241640;
    border: 2px solid #4b3a7a; border-right: none; border-radius: 8px 0 0 8px;
    padding: 14px 7px; cursor: pointer; font-weight: 800;
    letter-spacing: 3px; text-transform: uppercase; font-size: .8em; }
  #rulesDrawerBody { width: min(340px, 80vw); max-height: 70vh; overflow-y: auto;
    background: var(--table-felt); border: 1px solid var(--table-edge); border-left: none;
    border-radius: 0 12px 12px 0; padding: 16px 18px; color: var(--ink); font-size: .9em;
    line-height: 1.55; display: none; }
  #rulesDrawer.open #rulesDrawerBody { display: block; }
  #rulesBackdrop, #rulesClose { display: none; }
@media (max-width: 700px) {
    #rulesDrawer { top: auto; bottom: 0; left: 0; right: 0; transform: none; }
    #rulesDrawerTab { position: fixed; left: 50%; right: auto; bottom: 0; top: auto; transform: translateX(-50%);
      writing-mode: horizontal-tb; border: 2px solid #4b3a7a; border-bottom: none; border-radius: 10px 10px 0 0;
      padding: 9px 26px; z-index: 81; }
    #rulesDrawer.open #rulesDrawerTab, #rulesDrawer.open #quickPinTab { display: none; }
    #rulesDrawer.open #rulesBackdrop { display: block; position: fixed; inset: 0; background: rgba(6,3,12,.6); }
    #rulesDrawerBody { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 86vh;
      border: 1px solid var(--table-edge); border-bottom: none; border-radius: 16px 16px 0 0; padding: 12px 18px 28px; }
    #rulesDrawer.sl, #rulesDrawer.wide { top: auto; }
    #rulesDrawer.sl #rulesDrawerTab, #rulesDrawer.wide #rulesDrawerTab { top: auto; }
    #rulesDrawer.sl #rulesDrawerBody, #rulesDrawer.wide #rulesDrawerBody { width: auto; max-height: 86vh; }
    #rulesClose { display: block; width: 100%; margin: 0 0 12px; padding: 12px; font: inherit; font-weight: 800;
      letter-spacing: 1px; background: linear-gradient(180deg, #d9a441, #a97a25); color: #241640;
      border: none; border-radius: 10px; cursor: pointer; }
}
  #quickPinTab { position: absolute; left: 100%; top: calc(50% + 128px);
    transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
    background: linear-gradient(0deg, #d9a441, #a97a25); color: #241640;
    border: 2px solid #4b3a7a; border-right: none; border-radius: 8px 0 0 8px;
    padding: 14px 7px; cursor: pointer; font-weight: 800;
    letter-spacing: 3px; text-transform: uppercase; font-size: .8em; display: none; }
  #gamePick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; width: min(960px, 94vw); }
  #gamePick .game-tile {
    position: relative; display: flex; flex-direction: column; gap: 5px;
    align-items: center; height: 150px; box-sizing: border-box;
    border: 2px solid var(--cat, var(--table-edge)); border-radius: 10px; padding: 12px 10px;
    background: linear-gradient(180deg, #3b3350 0%, #3a2766 100%); cursor: default; text-align: center;
    transition: all .15s;
  }
  #gamePick .game-tile .g-cat { font-size: .6em; letter-spacing: 2px; text-transform: uppercase;
    color: var(--ink-dim); border: 1px solid var(--table-edge); border-radius: 20px;
    padding: 1px 9px; flex: none; }
  #gamePick .game-tile[data-cat="board"]  { --cat: #cdff00; }
  #gamePick .game-tile[data-cat="cards"]  { --cat: #7c5ce0; }
  #gamePick .game-tile[data-cat="dice"]   { --cat: #e77000; }
  #gamePick .game-tile[data-cat="trivia"] { --cat: #00d3f2; }
  #gamePick .game-tile[data-cat="word"]   { --cat: #ffc900; }
  #gamePick .game-tile[data-cat="versus"] { --cat: #ff007d; }
  #gamePick .game-tile[data-cat="board"] .g-cat  { color: #cdff00; border-color: rgba(205,255,0,.4); }
  #gamePick .game-tile[data-cat="cards"] .g-cat  { color: #7c5ce0; border-color: rgba(124,92,224,.55); }
  #gamePick .game-tile[data-cat="dice"] .g-cat   { color: #e77000; border-color: rgba(231,112,0,.5); }
  #gamePick .game-tile[data-cat="trivia"] .g-cat { color: #00d3f2; border-color: rgba(0,211,242,.45); }
  #gamePick .game-tile[data-cat="word"] .g-cat   { color: #ffc900; border-color: rgba(255,201,0,.4); }
  #gamePick .game-tile[data-cat="versus"] .g-cat { color: #ff007d; border-color: rgba(255,0,125,.45); }
  #gamePick .game-tile[data-cat] .g-cat { background: var(--cat); border-color: var(--cat); color: #3b3350; font-weight: bold; }
  #gamePick .game-tile[data-cat="word"] .g-cat { font-size: .51em; }
  #pickFilter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    width: min(960px, 94vw); margin: 0 auto 4px; }
  @media (max-width: 900px) { #gamePick, #pickFilter { width: calc(100vw / 1.25 - 24px); } }
@media (max-width: 1240px) {
    .lobby-players { display: grid; grid-template-columns: 9px 1.6em 1.75em max-content; justify-content: center;
      column-gap: 10px; row-gap: 8px; }
    .lobby-players .p { grid-column: 1 / -1; grid-template-columns: subgrid; }
    .lobby-players .p .lw { position: absolute; right: 22px; align-self: center; }
}
@media (max-width: 600px) {
    .lobby-players { grid-template-columns: 9px 1.6em 1.75em max-content max-content; }
    .lobby-players .p .lw { position: static; }
}
@media (min-width: 901px) and (max-width: 1240px) {
    #lobbyTop, #gamePick, #pickFilter, #tuckNews { width: calc(100vw / 1.25 - 28px); }
    #lobbyTop { grid-template-columns: minmax(0, 1fr); }
    #gamePick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
  #pickFilter .g-cat { font-size: .6em; letter-spacing: 2px; text-transform: uppercase; font-weight: bold;
    color: #3b3350; background: var(--cat); border: 1px solid var(--cat); border-radius: 20px;
    padding: 1px 9px; opacity: .5; }
  #pickFilter .g-cat.on { opacity: 1; }
  #pickFilter [data-fcat=""]       { --cat: #fff; }
  #pickFilter [data-fcat="versus"] { --cat: #ff007d; }
  #pickFilter [data-fcat="board"]  { --cat: #cdff00; }
  #pickFilter [data-fcat="cards"]  { --cat: #7c5ce0; }
  #pickFilter [data-fcat="dice"]   { --cat: #e77000; }
  #pickFilter [data-fcat="trivia"] { --cat: #00d3f2; }
  #pickFilter [data-fcat="word"]   { --cat: #ffc900; }
  #pickFilter.clickable .g-cat { cursor: pointer; }
  #gamePick .game-tile.filtered { display: none; }
  #gamePick .game-tile .g-info { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px);
    transform: translateX(-50%); width: 270px; max-width: 82vw; z-index: 30;
    background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 10px;
    padding: 10px 13px; font-size: .85em; color: var(--ink); text-align: left; line-height: 1.45;
    box-shadow: 0 8px 22px rgba(0,0,0,.5); pointer-events: none; }
  #gamePick .game-tile .g-info b { display: block; color: var(--gold-text); margin-bottom: 3px; }
  #gamePick .game-tile[data-cat="board"] .g-info b  { color: #cdff00; }
  #gamePick .game-tile[data-cat="cards"] .g-info b  { color: #7c5ce0; }
  #gamePick .game-tile[data-cat="dice"] .g-info b   { color: #e77000; }
  #gamePick .game-tile[data-cat="trivia"] .g-info b { color: #00d3f2; }
  #gamePick .game-tile[data-cat="word"] .g-info b   { color: #ffc900; }
  #gamePick .game-tile[data-cat="versus"] .g-info b { color: #ff007d; }
  @media (hover: hover) { #gamePick .game-tile:hover .g-info { display: block; } }
  #gamePick .game-tile.peek .g-info { display: block; }
  #gamePick .game-tile.sel { box-shadow: inset 0 0 15px var(--cat); }
  #gamePick.clickable .game-tile { cursor: pointer; }
  #gamePick.clickable .game-tile:hover:not(.sel) { box-shadow: 0 0 8px var(--cat); }
  #gamePick .game-tile.table-ok {
    opacity: 1; border-color: var(--purple-glow);
    box-shadow: 0 0 20px rgba(157,132,224,.55), inset 0 0 14px rgba(157,132,224,.16);
  }
  #gamePick .game-tile.no-table { opacity: .16; }
  #gamePick.clickable .game-tile.no-table { cursor: not-allowed; }
  #gamePick.clickable .game-tile.no-table:hover { opacity: .16; box-shadow: none; }
  #tableModeRow { display: flex; align-items: center; gap: 8px; cursor: pointer; }
  #tableQr { width: 180px; height: 180px; border-radius: 8px; overflow: hidden; }
  #tableQr svg { width: 100%; height: 100%; display: block; }
  .bot-lv { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: middle; }
  .bot-lv button { background: none; border: 1px solid rgba(226,181,0,.5); color: #e2b500; border-radius: 4px; font-size: .62em; line-height: 1; padding: 2px 4px; cursor: pointer; }
  .bot-lv button:hover { background: rgba(226,181,0,.18); }
  body.table-mode #yourTurnBar { display: none !important; }
  #gamePick .game-tile .g-name { font-size: 1.035em; font-weight: bold; color: #fff; margin-top: auto; }
  .table-main.kb-mode { position: relative; display: block; min-height: var(--kb-minh, 800px); max-width: 1100px; margin: 0 auto; padding: 0; }
  .table-main.kb-mode .felt { position: absolute; left: 50%; top: calc(50% - 30px); transform: translate(-50%, -50%);
    width: 210px; height: 290px; min-height: 0; padding: 12px; margin: 0; justify-content: center; gap: 10px; box-sizing: border-box; }
  .table-main.kb-mode .card-wrap { display: none; }
  .table-main.kb-mode #diceTray { --die: 64px; min-height: 90px; align-items: center; }
  .table-main.kb-mode #rollControls { gap: 6px; }
  .table-main.kb-mode #rollBtn { font-size: 1.1em; padding: 10px 34px; }
  .table-main.kb-mode #watchNote, .table-main.kb-mode #feltMsg { font-size: .85em; }
@media (max-width: 899px) {
    .table-main.kb-mode { display: flex; flex-direction: column; align-items: center; min-height: 0; }
    .table-main.kb-mode .felt { position: relative; left: auto; top: auto; transform: none; margin-bottom: 14px; order: 1; }
}
  .rp-title { color: var(--gold-text); letter-spacing: 2px; text-transform: uppercase; font-size: .9em; text-align: center; }
  .rp-presets { display: flex; gap: 10px; justify-content: center; margin-bottom: 4px; }
  .rp-row { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: .95em; }
  .rp-row input[type=checkbox], .rp-row input[type=radio] { accent-color: var(--purple-glow); width: 16px; height: 16px; }
  .rp-row select {
    background: #140d26; color: var(--ink); border: 1px solid var(--table-edge);
    border-radius: 6px; padding: 4px 8px; font-family: inherit;
  }
  #rulesPanel.readonly { pointer-events: none; opacity: .8; }
  #botRow.readonly { pointer-events: none; opacity: .8; }
  #unoModal {
    position: fixed; inset: 0; background: rgba(10,6,20,.75); z-index: 40;
    display: flex; align-items: center; justify-content: center;
  }
  #unoModal.over-board { inset: auto; border-radius: 12px; }
  #unoModal.with-side { gap: 16px; flex-wrap: wrap; align-content: center; overflow-y: auto; }
  #unoModal.over-board #unoModalTitle { text-align: center; }
  #unoModalTitle { color: var(--ink); font-size: 1.2em; }
  #unoModalBtns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
  .pl-id { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
  .pl-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(0,0,0,.35); }
  .pl-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2.5px var(--pc); }
  .pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pl-me { font-weight: 800; }
  .pl-left { opacity: .45; }
  .pl-turn { border-color: var(--pc) !important; box-shadow: 0 0 0 1.5px var(--pc), 0 0 16px 4px color-mix(in srgb, var(--pc) 60%, transparent) !important; }
  #flashToast .toast-dot { display: inline-block; width: .95em; height: .95em; border-radius: 50%;
    border: 2px solid #241640; vertical-align: -.12em; margin-left: .35em; }
  #flashToast {
    position: fixed; top: 64px; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(180deg, #d9a441, #a97a25); color: #241640;
    font-weight: bold; font-size: 1.2em; padding: 12px 30px; border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; z-index: 50;
  }
  #flashToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  #chatBubble {
    position: fixed; bottom: 60px; right: 16px; z-index: 44;
    width: 46px; height: 46px; border-radius: 50%; font-size: 1.25em;
    background: var(--table-felt); border: 1px solid var(--table-edge); cursor: pointer;
  }
  #chatBubble:hover { border-color: var(--lamp); }
  #chatUnread {
    position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px;
    border-radius: 10px; background: var(--bad); color: #fff;
    font-size: .6em; font-weight: 700; line-height: 19px; padding: 0 4px;
  }
  #chatPanel {
    position: fixed; bottom: 60px; right: 16px; z-index: 44;
    width: 320px; height: 42vh; min-height: 260px;
    background: linear-gradient(180deg, #2b1b4d, var(--table-felt));
    border: 1px solid var(--table-edge); border-radius: 14px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,.55);
  }
  #chatHead {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px; border-bottom: 1px solid var(--table-edge);
    color: var(--gold-text); letter-spacing: 2px; font-size: .8em; text-transform: uppercase;
  }
  #chatHead button {
    background: none; border: none; color: var(--ink-dim); cursor: pointer; font-size: 1.1em;
  }
  #chatHead button:hover { color: var(--ink); }
  #chatMsgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
  .chat-msg { font-size: .88em; line-height: 1.35; word-break: break-word; }
  .chat-msg .cn { font-weight: 700; margin-right: 6px; }
  .chat-msg .ct { color: var(--ink); }
  .chat-msg .cts { color: var(--ink-dim); font-size: .78em; margin-left: 6px; }
  .chat-msg.whisper .ct { color: var(--purple-glow); font-style: italic; }
  .chat-msg .cw { color: var(--purple-glow); font-weight: 400; font-size: .9em; }
  .chat-msg.local-note { color: var(--bad); font-style: italic; font-size: .82em; }
  .chat-tab { cursor: pointer; opacity: .5; margin-right: 12px; }
  .chat-tab.on { opacity: 1; }
  #chatInputRow { display: flex; gap: 7px; padding: 9px 10px; border-top: 1px solid var(--table-edge); }
  #chatInputRow input {
    flex: 1; background: #140d26; border: 1px solid var(--table-edge); border-radius: 7px;
    color: var(--ink); padding: 7px 10px; font-family: inherit; font-size: .9em;
  }
  #chatInputRow input:focus { outline: none; border-color: var(--purple-glow); }
  #chatInputRow .btn { padding: 7px 13px; font-size: .85em; }
  #chatLock {
    padding: 11px 14px; border-top: 1px solid var(--table-edge);
    color: var(--bad); font-size: .78em; letter-spacing: 1px; text-align: center;
  }
  body:has(#joinScreen.active) #chatBubble, body:has(#joinScreen.active) #chatPanel { display: none !important; }
  #tuckBadge {
    position: fixed; bottom: 14px; right: 16px; z-index: 20;
    display: flex; align-items: center; gap: 9px;
    pointer-events: none; opacity: .55;
  }
  #tuckBadge img {
    width: 34px; height: 34px; border-radius: 50%;
    filter: invert(1) sepia(1) saturate(4.5) hue-rotate(-14deg) brightness(1.05);
    mix-blend-mode: screen;
  }
  #tuckBadge span {
    color: var(--gold-text); font-size: .72em; letter-spacing: 2px; text-transform: uppercase;
    text-shadow: 0 0 12px rgba(226,181,0,.35);
  }
  body:has(#joinScreen.active) #tuckBadge { display: none; }
  #gearBtn {
    position: fixed; bottom: 16px; left: 16px; z-index: 45;
    width: 44px; height: 44px; border-radius: 50%; font-size: 1.3em;
    background: var(--table-felt); color: var(--ink-dim); border: 1px solid var(--table-edge);
    cursor: pointer;
  }
  #gearBtn:hover { color: var(--gold-text); border-color: var(--lamp); }
  #setOverlay {
    position: fixed; inset: 0; background: rgba(10,6,20,.75); z-index: 46;
    display: flex; align-items: center; justify-content: center;
  }
  .set-box {
    background: var(--table-felt); border: 2px solid var(--table-edge); border-radius: 16px;
    padding: 24px 30px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; width: 400px; max-width: calc(100vw - 24px);
  }
  .set-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
  .set-sec { display: flex; flex-direction: column; gap: 14px; }
  .set-row:has(input[type=range]) > span:first-child { flex: 0 0 6em; }
  .set-row:has(input[type=range]) > span:last-child { flex: 0 0 3em; text-align: right; }
  .set-row > span:first-child { color: var(--ink-dim); }
  .set-row input[type=range] { flex: 1 1 0; width: 0; min-width: 0; accent-color: var(--purple-glow); }
  .set-row select {
    background: #140d26; color: var(--ink); border: 1px solid var(--table-edge);
    border-radius: 6px; padding: 5px 8px; font-family: inherit;
  }
  .set-row input[type=color] { width: 52px; height: 30px; border: none; background: none; cursor: pointer; }
  .set-btns { justify-content: center; gap: 14px; }
  #exitBtn, #helpBtn { font-size: .8em; padding: 5px 12px; }
  .tok-swatch {
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    border: 3px solid transparent; box-shadow: 0 3px 8px rgba(0,0,0,.4);
    background: #140d26; font-size: 22px; line-height: 34px; text-align: center;
    user-select: none;
  }
  .tok-swatch.mine { border-color: var(--lamp); background: #2b1b4d; }
  .tok-swatch.photo { overflow: hidden; }
  .tok-swatch.photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
  .tok-swatch.taken { opacity: .25; cursor: default; }
  #tpArea { display: none; gap: 20px; padding: 10px 26px 26px; max-width: 1300px; margin: 0 auto; }
  #tpCol { flex: 1 1 68%; }
  #tpBoard { width: 100%; height: auto; max-height: calc((94vh - 44px) * var(--bk, 1)); }
  #tpBoard .sp-hit { cursor: pointer; }
  .ch-ping-ring {
    transform-box: fill-box; transform-origin: center;
    animation: chPingRing 1.15s ease-out 3 both;
  }
  @keyframes chPingRing {
    0%   { transform: scale(.09); opacity: 1; }
    100% { transform: scale(1);   opacity: 0; }
  }
  .ch-ping-dot { animation: chPingDot 3.45s linear forwards; }
  @keyframes chPingDot { 0%, 76% { opacity: 1; } 100% { opacity: 0; } }
  #tpBoard .edge { stroke: var(--table-edge); stroke-width: 6; fill: none; opacity: .7; }
  #tpBoard text { pointer-events: none; }
  #colorSwatches { display: grid; grid-template-columns: repeat(5, min-content);
    justify-content: center; align-items: center; gap: 12px 10px; }
  #colorPick {
    background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 12px;
    padding: 12px 22px; display: flex; flex-direction: column; gap: 8px; align-items: center;
  }
  #colorSwatches .tok-swatch { box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 0 0 1.5px rgba(255,255,255,.25); }
  #ahArea { display: none; gap: 20px; padding: 10px 26px 26px; max-width: 1350px; margin: 0 auto; }
  #ahCol { flex: 1 1 72%; }
  #ahBoardWrap { display: flex; justify-content: center; overflow: visible; }
  #ahBoard { width: 100%; height: auto; max-height: calc((100vh - 156px) * var(--bk, 1));
    overflow: visible; position: relative; z-index: 5; }
  #roundLine { color: var(--gold-text); font-weight: 700; letter-spacing: .04em; text-align: center; margin: 6px 0; }
  #c4Col { display: none; width: min(calc(900px * var(--bk, 1)), 100%); position: relative; }
  body[data-game="c4"] #c4Col { display: block; }
  .b3-on > #ahBoardWrap, .b3-on > #tpBoardWrap { visibility: hidden; }
  #ahBoard .cell { }
  #ahBoard .pawn { paint-order: stroke; }
  #ahBoard .ah-halo { animation: ahHalo 1.1s ease-in-out infinite;
    transform-box: fill-box; transform-origin: center;
    filter: drop-shadow(0 0 7px currentColor); }
  @keyframes ahHalo {
    0%, 100% { transform: scale(.88); opacity: .5; }
    50% { transform: scale(1.14); opacity: 1; }
  }
  #ahBoard .ah-moved-halo { animation: ahMovedHalo 2.4s ease-out forwards;
    transform-box: fill-box; transform-origin: center;
    filter: drop-shadow(0 0 8px currentColor); }
  @keyframes ahMovedHalo {
    0% { transform: scale(.55); opacity: 0; }
    12% { transform: scale(1.1); opacity: 1; }
    38% { transform: scale(.85); opacity: .75; }
    62% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1.75); opacity: 0; }
  }
  @keyframes ahSlideRide { to { opacity: 0; } }
  .ah-slide-ghost { animation: ahSlideRide .1s linear .62s forwards; }
  @keyframes ahSlideWord {
    0%   { opacity: 0; transform: scale(.5); }
    22%  { opacity: 1; transform: scale(1.15); }
    45%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.35); }
  }
  .ah-slide-word { animation: ahSlideWord 1.25s ease-out forwards; transform-box: fill-box; transform-origin: center; }
  @keyframes ahBumpWord {
    0%   { opacity: 0; transform: scale(.4) rotate(-9deg); }
    18%  { opacity: 1; transform: scale(1.25) rotate(4deg); }
    40%  { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0; transform: scale(1.2) translateY(-14px); }
  }
  .ah-bump-word { animation: ahBumpWord 1.4s ease-out forwards; transform-box: fill-box; transform-origin: center; }
  @font-face { font-family: 'LT Glockenspiel Black'; src: url('lt-glockenspiel-black.woff2') format('woff2'); font-display: swap; }
  #wwTally { position: fixed; inset: 0; z-index: 85; background: rgba(6,3,12,.94);
    display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
  #winPop { position: fixed; inset: 0; z-index: 80; background: rgba(6,3,12,.94);
    display: flex; align-items: center; justify-content: center; padding: 20px; }
  #winPopBox { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
  #winPopName { font-size: clamp(2.2em, 8vw, 4.6em); font-weight: 900; letter-spacing: 2px;
    color: var(--gold-text); text-shadow: 0 0 34px rgba(255,215,122,.55); animation: winPopIn .5s cubic-bezier(.2,.8,.3,1.2) both; }
  #winPopBox .btn { min-width: 180px; animation: winPopIn .4s .35s cubic-bezier(.2,.8,.3,1.2) both; }
  @keyframes winPopIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
  #wwLogTitle {
    padding: 8px 14px; border-bottom: 1px solid var(--table-edge);
    color: var(--gold-text); font-size: .9em; letter-spacing: 1px; text-transform: uppercase;
  }
  .tok-grad { background: linear-gradient(90deg, var(--tc) 0%, var(--tc) 5%, rgba(36,22,64,0) 100%); }
  .tok-grad, .tok-grad b, #wwLog .ww-le.dim.tok-grad { color: #fff; text-shadow: 0 0 4px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7); }
  .tok-grad.dark { box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
  #gamePick .game-tile.soon { pointer-events: none; border-color: #4a4160;
    background: linear-gradient(180deg, #2f2a3d 0%, #2c2540 100%); }
  .b3-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
  .b3-strip { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 38px; flex: none; }
  .b3-strip .btn { margin: 0; padding: 0 12px; height: 34px; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05em; line-height: 1; }
  .b3-strip svg { width: 20px; height: 20px; display: block; pointer-events: none; }
  .b3-strip .b3-corner svg { width: 24px; height: 24px; }
  .b3-strip .b3-globe { cursor: grab; touch-action: none; }
  .b3-strip .b3-globe:active { cursor: grabbing; }
  .b3-cam { display: none; gap: 8px; margin-right: auto; }
  .b3-on .b3-cam { display: inline-flex; }
  .b3-toggle { display: inline-flex; border: 1px solid var(--table-edge); border-radius: 9px; overflow: hidden; }
  .b3-toggle button { background: transparent; color: var(--ink-dim); border: 0; margin: 0; padding: 0 13px; height: 34px; font: inherit; font-weight: 800; cursor: pointer; }
  .b3-toggle button + button { border-left: 1px solid var(--table-edge); }
  .b3-toggle button.on { background: var(--gold-text); color: #17102b; cursor: default; }
  .b3-stage { display: none; position: absolute; left: 0; top: 44px; width: 100%; height: 0; z-index: 6;
    background: #0b0a10; border-radius: 12px; overflow: hidden; touch-action: none; }
  .b3-on .b3-stage { display: block; }
  .board-grip { position: absolute; right: 2px; bottom: 2px; width: 26px; height: 26px; z-index: 30; cursor: nwse-resize; touch-action: none; opacity: .75; }
  .board-grip::before { content: ''; position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px;
    background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.7) 4px 5.5px); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
  .board-grip:hover { opacity: 1; }
  .b3-flip:not(.b3-on) .b3-stage { display: block; opacity: 0; transition: opacity .25s; }
  .b3-flip.b3-flip-in:not(.b3-on) .b3-stage { opacity: 1; }
  .b3-stage canvas { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }
  .board-backdrop { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); width: 86%; max-height: 36%; object-fit: contain; object-position: top; opacity: .18; pointer-events: none; z-index: 0; }
  #hrLine { color: var(--ink-dim); font-size: 1em; margin: 2px 0 8px; line-height: 1.4; }
  #hrLine .sl-hrule { cursor: help; border-bottom: 1px dotted currentColor; }
  #gameLog > #hrLine { font-size: 1.15em; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--table-edge); }
  #slRuleTip { position: fixed; z-index: 90; display: none; max-width: 260px; background: var(--table-felt); border: 1px solid var(--gold-text); border-radius: 8px; padding: 8px 10px;
    color: var(--ink); font-size: .85em; line-height: 1.4; box-shadow: 0 8px 20px rgba(0,0,0,.5); pointer-events: none; }
  #clLogTitle { color: var(--gold-text); letter-spacing: 1px; text-transform: uppercase; font-size: .9em; margin-bottom: 6px; flex: none; }
  .fx-sh-3d { position: absolute; inset: 0; perspective: 650px; transform-style: preserve-3d; pointer-events: none; }
  .fx-sh-pane { position: absolute; inset: 0; opacity: 0; transform-style: preserve-3d; will-change: transform, filter; }
  #clReveal {
    position: fixed; inset: 0; z-index: 60; background: rgba(8,5,16,.88);
    display: flex; align-items: center; justify-content: center;
  }
  #setupBox { background: var(--table-felt); border: 1px solid var(--gold-text); border-radius: 12px;
    padding: 16px 22px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box;
    width: min(960px, calc(100vw / 1.25 - 28px)); margin: 0 auto; text-align: left; }
  #setupBox .rp-title { text-align: center; margin-top: 4px; }
  #setupBox #setupSub { text-align: center; }
  #setupBox .su-note { text-align: center; }
  #setupBox .rp-title.su-sec { border-top: 1px solid var(--gold-text); padding-top: 12px; margin-top: 6px; }
  #setupBox .rp-row.su-btn { margin: 16px 0 8px; }
  #setupBox .rp-presets { justify-content: center; gap: 0; }
  .rp-preset { background: transparent; border: 1px solid var(--gold-text); color: var(--gold-text); font-family: inherit; font-size: .95em; padding: 6px 18px; cursor: pointer; }
  .rp-preset:first-child { border-radius: 8px 0 0 8px; }
  .rp-preset:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
  .rp-preset.on { background: var(--gold-text); color: #17102b; font-weight: 700; }
  #setupBox .su-lab { flex: 0 0 calc(var(--su-split, 50%) - 9px); min-width: 0; text-align: right; }
  #setupBox .rp-row:has(> .su-lab) { justify-content: flex-start; }
  #setupBox .rp-row, #setupBox .rp-row label { text-wrap: balance; }
  #setupBox .rp-row > label:only-child, #setupBox label.rp-row:not(:has(> .su-lab)) { display: block; text-align: center; }
  #setupBox .rp-row > label:only-child > input, #setupBox label.rp-row:not(:has(> .su-lab)) > input { display: inline-block; vertical-align: -2px; margin-right: 9px; }
  .su-desc { border: 1px solid var(--gold-text); border-radius: 8px; padding: 10px 14px; margin: 0 auto; max-width: 760px; box-sizing: border-box; font-size: .9em; line-height: 1.4; color: var(--ink); text-align: left; }
  .su-desc b { color: var(--gold-text); }
  #setupBox .rp-row select { font-size: 1em; flex: 0 1 auto; min-width: 0; max-width: 100%; }
  #setupBox .rp-row label { display: inline-flex; align-items: center; gap: 9px; }
  #setupBox input[type=checkbox], #setupBox input[type=radio] { -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; margin: 0; flex: none; border: 1.5px solid var(--gold-text); border-radius: 3px;
    background: transparent; cursor: pointer; }
  #setupBox input[type=radio] { border-radius: 50%; }
  #setupBox input[type=checkbox]:checked { background: var(--gold-text); }
  #setupBox input[type=radio]:checked { background: radial-gradient(var(--gold-text) 0 45%, transparent 50%); }
  #tableScreen.active { display: block; }
  .table-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; border-bottom: 1px solid var(--table-edge);
    background: rgba(0,0,0,.25);
  }
  .table-top .room-tag { color: var(--ink-dim); letter-spacing: 2px; }
  .table-top .room-tag b { color: var(--gold-text); letter-spacing: 4px; }
  #connDot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--bad); margin-right:6px; vertical-align: 1px;}
  #connDot.on { background: var(--good); }
  #turnBanner { font-size: 1.35em; text-align: center; }
  #turnBanner b { color: var(--gold-text); }
  #turnBanner.yours b { color: var(--good); }
  #yourTurnBar {
    display: none; text-align: center; padding: 9px 16px;
    font-size: 1.15em; font-weight: 800; letter-spacing: 1.5px;
    color: #241a05; background: linear-gradient(180deg, #ffd77a, #d9a441);
    border-bottom: 1px solid #8a6a1e;
    box-shadow: 0 0 18px rgba(217,164,65,.55);
    animation: yourTurnPulse 1.9s ease-in-out infinite;
  }
  #yourTurnBar.hold { visibility: hidden; animation: none; }
  @keyframes yourTurnPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(217,164,65,.35); }
    50%      { box-shadow: 0 0 26px rgba(255,215,122,.75); }
  }
@media (prefers-reduced-motion: reduce) {
    #yourTurnBar { animation: none; }
}
  #chVerdict {
    max-width: 620px; margin: 0 auto 22px; padding: 0 18px;
    font-family: Georgia, 'Times New Roman', serif; font-size: 1.3em; line-height: 1.45;
    text-align: center; color: var(--gold-text); font-style: italic;
  }
  #chVerdict b { font-style: normal; color: #ff8f9f; }
  #chVerdict.cl-verdict, #chVerdict.cl-verdict b { color: var(--gold-text); }
  #hostPanel, #helpPanel {
    display: none; position: fixed; inset: 0; z-index: 60;
    background: rgba(0,0,0,.6); align-items: center; justify-content: center;
  }
  #hostPanel.open, #helpPanel.open { display: flex; }
  #hostPanel .hp-box, #helpPanel .hp-box {
    background: var(--felt, #1b1430); border: 1px solid var(--table-edge);
    border-radius: 10px; padding: 20px 22px; min-width: 300px; max-width: 90vw;
    max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.6);
  }
  #hostPanel .hp-title, #helpPanel .hp-title {
    font-size: 1.2em; letter-spacing: 3px; text-transform: uppercase;
    color: var(--gold-text); margin-bottom: 6px;
  }
  #hostPanel .hp-note, #helpPanel .hp-note { color: var(--ink-dim); font-size: .82em; margin-bottom: 14px; max-width: 340px; }
  #hostPanel .hp-row, #helpPanel .hp-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; border-top: 1px solid var(--table-edge);
  }
  #hostPanel .hp-row .nm, #helpPanel .hp-row .nm { flex: 1; }
  #hostPanel .hp-row .hp-tag, #helpPanel .hp-row .hp-tag { color: var(--ink-dim); font-size: .78em; letter-spacing: 1px; }
  #hostPanel .hp-row .btn, #helpPanel .hp-row .btn { padding: 4px 10px; font-size: .8em; }
  .hp-btns { display: flex; gap: 10px; margin-top: 16px; }
  #hostPanel .hp-sub, #helpPanel .hp-sub { font-size: 1em; margin-top: 16px; }
  #hostPanel .hp-title + .hp-sub { margin-top: 10px; }
  #helpPanel .hp-note { margin-bottom: 0; }
  #helpPanel .hp-note a { color: var(--ink-dim); text-underline-offset: 3px; }
  #helpPanel .hp-note a:hover { color: var(--gold-text); }
  .lobby-kick {
    margin-left: 8px; cursor: pointer; color: var(--ink-dim);
    font-size: .85em; border: none; background: none;
  }
  .lobby-kick:hover { color: var(--bad, #e05a5a); }
  .table-main {
    display: flex; gap: 26px; padding: 26px; max-width: 1400px; margin: 0 auto;
    align-items: flex-start;
  }
  .felt-col { flex: 1 1 650px; display: flex; flex-direction: column; gap: 14px; min-width: 650px; }
  .felt-col > .felt { flex: none; }
  .table-main.kb-mode .felt-col { display: contents; }
  #gameLog { display: none; background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 12px; padding: 10px; font-size: .8em;
    color: var(--ink); line-height: 1.5; overflow-y: auto; box-sizing: border-box; }
  #gameLog .glog-title { color: var(--gold-text); letter-spacing: 1px; text-transform: uppercase; font-size: .9em; margin-bottom: 4px; }
  #gameLog .glog-line { padding: 1px 6px; border-radius: 4px; margin-bottom: 2px; }
  #gameLog .glog-line:not(.tok-grad) { color: var(--ink-dim); }
  #tableScreen.glog-right #gameLog { display: block; position: fixed; left: var(--glog-left, auto); right: var(--glog-right, 14px); width: 260px; top: var(--glog-top, 96px); bottom: 70px; z-index: 4; }
  #tableScreen.glog-under #gameLog { display: block; max-height: 220px; }
@media (max-width: 900px) {
    #tableScreen.glog-right #gameLog { position: static; width: auto; margin: 12px; max-height: 40vh; }
}
  #tableScreen.glog-right.glog-stack #gameLog { position: static; width: auto; margin: 12px; max-height: 40vh; }
  #ttEdge { position: fixed; inset: 0; pointer-events: none; z-index: 95; animation: ttEdge 1s ease-in-out infinite; }
  @keyframes ttFlash { 0%,100% { filter: none; background: rgba(23,16,43,.96); } 50% { filter: brightness(1.6); background: rgba(120,10,25,.96); } }
  #ttBar { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 96; background: rgba(23,16,43,.96); border-top: 3px solid #ff2a3c; border-bottom: 3px solid #ff2a3c;
    padding: 22px 30px; display: flex; align-items: center; justify-content: center; gap: 28px; cursor: pointer; color: #fff;
    transition: top .35s cubic-bezier(.3,.9,.3,1), transform .35s cubic-bezier(.3,.9,.3,1), padding .35s; }
  #ttBar.flash { animation: ttFlash .3s ease-in-out 2; }
  #ttBar.up { top: var(--tt-top, 0px); transform: none; padding: 8px 24px; cursor: default; }
  #ttBar .n { font-size: 64px; font-weight: 900; color: #ff2a3c; min-width: 2ch; text-align: center; line-height: 1; transition: font-size .35s; }
  #ttBar.up .n { font-size: 30px; }
  #ttBar .t { font-weight: 700; font-size: 1.25em; max-width: 560px; line-height: 1.3; }
  #ttBar.up .t { font-size: 1em; }
  #ttOthers { position: fixed; left: 50%; top: 46px; transform: translateX(-50%); z-index: 94; background: rgba(23,16,43,.95); border: 2px solid var(--pc, #e2b500);
    color: #fff; padding: 6px 16px; border-radius: 10px; font-weight: 700; box-shadow: 0 0 18px var(--pc, #e2b500); max-width: calc(100vw - 32px); text-align: center; }
  .pl-id.tt-host { position: relative; }
  .tt-poke { position: absolute; left: -4px; top: 50%; transform: translateY(-50%); z-index: 3; background: var(--pc); border: none; border-radius: 8px; padding: 3px 12px;
    font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 0 10px var(--pc); }
  @media (max-width: 700px) { #ttBar { gap: 12px; padding: 14px; } #ttBar .n { font-size: 40px; } #ttBar .t { font-size: 1em; } }
  .felt {
    flex: 1 1 55%;
    background:
      radial-gradient(ellipse at 50% 20%, rgba(217,164,65,.10) 0%, transparent 55%),
      linear-gradient(180deg, #2b1b4d, var(--table-felt));
    border: 3px solid var(--table-edge);
    border-radius: 22px;
    box-shadow: inset 0 0 60px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.45);
    padding: 40px 30px 30px;
    min-height: 460px;
    display: flex; flex-direction: column; align-items: center; gap: 28px;
  }
  #diceTray { display: flex; gap: 34px; justify-content: center; min-height: 120px; perspective: 900px; }
  .die {
    width: var(--die, 84px); height: var(--die, 84px); position: relative; transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(.2,.75,.25,1);
    cursor: default;
  }
  .die .face {
    position: absolute; width: var(--die, 84px); height: var(--die, 84px);
    background: linear-gradient(145deg, #fdf9ef, var(--die-face) 60%, #d8d0bd);
    border: 1px solid #c9c0a8; border-radius: calc(var(--die, 84px) * .167);
    display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: calc(var(--die, 84px) * .14);
    backface-visibility: hidden;
  }
  #rollControls { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  #rollBtn { font-size: 1.3em; padding: 14px 44px; }
  #rollsLeft { color: var(--ink-dim); letter-spacing: 1px; }
  #rollsLeft b { color: var(--gold-text); }
  #watchNote { color: var(--ink-dim); font-style: italic; text-align: center; }
  #feltMsg { color: var(--gold-text); font-size: 1.1em; min-height: 1.4em; text-align: center; }
  .card-wrap { flex: 0 1 auto; min-width: 0; overflow-x: auto; }
  #overScreen.active {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; gap: 16px;
  }
  #overScreen h1 { color: var(--gold-text); font-size: 2.4em; text-shadow: 0 0 30px rgba(226,181,0,.35); }
  .final-list { display: flex; flex-direction: column; gap: 10px; min-width: 320px; }
  .final-list .row {
    display: flex; justify-content: space-between; font-size: 1.3em;
    background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 10px; padding: 10px 20px;
  }
  .final-list .row.winner { border-color: var(--lamp); box-shadow: 0 0 20px rgba(217,164,65,.25); }
  .final-list .row.winner .nm::after { content: ' 🏆'; }
  .final-list .row.winner.cuponly .nm::after { content: none; }
  #stallNote {
    display: none; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    background: #3a2020; border: 1px solid var(--bad); color: #f0c0c0;
    padding: 8px 18px; border-radius: 8px; font-size: .9em;
  }
  html { font-size: 16px; }
  @media (max-width: 900px) { html { font-size: 15px; } }
  @media (max-width: 560px) { html { font-size: 14px; } }
@supports (height: 100dvh) {
    body, #joinScreen.active, #lobbyScreen.active, #overScreen.active { min-height: 100dvh; }
}
@media (max-width: 900px) {
    .table-top { flex-wrap: wrap; row-gap: 6px; column-gap: 10px; padding: 8px 12px; }
    .table-top .room-tag { order: 1; font-size: .8em; letter-spacing: 1px; }
    .table-top .room-tag b { letter-spacing: 2px; }
    #helpBtn { order: 2; margin-left: auto; }
    #exitBtn    { order: 3; }
    #turnBanner { order: 4; flex: 1 0 100%; font-size: 1.05em; }
    #gameTag    { order: 5; flex: 1 0 100%; text-align: center; }
    .table-top .btn { padding: 6px 12px; font-size: .9em; }
    #yourTurnBar { font-size: 1em; padding: 7px 12px; letter-spacing: 1px; }
    .table-main.kb-mode .felt { width: 100%; max-width: 380px; padding: 18px; }
    #lobbyScreen.active { padding: 16px 12px; justify-content: flex-start; }
    #setupBox { width: 100%; max-width: 520px; padding: 14px 16px; }
    #setupBox .su-lab { flex: 0 1 auto; }
    #setupBox .rp-row:has(> .su-lab) { justify-content: center; }
    .rp-row { flex-wrap: wrap; }
    .rp-row select, .rp-row input[type=text], .rp-row input[type=number] {
      max-width: 100%; min-width: 0;
    }
    .room-code-big { font-size: 2.2em; letter-spacing: 8px; padding: 8px 12px 8px 20px; }
    #gamePick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    #lobbyTop { grid-template-columns: minmax(0, 1fr); width: 100%; }
    #tuckNews { width: 100%; }
    #tuckNewsFace { width: 76px; height: 76px; }
    #tuckNewsBubble { margin-top: 24px; }
    .lobby-col .room-code-big { font-size: 2.2em; letter-spacing: 8px; }
    #gamePick .game-tile { padding: 10px 8px; height: 128px; }
    .btn { min-height: 44px; }
    .table-top .btn { min-height: 38px; }
    #tuckBadge span { display: none; }
    #tuckBadge { bottom: 10px; right: 10px; opacity: .4; }
    #chatBubble { bottom: 54px; right: 10px; width: 42px; height: 42px; }
    #gearBtn { bottom: 10px; left: 10px; }
    #lobbyScreen.active, #overScreen.active { padding-bottom: 108px; }
    .table-main { padding-bottom: 64px; }
}
@media (max-width: 560px) {
    #joinScreen h1 { font-size: 1.9em; letter-spacing: 1px; }
    .join-box { width: 100%; max-width: 340px; padding: 20px 18px; }
    #joinScreen.active, #overScreen.active { padding: 16px 12px; }
    .room-code-big { font-size: 1.8em; letter-spacing: 6px; }
    #overScreen h1 { font-size: 1.8em; }
    .final-list .row { font-size: 1.1em; padding: 8px 14px; }
}
@media (max-width: 900px) {
    #tpBoard, #ahBoard { max-height: none; }
}
  .fan-hand > * {
    margin-left: max(
      calc(-0.78 * var(--fan-card, 62px)),
      min(
        calc(-1 * var(--fan-tight, 22px)),
        calc((100% - var(--fan-card, 62px) * var(--fan-n, 1)) / max(1, var(--fan-n, 1) - 1))
      )
    );
  }
  .fan-hand > :first-child { margin-left: 0; }
  .fan-hand { gap: 0; }
@media (max-width: 900px) {
    #diceTray { --die: 48px; gap: 10px; min-height: 0; perspective: 2000px; }
    .table-main { flex-direction: column; gap: 14px; padding: 10px; align-items: stretch; }
    .felt-col { flex: none; min-width: 0; }
    .felt {
      padding: 18px 10px 16px; gap: 16px; min-height: 0; border-radius: 16px;
      overflow-x: clip;
    }
}
@media (pointer: coarse) {
    #tpBoard, #ahBoard { max-height: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .table-top { padding: 4px 10px; row-gap: 2px; }
    #turnBanner { font-size: .95em; }
    #gameTag { display: none; }
    #yourTurnBar { padding: 4px 10px; font-size: .9em; }
    #tpCol, #ahCol { flex: 1 1 60%; }
    body[data-game="cl"] #yourTurnBar { display: none !important; }
    body[data-game="cl"] .table-top { padding: 2px 8px; row-gap: 0; flex-wrap: nowrap; gap: 8px; }
    body[data-game="cl"] #turnBanner { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; order: 1; text-align: left; padding-left: 10px; }
    body[data-game="cl"] .table-top .btn { padding: 3px 9px; font-size: .8em; }
    body[data-game="cl"] .table-top .room-tag { font-size: .8em; }
    body[data-game="cl"] #turnBanner { font-size: .85em; }
}
  #colorWarnBtns { display: flex; gap: 14px; }
  #rulesDrawer.avail { display: block; }
  #teQuickPin { position: fixed; right: 12px; bottom: 12px; z-index: 70; width: min(300px, 70vw);
    max-height: 45vh; overflow-y: auto; display: none; background: rgba(13, 10, 24, .93);
    border: 1px solid #4b3a7a; border-radius: 12px; padding: 10px 14px; color: var(--ink);
    font-size: .78em; line-height: 1.5; }
  #teQuickPin.show { display: block; }
  .uno-modal-box {
    background: var(--table-felt); border: 2px solid var(--table-edge); border-radius: 16px;
    padding: 26px 34px; display: flex; flex-direction: column; gap: 18px; align-items: center;
  }
  #unoModal.over-board .uno-modal-box { max-width: calc(100% - 24px); box-sizing: border-box; }
  .tv3-pan canvas { cursor: grab; }
  #hrLine .sl-hh { color: #e2b500; font-weight: 700; }
  @keyframes ttEdge { 0%,100% { box-shadow: inset 0 0 0 6px rgba(255,40,60,.95), inset 0 0 60px rgba(255,40,60,.55); } 50% { box-shadow: inset 0 0 0 3px rgba(255,40,60,.5), inset 0 0 25px rgba(255,40,60,.2); } }
  @keyframes teIntroFade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes teFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes teIntroRipple { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
  @keyframes teIntroPop { 0% { opacity: 0; transform: scale(.3); } 70% { transform: scale(1.15); } 100% { opacity: 1; transform: none; } }
  #gamePick .game-tile.locked { --cat: #5a5466; background: linear-gradient(180deg, #2f2a3d 0%, #2c2540 100%); cursor: pointer; }
  #gamePick .game-tile.locked .g-name, #gamePick .game-tile.locked .g-sub { color: #77718a; }
  #gamePick .game-tile .g-full { margin-top: 6px; color: var(--gold-text); }
  #gamePick .game-tile .g-sub { font-size: .72em; color: var(--ink); margin-bottom: auto; }
  #gamePick .game-tile .g-bots { font-size: .85em; font-style: italic; }
  #gamePick .game-tile.premium { padding-bottom: calc(.672em + 5px); }
  #gamePick .game-tile .g-prem { position: absolute; left: 0; right: 0; bottom: 0; background: #e2b500; color: #3b3350;
    font-size: .56em; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; line-height: 1.2; padding: 1px 0;
    border-radius: 0 0 8px 8px; pointer-events: none; }
  #tpBoard .sp { stroke: rgba(0,0,0,.4); stroke-width: 2; }
  .music-bar { display: none; flex: 1 1 0; min-width: 0; position: relative; }
  .music-bar.on { display: flex; align-items: center; }
  .music-bar .mb-btn.muted { border-color: var(--gold-text); color: var(--gold-text); }
  .music-bar.open .mb-btn { background: var(--lamp); color: #241640; border-color: var(--lamp); }
  .music-bar .mb-btn svg { width: 20px; height: 20px; display: block; pointer-events: none; }
  .music-bar .mb-pop { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; box-sizing: border-box; width: 330px; max-width: calc(100vw - 16px);
    background: var(--table-felt); border: 1px solid var(--table-edge); border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55); font-size: .88rem; color: var(--ink); text-align: left; }
  .music-bar.open .mb-pop { display: block; }
  .music-bar .mb-now { margin-bottom: 8px; min-height: 1.3em; }
  .music-bar .mb-now b { color: var(--gold-text); font-weight: 600; }
  .music-bar .mb-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
  .music-bar .mb-l { flex: none; width: 58px; color: var(--ink-dim); }
  .music-bar .mb-pop .btn { flex: none; margin: 0; padding: 0 9px; height: 28px; min-height: 0; min-width: 0; font-size: .95em; }
  .music-bar .mb-pop .btn.on { border-color: var(--gold-text); color: var(--gold-text); }
  .music-bar input[type=range] { flex: 1 1 0; min-width: 40px; }
  .music-bar .mb-pct { flex: none; width: 40px; text-align: right; }
  .music-bar .mb-songs { border-top: 1px solid var(--table-edge); margin-top: 10px; padding-top: 8px; }
  .music-bar .mb-ttl { color: var(--gold-text); font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
  .music-bar .mb-order { border-radius: 6px; }
  .music-bar .mb-order button { height: 1.35em; padding: 0 8px; font-size: .78em; line-height: 1; }
  .music-bar .mb-list label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
  .music-bar .mb-list label.off { color: var(--ink-dim); }
  .music-bar .mb-list input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--purple-glow); }
  .sl-line { color: var(--ink); margin-bottom: 10px; flex-basis: 100%; text-align: center; }
  .sl-cars { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 760px; }
  .sl-carpick { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 220px; padding: 10px 8px 12px; border-radius: 12px; cursor: pointer;
    background: var(--table-felt); border: 1px solid var(--table-edge); color: var(--ink); font: inherit; font-weight: 600; }
  .sl-carpick:hover { border-color: var(--gold-text); box-shadow: 0 0 0 1px var(--gold-text) inset; }
  .sl-carpick img { width: 100%; height: auto; display: block; }
  .sl-cars.fig-scroll { max-height: min(62vh, 640px); overflow-y: auto; }
  .sl-wheelbox { position: relative; width: min(340px, 70vw); margin: 0 auto 8px; }
  .sl-wheelbox canvas { width: 100%; height: auto; display: block; }
  .sl-wheelpin { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid #e2b500; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
  @media (max-width: 1020px) { .sl-carpick { width: 44%; } }
#setupBox #botRow {
    background: none; border: 0; border-radius: 0; padding: 0; margin: 0; box-shadow: none;
    width: 100%; max-width: none; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.die .face .pip {
    width: calc(var(--die, 84px) * .18); height: calc(var(--die, 84px) * .18);
    border-radius: 50%; align-self: center; justify-self: center;
    background: radial-gradient(circle at 35% 30%, #4a3d61, var(--die-pip));
  }
  .scorecard thead th.me { box-shadow: inset 0 -3px 0 var(--purple-glow); }
  .scorecard td.pick {
    cursor: pointer; color: #fff; font-style: italic;
  }
  .scorecard td.pick:hover { background: rgba(139,92,246,.3); }
#setupBox .rp-row { justify-content: center; font-size: .95em; }
@media (min-width: 960px) {
  #setupBox div:has(> .rp-row:nth-child(7)) { columns: 2; column-gap: 30px; }
  #setupBox .rp-row { break-inside: avoid; }
}
  @font-face { font-family: 'Archivo Black'; src: url('archivo-black.woff2') format('woff2'); font-display: swap; }
.pc-card.back { background: linear-gradient(160deg, var(--back-top), var(--back-bot)); border-color: var(--back-edge); }
.pc-card.back .pc-logo { position: absolute; inset: 12%; background: var(--back-tuck);
  -webkit-mask: url('tuck-parlor-logo.svg') center/contain no-repeat; mask: url('tuck-parlor-logo.svg') center/contain no-repeat; }
@media (max-width: 669px) {
    .table-main:not(.kb-mode) #diceTray { display: grid; grid-template-columns: repeat(6, auto); row-gap: 14px; }
    .table-main:not(.kb-mode) #diceTray .die-slot { grid-column: span 2; }
    .table-main:not(.kb-mode) #diceTray .die-slot:nth-child(4) { grid-column: 2 / span 2; }
}
.tv3-lock svg { width: 1.15em; height: 1.15em; display: block; }
.tv3-lock.on { background: var(--lamp); color: #241640; border-color: var(--lamp); }
.tv3-lock.nope { animation: tv3Nope .6s; }
@keyframes tv3Nope { 0%, 40%, 80% { background: #e60000; border-color: #e60000; color: #fff; } 20%, 60%, 100% { background: var(--lamp); border-color: var(--lamp); color: #241640; } }
#unoTable, .uno-table { position: relative; width: 100%; height: clamp(450px, 56vh, 560px); }
#unoSeats, .uno-seats { position: absolute; inset: 0; pointer-events: none; }
.uno-seat {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--table-felt); border: 2px solid var(--table-edge); border-radius: 12px;
  padding: 10px 20px; text-align: center; min-width: 110px;
}
.uno-seat.active-p { border-color: var(--pc, var(--lamp)); animation: unoSeatPulse 1.1s ease-in-out infinite; }
@keyframes unoSeatPulse {
  0%, 100% { box-shadow: 0 0 4px 0 var(--pc, var(--lamp)); }
  50% { box-shadow: 0 0 26px 7px var(--pc, var(--lamp)); }
}
.uno-seat .s-name { color: var(--ink); }
.uno-seat .s-count { font-size: 1.7em; font-weight: bold; color: var(--gold-text); }
.uno-seat .s-count small { font-size: .5em; color: var(--ink-dim); font-weight: normal; }
#unoCenter, .uno-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
#unoPilesRow, .uno-piles { display: flex; gap: 30px; align-items: flex-start; justify-content: center; }
.uno-pile { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.uno-pile-label { color: var(--ink-dim); font-size: .85em; letter-spacing: 1px; white-space: nowrap; }
#unoDrawStack .uno-slot, .uno-stack .uno-slot { display: none; background: none; border: 3px dashed var(--table-edge); box-shadow: none; }
#unoDrawStack.empty .uno-slot, .uno-stack.empty .uno-slot { display: block; }
#unoDrawStack.empty .uno-back, .uno-stack.empty .uno-back { display: none; }
#unoDrawStack, .uno-stack { position: relative; }
#unoDrawStack .uno-back.b2, .uno-stack .uno-back.b2 { position: absolute; inset: 0; transform: translate(1.5px, 2px) rotate(.9deg); }
#unoDrawStack .uno-back.b3, .uno-stack .uno-back.b3 { position: absolute; inset: 0; transform: translate(-1.5px, 3.5px) rotate(-1.2deg); }
#unoDrawStack .uno-back.top, .uno-stack .uno-back.top { position: relative; }
.uno-card {
  width: 76px; height: 110px; border-radius: 11px; position: relative; flex-shrink: 0;
  border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  font-family: inherit; user-select: none;
}
.uno-card { color: #fff; }
.uno-card.big { width: 114px; height: 165px; border-radius: 16px; }
.uno-card.mini { width: 40px; height: 58px; border-width: 2px; border-radius: 7px; }
.uno-fly { position: fixed; z-index: 70; pointer-events: none; transform-origin: 0 0; }
.uno-card.small { width: 58px; height: 84px; border-width: 2px; }
.uno-back { background: linear-gradient(160deg, var(--back-top), var(--back-bot)); border-color: var(--back-edge); position: relative; overflow: hidden; }
.uno-back::before {
  content: ''; position: absolute; inset: 0; background: var(--back-tuck); opacity: .9;
  -webkit-mask: url('tuck-parlor-logo.svg') center/82% no-repeat;
  mask: url('tuck-parlor-logo.svg') center/82% no-repeat;
}
@media (max-width: 900px) {
  #unoTable, .uno-table { height: 430px; }
  #unoPilesRow, .uno-piles { gap: 12px; }
  .uno-card.big { width: 90px; height: 130px; border-radius: 13px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #unoTable, .uno-table { height: 380px; }
  #unoPilesRow, .uno-piles { gap: 12px; }
  .uno-card.big { width: 90px; height: 130px; border-radius: 13px; }
  .uno-seat { min-width: 0; padding: 6px 10px; }
}
