@layer reset, theme, layout, components, responsive, party, finishing, social;

/* Complete palettes for the four additional rooms; shared component rules cover all twelve. */
@layer social {
 body[data-theme=jungle]{--gold:#d7df98;--gold-light:#f1f3c1;--gold-dim:#8c9c60;--ink:#10281f;--panel:#1d392d;--panel-soft:#2d4a38;--text:#f8f4df;--muted:#ced7bb;--line:#d5e3b72b;--party-felt:#1e6550;--party-deep:#12382e;--party-rail:#607f56;--ambient-color:#d6df98;--ambient-rgb:170,194,111;--avatar-edge:#d6d8c7;--menu-surface:#1c3329;--menu-field:#10261e;--menu-border:#a5ba7f80;--table-felt-top:#1e6550;--table-felt-bottom:#12382e;--table-wood:#607f56;--table-trim:#d7c388;color:var(--text);background:#10281f}
 body[data-theme=underwater]{--gold:#b8e7e0;--gold-light:#e7fff6;--gold-dim:#70aaa8;--ink:#0c2434;--panel:#173749;--panel-soft:#284c5d;--text:#f0faf4;--muted:#c3dce0;--line:#c4eee52b;--party-felt:#236578;--party-deep:#0d344e;--party-rail:#a8c3c2;--ambient-color:#a7e6e2;--ambient-rgb:123,193,201;--avatar-edge:#d4e2df;--menu-surface:#173347;--menu-field:#0b2233;--menu-border:#89bdc18a;--table-felt-top:#236578;--table-felt-bottom:#0d344e;--table-wood:#a8c3c2;--table-trim:#f1e4d6;color:var(--text);background:#0c2434}
 body[data-theme=rooftop]{--gold:#f3cb71;--gold-light:#ffe8ac;--gold-dim:#ae8d43;--ink:#142330;--panel:#243b4f;--panel-soft:#354e61;--text:#fff8e9;--muted:#d0dbe1;--line:#d5e3e82e;--party-felt:#35485b;--party-deep:#172d42;--party-rail:#4d6570;--ambient-color:#f3cb71;--ambient-rgb:209,177,111;--avatar-edge:#d6dce0;--menu-surface:#213749;--menu-field:#121f2b;--menu-border:#9ab2bb88;--table-felt-top:#35485b;--table-felt-bottom:#172d42;--table-wood:#4d6570;--table-trim:#a7b5b5;color:var(--text);background:#142330}
 body[data-theme=carnival]{--gold:#ffe0a0;--gold-light:#fff0cc;--gold-dim:#bc9054;--ink:#2a1221;--panel:#482638;--panel-soft:#61364a;--text:#fff5e4;--muted:#e5cbd2;--line:#f2dbc52e;--party-felt:#8b3454;--party-deep:#401d3c;--party-rail:#bd7846;--ambient-color:#f7dca4;--ambient-rgb:224,165,132;--avatar-edge:#e4d7cd;--menu-surface:#462537;--menu-field:#2a1525;--menu-border:#d0a17e88;--table-felt-top:#8b3454;--table-felt-bottom:#401d3c;--table-wood:#bd7846;--table-trim:#ffe0a0;color:var(--text);background:#2a1221}
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { color-scheme: dark; min-width: 320px; }
  body { margin: 0; }
  button, input, select { font: inherit; }
  button { cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  button, a, input, select { -webkit-tap-highlight-color: transparent; }
  a { color: inherit; }
  button, input, select { outline: none; }
  :focus-visible { outline: 3px solid #e6c988; outline-offset: 5px; }
  input:focus-visible, select:focus-visible { outline-offset: 2px; }
  [hidden] { display: none !important; }
}

@layer theme {
  :root {
    --ink: #0c1115;
    --panel: #131b20;
    --panel-soft: #192329;
    --gold: #d9b876;
    --gold-light: #f1d79e;
    --gold-dim: #8c7952;
    --cream: #f3f0e7;
    --text: #f3f1e9;
    --muted: #9ba9aa;
    --line: rgba(202, 216, 212, .11);
    --green: #184a40;
    --red: #c53e4b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  body {
    min-height: 100dvh;
    background: radial-gradient(ellipse at 70% -20%, #243f37 0, transparent 50%), radial-gradient(ellipse at 10% 100%, #26231c 0, transparent 38%), var(--ink);
    color: var(--text);
    overflow-x: hidden;
  }
  body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
    opacity: .23;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' opacity='.13' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  }
  ::selection { background: #d9b876; color: #12221d; }
}

@layer layout {
  .app, .game-shell, #app { width: 100%; }
  .app-header, .site-header, .game-header, .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 104px;
    padding: 22px 3.4%;
    border-bottom: 1px solid var(--line);
  }
  .brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
  .brand-icon, .brand-mark {
    width: 43px;
    height: 50px;
    border: 1px solid var(--gold);
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 31px;
    transform: rotate(-10deg);
    box-shadow: 5px 3px 0 -1px var(--ink), 5px 3px 0 0 rgba(217, 184, 118, .5);
  }
  .brand-title, .brand-name { font-size: 22px; font-weight: 750; letter-spacing: .16em; line-height: 1.2; }
  .brand-subtitle, .brand-tagline { display: block; margin-top: 5px; color: var(--gold); font-size: 12px; font-weight: 500; letter-spacing: .3em; }
  .header-actions { display: flex; align-items: center; justify-content: end; gap: 12px; }
  .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
  img.brand-mark { border: 0; transform: none; box-shadow: none; width: 50px; height: 50px; }
  .game-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); max-width: 1760px; min-height: calc(100dvh - 104px); margin: auto; }
  .sidebar { display: flex; flex-direction: column; padding: 35px 25px 24px 30px; border-right: 1px solid var(--line); }
  .play-area { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 25px 3.5% 0; }
  .opponents { position: relative; display: grid; grid-template-columns: repeat(var(--opponents, 3), minmax(0, 1fr)); align-items: start; gap: 12px; width: 100%; margin: 0 auto 8px; max-width: 1100px; }
  .felt {
    position: relative;
    display: flex;
    flex: 1 0 265px;
    min-height: 325px;
    max-height: 410px;
    align-items: center;
    justify-content: center;
    width: min(100%, 1100px);
    margin: 0 auto;
    border-radius: 200px;
    border: 8px solid #242b28;
    outline: 1px solid rgba(217, 184, 118, .28);
    background: radial-gradient(ellipse at 50% 30%, #235f50 0, #154638 48%, #103b30 85%);
    box-shadow: 0 0 0 6px #111917, 0 0 0 7px rgba(217, 184, 118, .11), inset 0 0 65px #08261c, 0 25px 60px rgba(0, 0, 0, .35);
    isolation: isolate;
  }
  .felt::before { content: ""; position: absolute; inset: 11px; border: 1px solid rgba(217, 184, 118, .24); border-radius: inherit; pointer-events: none; }
  .felt::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    opacity: .12;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' opacity='.5' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  }
  .human-zone { position: relative; z-index: 2; margin: 23px auto 0; width: 100%; max-width: 1100px; min-width: 0; }
  .hand-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 0 8px; }
  .hand-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
  .hand-heading .session-label { margin: 0; }
  .hand-heading .turn-badge { position: static; border: 1px solid #d9b87644; border-radius: 20px; background: #d9b87610; padding: 5px 10px; font-size: 11px; }
  .hand-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
  .hand-meta { color: var(--muted); font-size: 14px; }
  .hand-cards { display: flex; align-items: flex-end; justify-content: center; min-height: 170px; padding: 24px 20px 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #52625a transparent; }
  .action-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 9px 0 16px; }
  .selection-help { flex: 1 1 100%; text-align: center; font-size: 14px; line-height: 1.5; min-height: 21px; color: var(--muted); }
  .table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #7f9291; font-size: 12px; letter-spacing: .06em; padding: 16px 4px 18px; margin-top: auto; border-top: 1px solid var(--line); }
  .keyboard-note { color: #7f9291; font-size: 12px; text-align: center; margin: 0 0 16px; }
  .table-footer .keyboard-note { margin: 0; }
  .play-actions { display: flex; gap: 10px; align-items: center; justify-content: center; }
  kbd { display: inline-grid; place-items: center; border: 1px solid #ffffff22; border-bottom-width: 2px; width: 19px; height: 20px; border-radius: 4px; margin-left: 4px; font-family: inherit; font-size: 10px; color: #94a68f; }
}

@layer components {
  button { transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
  .icon-button, .quiet-button, .secondary-button, .primary-button, .text-button, .stepper-btn, .mode-tab { min-height: 44px; border: 1px solid transparent; }
  .quiet-button, .secondary-button { padding: 11px 19px; color: #dedfd7; border-color: #38433e; background: rgba(19, 29, 25, .5); border-radius: 8px; font-size: 14px; font-weight: 600; }
  .quiet-button:hover, .secondary-button:hover { background: #23352b; border-color: var(--gold-dim); color: var(--cream); }
  .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px; padding: 13px 27px; border-radius: 8px; color: #17251d; background: linear-gradient(125deg, #f0d59b, #d9b876 70%); box-shadow: 0 4px 20px #0002, inset 0 1px #fff6; font-size: 15px; font-weight: 750; letter-spacing: .01em; }
  .primary-button:hover { background: #f4dca8; transform: translateY(-1px); box-shadow: 0 6px 24px #d9b87622; }
  .primary-button:active { transform: translateY(1px); }
  .primary-button:disabled { background: #3a453c; border-color: #52604e; color: #97a398; box-shadow: none; transform: none; }
  .secondary-button:disabled, .quiet-button:disabled { opacity: .4; }
  .text-button { background: transparent; color: #bcc8be; padding: 10px 14px; border-radius: 7px; font-size: 14px; }
  .text-button:hover { color: var(--gold-light); background: #d9b8760a; }
  .icon-button { display: inline-grid; place-items: center; width: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--gold); font-size: 19px; }
  .icon-button:hover { background: #d9b87610; border-color: #d9b87655; }
  .room-badge, .connection-pill { display: inline-flex; align-items: center; gap: 8px; background: #1c332a; border: 1px solid #355347; padding: 7px 12px; border-radius: 30px; color: #b7d6c1; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .theme-select { appearance: none; color: #d1d9ce; background-color: #132019; background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d9b876' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding: 10px 33px 10px 13px; min-height: 44px; max-width: 135px; border: 1px solid #38433e; border-radius: 8px; font-size: 14px; cursor: pointer; }
  .theme-select:hover { border-color: var(--gold-dim); }
  .connection-pill::before { content: ""; width: 6px; height: 6px; background: #88be9d; border-radius: 50%; }
  .session-label { color: var(--gold); font-size: 12px; letter-spacing: .19em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
  .round-heading { font-family: Georgia, "Times New Roman", serif; font-size: 32px; font-weight: 400; letter-spacing: -.035em; margin: 0 0 29px; line-height: 1.2; }
  .standings-title, .sidebar h3 { font-size: 12px; color: var(--muted); letter-spacing: .14em; font-weight: 500; text-transform: uppercase; margin: 0 0 15px; }
  .standings-list { display: flex; flex-direction: column; gap: 8px; }
  .standing-row { display: flex; align-items: center; gap: 10px; padding: 11px 8px; border: 1px solid transparent; border-radius: 9px; margin-left: -8px; }
  .standing-row.is-you { background: #d9b87609; border-color: #d9b87615; }
  .standing-row.is-active { border-color: #d9b87640; background: #d9b87608; }
  .standing-avatar { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #2a3832; color: #bdcec1; font-size: 12px; font-weight: 600; }
  .standing-row.is-you .standing-avatar { background: #d9b876; color: #1e291f; }
  .standing-info { min-width: 0; flex: 1; }
  .standing-info > span { display: block; }
  .standing-name small { margin-left: 4px; color: var(--gold); font-size: 9px; font-weight: 500; letter-spacing: .05em; }
  .standing-avatar img { display: block; width: 100%; height: 100%; border-radius: inherit; }
  .standing-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .standing-meta { font-size: 12px; color: #899a93; margin-top: 4px; }
  .standing-place { color: var(--gold); font-family: Georgia, serif; font-size: 20px; }
  .table-note { margin-top: auto; padding-top: 35px; color: #8f9f97; font-size: 14px; line-height: 1.7; }
  .table-note .suit-line, .sidebar-suits { display: flex; gap: 13px; color: var(--gold); font-family: Georgia, serif; font-size: 21px; padding-bottom: 10px; }
  .table-note strong { display: block; margin: 0 0 8px; color: #c8cec6; font-size: 14px; font-weight: 500; }
  .table-note p { margin: 0; }
  .note-symbol { display: block; color: var(--gold); font-family: Georgia, serif; font-size: 34px; margin: 0 0 12px; }
  .table-note > .standing-meta { display: block; margin-top: 12px; }
  .opponent { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; padding: 8px 4px 15px; transition: opacity .3s; }
  .avatar { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--avatar-color, #50665c), #293b32); box-shadow: inset 0 0 0 1px #ffffff16, 0 5px 15px #0003; color: #efeede; font-family: Georgia, serif; font-size: 21px; position: relative; }
  .avatar img, img.avatar { object-fit: cover; }
  .avatar img { width: 100%; height: 100%; border-radius: inherit; }
  .opponent:nth-child(4n+2) .avatar { --avatar-color: #7a5c68; }
  .opponent:nth-child(4n+3) .avatar { --avatar-color: #65737e; }
  .opponent:nth-child(4n+4) .avatar { --avatar-color: #8c7352; }
  .opponent.is-active .avatar::after { content: ""; position: absolute; inset: -5px; border: 1px solid var(--gold); border-radius: inherit; box-shadow: 0 0 18px #d9b87622; }
  .opponent-name { display: block; font-size: 14px; line-height: 1.3; font-weight: 650; margin-top: 11px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .opponent-info { font-size: 12px; color: #9caba3; margin-top: 4px; min-height: 17px; }
  .opponent.is-out .avatar { background: linear-gradient(135deg, #9d8654, #5b4e30); color: #f5deab; }
  .opponent.has-passed { opacity: .46; }
  .turn-badge { position: absolute; bottom: -1px; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--gold); white-space: nowrap; }
  .mini-cards { display: flex; justify-content: center; padding-left: 7px; height: 24px; margin-top: 9px; }
  .card-back { width: 17px; height: 24px; margin-left: -7px; border: 1px solid #b09b6d; border-radius: 3px; transform: rotate(-7deg); background: repeating-linear-gradient(45deg, #293c32 0, #293c32 2px, #3c5141 2px, #3c5141 3px); box-shadow: 0 1px 3px #0005; }
  .card-back:nth-child(2) { transform: rotate(-2deg); }
  .card-back:nth-child(3) { transform: rotate(4deg); }
  .card-back:nth-child(4) { transform: rotate(10deg); }
  .felt-wordmark { position: absolute; top: 24px; width: 100%; text-align: center; font-family: Georgia, serif; font-size: 15px; color: #d9b87660; letter-spacing: .25em; pointer-events: none; }
  .felt-wordmark > span { display: block; margin-top: 6px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 8px; letter-spacing: .2em; }
  .felt-kicker { position: absolute; bottom: 22px; width: 100%; text-align: center; color: #b8c8aa50; font-size: 10px; text-transform: uppercase; letter-spacing: .27em; pointer-events: none; }
  .pile-area { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 13px; width: 100%; padding: 65px 20px 80px; }
  .pile-cards { display: flex; align-items: center; justify-content: center; min-height: 132px; padding-left: 10px; }
  .playing-card { display: block; position: relative; flex: 0 0 auto; width: 88px; height: 126px; padding: 0; border: 1px solid #fff; border-radius: 8px; background: linear-gradient(135deg, #fffdf5, #ece9df); color: #202c28; font-family: Georgia, "Times New Roman", serif; box-shadow: 0 2px 1px #0003, 0 9px 20px #0003; transform-origin: 50% 90%; user-select: none; }
  .playing-card.red, .playing-card.red-card, .playing-card.is-red, .playing-card[data-suit="hearts"], .playing-card[data-suit="diamonds"] { color: var(--red); }
  .playing-card .card-corner { position: absolute; top: 7px; left: 8px; display: flex; flex-direction: column; align-items: center; font-size: 22px; font-weight: 600; line-height: .94; letter-spacing: -.06em; }
  .card-corner small, .card-corner .suit, .card-corner span + span { display: block; margin-top: 3px; font-size: 16px; }
  .card-suit { position: absolute; left: 0; top: 50%; width: 100%; text-align: center; transform: translateY(-46%); font-size: 43px; line-height: 1; }
  .card-bottom { position: absolute; bottom: 7px; right: 8px; transform: rotate(180deg); display: flex; flex-direction: column; align-items: center; font-size: 22px; font-weight: 600; line-height: .94; letter-spacing: -.06em; }
  .card-bottom small, .card-bottom span + span { display: block; margin-top: 3px; font-size: 16px; }
  .pile-cards .playing-card { width: 94px; height: 132px; transform: rotate(-7deg); }
  .pile-cards .playing-card + .playing-card { margin-left: -30px; transform: rotate(5deg); }
  .pile-cards .playing-card:nth-child(3) { transform: rotate(-2deg); }
  .pile-cards .playing-card:nth-child(4) { transform: rotate(10deg); }
  .pile-caption { color: #d4decc; font-size: 14px; letter-spacing: .015em; text-align: center; }
  .empty-pile { display: grid; place-items: center; gap: 12px; min-height: 150px; color: #c4cdb980; font-size: 14px; text-align: center; }
  .empty-symbol { display: grid; place-items: center; width: 75px; height: 88px; border: 1px solid #d9b87630; border-radius: 8px; color: #d9b87650; font-family: Georgia, serif; font-size: 47px; transform: rotate(-7deg); }
  .empty-pile h2 { font-family: Georgia, serif; font-size: 29px; color: #e0d9bd; font-weight: 400; margin: 0; }
  .empty-pile p { margin: 0; }
  .last-action { position: absolute; left: 18px; right: 18px; bottom: 40px; z-index: 2; font-size: 14px; color: #aebeb1; text-align: center; min-height: 21px; line-height: 1.5; margin: 0; pointer-events: none; }
  .empty-pile small { display: block; font-size: 12px; color: #9eb19e; }
  .hand-cards .playing-card { width: 86px; height: 122px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .2s; }
  .hand-cards .playing-card:not(:first-child) { margin-left: -21px; }
  .hand-cards .playing-card:hover:not(:disabled) { transform: translateY(-11px); z-index: 3; box-shadow: 0 10px 25px #0007; }
  .hand-cards .playing-card.is-selected { transform: translateY(-18px); border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 12px 30px #0006; z-index: 2; }
  .hand-cards .playing-card.is-selected:hover { transform: translateY(-20px); }
  .hand-cards .playing-card.is-playable::after { content: ""; position: absolute; left: 8px; top: 4px; width: 13px; height: 2px; background: #b59755; border-radius: 2px; }
  .hand-cards .playing-card:disabled { opacity: .72; cursor: default; }
  .hand-cards .playing-card:focus-visible { z-index: 4; outline-offset: 3px; }
  .hand-empty { min-height: 125px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #98a99e; font-size: 14px; }
  .hand-empty strong { font-family: Georgia, serif; color: #dfd6bd; font-size: 25px; font-weight: 400; }
  .deal-in { animation: deal-in .36s ease both; animation-delay: calc(var(--card-index, 0) * 23ms); }
  @keyframes deal-in { from { opacity: 0; translate: 0 25px; rotate: -5deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
  .modal-backdrop { position: fixed; inset: 0; background: #07100ce0; z-index: 20; backdrop-filter: blur(9px); display: grid; place-items: center; padding: 24px; overflow-y: auto; }
  dialog.modal { position: fixed; max-height: calc(100dvh - 40px); margin: auto; }
  dialog.modal::backdrop { background: #07100cda; backdrop-filter: blur(9px); }
  .modal { position: relative; width: min(100%, 530px); max-height: calc(100dvh - 48px); padding: 42px; overflow-y: auto; border: 1px solid #b59d6555; border-radius: 17px; color: var(--text); background: radial-gradient(ellipse at 100% 0, #2c4333 0, transparent 50%), #15231d; box-shadow: 0 35px 120px #0009, inset 0 1px #ffffff09; }
  .modal::before { content: "♦"; position: absolute; right: 31px; top: 26px; color: #d9b87612; font-size: 120px; font-family: Georgia, serif; line-height: 1; pointer-events: none; }
  .modal-close { position: absolute; right: 16px; top: 14px; z-index: 1; width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; color: #b9c2b8; font-size: 25px; }
  .modal-close:hover { color: var(--gold-light); background: #d9b87610; }
  .modal-eyebrow { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: .22em; margin: 0 0 18px; font-weight: 650; }
  .modal-title { position: relative; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 52px); font-weight: 400; letter-spacing: -.045em; line-height: 1.04; margin: 0 0 16px; }
  .modal-title em { color: var(--gold-light); font-weight: 400; }
  .modal-description { font-size: 14px; line-height: 1.7; color: #aebab0; margin: 0 0 25px; max-width: 360px; }
  .mode-tabs { display: flex; gap: 5px; padding: 5px; margin: 25px 0; border: 1px solid #94b39c16; border-radius: 10px; background: #09160e60; }
  .mode-tab { flex: 1; padding: 10px 12px; border-radius: 6px; background: transparent; color: #a8b6aa; font-size: 14px; font-weight: 600; }
  .mode-tab.is-selected, .mode-tab[aria-selected="true"] { color: #efe7d5; background: #344a38; border-color: #9eaa8630; box-shadow: 0 1px 5px #0003; }
  .form-label { display: block; margin: 18px 0 9px; color: #d9dfd4; font-size: 14px; font-weight: 550; }
  .field { width: 100%; min-height: 49px; padding: 12px 14px; border: 1px solid #50634d; background: #0e1a12a6; border-radius: 7px; color: #f1eee0; font-size: 16px; }
  .field::placeholder { color: #81927f; }
  .field:hover { border-color: #8e9e78; }
  .field:focus { border-color: var(--gold); }
  select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d9b876' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 36px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 17px; }
  .stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 49px; border: 1px solid #50634d; background: #0e1a12a6; border-radius: 7px; padding: 3px; }
  .stepper-btn { display: grid; place-items: center; flex-shrink: 0; height: 42px; width: 42px; color: var(--gold-light); background: #25382a; border-radius: 5px; font-size: 22px; }
  .stepper-btn:hover { background: #3a4f35; }
  .stepper-btn:disabled { opacity: .3; }
  .stepper-value { min-width: 65px; text-align: center; font-size: 14px; font-weight: 600; }
  .stepper-value strong { font-size: 20px; }
  .lobby-summary { display: flex; justify-content: space-between; align-items: center; padding: 17px 0; margin-top: 13px; color: #8f9e8d; font-size: 12px; border-bottom: 1px solid #aec59b14; }
  .lobby-footer { margin-top: 23px; }
  .lobby-footer .primary-button, .lobby-modal > .primary-button { width: 100%; min-height: 51px; }
  .lobby-footer p { color: #8f9e8d; text-align: center; font-size: 12px; line-height: 1.7; margin: 14px 0 0; }
  .lobby-modal { width: min(880px, calc(100vw - 48px)); padding: 0; }
  .lobby-modal[open] { display: grid; grid-template-columns: .75fr 1fr; }
  .lobby-modal::before { display: none; }
  .modal-content { position: relative; padding: 42px 36px 36px; min-width: 0; }
  .modal-art { position: relative; overflow: hidden; min-height: 590px; border-right: 1px solid #d9b87630; background: url("/assets/party-lobby.jpg") 69% 47% / cover, radial-gradient(ellipse at 40% 20%, #47684c, #16382c 45%, #091b16); isolation: isolate; }
  .modal-art::before { content: ""; position: absolute; z-index: 1; inset: 16px; border: 1px solid #d9b87638; pointer-events: none; }
  .modal-art::after { content: ""; position: absolute; z-index: 0; inset: 0; background: linear-gradient(180deg, #03170f30, transparent 25%, transparent 50%, #03170ff0 92%); pointer-events: none; }
  .modal-art img { display: block; width: 100%; height: 100%; position: absolute; object-fit: cover; }
  .art-kicker { position: absolute; top: 38px; left: 30px; right: 30px; z-index: 2; text-align: center; font-size: 9px; color: #ddcba0; letter-spacing: .2em; }
  .art-monogram { display: none; }
  .modal-art > p { position: absolute; z-index: 2; left: 32px; right: 32px; bottom: 68px; margin: 0; font-family: Georgia, serif; font-size: 37px; line-height: 1.05; letter-spacing: -.04em; color: #f3e4bf; text-shadow: 0 3px 20px #0008; }
  .art-footer { position: absolute; z-index: 2; left: 32px; right: 32px; bottom: 37px; font-size: 9px; color: #b4b7a0; letter-spacing: .17em; }
  .art-caption { position: absolute; bottom: 35px; left: 28px; right: 28px; z-index: 2; color: #f3e6c9; font-family: Georgia, serif; font-size: 24px; line-height: 1.3; text-shadow: 0 2px 14px #0008; }
  .art-caption small { display: block; margin-top: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #c7c6a9; }
  .join-fields { display: block; }
  .join-row { display: flex; gap: 10px; align-items: center; }
  .join-fields .field { min-width: 0; text-transform: uppercase; letter-spacing: .12em; }
  .join-fields .secondary-button { min-height: 49px; }
  .lobby-start { width: 100%; margin-top: 22px; }
  p.lobby-footer { margin: 15px 0 0; color: #8f9e8d; font-size: 12px; text-align: center; }
  .divider { display: flex; align-items: center; gap: 12px; color: #889b88; font-size: 12px; margin: 23px 0; }
  .divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #a9c29a20; }
  .rules-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 20px; margin: 30px 0; color: #b9c4b6; font-size: 14px; line-height: 1.7; }
  .rules-list li { position: relative; padding-left: 24px; }
  .rules-list li::before { content: "♦"; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 13px; }
  .rules-list strong { color: #efe8d7; font-weight: 600; }
  .rule-rank { padding: 13px 11px; border: 1px solid #d9b87625; border-radius: 7px; background: #d9b87608; color: var(--gold-light); font-size: 14px; text-align: center; letter-spacing: .06em; line-height: 1.8; }
  .rules-callout { color: #bdcdb5; font-size: 14px; line-height: 1.7; padding: 17px; border-left: 2px solid var(--gold); background: #d9b8760a; margin: 22px 0; }
  .rules-callout strong { color: #e4d4ad; }
  .results-list { display: flex; flex-direction: column; gap: 7px; margin: 27px 0; }
  .result-row { display: flex; gap: 14px; align-items: center; padding: 13px 14px; border-radius: 7px; background: #ffffff05; }
  .result-row:first-child { background: #d9b87611; border: 1px solid #d9b87625; }
  .result-row.is-you { outline: 1px solid #81987d50; }
  .result-rank { width: 25px; font-family: Georgia, serif; font-size: 25px; color: var(--gold); }
  .result-name { flex: 1; font-size: 15px; font-weight: 600; }
  .result-tag { color: #a5b39e; font-size: 12px; }
  .waiting-panel { padding: 44px 24px 35px; text-align: center; width: min(100%, 560px); }
  .waiting-panel h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 29px; font-weight: 400; letter-spacing: -.035em; }
  .waiting-panel p { color: #bdcbb7; font-size: 14px; line-height: 1.7; margin: 9px 0; }
  .invite-code { display: block; font-size: 32px; font-weight: 650; letter-spacing: .24em; color: #f0dba7; margin: 16px auto; border: 0; padding: 0 10px; min-height: 58px; background: transparent; }
  .invite-code small { display: block; margin-top: 4px; font-size: 9px; color: #b7c3ad; letter-spacing: .17em; }
  .invite-link { display: block; font-size: 14px; color: #d6d4b4; margin: 0 auto 16px; overflow-wrap: anywhere; }
  .waiting-panel > .standing-meta { display: block; margin: 0 0 15px; }
  .waiting-panel > .session-label { display: block; }
  .waiting-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 17px 0; }
  .waiting-seat { font-size: 12px; border: 1px solid #afc29b30; border-radius: 30px; padding: 6px 10px; color: #d0ddc4; background: #071b1350; }
  .toast { position: fixed; left: 50%; bottom: 25px; transform: translateX(-50%); z-index: 100; padding: 13px 22px; max-width: calc(100% - 32px); border: 1px solid #d9b87660; border-radius: 9px; background: #26382d; color: #f4ead6; box-shadow: 0 10px 40px #0005; font-size: 14px; line-height: 1.5; text-align: center; }
  .error-message { color: #ffb7a6; font-size: 14px; line-height: 1.6; margin-top: 12px; }
  .notice { padding: 12px 15px; border: 1px solid #d9b87630; border-radius: 8px; background: #d9b8760b; color: #d9d1b5; font-size: 14px; line-height: 1.6; }
  .notice-title { display: block; color: var(--gold-light); font-weight: 650; margin-bottom: 4px; }
  .activity-log { list-style: none; padding: 0; margin: 27px 0 0; color: #bec9b8; font-size: 14px; line-height: 1.7; }
  .activity-log li { padding: 11px 0; border-bottom: 1px solid #d9b87615; }
  .activity-log li:first-child { color: #efe2c5; }
  .confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
  .rule-rank > span { display: flex; justify-content: space-between; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 9px; color: #a1b095; letter-spacing: .16em; margin: 9px 1px 0; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
  body[data-theme="midnight"] { --gold: #a7c6f0; --gold-light: #d2e6ff; --gold-dim: #7696bd; --ink: #0c111b; --panel: #141f32; --panel-soft: #1c2b41; background: radial-gradient(ellipse at 60% -20%, #243b58, transparent 50%), #0c111b; }
  body[data-theme="midnight"] .felt { background: radial-gradient(ellipse at 50% 30%, #2e5677, #1b3e5b 48%, #122c42 85%); border-color: #263341; box-shadow: 0 0 0 6px #0d1823, 0 0 0 7px #a7c6f026, inset 0 0 65px #091e31, 0 25px 60px #0006; }
  body[data-theme="midnight"] .felt-wordmark { color: #a7c6f077; }
  body[data-theme="midnight"] .primary-button { background: linear-gradient(125deg, #d2e6ff, #a7c6f0); color: #14263d; }
  body[data-theme="midnight"] .quiet-button, body[data-theme="midnight"] .secondary-button, body[data-theme="midnight"] .theme-select { background-color: #152337; border-color: #3d506a; }
  body[data-theme="midnight"] .modal { background: radial-gradient(ellipse at 100% 0, #2a4260, transparent 50%), #142338; border-color: #a7c6f055; }
  body[data-theme="midnight"] .field, body[data-theme="midnight"] .stepper { background-color: #0c1a2b; border-color: #3d5672; }
  body[data-theme="midnight"] .mode-tab.is-selected, body[data-theme="midnight"] .mode-tab[aria-selected="true"], body[data-theme="midnight"] .stepper-btn { background: #2a4260; }
  body[data-theme="midnight"] .toast { background: #233952; border-color: #a7c6f066; }
  body[data-theme="velvet"] { --gold: #dfadad; --gold-light: #f6d4ce; --gold-dim: #ab7e85; --ink: #160f19; --panel: #271b2c; --panel-soft: #39243d; background: radial-gradient(ellipse at 60% -20%, #533047, transparent 50%), #160f19; }
  body[data-theme="velvet"] .felt { background: radial-gradient(ellipse at 50% 30%, #704460, #542e48 48%, #3a2033 85%); border-color: #3c2a35; box-shadow: 0 0 0 6px #22141e, 0 0 0 7px #dfadad26, inset 0 0 65px #2c1327, 0 25px 60px #0006; }
  body[data-theme="velvet"] .felt-wordmark { color: #dfadad77; }
  body[data-theme="velvet"] .primary-button { background: linear-gradient(125deg, #f6d4ce, #dfadad); color: #341c2d; }
  body[data-theme="velvet"] .quiet-button, body[data-theme="velvet"] .secondary-button, body[data-theme="velvet"] .theme-select { background-color: #2d1c2b; border-color: #614159; }
  body[data-theme="velvet"] .modal { background: radial-gradient(ellipse at 100% 0, #58334b, transparent 50%), #2d1b2b; border-color: #dfadad55; }
  body[data-theme="velvet"] .field, body[data-theme="velvet"] .stepper { background-color: #20121f; border-color: #6f4a63; }
  body[data-theme="velvet"] .mode-tab.is-selected, body[data-theme="velvet"] .mode-tab[aria-selected="true"], body[data-theme="velvet"] .stepper-btn { background: #58334b; }
  body[data-theme="velvet"] .toast { background: #482b3f; border-color: #dfadad66; }
}

@layer responsive {
  @media (min-width: 1500px) and (min-height: 900px) {
    .play-area { padding-top: 38px; }
    .opponents { margin-bottom: 24px; }
    .avatar { width: 57px; height: 57px; font-size: 24px; }
    .felt { min-height: 350px; }
    .human-zone { margin-top: 35px; }
    .hand-cards { min-height: 185px; }
    .hand-cards .playing-card { width: 98px; height: 140px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -23px; }
  }
  @media (max-width: 1150px) {
    .header-actions .connection-pill { display: none; }
    .game-layout { grid-template-columns: 185px minmax(0, 1fr); }
    .sidebar { padding-left: 22px; padding-right: 18px; }
    .play-area { padding-left: 3%; padding-right: 3%; }
    .opponents { gap: 7px; }
    .opponent-name { font-size: 13px; }
    .opponent-info { font-size: 11px; }
    .avatar { width: 42px; height: 42px; font-size: 19px; }
    .hand-cards .playing-card { width: 78px; height: 114px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -25px; }
    .hand-cards { min-height: 156px; padding-left: 10px; padding-right: 10px; }
    .card-suit { font-size: 37px; }
  }
  @media (max-width: 850px) {
    .app-header, .site-header, .game-header, .topbar { min-height: 85px; padding: 17px 23px; gap: 15px; }
    .brand-title, .brand-name { font-size: 19px; }
    .brand-subtitle, .brand-tagline { font-size: 10px; }
    .brand-icon, .brand-mark { width: 33px; height: 41px; font-size: 24px; }
    .header-actions { gap: 8px; }
    .header-actions .quiet-button { padding: 10px 13px; }
    .game-layout { grid-template-columns: 1fr; min-height: calc(100dvh - 85px); }
    .sidebar { flex-direction: row; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 25px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar .session-label { font-size: 10px; margin-bottom: 4px; }
    .round-heading { font-size: 24px; margin: 0; white-space: nowrap; }
    .sidebar .standings-title, .sidebar h3, .sidebar .table-note, .sidebar .standings-list { display: none; }
    .play-area { padding-top: 20px; }
    .opponents { gap: 8px; }
    .felt { max-width: 740px; min-height: 310px; }
    .table-footer { padding-bottom: 16px; }
    .human-zone { margin-top: 17px; }
  }
  @media (max-width: 600px) {
    .app-header, .site-header, .game-header, .topbar { min-height: 79px; padding: 16px 18px; flex-wrap: wrap; gap: 15px; }
    .brand { gap: 10px; }
    .brand-title, .brand-name { font-size: 16px; letter-spacing: .14em; }
    .brand-subtitle, .brand-tagline { font-size: 9px; letter-spacing: .24em; }
    .brand-icon, .brand-mark { width: 29px; height: 36px; font-size: 22px; border-radius: 5px; }
    .header-actions { gap: 8px; width: 100%; }
    .header-actions .secondary-button { padding: 10px 13px; font-size: 14px; }
    .header-actions .quiet-button { font-size: 14px; min-height: 44px; padding: 9px 10px; }
    .theme-select { flex: 1; min-width: 0; max-width: none; font-size: 12px; padding-left: 10px; padding-right: 25px; background-position: right 9px center; }
    img.brand-mark { width: 38px; height: 38px; }
    .header-actions .icon-button { width: 40px; }
    .header-actions .room-badge { display: none; }
    .sidebar { display: grid; grid-template-columns: 1fr auto; padding: 13px 20px; gap: 4px 12px; }
    .sidebar > .session-label { grid-column: 1; margin: 0; }
    .sidebar > .round-heading { grid-column: 1; }
    .sidebar > .standing-meta { grid-column: 1; margin: 0; }
    .sidebar > .text-button { grid-column: 2; grid-row: 1 / span 3; }
    .round-heading { font-size: 22px; }
    .play-area { padding: 15px 13px 0; }
    .opponents { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2px; column-gap: 3px; margin-bottom: 8px; }
    .opponents:has(.opponent:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .opponent { padding-top: 6px; padding-bottom: 12px; }
    .avatar { width: 36px; height: 36px; font-size: 17px; }
    .opponent-name { font-size: 12px; margin-top: 8px; }
    .opponent-info { font-size: 11px; margin-top: 2px; }
    .mini-cards { height: 19px; margin-top: 5px; }
    .card-back { height: 19px; width: 14px; }
    .turn-badge { font-size: 8px; bottom: -1px; }
    .felt { min-height: 285px; flex-basis: 285px; max-height: none; border-radius: 105px; border-width: 5px; box-shadow: 0 0 0 3px #111917, 0 0 0 4px #d9b87625, inset 0 0 45px #08261c, 0 16px 35px #0004; }
    .felt::before { inset: 8px; }
    .felt-wordmark { top: 18px; font-size: 11px; letter-spacing: .22em; }
    .felt-kicker { bottom: 16px; font-size: 8px; letter-spacing: .16em; }
    .pile-area { padding-top: 55px; padding-bottom: 85px; gap: 12px; }
    .pile-cards { min-height: 108px; }
    .pile-cards .playing-card { width: 76px; height: 108px; }
    .pile-cards .playing-card + .playing-card { margin-left: -24px; }
    .pile-caption { font-size: 14px; }
    .empty-pile { min-height: 148px; font-size: 12px; }
    .empty-symbol { width: 64px; height: 77px; font-size: 37px; }
    .empty-pile h2 { font-size: 24px; }
    .last-action { font-size: 12px; left: 21px; right: 21px; bottom: 36px; line-height: 1.5; min-height: 18px; margin: 0; }
    .human-zone { margin-top: 11px; }
    .hand-heading { padding: 0 4px; }
    .hand-heading h2 { font-size: 14px; }
    .hand-meta { font-size: 12px; }
    .hand-cards { min-height: 141px; justify-content: safe center; padding: 23px 5px 10px; }
    .hand-cards .playing-card { width: 67px; height: 99px; border-radius: 6px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -30px; }
    .playing-card .card-corner { top: 6px; left: 6px; font-size: 18px; }
    .card-corner small, .card-corner .suit, .card-corner span + span { margin-top: 2px; font-size: 13px; }
    .card-bottom { bottom: 6px; right: 6px; font-size: 18px; }
    .card-bottom small, .card-bottom span + span { margin-top: 2px; font-size: 13px; }
    .card-suit { font-size: 30px; }
    .hand-cards .playing-card.is-selected { transform: translateY(-15px); box-shadow: 0 0 0 2px var(--gold), 0 8px 20px #0006; }
    .action-bar { gap: 8px; padding-top: 3px; padding-bottom: 14px; }
    .action-bar .primary-button { min-width: 125px; padding-left: 20px; padding-right: 20px; }
    .action-bar .secondary-button { padding-left: 18px; padding-right: 18px; }
    .selection-help { font-size: 14px; padding: 0 6px; }
    .keyboard-note { display: none; }
    .table-footer { font-size: 10px; gap: 10px; padding: 13px 4px 16px; }
    .modal-backdrop { padding: 15px; }
    .modal { padding: 34px 26px 28px; border-radius: 13px; max-height: calc(100dvh - 30px); }
    .lobby-modal { padding: 0; width: calc(100vw - 28px); }
    .lobby-modal[open] { grid-template-columns: 1fr; }
    .modal-content { padding: 29px 26px 28px; }
    .modal-art { display: none; }
    .modal-title { font-size: 43px; }
    .modal-description { font-size: 14px; margin-bottom: 19px; }
    .modal-eyebrow { margin-bottom: 17px; font-size: 10px; }
    .mode-tabs { margin: 20px 0; }
    .mode-tab { font-size: 14px; }
    .form-row { gap: 12px; }
    .stepper { gap: 0; }
    .stepper-btn { width: 36px; }
    .stepper-value { min-width: 47px; font-size: 12px; }
    .stepper-value strong { font-size: 18px; }
    .lobby-summary { font-size: 11px; gap: 10px; }
    .waiting-panel { padding: 43px 20px 34px; }
    .waiting-panel h2 { font-size: 24px; }
    .waiting-panel p { font-size: 12px; }
    .invite-code { font-size: 26px; margin: 11px 0; }
    .waiting-seats { gap: 5px; margin: 10px 0; }
    .waiting-seat { font-size: 10px; padding: 5px 8px; }
    .waiting-panel .primary-button, .waiting-panel .secondary-button { font-size: 13px; min-width: 125px; padding: 11px 17px; }
    .rules-list { gap: 17px; margin: 23px 0; }
    .rule-rank { font-size: 12px; letter-spacing: .04em; }
  }
  @media (max-width: 370px) {
    .app-header, .site-header, .game-header, .topbar { padding-left: 13px; padding-right: 13px; }
    .header-actions .quiet-button { padding-left: 9px; padding-right: 9px; }
    .brand-title, .brand-name { font-size: 14px; }
    .modal { padding-left: 21px; padding-right: 21px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}


/* AFTER HOURS / PARTY EDITION — bright tables, loud characters, serious cards. */
@font-face {
  font-family: Outfit;
  src: url("/assets/outfit-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@layer party {
  :root {
    --ink: #120d28;
    --panel: #20163d;
    --panel-soft: #2d2051;
    --gold: #d0ff57;
    --gold-light: #e4ff9a;
    --gold-dim: #a1c54b;
    --cream: #fffdf8;
    --text: #fffaff;
    --muted: #b5abc9;
    --line: #c6aaff1c;
    --green: #076d65;
    --red: #f04470;
    --party-felt: #167c78;
    --party-deep: #095051;
    --party-rail: #7050ad;
    font-family: Outfit, "Avenir Next", "Trebuchet MS", sans-serif;
  }
  body, body[data-theme="emerald"] {
    --gold: #d0ff57;
    --gold-light: #e4ff9a;
    --gold-dim: #a1c54b;
    --party-felt: #168881;
    --party-deep: #084f54;
    --party-rail: #7652bb;
    background: radial-gradient(ellipse at 82% 0, #532b8455, transparent 48%), radial-gradient(ellipse at 10% 78%, #30468638, transparent 48%), #120d28;
  }
  body::before {
    z-index: -1;
    opacity: .23;
    background-size: 530px 530px;
    background-image: url("data:image/svg+xml,%3Csvg width='530' height='530' viewBox='0 0 530 530' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke-width='1.2'%3E%3Cpath d='m62 40 8 13-8 13-8-13Z' stroke='%23cfff57' transform='rotate(15 62 53)'/%3E%3Cpath d='m459 280 10 15-10 15-10-15Z' stroke='%23fd79b4' transform='rotate(-15 459 295)'/%3E%3Cpath d='m210 420 5-10 5 10 10 5-10 5-5 10-5-10-10-5Z' stroke='%2361e1ec'/%3E%3Cpath d='m400 91 4-8 4 8 8 4-8 4-4 8-4-8-8-4Z' stroke='%23cfff57'/%3E%3Ccircle cx='109' cy='282' r='3' stroke='%23c29dff'/%3E%3Ccircle cx='316' cy='185' r='2' fill='%23ff79b4' stroke='none'/%3E%3Ccircle cx='363' cy='460' r='2' fill='%2361e1ec' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  }
  body::after { content: ""; position: fixed; z-index: -2; inset: -25%; pointer-events: none; background: conic-gradient(from 20deg at 74% 0, transparent 0deg, #8850ff0b 12deg, transparent 25deg, transparent 85deg, #e563e80a 103deg, transparent 120deg); }
  .topbar, .app-header, .site-header, .game-header { min-height: 92px; padding: 18px 3.2%; border-bottom: 1px solid #bc9cff20; background: #130e29a8; backdrop-filter: blur(15px); }
  .brand-title, .brand-name { font-family: Outfit, "Avenir Next", "Trebuchet MS", sans-serif; font-size: 30px; font-weight: 900; line-height: .98; letter-spacing: -.07em; color: var(--gold); }
  .brand-dot { color: #ff7baf; }
  .brand .party-logo { display: block; width: clamp(180px, 17vw, 245px); height: 75px; object-fit: contain; border: 0; border-radius: 0; background: transparent; box-shadow: none; filter: none; transform: none; }
  .lobby-logo { display: block; width: 190px; height: 76px; object-fit: contain; margin-bottom: 15px; }
  .brand-subtitle { margin-top: 7px; font-size: 10px; color: #c0aedb; letter-spacing: .19em; font-weight: 600; }
  img.brand-mark { width: 51px; height: 51px; filter: hue-rotate(21deg) saturate(1.8) brightness(1.2); }
  .header-actions { gap: 10px; }
  .connection-pill { background: #2a1e48; border-color: #8062a64d; color: #d5c6ed; font-size: 12px; }
  .connection-pill::before { background: var(--gold); }
  .theme-select, .quiet-button, .secondary-button { min-height: 44px; border: 1px solid #8f6cc25c; border-radius: 12px; background-color: #2a1d49; color: #f0e7ff; font-size: 14px; font-weight: 650; }
  .theme-select { background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d0ff57' stroke-width='2'/%3E%3C/svg%3E"); }
  .quiet-button:hover, .secondary-button:hover { border-color: #ad87ec; background: #402664; color: #fff; transform: translateY(-1px); }
  button, .theme-select { white-space: nowrap; }
  .primary-button { border: 1px solid #edffb5; border-radius: 13px; background: var(--gold); color: #202c25; font-size: 16px; font-weight: 850; letter-spacing: -.02em; box-shadow: 0 4px 0 #79a42b, 0 7px 22px #b0ff3b1b, inset 0 1px #ffffff88; min-height: 48px; }
  .primary-button:hover { background: var(--gold-light); box-shadow: 0 5px 0 #79a42b, 0 9px 28px #b0ff3b29; transform: translateY(-2px); }
  .primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #79a42b; }
  .primary-button:disabled { background: #4d4167; color: #a79bb6; border-color: #645775; box-shadow: 0 3px 0 #2b223c; }
  .text-button { font-size: 14px; color: #cbbde0; font-weight: 600; }
  .text-button:hover { color: var(--gold); background: #9b75d51c; }
  .icon-button { color: var(--gold); border-color: #9472c34d; background: #281b43; }
  .game-layout { grid-template-columns: 215px minmax(0, 1fr); min-height: calc(100dvh - 92px); }
  .sidebar { padding: 31px 21px 24px 26px; border-color: #bc9cff1b; background: linear-gradient(180deg, #1b123033, #130e2933); }
  .session-label { color: #b49cd0; font-size: 11px; letter-spacing: .12em; font-weight: 750; }
  .round-heading { font-family: Outfit, "Avenir Next", "Trebuchet MS", sans-serif; font-size: 31px; font-weight: 850; letter-spacing: -.055em; margin-bottom: 13px; }
  .sidebar > .standing-meta { line-height: 1.6; color: #aa98c0; margin-bottom: 20px; }
  .standings-list { gap: 7px; }
  .standing-row { border-radius: 12px; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .standing-row.is-you { background: #b89ef411; border-color: #a884d42b; }
  .standing-avatar { width: 35px; height: 35px; background: #6a46a1; border-radius: 12px; color: #fff; box-shadow: inset 0 0 0 1px #e3c4ff2e; }
  .standing-row.is-you .standing-avatar { background: var(--gold); color: #303a1d; }
  .standing-name { font-size: 14px; font-weight: 700; }
  .standing-meta { color: #a998be; font-size: 12px; }
  .standing-place { font-family: inherit; font-size: 17px; font-weight: 800; color: #d2b1ff; }
  .table-note { color: #b7a7ca; font-size: 16px; line-height: 1.5; }
  .note-symbol { color: #ff85ba; transform: rotate(-15deg); font-size: 39px; }
  .table-note p { font-weight: 700; }
  .play-area { padding-top: 23px; padding-left: 3.4%; padding-right: 3.4%; }
  .opponents { max-width: 1080px; gap: 10px; margin-bottom: 10px; }
  .opponent { padding-bottom: 22px; }
  .avatar { width: 78px; height: 78px; border-radius: 25px; border: 3px solid #b295dd; background: linear-gradient(145deg, #9f6fe6, #6544a4); color: #fff; box-shadow: 0 5px 0 #25153d, inset 0 1px #fff8; font-family: inherit; font-size: 31px; font-weight: 850; }
  .opponent:nth-child(4n+2) .avatar { background: linear-gradient(145deg, #f389b1, #a44585); border-color: #f4b0d0; }
  .opponent:nth-child(4n+3) .avatar { background: linear-gradient(145deg, #6dd7e5, #3f83b9); border-color: #a0e4ed; }
  .opponent:nth-child(4n+4) .avatar { background: linear-gradient(145deg, #ffc17c, #cb8164); border-color: #ffdca5; }
  .avatar.generated-avatar { overflow: hidden; }
  .opponent.is-active .avatar { border-color: var(--gold); box-shadow: 0 0 0 4px #d0ff5726, 0 0 32px #d0ff5730, 0 5px 0 #25153d; animation: party-turn 2s ease-in-out infinite; }
  .opponent.is-active .avatar::after { display: none; }
  .opponent.is-out .avatar { border-color: #ffdb72; background: #f0a957; }
  .opponent.has-passed { opacity: .48; }
  .opponent-name { margin-top: 11px; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
  .opponent-info { margin-top: 4px; font-size: 12px; font-weight: 500; color: #baabce; }
  .turn-badge { bottom: 0; color: #242d15; background: var(--gold); border-radius: 20px; font-size: 10px; font-weight: 850; padding: 4px 10px; letter-spacing: .06em; box-shadow: 0 3px 0 #668f2e; }
  .mini-cards { margin-top: 8px; }
  .card-back { width: 18px; height: 25px; border-color: #cab5f1; background: repeating-linear-gradient(45deg, #68499b 0, #68499b 3px, #8867b4 3px, #8867b4 4px); border-radius: 4px; }
  .felt, body[data-theme="midnight"] .felt, body[data-theme="velvet"] .felt {
    min-height: 310px;
    flex-basis: 310px;
    max-height: 400px;
    border: 9px solid var(--party-rail);
    border-radius: 190px;
    outline: 1px solid #c8a7ff;
    background: radial-gradient(ellipse at 50% 20%, var(--party-felt), var(--party-deep));
    box-shadow: 0 0 0 5px #321e51, 0 0 0 7px #9872d24d, inset 0 0 0 1px #74e6d64d, inset 0 -22px 65px #032e3e6b, 0 20px 0 -12px #08061b, 0 25px 65px #0006, 0 0 70px #7350db18;
  }
  .felt::before { inset: 12px; border: 2px dashed #a0f3cf28; }
  .felt::after { opacity: .07; }
  .felt-wordmark, body[data-theme="midnight"] .felt-wordmark, body[data-theme="velvet"] .felt-wordmark { font-family: inherit; font-weight: 900; font-size: 16px; letter-spacing: .2em; top: 22px; color: #b7ffe85c; }
  .felt-wordmark > span { color: #c7fce280; font-size: 8px; font-weight: 650; letter-spacing: .13em; }
  .felt-kicker { color: #bbffdf66; font-weight: 700; bottom: 17px; font-size: 9px; }
  .pile-area { padding-top: 61px; padding-bottom: 78px; }
  .pile-cards { min-height: 134px; }
  .pile-caption { color: #e6fff6; font-size: 14px; font-weight: 650; }
  .playing-card { background: linear-gradient(135deg, #fff, #f4f5fc); color: #222c50; border: 2px solid #172441; border-radius: 11px; box-shadow: 0 4px 0 #16253e55, 0 9px 16px #002c3c40; }
  .playing-card.red-card { color: #ef3d6d; }
  .playing-card .card-corner, .playing-card .card-bottom { font-family: Outfit, "Avenir Next", "Trebuchet MS", sans-serif; font-size: 24px; font-weight: 850; line-height: .95; }
  .playing-card .card-corner b, .playing-card .card-bottom b { font-weight: 850; }
  .card-corner span, .card-bottom span { font-family: Georgia, serif; }
  .card-suit { font-size: 45px; }
  .pile-cards .playing-card { width: 94px; height: 134px; }
  .last-action { color: #b9f6e4; font-size: 14px; bottom: 37px; font-weight: 550; }
  .empty-symbol { width: 69px; height: 83px; border: 2px solid #a8f7db55; color: #c0ffe98c; background: #a4ffe208; border-radius: 12px; font-size: 44px; box-shadow: 5px 5px 0 #9ef3d915; }
  .empty-pile { color: #d9fff2; font-weight: 750; }
  .empty-pile small { color: #b4e2d4; font-size: 12px; font-weight: 500; line-height: 1.5; }
  .human-zone { margin-top: 24px; }
  .hand-heading .session-label { font-size: 12px; color: #eee1ff; font-weight: 850; letter-spacing: .1em; }
  .hand-heading .turn-badge { background: var(--gold); color: #263018; border: 0; font-size: 11px; }
  .hand-meta { color: #b7a5ce; font-size: 14px; }
  .hand-cards { min-height: 181px; padding-top: 26px; padding-bottom: 11px; justify-content: safe center; scrollbar-color: #8465b6 transparent; }
  .hand-cards .playing-card { width: 94px; height: 134px; border-radius: 10px; }
  .hand-cards .playing-card:not(:first-child) { margin-left: -28px; }
  .hand-cards .playing-card:hover:not(:disabled) { transform: translateY(-13px) rotate(-2deg); box-shadow: 0 10px 22px #0007; }
  .hand-cards .playing-card.is-selected { transform: translateY(-20px); border-color: #283829; box-shadow: 0 0 0 4px var(--gold), 0 0 24px #c3ff574d, 0 12px 26px #0007; }
  .hand-cards .playing-card.is-selected:hover { transform: translateY(-22px); }
  .hand-empty { color: #b5a0ce; }
  .selection-help { color: #c3b3d7; font-size: 14px; font-weight: 500; }
  .action-bar { padding-bottom: 20px; }
  .play-actions { gap: 12px; }
  .table-footer { border-color: #9f7bc226; color: #ac98c3; font-size: 12px; padding-top: 13px; }
  .keyboard-note { color: #a28db9; }
  kbd { background: #37254f; border-color: #6d518d; color: #b6a1ce; }
  dialog.modal { max-height: min(90dvh, 920px); }
  dialog.modal::backdrop { background: #0c0627cc; backdrop-filter: blur(11px) saturate(.65); }
  .modal, body[data-theme="midnight"] .modal, body[data-theme="velvet"] .modal { background: radial-gradient(ellipse at 90% -5%, #6c3d8755, transparent 55%), #25163e; border: 2px solid #9b76d28c; border-radius: 23px; box-shadow: 0 9px 0 #0c0820, 0 35px 120px #0009, inset 0 1px #ffffff16; }
  .modal::before { content: "✦"; color: #e895ff15; transform: rotate(10deg); }
  .modal-close { color: #d3bde7; border: 1px solid #cba6f233; background: #4d2f664d; right: 13px; top: 13px; font-family: inherit; }
  .modal-close:hover { color: #fff; background: #6d4185; }
  .modal-eyebrow { color: #ff91c0; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
  .modal-title { font-family: Outfit, "Avenir Next", "Trebuchet MS", sans-serif; font-weight: 900; font-size: clamp(39px, 4.1vw, 56px); line-height: 1.02; letter-spacing: -.05em; }
  .modal-title em { color: var(--gold); font-family: inherit; font-weight: 900; font-style: normal; }
  .modal-description { color: #c3addb; font-size: 15px; line-height: 1.6; }
  .lobby-modal { width: min(930px, calc(100vw - 48px)); }
  .lobby-modal[open] { grid-template-columns: .82fr 1fr; }
  .modal-content { padding: 43px 38px 34px; }
  .modal-art { min-height: 610px; background-color: #50277a; border-color: #c7a1ff33; background-blend-mode: normal; background-position: 69% 47%; }
  .modal-art::after { background: linear-gradient(180deg, #8c3ae359, #6f2ba826 32%, #47206c66 60%, #1e0f3cf5 95%); }
  .modal-art::before { border: 2px solid #d8a1ff55; border-radius: 11px; inset: 15px; }
  .art-kicker { color: #fbdaff; font-weight: 750; font-size: 10px; letter-spacing: .17em; }
  .modal-art > p { font-family: inherit; font-size: 42px; color: #fbddff; letter-spacing: -.065em; font-weight: 900; bottom: 68px; }
  .art-footer { color: #cbb2e1; font-weight: 650; }
  .mode-tabs { background: #130c25a6; border-color: #aa79e72e; border-radius: 14px; padding: 5px; margin: 24px 0; gap: 5px; }
  .mode-tab { font-size: 15px; color: #b9a6d2; border-radius: 9px; font-weight: 750; }
  .mode-tab.is-selected, .mode-tab[aria-selected="true"], body[data-theme="midnight"] .mode-tab[aria-selected="true"], body[data-theme="velvet"] .mode-tab[aria-selected="true"] { background: #7650bb; border-color: #b58de153; color: #fff; box-shadow: 0 3px 0 #27163f; }
  .form-label { color: #d7c6e8; font-size: 12px; font-weight: 800; letter-spacing: .075em; }
  .field, .stepper, body[data-theme="midnight"] .field, body[data-theme="midnight"] .stepper, body[data-theme="velvet"] .field, body[data-theme="velvet"] .stepper { background-color: #190f2f; border: 1px solid #9774bb70; border-radius: 11px; color: #fff3ff; }
  .field { font-size: 16px; font-weight: 600; min-height: 50px; }
  .field::placeholder { color: #aa8bbf; font-weight: 450; }
  .field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #d0ff5717; }
  .stepper-btn, body[data-theme="midnight"] .stepper-btn, body[data-theme="velvet"] .stepper-btn { background: #513279; border-radius: 8px; color: #eadcff; font-weight: 700; }
  .stepper-btn:hover { background: #744ba6; }
  .stepper-value { font-size: 22px; font-weight: 850; color: #fff; }
  .lobby-summary { color: #ad98c4; font-size: 13px; border-color: #ba91df22; }
  .lobby-start { min-height: 53px; margin-top: 23px; }
  p.lobby-footer { color: #ad98c4; font-size: 12px; font-weight: 550; margin-top: 18px; }
  .divider { color: #b39ac8; }
  .divider::before, .divider::after { background: #c6a4e32b; }
  .rules-list { color: #ceb9e2; }
  .rules-list strong { color: #f4e7ff; }
  .rule-rank { background: #a375e41a; border-color: #bd8ce653; color: #e4d0ff; font-weight: 700; border-radius: 12px; }
  .rule-rank > span { color: #a98fc2; }
  .rules-callout { color: #cdb7e2; background: #bb8fef12; border-left-color: #ff8fbf; border-radius: 0 10px 10px 0; }
  .rules-callout strong { color: #f5b9d4; }
  .result-row { background: #ba91ea0a; padding: 14px; border-radius: 12px; }
  .result-row:first-child { background: #d0ff5714; border: 1px solid #d0ff5759; }
  .result-rank { font-family: inherit; font-size: 22px; font-weight: 850; color: #ffcf67; }
  .result-name { font-weight: 750; }
  .result-tag { color: #bda3d0; }
  .results-modal { background-image: radial-gradient(circle at 9% 5%, #ff85b533 0, transparent 24%), radial-gradient(circle at 90% 15%, #cfff5722, transparent 30%), linear-gradient(#2c1947, #211337); }
  .results-modal::before { content: "✦ ✧"; font-size: 75px; color: #ffb3d32e; top: 24px; right: 18px; letter-spacing: -.2em; }
  .felt:has(.waiting-panel) { min-height: 390px; max-height: none; }
  .pile-area:has(.waiting-panel) { padding: 35px 22px 45px; }
  .felt:has(.waiting-panel) .felt-wordmark, .felt:has(.waiting-panel) .last-action { display: none; }
  .waiting-panel { padding: 0; }
  .waiting-panel > p:not(.waiting-host) { display: none; }
  .waiting-panel h2 { font-family: inherit; font-weight: 900; font-size: 29px; letter-spacing: -.055em; }
  .waiting-panel p { color: #c1eee0; font-weight: 500; }
  .waiting-panel .session-label { color: #b3e9df; }
  .invite-code { color: var(--gold); font-size: 34px; font-weight: 900; margin-top: 10px; margin-bottom: 10px; }
  .invite-code small { color: #b5e8d8; }
  .invite-link { color: #ecfff8; background: #12635d; border-color: #74bfb18c; }
  .waiting-panel > .standing-meta { color: #a9d9cf; }
  .toast, body[data-theme="midnight"] .toast, body[data-theme="velvet"] .toast { background: #432866; border: 1px solid #b88ee57d; color: #fff3ff; border-radius: 16px; box-shadow: 0 5px 0 #1c102e, 0 15px 50px #0006; font-size: 15px; font-weight: 600; padding: 16px 25px; bottom: 25px; }
  .activity-log { color: #c8b0de; }
  .activity-log li { border-color: #c19ae022; }
  .activity-log li:first-child { color: #ecddff; }
  body[data-theme="midnight"] { --gold: #ff8fc9; --gold-light: #ffc4e5; --gold-dim: #bd7dab; --party-felt: #2563bc; --party-deep: #173a7d; --party-rail: #6959bd; background: radial-gradient(ellipse at 80% 0, #2458ae66, transparent 50%), #0b1232; }
  body[data-theme="velvet"] { --gold: #d8ff61; --gold-light: #ecffae; --gold-dim: #a1bc55; --party-felt: #a3438f; --party-deep: #672768; --party-rail: #8460c8; background: radial-gradient(ellipse at 80% 0, #7d2f7b66, transparent 50%), #210e32; }
  body[data-theme="midnight"] .primary-button, body[data-theme="velvet"] .primary-button { background: var(--gold); color: #2d2541; border-color: #ffffff88; box-shadow: 0 4px 0 #784977, 0 7px 22px #ff8fc91b; }
  body[data-theme="midnight"] .quiet-button, body[data-theme="midnight"] .secondary-button, body[data-theme="midnight"] .theme-select, body[data-theme="velvet"] .quiet-button, body[data-theme="velvet"] .secondary-button, body[data-theme="velvet"] .theme-select { background-color: #31214e; border-color: #9874bd66; }
  @keyframes party-turn { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
  @media (min-width: 1600px) and (min-height: 900px) {
    .avatar { width: 90px; height: 90px; border-radius: 28px; }
    .opponents { margin-bottom: 18px; }
    .felt { min-height: 350px; }
    .hand-cards .playing-card { width: 101px; height: 143px; }
    .hand-cards { min-height: 190px; }
  }
  @media (max-width: 1150px) {
    .game-layout { grid-template-columns: 185px minmax(0, 1fr); }
    .sidebar { padding-left: 22px; padding-right: 17px; }
    .brand-title { font-size: 27px; }
    .header-actions .connection-pill { display: none; }
    .avatar { width: 64px; height: 64px; border-radius: 21px; }
    .opponent-name { font-size: 14px; }
    .opponent-info { font-size: 11px; }
    .play-area { padding-left: 3%; padding-right: 3%; }
    .hand-cards .playing-card { width: 84px; height: 121px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -29px; }
    .hand-cards { min-height: 169px; }
  }
  @media (max-width: 900px) {
    .game-layout { display: block; min-height: calc(100dvh - 90px); }
    .topbar { padding-left: 23px; padding-right: 23px; gap: 20px; }
    .brand-subtitle { display: none; }
    .brand-title { font-size: 28px; }
    .brand .party-logo { width: 190px; height: 66px; }
    img.brand-mark { width: 42px; height: 42px; }
    .brand { gap: 9px; }
    .theme-select { max-width: 130px; }
    .quiet-button, .secondary-button { padding-left: 13px; padding-right: 13px; }
    .sidebar { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 14px; border-right: 0; border-bottom: 1px solid #bc9cff1b; padding: 13px 24px; }
    .sidebar > .session-label { display: none; }
    .round-heading { font-size: 24px; margin: 0; }
    .sidebar > .standing-meta { margin: 0; font-size: 12px; }
    .sidebar > .text-button { margin-left: auto; }
    .sidebar .standings-list, .sidebar .table-note { display: none; }
    .play-area { padding: 22px 4% 0; }
    .opponents { gap: 8px; }
    .avatar { width: 66px; height: 66px; border-radius: 21px; }
    .felt { min-height: 285px; max-height: none; }
    .hand-cards .playing-card { width: 82px; height: 117px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -32px; }
    .hand-cards { min-height: 165px; }
    .modal-content { padding-left: 29px; padding-right: 29px; }
    .lobby-modal { width: calc(100vw - 40px); }
    .lobby-modal[open] { grid-template-columns: .7fr 1fr; }
    .modal-art > p { left: 25px; right: 25px; font-size: 34px; }
  }
  @media (max-width: 700px) and (min-width: 601px) {
    .topbar { gap: 12px; padding-left: 18px; padding-right: 18px; }
    .brand-title { font-size: 24px; }
    .brand .party-logo { width: 170px; height: 60px; }
    .theme-select { max-width: 109px; font-size: 12px; padding-left: 10px; padding-right: 24px; background-position: right 8px center; }
    .header-actions { gap: 7px; }
    .quiet-button, .secondary-button { padding-left: 10px; padding-right: 10px; font-size: 13px; }
    .avatar { width: 58px; height: 58px; border-radius: 19px; }
    .opponent-info { font-size: 10px; }
    .lobby-modal[open] { grid-template-columns: 1fr; }
    .modal-art { min-height: 145px; height: 145px; border-right: 0; background-position: 70% 48%; }
    .modal-art > p { font-size: 27px; bottom: 24px; left: 26px; }
    .art-kicker { top: 23px; left: 26px; text-align: left; font-size: 9px; }
    .art-footer { display: none; }
    .modal-content { padding-top: 28px; }
  }
  @media (max-width: 600px) {
    .topbar, .app-header, .site-header, .game-header { min-height: 125px; padding: 17px 18px 15px; flex-wrap: wrap; gap: 14px; }
    .brand-title { font-size: 27px; }
    .brand .party-logo { width: 185px; height: 63px; }
    .lobby-logo { width: 155px; height: 62px; margin-bottom: 12px; }
    .brand-subtitle { display: block; font-size: 8px; margin-top: 5px; letter-spacing: .13em; }
    img.brand-mark { width: 39px; height: 39px; }
    .header-actions { width: 100%; gap: 8px; justify-content: space-between; }
    .theme-select { flex: 1 1 0; max-width: none; min-width: 0; font-size: 12px; padding: 10px 24px 10px 10px; background-position: right 8px center; border-radius: 10px; }
    .header-actions .quiet-button, .header-actions .secondary-button { flex-shrink: 0; min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: 10px; }
    .game-layout { min-height: calc(100dvh - 127px); }
    .sidebar { display: flex; padding: 13px 18px; gap: 9px; }
    .round-heading { font-size: 21px; }
    .sidebar > .standing-meta { font-size: 11px; flex: 1; }
    .sidebar > .text-button { min-height: 40px; padding-left: 8px; padding-right: 8px; font-size: 12px; white-space: nowrap; }
    .play-area { padding: 17px 13px 0; }
    .opponents { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 4px; margin-bottom: 12px; }
    .opponents:has(.opponent:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .opponent { padding-top: 5px; padding-bottom: 20px; }
    .avatar { width: 58px; height: 58px; border-width: 2px; border-radius: 19px; font-size: 25px; }
    .opponent-name { margin-top: 8px; font-size: 13px; line-height: 1.1; }
    .opponent-info { font-size: 10px; margin-top: 4px; min-height: 14px; }
    .turn-badge { font-size: 8px; padding: 3px 8px; bottom: 0; }
    .mini-cards { margin-top: 5px; height: 17px; }
    .card-back { width: 13px; height: 18px; border-radius: 3px; }
    .felt, body[data-theme="midnight"] .felt, body[data-theme="velvet"] .felt { min-height: 252px; flex-basis: auto; max-height: none; border-radius: 80px; border-width: 6px; box-shadow: 0 0 0 3px #321e51, 0 0 0 4px #9872d24d, inset 0 0 0 1px #74e6d64d, inset 0 -12px 40px #032e3e6b, 0 16px 30px #0005; }
    .felt::before { inset: 9px; border-width: 1px; }
    .felt-wordmark, body[data-theme="midnight"] .felt-wordmark, body[data-theme="velvet"] .felt-wordmark { top: 16px; font-size: 12px; letter-spacing: .14em; }
    .felt-wordmark > span { margin-top: 4px; font-size: 6px; letter-spacing: .11em; }
    .felt-kicker { font-size: 7px; bottom: 12px; letter-spacing: .12em; }
    .pile-area { padding: 48px 17px 66px; gap: 8px; }
    .pile-cards { min-height: 103px; }
    .pile-cards .playing-card { width: 72px; height: 103px; }
    .pile-cards .playing-card + .playing-card { margin-left: -25px; }
    .pile-caption { font-size: 12px; line-height: 1.3; }
    .playing-card .card-corner, .playing-card .card-bottom { font-size: 20px; }
    .card-suit { font-size: 34px; }
    .last-action { font-size: 11px; line-height: 1.5; bottom: 29px; left: 20px; right: 20px; }
    .empty-pile { min-height: 128px; font-size: 14px; gap: 9px; }
    .empty-symbol { width: 57px; height: 68px; font-size: 35px; border-radius: 9px; }
    .empty-pile small { font-size: 11px; line-height: 1.5; }
    .human-zone { margin-top: 20px; }
    .hand-heading { padding: 0 4px; gap: 7px; }
    .hand-heading .session-label { font-size: 11px; }
    .hand-meta { font-size: 12px; }
    .hand-heading > div { gap: 9px; }
    .hand-heading .turn-badge { font-size: 9px; padding: 5px 9px; }
    .hand-cards { min-height: 150px; justify-content: safe center; padding: 25px 7px 14px; margin: 0 -4px; -webkit-overflow-scrolling: touch; scroll-padding: 10px; }
    .hand-cards .playing-card { width: 69px; height: 101px; border-radius: 8px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -33px; }
    .hand-cards .playing-card.is-selected { transform: translateY(-16px); box-shadow: 0 0 0 3px var(--gold), 0 0 18px #c3ff5733, 0 8px 17px #0006; }
    .hand-cards .playing-card:hover:not(:disabled) { transform: translateY(-9px); }
    .hand-cards .playing-card.is-selected:hover { transform: translateY(-16px); }
    .action-bar { position: sticky; bottom: 0; z-index: 8; gap: 10px; padding: 12px 8px 16px; margin: 0 -8px; background: linear-gradient(#160e2def, #160e2d); border-radius: 15px 15px 0 0; box-shadow: 0 -10px 20px #160e2d22; }
    .selection-help { font-size: 12px; line-height: 1.5; padding: 0 3px; }
    .play-actions { gap: 9px; width: 100%; }
    .play-actions .primary-button { flex: 1; max-width: 190px; min-width: 0; min-height: 47px; padding: 11px 18px; font-size: 15px; }
    .play-actions .secondary-button { min-height: 47px; padding: 11px 19px; font-size: 14px; }
    .play-actions .text-button { min-height: 47px; padding: 10px; font-size: 13px; }
    .table-footer { font-size: 10px; padding: 11px 3px 15px; text-align: center; justify-content: center; }
    .keyboard-note { display: none; }
    dialog.modal { max-height: 90dvh; }
    .modal { border-radius: 19px; padding: 30px 25px 27px; }
    .lobby-modal { padding: 0; width: calc(100vw - 26px); }
    .lobby-modal[open] { grid-template-columns: 1fr; }
    .modal-art { display: block; min-height: 130px; height: 130px; border-right: 0; border-bottom: 1px solid #c7a1ff33; background-position: 70% 50%; }
    .modal-art::before { inset: 10px; border-radius: 7px; }
    .modal-art::after { background: linear-gradient(90deg, #2d1254d9, #5e289059, #5e289011); }
    .modal-art > p { font-size: 29px; bottom: 24px; left: 25px; right: 25px; }
    .art-kicker { text-align: left; top: 22px; left: 25px; font-size: 8px; }
    .art-footer { display: none; }
    .modal-content { padding: 28px 26px 28px; }
    .modal-title { font-size: 42px; line-height: 1.02; letter-spacing: -.05em; }
    .modal-description { font-size: 14px; margin-bottom: 19px; }
    .modal-eyebrow { font-size: 10px; margin-bottom: 13px; }
    .mode-tabs { margin: 19px 0; }
    .mode-tab { min-height: 44px; font-size: 14px; }
    .form-label { font-size: 11px; margin-top: 17px; }
    .form-row { gap: 10px; }
    .form-row > div:first-child { min-width: 0; }
    .stepper-value { font-size: 20px; min-width: 45px; }
    .stepper-btn { width: 37px; min-height: 43px; }
    .lobby-summary { font-size: 12px; margin-top: 9px; }
    .lobby-start { margin-top: 19px; min-height: 51px; }
    p.lobby-footer { font-size: 11px; }
    .felt:has(.waiting-panel) { min-height: 350px; }
    .pile-area:has(.waiting-panel) { padding: 27px 17px 33px; }
    .waiting-panel { padding: 0; }
    .waiting-panel h2 { font-size: 24px; }
    .waiting-panel p { font-size: 12px; }
    .waiting-panel .session-label { font-size: 9px; }
    .invite-code { font-size: 28px; margin: 10px auto; }
    .invite-link { font-size: 12px; margin-bottom: 10px; min-height: 40px; }
    .waiting-panel > .standing-meta { font-size: 11px; margin-bottom: 12px; }
    .waiting-panel .primary-button { font-size: 13px; min-height: 43px; }
    .toast { font-size: 14px; padding: 13px 18px; border-radius: 13px; bottom: 20px; width: max-content; max-width: calc(100vw - 28px); }
    .results-list { margin-top: 20px; }
    .result-row { padding: 11px; gap: 9px; }
    .result-name { font-size: 14px; }
    .result-tag { font-size: 10px; }
  }
  @media (max-width: 390px) {
    .modal-art { display: none; }
    .modal-content { padding-top: 33px; }
    .sidebar > .standing-meta { max-width: 118px; font-size: 10px; }
    .header-actions .quiet-button, .header-actions .secondary-button { padding-left: 10px; padding-right: 10px; font-size: 13px; }
    .avatar { width: 55px; height: 55px; border-radius: 18px; }
    .play-area { padding-left: 11px; padding-right: 11px; }
    .hand-cards .playing-card { width: 66px; height: 99px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -33px; }
  }
  @media (prefers-reduced-motion: reduce) { .opponent.is-active .avatar { animation: none; } }
}


@layer finishing {
  .playing-card {
    background-color: #fffdf5;
    background-image: radial-gradient(ellipse at 35% 25%, #ffffffc4, transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h80v80H0z' filter='url(%23p)' opacity='.04'/%3E%3C/svg%3E");
    border-color: #d7d8e0;
    border-width: 1px;
    box-shadow: inset 0 0 0 1px #fff, 0 2px 0 #afafb9, 0 3px 0 #e6e4e2, 0 5px 0 #a6a2af, 0 9px 18px #10152635;
    color: #182a4a;
  }
  .playing-card::before { content: ""; position: absolute; inset: 4px; border: 1px solid #d4d5df66; border-radius: 6px; pointer-events: none; }
  .playing-card.red-card { color: #d82b4d; }
  .playing-card .card-corner, .playing-card .card-bottom { z-index: 3; font-family: Georgia, "Times New Roman", serif; font-size: 23px; letter-spacing: -.06em; padding: 0 2px; min-width: 18px; background: #fffdf7; border-radius: 3px; }
  .playing-card .card-corner { top: 7px; left: 6px; }
  .playing-card .card-bottom { bottom: 7px; right: 6px; }
  .card-corner span + span, .card-corner b + span, .card-bottom span + span, .card-bottom b + span { font-size: 17px; margin-top: 2px; }
  .card-pips { position: absolute; inset: 20% 20%; pointer-events: none; }
  .pip { display: block; position: absolute; left: calc(var(--x, 50) * 1%); top: calc(var(--y, 50) * 1%); transform: translate(-50%, -50%); font-family: Georgia, "Times New Roman", serif; font-size: 27px; line-height: 1; }
  .pip.is-inverted { transform: translate(-50%, -50%) rotate(180deg); }
  .pip:first-child:last-child { font-size: 52px; filter: drop-shadow(0 1px 0 #fff); }
  .court-art { position: absolute; left: 20%; top: 18%; width: 60%; height: 64%; object-fit: fill; border: 1px solid #172846; border-radius: 1px; pointer-events: none; }
  .has-pips > .card-suit, .has-court > .card-suit { display: none; }
  .pile-cards.play-impact { animation: card-impact .48s cubic-bezier(.2, .8, .2, 1) both; }
  .pile-cards.play-impact .playing-card { animation: card-flash .5s ease both; }
  .opponent { isolation: isolate; }
  .reaction-bubble { position: absolute; z-index: 4; top: -9px; right: -1px; min-width: 38px; min-height: 36px; display: grid; place-items: center; padding: 5px 10px; border: 2px solid #fff2ff; border-radius: 15px 15px 15px 3px; background: #6b39ae; box-shadow: 0 4px 0 #27133d, 0 9px 20px #0003; font-size: 23px; line-height: 1; animation: reaction-pop .36s cubic-bezier(.15, .9, .2, 1.4) both; }
  .opponent.reacting .avatar { animation: avatar-giggle .5s ease both; }
  .reaction-bar { display: flex; justify-content: center; gap: 7px; margin: 8px 0 4px; }
  .reaction-bar button { width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid #ac83df59; border-radius: 14px; background: #35204f; font-size: 22px; box-shadow: 0 3px 0 #140d23; }
  .reaction-bar button:hover { transform: translateY(-4px) rotate(-6deg); border-color: #e3ff94; background: #58337d; }
  .reaction-bar button:active { transform: translateY(1px); box-shadow: 0 1px 0 #140d23; }
  .celebration { position: fixed; inset: 0; z-index: 120; display: block; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; background: radial-gradient(ellipse at 50% 42%, #8f3acc33, transparent 60%); }
  .celebration.show { opacity: 1; visibility: visible; }
  .confetti-particle { position: absolute; left: calc(var(--x, 50) * 1%); top: -35px; width: 11px; height: 19px; border-radius: 2px; background: #d0ff57; opacity: 0; transform: rotate(var(--spin, 0deg)); }
  .celebration.show .confetti-particle { animation: party-confetti var(--duration, 2.6s) cubic-bezier(.17, .35, .7, .85) var(--delay, 0s) both; }
  .confetti-particle:nth-child(3n) { background: #ff80bd; border-radius: 50%; width: 13px; height: 13px; }
  .confetti-particle:nth-child(3n+1) { background: #62e4df; }
  .confetti-particle:nth-child(4n) { background: #a785f6; width: 8px; height: 21px; }
  .confetti-particle:nth-child(5n) { background: #ffdf76; }
  .celebration-banner { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(.5) rotate(-8deg); width: min(480px, calc(100vw - 36px)); padding: 28px 30px 33px; border: 3px solid #f4ffc1; border-radius: 28px; color: #faffea; text-align: center; background: linear-gradient(135deg, #5c36a6, #36216f); box-shadow: 0 9px 0 #160e3b, 0 0 0 9px #cfff5722, 0 25px 100px #0008; opacity: 0; }
  .celebration.show .celebration-banner { animation: victory-sticker .65s cubic-bezier(.16, .9, .16, 1.2) .08s both; }
  .celebration-emoji { display: block; font-size: 76px; line-height: 1.1; margin-bottom: 12px; filter: drop-shadow(0 6px 0 #1b114833); }
  .celebration-banner h2, .celebration-banner strong, .celebration-banner .celebration-title { display: block; font-family: Outfit, "Avenir Next", sans-serif; font-size: 42px; font-weight: 900; line-height: 1.01; letter-spacing: -.05em; margin: 0 0 9px; color: #e3ff91; text-wrap: balance; }
  .celebration-banner p, .celebration-banner .celebration-copy { margin: 0; font-size: 16px; color: #e0c9ff; font-weight: 650; line-height: 1.5; text-wrap: balance; }
  .celebration.is-roast .celebration-banner { background: linear-gradient(135deg, #a73883, #5b216f); border-color: #ffc3d4; box-shadow: 0 9px 0 #3b0f45, 0 0 0 9px #ff87ba22, 0 25px 100px #0008; }
  .celebration.is-roast .celebration-banner h2, .celebration.is-roast .celebration-banner strong { color: #ffdf8a; }
  .coach-tip { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 auto 11px; padding: 10px 15px; width: fit-content; max-width: 100%; border: 1px solid #bda0ec33; border-radius: 12px; background: #3e285e66; color: #d8c4ed; font-size: 13px; line-height: 1.6; text-align: center; }
  .coach-tip strong { color: #e4ff9a; font-weight: 750; }
  .tip-help { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 5px; border-radius: 50%; background: #7554a2; color: #fff; font-size: 13px; font-weight: 800; }
  .tutorial-modal { width: min(560px, calc(100vw - 32px)); }
  .tutorial-modal .modal-title { font-size: 43px; }
  .tutorial-modal .modal-description { max-width: none; font-size: 16px; line-height: 1.7; }
  .tutorial-modal .confirm-actions { justify-content: space-between; align-items: center; }
  .tutorial-modal .primary-button { margin-left: auto; }
  .tour-trigger { display: block; margin: 10px auto 0; color: #e5c9ff; font-size: 13px; }
  .tour-illustration { position: relative; display: flex; align-items: center; justify-content: center; height: 165px; margin: 11px 0 22px; gap: 5px; background: radial-gradient(ellipse at 50% 60%, #9e52c922, transparent 65%); }
  .tour-card { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; width: 62px; height: 89px; color: #203352; background: #fff8ee; border: 2px solid #f8e7fd; border-radius: 9px; box-shadow: 0 4px 0 #9b84bb, 0 9px 24px #0003; font: 800 25px Georgia, serif; transform: rotate(-8deg); }
  .tour-card > span { font-size: 26px; }
  .tour-card:nth-child(2n) { transform: rotate(8deg); margin-left: -16px; }
  .tour-card:nth-child(3n+1) { color: #db365d; }
  .tour-versus { margin: 0 9px; font-family: Outfit, sans-serif; color: #d0ff57; font-weight: 900; font-size: 13px; transform: rotate(-7deg); }
  .tour-crown { display: block; font-size: 124px; line-height: 1; color: #d0ff57; transform: rotate(-9deg); filter: drop-shadow(5px 6px 0 #70499f); }
  .tour-sticker { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%) rotate(-5deg); display: block; padding: 9px 17px; border: 2px solid #ffe5f5; border-radius: 9px; background: #f16eab; color: #3a1a4c; font-weight: 900; font-size: 13px; letter-spacing: -.01em; box-shadow: 0 4px 0 #6a2c6d; white-space: nowrap; }
  .autoplay-control { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #c6b2db; font-size: 13px; font-weight: 650; cursor: pointer; }
  .autoplay-control input { appearance: none; width: 37px; height: 23px; border: 1px solid #9d7fc154; border-radius: 20px; background: #4b3667; position: relative; cursor: pointer; transition: background .2s; }
  .autoplay-control input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #d7c4e9; transition: transform .2s; }
  .autoplay-control input:checked { background: #add942; border-color: #daff8a; }
  .autoplay-control input:checked::before { background: #2e4028; transform: translateX(13px); }
  .autoplay-control input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
  button.autoplay-control[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: #719a3526; }
  .scoreboard-button { min-height: 44px; border: 1px solid #aa85d54d; border-radius: 12px; background: #38224f; color: #eadbff; font-size: 14px; font-weight: 750; padding: 10px 16px; }
  .scoreboard-button:hover { background: #593779; border-color: #d2b1ff; }
  .leaderboard-modal { width: min(600px, calc(100vw - 32px)); }
  .leaderboard-table { width: 100%; border-collapse: separate; border-spacing: 0 7px; margin: 20px 0; font-size: 14px; }
  .leaderboard-table th { color: #b79ccd; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; padding: 8px 10px; font-weight: 750; text-align: left; }
  .leaderboard-table td { padding: 13px 10px; background: #c7a3ef0a; border-top: 1px solid #d5b2fb0e; border-bottom: 1px solid #d5b2fb0e; color: #f0e4fb; font-weight: 650; }
  .leaderboard-table td:first-child { border-radius: 10px 0 0 10px; color: #d0ff57; font-weight: 850; }
  .leaderboard-table td:last-child { border-radius: 0 10px 10px 0; }
  .leaderboard-table tbody tr:first-child td { background: #d0ff5712; }
  @keyframes card-impact { 0% { transform: translateY(-42px) scale(1.13) rotate(-5deg); opacity: .6; } 60% { transform: translateY(4px) scale(.98) rotate(1deg); opacity: 1; } 100% { transform: translateY(0) scale(1) rotate(0); } }
  @keyframes card-flash { 0% { filter: brightness(1.8); } 100% { filter: brightness(1); } }
  @keyframes reaction-pop { 0% { opacity: 0; transform: scale(.2) rotate(-20deg); } 100% { opacity: 1; transform: scale(1) rotate(7deg); } }
  @keyframes avatar-giggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) translateY(-3px); } 70% { transform: rotate(7deg) translateY(-2px); } }
  @keyframes party-confetti { 0% { opacity: 0; translate: 0 -20px; rotate: 0deg; } 7% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; translate: var(--drift, 60px) 110dvh; rotate: var(--spin, 650deg); } }
  @keyframes victory-sticker { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-12deg); } 65% { opacity: 1; transform: translate(-50%, -50%) scale(1.07) rotate(3deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); } }
  @media (max-width: 900px) {
    .playing-card .card-corner, .playing-card .card-bottom { font-size: 21px; }
    .card-corner b + span, .card-bottom b + span { font-size: 15px; }
    .pip { font-size: 24px; }
    .pip:first-child:last-child { font-size: 45px; }
  }
  @media (max-width: 600px) {
    .playing-card .card-corner, .playing-card .card-bottom { font-size: 18px; min-width: 15px; padding: 0 1px; }
    .playing-card .card-corner { top: 5px; left: 4px; }
    .playing-card .card-bottom { bottom: 5px; right: 4px; }
    .card-corner b + span, .card-bottom b + span { font-size: 13px; margin-top: 1px; }
    .playing-card::before { inset: 3px; border-radius: 5px; }
    .pip { font-size: 20px; }
    .pip:first-child:last-child { font-size: 37px; }
    .court-art { top: 19%; height: 62%; left: 20%; width: 60%; }
    .celebration-banner { padding: 23px 25px 27px; border-radius: 24px; }
    .celebration-banner h2, .celebration-banner strong, .celebration-banner .celebration-title { font-size: 35px; }
    .celebration-banner p, .celebration-banner .celebration-copy { font-size: 14px; }
    .celebration-emoji { font-size: 63px; }
    .reaction-bubble { top: -6px; right: -5px; min-width: 29px; min-height: 29px; padding: 4px 6px; font-size: 18px; border-radius: 12px 12px 12px 2px; }
    .reaction-bar { gap: 6px; margin-top: 9px; }
    .reaction-bar button { width: 43px; min-height: 43px; font-size: 21px; border-radius: 12px; }
    .coach-tip { padding: 8px 11px; font-size: 12px; line-height: 1.5; }
    .tip-help { flex-shrink: 0; }
    .tutorial-modal .modal-title { font-size: 35px; }
    .tutorial-modal .modal-description { font-size: 14px; line-height: 1.7; }
    .tour-illustration { height: 145px; margin-bottom: 20px; }
    .tour-card { width: 51px; height: 76px; font-size: 22px; }
    .tour-card > span { font-size: 23px; }
    .tour-versus { font-size: 11px; margin-left: 5px; margin-right: 5px; }
    .tour-crown { font-size: 106px; }
    .tour-sticker { font-size: 11px; bottom: 6px; padding: 8px 13px; }
    .autoplay-control { font-size: 12px; }
    .scoreboard-button { padding: 9px 12px; font-size: 13px; }
    .leaderboard-table { font-size: 12px; }
    .leaderboard-table th { font-size: 10px; padding: 7px 6px; letter-spacing: .02em; }
    .leaderboard-table td { padding: 12px 6px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .celebration.show .confetti-particle { display: none; }
    .celebration.show .celebration-banner { animation: none; opacity: 1; transform: translate(-50%, -50%); }
    .pile-cards.play-impact, .pile-cards.play-impact .playing-card, .opponent.reacting .avatar, .reaction-bubble { animation: none; }
  }
}

@layer finishing {
  .confetti-particle:nth-child(1) { --x: 4; --delay: 0.065s; --drift: -59px; --spin: 449deg; --duration: 2.25s; }
  .confetti-particle:nth-child(2) { --x: 13; --delay: 0.130s; --drift: -28px; --spin: 528deg; --duration: 2.40s; }
  .confetti-particle:nth-child(3) { --x: 22; --delay: 0.195s; --drift: 3px; --spin: 607deg; --duration: 2.55s; }
  .confetti-particle:nth-child(4) { --x: 31; --delay: 0.260s; --drift: 34px; --spin: 686deg; --duration: 2.70s; }
  .confetti-particle:nth-child(5) { --x: 40; --delay: 0.325s; --drift: 65px; --spin: 765deg; --duration: 2.10s; }
  .confetti-particle:nth-child(6) { --x: 49; --delay: 0.390s; --drift: -84px; --spin: 844deg; --duration: 2.25s; }
  .confetti-particle:nth-child(7) { --x: 58; --delay: 0.000s; --drift: -53px; --spin: 923deg; --duration: 2.40s; }
  .confetti-particle:nth-child(8) { --x: 67; --delay: 0.065s; --drift: -22px; --spin: 1002deg; --duration: 2.55s; }
  .confetti-particle:nth-child(9) { --x: 76; --delay: 0.130s; --drift: 9px; --spin: 431deg; --duration: 2.70s; }
  .confetti-particle:nth-child(10) { --x: 85; --delay: 0.195s; --drift: 40px; --spin: 510deg; --duration: 2.10s; }
  .confetti-particle:nth-child(11) { --x: 94; --delay: 0.260s; --drift: 71px; --spin: 589deg; --duration: 2.25s; }
  .confetti-particle:nth-child(12) { --x: 9; --delay: 0.325s; --drift: -78px; --spin: 668deg; --duration: 2.40s; }
  .confetti-particle:nth-child(13) { --x: 18; --delay: 0.390s; --drift: -47px; --spin: 747deg; --duration: 2.55s; }
  .confetti-particle:nth-child(14) { --x: 27; --delay: 0.000s; --drift: -16px; --spin: 826deg; --duration: 2.70s; }
  .confetti-particle:nth-child(15) { --x: 36; --delay: 0.065s; --drift: 15px; --spin: 905deg; --duration: 2.10s; }
  .confetti-particle:nth-child(16) { --x: 45; --delay: 0.130s; --drift: 46px; --spin: 984deg; --duration: 2.25s; }
  .confetti-particle:nth-child(17) { --x: 54; --delay: 0.195s; --drift: 77px; --spin: 413deg; --duration: 2.40s; }
  .confetti-particle:nth-child(18) { --x: 63; --delay: 0.260s; --drift: -72px; --spin: 492deg; --duration: 2.55s; }
  .confetti-particle:nth-child(19) { --x: 72; --delay: 0.325s; --drift: -41px; --spin: 571deg; --duration: 2.70s; }
  .confetti-particle:nth-child(20) { --x: 81; --delay: 0.390s; --drift: -10px; --spin: 650deg; --duration: 2.10s; }
  .confetti-particle:nth-child(21) { --x: 90; --delay: 0.000s; --drift: 21px; --spin: 729deg; --duration: 2.25s; }
  .confetti-particle:nth-child(22) { --x: 97; --delay: 0.065s; --drift: 52px; --spin: 808deg; --duration: 2.40s; }
  .confetti-particle:nth-child(23) { --x: 34; --delay: 0.130s; --drift: 83px; --spin: 887deg; --duration: 2.55s; }
  .confetti-particle:nth-child(24) { --x: 65; --delay: 0.195s; --drift: -66px; --spin: 966deg; --duration: 2.70s; }
}


@layer social {
  .brand .party-logo { width: clamp(180px, 17vw, 245px); height: 75px; object-fit: contain; flex-shrink: 0; }
  .modal-art { background-image: url('/assets/party-lobby.jpg'); background-blend-mode: normal; }
  .modal-art::after { background: linear-gradient(180deg, #3d166133, transparent 25%, transparent 55%, #1c0a39d9 95%); }
  .form-label { font-size: 14px; letter-spacing: .065em; }
  .primary-button { font-size: 16px; }
  .mode-tab, .quiet-button, .secondary-button, .text-button { font-size: 14px; }
  .scoreboard-button { margin-top: 19px; }
  .avatar.generated-avatar { background-repeat: no-repeat; }
  .standing-avatar.generated-avatar { background-repeat: no-repeat; overflow: hidden; }
  .social-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 8px 0 17px; border-top: 1px solid #b798e01a; }
  .social-bar .reaction-bar { margin: 0; }
  .social-bar > .text-button { font-size: 14px; color: #d5c1e9; }
  #mobile-scores { display: none; }
  .banter-bubble { position: absolute; z-index: 9; bottom: -19px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: max-content; max-width: 78%; padding: 12px 20px; background: #593482; color: #f2e7ff; border: 2px solid #c59aea; border-radius: 14px 16px 13px 4px; box-shadow: 0 5px 0 #28123f, 0 10px 25px #0003; font-size: 14px; font-weight: 750; line-height: 1.45; text-align: center; animation: dealer-pop .28s ease-out both; }
  .banter-bubble::after { content: ''; position: absolute; bottom: -9px; left: 24px; width: 12px; height: 12px; background: #593482; border-right: 2px solid #c59aea; border-bottom: 2px solid #c59aea; transform: rotate(45deg); }
  .banter-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 20px; margin: 22px 0 16px; }
  .banter-settings label { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: #cdb7e0; font-size: 14px; font-weight: 600; cursor: pointer; }
  .banter-settings input { width: 18px; height: 18px; accent-color: #d0ff57; }
  .quick-taunts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 15px; }
  .quick-taunts .tour-trigger { margin: 0; }
  .chat-log { display: flex; flex-direction: column; gap: 10px; padding: 13px; min-height: 120px; max-height: 30dvh; overflow-y: auto; background: #130a2588; border: 1px solid #a77cd72e; border-radius: 14px; scrollbar-width: thin; scrollbar-color: #7c52a3 transparent; margin-bottom: 14px; }
  .chat-message { padding: 10px 13px; background: #35204f; border: 1px solid #c296e522; border-radius: 12px 12px 12px 3px; max-width: 92%; align-self: flex-start; overflow-wrap: anywhere; }
  .chat-message strong { display: block; font-size: 12px; font-weight: 800; color: #d5b0f2; margin-bottom: 4px; }
  .chat-message p { margin: 0; font-size: 14px; line-height: 1.55; color: #eee1fc; }
  .chat-message.is-you { align-self: flex-end; background: #46552d; border-color: #cfff5738; border-radius: 12px 12px 3px 12px; }
  .chat-message.is-you strong { color: #d8ff8b; }
  #chat-form .field { min-width: 0; }
  #chat-form .primary-button { min-width: 83px; padding-left: 17px; padding-right: 17px; }
  .play-log { margin-top: 23px; padding-top: 15px; border-top: 1px solid #c6a1ed26; }
  .play-log summary { cursor: pointer; color: #bca1d3; font-size: 14px; font-weight: 650; padding: 8px 0; }
  .play-log .activity-log { margin-top: 7px; }
  .ace-emblem { position: absolute; top: 49%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 70%; font-family: Georgia, serif; font-size: 58px; line-height: 1.05; }
  .ace-emblem small { display: block; font-family: Outfit, sans-serif; font-size: 5px; letter-spacing: .14em; font-weight: 750; color: inherit; white-space: nowrap; }
  .celebration-copy, #celebration-copy { display: block; color: #e0c9ff; font-size: 16px; line-height: 1.5; font-weight: 600; }
  .celebration-title, #celebration-title { font-size: 40px; }
  .confetti-field { position: absolute; inset: 0; overflow: hidden; }
  .hand-heading { flex-wrap: wrap; row-gap: 8px; }
  .hand-heading .autoplay-control { margin-left: auto; }
  .human-zone:has(.coach-tip:not([hidden])) .hand-cards { padding-top: 24px; }
  .coach-tip { margin-top: 11px; margin-bottom: 0; }
  @keyframes dealer-pop { from { opacity: 0; transform: translateX(-50%) translateY(10px) rotate(-4deg) scale(.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) rotate(-2deg) scale(1); } }
  @media (max-width: 900px) {
    .brand .party-logo { width: 190px; height: 66px; }
    .sidebar .scoreboard-button { display: none; }
    #mobile-scores { display: inline-block; }
    .social-bar { gap: 7px; }
    .opponent-name { font-size: 14px; }
    .opponent-info { font-size: 12px; }
    .ace-emblem { font-size: 49px; }
  }
  @media (max-width: 700px) and (min-width: 601px) {
    .brand .party-logo { width: 165px; height: 60px; }
    .theme-select { max-width: 107px; }
    .header-actions .quiet-button, .header-actions .secondary-button { font-size: 14px; padding-left: 10px; padding-right: 10px; }
  }
  @media (max-width: 600px) {
    .brand .party-logo { width: 185px; height: 63px; }
    .header-actions .quiet-button, .header-actions .secondary-button { font-size: 14px; padding-left: 10px; padding-right: 10px; }
    .header-actions .icon-button { width: 38px; flex: 0 0 38px; min-height: 44px; }
    .header-actions .theme-select { font-size: 12px; }
    .form-label { font-size: 14px; letter-spacing: .045em; }
    .mode-tab { font-size: 14px; }
    .primary-button { font-size: 16px; }
    .opponent-name { font-size: 14px; }
    .opponent-info { font-size: 11px; }
    .social-bar { gap: 2px 14px; padding: 10px 0 13px; }
    .social-bar .reaction-bar { flex-basis: 100%; gap: 8px; margin-bottom: 5px; }
    .reaction-bar button { width: 43px; min-height: 44px; }
    .social-bar > .text-button { min-height: 44px; font-size: 14px; }
    .banter-bubble { max-width: 89%; font-size: 12px; padding: 9px 13px; bottom: -17px; border-radius: 12px 12px 12px 3px; }
    .human-zone { margin-top: 30px; }
    .hand-heading .autoplay-control { min-height: 33px; }
    .autoplay-control { font-size: 12px; gap: 6px; }
    .autoplay-control input { width: 33px; height: 21px; }
    .autoplay-control input::before { width: 13px; height: 13px; }
    .autoplay-control input:checked::before { transform: translateX(12px); }
    .hand-heading .session-label { font-size: 11px; }
    .hand-heading > div { gap: 7px; }
    .ace-emblem { font-size: 42px; }
    .ace-emblem small { font-size: 4px; }
    #celebration-title { font-size: 33px; }
    #celebration-copy { font-size: 14px; }
    .chat-log { max-height: 29dvh; padding: 10px; }
    .chat-message { max-width: 96%; padding: 9px 11px; }
    .banter-settings { gap: 2px 14px; margin-top: 16px; }
    .quick-taunts { gap: 8px; }
    .activity-modal .modal-title { font-size: 39px; }
    .activity-modal .join-row { gap: 8px; }
    #chat-form .primary-button { min-width: 73px; padding-left: 12px; padding-right: 12px; }
  }
  @media (max-width: 370px) {
    .header-actions .quiet-button, .header-actions .secondary-button { font-size: 13px; padding-left: 8px; padding-right: 8px; }
    .social-bar .reaction-bar { gap: 6px; }
    .reaction-bar button { width: 40px; }
    .modal-content { padding-left: 22px; padding-right: 22px; }
  }
}


@layer social {
  .modal-art .lobby-logo { position: absolute; top: 24px; left: 24px; right: auto; bottom: auto; z-index: 3; width: calc(100% - 48px); max-width: 220px; height: 88px; object-fit: contain; margin: 0; border-radius: 0; }
  .modal-art .art-kicker { display: none; }
  @media (min-width: 901px) and (max-height: 1050px) {
    .topbar { min-height: 80px; padding-top: 8px; padding-bottom: 8px; }
    .brand .party-logo { width: 205px; height: 64px; }
    .game-layout { min-height: calc(100dvh - 80px); }
    .play-area { padding-top: 15px; }
    .opponents { margin-bottom: 8px; }
    .opponent { padding-top: 3px; padding-bottom: 17px; }
    .avatar { width: 64px; height: 64px; border-radius: 21px; }
    .opponent-name { margin-top: 7px; font-size: 14px; }
    .opponent-info { margin-top: 3px; font-size: 12px; min-height: 15px; }
    .mini-cards { display: none; }
    .opponent .turn-badge { bottom: -1px; padding: 3px 8px; font-size: 8px; }
    .felt, body[data-theme='midnight'] .felt, body[data-theme='velvet'] .felt { min-height: 230px; max-height: 260px; flex: 0 0 auto; }
    .felt-wordmark, body[data-theme='midnight'] .felt-wordmark, body[data-theme='velvet'] .felt-wordmark { top: 13px; font-size: 12px; }
    .felt-wordmark > span { margin-top: 3px; font-size: 6px; }
    .felt-kicker { bottom: 9px; font-size: 7px; }
    .pile-area { padding: 41px 18px 48px; gap: 8px; }
    .pile-cards { min-height: 105px; }
    .pile-cards .playing-card { width: 75px; height: 106px; }
    .pile-caption { font-size: 13px; }
    .last-action { bottom: 24px; font-size: 12px; min-height: 17px; }
    .empty-pile { min-height: 120px; gap: 9px; }
    .empty-symbol { width: 54px; height: 66px; font-size: 35px; }
    .human-zone { margin-top: 18px; }
    .hand-heading { min-height: 28px; }
    .hand-heading .autoplay-control { min-height: 28px; }
    .coach-tip { padding: 6px 12px; margin-top: 7px; font-size: 12px; }
    .hand-cards { min-height: 144px; padding-top: 23px; padding-bottom: 11px; }
    .hand-cards .playing-card { width: 78px; height: 110px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -24px; }
    .human-zone:has(.coach-tip:not([hidden])) .hand-cards { padding-top: 23px; }
    .hand-cards .playing-card .card-corner, .hand-cards .playing-card .card-bottom { font-size: 19px; }
    .hand-cards .card-corner b + span, .hand-cards .card-bottom b + span { font-size: 14px; }
    .hand-cards .pip { font-size: 22px; }
    .hand-cards .ace-emblem { font-size: 44px; }
    .action-bar { padding-top: 5px; padding-bottom: 12px; gap: 7px; }
    .selection-help { min-height: 18px; font-size: 12px; }
    .play-actions .primary-button, .play-actions .secondary-button, .play-actions .text-button { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
    .social-bar { padding-top: 7px; padding-bottom: 10px; gap: 8px; }
    .reaction-bar button { width: 39px; min-height: 39px; font-size: 20px; border-radius: 12px; }
    .table-footer { padding-top: 10px; padding-bottom: 12px; font-size: 11px; }
    .sidebar { overflow-y: auto; max-height: calc(100dvh - 80px); }
    .sidebar .table-note { display: none; }
    .sidebar .scoreboard-button { margin-top: 20px; }
    .felt:has(.waiting-panel) { min-height: 370px; max-height: none; }
    .pile-area:has(.waiting-panel) { padding-top: 32px; padding-bottom: 40px; }
  }
  @media (max-width: 700px) {
    .modal-art .lobby-logo { top: 24px; left: 25px; width: 180px; height: 72px; max-width: calc(100% - 50px); }
    .modal-art > p, .modal-art .art-footer { display: none; }
  }
  @media (max-width: 600px) {
    .topbar, .app-header, .site-header, .game-header { min-height: 116px; padding: 9px 16px 11px; gap: 7px; }
    .brand .party-logo { width: 154px; height: 46px; }
    .header-actions { gap: 7px; }
    .header-actions .theme-select, .header-actions .quiet-button, .header-actions .secondary-button, .header-actions .icon-button { min-height: 43px; }
    .game-layout { min-height: calc(100dvh - 116px); }
    .sidebar { padding: 5px 16px; min-height: 41px; gap: 9px; }
    .round-heading { font-size: 20px; }
    .sidebar > .standing-meta { font-size: 10px; line-height: 1.3; }
    .sidebar > .text-button { min-height: 31px; padding-top: 5px; padding-bottom: 5px; font-size: 12px; }
    .play-area { padding-top: 11px; }
    .opponents { row-gap: 2px; column-gap: 4px; margin-bottom: 9px; }
    .opponent { padding: 0 2px 9px; }
    .avatar { width: 48px; height: 48px; border-radius: 16px; }
    .opponent-name { margin-top: 4px; font-size: 13px; line-height: 1.05; }
    .opponent-info { margin-top: 2px; min-height: 12px; font-size: 10px; line-height: 1.2; }
    .mini-cards { display: none; }
    .opponent .turn-badge { display: none; }
    .felt, body[data-theme='midnight'] .felt, body[data-theme='velvet'] .felt { min-height: 190px; border-radius: 62px; border-width: 5px; }
    .felt-wordmark, body[data-theme='midnight'] .felt-wordmark, body[data-theme='velvet'] .felt-wordmark { top: 10px; font-size: 10px; }
    .felt-wordmark > span, .felt-kicker { display: none; }
    .pile-area { padding: 31px 16px 47px; gap: 7px; }
    .pile-cards { min-height: 86px; }
    .pile-cards .playing-card { width: 60px; height: 86px; border-radius: 7px; }
    .pile-cards .playing-card .card-corner, .pile-cards .playing-card .card-bottom { font-size: 16px; }
    .pile-cards .card-corner b + span, .pile-cards .card-bottom b + span { font-size: 11px; }
    .pile-cards .pip { font-size: 17px; }
    .pile-cards .ace-emblem { font-size: 36px; }
    .pile-caption { font-size: 11px; }
    .last-action { bottom: 15px; font-size: 10px; min-height: 15px; line-height: 1.4; }
    .empty-pile { min-height: 100px; gap: 7px; font-size: 13px; }
    .empty-symbol { width: 43px; height: 52px; font-size: 29px; border-width: 1px; border-radius: 7px; }
    .empty-pile small { font-size: 10px; line-height: 1.3; }
    .human-zone { margin-top: 21px; }
    .hand-heading { min-height: 26px; }
    .hand-heading .autoplay-control { min-height: 26px; }
    .coach-tip { padding: 5px 9px; font-size: 11px; line-height: 1.4; margin-top: 6px; }
    .human-zone:has(.coach-tip:not([hidden])) .hand-cards { padding-top: 21px; }
    .hand-cards { min-height: 120px; padding-top: 21px; padding-bottom: 9px; }
    .hand-cards .playing-card { height: 91px; width: 63px; }
    .hand-cards .playing-card:not(:first-child) { margin-left: -30px; }
    .hand-cards .pip { font-size: 18px; }
    .hand-cards .ace-emblem { font-size: 38px; }
    .action-bar { padding-top: 6px; padding-bottom: 11px; gap: 6px; }
    .selection-help { min-height: 17px; font-size: 11px; line-height: 1.45; }
    .play-actions .primary-button, .play-actions .secondary-button, .play-actions .text-button { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
    .social-bar { padding-top: 9px; padding-bottom: 9px; }
    .social-bar .reaction-bar { gap: 7px; margin-bottom: 1px; }
    .reaction-bar button { min-height: 40px; width: 40px; font-size: 20px; }
    .social-bar > .text-button { min-height: 38px; }
    .table-footer { padding-top: 9px; padding-bottom: 12px; }
    .felt:has(.waiting-panel) { min-height: 330px; }
    .pile-area:has(.waiting-panel) { padding-top: 24px; padding-bottom: 30px; }
  }
}


@layer social {
  .app { position: relative; z-index: 1; }
  body::after { background: radial-gradient(ellipse at 20% 25%, #8143e81c, transparent 40%), radial-gradient(ellipse at 80% 65%, #e649a218, transparent 42%), radial-gradient(ellipse at 60% 10%, #30d5c812, transparent 36%); animation: ambient-aurora 32s ease-in-out infinite; }
  .ambient-suits { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: paint; }
  .ambient-suits > span { position: absolute; left: calc(var(--x, 50) * 1%); top: calc(var(--y, 50) * 1%); display: block; color: #c9a0ff; font-family: Georgia, serif; font-size: var(--size, 38px); line-height: 1; opacity: .1; filter: drop-shadow(0 0 12px #a45cf333); animation: ambient-suit var(--duration, 24s) ease-in-out var(--delay, 0s) infinite; }
  .ambient-suits > span:nth-child(3n) { color: #ff96c9; --drift: -24px; --duration: 29s; }
  .ambient-suits > span:nth-child(3n+1) { color: #9cf9dd; --duration: 22s; }
  .ambient-suits > span:nth-child(4n) { color: #d7ff85; --size: 54px; --drift: 32px; --duration: 34s; }
  .ambient-suits > span:nth-child(5n) { --size: 24px; --duration: 19s; }
  .playing-card { --foil-primary: #9876ce; --foil-secondary: #d4ef98; background-color: #fffdf4; background-image: radial-gradient(ellipse at 15% 12%, #fff 0, #fffdf7 42%, #f0edf9 100%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h80v80H0z' filter='url(%23p)' opacity='.04'/%3E%3C/svg%3E"); }
  body[data-theme='midnight'] .playing-card { --foil-primary: #709ee0; --foil-secondary: #f2b8df; background-image: radial-gradient(ellipse at 15% 12%, #fff 0, #f9fcff 42%, #e9f1fb 100%); }
  body[data-theme='velvet'] .playing-card { --foil-primary: #c485bb; --foil-secondary: #dbf59c; background-image: radial-gradient(ellipse at 15% 12%, #fff 0, #fffbf8 42%, #f6eaf2 100%); }
  .playing-card::before { border-color: #9d88bf45; box-shadow: inset 1px 0 #fff, inset -1px 0 #e9e2f166; }
  .card-watermark { position: absolute; inset: 22% 18%; z-index: 0; background: url('/assets/app-icon.svg') center / contain no-repeat; opacity: .025; pointer-events: none; }
  .card-foil { position: absolute; inset: 0; z-index: 5; border-radius: inherit; overflow: hidden; pointer-events: none; }
  .card-foil::before { content: ''; position: absolute; top: -45%; left: -90%; width: 65%; height: 190%; transform: skewX(-24deg); background: linear-gradient(90deg, transparent, #ffffff22 15%, #e3ffb759 44%, #fff9 50%, #e3c2ff4d 58%, transparent 90%); opacity: 0; }
  .card-foil::after { content: ''; position: absolute; inset: 4px; border-radius: 6px; border: 1px solid transparent; border-top-color: var(--foil-primary); border-right-color: var(--foil-secondary); opacity: .36; pointer-events: none; }
  .playing-card:hover:not(:disabled) .card-foil::before, .playing-card.is-selected .card-foil::before { animation: card-foil-glint 1.15s cubic-bezier(.2, .65, .3, 1) .06s both; }
  .playing-card.is-selected .card-foil::after { opacity: .7; }
  .ace-emblem::before { content: '♛'; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); color: #b99745; font: 12px Georgia, serif; line-height: 1; }
  .deal-in { animation: alive-card-deal .5s cubic-bezier(.14, .8, .23, 1) backwards; animation-delay: calc(var(--card-index, 0) * 33ms); }
  .felt-wordmark, body[data-theme='midnight'] .felt-wordmark, body[data-theme='velvet'] .felt-wordmark { opacity: .14; pointer-events: none; }
  .felt-kicker { display: none; }
  .pile-area { gap: 20px; }
  .pile-caption { position: relative; z-index: 2; line-height: 1.35; }
  .last-action { bottom: 24px; }
  .felt:has(.waiting-panel), body[data-theme='midnight'] .felt:has(.waiting-panel), body[data-theme='velvet'] .felt:has(.waiting-panel) { min-height: 350px; max-height: none; border-radius: 42px; }
  .felt:has(.waiting-panel) .felt-wordmark, .felt:has(.waiting-panel) .felt-kicker, .felt:has(.waiting-panel) .last-action { display: none; }
  .pile-area:has(.waiting-panel) { padding: 15px 14px; gap: 0; }
  .waiting-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; width: min(100%, 520px); }
  .waiting-panel > .session-label { display: none; }
  .waiting-panel h2 { font-size: 28px; line-height: 1.15; margin: 0; text-wrap: balance; }
  .waiting-panel > p:not(.waiting-host) { display: none; }
  .waiting-panel .invite-code { min-height: 48px; padding: 0 7px; margin: 0; font-size: 32px; line-height: 1.05; letter-spacing: .16em; }
  .waiting-panel .invite-code small { margin-top: 5px; font-size: 9px; line-height: 1.1; letter-spacing: .1em; }
  .waiting-panel .invite-link { min-height: 44px; margin: 0; font-size: 14px; }
  .waiting-panel > .standing-meta { margin: 0; font-size: 12px; line-height: 1.4; }
  .waiting-panel > .primary-button { min-height: 44px; margin: 0; font-size: 15px; }
  .waiting-panel .waiting-host { margin: 0; line-height: 1.5; font-size: 14px; }
  .banter-bubble { bottom: -18px; }
  .install-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 13px; border: 1px solid #a781d44d; border-radius: 12px; background: #36214f; color: #e6d8f6; font-family: inherit; font-size: 14px; font-weight: 700; text-decoration: none; }
  .install-trigger:hover { background: #543477; border-color: #d4b4f4; color: #dfff99; }
  .install-modal { width: min(560px, calc(100vw - 32px)); }
  .install-modal ol, .install-modal ul { padding-left: 23px; margin: 22px 0; color: #d0b9e5; font-size: 15px; line-height: 1.65; }
  .install-modal li { padding-left: 5px; margin-bottom: 12px; }
  .install-modal li::marker { color: #d0ff57; font-weight: 850; }
  .install-modal strong { color: #f1e5fb; }
  .install-modal .primary-button { margin-top: 12px; width: 100%; }
  .install-modal .notice { margin-top: 19px; background: #ae80db14; border-color: #b991e642; color: #cdb5e4; }
  @keyframes ambient-suit { 0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--spin, -10deg)); opacity: .07; } 50% { transform: translate3d(var(--drift, 23px), -48px, 0) rotate(calc(var(--spin, -10deg) + 17deg)); opacity: .15; } }
  @keyframes ambient-aurora { 0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1); } 50% { transform: translate3d(3%, 2%, 0) scale(1.08); } }
  @keyframes card-foil-glint { 0% { left: -90%; opacity: 0; } 15% { opacity: .8; } 70% { opacity: .6; } 100% { left: 140%; opacity: 0; } }
  @keyframes alive-card-deal { from { opacity: 0; transform: translate(35px, -74px) rotate(14deg) scale(.88); } 70% { opacity: 1; } to { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); } }
  @media (min-width: 901px) and (max-height: 1050px) {
    .felt:has(.pile-cards), body[data-theme='midnight'] .felt:has(.pile-cards), body[data-theme='velvet'] .felt:has(.pile-cards) { min-height: 250px; max-height: 270px; }
    .pile-area:has(.pile-cards) { padding-top: 37px; padding-bottom: 51px; }
  }
  @media (max-width: 600px) {
    .ambient-suits > span { font-size: min(var(--size, 32px), 45px); }
    .card-foil::after { inset: 3px; border-radius: 5px; }
    .ace-emblem::before { top: -7px; font-size: 9px; }
    .felt:has(.pile-cards), body[data-theme='midnight'] .felt:has(.pile-cards), body[data-theme='velvet'] .felt:has(.pile-cards) { min-height: 226px; }
    .pile-area:has(.pile-cards) { padding-top: 30px; padding-bottom: 58px; gap: 20px; }
    .pile-caption { font-size: 12px; }
    .last-action { bottom: 17px; font-size: 11px; line-height: 1.4; }
    .felt:has(.waiting-panel), body[data-theme='midnight'] .felt:has(.waiting-panel), body[data-theme='velvet'] .felt:has(.waiting-panel) { min-height: 330px; border-radius: 34px; }
    .pile-area:has(.waiting-panel) { padding: 12px 10px; }
    .waiting-panel { padding: 10px; gap: 8px; }
    .waiting-panel h2 { font-size: 24px; }
    .waiting-panel .invite-code { min-height: 46px; font-size: 30px; letter-spacing: .14em; }
    .waiting-panel .invite-link { min-height: 43px; font-size: 13px; }
    .waiting-panel > .primary-button { min-height: 44px; font-size: 14px; }
    .waiting-panel > .standing-meta { font-size: 12px; }
    .install-trigger { font-size: 13px; min-height: 42px; }
    .install-modal ol, .install-modal ul { font-size: 14px; }
  }
  @media (prefers-reduced-motion: reduce) {
    body::after, .ambient-suits > span, .playing-card:hover:not(:disabled) .card-foil::before, .playing-card.is-selected .card-foil::before, .deal-in { animation: none; }
    .ambient-suits > span { opacity: .07; }
    .card-foil::before { display: none; }
  }
}


@layer social {
  body[data-theme='club'], body[data-theme='saloon'], body[data-theme='penthouse'], body[data-theme='cosmic'] {
    --gold: #dfbd7d;
    --gold-light: #f1d5a3;
    --gold-dim: #9d835a;
    --ink: #101923;
    --panel: #1c2a35;
    --panel-soft: #293a46;
    --text: #f5f2e9;
    --muted: #acb7be;
    --line: #becad21c;
    --party-felt: #216969;
    --party-deep: #12444c;
    --party-rail: #3d5361;
    --ambient-color: #87b6b2;
    --ambient-rgb: 91, 145, 145;
    --avatar-edge: #a1b2bb;
    --menu-surface: #1c2b36;
    --menu-field: #111f29;
    --menu-border: #70879770;
    background: radial-gradient(ellipse at 80% 0, #24464d70, transparent 55%), linear-gradient(145deg, #13222c, #0d1520 80%);
    color: var(--text);
  }
  body[data-theme='saloon'] {
    --gold: #dfb279;
    --gold-light: #f2d0a2;
    --gold-dim: #a6835a;
    --ink: #201714;
    --panel: #34261e;
    --panel-soft: #49362a;
    --muted: #c3b2a0;
    --line: #e8ccb41c;
    --party-felt: #426854;
    --party-deep: #243f34;
    --party-rail: #614a37;
    --ambient-color: #d7ac7c;
    --ambient-rgb: 167, 116, 73;
    --avatar-edge: #c3ab90;
    --menu-surface: #35271f;
    --menu-field: #251a15;
    --menu-border: #ac8b6870;
    background: radial-gradient(ellipse at 50% -10%, #9d6d3740, transparent 60%), repeating-linear-gradient(91deg, #281d17 0, #281d17 100px, #2c201a 101px, #261b16 105px, #261b16 205px);
  }
  body[data-theme='penthouse'] {
    --gold: #cbb587;
    --gold-light: #e8d5ad;
    --gold-dim: #968464;
    --ink: #0c1116;
    --panel: #20272e;
    --panel-soft: #2e3841;
    --muted: #b0b8bd;
    --line: #d1d9df18;
    --party-felt: #3c5669;
    --party-deep: #213442;
    --party-rail: #3c4650;
    --ambient-color: #b9c8d4;
    --ambient-rgb: 112, 139, 158;
    --avatar-edge: #b2bdc4;
    --menu-surface: #202932;
    --menu-field: #111a22;
    --menu-border: #86949f70;
    background: radial-gradient(ellipse at 80% 0, #31445370, transparent 55%), linear-gradient(155deg, #171e25, #080d12 80%);
  }
  body[data-theme='cosmic'] {
    --gold: #c6d6ec;
    --gold-light: #e3ecfa;
    --gold-dim: #91a1bb;
    --ink: #14182a;
    --panel: #252c44;
    --panel-soft: #343d58;
    --muted: #b4bdd0;
    --line: #c9d8f31d;
    --party-felt: #5b638b;
    --party-deep: #343d63;
    --party-rail: #48516f;
    --ambient-color: #becaf1;
    --ambient-rgb: 136, 150, 200;
    --avatar-edge: #afb9d4;
    --menu-surface: #272d46;
    --menu-field: #171e33;
    --menu-border: #8c9ac370;
    background: radial-gradient(ellipse at 90% 15%, #57618f40, transparent 46%), radial-gradient(ellipse at 10% 90%, #394d7b40, transparent 40%), #13182a;
  }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival'])::before { opacity: .06; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival'])::after { background: radial-gradient(ellipse at 25% 30%, rgba(var(--ambient-rgb), .13), transparent 45%), radial-gradient(ellipse at 80% 70%, rgba(var(--ambient-rgb), .08), transparent 42%); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .ambient-suits > span:nth-child(n) { color: var(--ambient-color); filter: none; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .topbar { background: color-mix(in srgb, var(--ink) 85%, transparent); border-color: var(--line); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .sidebar { background: color-mix(in srgb, var(--ink) 25%, transparent); border-color: var(--line); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .felt { border-color: var(--party-rail); outline-color: color-mix(in srgb, var(--gold) 45%, transparent); background: radial-gradient(ellipse at 50% 20%, var(--party-felt), var(--party-deep)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink) 75%, black), 0 0 0 6px color-mix(in srgb, var(--gold) 25%, transparent), inset 0 0 0 1px #fff1, inset 0 -20px 55px #0002, 0 18px 40px #0005; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .felt::before { border-color: #ffffff20; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .primary-button { color: #253039; background: var(--gold); border-color: var(--gold-light); box-shadow: 0 3px 0 var(--gold-dim), 0 7px 15px #0002; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .primary-button:hover { background: var(--gold-light); box-shadow: 0 4px 0 var(--gold-dim), 0 9px 20px #0003; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.secondary-button, .quiet-button, .theme-select, .icon-button, .scoreboard-button, .install-trigger, .reaction-bar button) { background-color: var(--panel-soft); border-color: var(--menu-border); color: var(--text); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.secondary-button, .quiet-button, .theme-select, .icon-button, .install-trigger):hover { background-color: color-mix(in srgb, var(--panel-soft) 80%, white); border-color: var(--gold-dim); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .primary-button:disabled { background: var(--panel-soft); color: #a6aeb2; border-color: var(--menu-border); box-shadow: 0 3px 0 #0003; }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.modal, .toast) { background: radial-gradient(ellipse at 90% 0, rgba(var(--ambient-rgb), .14), transparent 50%), var(--menu-surface); border-color: var(--menu-border); color: var(--text); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.field, .stepper, .mode-tabs, .chat-log) { background-color: var(--menu-field); border-color: var(--menu-border); color: var(--text); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.stepper-btn, .mode-tab[aria-selected='true']) { background: var(--panel-soft); color: var(--gold-light); border-color: var(--menu-border); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.modal-description, .rules-list, .table-note, .standing-meta, .hand-meta, .selection-help, .text-button) { color: var(--muted); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.modal-eyebrow, .session-label, .standing-place, .result-rank, .rules-list li::before) { color: var(--gold); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .form-label { color: var(--text); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) :is(.table-status, .banter-bubble, .coach-tip) { background: var(--menu-surface); border-color: var(--menu-border); color: var(--text); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .banter-bubble::after { background: var(--menu-surface); border-color: var(--menu-border); }
  body:is([data-theme='club'], [data-theme='saloon'], [data-theme='penthouse'], [data-theme='cosmic'], [data-theme='arcade'], [data-theme='haunted'], [data-theme='beach'], [data-theme='lodge'], [data-theme='jungle'], [data-theme='underwater'], [data-theme='rooftop'], [data-theme='carnival']) .playing-card { --foil-primary: var(--gold-dim); --foil-secondary: var(--gold-light); background-image: radial-gradient(ellipse at 15% 12%, #fff 0, #fffdf7 42%, #f1eee5 100%); }
  body[data-theme='cosmic'] .playing-card { background-image: radial-gradient(ellipse at 15% 12%, #fff 0, #f8fbff 42%, #e8edf6 100%); }
  body[data-theme='saloon'] .playing-card { background-image: radial-gradient(ellipse at 15% 12%, #fffef7 0, #fff7e8 42%, #eee4d5 100%); }
  .opponent:nth-child(n) .avatar { border-color: var(--avatar-edge, #b3b8c2); background-color: #53606c; box-shadow: 0 4px 0 #0004, inset 0 1px #fff5; }
  .opponent.is-active:nth-child(n) .avatar { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent), 0 4px 0 #0004; }
  .opponent.is-out:nth-child(n) .avatar { border-color: var(--gold-dim); }
  .opponent-name { font-size: 14px; letter-spacing: .01em; }
  .opponent-info { font-size: 14px; line-height: 1.3; letter-spacing: 0; color: var(--muted); }
  .felt-wordmark, body[data-theme='midnight'] .felt-wordmark, body[data-theme='velvet'] .felt-wordmark { top: 17px; font-size: 14px; font-weight: 700; line-height: 1.25; letter-spacing: .035em; opacity: .2; color: #fff; }
  .felt-wordmark > span, .felt-kicker { display: none; }
  .pile-area { gap: 18px; padding-top: 52px; padding-bottom: 32px; }
  .pile-caption { color: #f6faf8; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: .01em; text-wrap: balance; }
  .last-action.table-status { position: relative; inset: auto; z-index: auto; display: flex; align-items: center; justify-content: center; width: min(100%, 1100px); min-height: 44px; margin: 33px auto 8px; padding: 9px 16px; border: 1px solid var(--menu-border, #a899bd40); border-radius: 12px; background: var(--menu-surface, #292039); color: var(--text); font-family: inherit; font-size: 14px; font-weight: 550; line-height: 1.6; letter-spacing: .01em; text-align: center; pointer-events: auto; }
  .banter-bubble { bottom: -25px; font-size: 14px; line-height: 1.5; letter-spacing: .01em; }
  .human-zone { margin-top: 14px; }
  .empty-pile { color: #f5f6f1; font-size: 15px; }
  .empty-pile small { color: #d4e0dc; font-size: 14px; line-height: 1.5; }
  .settings-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin: 23px 0; border-top: 1px solid var(--line); }
  .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; min-height: 70px; border-bottom: 1px solid var(--line); }
  .setting-row > div, .setting-row > span { min-width: 0; }
  .setting-row strong, .setting-row > label { display: block; color: var(--text); font-size: 15px; line-height: 1.4; font-weight: 700; }
  .setting-row small, .setting-row p { display: block; margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
  .setting-row .field, .setting-row select { width: min(170px, 45%); min-width: 118px; min-height: 44px; font-size: 14px; flex-shrink: 0; }
  .setting-row input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--gold); flex-shrink: 0; }
  .setting-row input[type='range'] { width: 145px; accent-color: var(--gold); }
  .settings-modal { width: min(610px, calc(100vw - 32px)); }
  .settings-modal .modal-title { font-size: 43px; }
  .settings-section-title { margin: 26px 0 12px; color: var(--gold-light); font-size: 16px; font-weight: 750; }
  .achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
  .achievement-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; min-height: 136px; padding: 16px 11px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff04; color: var(--muted); text-align: center; opacity: .65; }
  .achievement-tile .achievement-icon, .achievement-tile > span:first-child { font-size: 29px; filter: grayscale(1); }
  .achievement-tile strong { color: var(--text); font-size: 14px; font-weight: 750; line-height: 1.3; }
  .achievement-tile small { color: var(--muted); font-size: 12px; line-height: 1.4; }
  .achievement-tile.is-unlocked { opacity: 1; background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
  .achievement-tile.is-unlocked .achievement-icon, .achievement-tile.is-unlocked > span:first-child { filter: none; }
  .mode-select { width: 100%; min-height: 48px; border: 1px solid var(--menu-border); border-radius: 11px; padding: 12px 35px 12px 14px; background: var(--menu-field); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 600; }
  @media (min-width: 901px) and (max-height: 1050px) {
    .felt:has(.pile-cards), body[data-theme='midnight'] .felt:has(.pile-cards), body[data-theme='velvet'] .felt:has(.pile-cards) { min-height: 240px; }
    .pile-area:has(.pile-cards) { padding-top: 46px; padding-bottom: 30px; gap: 18px; }
    .last-action.table-status { margin-top: 31px; margin-bottom: 7px; padding-top: 8px; padding-bottom: 8px; }
    .human-zone { margin-top: 10px; }
  }
  @media (max-width: 600px) {
    .opponent-info { font-size: 12px; line-height: 1.25; min-height: 15px; }
    .opponent-name { font-size: 14px; line-height: 1.2; }
    .opponent { padding-bottom: 8px; }
    .felt-wordmark, body[data-theme='midnight'] .felt-wordmark, body[data-theme='velvet'] .felt-wordmark { top: 14px; font-size: 14px; letter-spacing: .025em; }
    .felt:has(.pile-cards), body[data-theme='midnight'] .felt:has(.pile-cards), body[data-theme='velvet'] .felt:has(.pile-cards) { min-height: 216px; }
    .pile-area:has(.pile-cards) { padding-top: 44px; padding-bottom: 28px; gap: 18px; }
    .pile-caption { font-size: 14px; line-height: 1.4; }
    .empty-pile { font-size: 15px; }
    .empty-pile small { font-size: 13px; line-height: 1.4; }
    .last-action.table-status { min-height: 42px; margin: 32px auto 8px; padding: 8px 11px; font-size: 14px; line-height: 1.5; }
    .banter-bubble { max-width: 89%; font-size: 13px; padding: 9px 12px; bottom: -25px; }
    .human-zone { margin-top: 10px; }
    .settings-modal .modal-title { font-size: 37px; }
    .setting-row { gap: 12px; padding: 14px 0; }
    .setting-row strong, .setting-row > label { font-size: 14px; }
    .setting-row small, .setting-row p { font-size: 12px; }
    .setting-row .field, .setting-row select { min-width: 105px; width: 43%; font-size: 13px; }
    .setting-row input[type='range'] { width: 111px; }
    .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .achievement-tile { min-height: 130px; padding: 14px 10px; }
    .achievement-tile strong { font-size: 14px; }
  }
}


@layer social {
  .joker-card { --joker-ink: #5b4777; --joker-light: #c8af76; box-shadow: inset 0 0 0 1px #fff, 0 2px 0 #a6a0b0, 0 4px 0 #ded9e4, 0 7px 18px #50336c33, 0 0 14px #b79c6433; }
  .joker-card.red-joker { --joker-ink: #ac4d58; --joker-light: #7daaa2; box-shadow: inset 0 0 0 1px #fff, 0 2px 0 #b7a0a0, 0 4px 0 #e7d9d6, 0 7px 18px #9e405a26, 0 0 14px #be6b6530; }
  .joker-art { position: absolute; left: 14%; top: 12%; width: 72%; height: 76%; object-fit: fill; border-radius: 3px; pointer-events: none; }
  .joker-card .joker-corner { font-family: Outfit, sans-serif; font-size: 12px; font-weight: 850; letter-spacing: -.05em; color: var(--joker-ink); background: #fffdf5; padding: 1px; min-width: 17px; }
  .joker-card .joker-corner span, .joker-card .joker-corner small { font-size: 10px; }
  .joker-card .card-foil::after { border-top-color: var(--joker-light); border-right-color: var(--joker-ink); opacity: .62; }
  .joker-ribbon { position: absolute; left: 15%; right: 15%; bottom: 5%; z-index: 3; color: var(--joker-ink); font-family: Outfit, sans-serif; font-size: 5px; font-weight: 850; text-align: center; letter-spacing: .02em; white-space: nowrap; }
  .joker-show { --joker-glow: #d9bf7b; --joker-bloom: 118, 93, 162; position: fixed; inset: 0; z-index: 115; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; isolation: isolate; }
  .joker-show[data-color='red'] { --joker-glow: #edab9d; --joker-bloom: 179, 66, 91; }
  .joker-show.show { opacity: 1; visibility: visible; }
  .joker-show::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 43%, rgba(var(--joker-bloom), .42) 0, rgba(var(--joker-bloom), .19) 26%, #0e102548 52%, transparent 76%); opacity: 0; }
  .joker-show.show::before { animation: joker-soft-bloom 1.8s ease-out both; }
  .joker-shockwave { position: absolute; top: 42%; left: 50%; width: 110px; height: 110px; transform: translate(-50%, -50%); border: 2px solid var(--joker-glow); border-radius: 50%; opacity: 0; box-shadow: 0 0 0 12px color-mix(in srgb, var(--joker-glow) 7%, transparent), 0 0 35px color-mix(in srgb, var(--joker-glow) 30%, transparent); }
  .joker-show.show .joker-shockwave { animation: joker-ring-burst 1.35s cubic-bezier(.12, .6, .3, 1) .16s both; }
  .joker-starfield { position: absolute; inset: 0; opacity: 0; background-image: radial-gradient(circle at 13% 28%, var(--joker-glow) 0 1.5px, transparent 2.5px), radial-gradient(circle at 82% 19%, var(--joker-glow) 0 1px, transparent 2px), radial-gradient(circle at 29% 67%, var(--joker-glow) 0 2px, transparent 3px), radial-gradient(circle at 74% 62%, var(--joker-glow) 0 1.5px, transparent 2.5px), radial-gradient(circle at 38% 14%, var(--joker-glow) 0 1px, transparent 2px), radial-gradient(circle at 63% 84%, var(--joker-glow) 0 1px, transparent 2px); }
  .joker-show.show .joker-starfield { animation: joker-star-reveal 1.8s ease-out both; }
  .joker-sparks { position: absolute; inset: 0; }
  .joker-sparks > i { position: absolute; top: 42%; left: 50%; width: 4px; height: 17px; border-radius: 3px; background: var(--joker-glow); opacity: 0; transform-origin: 50% 50%; }
  .joker-sparks > i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; background: #fff3ce; }
  .joker-show.show .joker-sparks > i { animation: joker-spark-flight 1.25s cubic-bezier(.12, .6, .25, 1) calc(.1s + var(--i, 0) * .009s) both; }
  .joker-mascot { position: absolute; top: 42%; left: 50%; display: grid; place-items: center; width: 177px; height: 244px; object-fit: contain; transform: translate(-50%, -50%); opacity: 0; filter: drop-shadow(0 9px 0 #17152a55) drop-shadow(0 15px 45px rgba(var(--joker-bloom), .65)); }
  .joker-mascot img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .joker-show.show .joker-mascot { animation: joker-royal-reveal 1.8s cubic-bezier(.16, .75, .23, 1) both; }
  .joker-show[data-color='red'].show .joker-mascot { animation-name: joker-chaos-reveal; }
  .joker-show h2 { position: absolute; top: 65%; left: 50%; width: min(850px, 90vw); margin: 0; color: #fff9eb; font-family: Outfit, 'Avenir Next', sans-serif; font-size: clamp(34px, 4.8vw, 64px); line-height: 1; font-weight: 900; letter-spacing: -.055em; text-align: center; text-shadow: 0 4px 0 #252039, 0 8px 30px rgba(var(--joker-bloom), .6); transform: translateX(-50%); opacity: 0; text-wrap: balance; }
  .joker-show p { position: absolute; top: 77%; left: 50%; width: min(620px, 84vw); margin: 0; color: #f4e8df; font-size: 17px; line-height: 1.5; font-weight: 650; text-align: center; transform: translateX(-50%); text-shadow: 0 2px 12px #000b; opacity: 0; }
  .joker-show.show h2 { animation: joker-title-reveal 1.8s ease-out both; }
  .joker-show.show p { animation: joker-copy-reveal 1.8s ease-out both; }
  @keyframes joker-soft-bloom { 0% { opacity: 0; } 18% { opacity: 1; } 65% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes joker-ring-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(7); } }
  @keyframes joker-star-reveal { 0% { opacity: 0; transform: scale(.7) rotate(-5deg); } 35% { opacity: .8; } 100% { opacity: 0; transform: scale(1.2) rotate(4deg); } }
  @keyframes joker-spark-flight { 0% { opacity: 0; transform: rotate(calc(var(--i, 0) * 15deg)) translateY(-20px) scale(.3); } 18% { opacity: .9; } 100% { opacity: 0; transform: rotate(calc(var(--i, 0) * 15deg)) translateY(-310px) scale(.6); } }
  @keyframes joker-royal-reveal { 0% { opacity: 0; transform: translate(-50%, -50%) perspective(700px) rotateY(150deg) rotate(-18deg) scale(.25); } 28% { opacity: 1; transform: translate(-50%, -50%) perspective(700px) rotateY(0) rotate(3deg) scale(1.08); } 45% { transform: translate(-50%, -50%) rotate(-2deg) scale(1); } 78% { opacity: 1; transform: translate(-50%, -54%) rotate(-4deg) scale(1); } 100% { opacity: 0; transform: translate(-50%, -61%) rotate(-8deg) scale(1.06); } }
  @keyframes joker-chaos-reveal { 0% { opacity: 0; transform: translate(-50%, -50%) perspective(700px) rotateY(-170deg) rotate(24deg) scale(.2); } 28% { opacity: 1; transform: translate(-50%, -50%) perspective(700px) rotateY(0) rotate(-8deg) scale(1.12); } 46% { transform: translate(-50%, -48%) rotate(6deg) scale(1); } 66% { transform: translate(-50%, -54%) rotate(-5deg) scale(1.04); } 82% { opacity: 1; transform: translate(-50%, -50%) rotate(3deg) scale(1); } 100% { opacity: 0; transform: translate(-50%, -61%) rotate(-12deg) scale(1.08); } }
  @keyframes joker-title-reveal { 0%, 20% { opacity: 0; transform: translate(-50%, 15px) scale(.9); } 35%, 78% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -8px) scale(1.03); } }
  @keyframes joker-copy-reveal { 0%, 30% { opacity: 0; transform: translate(-50%, 10px); } 45%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -5px); } }
  @media (max-width: 600px) {
    .joker-card .joker-corner { font-size: 10px; min-width: 14px; }
    .joker-card .joker-corner span, .joker-card .joker-corner small { font-size: 8px; }
    .joker-ribbon { font-size: 4px; bottom: 5%; }
    .joker-mascot { width: 140px; height: 192px; }
    .joker-show h2 { top: 62%; font-size: 35px; line-height: 1.03; }
    .joker-show p { top: 75%; font-size: 14px; line-height: 1.5; }
  }
  @media (prefers-reduced-motion: reduce) {
    .joker-show.show .joker-shockwave, .joker-show.show .joker-starfield, .joker-show.show .joker-sparks > i { display: none; }
    .joker-show.show::before { animation: none; opacity: .7; }
    .joker-show.show .joker-mascot { animation: none; opacity: 1; transform: translate(-50%, -50%); }
    .joker-show.show h2, .joker-show.show p { animation: none; opacity: 1; transform: translateX(-50%); }
  }
}

@layer social {
  .joker-sparks > i:nth-child(1) { --i: 0; }
  .joker-sparks > i:nth-child(2) { --i: 1; }
  .joker-sparks > i:nth-child(3) { --i: 2; }
  .joker-sparks > i:nth-child(4) { --i: 3; }
  .joker-sparks > i:nth-child(5) { --i: 4; }
  .joker-sparks > i:nth-child(6) { --i: 5; }
  .joker-sparks > i:nth-child(7) { --i: 6; }
  .joker-sparks > i:nth-child(8) { --i: 7; }
  .joker-sparks > i:nth-child(9) { --i: 8; }
  .joker-sparks > i:nth-child(10) { --i: 9; }
  .joker-sparks > i:nth-child(11) { --i: 10; }
  .joker-sparks > i:nth-child(12) { --i: 11; }
  .joker-sparks > i:nth-child(13) { --i: 12; }
  .joker-sparks > i:nth-child(14) { --i: 13; }
  .joker-sparks > i:nth-child(15) { --i: 14; }
  .joker-sparks > i:nth-child(16) { --i: 15; }
  .joker-sparks > i:nth-child(17) { --i: 16; }
  .joker-sparks > i:nth-child(18) { --i: 17; }
  .joker-sparks > i:nth-child(19) { --i: 18; }
  .joker-sparks > i:nth-child(20) { --i: 19; }
  .joker-sparks > i:nth-child(21) { --i: 20; }
  .joker-sparks > i:nth-child(22) { --i: 21; }
  .joker-sparks > i:nth-child(23) { --i: 22; }
  .joker-sparks > i:nth-child(24) { --i: 23; }
}


@layer social {
  .opponents:has(.role-president) { padding-top: 19px; }
  .avatar.generated-avatar { overflow: visible; isolation: isolate; }
  .avatar.generated-avatar > .rank-accessory, .avatar.generated-avatar > .rank-sash { position: absolute; display: block; background: none !important; background-image: none !important; border-radius: 0; border: 0; box-shadow: none; width: auto; height: auto; pointer-events: none; z-index: 7; }
  .avatar.generated-avatar > .rank-accessory { left: 50%; top: -23px; width: 58px; height: 36px; transform: translateX(-50%) rotate(-6deg); }
  .avatar.generated-avatar > .rank-sash { left: 50%; bottom: -9px; transform: translateX(-50%) rotate(-3deg); min-width: 72px; height: 17px; padding: 4px 7px 3px; font-family: Outfit, sans-serif; font-size: 8px; line-height: 1; font-weight: 900; letter-spacing: .04em; white-space: nowrap; text-align: center; }
  .avatar.generated-avatar.role-president { border-color: #e4c77f; box-shadow: 0 0 0 3px #d8b86d26, 0 4px 0 #302718; }
  .avatar.generated-avatar.role-president > .rank-accessory { background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2040%22%3E%3Cpath%20d%3D%22m6%2011%2012%2010L31%204l14%2017L58%2011l-5%2024H11Z%22%20fill%3D%22%23d8b86d%22%20stroke%3D%22%2365502e%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22m11%2029%2042%200-1%207H12Z%22%20fill%3D%22%23ead59b%22%20stroke%3D%22%2365502e%22%20stroke-width%3D%221.7%22%2F%3E%3Cpath%20d%3D%22m16%2012%204%205m10-8%202%2012m13-5%203-4%22%20stroke%3D%22%23fff2cb%22%20stroke-width%3D%222%22%2F%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2210%22%20r%3D%223%22%20fill%3D%22%23f4dfa3%22%20stroke%3D%22%2365502e%22%20stroke-width%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%224%22%20r%3D%223%22%20fill%3D%22%23f4dfa3%22%20stroke%3D%22%2365502e%22%20stroke-width%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2258%22%20cy%3D%2210%22%20r%3D%223%22%20fill%3D%22%23f4dfa3%22%20stroke%3D%22%2365502e%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22m31%2024%204%204-4%204-4-4Z%22%20fill%3D%22%23806a42%22%2F%3E%3C%2Fsvg%3E') !important; background-size: contain !important; background-position: center !important; background-repeat: no-repeat !important; filter: drop-shadow(0 2px 0 #4b3a2544); }
  .avatar.generated-avatar.role-president > .rank-sash { background: #e6ca83 !important; color: #47371d; border: 1px solid #9d7b44; border-radius: 3px; box-shadow: 0 2px 0 #392c1b55; }
  .opponent:has(.role-president) .opponent-name { margin-top: 15px; }
  .avatar.generated-avatar.role-vice { border-color: #d1dce2; box-shadow: 0 0 0 2px #e3edf122, 0 4px 0 #2d3942; }
  .avatar.generated-avatar.role-vice > .rank-accessory { top: -18px; right: -8px; left: auto; width: 27px; height: 27px; transform: rotate(10deg); }
  .avatar.generated-avatar.role-vice > .rank-accessory::before { content: '✦'; display: block; color: #e1e8ec; font: 31px Georgia, serif; text-shadow: 1px 2px 0 #53636b; }
  .avatar.generated-avatar.role-vice > .rank-sash, .avatar.generated-avatar.role-citizen > .rank-sash, .avatar.generated-avatar.role-citizen > .rank-accessory { display: none; }
  .avatar.generated-avatar.role-asshole, .avatar.generated-avatar.role-vice-asshole { border: 3px dashed #b8a17c; box-shadow: 0 4px 0 #3e3022; }
  .avatar.generated-avatar.role-asshole > .rank-accessory, .avatar.generated-avatar.role-vice-asshole > .rank-accessory { top: -19px; width: 64px; height: 36px; transform: translateX(-50%) rotate(10deg); background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2068%2038%22%3E%3Cpath%20d%3D%22m8%2029%2021-25%2028%2024%203%207H6Z%22%20fill%3D%22%23bfa275%22%20stroke%3D%22%2366533c%22%20stroke-width%3D%221.6%22%2F%3E%3Cpath%20d%3D%22m29%204%207%2025H8Z%22%20fill%3D%22%23d4bb90%22%20stroke%3D%22%2366533c%22%20stroke-width%3D%221.4%22%2F%3E%3Cpath%20d%3D%22m29%204%2028%2024-21%201Z%22%20fill%3D%22%23b4976a%22%20stroke%3D%22%2366533c%22%20stroke-width%3D%221.3%22%2F%3E%3Cpath%20d%3D%22M6%2028h54v8H6z%22%20fill%3D%22%23d8be90%22%20stroke%3D%22%2366533c%22%20stroke-width%3D%221.4%22%2F%3E%3Cpath%20d%3D%22m16%2031%207%201m20-1%209%201%22%20stroke%3D%22%239d8157%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22m8%2035%204-2%204%203%205-2%204%202%22%20stroke%3D%22%2366533c%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E') !important; background-size: contain !important; background-position: center !important; background-repeat: no-repeat !important; filter: drop-shadow(0 2px 0 #392e2544); }
  .avatar.generated-avatar.role-vice-asshole > .rank-accessory { width: 57px; height: 31px; top: -16px; transform: translateX(-50%) rotate(-8deg); }
  .avatar.generated-avatar.role-asshole > .rank-sash, .avatar.generated-avatar.role-vice-asshole > .rank-sash { left: auto; right: -9px; bottom: -5px; min-width: 28px; width: 28px; height: 28px; padding: 2px; transform: rotate(9deg); font-size: 0; background: #c5ab81 !important; border: 1px dashed #6f583d; border-radius: 9px; box-shadow: 0 2px 0 #36291a44; }
  .avatar.generated-avatar.role-asshole > .rank-sash::after, .avatar.generated-avatar.role-vice-asshole > .rank-sash::after { content: '🥔'; display: block; font-size: 19px; line-height: 1.15; }
  .avatar.generated-avatar.role-vice-asshole > .rank-sash { min-width: 24px; width: 24px; height: 24px; right: -7px; bottom: -3px; }
  .avatar.generated-avatar.role-vice-asshole > .rank-sash::after { font-size: 16px; }
  @media (max-width: 600px) {
    .opponents:has(.role-president) { padding-top: 16px; }
    .avatar.generated-avatar > .rank-accessory { width: 48px; height: 30px; top: -19px; }
    .avatar.generated-avatar > .rank-sash { min-width: 61px; height: 15px; bottom: -8px; font-size: 7px; padding: 4px 5px 3px; }
    .avatar.generated-avatar.role-asshole, .avatar.generated-avatar.role-vice-asshole { border-width: 2px; }
    .avatar.generated-avatar.role-asshole > .rank-accessory { width: 53px; height: 30px; top: -17px; }
    .avatar.generated-avatar.role-vice-asshole > .rank-accessory { width: 48px; height: 27px; top: -15px; }
    .avatar.generated-avatar.role-vice > .rank-accessory { width: 22px; height: 22px; top: -13px; right: -7px; }
    .avatar.generated-avatar.role-vice > .rank-accessory::before { font-size: 25px; }
    .avatar.generated-avatar.role-asshole > .rank-sash { width: 23px; min-width: 23px; height: 23px; right: -6px; bottom: -4px; }
    .avatar.generated-avatar.role-asshole > .rank-sash::after { font-size: 15px; }
    .avatar.generated-avatar.role-vice-asshole > .rank-sash { width: 21px; min-width: 21px; height: 21px; right: -6px; bottom: -3px; }
    .avatar.generated-avatar.role-vice-asshole > .rank-sash::after { font-size: 13px; }
    .opponent:has(.role-president) .opponent-name { margin-top: 14px; }
  }
}

@layer final-polish {
  .standing-rank-icon { display:grid; place-items:center; flex:0 0 30px; height:34px; color:var(--gold); font-size:25px; }
  .standing-place small { font-size:12px; font-weight:500; }
  .your-avatar { display:inline-flex; margin-right:5px; }
  .your-avatar .standing-avatar { width:34px; height:34px; }
  .hand-heading > div { margin-right:auto; }
  .opponent-name { line-height:1.2; text-wrap:balance; }
  .opponent:not(.is-active):not(.reacting) .avatar { animation:rogue-breath calc(5s + var(--avatar-x,0)*.7s) ease-in-out infinite; }
  .last-card-seat .avatar { outline:2px solid #e4b370; outline-offset:4px; }
  .felt.is-showdown { box-shadow:0 0 0 5px #3c2f50,0 0 28px #d7aa6540,inset 0 0 50px #0003; }
  .table-status { text-align:center; line-height:1.5; font-size:15px; letter-spacing:0; }
  .pile-caption { font-size:15px; letter-spacing:0; line-height:1.5; }
  .mode-select { margin:8px 0 12px; appearance:auto; }
  .public-room-options { display:grid; gap:9px; margin:0 0 15px; }
  .public-toggle { display:flex; align-items:center; gap:10px; font-size:15px; font-weight:650; }
  .public-toggle input { accent-color:var(--gold); width:20px; height:20px; }
  .public-tables-modal { width:min(650px,calc(100vw - 28px)); }
  .public-table-grid { display:grid; gap:12px; margin:20px 0; }
  .public-table-card { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px; border:1px solid #d6bb8e35; background:#ffffff06; border-radius:16px; }
  .public-table-card strong { font-size:19px; }
  .public-table-card p { margin:8px 0; color:var(--muted); font-size:14px; }
  .public-table-card span { color:var(--gold); font-size:14px; }
  .public-table-card .primary-button { min-width:76px; padding:12px 18px; }
  .public-empty { padding:20px; text-align:center; }
  .public-empty > span { font-size:46px; }
  .public-empty h3 { font-size:25px; }
  .public-empty p { font-size:16px; line-height:1.6; color:var(--muted); }
  .credits-list { display:grid; gap:12px; max-height:48vh; overflow:auto; padding-right:4px; }
  .credit-row { padding:14px; border:1px solid var(--line); border-radius:12px; background:#ffffff05; font-size:14px; }
  .credit-row a { color:var(--gold); text-underline-offset:3px; }
  .credit-row p { line-height:1.5; }
  .install-icon { border-radius:22px; margin:0 0 20px; }
  .install-steps { padding-left:22px; font-size:16px; line-height:1.65; }
  .install-steps li { margin:14px 0; }
  .celebration-banner { max-width:min(650px,90vw); }
  .celebration-emoji { position:relative; min-height:90px; }
  .rags-hat,.royal-crown { display:inline-block; }
  .is-comeback .rags-hat { animation:potato-abdication 1.1s ease-in both; }
  .is-comeback .royal-crown { position:absolute; left:50%; top:0; animation:royal-arrival 1.1s .55s cubic-bezier(.2,.9,.2,1.3) both; }
  .is-comeback .celebration-banner { border-color:#f4d482; box-shadow:0 0 70px #c8a14b66; }
  body.text-large .table-status,body.text-large .pile-caption,body.text-large .selection-help,body.text-large .coach-tip { font-size:18px; line-height:1.65; }
  body[data-motion='reduced'] .ambient-suits,body[data-motion='reduced'] .joker-show,body[data-motion='reduced'] .celebration { display:none!important; }
  body[data-motion='reduced'] *,body[data-motion='reduced'] *::before,body[data-motion='reduced'] *::after { animation:none!important; transition-duration:.01ms!important; }
  @keyframes rogue-breath { 0%,100% { transform:translateY(0) rotate(-.5deg); } 50% { transform:translateY(-2px) rotate(.5deg); } }
  @keyframes potato-abdication { 0%,35% { opacity:1;transform:rotate(-8deg) scale(1); } 100% { opacity:0;transform:translate(-100px,-140px) rotate(-170deg) scale(.3); } }
  @keyframes royal-arrival { 0% { opacity:0;transform:translate(-50%,-100px) scale(.3) rotate(20deg); } 65% { opacity:1;transform:translate(-50%,6px) scale(1.2) rotate(-8deg); } 100% { opacity:1;transform:translate(-50%,0) scale(1) rotate(-4deg); } }
  @media(max-width:600px) {
    .opponent-name { min-height:32px; max-width:100%; white-space:normal; overflow:visible; font-size:14px; }
    .opponent-info { font-size:12px; line-height:1.4; min-height:18px; }
    .hand-heading { gap:7px; }
    .hand-meta { font-size:14px; }
    .hand-heading .session-label { font-size:14px; }
    .public-table-card { padding:14px; gap:10px; }
    .public-table-card strong { font-size:17px; }
    .public-table-card p { font-size:14px; line-height:1.5; }
    .public-table-card .primary-button { min-width:65px; }
    .table-status { font-size:14px; margin-top:32px; }
    .header-actions { gap:6px; }
    .header-actions .theme-select { max-width:112px; font-size:14px; }
    .header-actions .quiet-button,.header-actions .secondary-button { padding-inline:10px; font-size:14px; }
    .header-actions .icon-button { width:44px;flex-shrink:0; }
  }
  @media(prefers-reduced-motion:reduce) { .opponent .avatar,.rags-hat,.royal-crown { animation:none!important; } }
}
