/* (14 Nov 2026, Step 9) The user's glass UI kit (art/ui/glass, made by art/make_glass_kit.py from "The Glass Button Kit").
   The pictures are empty inside: the game writes the words. Buttons, tabs, option boxes and fields are 9-slice pictures (border-image:
   only the two pointed ends keep their shape, the middle stretches) so any word in any language fits. Screen by screen, starting with
   sign-in, the game setup screens, settings and the pop-ups. Loaded last. The old CSS stays underneath as the fallback: if a picture
   does not load, the old colours show. */
:root{
  --g-btn-gold:url(../art/ui/glass/btn-gold.webp); --g-btn-teal:url(../art/ui/glass/btn-teal.webp); --g-btn-red:url(../art/ui/glass/btn-red.webp);
  --g-btn-green:url(../art/ui/glass/btn-green.webp); --g-btn-grey:url(../art/ui/glass/btn-grey.webp);
  --g-opt-on:url(../art/ui/glass/opt-on.webp); --g-opt-off:url(../art/ui/glass/opt-off.webp);
  --g-tab-on:url(../art/ui/glass/tab-on.webp); --g-tab-off:url(../art/ui/glass/tab-off.webp);
  --g-input:url(../art/ui/glass/input-field.webp); --g-select:url(../art/ui/glass/select-field.webp);
  --g-tog-on:url(../art/ui/glass/tog-on.webp); --g-tog-off:url(../art/ui/glass/tog-off.webp);
  --g-panel:url(../art/ui/glass/panel-frame.webp); --g-bg:url(../art/ui/glass/glass-bg.webp?v=2);
  --g-ink:#3b1d02; --g-cream:#fff4dc;
}
/* the screens that wear the glass so far */
:is(#acctOv,#setupOv,#setOv){ --gk:1 }

/* ---- pop-up frames ---- */
html body .tabox:not(#_):not(#_):not(#_):not(#_), html body #itemOv .ivcard:not(#_):not(#_):not(#_):not(#_){
  border-style:solid !important; border-color:transparent !important; border-width:26px !important; border-image:var(--g-panel) 90 / 26px / 0 stretch !important;
  background:#06231e !important; border-radius:0 !important; box-shadow:0 18px 50px rgba(0,0,0,.6) !important;
}

/* ---- chips (scores at the table) ---- */
html body .chip:not(#_):not(#_):not(#_):not(#_){ background:url(../art/ui/glass/chip-teal.webp) center/100% 100% no-repeat !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; color:var(--g-cream) !important; padding-left:16px !important; padding-right:16px !important }
html body .chip.mine:not(#_):not(#_):not(#_):not(#_){ background-image:url(../art/ui/glass/chip-gold.webp) !important; color:var(--g-ink) !important }

/* ---- full-screen background of the glass screens and the loading screen ---- */
html body :is(#acctOv,#setupOv,#setOv):not(#_):not(#_):not(#_):not(#_){ background:#04120f var(--g-bg) center/cover no-repeat !important }
html body .boot:not(#_):not(#_):not(#_):not(#_){ background:url(../art/ui/glass/loading-bg-glass.webp?v=2) center/cover no-repeat, url(../art/ui/bg-loading-lq-warm.webp) center/cover no-repeat #04120f !important }

/* selects in two-column rows (profile): they may shrink, so nothing runs off the screen */
html body #setOv .two:not(#_):not(#_):not(#_):not(#_) > *, html body #setOv .two select:not(#_):not(#_):not(#_):not(#_){ min-width:0 !important; max-width:100% !important }
html body #setOv .two select:not(#_):not(#_):not(#_):not(#_){ --h:34px; font-size:13px; padding-left:2px !important }

/* (Step 16) the user's stained-glass Menu Icons keep their own colours: no theme tint on them */
html body .mico.sg:not(#_),html body .hstore .hsi:not(#_),html body #profOv .mrow .ico img.sg:not(#_){filter:drop-shadow(0 2px 3px rgba(0,0,0,.5)) !important}

/* FIX ROUND 2 B18 (14 Nov 2026): my score on the gold bar was orange on gold. Now dark brown, bold, with a light edge. */
html body .chip.mine:not(#_):not(#_):not(#_):not(#_){ color:#2a1300 !important; font-weight:800 !important; text-shadow:0 1px 0 rgba(255,244,205,.75) !important }
html body .chip.mine b:not(#_):not(#_):not(#_){ color:#1f0e00 !important; font-weight:900 !important; text-shadow:0 0 2px rgba(255,244,205,.95), 0 1px 0 rgba(255,244,205,.8) !important }
html body .chip.mine .sdots i:not(#_):not(#_){ border-color:#2a1300; opacity:.8 }
html body .chip.mine .sdots i.on:not(#_):not(#_){ background:#2a1300; border-color:#2a1300; opacity:1 }

/* ---- FIX ROUND 2 B24 (14 Nov 2026): voice messages, the "glow ring" look. Mic button = the glass round button; while recording a red ring
   runs down (--p = percent of the 10 s left), the time pill sits beside it, a small x above it cancels. A speaking player's avatar gets
   a pulsing gold ring and a mic badge. ---- */
html body #micBtn:not(#_):not(#_){ background:url(../art/ui/glass/btn-round.webp) center/100% 100% no-repeat !important; border:0 !important; box-shadow:none !important; font-size:0 !important; color:transparent !important; filter:drop-shadow(0 3px 5px rgba(0,0,0,.55)) }
html body #micBtn:not(#_):not(#_)::before{ content:""; position:absolute; inset:25%; background:url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23fff4dc%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%229%22%20y%3D%222.5%22%20width%3D%226%22%20height%3D%2212%22%20rx%3D%223%22%20fill%3D%22%23fff4dc%22/%3E%3Cpath%20d%3D%22M5.5%2011.5a6.5%206.5%200%200%200%2013%200M12%2018v3.5M8.5%2021.5h7%22/%3E%3C/svg%3E") center/contain no-repeat }
html body #micBtn.rec:not(#_):not(#_)::before{ inset:34%; background:#fff4dc; border-radius:3px }
html body #micBtn.rec:not(#_):not(#_)::after{ content:""; position:absolute; inset:-4px; border-radius:50%; pointer-events:none; background:conic-gradient(#ff5a4a calc(var(--p,100)*1%), rgba(255,255,255,.2) 0);
  -webkit-mask:radial-gradient(circle, transparent 61%, #000 63%); mask:radial-gradient(circle, transparent 61%, #000 63%) }
#vX{ position:fixed; z-index:32; right:calc(var(--safeR,0px) + 8px + 10px); top:calc(66% - 23px - 32px); width:26px; height:26px; padding:0; border:0; border-radius:50%; color:#fff4dc; font:800 13px/26px sans-serif; text-align:center; cursor:pointer;
  background:url(../art/ui/glass/btn-round.webp) center/100% 100% no-repeat; filter:drop-shadow(0 2px 3px rgba(0,0,0,.6)) }
#vTimeBox{ position:fixed; z-index:32; right:calc(var(--safeR,0px) + 8px + 46px + 8px); top:66%; transform:translateY(-50%); display:flex; align-items:center; gap:6px; padding:5px 12px; color:#fff4dc; font-weight:800; font-size:13px; font-variant-numeric:tabular-nums;
  background:url(../art/ui/glass/chip-teal.webp) center/100% 100% no-repeat; filter:drop-shadow(0 3px 5px rgba(0,0,0,.5)) }
#vTimeBox i{ display:block; width:9px; height:9px; border-radius:50%; background:#ff5a4a }
#vX[hidden],#vTimeBox[hidden]{ display:none }
html body.lefty #vX{ right:auto; left:calc(var(--safeL,0px) + 8px + 10px) }
html body.lefty #vTimeBox{ right:auto; left:calc(var(--safeL,0px) + 8px + 46px + 8px) }
.vbubble{ position:fixed; z-index:31; border-radius:50%; pointer-events:none; box-shadow:0 0 0 3px #ffd77a, 0 0 14px 4px rgba(255,215,122,.65); animation:vglow 1.1s ease-in-out infinite }
.vbubble u{ position:absolute; right:-6px; bottom:-6px; width:22px; height:22px; background:url(../art/ui/glass/btn-round.webp) center/100% 100% no-repeat; filter:drop-shadow(0 2px 3px rgba(0,0,0,.6)) }
.vbubble u::before{ content:""; position:absolute; inset:24%; background:url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23fff4dc%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%229%22%20y%3D%222.5%22%20width%3D%226%22%20height%3D%2212%22%20rx%3D%223%22%20fill%3D%22%23fff4dc%22/%3E%3Cpath%20d%3D%22M5.5%2011.5a6.5%206.5%200%200%200%2013%200M12%2018v3.5M8.5%2021.5h7%22/%3E%3C/svg%3E") center/contain no-repeat }
.vbubble.tap{ pointer-events:auto; cursor:pointer }
@keyframes vglow{ 0%,100%{ box-shadow:0 0 0 3px #ffd77a, 0 0 8px 2px rgba(255,215,122,.45) } 50%{ box-shadow:0 0 0 4px #ffd77a, 0 0 18px 7px rgba(255,215,122,.8) } }
@media (prefers-reduced-motion:reduce){ .vbubble{ animation:none } }

/* FIX ROUND 2 D1: the loading screen's flower picture is now the full-screen background of Home, the Games screen, Achievements and League too
   (same picture, same size, nothing on top of it). */
html body :is(#hubOv.hubov, #homeOv, #achOv, #leagueOv):not(#_):not(#_):not(#_):not(#_):not(#_){ background:#04120f url(../art/ui/glass/loading-bg-glass.webp?v=2) center/cover no-repeat !important }
html body :is(#homeOv, #achOv, #leagueOv):not(#_):not(#_):not(#_):not(#_):not(#_)::before{ background:none !important }
/* FIX ROUND 2 D2: no description line under buttons (home, games list, profile menu, settings switches, sort menu).
   Kept on purpose: the volume numbers, the store/collection lines that say HOW to unlock or "Tap again to buy for ...", and the
   league create form (it explains what Open / Invite only and the sizes mean). */
html body :is(#setOv .tog small, #hubOv button small, #homeOv button small, #profOv .mrow small, #sortMenu button small, .mrow small, .hbtn small):not(#_):not(#_):not(#_){ display:none !important }


/* FIX ROUND 2 D7: every setup is steps; js/game.js tags each part with data-gs = its step number, only the current step shows */
html body #setupOv.gsetup[data-step="1"] [data-gs]:not([data-gs="1"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup[data-step="2"] [data-gs]:not([data-gs="2"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup[data-step="3"] [data-gs]:not([data-gs="3"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup[data-step="4"] [data-gs]:not([data-gs="4"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup[data-step="5"] [data-gs]:not([data-gs="5"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup[data-step="6"] [data-gs]:not([data-gs="6"]):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }
html body #setupOv.gsetup [hidden]:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ display:none !important }

/* (14 Nov 2026, Fix Round 2 E29) Collection > Emojis: the strip of 8 and the emoji boxes are one page that scrolls UP and DOWN (the boxes wrap in rows),
   so the lowest row is no longer cut off by the frame; it ends with some space and fades at the edge like every other list (js/fade.js). */
html body #styleBox:has(>[data-cp="emojis"]:not([hidden])){ overflow-x:hidden !important; overflow-y:auto !important; padding-bottom:12px !important; touch-action:pan-y }
html body #styleBox #styleEmojis.emogrid{ grid-auto-flow:row !important; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)) !important; grid-template-rows:none !important; grid-auto-columns:auto !important; overflow:visible !important; padding:4px 4px 16px 2px !important; scroll-snap-type:none !important; touch-action:pan-y !important; -webkit-mask:none !important; mask:none !important }

/* FIX ROUND 3 item 5 (14 Nov 2026): every page that had the green cushion cloth now has the background of Edit Profile (glass-bg.webp).
   Home, Games and Achievements keep the flower picture; Edit Profile, Sign in and the game setup already had it; the story map keeps its sea.
   Leagues: the list and the pages inside a league (the same #leagueOv) use it too. */
html body :is(#profOv,#histOv,#rankOv,#friendsOv,#chOv,#collOv,#albumOv,#shopOv,#onlineOv,#inboxOv,#helpOv,#placeOv,#quickOv,#lobbyOv,#rulesOv,#rulesLOv,#rulesBOv,#rulesTOv,#leagueOv):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){ background:#04120f var(--g-bg) center/cover no-repeat !important }

/* ---------- FIX ROUND 3 (14 Nov 2026): Collection > Emojis ----------
   the strip (In games n / 8, your places, Remove all) stays at the top while the emojis scroll under it;
   tap an emoji = add, tap again = remove (a gold tick shows the chosen ones); a chosen emoji in the strip can be tapped to remove it */
html body #styleBox #loadStrip.loadstrip:not(#_):not(#_){ position:sticky; top:-1px; z-index:4; display:grid; gap:7px; margin:0 0 8px; padding:6px 4px 8px; background:linear-gradient(#071b19 85%, rgba(7,27,25,0)); box-shadow:0 1px 0 rgba(214,158,98,.25) }
html body #styleBox #loadStrip .lshead:not(#_):not(#_){ display:flex !important; align-items:center; gap:10px; grid-template-columns:none !important }
html body #styleBox #loadStrip .lshead b{ font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:#f0c691 }
html body #styleBox #loadStrip .lscount{ font-weight:800; font-size:14px; color:#fff4dc; padding:2px 10px; border-radius:999px; background:rgba(255,235,190,.12); box-shadow:inset 0 0 0 1px rgba(255,220,140,.3) }
html body #styleBox #loadStrip .lscount.full{ background:rgba(247,210,122,.22); box-shadow:inset 0 0 0 1px #f7d27a; color:#ffe9b0 }
html body #styleBox #loadStrip .lsclear{ margin-left:auto; min-height:34px; padding:2px 14px; border-radius:999px; border:1.5px solid rgba(214,158,98,.75); background:rgba(14,9,7,.7); color:#f0c691; font-weight:800; font-size:13px }
html body #styleBox #loadStrip .lsclear:disabled{ opacity:.35 }
html body #styleBox #loadStrip .lsclear:not(:disabled):active{ transform:scale(.95); filter:brightness(1.15) }
html body #styleBox #loadStrip .lsslots:not(#_):not(#_){ display:grid !important; grid-template-columns:repeat(8,minmax(0,1fr)); gap:6px }
html body #styleBox #loadStrip .slot{ position:relative; height:clamp(38px,11vh,56px); border-radius:12px }
html body #styleBox #loadStrip .slot.on{ background:rgba(232,169,59,.14); border:1.5px solid #e8a93b; cursor:pointer }
html body #styleBox #loadStrip .slot .x{ position:absolute; top:-5px; right:-5px; width:16px; height:16px; border-radius:50%; background:#2a1409; box-shadow:0 0 0 1.5px #d6a05c }
html body #styleBox #loadStrip .slot .x::before,html body #styleBox #loadStrip .slot .x::after{ content:""; position:absolute; left:3.5px; top:7.2px; width:9px; height:1.6px; background:#f0c691; transform:rotate(45deg) }
html body #styleBox #loadStrip .slot .x::after{ transform:rotate(-45deg) }
html body #styleBox #loadStrip .lsnote{ margin:0; min-height:1.3em; font-size:12.5px; color:#cfe0d8; text-align:left }
html body #styleBox #loadStrip .lsnote.warn{ color:#ffd98a; font-weight:700 }
html body #styleBox #loadStrip .lsundo{ margin-left:6px; padding:1px 10px; border-radius:999px; border:1.5px solid #f7d27a; background:none; color:#ffe9b0; font-weight:800; font-size:12.5px }
html body #styleBox .emogrid .emo{ position:relative }
html body #styleBox .emogrid .emo .mark{ position:absolute; top:5px; right:5px; width:19px; height:19px; border-radius:50%; background:rgba(0,0,0,.35); box-shadow:inset 0 0 0 1.5px rgba(255,235,190,.45) }
html body #styleBox .emogrid .emo .mark::before{ content:""; position:absolute; left:4px; top:8.2px; width:11px; height:1.8px; background:rgba(255,235,190,.8); border-radius:1px }
html body #styleBox .emogrid .emo .mark::after{ content:""; position:absolute; left:8.6px; top:3.8px; width:1.8px; height:11px; background:rgba(255,235,190,.8); border-radius:1px }
html body #styleBox .emogrid .emo.eq{ border-color:#f7d27a !important; background:linear-gradient(180deg,#1d5a52,#0c2d2b) !important; box-shadow:0 0 0 1px #f7d27a, 0 3px 10px rgba(0,0,0,.45) !important }
html body #styleBox .emogrid .emo.eq .mark{ background:linear-gradient(#f7d27a,#d9962e); box-shadow:none }
html body #styleBox .emogrid .emo.eq .mark::before{ left:4.6px; top:9px; width:5px; height:2px; background:#3b1d02; transform:rotate(45deg); transform-origin:left center }
html body #styleBox .emogrid .emo.eq .mark::after{ left:7.4px; top:10.8px; width:9px; height:2px; background:#3b1d02; transform:rotate(-50deg); transform-origin:left center }
html body #styleBox .emogrid .emo:not(.locked):not(.eq):active{ transform:scale(.96) }
html body #emoTray .enone{ font-size:12px; color:#cfe0d8; font-style:normal; padding:4px 6px }
@media (max-height:430px){
  html body #styleBox #loadStrip.loadstrip:not(#_):not(#_){ gap:5px; padding:4px 4px 6px; margin-bottom:6px }
  html body #styleBox #loadStrip .slot{ height:clamp(30px,9vh,42px) }
  html body #styleBox #loadStrip .lsnote.def{ display:none }
  html body #styleBox #loadStrip .lsclear{ min-height:30px }
}
