/* Sudoku — o'yin ko'rinishi. Taxta o'lchami JS da butun pikselga yaxlitlanadi (--cs), shuning uchun chiziqlar doim tiniq. */
:root, :root[data-theme="dark"] {
  --bd-thick: #717a8a; --bd-thin: #2b303c; --cell: #151922; --cell-peer: #1e2331; --cell-same: #174048; --cell-sel: #1a5a60; --cell-bad: #3d1b24;
  --dg-given: #f1f3f7; --dg-entry: #4edccf; --dg-bad: #ff7083; --dg-note: #8e97aa; --key: #1b1f2a; --key-hi: #252a38;
  --ca: #5ba8ff; --cb: #f2b84b; --hl-reg: #1f2a33; --hl-foc: #1b4a50; --hl-tgt: #164b33; --hl-hatch: rgba(255,255,255,.07); --hl-blk: #3b3019; --hl-a: #1b3454; --hl-b: #463a1c; --hl-e: #3f1f2a;
}
:root[data-theme="light"] {
  --bd-thick: #39404e; --bd-thin: #d3d7e0; --cell: #ffffff; --cell-peer: #edf0f6; --cell-same: #cff3ee; --cell-sel: #9fe7df; --cell-bad: #fde4e8;
  --dg-given: #14181f; --dg-entry: #08776e; --dg-bad: #d3263e; --dg-note: #626b80; --key: #ffffff; --key-hi: #e8ebf1;
  --ca: #1f6fd6; --cb: #b57a06; --hl-reg: #e9f3f2; --hl-foc: #c9f0eb; --hl-tgt: #c8f1d8; --hl-hatch: rgba(15,20,30,.09); --hl-blk: #fbe9c0; --hl-a: #d6e6fb; --hl-b: #fbecc8; --hl-e: #fbdde2;
}
html, body { height: 100%; }
body.ingame { overflow: hidden; overscroll-behavior: none; }
.view[hidden] { display: none; }

/* ---------- menyu */
.m-page { max-width: 640px; margin: 0 auto; padding: 14px max(14px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); display: grid; gap: 22px; }
.m-sec { display: grid; gap: 10px; }
.m-head { display: flex; align-items: baseline; gap: 10px; }
.m-head h2 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -.015em; }
.m-head small { color: var(--mut); font-size: 13px; font-variant-numeric: tabular-nums; }
.m-head .gu-sp { flex: 1; }
.m-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--acc-text); font-weight: 650; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.m-link svg { width: 16px; height: 16px; }
.m-resume { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r); border: 1px solid transparent; background: var(--acc); color: var(--acc-ink); cursor: pointer; text-align: left; transition: transform .08s, filter .15s; }
.m-resume:hover { filter: brightness(1.06); }
.m-resume:active { transform: scale(.99); }
.m-resume svg.ic { width: 24px; height: 24px; justify-self: center; }
.m-resume b { display: block; font-size: 15.5px; font-weight: 750; }
.m-resume small { display: block; font-size: 13px; opacity: .78; font-variant-numeric: tabular-nums; }
.m-resume .thumb { width: 44px; height: 44px; }
.d-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-tile { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sur); cursor: pointer; transition: border-color .15s, background .15s, transform .08s; min-width: 0; }
.d-tile:hover { border-color: var(--line2); background: var(--sur2); }
.d-tile:active { transform: scale(.985); }
.d-tile b { font-size: 14.5px; font-weight: 700; }
.d-tile small { font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.d-tile.done small { color: var(--acc-text); font-weight: 650; }
.d-tile .tt { display: block; width: min(100%, 92px); }
.d-tile .thumb { width: 100%; height: auto; }
.d-tile .tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); }
.d-tile .tick svg { width: 13px; height: 13px; stroke-width: 3; }
.thumb { display: block; color: var(--mut); }
.thumb .bg { fill: var(--sur3); }
.thumb .cl { fill: currentColor; opacity: .9; }
.thumb .en { fill: var(--acc-text); }
.g-rows { display: grid; gap: 8px; }
.g-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 9px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sur); text-align: left; cursor: pointer; text-decoration: none; color: var(--fg); transition: border-color .15s, background .15s, transform .08s; }
.g-row:hover { border-color: var(--line2); background: var(--sur2); }
.g-row:active { transform: scale(.99); }
.g-row b { display: block; font-size: 15.5px; font-weight: 700; }
.g-row small { display: block; color: var(--mut); font-size: 13px; line-height: 1.32; }
.g-row .end { color: var(--mut); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.g-row .end em { display: block; font-style: normal; color: var(--acc-text); font-weight: 650; }
.g-row .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sur2); color: var(--acc-text); }
.g-row .ic svg { width: 19px; height: 19px; }
.lvl { display: flex; align-items: flex-end; justify-content: center; gap: 2.5px; height: 24px; }
.lvl i { width: 4px; border-radius: 1.5px; background: var(--sur3); }
.lvl i:nth-child(1) { height: 8px; } .lvl i:nth-child(2) { height: 12px; } .lvl i:nth-child(3) { height: 16px; } .lvl i:nth-child(4) { height: 20px; } .lvl i:nth-child(5) { height: 24px; }
.lvl i.on { background: var(--acc-text); }
.m-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13.5px; color: var(--mut); }
.m-links a { color: var(--mut); }

/* ---------- o'yin ekrani: joylashuv JS sinflari bilan (portrait / two tall / two short) */
#game { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); grid-template-areas: "top" "duel" "board" "side"; justify-items: center; height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); background: var(--bg); }
#game[hidden] { display: none; }
#game.two { grid-template-rows: auto auto minmax(0, 1fr); justify-content: center; justify-items: stretch; }
#game.two.tall { grid-template-columns: auto 340px; column-gap: 28px; grid-template-areas: "top top" "duel duel" "board side"; }
#game.two.short { grid-template-columns: auto minmax(0, 420px); column-gap: 14px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "board top" "board duel" "board side"; }
.g-top { grid-area: top; display: flex; align-items: center; gap: 2px; width: 100%; height: 50px; padding: 0 6px; }
.g-top .gu-sp { flex: 1; min-width: 4px; }
.g-title { display: grid; min-width: 0; line-height: 1.18; padding-left: 2px; }
.g-title b { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-title small { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.g-title small .warn { color: var(--dg-bad); font-weight: 650; }
.g-clock { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; padding: 0 6px; }
.g-clock.low { color: var(--dg-bad); }
.g-board { grid-area: board; position: relative; padding: 0 4px; align-self: start; }
#game.two .g-board { padding: 8px 0 8px 8px; align-self: center; }
#game.two.tall .g-board { padding: 8px 0; align-self: start; }
.g-side { grid-area: side; position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; width: 100%; max-width: 560px; min-height: 0; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
#game.two .g-side { max-width: none; justify-content: flex-end; padding: 4px 8px calc(8px + env(safe-area-inset-bottom)) 0; }
#game.two.tall .g-side { justify-content: flex-start; padding: 8px 0 8px; gap: 10px; }

/* taxta */
#board { --cs: 38px; --thin: 1px; --thick: 2px; display: grid; grid-template-columns: repeat(3, auto); gap: var(--thick); padding: var(--thick); width: max-content; background: var(--bd-thick); border-radius: 5px; touch-action: none; }
.bx { display: grid; grid-template-columns: repeat(3, var(--cs)); grid-auto-rows: var(--cs); gap: var(--thin); background: var(--bd-thin); }
.c { position: relative; display: block; width: var(--cs); height: var(--cs); margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--cell); color: var(--dg-given); font: inherit; font-size: calc(var(--cs) * .6); font-weight: 500; line-height: var(--cs); text-align: center; cursor: pointer; font-variant-numeric: tabular-nums; outline: none; transition: background-color .1s; }
.c.e { color: var(--dg-entry); font-weight: 500; }
.c.g { font-weight: 600; }
.c.peer { background: var(--cell-peer); }
.c.same { background: var(--cell-same); }
.c.sel { background: var(--cell-sel); }
.c.bad { color: var(--dg-bad); background: var(--cell-bad); }
.c.bad.sel { box-shadow: inset 0 0 0 2px var(--dg-bad); }
.c.clash { background: var(--cell-bad); }
.c.pend { opacity: .45; }
@media (hover: hover) { .c:hover { box-shadow: inset 0 0 0 1px var(--line2); } }
.c .v { position: relative; z-index: 1; }
.c .n { position: absolute; inset: 1px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); pointer-events: none; }
.c .n span { display: grid; place-items: center; font-size: max(9px, calc(var(--cs) * .265)); font-weight: 600; line-height: 1; color: var(--dg-note); border-radius: 3px; }
.c .n span.h { color: var(--dg-given); background: var(--cell-same); }
.c.sel .n span { color: var(--dg-given); }
/* yordam belgilari */
.c.hr { background: var(--hl-reg); }
.c.hf { background: var(--hl-foc); }
.c.ht { background: var(--hl-tgt); box-shadow: inset 0 0 0 2px var(--green); color: var(--green); }
.c.ht .v { opacity: .85; }
.c.hb { background: var(--hl-blk); color: var(--dg-given); }
.c.hh { background-image: repeating-linear-gradient(45deg, var(--hl-hatch) 0 3px, transparent 3px 7px); }
.c.hx { box-shadow: inset 0 0 0 2px var(--dg-bad); }
.c.ta { background: var(--hl-a); }
.c.tb { background: var(--hl-b); }
.c.he { background: var(--hl-e); }
.c .n span.k { color: var(--acc-ink); background: var(--acc); }
.c .n span.a { color: #fff; background: var(--ca); }
.c .n span.b { color: #1a1305; background: var(--cb); }
.c .n span.x { color: #fff; background: var(--red); text-decoration: line-through; }
#overlay { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 3; }
#overlay .s { stroke: var(--acc-text); stroke-width: 1.75; fill: none; stroke-linecap: round; opacity: .8; }
#overlay .w { stroke: var(--cb); stroke-width: 1.75; fill: none; stroke-dasharray: 4 4; stroke-linecap: round; opacity: .9; }
#overlay .r { stroke: var(--cb); stroke-width: 2; fill: none; stroke-linecap: round; opacity: .6; }
#veil { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 10px; background: var(--sur); border: 2px solid var(--line2); border-radius: 6px; color: var(--mut); cursor: pointer; }
#veil[hidden] { display: none; }
#veil svg { width: 46px; height: 46px; color: var(--fg); }
#veil b { color: var(--fg); font-size: 17px; }
/* tugash to'lqini: sokin, konfettisiz */
@keyframes s-wave { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(1.09); filter: brightness(1.5); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes s-flash { 40% { background-color: var(--cell-same); } }
.c.wave { animation: s-wave .52s ease both; z-index: 2; }
.c.flash { animation: s-flash .46s ease both; }
@keyframes s-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.c.shake { animation: s-shake .18s ease 2; }
@keyframes s-pop { 0% { transform: scale(.7); opacity: .3; } 100% { transform: scale(1); opacity: 1; } }
.c .v.pop { display: inline-block; animation: s-pop .14s ease both; }

/* asboblar va raqamlar */
.g-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: none; }
.tool { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; height: 54px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--fg); cursor: pointer; font-size: 11.5px; font-weight: 600; line-height: 1.15; transition: background .12s, color .12s, opacity .12s; }
.tool svg { width: 22px; height: 22px; }
.tool:hover { background: var(--sur); }
.tool:active { background: var(--sur2); }
.tool:disabled { opacity: .32; cursor: default; background: transparent; }
.tool[aria-pressed="true"] { color: var(--acc-text); background: var(--glow); }
.g-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: minmax(46px, 74px); gap: 6px; flex: 0 1 auto; }
#game.two.tall .g-pad { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 84px; gap: 8px; }
#game.two.tall .key { font-size: 31px; }
#game.two.tall .key.er { grid-column: span 3; height: 56px; font-size: 12px; }
#game.two.short .g-pad { grid-auto-rows: minmax(40px, 60px); }
#game.two.short .tool { height: 46px; font-size: 10.5px; }
.key { position: relative; display: grid; place-items: center; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--key); color: var(--fg); font-size: 26px; font-weight: 550; line-height: 1; cursor: pointer; font-variant-numeric: tabular-nums; box-shadow: 0 1px 0 var(--shadow); transition: background .1s, border-color .1s, opacity .15s, transform .06s; }
.key:hover { background: var(--key-hi); }
.key:active { transform: translateY(1px); background: var(--key-hi); }
.key small { position: absolute; right: 7px; bottom: 4px; font-size: 11px; font-weight: 650; color: var(--mut); }
.key.full { opacity: .28; }
.key.full small { display: none; }
.key[aria-pressed="true"] { background: var(--acc); border-color: transparent; color: var(--acc-ink); }
.key[aria-pressed="true"] small { color: var(--acc-ink); opacity: .75; }
.key.note { color: var(--acc-text); font-size: 21px; }
.key.note[aria-pressed="true"] { color: var(--acc-ink); }
.key.er { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--mut); }
.key.er svg { width: 21px; height: 21px; }
.g-keys { display: none; margin: auto 0 0; color: var(--mut); font-size: 12.5px; line-height: 1.5; }
#game.two.tall .g-keys { display: block; }
.g-keys kbd { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line2); background: var(--sur); font: inherit; font-size: 11.5px; font-weight: 650; text-align: center; color: var(--fg); }

/* yordam paneli: raqamlar ustiga tushadi — taxta qimirlamaydi */
.g-hint { position: absolute; left: 8px; right: 8px; bottom: calc(6px + env(safe-area-inset-bottom)); min-height: var(--ctl-h, 170px); max-height: calc(100% - 12px); z-index: 6; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line2); background: var(--sur); box-shadow: 0 10px 34px var(--shadow); animation: gu-rise .16s ease; }
.g-hint[hidden] { display: none; }
#game.two.tall .g-hint { left: 0; right: 0; top: 8px; bottom: auto; max-height: calc(100% - 16px); }
#game.two.short .g-hint { left: 0; right: 8px; }
.hp-top { display: flex; align-items: center; gap: 8px; flex: none; }
.hp-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--glow); color: var(--acc-text); flex: none; }
.hp-ic svg { width: 16px; height: 16px; }
.hp-top b { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; min-width: 0; line-height: 1.15; }
.hp-st { display: inline-flex; gap: 4px; margin-left: auto; flex: none; }
.hp-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--sur3); }
.hp-st i.on { background: var(--acc-text); }
.hp-top .gu-tb { width: 34px; height: 34px; flex: none; margin: -4px -6px -4px 0; }
.hp-txt { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; font-size: 14.5px; line-height: 1.42; color: var(--fg); -webkit-user-select: text; user-select: text; }
#game.two.tall .hp-txt { font-size: 15.5px; line-height: 1.5; }
.hp-txt b { font-weight: 750; white-space: nowrap; }
.hp-btns { display: flex; align-items: center; gap: 10px; flex: none; margin-top: auto; }
.hp-more { font-size: 13px; font-weight: 600; color: var(--acc-text); text-decoration: none; min-width: 0; line-height: 1.2; }
.hp-btns .gu-btn { margin-left: auto; min-height: 42px; padding: 0 20px; }

body.ingame .gu-toast { bottom: auto; top: calc(58px + env(safe-area-inset-top)); }

/* duel paneli */
.g-duel { grid-area: duel; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 560px; padding: 0 10px 6px; }
#game.two .g-duel { padding: 0 8px 6px 0; max-width: none; }
.g-duel[hidden] { display: none; }
.dp-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); line-height: 1.3; white-space: nowrap; min-width: 0; }
.dp-h span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp-h b { margin-left: auto; color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 700; }
.dp i { display: block; height: 5px; margin-top: 3px; border-radius: 3px; background: var(--sur3); overflow: hidden; }
.dp u { display: block; height: 100%; width: 0; background: var(--acc-text); border-radius: 3px; transition: width .25s ease; text-decoration: none; }
.dp.op u { background: var(--mut); }
.pips { display: inline-flex; gap: 3px; flex: none; }
.pips i { display: block; width: 6px; height: 6px; margin: 0; border-radius: 50%; background: var(--sur3); }
.pips i.on { background: var(--dg-bad); }
.dp .off { color: var(--amber); }

/* oynalar */
.r-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 8px; }
.r-grid > div { background: var(--sur2); border-radius: 11px; padding: 9px 10px; min-width: 0; }
.r-grid small { display: block; font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-grid b { font-size: 19px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.r-note { margin: 0 0 6px; font-size: 14px; color: var(--mut); }
.r-note b { color: var(--fg); }
.r-note.best { color: var(--acc-text); font-weight: 650; }
.r-rank { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 10px 12px; border-radius: 11px; background: var(--sur2); font-size: 14px; }
.r-rank svg { width: 18px; height: 18px; color: var(--acc-text); flex: none; }
.r-rank.off { color: var(--mut); }
.r-rank small { display: block; font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 2px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-size: 14.5px; cursor: pointer; color: var(--fg); }
.set-row:first-child { border-top: 0; }
.set-row span { flex: 1; min-width: 0; line-height: 1.3; }
.set-row small { display: block; font-size: 12.5px; color: var(--mut); }
.sw { position: relative; flex: none; width: 42px; height: 25px; border-radius: 999px; background: var(--sur3); transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.set-row[aria-checked="true"] .sw { background: var(--acc); }
.set-row[aria-checked="true"] .sw::after { transform: translateX(17px); }
.set-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.set-acts .gu-btn { padding: 0 8px; font-size: 14px; }
.set-mini { display: flex; gap: 6px; margin-top: 10px; }
.set-mini .gu-btn { flex: 1; padding: 0 6px; font-size: 13.5px; min-width: 0; }
.st-seg { display: flex; margin-bottom: 10px; }
.st-seg .gu-seg { width: 100%; }
.st-seg .gu-seg button { flex: 1; padding: 0 6px; }
.st-foot { margin: 10px 0 0; color: var(--mut); font-size: 12.5px; }
.rule-list { margin: 0 0 8px; padding-left: 20px; font-size: 14.5px; color: var(--fg); }
.rule-list li { margin: 5px 0; }
.rule-keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 0; font-size: 13.5px; color: var(--mut); align-items: center; }
.rule-keys kbd { justify-self: start; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); background: var(--sur2); font: inherit; font-size: 12px; font-weight: 650; color: var(--fg); }
/* taqvim */
.cal-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-top b { flex: 1; text-align: center; font-size: 15.5px; font-weight: 700; }
.cal-top .gu-tb:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-grid .wd { font-size: 11px; font-weight: 650; color: var(--mut); text-align: center; padding: 3px 0; }
.cal-d { display: grid; justify-items: center; align-content: center; gap: 3px; aspect-ratio: 1; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: var(--sur2); font-size: 13.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-d:hover { border-color: var(--line2); }
.cal-d:disabled { background: transparent; color: var(--mut); opacity: .45; cursor: default; border-color: transparent; }
.cal-d.today { border-color: var(--acc); }
.cal-d.sel { background: var(--fg); color: var(--bg); }
.cal-d .dots { display: flex; gap: 2px; height: 4px; }
.cal-d .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--sur3); }
.cal-d .dots i.on { background: var(--acc-text); }
.cal-d.sel .dots i { background: rgba(128,128,128,.45); }
.cal-d.sel .dots i.on { background: var(--acc); }
.cal-stats { display: flex; gap: 8px; margin: 10px 0 0; flex-wrap: wrap; }
.cal-day { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.cal-day .gu-btn { padding: 0 4px; min-height: 52px; flex-direction: column; gap: 1px; font-size: 13.5px; line-height: 1.15; }
.cal-day .gu-btn small { font-size: 12px; font-weight: 600; color: var(--mut); font-variant-numeric: tabular-nums; }
.cal-note { margin: 10px 0 0; font-size: 12.5px; color: var(--mut); }
/* reyting */
.lb-note { margin: 8px 0 0; font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.lb-tabs { display: grid; gap: 8px; margin-bottom: 8px; }
.lb-tabs .gu-seg { width: 100%; }
.lb-tabs .gu-seg button { flex: 1; padding: 0 6px; }
.lb-body { max-height: 46vh; overflow-y: auto; }

/* duel lobbisi */
.l-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; background: var(--head); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.l-top h1 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.l-live { margin-left: auto; color: var(--mut); font-size: 13px; font-variant-numeric: tabular-nums; padding-right: 6px; white-space: nowrap; }
.l-live i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.l-live.off i { background: var(--amber); }
.l-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.l-mode { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 92px; padding: 10px 4px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sur); cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.l-mode:hover { border-color: var(--line2); background: var(--sur2); }
.l-mode:active { transform: scale(.985); }
.l-mode b { font-size: 15px; font-weight: 700; }
.l-mode small { font-size: 12px; color: var(--mut); text-align: center; line-height: 1.25; }
.l-mode small.w { color: var(--acc-text); font-weight: 650; }
.l-wait { display: grid; justify-items: center; gap: 10px; padding: 22px 16px; text-align: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--sur); }
.l-wait b { font-size: 16.5px; font-weight: 750; }
.l-wait p { margin: 0; color: var(--mut); font-size: 14px; line-height: 1.45; max-width: 420px; }
.l-wait .gu-row { justify-content: center; }
.l-code { font-size: 42px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; margin-right: -.14em; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--sur3); border-top-color: var(--acc-text); animation: s-spin .9s linear infinite; }
@keyframes s-spin { to { transform: rotate(360deg); } }
.l-join { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.l-join input { min-height: 44px; min-width: 0; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line2); background: var(--sur2); outline: none; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.l-join input:focus { border-color: var(--acc); }
.l-me { display: flex; flex-wrap: wrap; gap: 6px; }
.l-friend .gu-seg button { flex: 1; }
.l-friend { display: grid; gap: 10px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sur); }

@media (max-height: 600px) and (max-width: 500px) {
  .g-top { height: 44px; }
  .tool { height: 46px; }
  .tool svg { width: 20px; height: 20px; }
}
/* skrinshot rejimi (?shot=): faqat taxta */
.g-duel.big .dp-h { font-size: 15px; }
.g-duel.big .dp-h b { font-size: 19px; }
.g-duel.big .dp i { height: 8px; margin-top: 6px; border-radius: 4px; }
.g-duel.big .dp u { border-radius: 4px; }
.g-duel.big .pips i { width: 8px; height: 8px; }
body.shot { background: var(--bg); overflow: hidden; }
body.shot #game { display: block; position: static; height: auto; padding: 0; background: transparent; }
body.shot .g-top, body.shot .g-side, body.shot .g-duel { display: none !important; }
body.shot .g-board { position: absolute; padding: 0; }
