@font-face{font-family:Rubik;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/rubik-400-cyr.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Rubik;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/rubik-400-lat.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:Rubik;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/rubik-700-cyr.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Rubik;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/rubik-700-lat.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:Rubik;font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/rubik-800-cyr.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Rubik;font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/rubik-800-lat.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+2000-206F,U+20AC,U+2122}
:root{
  --bg:#272c2e; --surface:#2e3338; --surface2:#3a4046; --ink:#eceff4; --muted:#9aa4ab; --line:#434a51;
  --accent:#2fbf71; --accent-ink:#06210f; --blue:#3d8bff; --danger:#ef5350; --warn:#f0a020; --gold:#ffc83d;
  --tile:#f2f3f5; --radius:12px;
  font-family:Rubik,-apple-system,"Segoe UI","Helvetica Neue",Roboto,Arial,sans-serif; color:var(--ink); color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-size:15px;line-height:1.4}
h1,h2,h3,h4,h5{margin:0;font-weight:700}
h1{font-size:2rem}
h2{font-size:.78rem;color:var(--muted);margin-bottom:8px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
h5{font-size:.85rem;color:var(--muted);margin:10px 0 6px}
a{color:var(--blue)}
.muted{color:var(--muted)} .err{color:var(--danger)} .big{font-size:1.15rem;font-weight:700;margin:6px 0}
.hint{margin:6px 0;color:var(--warn);font-size:.9rem}

.field{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:var(--muted);margin-bottom:10px}
input,select{font:inherit;color:var(--ink);padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:#1b1e24;min-width:0}
input:focus-visible,select:focus-visible,.btn:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.num{width:7em}
.btn{font:inherit;font-weight:600;font-size:.9rem;padding:8px 14px;border-radius:8px;border:1px solid var(--line);background:var(--surface2);color:var(--ink);cursor:pointer;min-height:38px}
.btn:hover:not(:disabled){border-color:var(--blue)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.primary{background:var(--accent);color:#fff;border:none;border-bottom:3px solid #1f8a51;font-weight:700}
.btn.danger{color:var(--danger);border-color:var(--danger);background:transparent}
.btn.ghost{background:transparent;border-color:transparent;text-decoration:underline;min-height:0;padding:6px 0;color:var(--muted)}
.btn.small{padding:6px 10px;min-height:34px}
.btn.tiny{padding:3px 8px;min-height:0;font-size:.75rem}
.btnrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;align-items:center}
.btnrow.col{flex-direction:column;align-items:stretch}
.card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
.panel{margin-bottom:12px}

.home,.lobby{max-width:460px;margin:8vh auto;padding:0 16px;display:flex;flex-direction:column;gap:14px}
.lobby{max-width:560px;margin-top:5vh}
.lead{color:var(--muted);margin:0}
.copyrow{display:flex;gap:8px}.copyrow input{flex:1}
.plist-lobby{list-style:none;margin:0;padding:0}
.plist-lobby .player{display:flex;gap:12px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
/* lobby avatar: account photo over the initial (the initial stays when there is no photo) */
.lav{position:relative;flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;background:#3b424d;color:#dfe4ec;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px;line-height:1}
.lav img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.lname{flex:1;min-width:0;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lname .you{font-weight:400;color:#9aa4b4}
.pname{font-weight:700}
.banner{position:sticky;top:0;z-index:30;background:var(--warn);color:#201400;text-align:center;padding:6px;font-weight:700}
.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#000;border:1px solid var(--line);color:#fff;padding:10px 16px;border-radius:8px;z-index:60;max-width:90vw}
.winbar{background:var(--accent);color:var(--accent-ink);padding:10px 16px;text-align:center;font-weight:600}.winbar a,.winbar .linkbtn{color:inherit;font-weight:600}

/* layout: players | board | actions */
/* players column sits right next to the board and the pair is centred both ways. The board is always square:
   its side --bs is the smaller of the window height and the width left after the players column, so a tall
   window gets empty space above/below (like monopoly-one) instead of a stretched board. */
.game{--side:clamp(240px,19vw,340px);--gap:clamp(12px,2vw,48px);
  --bs:min(calc(100vh - 16px),calc(100vw - var(--side) - var(--gap) - 16px));--bs:min(calc(100dvh - 16px),calc(100vw - var(--side) - var(--gap) - 16px));
  display:grid;grid-template-columns:var(--side) var(--bs);grid-template-rows:var(--bs);justify-content:center;align-content:center;
  gap:var(--gap);padding:8px;height:100vh;height:100dvh;overflow:hidden}
.boardwrap{width:var(--bs);height:var(--bs);align-self:center;justify-self:center}
.left,.right{min-height:0;overflow:auto;align-self:stretch}
.right{display:none}

/* board */
.board{container-type:inline-size;display:grid;width:100%;height:100%;
  grid-template-columns:1.8fr repeat(9,1fr) 1.8fr;grid-template-rows:1.8fr repeat(9,1fr) 1.8fr;
  /* padding holds the outer price strips; % = of the board width (cqw here would resolve against the viewport) */
  background:transparent;gap:clamp(1px,.17cqw,3px);padding:max(20px,2.9%)}
.tile{position:relative;display:flex;min-width:0;min-height:0;border-radius:2px;cursor:pointer;color:#272b31;
  background:color-mix(in srgb,var(--own,var(--tile)) 62%,var(--tile))}
.tile.s-b{flex-direction:column}.tile.s-t{flex-direction:column-reverse}
.tile.s-l{flex-direction:row-reverse}.tile.s-r{flex-direction:row}
.tile.focus{outline:2px solid var(--gold);outline-offset:-2px;z-index:2}
.tile.owned{box-shadow:inset 0 0 0 max(2px,.3cqw) var(--own)}
/* price plate on the OUTER edge of the tile (monopoly-one style) */
.strip{position:absolute;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:400;font-size:clamp(10px,1.55cqw,19px);white-space:nowrap;z-index:1;border-radius:3px}
.s-b .strip{top:100%;left:0;right:0;height:max(19px,2.7cqw);border-radius:0 0 4px 4px}
.s-t .strip{bottom:100%;left:0;right:0;height:max(19px,2.7cqw);border-radius:4px 4px 0 0}
.s-l .strip{right:100%;top:0;bottom:0;width:max(19px,2.7cqw);writing-mode:vertical-rl;transform:rotate(180deg);border-radius:0 4px 4px 0}
.s-r .strip{left:100%;top:0;bottom:0;width:max(19px,2.7cqw);writing-mode:vertical-rl;border-radius:0 4px 4px 0}
.tile>.face{flex:1;min-width:0;min-height:0;overflow:hidden;border-radius:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2cqw;padding:2px;text-align:center;position:relative}
.tname{font-weight:700;font-size:clamp(8px,1.3cqw,16px);line-height:1.1;word-break:break-word;hyphens:auto;color:#272b31}
.icon{width:3.8cqw;height:3.8cqw;min-width:18px;min-height:18px;line-height:0;flex:none}
.icon svg{display:block}
.icon.word{width:100%;height:100%;min-width:0;min-height:0;container-type:size;position:relative}
.icon.word svg{filter:drop-shadow(0 1px 1px #0005)}
/* top/bottom tiles are portrait: logo turns 90° to run along the tile (monopoly-one style) */
.s-t .wm-over img,.s-b .wm-over img{position:absolute;top:50%;left:50%;width:88cqh;height:90cqw;translate:-50% -50%;object-fit:contain}
.s-t .wm-over img{rotate:90deg}
.s-b .wm-over img{rotate:-90deg}
/* big bare icons on chance/chest/tax, no caption */
.t-chance .tname,.t-chest .tname,.t-tax .tname{display:none}
.t-chance .icon,.t-chest .icon,.t-tax .icon{width:5.2cqw;height:5.2cqw;min-width:24px;min-height:24px;max-width:66%;max-height:66%}
/* house stars sit on the inner edge of the tile */
.stars,.hotelstar{position:absolute;display:flex;gap:1px;line-height:0;z-index:2;filter:drop-shadow(0 1px 1px #000a)}
.s-b .stars,.s-b .hotelstar{top:1px;left:50%;transform:translateX(-50%)}
.s-t .stars,.s-t .hotelstar{bottom:1px;left:50%;transform:translateX(-50%)}
.s-l .stars,.s-l .hotelstar{right:1px;top:50%;transform:translateY(-50%);flex-direction:column}
.s-r .stars,.s-r .hotelstar{left:1px;top:50%;transform:translateY(-50%);flex-direction:column}
.stars svg{width:max(9px,1.5cqw);height:max(9px,1.5cqw)}
.hotelstar svg{width:max(14px,2.4cqw);height:max(14px,2.4cqw)}
.lockbadge svg{display:block}
.lockbadge{position:absolute;width:2.2cqw;height:2.2cqw;min-width:16px;min-height:16px;border-radius:38%;background:var(--danger);display:flex;align-items:center;justify-content:center;z-index:3;box-shadow:0 1px 4px #0006}
.s-b .lockbadge{top:-6px;left:50%;translate:-50% 0}
.s-t .lockbadge{bottom:-6px;top:auto;left:50%;translate:-50% 0}
.s-l .lockbadge{right:-6px;top:50%;translate:0 -50%}
.s-r .lockbadge{left:-6px;right:auto;top:50%;translate:0 -50%}
/* with the countdown: a pill "lock 12" */
.lockbadge.count{width:auto;padding:0 max(4px,.5cqw) 0 max(2px,.3cqw);gap:1px;border-radius:999px}
.lockbadge.count svg{width:max(12px,1.6cqw);height:max(12px,1.6cqw)}
.lockbadge b{font-size:max(10px,1.35cqw);font-weight:800;line-height:1;color:#fff;font-variant-numeric:tabular-nums}
.lockbadge.soon{animation:lockpulse 1.4s ease-in-out infinite}
@keyframes lockpulse{50%{box-shadow:0 0 0 3px #ff5a5a66,0 1px 4px #0006}}
@media (prefers-reduced-motion:reduce){.lockbadge.soon{animation:none;outline:2px solid #fff8}}
.tile.mortgaged .face{opacity:.55}
.corner{background:#eef0f3;color:#1b1e24}
.corner .tname{display:none}
.corner .icon{width:8.2cqw;height:8.2cqw;max-width:72%;max-height:72%}
.cimg{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
/* clay Chance / Chest / tax pictures carry more detail than the old flat glyphs: a bit larger */
.tile .icon.clay{width:6.8cqw;height:6.8cqw;min-width:28px;min-height:28px;max-width:88%;max-height:88%}
/* jail corner (top-right): diagonal split - outer triangle "just visiting", inner triangle the cell + badge */
.t-jail>.face{padding:0}
.jail2{position:absolute;inset:0}
.jail2 .jv{position:absolute;inset:0}
.jv-visit{clip-path:polygon(0 0,100% 0,100% 100%);background:#e3e7ed}
.jv-cell{clip-path:polygon(0 0,0 100%,100% 100%);background:#fff}
.jail2 .cimg{position:absolute;width:40%;height:40%;translate:-50% -50%}
.jv-visit .cimg{left:67%;top:33%}
.jv-cell .cimg{left:33%;top:67%}
.jcount{position:absolute;left:10%;top:90%;translate:-50% -50%;min-width:max(14px,1.9cqw);height:max(14px,1.9cqw);padding:0 .3cqw;border-radius:99px;
  background:var(--bad,#ed5565);color:#fff;font-size:max(9px,1.25cqw);font-weight:700;line-height:max(14px,1.9cqw);text-align:center;box-shadow:0 1px 3px #0006;z-index:1}

.center{grid-row:2/11;grid-column:2/11;background:transparent;display:flex;flex-direction:column;align-items:center;padding:1.5cqw;gap:1.2cqw;min-height:0;position:relative}
.logo{display:none}
.focusinfo{z-index:1;font-size:max(11px,1.5cqw);background:#ffffff12;padding:.5cqw 1.2cqw;border-radius:99px}
.log{list-style:none;margin:0;padding:0;z-index:1;flex:1;min-height:0;width:100%;overflow:auto;font-size:max(12px,1.55cqw);color:#c3cad7;display:flex;flex-direction:column;scrollbar-width:thin}
.log li{padding:.3cqw 0}.log li:first-child{margin-top:auto}.log li:last-child{color:#eef1f6}
.pn{font-weight:700}

/* players */
.players ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.pcard{position:relative;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;padding:18px 12px 14px;background:var(--surface);border-radius:var(--radius);border:1px solid var(--line)}
.pcard.active{background:color-mix(in srgb,var(--pc) 72%,#22262e);border-color:transparent}
.pcard.out{opacity:.55;filter:grayscale(1)}
.pcard.out .money,.pcard.out .pprops{display:none}
.avatar{flex:none;width:96px;height:96px;border-radius:50%;background:#20252d;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:2.4rem;color:#fff;border:4px solid var(--pc);box-shadow:0 0 0 3px #0005}
.pcard.active .avatar{background:#ffffff22;border-color:#fff}
.avatar svg{width:46px;height:46px}
.avatar{position:relative;overflow:hidden}
.pcard.offline .avatar,.pcard.offline .pmain{opacity:.55}
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
.pmain{min-width:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:2px}
.pprops{justify-content:center}
.pcard .pname{font-size:1rem;font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.star{color:var(--gold);display:inline-flex;vertical-align:-2px}.star svg{width:14px;height:14px}
.money{font-size:1.55rem;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.pcard:not(.active) .money{color:#fff}
.ptags{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin-top:2px}
.tag{font-size:.68rem;padding:1px 7px;border-radius:9px;background:#ffffff1f;font-weight:600;color:#dfe4ec}
.tag.off{background:#00000040;color:var(--muted)}.tag.ok{background:#1f6b44;color:#bff3d6}.tag.jail{background:#7a5200;color:#ffe2a8}
.posbadge{position:absolute;top:8px;right:8px;min-width:24px;height:24px;padding:0 6px;border-radius:12px;background:#0006;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center}
.pcard .btn.tiny{align-self:center}
.pprops{display:flex;flex-wrap:wrap;gap:3px;margin-top:5px}
.pp{width:12px;height:12px;border-radius:3px;border:1px solid #0005}.pp.m{opacity:.35;outline:1px dashed #fff8}

/* ===== board-centre popups: white action popup that drops in at the top of the centre + full-centre contract window.
   Sizes are cqw of the board (the board is the container); min px keep them readable on small boards. ===== */
:root{--pop-ink:#5b5d67;--pop-muted:#8d929c;--go:#37bc9d;--go-hover:#2fa88b;--go2:#8cc152;--go2-hover:#7bb03f;--alt:#eceef1;--alt-hover:#e0e3e8;--bad:#ed5565;--bad-hover:#da4453}
.act-pop{position:absolute;top:1cqw;left:1cqw;right:1cqw;z-index:3;background:#fff;color:var(--pop-ink);border-radius:max(5px,.7cqw);box-shadow:0 0 max(10px,2cqw) #000;
  padding:max(8px,1.35cqw) max(12px,2cqw) max(12px,2cqw);font-size:max(12px,1.75cqw);line-height:1.25;text-align:left}
.act-pop.enter{animation:pop-drop .14s ease-out}
@keyframes pop-drop{from{opacity:0;transform:translateY(-40%)}}
.ap-title{font-size:max(16px,2.55cqw);font-weight:700;line-height:1.3}
.ap-text{margin-top:max(3px,.5cqw)}
.ap-tip{display:inline-block;background:#ffce54;color:#6b4d00;font-weight:600;border-radius:4px;padding:0 .5em;margin-right:.3em}
.ap-btns{display:flex;gap:max(6px,1.35cqw);margin-top:max(8px,1.7cqw)}
.ap-note{margin-top:max(6px,1cqw);font-size:max(11px,1.55cqw);color:var(--pop-muted)}
.abtn{flex:1 1 0;min-width:0;font:inherit;font-weight:600;font-size:max(12px,1.9cqw);line-height:1.2;padding:max(7px,1.1cqw) max(8px,1cqw);border:0;border-radius:max(4px,.7cqw);cursor:pointer;color:#fff;background:var(--go);transition:background-color .1s}
.abtn.go:hover:not(:disabled){background:var(--go-hover)}
.abtn.go2{background:var(--go2)}.abtn.go2:hover:not(:disabled){background:var(--go2-hover)}
.abtn.alt{background:var(--alt);color:var(--pop-ink)}.abtn.alt:hover:not(:disabled){background:var(--alt-hover)}
.abtn.danger{background:var(--bad)}.abtn.danger:hover:not(:disabled){background:var(--bad-hover)}
.abtn:disabled{opacity:.45;cursor:not-allowed}
.abtn:focus-visible,.linkbtn:focus-visible,.pmi:focus-visible,.ct-x:focus-visible,.ct-row:focus-visible{outline:2px solid #3d8bff;outline-offset:2px}
.linkbtn{font:inherit;color:#3d8bff;background:none;border:0;padding:0;cursor:pointer;text-decoration:underline}

/* contract (trade) window: covers the whole board centre */
.contract{position:absolute;inset:0;z-index:4;background:#fff;color:var(--pop-ink);box-shadow:0 0 max(16px,3.4cqw) #000a;display:flex;flex-direction:column;
  padding:max(10px,2cqw) max(12px,2.2cqw) max(10px,1.8cqw);font-size:max(12px,1.75cqw);text-align:left}
.contract.enter{animation:ct-in .14s ease-out}
@keyframes ct-in{from{opacity:0;transform:scale(.97)}}
.ct-head{position:relative;text-align:center;margin-bottom:max(8px,1.4cqw)}
.ct-title{font-size:max(16px,2.7cqw);font-weight:700;line-height:1.4}
.ct-x{position:absolute;right:0;top:0;width:max(28px,3.3cqw);height:max(28px,3.3cqw);border:0;border-radius:max(4px,.7cqw);background:#f5f5f5;color:#a7adb5;font-size:max(18px,2.6cqw);line-height:1;cursor:pointer}
.ct-x:hover{color:var(--pop-ink);background:#eceef1}
.ct-cols{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;overflow:auto;align-items:start}
.ct-col{min-width:0;padding:0 max(8px,1.8cqw);align-self:stretch}
.ct-col+.ct-col{border-left:1px solid #e6e9ed}
.ct-who{display:flex;align-items:center;gap:max(6px,1cqw);margin-bottom:max(8px,1.5cqw)}
.ct-av{flex:none;width:max(26px,3.6cqw);height:max(26px,3.6cqw);border-radius:50%;background:var(--pc);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:max(12px,1.7cqw)}
.ct-nick{font-weight:700;font-size:max(13px,2cqw);line-height:1.2}
.ct-sub{color:#a7adb5;font-size:max(11px,1.6cqw)}
.ct-row{display:flex;align-items:center;gap:max(6px,1.2cqw);width:100%;padding:max(4px,.7cqw) 0;border:0;background:none;font:inherit;color:inherit;text-align:left}
button.ct-row{cursor:pointer;border-radius:4px}button.ct-row:hover{background:#f3f5f7}
.ct-ic{flex:none;width:max(30px,4.4cqw);height:max(20px,2.8cqw);color:#4f9a5e;display:flex}
.ct-ic svg{width:100%;height:100%}
.ct-main{min-width:0;flex:1;display:flex;flex-direction:column}
.ct-main b{font-weight:600;font-size:max(13px,1.95cqw);color:var(--pop-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ct-main small{color:#a7adb5;font-size:max(11px,1.55cqw)}
.ct-sw{flex:none;width:max(10px,1.4cqw);height:max(26px,3.6cqw);border-radius:2px}
.ct-del{color:#c0c5cc;font-size:max(16px,2.2cqw);padding:0 .2em}
button.ct-row:hover .ct-del{color:var(--bad)}
.ct-num{width:100%;max-width:9em;padding:2px 6px;border:1px solid #d6dbe1;border-radius:4px;background:#fff;color:var(--pop-ink);font-weight:600;font-size:max(13px,1.95cqw);color-scheme:light}
.ct-hint{margin:max(6px,1cqw) 0 0;color:#a7adb5;font-size:max(11px,1.55cqw)}
.ct-avail{display:none;flex-wrap:wrap;gap:4px;margin-top:8px}
.ct-chip{display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:.8rem;padding:3px 8px;border:1px dashed #c8cfd8;border-radius:12px;background:#fff;color:var(--pop-ink);cursor:pointer}
.ct-chip i{width:9px;height:9px;border-radius:2px}
.ct-switch{display:flex;gap:4px;margin-top:4px}
.ct-swbtn{width:22px;height:22px;border-radius:50%;border:2px solid transparent;background:var(--pc);color:#fff;font:inherit;font-size:.7rem;font-weight:700;cursor:pointer;opacity:.55;padding:0}
.ct-swbtn.on{opacity:1;border-color:#fff;box-shadow:0 0 0 2px var(--pc)}
.ct-foot{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding-top:max(8px,1.4cqw);text-align:center}
.ct-foot b{font-weight:600;font-size:max(13px,1.95cqw)}
.ct-foot span{color:var(--pop-muted)}
.ct-actions{display:flex;justify-content:center;gap:max(6px,1.2cqw);margin-top:max(8px,1.4cqw)}
.ct-actions .abtn{flex:0 1 auto;min-width:min(40%,14em);padding-left:2em;padding-right:2em}
/* trade draft: lit fields can be clicked into the contract, the rest dim */
.board.trading .tile{filter:brightness(.45) saturate(.6)}
.board.trading .tile.tr-ok{filter:none;cursor:copy}
.board.trading .tile.tr-pick{box-shadow:inset 0 0 0 max(3px,.45cqw) var(--go2)}
/* narrow layouts render the popup under the board instead of in its centre */
.right .act-pop,.right .contract{position:static;box-shadow:0 4px 18px #0008;margin-bottom:12px}
.right .ct-avail{display:flex}

/* player card dropdown menu */
.pcard.has-menu{cursor:pointer}
.pcard.open{z-index:6;border-bottom-left-radius:0;border-bottom-right-radius:0}
.pmenu{position:absolute;left:-1px;right:-1px;top:100%;background:#e6e9ed;color:#1f2329;text-align:left;cursor:default;animation:pm-in .1s ease-out;transform-origin:top}
@keyframes pm-in{from{opacity:0;transform:scaleY(.85)}}
.pmi{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;border-top:1px solid #c8cfd8;background:none;font:inherit;font-size:.95rem;color:inherit;cursor:pointer;text-align:left}
.pmi:first-child{border-top:0}
.pmi:hover{background:#d8dde3}
.pmi svg{width:20px;height:20px;flex:none}
.pmi.danger{color:#c9303e}

@media (max-width:1000px){
  .game{--side:200px;height:auto;overflow:visible;grid-template-columns:var(--side) minmax(0,1fr);grid-template-rows:none;align-content:start;gap:12px;align-items:start}
  .boardwrap{--bs:calc(100vw - var(--side) - 36px);width:100%;height:auto;aspect-ratio:1}
  .right{display:block;grid-column:1/-1;order:3;overflow:visible}.actions-in{display:none}.left{overflow:visible}
  .board{height:auto;aspect-ratio:1}
}
@media (max-width:760px){
  .game{grid-template-columns:1fr;padding:6px}
  .boardwrap{order:1}.right{order:2}.left{order:3}
  .players ul{display:grid;grid-template-columns:1fr 1fr}
}
@media (max-width:560px){
  .tname{display:none}
  .players ul{grid-template-columns:1fr}.money{font-size:1.3rem}
  .trade-cols{grid-template-columns:1fr}
  .dialog{align-self:flex-end;border-radius:16px 16px 0 0}.overlay{padding:0}
}

/* token overlay */
.board{position:relative}
/* tokens + dice live OUTSIDE #app in #fx-host (never detached by render) */
#fx-host{position:absolute;left:0;top:0;width:0;height:0;z-index:20;pointer-events:none}
.tokens-layer{position:absolute;container-type:inline-size;pointer-events:none;display:block}
.dice-host{position:absolute;container-type:inline-size;pointer-events:none;display:flex;justify-content:center;align-items:center;z-index:2}
/* tokens: player-colour disc (--c, set by tokens.js) with the player's initial, white rim, soft drop shadow
   (~55% of a tile's short side). Moving: lifted; jailed: bars. */
.tk{--c:#888;--rim:max(2px,.34cqw);position:absolute;box-sizing:border-box;width:4.2cqw;height:4.2cqw;min-width:18px;min-height:18px;
  transform:translate(-50%,-50%);border-radius:50%;border:var(--rim) solid #fff;background-color:var(--c);
  display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:max(9px,1.95cqw);line-height:1;
  text-shadow:0 1px 1px #0000002e;user-select:none;
  box-shadow:0 max(1px,.15cqw) max(2px,.3cqw) #0000004d,0 max(2px,.45cqw) max(5px,1cqw) #00000038;
  transition:scale .18s ease,box-shadow .18s ease;will-change:left,top,transform}
.tk.moving{z-index:3;scale:1.14;box-shadow:0 max(3px,.6cqw) max(5px,1cqw) #00000047,0 max(6px,1.3cqw) max(10px,2.2cqw) #0000002e}
.tk.jailed{background-image:linear-gradient(90deg,#0000 22%,#00000059 22% 30%,#0000 30% 70%,#00000059 70% 78%,#0000 78%)}
#dice-slot{position:absolute;inset:0;pointer-events:none} /* dice roll over the whole centre (app.js places the dice host on it) */

/* dice (see dice.js for the skin contract) */
.dice{--dice-size:clamp(36px,12.5cqw,170px);--dice-bg:transparent;--dice-face-bg:linear-gradient(145deg,#fff,#dfe3ea);--dice-pip-color:#15181d;--dice-pip-glow:none;--dice-edge:1px solid #0002;--dice-radius:16%;--dice-gloss:.35;
  display:flex;gap:calc(var(--dice-size)*.55);justify-content:center;align-items:center;height:calc(var(--dice-size)*1.5);z-index:1;background:var(--dice-bg)}
.dice.hidden{visibility:hidden}
.die-slot{position:relative;perspective:calc(var(--dice-size)*5);width:var(--dice-size);height:var(--dice-size)}
/* the pair comes to rest staggered on a diagonal, not side by side */
.die-slot:first-child{translate:0 -20%}.die-slot:last-child{translate:0 20%}
.dshadow{position:absolute;left:8%;right:8%;bottom:-16%;height:22%;border-radius:50%;background:radial-gradient(closest-side,#000a,#0000);opacity:.55;will-change:transform,opacity}
.die-wrap{position:absolute;inset:0;transform-style:preserve-3d;will-change:transform}
.core{position:absolute;inset:0;background:var(--dice-core,#e4e7ed);backface-visibility:visible}
.core.cx{transform:rotateY(90deg)}.core.cy{transform:rotateX(90deg)}
.cube{position:relative;width:100%;height:100%;transform-style:preserve-3d;will-change:transform;transform:rotateX(0) rotateY(0)}
.dice .face{position:absolute;inset:0;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);padding:14%;background:var(--dice-face-bg,#f3f4f7);border:var(--dice-edge,none);border-radius:0;backface-visibility:hidden;box-shadow:inset 0 0 calc(var(--dice-size)*.25) #0002}
.dice .face::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(135deg,#fff 0,transparent 55%);opacity:var(--dice-gloss);pointer-events:none}
.dice .face.f1{transform:translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.dice .face.f6{transform:rotateY(180deg) translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.dice .face.f2{transform:rotateX(90deg) translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.dice .face.f5{transform:rotateX(-90deg) translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.dice .face.f3{transform:rotateY(90deg) translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.dice .face.f4{transform:rotateY(-90deg) translateZ(calc(var(--dice-size)/2)) scale(1.035)}
.pip{width:78%;height:78%;margin:auto;border-radius:50%;background:var(--dice-pip-color,#15181d);box-shadow:var(--dice-pip-glow,none)}
.dice-skin-classic{--dice-core:#e4e7ed;--dice-face-bg:linear-gradient(145deg,#fff,#dfe3ea);--dice-pip-color:#15181d;--dice-pip-glow:none;--dice-edge:1px solid #0002;--dice-gloss:.35}
.dice-skin-neon{--dice-face-bg:linear-gradient(145deg,#101a2c,#070b14);--dice-pip-color:#37f0ff;--dice-pip-glow:0 0 5px #37f0ff,0 0 12px #1fb8ff;--dice-edge:1px solid #37f0ff88;--dice-radius:18%;--dice-gloss:.08;--dice-core:#070b14}
/* shop skins: custom properties only, so the same class also paints the shop preview (.site-dice) */
.dice-skin-gold{--dice-face-bg:linear-gradient(145deg,#fff1b8 0%,#f6c445 35%,#c8901c 70%,#f3d27a 100%);--dice-pip-color:#4a2c00;--dice-pip-glow:inset 0 2px 3px #00000059;--dice-edge:1px solid #8a5d0088;--dice-gloss:.45;--dice-core:#c8901c}
.dice-skin-ruby{--dice-face-bg:radial-gradient(circle at 30% 25%,#ff6b81,#c3002f 55%,#7a0019);--dice-pip-color:#fff3f5;--dice-pip-glow:0 0 4px #ffd6dd;--dice-edge:1px solid #ffffff33;--dice-gloss:.4;--dice-core:#7a0019}
.dice-skin-emerald{--dice-face-bg:radial-gradient(circle at 30% 25%,#6fe3a8,#0f8f52 55%,#065a33);--dice-pip-color:#ffe08a;--dice-pip-glow:0 0 3px #ffd56a;--dice-edge:1px solid #ffffff33;--dice-gloss:.4;--dice-core:#065a33}
.dice-skin-ice{--dice-face-bg:radial-gradient(circle at 80% 18%,#fffc 0 7%,transparent 8%),linear-gradient(145deg,#f4fdff,#bfe9fb 45%,#8fd3f4);--dice-pip-color:#0b4f7a;--dice-pip-glow:inset 0 1px 2px #0006;--dice-edge:1px solid #ffffffcc;--dice-gloss:.6;--dice-core:#bfe9fb}
.dice-skin-wood{--dice-face-bg:repeating-linear-gradient(100deg,#00000014 0 2px,transparent 2px 7px),linear-gradient(145deg,#d9a066,#a8693a 60%,#8a5229);--dice-pip-color:#3b2412;--dice-pip-glow:inset 0 1px 2px #0008;--dice-edge:1px solid #5c351866;--dice-gloss:.15;--dice-core:#a8693a}
.dice-skin-marble{--dice-face-bg:radial-gradient(ellipse at 20% 30%,#fff 0 20%,transparent 40%),repeating-linear-gradient(125deg,#fff 0 9px,#e7e7ea 10px 11px,#fff 12px 22px,#d5d6db 23px 24px);--dice-pip-color:#c8901c;--dice-pip-glow:inset 0 1px 1px #0005;--dice-edge:1px solid #0001;--dice-gloss:.3;--dice-core:#ececef}
.dice-skin-carbon{--dice-face-bg:repeating-conic-gradient(#25282c 0 25%,#141619 0 50%) 0 0/8px 8px;--dice-pip-color:#e0242c;--dice-pip-glow:0 0 4px #ff3b3b88;--dice-edge:1px solid #ffffff1f;--dice-gloss:.12;--dice-core:#16181b}
.dice-skin-candy{--dice-face-bg:linear-gradient(145deg,#ffd1e8,#ff8cc6);--dice-pip-color:#1fae93;--dice-pip-glow:inset 0 -2px 0 #0002;--dice-edge:1px solid #ffffff99;--dice-gloss:.55;--dice-core:#ff8cc6}
.dice-skin-lava{--dice-face-bg:radial-gradient(circle at 70% 80%,#ff5a1f55,transparent 45%),linear-gradient(145deg,#3a3a3d,#1b1b1d);--dice-pip-color:#ff7a1a;--dice-pip-glow:0 0 5px #ff7a1a,0 0 12px #ff3d00;--dice-edge:1px solid #ff6a0055;--dice-gloss:.08;--dice-core:#1b1b1d}
.dice-skin-galaxy{--dice-face-bg:radial-gradient(circle at 20% 30%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 72% 62%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 42% 84%,#fffa 0 1px,transparent 1.6px),radial-gradient(circle at 82% 18%,#c6b8ff 0 1px,transparent 1.6px),radial-gradient(ellipse at 30% 40%,#6b3fd6,#2a1460 50%,#0c0826);--dice-pip-color:#fff;--dice-pip-glow:0 0 6px #b9a6ff,0 0 12px #7b5cff;--dice-edge:1px solid #b9a6ff55;--dice-gloss:.1;--dice-core:#0c0826}

/* money flash */
@keyframes mflash-up{0%{color:#4dff9a;text-shadow:0 0 10px #4dff9a}100%{text-shadow:none}}
@keyframes mflash-down{0%{color:#ff6b6b;text-shadow:0 0 10px #ff6b6b}100%{text-shadow:none}}
.money.flash-up{animation:mflash-up .9s ease-out}.money.flash-down{animation:mflash-down .9s ease-out}
@media (prefers-reduced-motion:reduce){.money.flash-up,.money.flash-down{animation:none}}

/* board centre: the log fills it; the action popup / contract float on top (pointer-events only on the popup itself) */
.center .log{flex:1 1 auto;min-height:0}
.actions-in{position:absolute;inset:0;z-index:3;pointer-events:none}
.actions-in>*{pointer-events:auto}
.dice{transform-origin:center}

/* ===== polish pass: one radius scale, softer shadows, motion (all guarded; see app.js for replay guards) ===== */
:root{--r-sm:8px;--r-md:12px;--r-lg:18px;--shadow-1:0 2px 10px #0004;--shadow-2:0 10px 34px #0007;--ease-spring:cubic-bezier(.2,1.25,.4,1)}
.btn{border-radius:var(--r-sm);transition:transform .12s ease,border-color .15s,background-color .15s,box-shadow .15s}
.btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #0005}
.btn:active:not(:disabled){transform:translateY(0) scale(.97);box-shadow:none}
.btn.primary:hover:not(:disabled){box-shadow:0 4px 16px #2fbf7155}
.btn:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #7bbcff;outline-offset:2px}
.card,.panel,.pcard{border-radius:var(--r-md);box-shadow:var(--shadow-1)}
.panel{padding:16px}.pcard{padding:14px}.players ul{gap:10px}
.board{border-radius:var(--r-md);box-shadow:var(--shadow-2)}
.tile{transition:transform .18s var(--ease-spring),box-shadow .18s,filter .2s}
@media (hover:hover){.tile:hover{transform:translateY(-2px) scale(1.035);z-index:4;box-shadow:0 8px 18px #0008;filter:brightness(1.1)}}

/* enter animations: classes are only added when the thing actually appears */
@keyframes log-in{from{opacity:0;transform:translateX(-10px)}}
.log li.new{animation:log-in .35s ease-out}
@keyframes tint-in{from{background:var(--tile);filter:brightness(1.7)}}
.tile.tint-in{animation:tint-in .6s ease-out}
.pcard.active{box-shadow:0 4px 22px #2b6fe077,0 0 0 2px #4aa3ff33} /* steady highlight, no pulsing */

/* property card: white, flush with the tile (app.js anchors it); sized from the board width --bw set by app.js */
.tilecard{--u:calc(var(--bw,700px) / 100);position:fixed;z-index:25;width:max(220px,calc(var(--u) * 27.8));background:#fff;color:var(--pop-ink);
  border-radius:max(5px,calc(var(--u) * .7));box-shadow:0 0 max(14px,calc(var(--u) * 3.4)) #000;overflow:hidden;text-align:left}
@keyframes card-in{from{opacity:0;transform:scale(.96)}}
.tilecard.enter{animation:card-in .12s ease-out}
.chead{padding:max(8px,calc(var(--u) * 1.36)) max(12px,calc(var(--u) * 2.04));color:#fff}
.chead h3{font-size:max(15px,calc(var(--u) * 2.3));font-weight:700;line-height:1.25}
.csub{font-size:max(11px,calc(var(--u) * 1.5));opacity:.92}
.cbody{padding:max(8px,calc(var(--u) * 1.36)) max(12px,calc(var(--u) * 2.04)) max(10px,calc(var(--u) * 1.6));font-size:max(12px,calc(var(--u) * 1.63))}
.cacts{display:flex;gap:max(6px,calc(var(--u) * 1.1));margin-bottom:max(8px,calc(var(--u) * 1.4))}
.cacts .abtn{font-size:max(12px,calc(var(--u) * 1.75));padding:max(6px,calc(var(--u) * .9)) 4px}
.chint{margin:0 0 max(8px,calc(var(--u) * 1.2));line-height:1.25}
.cwarn{margin:0 0 max(8px,calc(var(--u) * 1.2));padding:6px 8px;border-radius:8px;line-height:1.25;background:#e5484d1f;color:var(--bad);font-weight:600}
.cwarn.soon{background:var(--bad);color:#fff}
.crow{--px:max(4px,calc(var(--u) * .6));display:flex;justify-content:space-between;align-items:center;gap:10px;padding:max(2px,calc(var(--u) * .3)) var(--px);margin:0 calc(var(--px) * -1);border-radius:3px}
.crow b{font-weight:600;font-size:max(13px,calc(var(--u) * 1.9));font-variant-numeric:tabular-nums}
.crow.cur{background:#e9f6ef;box-shadow:inset 3px 0 var(--go)}
.cstars{display:inline-flex;gap:2px;color:#656d78;vertical-align:middle}.cstars.gold{color:#f6bb42}
.cstars svg{width:max(9px,calc(var(--u) * 1.3));height:max(9px,calc(var(--u) * 1.3))}
.cdiv{height:1px;background:#e6e9ed;margin:max(6px,calc(var(--u) * 1)) 0}
.cowner{display:flex;align-items:center;gap:8px;margin-top:max(8px,calc(var(--u) * 1.2));padding-top:max(6px,calc(var(--u) * 1));border-top:1px solid #e6e9ed;font-weight:600}
.cowner i{width:10px;height:10px;border-radius:50%}
.ctag{font-size:.75em;padding:1px 7px;border-radius:9px;background:var(--bad);color:#fff;font-weight:600}

@media (max-width:760px){
  .tilecard{left:0!important;right:0;top:auto!important;bottom:0;width:100%;transform:none;border-radius:12px 12px 0 0}
  @keyframes card-in{from{opacity:0;transform:translateY(24px)}}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

.wm-over{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.wm-over img{width:94%;height:90%;object-fit:contain;display:block}

/* =====================================================================================================
   SITE PAGES (site.js, site-core.js, site-auth.js): home, games, friends, players, profile, shop,
   inventory, settings - everything except the in-game board. Every class here is prefixed "site-";
   avatar frames are scoped as .site-av.frame-*. Reuses the :root tokens defined above.
   ===================================================================================================== */
body.site-body{min-height:100vh;min-height:100dvh;overflow-x:clip}
.site-reduce-motion *,.site-reduce-motion *::before,.site-reduce-motion *::after{animation:none!important;transition:none!important}

/* --- top bar --- */
.site-top{position:sticky;top:0;z-index:40;background:#272c2ee6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.site-bar{max-width:1120px;margin:0 auto;padding:10px 16px;min-height:60px;display:flex;align-items:center;gap:16px}
.site-logo{display:flex;align-items:center;gap:9px;flex:none;color:var(--ink);text-decoration:none;font-weight:800;font-size:1.12rem;letter-spacing:-.01em}
.site-logo svg{width:30px;height:30px;display:block}
.site-logo:hover{color:#fff}
.site-links{display:flex;align-items:center;gap:2px;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
.site-links::-webkit-scrollbar{display:none}
.site-link{position:relative;flex:none;display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border-radius:var(--r-sm);color:var(--muted);text-decoration:none;font-weight:600;font-size:.92rem;white-space:nowrap;transition:color .15s,background-color .15s}
.site-link:hover{color:var(--ink);background:#ffffff0d}
.site-link.is-on{color:var(--ink);background:#ffffff12}
.site-link.is-on::after{content:"";position:absolute;left:11px;right:11px;bottom:3px;height:2px;border-radius:2px;background:var(--go)}
.site-link:focus-visible,.site-logo:focus-visible,.site-coins:focus-visible{outline:2px solid #7bbcff;outline-offset:2px}
.site-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--bad);color:#fff;font-size:.7rem;font-weight:700;line-height:18px;text-align:center}
.site-right{display:flex;align-items:center;gap:10px;margin-left:auto;flex:none}
.site-signin{margin-left:auto}
.site-coins{display:inline-flex;align-items:center;gap:6px;padding:5px 11px 5px 7px;border-radius:99px;background:#ffc83d17;border:1px solid #ffc83d3d;color:var(--gold);text-decoration:none;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;transition:background-color .15s}
a.site-coins:hover{background:#ffc83d2b}
.site-coin{width:18px;height:18px;flex:none;display:block}
.site-coins--big{font-size:1.1rem;padding:7px 14px 7px 9px}
.site-coins--big .site-coin{width:22px;height:22px}
.site-menu-wrap{position:relative}
.site-avbtn{display:block;padding:0;border:0;background:none;border-radius:50%;cursor:pointer;line-height:0}
.site-avbtn:focus-visible{outline:2px solid #7bbcff;outline-offset:4px}
.site-menu{position:absolute;right:0;top:calc(100% + 12px);min-width:210px;max-width:calc(100vw - 32px);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow-2);padding:6px;z-index:50;transform-origin:top right;animation:site-pop .12s ease-out}
.site-menu[hidden]{display:none}
/* top-bar avatar: click = own profile (it is a link), hover / keyboard focus = this menu. The ::before bridge covers
   the gap under the avatar so the menu stays open while the pointer travels down to it. Touch screens have no hover:
   a tap just opens the profile (settings and logout are reachable from there). */
@media (hover:hover) and (pointer:fine){.site-menu-wrap:hover .site-menu{display:block}}
.site-menu-wrap:focus-within .site-menu{display:block}
.site-menu::before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}
.site-menu-head{padding:8px 10px 10px;margin-bottom:4px;border-bottom:1px solid var(--line);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-menu a,.site-menu button{display:block;width:100%;padding:9px 10px;border:0;border-radius:var(--r-sm);background:none;color:var(--ink);font:inherit;font-size:.95rem;text-align:left;text-decoration:none;cursor:pointer}
.site-menu a:hover,.site-menu button:hover,.site-menu a:focus-visible,.site-menu button:focus-visible{background:#ffffff12;outline:none}
.site-menu .site-menu-bad{color:var(--bad)}
@keyframes site-pop{from{opacity:0;transform:translateY(-4px) scale(.97)}}
/* narrow: the section links drop to their own horizontally scrollable row under logo + coins + avatar */
@media (max-width:940px){
  .site-bar{flex-wrap:wrap;gap:6px 12px;padding:8px 16px 4px}
  .site-bar--out{padding-bottom:8px}
  .site-links{order:3;flex:1 0 100%}
}

/* --- page frame --- */
.site-main{max-width:1120px;margin:0 auto;padding:24px 16px 64px;display:flex;flex-direction:column;gap:16px}
.site-main a:not([class]){color:var(--go);font-weight:600;text-decoration:none}
.site-main a:not([class]):hover{text-decoration:underline}
.site-main .btn,.site-top .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;white-space:nowrap}
.site-main .btn .site-coin{width:16px;height:16px}
.site-main input:not([type=checkbox]):not([type=radio]){font-size:16px;width:100%}
.site-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px;box-shadow:var(--shadow-1);min-width:0;scroll-margin-top:84px}
.site-card--hl{border-color:#ed556573;box-shadow:0 0 0 1px #ed556533,var(--shadow-1)}
.site-h1{margin:0;font-size:1.65rem;font-weight:800;letter-spacing:-.015em;line-height:1.2;overflow-wrap:anywhere}
.site-h2{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:1.05rem;font-weight:700;color:var(--ink);text-transform:none;letter-spacing:0}
.site-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.site-head .site-h2{margin:0}
.site-more{flex:none;color:var(--go);font-size:.88rem;font-weight:600;text-decoration:none}
.site-more:hover{text-decoration:underline}
.site-muted{color:var(--muted);margin:0}
.site-small{font-size:.86rem}
.site-gap{margin:0 0 14px}
.site-ico{width:16px;height:16px;flex:none}
.site-pagehead{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px}
.site-pagehead-act{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.site-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.site-narrow{width:100%;max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.site-center{display:flex;flex-direction:column;align-items:center;gap:10px;padding:40px 20px;text-align:center}
.site-btnrow{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:6px}
.site-loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:56px 0;color:var(--muted)}
.site-loading--sm{padding:18px 0;justify-content:flex-start}
.site-spin{width:20px;height:20px;flex:none;border-radius:50%;border:2.5px solid #ffffff24;border-top-color:var(--go);animation:site-spin .8s linear infinite}
@keyframes site-spin{to{transform:rotate(1turn)}}
.site-empty{padding:18px 16px;border:1px dashed var(--line);border-radius:var(--r-md);background:#ffffff05;color:var(--muted);text-align:center}
.site-empty p{margin:0}
.site-hint{margin:14px 0 0;color:var(--muted);font-size:.9rem}
.site-note{margin:14px 0 0;padding:12px 14px;border:1px dashed var(--line);border-radius:var(--r-sm);background:#ffffff08;color:var(--muted)}
.site-alert{display:block;margin-bottom:12px;padding:10px 14px;border:1px solid #ed556559;border-radius:var(--r-sm);background:#ed55651f;color:#ff9aa6;font-weight:600;text-decoration:none}
.site-alert:hover{background:#ed55652e}
.site-busy{cursor:progress}
@media (max-width:820px){.site-grid2{grid-template-columns:minmax(0,1fr)}}
@media (max-width:480px){.site-main{padding-top:16px;gap:12px}.site-card{padding:16px}.site-h1{font-size:1.4rem}}

/* --- forms + buttons --- */
.site-form{display:flex;flex-direction:column;gap:8px}
.site-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.site-label{font-size:.85rem;color:var(--muted)}
.site-inline{display:flex;align-items:stretch;gap:8px}
.site-inline input{flex:1 1 auto}
.site-inline .btn{flex:none}
.site-row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.site-wide{width:100%}
.site-form .btn.site-wide{margin-top:4px}
.site-big{width:100%;min-height:58px;font-size:1.15rem;border-radius:var(--r-md)}
.site-code{text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.site-code::placeholder{text-transform:none;letter-spacing:0;font-weight:400}
.site-ferr{margin:0;color:var(--bad);font-size:.88rem}
.site-ferr[hidden]{display:none}
.site-sep{display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--muted);font-size:.8rem}
.site-sep::before,.site-sep::after{content:"";flex:1;height:1px;background:var(--line)}
.site-btn-bad{background:var(--bad);border-color:var(--bad);color:#fff}
.site-btn-bad:hover:not(:disabled){background:var(--bad-hover);border-color:var(--bad-hover)}
.btn.site-btn-link{background:none;border-color:transparent;color:var(--muted);text-decoration:underline;padding-left:4px;padding-right:4px}
.btn.site-btn-link:hover:not(:disabled){color:var(--ink);border-color:transparent;box-shadow:none;transform:none}
@media (max-width:420px){.site-row2{grid-template-columns:minmax(0,1fr)}}

/* --- home --- */
.site-hero{padding:24px 0 4px;text-align:center}
.site-hero-title{font-size:clamp(2.3rem,8vw,3.6rem);font-weight:800;letter-spacing:-.025em;line-height:1.05;background:linear-gradient(95deg,var(--go),var(--go2));-webkit-background-clip:text;background-clip:text;color:transparent}
.site-hero-sub{max-width:560px;margin:12px auto 0;color:var(--muted);font-size:1.05rem}
.site-hello{display:flex;align-items:center;flex-wrap:wrap;gap:16px}
.site-hello-main{flex:1 1 200px;min-width:0}
.site-hello-main .site-muted{margin-top:4px}
.site-play{display:flex;flex-direction:column;gap:18px}
.site-strip{list-style:none;margin:0;padding:2px 2px 8px;display:flex;gap:10px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
.site-chip{flex:0 0 112px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 8px 12px;border:1px solid var(--line);border-radius:var(--r-md);background:#ffffff06;text-align:center;font-size:.8rem}
.site-chip-nick{max-width:100%;color:var(--ink);font-size:.9rem;font-weight:600;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-chip-nick:hover{color:var(--go)}

/* --- sign-in --- */
.site-auth{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:16px}
.site-gbtn.site-tgbtn{background:#2aabee;color:#fff}
.site-gbtn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:42px;padding:8px 18px;border:0;border-radius:8px;background:#fff;color:#1f1f1f;font:inherit;font-weight:600;cursor:pointer;box-shadow:var(--shadow-1);transition:transform .12s,box-shadow .15s}
.site-gbtn svg{width:20px;height:20px;flex:none}
.site-gbtn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 14px #0006}
.site-gbtn:focus-visible{outline:2px solid #7bbcff;outline-offset:2px}
.site-gbtn:disabled{opacity:.6;cursor:progress}
.site-dev{align-self:stretch;padding-top:12px;border-top:1px dashed var(--line)}
.site-gate{width:100%;max-width:540px;margin:24px auto 0;text-align:center}
.site-gate .site-muted{margin-top:8px}
.site-gate .site-auth{align-items:center}
.site-gate .site-dev{text-align:left}
.site-gate>.site-small{margin-top:18px}

/* --- game lists --- */
.site-games,.site-users{list-style:none;margin:0;padding:0}
.site-game{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.site-game:first-child{border-top:0;padding-top:2px}
.site-game:last-child{padding-bottom:2px}
.site-game-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px}
.site-game-top{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.site-code-tag{padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:#0000002e;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:700;letter-spacing:.06em}
.site-st{padding:2px 9px;border-radius:99px;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.site-st--lobby{background:#37bc9d24;color:#6fe0c4}
.site-st--live{background:#8cc15224;color:#b5e27f}
.site-st--over{background:#ffffff12;color:var(--muted)}
.site-game-n{color:var(--muted);font-size:.85rem;font-variant-numeric:tabular-nums}
.site-game-players{display:flex;flex-wrap:wrap;gap:5px}
.site-gp{max-width:100%;padding:2px 9px;border-radius:6px;background:#ffffff0f;font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-gp.is-off{opacity:.55}
.site-gp.is-out{color:var(--muted)}
.site-gp s{text-decoration-color:var(--bad);text-decoration-thickness:2px}
.site-gp-link{color:inherit;text-decoration:none}
.site-gp-link:hover{color:var(--go)}
.site-game-act{flex:none}
.site-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:#ffffff14;color:var(--muted);font-size:.75rem;font-weight:700}
.site-count--bad{background:var(--bad);color:#fff}

/* --- people --- */
.site-urow{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line)}
.site-urow:first-child{border-top:0;padding-top:2px}
.site-urow:last-child{padding-bottom:2px}
.site-urow-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.site-nick{color:var(--ink);font-weight:700;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-nick:hover{color:var(--go)}
.site-urow-sub{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;color:var(--muted);font-size:.85rem}
.site-urow-sub>*+*::before{content:"·";margin-right:6px;color:var(--muted)}
.site-urow-act{flex:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px}
.site-on{color:#7fe0a5}
.site-off{color:var(--muted)}
.site-ingame{display:inline-flex;align-items:center;gap:5px;color:var(--gold);font-weight:600;text-decoration:none}
.site-ingame::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--gold);box-shadow:0 0 6px var(--gold)}
.site-ingame:hover{text-decoration:underline}
.site-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:99px;background:#ffffff12;color:var(--muted);font-size:.82rem;font-weight:600;white-space:nowrap}
.site-pill--ok{background:#37bc9d22;color:#6fe0c4}
.site-rel{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px}
.site-search{display:flex;align-items:center;gap:10px;padding:0 14px;border:1px solid var(--line);border-radius:var(--r-md);background:#1b1e24;transition:border-color .15s,box-shadow .15s}
.site-search:focus-within{border-color:#7bbcff;box-shadow:0 0 0 3px #7bbcff33}
.site-search .site-ico{width:18px;height:18px;color:var(--muted)}
.site-main .site-search input{flex:1;min-width:0;padding:13px 0;border:0;border-radius:0;background:none;-webkit-appearance:none;appearance:none}
.site-search input:focus-visible{outline:none}
.site-results{margin-top:14px;transition:opacity .15s}
.site-results.is-busy{opacity:.55}
.site-results>.site-hint:first-child{margin-top:0}
@media (max-width:560px){
  .site-urow{flex-wrap:wrap}
  .site-urow-act{width:100%;justify-content:flex-start;padding-left:56px}
}

/* --- avatar + frames (frame classes come from the shop items' preview) --- */
.site-av{--sz:40px;--ring:max(2px,calc(var(--sz) * .055));position:relative;display:inline-block;flex:none;width:var(--sz);height:var(--sz);border-radius:50%;vertical-align:middle}
.site-av-in{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;object-fit:cover;background:hsl(var(--h,210) 45% 42%);color:#fff;font-size:calc(var(--sz) * .42);font-weight:700;line-height:1;overflow:hidden;user-select:none}
img.site-av-in{display:block}
.site-av--framed::before{content:"";position:absolute;z-index:0;inset:calc(var(--ring) * -1 - 2px);border-radius:50%;background:var(--muted)}
.site-av--framed>.site-av-in{box-shadow:0 0 0 2px var(--surface)}
.site-av.frame-silver::before{background:linear-gradient(135deg,#fff 0%,#a9b2bc 30%,#eef1f4 52%,#7c8692 76%,#dfe3e8 100%)}
.site-av.frame-gold::before{background:linear-gradient(135deg,#fff3c4 0%,#f6bb42 30%,#b07d12 55%,#ffd76a 78%,#c8921c 100%);box-shadow:0 0 10px #f6bb4240}
.site-av.frame-neon::before{background:#37f0ff;box-shadow:0 0 6px #37f0ff,0 0 16px #1fb8ffaa;animation:site-neon 2.2s ease-in-out infinite alternate}
.site-av.frame-rainbow::before{background:conic-gradient(#ff5e62,#ff9f43,#feca57,#5fd068,#48dbfb,#5f7cff,#c56cf0,#ff5e62);animation:site-spin 6s linear infinite}
.site-av.frame-bronze::before{background:linear-gradient(135deg,#f3c9a0 0%,#b8733f 30%,#e9a46c 52%,#7a4520 76%,#d08a52 100%)}
.site-av.frame-emerald::before{background:conic-gradient(from 20deg,#0f8f52,#6fe3a8,#065a33,#3fcf88,#0f8f52);box-shadow:0 0 8px #3fcf8840}
.site-av.frame-ruby::before{background:conic-gradient(from 20deg,#c3002f,#ff6b81,#7a0019,#ff3355,#c3002f);box-shadow:0 0 8px #ff335540}
.site-av.frame-sapphire::before{background:conic-gradient(from 20deg,#1f4fd6,#7aa2ff,#0b2a7a,#4f7cff,#1f4fd6);box-shadow:0 0 8px #4f7cff40}
.site-av.frame-candy::before{background:repeating-conic-gradient(#ff5fa2 0 15deg,#fff 15deg 30deg)}
.site-av.frame-fire::before{background:conic-gradient(#ff2d00,#ff8a00,#ffd000,#ff8a00,#ff2d00);box-shadow:0 0 10px #ff6a00aa;animation:site-spin 2.4s linear infinite}
.site-av.frame-ice::before{background:conic-gradient(#e8fbff,#8fd3f4,#fff,#5bb8e8,#e8fbff);box-shadow:0 0 10px #8fd3f4aa;animation:site-spin 8s linear infinite}
.site-av.frame-galaxy::before{background:conic-gradient(#2a1460,#7b5cff,#ff6bd6,#3fd0ff,#2a1460);box-shadow:0 0 12px #7b5cff88;animation:site-spin 10s linear infinite}
.site-av.frame-royal::before{background:conic-gradient(#5b1a8a,#f6c445,#3a0d5e,#f6c445,#5b1a8a);box-shadow:0 0 10px #f6c44555}
.reduce-motion .site-av::before{animation:none!important}
@media (prefers-reduced-motion:reduce){.site-av::before{animation:none!important}}
@keyframes site-neon{to{box-shadow:0 0 10px #37f0ff,0 0 26px #1fb8ffd9}}
.site-av-dot{position:absolute;z-index:2;right:2%;bottom:2%;width:max(10px,calc(var(--sz) * .24));height:max(10px,calc(var(--sz) * .24));border-radius:50%;border:2px solid var(--surface);background:#3ddc84}
.site-av-dot--game{background:var(--gold)}

/* --- profile --- */
.site-profile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:36px 20px 28px;text-align:center}
.site-profile .site-av{margin-bottom:10px}
.site-profile-status{font-size:.95rem}
.site-profile-act{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:10px}
.site-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.site-stat{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;padding:18px 10px;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--shadow-1);text-align:center}
.site-stat b{font-size:1.9rem;font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums}
.site-stat span{color:var(--muted);font-size:.85rem}
.site-404-code{font-size:4.2rem;font-weight:800;line-height:1;background:linear-gradient(95deg,var(--go),var(--go2));-webkit-background-clip:text;background-clip:text;color:transparent}
@media (max-width:420px){.site-stats{gap:8px}.site-stat{padding:14px 6px}.site-stat b{font-size:1.45rem}}

/* --- shop + inventory --- */
.site-group{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.site-group .site-h2{margin:0}
.site-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.site-item{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--shadow-1);transition:transform .15s ease,border-color .15s}
.site-item:hover{transform:translateY(-2px);border-color:#ffffff30}
.site-item.is-on{border-color:var(--go);box-shadow:0 0 0 1px var(--go),var(--shadow-1)}
.site-item-pre{position:relative;height:128px;display:flex;align-items:center;justify-content:center;padding:14px;background:radial-gradient(circle at 50% 30%,#ffffff14,transparent 70%),#0000002b}
.site-item-pre img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.site-group-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.site-brandpick-btns{display:flex;gap:6px}
.site-brandpick-btns .btn{flex:1}
a.btn.site-wide{display:flex;align-items:center;justify-content:center;text-decoration:none}
/* inventory: "Моя доска" - the real board with your brands; the choice opens in the board centre */
.site-boardwrap{width:min(720px,100%);aspect-ratio:1;margin:14px auto 0}
.site-myboard .board{width:100%;height:100%}
.site-myboard .tile:not([data-act]){cursor:default}
@media (hover:hover){.site-myboard .tile:not([data-act]):hover{transform:none;filter:none;box-shadow:none;z-index:auto}}
.site-myboard .tile[data-swapped]{box-shadow:inset 0 0 0 max(2px,.4cqw) #a46bff}
.site-myboard #dice-slot,.site-myboard .log{display:none}
.site-myboard .center{justify-content:center}
.bed-in{width:100%;flex:1;min-height:0;display:flex}
.bed{width:100%;min-height:0;display:flex;flex-direction:column;gap:max(6px,1cqw);overflow:auto;padding:max(10px,1.6cqw);border-radius:12px;background:#1b1f23f2;border:1px solid var(--line);color:var(--ink)}
.bed--hint{align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:max(12px,1.8cqw)}
.bed--hint b{color:var(--ink);font-size:max(15px,2.6cqw)}
.bed--hint p{margin:0;max-width:34em}
.bed-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.bed-title b{display:block;font-size:max(15px,2.4cqw);line-height:1.2}
.bed-title span{color:var(--muted);font-size:max(11px,1.5cqw)}
.bed-x{flex:none;width:30px;height:30px;border-radius:50%;border:0;background:#ffffff14;color:var(--ink);font-size:20px;line-height:1;cursor:pointer}
.bed-x:hover{background:#ffffff26}
.bed-opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(max(86px,13.5cqw),1fr));gap:max(6px,.9cqw)}
.bed-opt{--rar:#ffffff30;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;padding:6px 6px 5px;border-radius:10px;background:#ffffff0a;
  border:1px solid transparent;border-bottom:3px solid var(--rar);color:var(--ink);text-decoration:none;cursor:pointer;font:inherit;transition:background-color .15s,transform .15s}
.bed-opt:hover{background:#ffffff17;transform:translateY(-1px)}
.bed-opt.is-on{border-color:#37bc9d;border-bottom-color:#37bc9d;background:#37bc9d1f}
.bed-r-common{--rar:#b6c0c8}.bed-r-rare{--rar:#4f8dff}.bed-r-epic{--rar:#a46bff}.bed-r-legendary{--rar:#f0b54a}
.bed-logo{width:100%;aspect-ratio:2/1;border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:3px}
.bed-logo img,.bed-logo svg{width:100%;height:100%;object-fit:contain;display:block}
.bed-logo .wm-over{width:100%;height:100%}
.bed-logo .wm-over img{width:100%;height:100%}
.bed-name{max-width:100%;font-size:max(11px,1.45cqw);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bed-opt small{max-width:100%;display:inline-flex;align-items:center;gap:3px;font-size:max(10px,1.2cqw);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bed-opt small .site-coin{flex:none;width:1.1em;height:1.1em;display:inline-block}
.bed-opt small.bed-price{color:#ffc83d;font-weight:700;font-variant-numeric:tabular-nums}
.bed-opt.is-locked{opacity:.5;filter:grayscale(.45);cursor:default}
.bed-opt.is-locked:hover{opacity:.5;transform:none;background:#ffffff0a}
.bed-sep{font-size:max(10px,1.25cqw);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:700}
.bed-below{display:none;container-type:inline-size}
@media (max-width:640px){.site-myboard .bed-in{display:none}.bed-below{display:block;margin-top:12px}}
/* rarity (by price; case odds) */
.site-rar{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:.72rem;font-weight:700;letter-spacing:.02em;
  background:var(--rar-bg);color:var(--rar);box-shadow:inset 0 0 0 1px var(--rar-line)}
.site-rar--common{--rar:#b6c0c8;--rar-bg:#b6c0c81a;--rar-line:#b6c0c840}
.site-rar--rare{--rar:#6fa6ff;--rar-bg:#4f8dff1f;--rar-line:#4f8dff55}
.site-rar--epic{--rar:#c39bff;--rar-bg:#a46bff1f;--rar-line:#a46bff59}
.site-rar--legendary{--rar:#ffcc6a;--rar-bg:#f0b54a24;--rar-line:#f0b54a66}
.site-item-body .site-rar{align-self:flex-start;margin-bottom:2px}
/* profile, dev server only: grant coins / cases */
.site-devgrant{border:1px dashed #f0a02099;background:#f0a0200d}
.site-devgrant .site-h2{color:#f0b54a}
.site-devgrant .site-head .site-muted{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.site-devgrant .site-coin{width:15px;height:15px}
.site-devgrant-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.site-devgrant-row input{flex:1 1 140px;min-width:0}
.site-devgrant p{margin:10px 0 0}
/* inventory: cases */
.site-cases{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.site-case-img{flex:none;width:96px;height:auto;filter:drop-shadow(0 8px 14px #0006)}
.site-cases-main{flex:1;min-width:220px;display:flex;flex-direction:column;gap:6px}
.site-cases-main .site-h2{margin:0}
.site-odds{display:flex;flex-wrap:wrap;gap:6px}
.site-cases-act{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.site-cases-act .btn{display:inline-flex;align-items:center;gap:6px}
.site-badge--case{background:#a46bff}
/* case opening: a reel of items slides and stops on the prize under the marker.
   Smooth in every browser = nothing repaints while it spins: no backdrop blur (the page below has animated
   avatar frames, so a blur would be recomputed full-screen every frame), no mask on the moving reel (edge fades
   are static overlays instead), animations inside the strip are off, and the strip is its own GPU layer that the
   compositor just slides. */
.case-modal{position:fixed;inset:0;z-index:95;display:flex;align-items:center;justify-content:center;padding:16px;background:#0b0d10d9;
  animation:case-in .35s ease-out both}
.case-modal.is-leaving{animation:case-out .22s ease-in both;pointer-events:none}
@keyframes case-in{from{opacity:0}}
@keyframes case-out{to{opacity:0}}
.case-box{width:min(760px,100%);display:flex;flex-direction:column;gap:18px;padding:20px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--line);box-shadow:0 24px 60px #000a;
  animation:case-pop .38s cubic-bezier(.2,.9,.3,1) both}
.case-modal.is-leaving .case-box{animation:case-drop .22s ease-in both}
@keyframes case-pop{from{opacity:0;transform:translateY(14px) scale(.96)}}
@keyframes case-drop{to{opacity:0;transform:translateY(8px) scale(.98)}}
.case-reel{--reel:#25292d;position:relative;overflow:hidden;border-radius:var(--r-md);background:var(--reel);padding:12px 0;isolation:isolate}
.case-reel::before,.case-reel::after{content:"";position:absolute;top:0;bottom:0;width:14%;z-index:2;pointer-events:none}
.case-reel::before{left:0;background:linear-gradient(90deg,var(--reel),transparent)}
.case-reel::after{right:0;background:linear-gradient(270deg,var(--reel),transparent)}
.case-strip{display:flex;gap:8px;width:max-content;padding:0 8px;will-change:transform;transform:translate3d(0,0,0);backface-visibility:hidden;contain:layout style}
.case-strip *,.case-strip *::before,.case-strip *::after{animation:none!important}
.cr-tile{flex:none;width:132px;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 8px 8px;border-radius:12px;background:#ffffff0d;
  border-bottom:4px solid var(--rar,#b6c0c8)}
.cr-tile.cr-common{--rar:#b6c0c8}.cr-tile.cr-rare{--rar:#4f8dff}.cr-tile.cr-epic{--rar:#a46bff}.cr-tile.cr-legendary{--rar:#f0b54a}.cr-tile.cr-coins{--rar:#ffc83d}
.cr-pre{height:74px;width:100%;display:flex;align-items:center;justify-content:center}
.cr-pre .site-dice{gap:8px;transform:scale(.72)}
.cr-pre .site-brandlogo{width:100%;box-shadow:none}
.cr-pre > .site-coin{width:46px;height:46px}
.cr-name{max-width:100%;font-size:.78rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cr-tile{transition:opacity .5s ease,transform .45s cubic-bezier(.2,1.3,.4,1),box-shadow .45s ease,background-color .45s ease}
.case-strip.is-done .cr-tile:not(.is-prize){opacity:.35}
.cr-tile.is-prize{background:#ffffff1c;transform:translateY(-3px) scale(1.06);box-shadow:0 0 0 2px var(--rar),0 0 26px color-mix(in srgb,var(--rar) 50%,transparent)}
.case-marker{position:absolute;z-index:3;left:50%;top:0;bottom:0;width:3px;margin-left:-1.5px;background:#ffc83d;box-shadow:0 0 10px #ffc83d;border-radius:2px}
.case-reel{padding:16px 0}
.case-result{min-height:40px;text-align:center;opacity:0;transform:translateY(10px);transition:opacity .45s ease .15s,transform .45s cubic-bezier(.2,.9,.3,1) .15s}
.case-result.is-in{opacity:1;transform:none}
.case-title{margin:6px 0 2px;text-transform:none;letter-spacing:0;color:var(--ink);font-size:1.5rem}

/* brand logos are drawn for the white board tiles: show them on a white card */
.site-brandlogo{display:flex;align-items:center;justify-content:center;width:min(170px,100%);aspect-ratio:2/1;padding:6px;border-radius:12px;background:#fff;box-shadow:0 6px 14px #0007}
.site-brandlogo img{width:100%;height:100%;object-fit:contain}
.site-item-body{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 14px 4px}
.site-item-name{margin:0;font-size:1rem;font-weight:700;overflow-wrap:anywhere}
.site-item-desc{margin:0;color:var(--muted);font-size:.85rem}
.site-item-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px 14px}
.site-item-foot--solo{display:block}
.site-item-err{padding:0 14px 12px}
.site-price{display:inline-flex;align-items:center;gap:5px;color:var(--gold);font-weight:700;font-variant-numeric:tabular-nums}
.site-price--free{color:var(--go2)}
.btn.site-owned:disabled{opacity:1;background:#37bc9d1f;border-color:#37bc9d59;color:#6fe0c4}
.btn.site-owned--muted:disabled{background:#ffffff0d;border-color:var(--line);color:var(--muted)}
/* dice skin preview: the wrapper carries the in-game .dice-skin-<name> class and reads the same custom properties */
.site-dice{display:flex;align-items:center;gap:16px}
.site-die{width:50px;height:50px;padding:8px;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);border-radius:12px;background:var(--dice-face-bg,linear-gradient(145deg,#fff,#dfe3ea));border:var(--dice-edge,1px solid #0002);box-shadow:inset 0 -3px 0 #0000001f,0 6px 14px #0007;transform:rotate(-9deg)}
.site-die+.site-die{transform:rotate(11deg) translateY(8px)}
.site-die i{width:80%;height:80%;margin:auto;border-radius:50%;background:var(--dice-pip-color,#15181d);box-shadow:var(--dice-pip-glow,none)}
@media (max-width:480px){
  .site-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .site-item-pre{height:104px;padding:10px}
  .site-item-body{padding:10px 10px 2px}
  .site-item-foot{padding:8px 10px 10px}
  .site-item-err{padding:0 10px 10px}
  .site-dice{gap:10px}.site-die{width:42px;height:42px;padding:7px}
}

/* --- settings --- */
.site-switch{position:relative;display:flex;align-items:center;gap:14px;cursor:pointer}
.site-switch input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.site-switch-ui{position:relative;flex:none;width:46px;height:26px;border:1px solid var(--line);border-radius:13px;background:#ffffff1f;transition:background-color .2s,border-color .2s}
.site-switch-ui::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0006;transition:transform .2s var(--ease-spring)}
.site-switch input:checked+.site-switch-ui{background:var(--go);border-color:var(--go)}
.site-switch input:checked+.site-switch-ui::after{transform:translateX(20px)}
.site-switch input:focus-visible+.site-switch-ui{outline:2px solid #7bbcff;outline-offset:2px}
.site-switch input:disabled+.site-switch-ui{opacity:.55}
.site-switch-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.site-prov-list{list-style:none;margin:0;padding:0}
.site-prov-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;padding:12px 0;border-top:1px solid var(--line)}
.site-prov-row:first-child{border-top:0;padding-top:0}
.site-prov{flex:none;width:38px;height:38px;padding:7px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center}
.site-prov svg{display:block;width:100%;height:100%}
.site-prov-main{flex:1 1 150px;min-width:0;display:flex;flex-direction:column}
.site-prov-act{flex:none;max-width:100%}

/* --- toast --- */
.site-toast-host{position:fixed;left:0;right:0;bottom:20px;z-index:70;display:flex;justify-content:center;padding:0 16px;pointer-events:none}
.site-toast{max-width:min(520px,100%);padding:11px 16px;border:1px solid var(--line);border-left-width:4px;border-radius:var(--r-md);background:#16191d;color:var(--ink);box-shadow:var(--shadow-2);font-weight:500;pointer-events:auto;animation:site-toast-in .22s var(--ease-spring)}
.site-toast--ok{border-left-color:var(--go)}
.site-toast--err{border-left-color:var(--bad)}
@keyframes site-toast-in{from{opacity:0;transform:translateY(14px)}}

/* game -> site way back (lobby header, under the player cards) */
.backlink{display:inline-block;margin:0 0 10px;color:#9aa4b4;font-size:13px;text-decoration:none}.backlink:hover{color:#fff}
.left .backlink{margin:12px 0 0 4px}

/* settings: profile photo upload */
.site-avedit{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.site-avedit-act{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}
.site-file{position:relative;overflow:hidden;cursor:pointer}
.site-file input{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}
.site-file.site-busy{opacity:.6;pointer-events:none}
/* profile: finished games */
.site-hist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.site-hist-row{display:flex;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #ffffff12}
.site-hist-row:first-child{border-top:0}
.site-hist-res{flex:none;min-width:92px;text-align:center;padding:4px 10px;border-radius:999px;font-size:13px;font-weight:700}
.site-hist-res--win{background:#8cc15226;color:#a5d96b}
.site-hist-res--loss{background:#ed556522;color:#f17d8a}
.site-hist-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.site-hist-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-guest-tag{display:inline-block;padding:0 5px;border-radius:4px;background:#ffffff14;color:var(--muted,#9aa4b2);font-size:11px;font-weight:600;vertical-align:1px}
.site-hist li + li > .site-hist-link{border-top:1px solid #ffffff12} /* the <a> is its <li>'s first child */
.site-hist-link{color:inherit;text-decoration:none;margin:0 -10px;padding:10px;border-radius:var(--r-sm);transition:background-color .15s}
.site-hist-link:hover,.site-hist-link:focus-visible{background:#ffffff0a}
.site-hist-go{margin-left:auto;color:var(--muted);font-size:1.4rem;line-height:1}
/* /g/{id}: results of one game */
.site-res{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.site-res-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--r-md);background:#ffffff08;min-width:0}
.site-res-row.is-win{background:linear-gradient(90deg,#f0b54a26,#f0b54a08);box-shadow:inset 0 0 0 1px #f0b54a55;padding:14px 12px}
.site-res-place{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#ffffff12;color:var(--muted);font-weight:800}
.site-res-row.is-win .site-res-place{background:#f0b54a;color:#3a2600}
.site-res-place svg{width:18px;height:18px}
.site-res-name{font-weight:700;color:var(--ink);text-decoration:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.site-res-name:hover{text-decoration:underline}
.site-res-out{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;text-align:right;flex:none}
.site-res-chips{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.site-res-chip{display:flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;border-radius:999px;background:#ffffff0d}

/* own profile: click the avatar to change the photo */
/* the label is exactly the avatar circle (the profile's bottom gap moves to the label), so the overlay is round */
.site-avpick{position:relative;display:inline-block;border-radius:50%;cursor:pointer;line-height:0;margin-bottom:10px}
.site-profile .site-avpick .site-av{margin-bottom:0}
.site-avpick input{position:absolute;inset:0;z-index:4;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
/* hover: the photo blurs and darkens, a pencil fades/scales in */
/* z-index 1 = same layer as the photo (.site-av-in) but later in the DOM, so it covers the photo and stays under
   the online dot (.site-av-dot, z-index 2); the file input (4) keeps the whole circle clickable */
.site-avpick-hint{position:absolute;inset:0;z-index:1;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;
  background:#0000;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);opacity:0;pointer-events:none;
  transition:opacity .22s ease,background-color .22s ease,backdrop-filter .22s ease,-webkit-backdrop-filter .22s ease}
.site-avpick-hint svg{width:32%;height:32%;filter:drop-shadow(0 1px 3px #0009);transform:scale(.7);transition:transform .22s cubic-bezier(.2,.8,.3,1.3)}
.site-avpick:hover .site-avpick-hint,.site-avpick:focus-within .site-avpick-hint{opacity:1;background:#0000004d;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
.site-avpick:hover .site-avpick-hint svg,.site-avpick:focus-within .site-avpick-hint svg{transform:scale(1)}
.site-avpick.site-busy{opacity:.6;pointer-events:none}
/* touch screens have no hover: a small pencil badge stays in the corner */
@media (hover:none){
  .site-avpick-hint,.site-avpick:focus-within .site-avpick-hint{opacity:1;inset:auto 0 0 auto;width:30%;height:30%;background:#37bc9d;
    -webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:0 0 0 3px var(--surface)}
  .site-avpick-hint svg{width:58%;height:58%;transform:none}
}
@media (prefers-reduced-motion:reduce){.site-avpick-hint,.site-avpick-hint svg{transition:none}}

/* game over: the board blurs quickly but smoothly - a separate backdrop layer whose blur radius, tint and opacity
   ramp together in ONE continuous 0.7 s ease-in-out (no middle keyframes: easing applies per keyframe segment and
   would make it pause), then the card with places and coins rises in as the blur settles (once, see app.js) */
.gameover{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:16px}
.go-bg{position:absolute;inset:0;background:#0b0d1073;-webkit-backdrop-filter:blur(10px) saturate(.85);backdrop-filter:blur(10px) saturate(.85)}
.gameover.enter .go-bg{will-change:opacity,backdrop-filter;animation:go-blur .7s cubic-bezier(.42,0,.2,1) both}
.gameover.enter .go-card{animation:go-card .45s cubic-bezier(.22,1,.36,1) .4s both}
@keyframes go-blur{from{opacity:0;-webkit-backdrop-filter:blur(0) saturate(1);backdrop-filter:blur(0) saturate(1)}}
@keyframes go-card{from{opacity:0;transform:translateY(14px) scale(.97)}}
.go-card{position:relative;width:min(440px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px 22px 20px;border-radius:var(--r-lg);background:var(--surface);
  border:1px solid var(--line);box-shadow:0 24px 60px #000a;text-align:center}
.go-crown{width:46px;height:46px;margin:0 auto 6px;color:#f0b54a;filter:drop-shadow(0 4px 10px #f0b54a55)}
.go-crown svg{width:100%;height:100%}
.go-card h2{margin:0;font-size:1.45rem;color:var(--ink);text-transform:none;letter-spacing:0}
.go-win{margin:4px 0 16px;color:var(--muted)}
.go-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;text-align:left}
.go-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--r-md);background:#ffffff0a}
.go-row.is-win{background:linear-gradient(90deg,#f0b54a2e,#f0b54a0a);box-shadow:inset 0 0 0 1px #f0b54a66}
.go-place{flex:none;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#ffffff14;color:var(--muted);font-weight:800}
.go-row.is-win .go-place{background:#f0b54a;color:#3a2600}
.go-place svg{width:16px;height:16px}
.go-name{flex:1;min-width:0;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.go-name small{color:var(--muted);font-weight:500}
.go-coins{flex:none;display:inline-flex;align-items:center;gap:5px;font-weight:800;color:#ffc83d;font-variant-numeric:tabular-nums}
.go-coins.zero{color:var(--muted)}
.go-coin{width:18px;height:18px}
.go-guest{flex:none;color:var(--muted);font-size:.8rem}
.go-case{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 4px;border-radius:999px;background:#a46bff26;color:#d4bcff;font-size:.78rem;font-weight:700;
  box-shadow:inset 0 0 0 1px #a46bff55}
.go-case img{width:22px;height:22px}
.gameover.enter .go-case{animation:go-case .5s cubic-bezier(.3,1.6,.5,1) .9s both}
@keyframes go-case{from{opacity:0;transform:scale(.4) rotate(-12deg)}}
.go-note{margin:14px 0 0;color:var(--muted);font-size:.85rem}
.go-btns{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}
.go-btns .btn{text-decoration:none}
.go-btns .go-home{flex:1;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.reduce-motion .gameover.enter .go-bg,.reduce-motion .gameover.enter .go-card{animation:none}
@media (prefers-reduced-motion:reduce){.gameover.enter .go-bg,.gameover.enter .go-card{animation:none}}


/* dev test room: money cheats under the player cards, «Пойти сюда» on the tile card */
.devpanel{margin-top:12px;padding:12px;border:1px dashed #f0a02099;border-radius:var(--radius);background:#f0a0200f}
.devpanel h2{color:#f0b54a;margin:0 0 8px}
.devrow{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.devrow .btn.tiny{flex:1 1 auto;padding:5px 8px}
.devrow input{flex:1 1 90px;width:90px;padding:5px 8px;font-size:.85rem}
.devhint{margin:0;color:var(--muted);font-size:.78rem;line-height:1.35}
.tag.devtag{background:#7a5200;color:#ffe2a8;vertical-align:middle;font-size:.9rem}
.abtn.devgo{background:#f0a020}.abtn.devgo:hover:not(:disabled){background:#d88c12}
.site-st--test{background:#7a520066;color:#ffe2a8}
.site-devbtn{display:block;width:100%;margin-top:14px;border-style:dashed;border-color:#f0a02099;background:#f0a02014;color:#ffd58a}
.site-devbtn:hover{background:#f0a02026}
.site-devbtn + .site-muted{margin-top:6px}

/* ---- room chat (web/chat.js): lobby list, lines woven into the board-centre log, input row, 7TV emote picker ---- */
.chatline .pn::after{content:":";color:#c3cad7;font-weight:400;margin-right:.35em}
.ctext{overflow-wrap:anywhere;color:#eef1f6}
.emote{height:1.9em;width:auto;max-width:7em;vertical-align:middle;margin:-.4em .06em;object-fit:contain}
.chatline.emote-only .emote{height:2.7em;max-width:9em;margin:.05em .06em}
.chatbar{position:relative;z-index:2;flex:none;display:flex;gap:max(4px,.5cqw);align-items:center;width:100%}
.chatbar input{flex:1;min-width:0;height:max(30px,3.3cqw);padding:0 max(8px,1cqw);border-radius:9px;border:1px solid #ffffff1f;background:#11141a99;color:#eef1f6;font-size:max(13px,1.45cqw)}
.chatbar input::placeholder{color:#8d96a5}
.chatbar input:focus{outline:none;border-color:var(--accent)}
.chat-emo,.chat-send{flex:none;width:max(30px,3.3cqw);height:max(30px,3.3cqw);padding:0;border:0;border-radius:9px;display:grid;place-items:center;cursor:pointer;background:#ffffff14;color:#c3cad7}
.chat-emo svg,.chat-send svg{width:58%;height:58%}
.chat-emo:hover,.chat-emo.on{background:#ffffff29;color:#fff}
.chat-send{background:var(--accent);color:#fff}
.chat-send:hover{filter:brightness(1.08)}
.chat-emo:focus-visible,.chat-send:focus-visible,.emo:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.emopick{position:absolute;left:0;right:0;bottom:calc(100% + 6px);z-index:6;padding:8px;border-radius:12px;background:#1b1f26;border:1px solid #ffffff1c;box-shadow:0 12px 32px #000a}
.emopick.in{animation:emopick-in .14s ease-out} /* chat.js mountPicker: only when it opens, not on re-renders */
@keyframes emopick-in{from{opacity:0;translate:0 6px}}
@media (prefers-reduced-motion:reduce){.emopick.in{animation:none}}
.emogrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(46px,1fr));gap:2px;max-height:min(250px,40vh);overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.emo{height:46px;padding:5px;border:0;border-radius:8px;background:transparent;cursor:pointer;display:grid;place-items:center}
.emo:hover{background:#ffffff17}
.emo img{max-width:100%;max-height:34px;object-fit:contain}
.emofoot{margin-top:6px;font-size:12px;color:#8d96a5;text-align:right}
.emofoot a{color:inherit}
.emo-empty{margin:10px;color:#8d96a5;font-size:13px}
.lobby-chat .chatlist{list-style:none;margin:0 0 10px;padding:0;min-height:96px;max-height:260px;overflow:auto;display:flex;flex-direction:column;gap:5px;scrollbar-width:thin;font-size:.95rem}
.lobby-chat .chatlist li:first-child{margin-top:auto}
.lobby-chat .chat-empty{color:var(--muted);font-size:.9rem}
.lobby-chat .chatbar{gap:6px}
.lobby-chat .chatbar input{height:40px;padding:0 12px;font-size:15px}
.lobby-chat .chat-emo,.lobby-chat .chat-send{width:40px;height:40px}

/* ===== top bar: people search (left of the coins) ===== */
.site-find{position:relative}
.site-iconbtn{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid var(--line);border-radius:50%;background:#ffffff0a;color:var(--ink);cursor:pointer;transition:background-color .15s,border-color .15s}
.site-iconbtn .site-ico{width:18px;height:18px}
.site-iconbtn:hover,.site-find.is-open .site-iconbtn{background:#ffffff1c;border-color:#ffffff40}
.site-iconbtn:focus-visible{outline:2px solid #7bbcff;outline-offset:2px}
.site-findpop{position:absolute;right:-90px;top:calc(100% + 12px);z-index:55;width:min(400px,calc(100vw - 24px));padding:12px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);box-shadow:var(--shadow-2);animation:site-pop .12s ease-out}
.site-search--sm{padding:0 12px}
.site-findpop .site-search input{flex:1;min-width:0;padding:10px 0;border:0;background:none;color:var(--ink);font:inherit;font-size:16px;-webkit-appearance:none;appearance:none}
.site-findres{max-height:min(420px,60vh);overflow:auto;margin-top:8px;transition:opacity .15s;overscroll-behavior:contain}
.site-findres.is-busy{opacity:.55}
.site-findres .site-hint{margin:8px 2px 2px}
.site-users--sm .site-urow{gap:10px;padding:9px 2px;flex-wrap:nowrap}
.site-users--sm .site-urow-act{width:auto;padding:0}
.site-users--sm .btn{min-height:32px;padding:5px 10px;font-size:.82rem}
.site-users--sm .site-pill{padding:4px 9px;font-size:.78rem}
.site-avbtn{position:relative}
.site-badge--av{position:absolute;right:-6px;top:-4px;z-index:3;box-shadow:0 0 0 2px var(--bg)}
.site-menu .site-menu-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.site-ingame .site-ico{width:14px;height:14px}
@media (max-width:560px){.site-findpop{right:-130px}}
@media (max-width:420px){.site-find{position:static}.site-findpop{left:12px;right:12px;width:auto}}

/* ===== home ===== */
.site-home{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;align-items:start}
.site-home-main{display:flex;flex-direction:column;gap:16px;min-width:0}
.site-home-side{position:sticky;top:76px;min-width:0}
.site-fside{padding:16px}
.site-flist{list-style:none;margin:0 0 12px;padding:0;max-height:calc(100vh - 260px);overflow:auto;scrollbar-width:thin}
.site-frow{display:flex;align-items:center;gap:10px;padding:7px 4px;border-radius:var(--r-sm)}
.site-frow:hover{background:#ffffff08}
.site-frow-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.site-frow .site-nick{font-size:.95rem}
.site-frow .site-urow-sub{font-size:.8rem}
.site-fside-on{margin:-6px 0 8px}
.site-fside-empty{margin:0 0 12px}
.site-fside .site-alert{font-size:.88rem;padding:8px 12px}
.site-stats--home{grid-template-columns:repeat(3,minmax(0,1fr))}
.site-stats--home .site-stat{padding:14px 10px}
.site-stats--home .site-stat b{font-size:1.6rem}
.site-stat--wide{grid-column:1/-1}
.site-stat--live b{color:#b5e27f}
.site-play--row{flex-direction:row;flex-wrap:wrap;align-items:flex-end;gap:16px}
.site-play-main{flex:1 1 260px;display:flex;flex-direction:column;gap:10px;min-width:0}
.site-play-join{flex:1 1 260px;min-width:0}
.site-head .site-small{display:inline-flex;align-items:center;gap:6px}
.site-game.is-mine{margin:0 -10px;padding-left:10px;padding-right:10px;border-radius:var(--r-md);background:#37bc9d14}
.site-st--mine{background:#37bc9d33;color:#8ff0d6}
.site-st--test{background:#f0a02024;color:#f6c46a}
.site-game-meta{display:inline-flex;align-items:center;gap:10px;color:var(--muted);font-size:.82rem}
.site-game-eye{display:inline-flex;align-items:center;gap:4px}
.site-gp{display:inline-flex;align-items:center;gap:6px;padding:2px 9px 2px 3px;border-radius:99px}
.btn.site-watchbtn{background:#3d8bff1f;border-color:#3d8bff59;color:#9cc4ff}
.btn.site-watchbtn:hover:not(:disabled){background:#3d8bff33}
@media (max-width:900px){
  .site-home{grid-template-columns:minmax(0,1fr)}
  .site-home-side{position:static;order:2}
  .site-flist{max-height:none}
}
@media (max-width:520px){.site-stats--home .site-stat b{font-size:1.3rem}.site-stats--home .site-stat span{font-size:.75rem}}

/* ===== what an account gives / what a guest misses ===== */
.site-perks{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.site-perks li{display:flex;align-items:center;gap:12px}
.site-perks li div{display:flex;flex-direction:column;min-width:0}
.site-perks b{font-size:.95rem}
.site-perks span:not(.site-perk-ic){color:var(--muted);font-size:.84rem}
.site-perk-ic{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#ffffff0d;color:var(--go)}
.site-perk-ic .site-coin,.site-perk-ic .site-ico{width:20px;height:20px}
.site-perk-img{width:26px;height:26px}
.site-guestwarn{display:flex;gap:12px;align-items:flex-start;margin:0 0 16px;padding:12px 14px;border:1px solid #f0a02066;border-radius:var(--r-md);background:#f0a02014;color:#f3d9a6;font-size:.9rem;line-height:1.45}
.site-guestwarn .site-ico{width:20px;height:20px;margin-top:1px;color:#f6c46a}
.site-guestwarn b{color:#ffd88a}

/* ===== profile: friends ===== */
.site-h3{display:flex;align-items:center;gap:8px;margin:0 0 6px;font-size:.92rem;font-weight:700;color:var(--muted)}
.site-fblock+.site-fblock{margin-top:18px}
.site-fblock--hl{padding:12px 14px;border:1px solid #ed556566;border-radius:var(--r-md);background:#ed55650f}

/* ===== shop ===== */
.shop-hero{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:18px 28px;padding:26px;border-radius:var(--r-lg);overflow:hidden;isolation:isolate;
  background:radial-gradient(120% 140% at 0% 0%,#37bc9d38,transparent 55%),radial-gradient(120% 140% at 100% 100%,#a46bff33,transparent 55%),var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-1)}
.shop-hero-main{flex:1 1 320px;min-width:0}
.shop-hero-main .site-muted{margin-top:8px;max-width:560px}
.shop-hero-side{flex:0 1 300px;display:flex;flex-direction:column;gap:10px;min-width:220px}
.shop-wallet{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:var(--r-md);background:#ffc83d17;border:1px solid #ffc83d40;color:var(--gold)}
.shop-wallet .site-coin{width:30px;height:30px}
.shop-wallet b{font-size:1.7rem;font-weight:800;font-variant-numeric:tabular-nums;line-height:1}
.shop-wallet span{color:#e9c977;font-size:.9rem}
.shop-progress{display:flex;flex-direction:column;gap:6px;font-size:.85rem;color:var(--muted)}
.shop-progress b{color:var(--ink)}
.shop-progress i{display:block;height:8px;border-radius:4px;background:#ffffff14;overflow:hidden;position:relative}
.shop-progress i::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--p);border-radius:4px;background:linear-gradient(90deg,var(--go),#a46bff)}
.shop-cases{display:inline-flex;align-items:center;gap:8px;color:#cdb4ff;font-weight:600;font-size:.9rem;text-decoration:none}
.shop-cases img{width:28px;height:28px}
.shop-cases:hover{text-decoration:underline}
.shop-showcase{display:flex;flex-direction:column;gap:12px}
.shop-sc-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px}
.shop-sc-head .site-h2{margin:0;font-size:1.25rem}
.shop-sc-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
/* the catalogue: a sticky left nav (sections, brand categories nested under "Фирмы", filters) and the grid */
/* at least a screen tall: a short category picked far down the page keeps the scroll (and the sticky nav) in place
   instead of the page shrinking under it */
.shop-layout{display:grid;grid-template-columns:262px minmax(0,1fr);gap:16px;align-items:start;min-height:calc(100vh - 76px)}
.shop-side{position:sticky;top:76px;display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - 92px);overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain;
  padding:10px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-1)}
.shop-nav{display:flex;flex-direction:column;gap:2px}
.shop-tab{display:flex;align-items:center;gap:10px;width:100%;padding:7px 10px 7px 7px;border:0;border-radius:10px;background:none;color:var(--muted);font:inherit;font-weight:700;font-size:.95rem;text-align:left;cursor:pointer;transition:background-color .15s,color .15s}
.shop-tab:hover{color:var(--ink);background:#ffffff0a}
.shop-tab.is-on{background:#ffffff10;color:var(--ink)}
.shop-tab-l{flex:1;min-width:0}
.shop-tab-ic{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#ffffff0d}
.shop-tab.is-on .shop-tab-ic{background:#37bc9d2e;color:#6fe0c4}
.shop-tab-ic svg{width:18px;height:18px}
.shop-tab small,.shop-cat small{flex:none;padding:1px 7px;border-radius:99px;background:#ffffff12;color:var(--muted);font-size:.72rem;font-weight:700;font-variant-numeric:tabular-nums}
.shop-subnav{display:flex;flex-direction:column;gap:1px;margin:3px 0 6px 21px;padding-left:8px;border-left:1px solid var(--line)}
.shop-cat{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px 6px 10px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:.88rem;font-weight:600;text-align:left;cursor:pointer;transition:background-color .15s,color .15s}
.shop-cat span{flex:1;min-width:0;overflow-wrap:anywhere}
.shop-cat:hover{color:var(--ink);background:#ffffff0a}
.shop-cat.is-on{background:#37bc9d26;color:#bff5e6;box-shadow:inset 2px 0 0 var(--go)}
.shop-cat.is-on small{background:#37bc9d3d;color:#bff5e6}
.shop-side-h{margin:0;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.shop-filters{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:12px 6px 4px;border-top:1px solid var(--line)}
.shop-content{display:flex;flex-direction:column;gap:12px;min-width:0}
.shop-listhead{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 14px;min-height:30px}
.shop-listhead .site-h2{margin:0;font-size:1.25rem}
.shop-listhead-up{color:var(--muted);font-weight:700}
.shop-listhead-up::after{content:" / ";color:#ffffff33}
.shop-chips{display:flex;flex-wrap:wrap;gap:6px}
.shop-chip{--rc:#b6c0c8;padding:5px 12px;border:1px solid var(--line);border-radius:99px;background:none;color:var(--muted);font:inherit;font-size:.82rem;font-weight:700;cursor:pointer}
.shop-chip:hover{color:var(--ink)}
.shop-chip.is-on{color:#11161b;background:var(--ink);border-color:var(--ink)}
.shop-chip.rar-common{--rc:#b6c0c8}.shop-chip.rar-rare{--rc:#6fa6ff}.shop-chip.rar-epic{--rc:#c39bff}.shop-chip.rar-legendary{--rc:#ffcc6a}
.shop-chip[class*=rar-]{color:var(--rc);border-color:color-mix(in srgb,var(--rc) 40%,transparent)}
.shop-chip[class*=rar-].is-on{background:var(--rc);border-color:var(--rc);color:#11161b}
.shop-toggle{display:inline-flex;align-items:center;gap:8px;padding:4px 2px;border:0;background:none;color:var(--muted);font:inherit;font-size:.88rem;font-weight:600;cursor:pointer}
.shop-toggle i{position:relative;width:34px;height:20px;border-radius:10px;background:#ffffff1f;transition:background-color .15s}
.shop-toggle i::after{content:"";position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .15s}
.shop-toggle.is-on{color:var(--ink)}
.shop-toggle.is-on i{background:var(--go)}
.shop-toggle.is-on i::after{transform:translateX(14px)}
.shop-hint{margin:0;padding:10px 14px;border-radius:var(--r-md);background:#ffffff08;color:var(--muted);font-size:.88rem}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:14px}
.shop-foot{text-align:center}
/* cards: the rarity colours the frame, the glow behind the preview and the label */
.shop-card{--rc:#b6c0c8;position:relative;display:flex;flex-direction:column;min-width:0;border-radius:var(--r-lg);overflow:hidden;isolation:isolate;
  background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 9%,var(--surface)),var(--surface) 60%);border:1px solid color-mix(in srgb,var(--rc) 30%,var(--line));
  box-shadow:var(--shadow-1);transition:transform .18s ease,box-shadow .18s ease,border-color .18s}
.shop-card.rar-rare{--rc:#4f8dff}.shop-card.rar-epic{--rc:#a46bff}.shop-card.rar-legendary{--rc:#f0b54a}
.shop-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--rc) 65%,transparent);box-shadow:0 10px 28px #0007,0 0 0 1px color-mix(in srgb,var(--rc) 35%,transparent)}
.shop-card.rar-epic,.shop-card.rar-legendary{box-shadow:0 0 0 1px color-mix(in srgb,var(--rc) 25%,transparent),0 6px 22px color-mix(in srgb,var(--rc) 18%,transparent)}
.shop-card.is-on{border-color:var(--go);box-shadow:0 0 0 1px var(--go),var(--shadow-1)}
.shop-card-pre{position:relative;height:132px;display:flex;align-items:center;justify-content:center;padding:16px;overflow:hidden;
  background:radial-gradient(70% 80% at 50% 45%,color-mix(in srgb,var(--rc) 30%,transparent),transparent 72%),#00000026}
.shop-card-pre img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.shop-card.rar-legendary .shop-card-pre::after{content:"";position:absolute;inset:-20% auto -20% -60%;width:45%;transform:skewX(-20deg);
  background:linear-gradient(90deg,transparent,#fff3,transparent);animation:shop-shine 3.6s ease-in-out infinite;pointer-events:none}
@keyframes shop-shine{0%,55%{left:-60%}100%{left:130%}}
.shop-rar{position:absolute;left:10px;top:10px;padding:2px 8px;border-radius:99px;background:#0009;color:var(--rc);font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rc) 50%,transparent)}
.shop-flag{position:absolute;right:10px;top:10px;display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 6px;border-radius:99px;background:#0009;color:#b5e27f;font-size:.7rem;font-weight:700}
.shop-flag .site-ico{width:12px;height:12px}
.shop-flag--on{background:var(--go);color:#06210f}
.shop-card-body{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 14px 6px}
.shop-card-name{margin:0;font-size:1rem;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
.shop-card-cat{color:var(--rc);font-size:.72rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.shop-card-desc{margin:0;color:var(--muted);font-size:.82rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.shop-card-foot{padding:8px 14px 14px}
.shop-card-foot>.btn,.shop-card-foot .site-brandpick-btns{width:100%}
.shop-buy{width:100%;min-height:40px;display:flex;align-items:center;justify-content:center;gap:7px;padding:6px 12px;border:0;border-radius:10px;cursor:pointer;
  background:linear-gradient(180deg,#43d3ad,#2fa88b);color:#06210f;font:inherit;font-weight:800;box-shadow:inset 0 -2px 0 #0002,0 3px 10px #37bc9d40;transition:transform .12s,filter .15s}
.shop-buy:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}
.shop-buy .site-coin{width:18px;height:18px}
.shop-buy b{font-variant-numeric:tabular-nums}
.shop-buy span{font-weight:700;opacity:.8}
.shop-buy.is-short{background:#ffffff0f;color:var(--muted);box-shadow:none;cursor:not-allowed}
.shop-buy.is-short b{color:var(--ink)}
.shop-buy.is-short span{font-size:.78rem;font-weight:600}
.shop-card--big .shop-card-pre{height:168px}
.shop-card--big .site-dice{transform:scale(1.2)}
.shop-card--big .site-brandlogo{width:min(200px,100%)}
.shop-card--big .shop-card-name{font-size:1.08rem}
.reduce-motion .shop-card-pre::after{animation:none!important;display:none}
@media (prefers-reduced-motion:reduce){.shop-card-pre::after{animation:none!important;display:none}}
@media (max-width:900px){.shop-sc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* the top bar wraps to two rows here (~94px): sticky sidebars go below it */
@media (max-width:940px){
  .site-home-side,.shop-side{top:106px}
  .shop-side{max-height:calc(100vh - 122px)}
}
/* narrow: the nav goes on top - three sections in a row, the brand categories as wrapping chips under them */
@media (max-width:760px){
  .shop-layout{grid-template-columns:minmax(0,1fr)}
  .shop-side{position:static;max-height:none;overflow:visible}
  .shop-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .shop-navgrp{display:contents}
  .shop-tab{flex-direction:column;justify-content:center;gap:4px;padding:8px 4px;text-align:center;font-size:.88rem}
  .shop-tab-l{flex:none}
  .shop-subnav{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;gap:6px;margin:4px 0 0;padding:0;border:0}
  .shop-subnav:not(.is-open){display:none}
  .shop-cat{width:auto;padding:6px 10px;border:1px solid var(--line);border-radius:99px}
  .shop-cat.is-on{box-shadow:none;border-color:#37bc9d80}
  .shop-cat span{overflow:visible}
  .shop-filters{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:10px 2px 2px}
  .shop-filters .shop-side-h{display:none}
}
@media (max-width:560px){
  .shop-hero{padding:18px}
  .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .shop-card-pre{height:108px;padding:10px}
  .shop-card--big .shop-card-pre{height:128px}
  .shop-card-body{padding:10px 10px 4px}
  .shop-card-foot{padding:6px 10px 10px}
  .shop-buy span{display:none}
}

/* ===== game room: spectators, guests ===== */
.eye{width:16px;height:16px;flex:none}
.watchers{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.watchme,.watchn{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:99px;font-size:.82rem;font-weight:700}
.watchme{background:#3d8bff26;color:#9cc4ff;box-shadow:inset 0 0 0 1px #3d8bff55}
.watchn{background:#ffffff10;color:var(--muted)}
.watchlobby{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:10px;background:#3d8bff1a;border:1px solid #3d8bff4d;color:#cfe0ff}
.watchlobby a{color:#9cc4ff;font-weight:700}
.guestnote{margin:12px 0;padding:10px 14px;border-radius:10px;border:1px solid #f0a02066;background:#f0a02014;color:#f3d9a6;font-size:.9rem;line-height:1.45}
.guestnote b{color:#ffd88a}
.guestnote a{color:#ffd88a;font-weight:700}
