/* Typography and surfaces */
@font-face {
  font-family: Bricolage; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('./fonts/bricolage-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Bricolage; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('./fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  color-scheme: dark;
  --room: #121319; --panel: #1c1d26; --surface: #252631; --well: #17181f; --line: #3b3c49;
  --text: #f5f3fa; --muted: #bbb9c9; --subtle: #a09eaf;
  --lime: #d5f880; --on-lime: #203116; --iris: #c6b3ff; --danger: #ff9d9c;
  --body: Bricolage, system-ui, 'Segoe UI', sans-serif;
  --display: var(--body);
  /* The fireball shares these original pigments in the lobby and at the table. */
  --fire: #ff7a1a; --fire-light: #ffc83d; --ember: #c2410c; --seat: 52px; --ball: calc(var(--seat) * .85);
  font: 16px/1.45 var(--body); font-optical-sizing: auto; color: var(--text); background: var(--room);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea, output { color: inherit; font: inherit; }
button, summary, select { cursor: pointer; }
button { border: 0; background: none; }
button:disabled { opacity: .53; cursor: not-allowed; }
button, summary { touch-action: manipulation; }
button, summary, .game-layout, .masthead, .table-nav { user-select: none; caret-color: transparent; }
input, textarea, .chat-message, .log li { user-select: text; caret-color: var(--text); }
:focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui-icon, .card-icon { display: inline-block; flex: none; width: 20px; height: 20px; vertical-align: middle; }
.card-icon { width: 30px; height: 30px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, .brand { line-height: 1.1; letter-spacing: -.035em; }
.small, .hint { font-size: .875rem; }
.muted, .hint, .note { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row > * { min-width: 0; flex: 1 1 130px; }
.row > .btn { flex: 0 1 auto; }
.btn, .tool, .x { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 15px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; line-height: 1.2; }
.btn.primary { color: var(--on-lime); background: var(--lime); border-color: var(--lime); }
.btn.quiet { background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 46px; font-size: 1.04rem; font-weight: 760; }
.btn:not(:disabled):active, .tool:active { transform: translateY(1px); }
.link { display: inline; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--iris); }
.x { padding: 0; width: 42px; flex: none; border-radius: 50%; }
.x .ui-icon { width: 17px; height: 17px; }
.input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); line-height: 1.25; }
.input::placeholder { color: var(--subtle); }
.input:focus-visible { border-color: var(--iris); outline-width: 2px; outline-offset: 1px; }
.input.code, .gcode, .code-value { font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.input.code { min-height: 64px; font-size: 1.65rem; text-align: center; text-transform: uppercase; }
.input.code::placeholder { color: var(--subtle); font-size: 1.2rem; letter-spacing: .08em; }
.code-tools { display: flex; align-items: center; gap: 3px; min-width: 0; }
.code-label { color: var(--muted); font-size: .84rem; font-weight: 650; }
.code-value { display: grid; align-items: center; min-height: 42px; padding-inline: 10px; font-weight: 750; cursor: pointer; }
.create-code { display: grid; gap: 6px; min-width: 0; }
.create-code .code-box { display: flex; align-items: center; min-height: 44px; padding-inline-end: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); }
.create-code .code-value { flex: 1; min-width: 0; min-height: 42px; }
.create-code .code-tool { width: 36px; height: 36px; flex: none; }
.create-code .code-value:empty::before { content: '— — — — — —'; font-size: .85rem; letter-spacing: 0; color: var(--subtle); cursor: default; }
.code-tool { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 10px; color: var(--iris); }
.code-tool svg { width: 18px; height: 18px; }
.code-tool.copied { color: var(--lime); }
.code-tool:disabled { opacity: .35; }
@media (hover: hover) { .code-tool:not(:disabled):hover { background: var(--surface); } }
.header-code { gap: 0; }
.header-code .code-value { padding-inline: 4px; font-size: .9rem; }
.invite-dialog p { margin-block: 8px 12px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.field > span, .avatar-picker > legend { color: var(--muted); font-size: .84rem; font-weight: 650; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
#app { width: 100%; max-width: 1328px; margin: auto; padding: env(safe-area-inset-top) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
#toast, .panel-toast { position: fixed; z-index: 60; inset: max(12px, env(safe-area-inset-top)) auto auto 50%; width: max-content; max-width: min(88vw, 520px); padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--room); font-weight: 650; box-shadow: 0 6px 30px #09091270; transform: translate(-50%, -8px); opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; }
#toast.show, .panel-toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err, .panel-toast.err { background: var(--danger); }
.masthead, .toolbar, .brand, .language, .hero-facts, .chip, .profile-title, .chat-count { display: flex; align-items: center; }
.masthead { justify-content: space-between; flex-wrap: wrap; gap: 14px; min-height: 72px; }
.brand { gap: 9px; min-height: 44px; font-size: 1.85rem; font-weight: 800; letter-spacing: -.075em; white-space: nowrap; color: var(--text); text-decoration: none; }
.brand em { font-style: normal; color: var(--lime); }
.brand-mark { display: block; width: 50px; height: 50px; }
.toolbar { justify-content: flex-end; gap: 8px; }
.masthead > .toolbar { margin-inline-start: auto; max-inline-size: 100%; flex-wrap: wrap; }
.tool, .language { min-height: 40px; padding: 8px 13px; gap: 7px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); background: transparent; font-size: .875rem; }
.tool .ui-icon, .language .ui-icon { width: 17px; height: 17px; }
.shop-link { background: #302b40; border-color: #514766; color: #ddcfff; }
.language { padding: 0 10px; border-color: var(--line); color: var(--text); }
.language select { border: 0; background: transparent; padding: 9px 0; font: inherit; min-width: 0; max-width: 90px; }
.language-code { display: none; }
select option { background: var(--surface); color: var(--text); }
.chip { display: inline-flex; gap: 6px; padding: 3px 9px; border-radius: 100px; font-size: .75rem; font-weight: 650; line-height: 1.4; }
.chip.demo { background: #c5b4ff19; color: #e2d4ff; border: 1px solid #c5b4ff44; }
.chip.demo::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--iris); }
.chip.mode { background: #272637; color: var(--iris); border: 1px solid #474255; }
.chip.mode .ui-icon { width: 15px; height: 15px; }

/* Lobby poster */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: clamp(204px, 18vw, 250px); border: 1px solid #58446f; border-radius: 24px; background: radial-gradient(ellipse at 80% 80%, #6b479b 0%, #49316e 32%, transparent 63%), linear-gradient(108deg, #29223c 15%, #402e59 59%, #544174); }
.hero-copy { position: relative; z-index: 2; width: 55%; padding: 25px clamp(22px, 3.7vw, 56px); }
.hero h1 { margin: 13px 0 9px; font-size: clamp(2.6rem, 4.85vw, 4.65rem); font-weight: 780; line-height: 1; letter-spacing: -.043em; color: #fbf6ff; text-wrap: balance; }
.hero p { max-width: 43ch; color: #dfd8e8; font-size: clamp(.94rem, 1.22vw, 1.06rem); line-height: 1.45; }
.hero-facts { gap: 10px; flex-wrap: wrap; color: #e6dfef; font-size: .8rem; font-weight: 600; }
.hero-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.hero-facts .ui-icon { width: 16px; height: 16px; }
.key-art { pointer-events: none; position: absolute; top: 0; right: 0; bottom: 0; width: 47%; direction: ltr; }
.key-art::before { content: ''; position: absolute; inset: -30% -8% -30% -25%; background: radial-gradient(#dbbfff45 1px, transparent 1.4px) 0 0 / 6px 6px; mask-image: linear-gradient(85deg, transparent, #000 62%, transparent); transform: rotate(-11deg); }
.art-rings { position: absolute; left: -8%; top: 15%; width: 112%; height: 72%; border: 1px solid #dbc5ff74; border-radius: 50%; transform: rotate(-16deg); }
.art-rings i, .art-rings::before, .art-rings::after { position: absolute; border: 1px solid #cbb5ff57; border-radius: 50%; pointer-events: none; }
.art-rings i:nth-child(1) { inset: 8%; border-style: dashed; }
.art-rings i:nth-child(2) { inset: -19%; }
.art-rings i:nth-child(3) { inset: -35%; }
.art-rings::before { content: ''; inset: 22%; }
.art-rings::after { content: ''; inset: -50%; }
.art-card { position: absolute; display: grid; place-items: center; width: clamp(68px, 7.6vw, 115px); aspect-ratio: 5/7; border-radius: 12%; }
.art-card::before { content: ''; position: absolute; inset: 6%; border: 1.5px solid currentColor; opacity: .75; border-radius: 9%; }
.art-card::after { content: ''; position: absolute; inset: 13%; background: linear-gradient(currentColor, currentColor) top left / 5px 10px no-repeat, linear-gradient(currentColor, currentColor) bottom right / 5px 10px no-repeat; }
.art-card .card-icon { width: 53%; height: 53%; stroke-width: 1.65px; }
.card-rear { left: 17%; top: 10%; transform: rotate(-26deg); color: #eee3ff; border: 2px solid #dacbff; background: repeating-linear-gradient(132deg, transparent 0 7px,#bfa1fc32 8px 9px), #8060b5; box-shadow: -4px 5px #44345c, -8px 10px #281e3e55; }
.card-front { left: 30%; top: 30%; transform: rotate(12deg); color: #3c4829; border: 2px solid #edfdbb; background: radial-gradient(#788f453b .8px, transparent 1px) 0 0 / 4px 4px, linear-gradient(155deg, #edfbb8, #c1e778); box-shadow: 4px 5px #718648, 8px 13px 18px #261e4280; }
.art-die { position: absolute; right: 13%; bottom: 14%; transform: rotate(16deg); }
.art-die .die { width: 46px; height: 46px; padding: 9px; border-radius: 10px; gap: 3px; background: #fff; box-shadow: 2px 3px #d4d5db, 4px 6px #b9bac3, 6px 9px #9d9ea9, 9px 14px 10px #241d3b80; }
.art-die .die i.on { background: #282830; }
.art-star { position: absolute; width: 18px; aspect-ratio: 1; background: #e5d7ff; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 61%,50% 100%,39% 61%,0 50%,39% 38%); }
.star-one { top: 19%; right: 12%; width: 22px; }
.star-two { left: 10%; bottom: 16%; width: 15px; }
.star-three { right: 42%; top: 18%; width: 11px; }
.hero .demo-ball { position: absolute; left: 68%; top: 44%; width: 0; height: 0; }
.hero .demo-ball .ball { --ball: clamp(49px, 5.5vw, 82px); left: 0; top: 0; }
[dir="rtl"] .hero-copy { margin-inline-start: 0; }
[dir="rtl"] .key-art { left: 0; right: auto; }
[dir="rtl"] .hero { background: radial-gradient(ellipse at 20% 80%, #6b479b, transparent 63%), #32273f; }

/* Lobby actions, profile and saved tables */
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: 'play profile' 'play tools'; gap: 12px 18px; align-items: start; margin-top: 18px; }
.profile-column { grid-area: profile; min-width: 0; }
.lobby-grid:not(:has(#onboarding)) { max-width: 820px; grid-template-columns: minmax(0,1fr); grid-template-areas: 'play' 'tools'; grid-template-rows: auto; margin-inline: auto; }
.home-menu { position: relative; }
.home-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); }
.home-menu nav { position: absolute; z-index: 20; inset-inline-end: 0; top: calc(100% + 6px); min-width: 210px; max-height: 65dvh; overflow: auto; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 12px 32px #0008; }
.home-menu nav button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; min-height: 44px; text-align: start; border-radius: 9px; }
.home-menu nav button:is(:hover,:focus-visible) { background: var(--surface); }
.home-menu nav svg { color: var(--iris); }
.profile-form { display: grid; gap: 15px; padding-block: 18px; }
dialog.onboarding { width: min(480px, calc(100% - 28px)); }
.lobby-tools .account:not([open]) { display: none; }
.profile-panel, .lobby-play { padding: clamp(16px, 1.7vw, 25px); }
.profile-title { gap: 12px; margin-bottom: 15px; }
.profile-title h2 { font-size: 1.2rem; }
.avatar-picker { min-width: 0; border: 0; margin: 11px 0 0; padding: 0; }
.avatar-picker legend { padding: 0; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.lobby-tools summary, .pack-details summary { display: flex; align-items: center; gap: 9px; }
summary > .ui-icon:last-child:not(:only-child) { margin-inline-start: auto; transition: transform .16s; }
details[open] > summary > .ui-icon:last-child:not(:only-child) { transform: rotate(180deg); }
.avatars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 5px; }
.avatars label { position: relative; }
.avatars input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.avatars span { display: grid; place-items: center; min-height: 44px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: 21px/1.2 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; }
.avatars :checked + span { border-color: var(--lime); background: #35432e; box-shadow: inset 0 0 0 1px var(--lime); }
.avatars input:focus-visible + span { outline: 2px solid var(--iris); outline-offset: 2px; }
.lobby-play { grid-area: play; }
#app[data-screen="home"] { padding-block-start: 0; }
.lobby-bar { position: sticky; top: 0; z-index: 15; padding-top: env(safe-area-inset-top); background: var(--room); }
.lobby-bar:has(.resume-table:not([hidden])) { padding-bottom: 8px; }
.resume-table { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; width: 100%; min-height: 44px; padding: 7px 14px; border: 1px solid #dcff9d; border-radius: 12px; color: #182810; background: linear-gradient(110deg, #d7ff80, #7ce9b1); text-align: start; font-size: .88rem; }
.resume-dot { width: 8px; height: 8px; flex: none; background: #225d36; border-radius: 50%; box-shadow: 0 0 0 4px #225d361a; }
#resume-status { font-weight: 750; }
#resume-code { color: #305335; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.resume-action { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; font-weight: 750; }
.resume-action svg { width: 16px; }
[dir="rtl"] .resume-action svg { transform: scaleX(-1); }
.lobby-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: var(--well); }
.lobby-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-width: 0; min-height: 40px; padding: 5px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); line-height: 1.15; font-size: .89rem; font-weight: 650; }
.lobby-tabs button[aria-selected="true"] { color: var(--text); background: #373340; border-color: #5a5068; }
.lobby-tabs button[aria-selected="true"] .ui-icon { color: var(--iris); }
.lobby-tabs .ui-icon { width: 16px; height: 16px; }
.lobby-tabs button span { min-width: 0; overflow-wrap: anywhere; }
#create, #gif-upload, .cosmetics-sheet form { display: grid; gap: 13px; }
#join, .form-pair { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
#join .field { flex: 2 1 10em; }
#join .input { min-height: 46px; padding-block: 5px; font-size: 1.2rem; }
#join .btn { flex: 1 1 auto; min-height: 46px; }
.form-pair { gap: 12px; }
.form-pair > .field { flex: 1 1 8em; }
.form-pair > .end-field { flex: 2 1 14em; min-inline-size: 0; }
.form-pair > .create-code { flex: 1.4 1 13em; }
@media (min-width: 760px) {
  .form-pair { display: grid; grid-template-columns: minmax(8.5em, .8fr) minmax(13em, 1.35fr) minmax(13em, 1.2fr); }
}
.end-input { position: relative; min-inline-size: 0; max-inline-size: 100%; inline-size: 100%; height: 2.85em; min-height: 44px; padding: .4em 1.35em; text-align: center; font: inherit; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.end-input::-webkit-date-and-time-value { margin-inline: auto; text-align: center; }
.end-input::-webkit-datetime-edit { padding: 0; display: flex; align-items: center; justify-content: center; }
.end-input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.end-input::-webkit-calendar-picker-indicator { position: absolute; inset-inline-end: .32em; margin: 0; padding: .12em; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.modes button > span { min-width: 0; overflow-wrap: anywhere; text-align: start; line-height: 1.15; }
.modes button { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--well); font-weight: 650; }
.modes button > i { width: 13px; height: 13px; flex: none; margin-inline-start: auto; border: 1px solid #777586; border-radius: 50%; }
.modes button[aria-pressed="true"] { color: #e4d7ff; background: #353043; border-color: #9380b3; }
.modes button[aria-pressed="true"] i { border: 4px solid var(--iris); background: #30263e; }
.mode-desc { font-size: .8rem; line-height: 1.4; color: var(--muted); }
.stepper { display: flex; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); }
.stepper button { flex: none; min-width: 40px; align-self: stretch; font-size: 1.24rem; color: var(--iris); }
.stepper output { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.history-group + .history-group { margin-top: 20px; }
.history-group h3 { display: flex; align-items: center; gap: 7px; margin-block-end: 8px; font-size: 1rem; }
.history-group h3 small { padding: 2px 6px; border-radius: 6px; color: var(--muted); background: var(--surface); font-size: .74rem; }
.history-group .empty-state { display: block; min-height: 0; padding: 10px 0; text-align: start; font-size: .88rem; }
.games-list { display: grid; gap: 8px; }
.game-summary { min-width: 0; }
.game-result { display: block; margin-top: 5px; font-weight: 650; color: var(--iris); overflow-wrap: anywhere; }
.games-list button { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--well); text-align: start; }
.games-list button > .ui-icon { margin-inline-start: auto; }
.table-symbol { padding: 10px; background: #302b40; color: var(--iris); border-radius: 12px; }
.gmeta { display: block; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.empty-state, .empty-chat { display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; color: var(--muted); }
.empty-state { min-height: 170px; padding: 18px; }
.empty-state > .ui-icon, .empty-chat > .ui-icon { width: 32px; height: 32px; color: var(--iris); }
.lobby-tools { grid-area: tools; display: grid; align-content: start; gap: 8px; }
.lobby-tools details { border-radius: 13px; }
.lobby-tools summary { min-height: 45px; padding: 9px 15px; font-size: .9rem; font-weight: 650; }
.lobby-tools summary > .ui-icon { color: var(--iris); width: 17px; height: 17px; }
.fold-body { border-top: 1px solid var(--line); padding: 14px; }
.fold-body > * + * { margin-top: 12px; }
.idline code { overflow-wrap: anywhere; font-size: .75rem; }
#newpack { display: grid; gap: 8px; }
.admin-gifs, .personal-gifs, .pack-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-top: 6px; }
.admin-gifs figure, .personal-gifs figure, .pack-gallery figure { min-width: 0; position: relative; }
.admin-gifs img, .personal-gifs img, .pack-gallery img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
figcaption { margin-top: 3px; font-size: .75rem; overflow-wrap: anywhere; }
.admin-gifs .x { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; min-height: 26px; width: 26px; background: var(--well); }
.admin-gifs .link, .personal-gifs .link { font-size: .78rem; }
.file-picker { display: flex; align-items: center; position: relative; min-width: 0; gap: 12px; padding: 15px; border: 1.5px dashed #86759c; border-radius: 13px; background: #282430; color: var(--text); }
.file-picker:focus-within, .file-picker.drag-over { outline: 3px solid var(--iris); outline-offset: 2px; }
.upload-symbol { display: grid; flex: none; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: var(--iris); background: #3b324a; }
.file-copy { display: grid; min-width: 0; gap: 2px; font-size: .9rem; }
.file-copy small { color: var(--muted); font-size: .73rem; }
.file-name { color: var(--lime); font-size: .82rem; overflow-wrap: anywhere; }
.file-name:empty { display: none; }
.file-picker.has-file { border-color: var(--lime); }
.file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Game table */
#app[data-screen="table"] { height: 100dvh; display: flex; flex-direction: column; gap: 10px; max-width: 1640px; caret-color: transparent; }
.topbar { flex: none; flex-wrap: nowrap; border-bottom: 1px solid var(--line); min-height: 60px; }
.table-tools { display: flex; align-items: center; margin-inline-start: auto; }
.topbar .exit { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.table-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; padding: 3px; background: var(--well); border: 1px solid var(--line); border-radius: 13px; }
.table-nav button { min-height: 40px; padding: 3px; border-radius: 9px; color: var(--muted); font-size: .88rem; font-weight: 650; line-height: 1.2; }
.table-nav [aria-selected="true"] { color: var(--iris); background: #302b39; }
.bet-panel { align-self: stretch; justify-self: stretch; overflow: auto; padding: clamp(18px, 3vw, 40px); background: var(--panel); border-radius: inherit; }
.bet-panel h2 { margin-bottom: 10px; font-size: 1.15rem; }
.bet-panel p { overflow-wrap: anywhere; }
.game-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(335px, 30%, 440px); grid-template-rows: minmax(0, 1fr); grid-template-areas: 'board controls'; gap: 10px 16px; }
.game-layout[data-phase="playing"] { grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: 'board controls' 'turn controls'; }
.play-area { grid-area: board; }
.game-controls { grid-area: controls; }
.turn-status { grid-area: turn; display: flex; align-items: center; gap: 10px; padding: 9px 14px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-weight: 650; overflow-wrap: anywhere; }
.turn-status::before { content: ''; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--fire); }
.turn-status.my-turn { background: #232e20; border-color: #526849; color: var(--lime); }
.turn-status.my-turn::before { background: currentColor; }
.play-area { --game-ball: clamp(36px, 5.4vh, 51px); position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; container-type: size; border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(ellipse at center, #233e32, #151e1d 72%); }
.board-label { position: absolute; z-index: 7; inset-block-start: 8px; inset-inline: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px; pointer-events: none; }
.board-label #help-open { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); pointer-events: auto; }
.board-clock { display: grid; justify-items: center; gap: 5px; color: #edf2ec; font-size: .84rem; font-weight: 650; line-height: 1.15; }
.board-clock strong { font-size: 1.55rem; font-weight: 800; letter-spacing: -.035em; color: #fff; font-variant-numeric: tabular-nums; }
.center-holder { margin-top: 3px; font-size: .92rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.center-holder + .hot { margin-top: 3px; font-size: .88rem; }
.seat-nav { position: absolute; bottom: 3px; inset-inline: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .81rem; }
.seat-nav button { display: grid; place-items: center; width: 40px; height: 36px; border-radius: 10px; background: var(--surface); }
#prev-seats svg, [dir="rtl"] #next-seats svg { transform: scaleX(-1); }
[dir="rtl"] #prev-seats svg { transform: none; }
.play-area:has(.arena[hidden]) .board-label { display: none; }
@media (min-width: 1000px) {
  [data-platform="web"] .lobby-grid:not(:has(#onboarding)) { max-width: none; }
  .play-area:has(.seat-nav:not([hidden])) .arena { transform: translateY(-14px); }
}
@media (min-width: 1000px) and (max-height: 620px) {
  .play-area:has(.seat-nav:not([hidden])) .arena { transform: none; }
  .seat-nav { justify-content: flex-end; padding-inline-end: 8px; }
  .arena .seat .tm { position: relative; left: 50%; transform: translateX(-50%); width: max-content; white-space: nowrap; }
}
.arena { position: relative; isolation: isolate; width: min(calc(100cqw - 2 * var(--decor-gap, 37px)), calc(100cqh - 112px), 760px); aspect-ratio: 1; --ball: var(--game-ball); }
.arena::before { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed #a993c13f; pointer-events: none; }
.arena.n-small { --seat: clamp(38px, 9cqh, 67px); }
.arena.n-mid { --seat: clamp(34px, 7cqh, 52px); }
.arena.n-large { --seat: clamp(28px, 6cqh, 42px); }
.table { position: absolute; overflow: hidden; inset: 15%; border-radius: 50%; border: 2px solid #c6aa71;
  background: repeating-linear-gradient(38deg, #ffffff05 0 1px, transparent 1px 3px), radial-gradient(circle at 40% 30%, #397d55, #235d42 60%, #123e31);
  box-shadow: 0 0 0 4px #46362b, 0 0 0 7px #866b48, 0 6px 0 8px #302820, 0 14px 24px #080c0966; }
.table::after { content: ''; position: absolute; inset: 5%; border: 1px solid #e6d39b66; border-radius: inherit; pointer-events: none; }
.table-middle { position: absolute; inset: 24% 25%; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; text-shadow: 0 1px 3px #143224; }
.center { display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 100%; max-height: 100%; line-height: 1.2; }
.center .big { overflow-wrap: anywhere; }
.result-bet { margin-top: 4px; color: #fff3cb; font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; }
.center .result-bet { min-height: 1.2em; overflow: auto; pointer-events: auto; }
.center .big, .center .mid { font-size: 1.45rem; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.center .lbl, .dice-wait { color: #e0d7e9; font-size: .8rem; overflow-wrap: anywhere; }
.dice-wait { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.center .lbl:first-child { font-weight: 680; }
.center .hot, .dice-countdown { color: var(--lime); font-weight: 700; }
.dice-countdown { font-size: .83rem; }
.seat { --seat-tone: #383244; --seat-width: max(70px, calc(var(--seat) * 1.55)); position: absolute; left: var(--seat-x); z-index: 4; transform: translate(-50%, -50%); width: var(--seat-width); padding: 0; border-radius: 14px; text-align: center; color: var(--text); }
.seat:nth-of-type(4n+2) { --seat-tone: #303e42; }
.seat:nth-of-type(4n+3) { --seat-tone: #413444; }
.seat:nth-of-type(4n+4) { --seat-tone: #3c3d32; }
.seat .av { position: relative; display: grid; place-items: center; width: var(--seat); height: var(--seat); margin: 0 auto; border: 2px solid #726780; border-radius: 36%; background: var(--seat-tone); box-shadow: 0 3px 0 #131019; font-size: 1.35rem; line-height: 1; transition: transform .15s, border-color .15s, box-shadow .15s; }
.seat .nm, .seat .tm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .nm { margin-top: 5px; font-size: .81rem; font-weight: 650; line-height: 1.16; }
.seat .tm { min-height: 1.1em; margin-top: 1px; font-size: .88rem; font-weight: 550; line-height: 1.12; color: #e2e6df; font-variant-numeric: tabular-nums; white-space: normal; overflow: visible; text-shadow: 0 1px 3px #101812; }
.seat.empty .av { box-shadow: none; background: #24222e; border: 1px dashed #777084; }
.seat.empty .av::before { content: '+'; font: 400 1.25rem var(--body); color: #9d92ab; }
.seat.empty .nm { color: var(--subtle); }
.seat.me .av { outline: 2px solid var(--iris); outline-offset: 3px; }
.seat.holder .av { border-color: var(--fire-light); outline: 2px solid var(--fire); outline-offset: 2px; box-shadow: 0 0 18px #ff7a1a72; }
.seat.holder .nm { color: #ffdfa0; }
.seat.holder .tm { color: var(--fire-light); }
.seat.loser .av { border-color: var(--danger); }
.seat.out .av { opacity: .55; }
.seat.pickable:active .av { transform: scale(.94); }
.seat.target .av, .seat.drop-target .av { border-color: var(--lime); transform: scale(1.09); box-shadow: 0 0 0 3px #d5f8805c; }
.seat.target2 .av { border-color: #95cdff; transform: scale(1.06); box-shadow: 0 0 0 3px #95cdff44; }
.seat.shielded .av { border-style: double; }
.seat .av b { position: absolute; font-size: 11px; line-height: 1; font-weight: 750; border-radius: 20px; }
.seat .rt { right: -6px; top: -6px; padding: 3px 5px; color: #241e25; background: var(--text); }
.seat .rt.fast { background: var(--fire-light); }
.seat .rt.drain { background: #95cdff; }
.seat .sh { left: -6px; top: -6px; font-size: 15px; }
.seat .cc { right: -4px; bottom: -3px; padding: 2px 5px; color: var(--text); background: #3b344b; border: 1px solid #71657b; }
.seat .cc::before { content: ''; display: inline-block; width: 6px; height: 8px; margin-inline-end: 3px; border: 1px solid currentColor; border-radius: 1px; }
.die { display: inline-grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 1px; padding: 3px; width: 22px; height: 22px; border-radius: 5px; background: #fff; vertical-align: middle; }
.die i { border-radius: 50%; }
.die i.on { background: #282830; }
.die.lg { width: 52px; height: 52px; padding: 9px; gap: 3px; border-radius: 12px; }
.die.dim { opacity: .45; }
.die.pending { border: 1px dashed #a6a7b0; background: #fff; }

/* alevli top */
.ball {
  position: absolute; width: var(--ball); height: var(--ball); z-index: 5; pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left .75s cubic-bezier(.2,.8,.2,1), top .75s cubic-bezier(.2,.8,.2,1);
}
.ball .core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, #fff6c8 0%, var(--fire-light) 26%, var(--fire) 56%, var(--ember) 82%, rgba(194,65,12,0) 100%);
  box-shadow: 0 0 16px 6px rgba(255,122,26,.55), 0 0 50px 18px rgba(255,122,26,.22);
  animation: flicker .9s infinite ease-in-out;
}
.ball .flame {
  position: absolute; bottom: 45%; width: 55%; height: 115%; transform-origin: 50% 100%;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: linear-gradient(to top, rgba(255,200,61,.95), rgba(255,122,26,.75) 40%, rgba(255,122,26,0) 92%);
  filter: blur(2.5px); mix-blend-mode: screen; animation: lick 1.1s infinite ease-in-out;
}
.ball .flame.a { left: 22%; }
.ball .flame.b { left: 40%; width: 42%; height: 140%; animation-delay: -.45s; }
.ball .flame.c { left: 58%; width: 38%; height: 100%; animation-delay: -.8s; }
.ball.pop .core { animation: pop .75s ease-out; }
@keyframes flicker { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes lick { 0%, 100% { transform: scaleY(1) skewX(0); } 50% { transform: scaleY(1.3) skewX(7deg); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.ball.blaze .core { box-shadow: 0 0 22px 10px rgba(255,122,26,.7), 0 0 70px 26px rgba(255,80,0,.35); }
.ball.blaze .flame { height: 150%; }
.arena .ball { z-index: 2; }
.arena .ball .flame { bottom: 38%; height: 80%; }
.arena .ball .flame.b { height: 92%; }
.arena .ball .core { box-shadow: 0 0 9px 2px #ff8d3759; }
.arena .ball.pop .core { animation: flicker .75s ease-out; }
.ball.draggable { pointer-events: auto; cursor: grab; touch-action: none; }
.ball.draggable > * { pointer-events: none; }
.ball.dragging { pointer-events: none; cursor: grabbing; transition: none; z-index: 20; }
.table-canvas { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; display: flex; justify-content: center; }
.table-canvas img { width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.canvas-text { position: absolute; inset: 9% 14% auto; text-align: center; color: #fff4cd; font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; opacity: .8; }
.table-canvas i { position: absolute; width: 7px; height: 7px; background: hsl(calc(var(--i) * 29), 85%, 72%); opacity: .6; }
.canvas-confetti i { animation: canvas-fall 3s calc(var(--i) * -.2s) linear infinite; }
.canvas-sparkle i { border-radius: 50%; box-shadow: 0 0 10px #ffe5a4; animation: canvas-glow 2s calc(var(--i) * -.2s) ease-in-out infinite; }
@keyframes canvas-fall { from { transform: translateY(-40px) rotate(0); } to { transform: translateY(100px) rotate(360deg); } }
@keyframes canvas-glow { 50% { opacity: .1; transform: scale(.4); } }
.pass-effect { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible; }
.pass-trajectory { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pass-trajectory path { fill: none; stroke: #ffc83db0; stroke-width: 1; stroke-linecap: round; stroke-dasharray: 130; stroke-dashoffset: 130; animation: pass-streak 1.1s ease-out forwards; }
.effect-magic .pass-trajectory path { stroke: #ce9cff; stroke-dasharray: 2 3; stroke-dashoffset: 0; }
.pass-actor { position: absolute; width: clamp(24px, 10%, 60px); height: clamp(32px, 14%, 80px); transform: translate(-50%,-65%); color: var(--fire-light); }
.pass-actor svg { width: 100%; height: 100%; overflow: visible; }
.kick-leg { transform-origin: 27px 46px; animation: stick-kick .6s ease-out; }
.effect-rocket .pass-actor { animation: rocket-launch .9s ease-out forwards; }
.effect-magic .pass-actor { color: #ce9cff; animation: magic-flash .9s ease-out; }
@keyframes stick-kick { 40% { transform: rotate(-70deg); } }
@keyframes pass-streak { 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes rocket-launch { to { transform: translate(-50%,-180%) rotate(30deg); opacity: 0; } }
@keyframes magic-flash { 50% { filter: drop-shadow(0 0 12px #ce9cff); transform: translate(-50%,-65%) scale(1.3); } }
@keyframes card-deal {
  0% { opacity: 0; transform: translateY(-14px) rotate(12deg) scale(.7); }
  55% { opacity: 1; transform: translateY(-4px) scale(.98); box-shadow: 0 0 24px #ffc83d88; }
  100% { opacity: 1; transform: none; }
}
@keyframes dice-tumble { 50% { transform: rotate(160deg) scale(.7); } 100% { transform: rotate(360deg); } }
@keyframes dice-reveal { from { transform: scale(1.6) rotate(-25deg); } to { transform: none; } }
@keyframes finish-confetti { to { transform: translateY(110dvh) rotate(720deg); } }
@keyframes finish-arrive { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gif-reaction {
  0% { transform: scale(.42); opacity: 0; }
  18% { transform: scale(.94); opacity: 1; }
  78% { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(.72); opacity: 0; }
}


/* Turns, hand, chat and activity */
.game-controls { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
.game-controls > :empty { display: none; }
.actions, .gifbar, .hand, .chat-screen, .results { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.actions { display: grid; gap: 7px; padding: 13px; max-height: 30dvh; overflow: auto; flex: none; }
.actions .hint { text-align: start; line-height: 1.4; }
.actions .hint strong { color: var(--text); }
.actions .btn.big { font-size: 1.04rem; }
#notify { flex: none; }
#notify .btn { min-height: 36px; font-size: .82rem; }
.note { padding: 9px 12px; border-radius: 9px; background: var(--surface); font-size: .82rem; }
#hand, #results, #gifbar { flex: none; max-height: 34%; overflow: auto; scrollbar-width: thin; }
.hand { padding: 12px; }
.hand-head, .gifbar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .875rem; }
.hand-head > span, .gifbar-head > span { font-weight: 700; }
.hand-head .link, .gifbar-head .link { font-size: .78rem; }
.cards, .gif-strip { display: flex; overflow-x: auto; gap: 8px; padding: 9px 3px 5px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.cards { max-width: 100%; flex-wrap: nowrap; overscroll-behavior-x: contain; }
.hand-nav { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.hand-nav button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.hand-nav .ui-icon { width: 16px; }
.hand-nav button:first-child svg, [dir="rtl"] .hand-nav button:last-child svg { transform: rotate(180deg); }
[dir="rtl"] .hand-nav button:first-child svg { transform: none; }
.card { --ink: #d3c0ff; --stock: #3b3448; position: relative; display: flex; flex: 0 0 82px; min-height: 91px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 5px; border: 1px solid color-mix(in srgb, var(--ink) 47%, var(--stock)); border-radius: 10px;
  background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--ink) 14%, var(--stock)), var(--stock) 67%); scroll-snap-align: start; transition: transform .13s; }
.card::before { content: ''; position: absolute; inset: 4px; border: 1px solid color-mix(in srgb, var(--ink) 21%, transparent); border-radius: 7px; pointer-events: none; }
.card .ic { line-height: 1; color: var(--ink); }
.card .cn { font-size: .84rem; line-height: 1.15; font-weight: 670; overflow-wrap: anywhere; }
.card[data-card="x2"], .card[data-card="chain"], .card[data-card="destroy"] { --ink: #ffc098; --stock: #49352e; }
.card[data-card="drain"], .card[data-card="x3"] { --ink: #a3deed; --stock: #2c3d49; }
.card[data-card="shield"] { --ink: #d4f89a; --stock: #354231; }
.card[data-card="clockmix"] { --ink: #ffd497; --stock: #483c2d; }
.card[data-card="drawlock"] { --ink: #aee6cc; --stock: #2c413a; }
.card[data-card="resetpair"] { --ink: #f8b7cc; --stock: #48323f; }
.card[data-order]::after { content: attr(data-order); position: absolute; inset-block-start: 3px; inset-inline-end: 3px; min-width: 17px; border-radius: 6px; background: var(--lime); color: #1a2413; font-size: .72rem; font-weight: 750; }
.card[aria-pressed="true"] { outline: 2px solid var(--lime); outline-offset: 1px; transform: translateY(-3px); }
.card-arriving { animation: card-deal 1.2s cubic-bezier(.16,1,.3,1) both; }
.rules { list-style: none; margin: 6px 0 0; padding: 0; }
.rules li { display: flex; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.rules li > span { color: var(--iris); min-width: 26px; }
.rules strong { color: var(--text); }
.rules .card-icon { width: 23px; height: 23px; }
#card-tooltip { position: fixed; z-index: 35; padding: 10px 13px; max-width: min(285px, calc(100vw - 16px)); border-radius: 10px; background: #eee7fc; color: #241c2f; box-shadow: 0 5px 20px #0006; pointer-events: none; font-size: .84rem; }
.gifbar { padding: 9px 12px; }
.gif-strip { min-width: 0; flex-wrap: nowrap; gap: 3px; padding-block: 4px; margin-bottom: 6px; overscroll-behavior-inline: contain; }
.gif-strip button { display: grid; place-items: center; flex: 0 0 44px; height: 44px; padding: 0; border-radius: 8px; scroll-snap-align: start; }
.gif-strip button:focus-visible { outline-offset: -3px; }
.gif-strip img { display: block; width: 24px; height: 24px; object-fit: contain; }
#gifs-live { position: absolute; inset: 0; display: grid; place-items: center; container-type: size; pointer-events: none; }
#gifs-live:empty { display: none; }
.gif-bubble { display: flex; flex-direction: column; align-items: center; width: min(66cqw, calc(72cqh - 14px), 110px); transition: width .24s; animation: gif-reaction ease-in-out both; }
.gif-bubble.large { width: min(84cqw, calc(87cqh - 14px), 152px); }
.gif-bubble img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gif-bubble figcaption { flex: none; max-width: 100%; margin-top: 2px; font-size: 10px; line-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gif-bubble button { min-height: 0; width: 100%; aspect-ratio: 1; padding: 0; pointer-events: auto; cursor: zoom-in; }
.gif-bubble.large button { cursor: zoom-out; }
.results { padding: 12px; }
.results h2, .log h2 { font-size: 1.15rem; }
.results ol, .log ul { list-style: none; margin: 9px 0 0; padding: 0; }
.results li, .log li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.results .pname, .log li > span { flex: 1; overflow-wrap: anywhere; }
.results .pos, .log time { color: var(--subtle); }
.results .ptime, .log time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.results .loser { color: var(--danger); }
.log { align-self: stretch; justify-self: stretch; padding: clamp(18px, 3vw, 40px); overflow: auto; background: var(--panel); border-radius: inherit; }
.chat-screen { width: 100%; flex: 1; display: flex; flex-direction: column; min-height: 145px; overflow: hidden; }
.chat-screen.collapsed {
  position: fixed; z-index: 12; right: max(22px, calc((100vw - 1592px) / 2), env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: auto; max-width: calc(100% - 32px); min-height: 0; height: auto; overflow: visible; border-radius: 30px; border-color: #bda2ec;
  color: #2b1944; background: #d6befb; box-shadow: 0 4px 20px #09091266; transition: right .22s ease;
}
.chat-screen.collapsed.docked { right: max(8px, calc((100vw - 1620px) / 2), env(safe-area-inset-right)); }
.collapsed .chat-head { justify-content: center; min-height: 48px; padding: 8px 14px; border-radius: inherit; }
.collapsed .chat-count, .collapsed .chat-head > svg { display: none; }
.collapsed #chat-title { gap: 0; }
.collapsed #chat-title svg { color: inherit; width: 23px; height: 23px; }
.collapsed .chat-label { margin-inline-start: 8px; max-width: 14em; overflow: hidden; white-space: nowrap; transition: max-width .22s ease, margin .22s ease; }
.collapsed.docked .chat-label { max-width: 0; margin: 0; }
.collapsed.docked .chat-unread { position: absolute; top: -5px; inset-inline-end: 0; font-size: 0; }
.collapsed.docked .chat-unread::after { content: attr(data-count); font-size: .72rem; }
.game-controls:has(.chat-screen.collapsed) { padding-bottom: 64px; }
.game-layout:not([data-phase="playing"]) .chat-screen.collapsed { position: static; flex: none; align-self: flex-end; max-width: 100%; box-shadow: none; }
.game-layout:not([data-phase="playing"]) .game-controls { padding-bottom: 0; }
#chat-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-screen > h2 { flex: none; margin: 0; }
.chat-head, .chat-compose { display: flex; flex: none; align-items: center; gap: 8px; padding: 10px 12px; }
.chat-head { width: 100%; min-height: 46px; font-size: 1rem; text-align: start; }
.chat-head:focus-visible { outline-offset: -4px; }
.chat-head[aria-expanded="true"] { border-bottom: 1px solid var(--line); }
.chat-head > .ui-icon { width: 16px; transform: rotate(180deg); }
.chat-head[aria-expanded="true"] > .ui-icon { transform: none; }
#chat-title, .sheet-head h2, .cosmetics-sheet h3 { display: flex; align-items: center; gap: 9px; }
#chat-title .ui-icon { color: var(--iris); }
.chat-unread { padding: 2px 7px; border-radius: 20px; background: var(--lime); color: var(--on-lime); font-size: .75rem; }
.chat-count { margin-inline-start: auto; }
.chat-count { gap: 5px; font-size: .78rem; color: var(--muted); }
.chat-count .ui-icon { width: 15px; }
.chat-messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding: 12px; }
.chat-message { width: fit-content; max-width: 88%; padding: 9px 13px; background: #2a2b37; border-radius: 18px; border-end-start-radius: 4px; font-size: .9rem; }
.chat-message.mine { align-self: flex-end; background: #443158; border-end-start-radius: 18px; border-end-end-radius: 4px; }
.chat-message header { display: flex; align-items: center; gap: 16px; justify-content: space-between; color: var(--iris); font-size: .76rem; }
.chat-message time { color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-message p { white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.empty-chat { margin: auto; max-width: 28ch; padding: 8px; font-size: .87rem; }
.empty-chat .ui-icon { width: 27px; height: 27px; color: #a999bf; }
.chat-compose { padding: 8px; border-top: 1px solid var(--line); }
.chat-compose .input, .chat-compose .btn { min-height: 40px; font-size: 1rem; }
#chat-panel > .hint { padding: 6px 12px; }
.dice-theater { position: absolute; inset: 30%; z-index: 7; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; border-radius: 24px; border: 1px solid #7b6792; background: #292233fa; pointer-events: none; text-align: center; }
.dice-theater span { font-size: .87rem; color: var(--iris); }
.dice-tumbling { animation: dice-tumble .45s linear infinite; }
.dice-reveal { animation: dice-reveal .5s ease-out; }
.finish-banner { position: fixed; inset: 0; z-index: 30; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 16px; border: 0; display: grid; place-items: center; overflow: hidden; color: var(--text); background: #11101999; }
.finish-banner:not([open]) { display: none; }
.finish-banner::backdrop { background: transparent; }
.finish-banner > .finish-card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; width: min(420px, calc(100vw - 32px)); text-align: center; padding: 26px 28px 22px; background: #30283c; border: 2px solid var(--iris); border-radius: 20px; box-shadow: 0 15px 80px #13101888; animation: finish-arrive .5s ease-out; }
.finish-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 36%; border: 2px solid var(--fire-light, #ffb35a); background: #3d2a2a; font-size: 2rem; }
.finish-loser { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.finish-card .result-bet { color: var(--muted); overflow-wrap: anywhere; }
.finish-card .btn { margin-top: 6px; }
.finish-banner > i { pointer-events: none; }
.finish-banner strong { font-size: 2.25rem; line-height: 1; color: var(--lime); }
.finish-banner i { position: absolute; top: -20px; width: 8px; height: 15px; background: hsl(calc(var(--i) * 37), 85%, 65%); animation: finish-confetti 2.5s calc(var(--i) * -.05s) ease-in infinite; }

/* Store, personalization and game guide */
dialog.sheet, .help-dialog { width: min(600px, calc(100% - 28px)); max-height: min(82dvh, 820px); margin: auto; padding: 0 20px 20px; color: var(--text); border: 1px solid #595163; border-radius: 22px; background: var(--panel); box-shadow: 0 24px 96px #080810a0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
dialog::backdrop { background: #0a0911bf; }
body:has(dialog[open]) { overflow: hidden; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.sheet-head h2 { font-size: 1.45rem; }
.sheet-head h2 > .ui-icon { color: var(--iris); }
.shop-demo { margin: 12px 0 0; font-size: .84rem; color: var(--muted); }
.shop-body { display: grid; gap: 10px; padding-top: 12px; }
.shop-body > .link { justify-self: start; }
.shop-body .note .row { margin-top: 8px; }
.pack { border-radius: 14px; border: 1px solid var(--line); background: var(--well); overflow: clip; }
.pack-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; }
.pack-art { display: grid; place-items: center; width: 46px; height: 50px; border-radius: 12px; color: #e1cdff; background: #40364f; }
.pack-art .ui-icon { width: 25px; height: 25px; }
.pack-art.custom_gif { color: #b3e5e4; background: #2a4345; }
.pack-art.table_canvas { color: #f3c6e0; background: #483542; }
.pack-art.pass_fx { color: #dbf893; background: #37432e; }
.pack-title { display: grid; gap: 2px; overflow-wrap: anywhere; }
.pack-title strong { font-size: 1.02rem; line-height: 1.18; }
.pack-title small, .price { font-size: .8rem; color: var(--muted); }
.pack-buy { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 6px; max-width: 150px; text-align: end; }
.pack-buy .btn { min-height: 37px; padding: 7px 10px; font-size: .82rem; }
.have { display: inline-flex; align-items: center; gap: 4px; color: var(--lime); font-size: .83rem; }
.have > .ui-icon { width: 14px; height: 14px; }
.pack-details { border-top: 1px solid var(--line); }
.pack-details summary { padding: 8px 12px; color: var(--iris); font-size: .82rem; font-weight: 650; }
.pack-details summary .ui-icon { width: 15px; height: 15px; }
.pack-content { display: grid; gap: 8px; padding: 4px 12px 14px; font-size: .86rem; color: var(--muted); }
.pack-gallery { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); }
.pack-gallery img, .admin-gifs img { object-fit: contain; }
.content-tags { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0; padding: 0; }
.content-tags li { border-radius: 8px; background: var(--surface); padding: 3px 8px; color: var(--text); }
.cosmetics-sheet section { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cosmetics-sheet section:last-child { border: 0; }
.cosmetics-sheet h3 { font-size: 1.07rem; }
.cosmetics-sheet h3 .ui-icon { color: var(--iris); }
.style-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.style-options button { display: flex; align-items: center; gap: 8px; text-align: start; min-height: 46px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.style-options button[aria-pressed="true"] { color: var(--lime); border-color: var(--lime); background: #283320; }
.owned-feature { display: inline-flex; gap: 5px; align-items: center; color: var(--lime); font-size: .82rem; }
.cosmetics-sheet .link { justify-self: start; }
.cosmetics-sheet .note .link { margin-inline-start: 4px; }
.canvas-visibility { font-size: .87rem; }
.canvas-visibility input { accent-color: var(--lime); }
.help-dialog { width: min(700px, calc(100% - 28px)); }
.help-dialog > p { margin: 12px 0; }
.help-dialog details { border-top: 1px solid var(--line); }
.help-dialog summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 8px 0; font-weight: 650; }
.help-dialog summary::after { content: '+'; margin-inline-start: 10px; color: var(--iris); font-size: 1.2rem; }
.help-dialog details[open] > summary::after { content: '−'; }
.help-dialog details > p { color: var(--muted); margin-bottom: 12px; font-size: .92rem; }
@media (hover: hover) {
  .btn:not(:disabled):hover, .tool:hover, .avatars label:hover :not(:checked) + span, .modes button:hover, .games-list button:hover, .lobby-tabs button:hover { border-color: #9486a4; }
  .btn.primary:not(:disabled):hover { background: #e5ffa6; border-color: #e5ffa6; }
  .link:hover { color: var(--text); }
  .file-picker:hover { border-color: var(--iris); background: #322a3d; }
  .seat.pickable:hover .av { border-color: var(--iris); }
  .pack-details summary:hover { background: #26222e; }
}

/* Adapt table geometry and control density to the available space. */
@media (max-width: 999px) {
  #app { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  #app[data-screen="table"] { height: auto; min-height: 100dvh; max-width: 800px; }
  .game-layout { display: flex; flex-direction: column; flex: none; gap: 13px; }
  .play-area { container-type: inline-size; --game-ball: clamp(32px, 9vw, 43px); }
  .board-label { position: static; justify-self: stretch; padding: 9px 9px 0; }
  .arena { width: min(calc(100% - 14px), 510px); margin: 30px auto 40px; }
  .seat { left: clamp(calc(var(--seat-width) / 2 - 4px), var(--seat-x), calc(100% - var(--seat-width) / 2 + 4px)); }
  .arena.n-small { --seat: clamp(40px, 11cqw, 61px); }
  .arena.n-mid { --seat: clamp(34px, 9cqw, 52px); }
  .arena.n-large { --seat: clamp(28px, 7cqw, 40px); }
  .play-area:has(.seat-nav:not([hidden])) .arena { margin-bottom: 72px; }
  .game-controls { height: auto; overflow: visible; }
  .actions, #gifbar, #hand, #results { max-height: none; overflow: visible; }
  .chat-screen { flex: none; height: clamp(265px, 43dvh, 420px); }
  .hand-nav button { width: 44px; height: 44px; }
  .card { flex-basis: 90px; min-height: 98px; }
  .chat-compose .input, .chat-compose .btn { min-height: 44px; font-size: 1rem; }
  .log, .bet-panel { max-height: 470px; min-height: 200px; }
  .table-nav button, .pack-details summary { min-height: 44px; }
  .sheet input, .sheet select { font-size: 1rem; }
}
@media (max-width: 759px) {
  #app { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .masthead { min-height: 60px; gap: 8px; }
  .brand { font-size: 1.55rem; gap: 6px; }
  .brand-mark { width: 44px; height: 44px; }
  .toolbar { gap: 4px; }
  .toolbar .tool { min-height: 42px; }
  .hero { min-height: 168px; border-radius: 18px; }
  .hero-copy { padding: 19px; width: 63%; }
  .hero h1 { margin: 9px 0; font-size: clamp(1.95rem, 5.9vw, 3rem); }
  .hero p { font-size: .86rem; }
  .key-art { width: 40%; }
  .art-card { width: clamp(46px, 9vw, 65px); }
  .hero .demo-ball .ball { --ball: clamp(34px, 7vw, 48px); }
  .art-die { right: 10%; bottom: 17%; }
  .art-die .die { width: 29px; height: 29px; border-radius: 6px; padding: 6px; gap: 2px; }
  .hero-facts { gap: 7px; font-size: .71rem; }
  .hero-facts .chip { font-size: .68rem; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: 'profile' 'play' 'tools'; gap: 10px; margin-top: 11px; }
  .profile-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .profile-title { margin: 0; align-self: end; align-items: center; }
  .profile-title h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .profile-panel .avatar-picker { grid-column: 1 / -1; margin: 0; }
  .stepper button { min-width: 44px; }
  .lobby-tabs { margin-bottom: 14px; }
  .lobby-tabs button { min-height: 44px; }
  dialog.sheet, .help-dialog { max-height: calc(100dvh - env(safe-area-inset-top) - 18px); margin: auto auto max(6px, env(safe-area-inset-bottom)); width: calc(100% - 12px); border-radius: 19px; padding: 0 14px max(14px, env(safe-area-inset-bottom)); }
  .shop-demo { font-size: .8rem; }
  .pack-row { gap: 8px; }
  .pack-buy { max-width: 94px; }
  .pack-art { width: 36px; height: 42px; }
  .pack-buy .btn, .file-picker { min-height: 44px; }
}
@media (max-width: 480px) {
  .masthead .language { position: relative; justify-content: center; width: 42px; min-height: 42px; padding: 0; }
  .language .ui-icon { display: none; }
  .language-code { display: block; font-size: .76rem; font-weight: 700; }
  .language select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
  .language:focus-within { outline: 3px solid var(--iris); outline-offset: 2px; }
  .hero-copy { width: 65%; padding: 16px; }
  .hero p { font-size: .8rem; }
  .hero-facts .chip { padding: 1px 6px; }
  .key-art { width: 37%; }
  .card-rear { left: 8%; top: 16%; }
  .card-front { left: 19%; top: 40%; }
  .hero .demo-ball { top: 39%; left: 72%; }
  .art-die { right: 16%; bottom: 14%; }
  .lobby-play, .profile-panel { padding: 13px; }
  .lobby-tabs { gap: 1px; }
  .lobby-tabs button { gap: 4px; font-size: .81rem; }
  .lobby-tabs .ui-icon { display: none; }
  .modes button { padding-inline: 8px; gap: 6px; }
  .modes .ui-icon { width: 16px; height: 16px; }
  .form-pair { gap: 10px; }
  .stepper button { min-width: 34px; }
  .input { padding-inline: 10px; }
  .topbar { gap: 2px; }
  .dice-theater { inset: 25%; }
}
@media (max-width: 359px) {
  .arena { margin-top: 44px; }
  .masthead .brand-mark { display: block; }
  .topbar .brand-mark { width: 40px; height: 40px; }
  .topbar .brand span { display: none; }
  .masthead .shop-link { padding-inline: 8px; }
  .masthead .shop-link span { display: none; }
  .masthead .shop-link { min-width: 39px; }
  .pack-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pack-art { display: none; }
}
@media (min-width: 1000px) and (max-height: 800px) {
  .hero { min-height: clamp(156px, calc(100dvh - 560px), 220px); }
  .hero-copy { padding-block: 18px; }
  .art-card { max-width: 88px; }
}
@media (min-width: 1000px) and (max-height: 540px) {
  #app[data-screen="table"] { height: auto; min-height: 100dvh; }
  .game-layout { min-height: 460px; }
}
:lang(ar) *, :lang(hi) *, :lang(bn) * { letter-spacing: normal; }
[dir="rtl"] .btn.primary > .ui-icon:last-child, [dir="rtl"] .games-list button > .ui-icon:last-child { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .gif-bubble { opacity: 1; transform: none; }
  .pass-effect, .finish-banner i { display: none; }
  .card-arriving { outline: 2px solid var(--lime); }
}

.block-choice { display: grid; gap: 5px; margin-top: 8px; color: var(--muted); font-size: .86rem; }
.aid-offer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; border: 1px solid #73824a; border-radius: 14px; background: #263322; }
.aid-offer > div { display: flex; align-items: center; gap: 8px; }
.aid-offer svg, .aid-offer time { color: var(--lime); }
.aid-offer time { font-variant-numeric: tabular-nums; }
.aid-offer .btn { min-height: 40px; }
@media (min-width: 1000px) { .game-layout[data-phase="playing"] .arena { width: min(calc(100cqw - 2 * var(--decor-gap, 37px)),calc(100cqh - 148px),760px); } }
@media (min-width: 1000px) and (max-height: 620px) {
  .game-layout[data-phase="playing"] .arena { width: min(calc(100cqw - 2 * var(--decor-gap, 37px)),calc(100cqh - 96px),760px); }
  .seat-nav { inset-inline-start: auto; }
}
@media (max-width: 999px) { .game-layout[data-phase="playing"] .arena { margin-block-start: 56px; } }

/* Web oyun alanı süsü: geniş masaüstü ekranda keçe zemin, yörüngeler, kaidede top ve deste. Mobil ve dar ekranda yok. */
.board-decor { display: none; }
@media (min-width: 1000px) {
  .play-area { background: radial-gradient(ellipse 70% 80% at 50% 48%, #1f5b3d 0%, #17432f 42%, #102a21 72%, #0c1a16 100%); }
  @container (min-width: 820px) and (min-aspect-ratio: 11/10) {
    .arena, .board-decor { --decor-gap: clamp(150px, 19cqw, 320px); }
    .board-decor { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
    .decor-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid #c8e8cf14; border-radius: 50%; transform: translate(-50%, -50%) rotate(-8deg); }
    .decor-orbit.o1 { width: 112cqw; height: 78cqh; }
    .decor-orbit.o2 { width: 84cqw; height: 58cqh; border-style: dashed; border-color: #d7b98a1c; transform: translate(-50%, -50%) rotate(6deg); }
    .decor-spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffb257; box-shadow: 0 0 8px 2px #ff8a2a99; opacity: .75; animation: decor-twinkle 3.2s ease-in-out infinite; }
    .decor-spark.s1 { left: 13%; top: 14%; } .decor-spark.s2 { right: 9%; top: 19%; animation-delay: -1s; }
    .decor-spark.s3 { left: 6%; bottom: 22%; animation-delay: -2s; } .decor-spark.s4 { right: 14%; bottom: 9%; animation-delay: -.6s; }
    .decor-spark.s5 { left: 24%; top: 6%; width: 3px; height: 3px; animation-delay: -1.6s; } .decor-spark.s6 { right: 24%; bottom: 4%; width: 3px; height: 3px; animation-delay: -2.4s; }
    .decor-pedestal, .decor-deck, .decor-dice { position: absolute; top: 50%; width: calc(var(--decor-gap) * .78); transform: translate(-50%, -50%); }
    .decor-pedestal { left: calc(var(--decor-gap) / 2 + 6px); display: grid; justify-items: center; }
    [dir="rtl"] .decor-pedestal { left: auto; right: calc(var(--decor-gap) / 2 + 6px); transform: translate(50%, -50%); }
    .decor-base { position: relative; display: block; width: 100%; aspect-ratio: 3.2; margin-top: -8%; border-radius: 50%;
      background: radial-gradient(ellipse 60% 45% at 50% 38%, #ffb35a 0%, #a2541c 34%, #3b2a20 60%, #1d1714 100%);
      box-shadow: 0 6px 0 #2a201a, 0 10px 0 #151110, 0 18px 30px #000a, 0 0 46px #ff7a1a40; }
    .decor-base::after { content: ''; position: absolute; inset: 14% 12% 30%; border-radius: 50%; border: 1px solid #ffc98055; }
    .decor-ball { position: relative; z-index: 1; height: calc(var(--decor-gap) * .52); }
    .decor-ball .ball { --ball: calc(var(--decor-gap) * .42); position: relative; left: 0; top: 0; transform: none; }
    .game-layout:is([data-phase="playing"], [data-phase="finished"]) .decor-ball { visibility: hidden; }
    .decor-ball .ball .flame { bottom: 40%; height: 78%; } .decor-ball .ball .flame.b { height: 92%; }
    .decor-deck { left: calc(100% - var(--decor-gap) / 2 - 6px); height: calc(var(--decor-gap) * .9); }
    [dir="rtl"] .decor-deck { left: auto; right: calc(100% - var(--decor-gap) / 2 - 6px); transform: translate(50%, -50%); }
    .decor-card { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52%; aspect-ratio: 5 / 7; border-radius: 13%;
      border: 3px solid #d6a861; background: radial-gradient(circle at 50% 40%, #6d4ea6, #3a2a5e 75%); color: #c7a8ff;
      box-shadow: inset 0 0 0 3px #2b1f45, 0 10px 22px #0009; }
    .decor-card svg { width: 46%; fill: currentColor; filter: drop-shadow(0 0 8px #a982ff); }
    .decor-card.c1 { transform: translate(-82%, -46%) rotate(-14deg); opacity: .8; }
    .decor-card.c2 { transform: translate(-58%, -50%) rotate(-5deg); opacity: .9; }
    .decor-card.c3 { transform: translate(-30%, -52%) rotate(7deg); }
    .decor-dice { left: calc(100% - var(--decor-gap) / 2 - 6px); display: flex; justify-content: center; gap: 14%; }
    [dir="rtl"] .decor-dice { left: auto; right: calc(100% - var(--decor-gap) / 2 - 6px); transform: translate(50%, -50%); }
    .decor-dice .die { width: calc(var(--decor-gap) * .26); height: calc(var(--decor-gap) * .26); padding: 9%; gap: 3px; border-radius: 18%; background: #fff; box-shadow: 2px 3px #d4d5db, 4px 6px #a9aab4, 8px 14px 14px #0008; transform: rotate(-12deg); }
    .decor-dice .die + .die { transform: rotate(14deg) translateY(30%); }
    .decor-dice .die i.on { background: #282830; }
  }
}
@keyframes decor-twinkle { 50% { opacity: .2; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) { .decor-spark { animation: none; } }

/* Reklam alanları (AdSense). Etiket her zaman görünür; oyun düğmelerinden ayrı durur ki yanlışlıkla tıklanmasın. */
.ad-slot { position: relative; display: grid; gap: 3px; min-width: 0; }
.ad-slot[hidden] { display: none; }
.ad-label { font-size: .62rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.ad-preview { display: grid; place-items: center; align-content: center; gap: 1px; height: 100%; padding: 4px 8px; border: 1px dashed #6d6680; border-radius: 10px; background: repeating-linear-gradient(135deg, #ffffff05 0 8px, transparent 8px 16px), var(--well); color: var(--muted); font-size: .8rem; font-weight: 650; text-align: center; line-height: 1.2; }
.ad-preview small { font-weight: 500; font-size: .7rem; color: var(--subtle); font-variant-numeric: tabular-nums; }
/* Üst başlık: logo ile araç düğmeleri arasındaki boşlukta ince bant; kenarlardan boşluklu */
.masthead > .ad-header { flex: 1 1 0; max-width: 468px; height: 60px; margin-inline: auto; grid-template-rows: 1fr; }
.ad-header .ad-label { position: absolute; z-index: 1; inset-block-start: 3px; inset-inline-start: 8px; font-size: .55rem; }
.ad-header .ad-preview, .ad-header ins { height: 60px; }
.topbar > .ad-header { height: 50px; } .topbar > .ad-header .ad-preview { height: 50px; }
/* Web, geniş ekran: sayfanın iki yanındaki boş alan */
.ad-side { display: none; }
@media (min-width: 1700px) {
  .ad-side:not([hidden]) { display: grid; position: fixed; top: 120px; width: 160px; height: 620px; }
  .ad-side .ad-preview, .ad-side ins { height: 600px; }
  .ad-left { left: calc((100vw - 1328px) / 4 - 80px); }
  .ad-right { right: calc((100vw - 1328px) / 4 - 80px); }
}
/* Lobi sayfasının altı: yalnız mobil */
.lobby-grid > .ad-slot { grid-column: 1 / -1; }
.ad-lobby .ad-preview, .ad-lobby ins { min-height: 100px; }
@media (min-width: 760px) { .ad-lobby { display: none !important; } }
/* Masa: sohbetin altında ince; sohbet açılınca doğal olarak aşağı kayar */
.ad-table { margin-block-start: 8px; }
.ad-table .ad-preview, .ad-table ins { min-height: 60px; }
@media (max-width: 999px) { .ad-table { margin-inline: 4px; } .ad-table .ad-preview, .ad-table ins { min-height: 100px; } }
@media (max-width: 759px) {
  .masthead > .ad-header, .topbar > .ad-header { flex: 1 1 0; min-width: 0; height: 44px; margin-inline: 10px; }
  .ad-header .ad-preview, .ad-header ins, .topbar > .ad-header .ad-preview { height: 44px; }
  .ad-header .ad-preview span { display: none; }
  .ad-lobby { margin-inline: 4px; }
}

/* Banner: daha kısa, "Masayı kur" ilk ekranda görünsün. Web: başlık 40px, metin 16px. Mobil: başlık 24px, demo etiketi yok. */
@media (min-width: 760px) {
  .hero { min-height: 0; }
  .hero-copy { padding-block: 20px; }
  .hero h1 { margin: 8px 0 6px; font-size: 40px; }
  .hero p { font-size: 16px; }
  .hero .key-art { transform: scale(.82); transform-origin: right center; }
  [dir="rtl"] .hero .key-art { transform-origin: left center; }
}
@media (max-width: 759px) {
  .hero { min-height: 0; }
  .hero-copy { padding-block: 14px; }
  .hero h1 { margin: 6px 0; font-size: 24px; }
  .hero-facts .chip.demo { display: none; }
}

/* Hesap: gizlilik bağlantısı ve hesap silme onayı */
.account-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.link.danger { color: #ff9a8a; }
dialog.confirm-sheet { width: min(460px, calc(100% - 28px)); }
.confirm-text { margin: 16px 0; color: var(--muted); line-height: 1.5; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.btn.danger { color: #fff; background: #b4362a; border-color: #d1584a; }
