/* ============================================================================
   Glass icons: every drawn icon sits on a small pane of frosted glass — see-
   through, a bright edge, a gloss across the top, and whatever is behind it
   softly blurred. Page headings, the icons on sections inside pages, games, top bar.
   The side menu keeps its plain drawn icons. Loaded last.
   ============================================================================ */

/* how strong the glass is, in light and in dark */
:root[data-skin]{--gl-hi:rgba(255,255,255,.7);--gl-lo:rgba(255,255,255,.2);--gl-edge:rgba(255,255,255,.75);--gl-gloss:rgba(255,255,255,.6);--gl-ink:color-mix(in srgb,var(--brand) 82%,#15132e)}
:root[data-theme="dark"][data-skin]{--gl-hi:rgba(255,255,255,.2);--gl-lo:rgba(255,255,255,.05);--gl-edge:rgba(255,255,255,.28);--gl-gloss:rgba(255,255,255,.24);--gl-ink:color-mix(in srgb,var(--brand) 70%,#ffffff)}

/* the pane itself (shared) */
:root[data-skin] .ph-ic,:root[data-skin] .gm-ic,:root[data-skin] header.top .btn.sm{
  position:relative;overflow:hidden;
  backdrop-filter:blur(10px) saturate(1.7);-webkit-backdrop-filter:blur(10px) saturate(1.7)}
/* the gloss: light caught along the top edge, fading out across the pane */
:root[data-skin] .ph-ic::after,:root[data-skin] .gm-ic::after,:root[data-skin] header.top .btn.sm::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(158deg,var(--gl-gloss),transparent 46%),radial-gradient(120% 60% at 50% 118%,rgba(255,255,255,.22),transparent 60%)}
:root[data-skin] .ph-ic svg,:root[data-skin] .gm-ic svg,:root[data-skin] header.top .btn.sm svg{position:relative;z-index:1}

/* ---------- page headings: glass in front of a ball of the theme's colour ---------- */
.page-head{isolation:isolate}
.page-head{gap:22px}
.page-head::before{content:"";position:absolute;z-index:-1;left:14px;top:50%;width:42px;height:42px;border-radius:50%;translate:0 -30%;
  background:var(--grad);box-shadow:0 14px 26px -10px var(--h2);transition:translate .7s var(--ease),scale .7s var(--ease)}
.page-head:hover::before{translate:5px -42%;scale:1.08}
:root[data-skin] .page-head .ph-ic{color:var(--gl-ink);border-radius:18px;rotate:-5deg;border:1px solid var(--gl-edge);
  background:linear-gradient(150deg,var(--gl-hi),var(--gl-lo));
  box-shadow:inset 0 1px 0 var(--gl-edge),inset 0 -10px 16px -10px color-mix(in srgb,var(--h2) 45%,transparent),0 14px 26px -16px color-mix(in srgb,var(--ink) 60%,transparent)}
:root[data-skin] .page-head .ph-ic svg{filter:drop-shadow(0 1px 0 rgba(255,255,255,.55))}
:root[data-theme="dark"][data-skin] .page-head .ph-ic svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}

/* ---------- games ---------- */
/* on its own (Home links, a game's start screen): glass tinted with the game's colour */
:root[data-skin] .gm-ic{color:color-mix(in srgb,var(--tint,var(--brand)) 74%,#15132e);border:1px solid var(--gl-edge);
  background:linear-gradient(150deg,color-mix(in srgb,var(--tint,var(--brand)) 20%,var(--gl-hi)),color-mix(in srgb,var(--tint,var(--brand)) 26%,var(--gl-lo)));
  box-shadow:inset 0 1px 0 var(--gl-edge),inset 0 -10px 14px -10px color-mix(in srgb,var(--tint,var(--brand)) 60%,transparent),0 12px 20px -14px var(--tint,var(--brand))}
:root[data-theme="dark"][data-skin] .gm-ic{color:color-mix(in srgb,var(--tint,var(--brand)) 55%,#ffffff)}
:root[data-skin] .gm-ic.lg{box-shadow:inset 0 1px 0 var(--gl-edge),inset 0 -16px 22px -14px color-mix(in srgb,var(--tint,var(--brand)) 60%,transparent),0 22px 34px -20px var(--tint,var(--brand))}
/* on a coloured game card: clear glass, white strokes */
:root[data-skin] .gm-tile .gm-ic{color:#ffffff;border-color:rgba(255,255,255,.5);background:linear-gradient(150deg,rgba(255,255,255,.36),rgba(255,255,255,.08));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65),inset 0 -10px 14px -10px rgba(255,255,255,.3),0 12px 20px -12px rgba(0,0,0,.45)}
:root[data-skin] .gm-tile .gm-ic::after,:root[data-skin] .gm-daily .gm-ic::after{background:linear-gradient(158deg,rgba(255,255,255,.5),transparent 46%)}
:root[data-skin] .gm-daily .gm-ic{color:#5a3700;border-color:rgba(255,255,255,.8);background:linear-gradient(150deg,rgba(255,255,255,.8),rgba(255,255,255,.28));
  box-shadow:inset 0 1px 0 #ffffff,inset 0 -10px 14px -10px rgba(201,128,15,.5),0 12px 20px -12px rgba(122,74,0,.6)}

/* ---------- the top bar ---------- */
:root[data-skin] header.top .btn.sm{border:1px solid var(--gl-edge);background:linear-gradient(150deg,var(--gl-hi),var(--gl-lo));
  box-shadow:inset 0 1px 0 var(--gl-edge),0 8px 16px -12px color-mix(in srgb,var(--ink) 60%,transparent)}
:root[data-skin] #themeBtn{border-color:rgba(255,255,255,.55);background:linear-gradient(150deg,rgba(255,255,255,.34),rgba(255,255,255,0) 55%),var(--grad);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 10px 18px -10px var(--h2)}

/* the arrows in "Needs attention", and the tick when nothing is waiting */
.todo b{border:1px solid color-mix(in srgb,var(--k,var(--brand)) 22%,transparent);box-shadow:inset 0 1px 0 var(--gl-edge)}

/* ---------- sections inside pages: the icon in front of a heading or a tab ---------- */
.sec-ic{position:relative;overflow:hidden;flex:none;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:10px 10px 10px 4px;vertical-align:-8px;margin-right:8px;
  font-size:15px;line-height:1;color:color-mix(in srgb,var(--tint,var(--wash,var(--brand))) 70%,var(--ink));border:1px solid var(--gl-edge);
  background:linear-gradient(150deg,color-mix(in srgb,var(--tint,var(--wash,var(--brand))) 16%,var(--gl-hi)),color-mix(in srgb,var(--tint,var(--wash,var(--brand))) 24%,var(--gl-lo)));
  backdrop-filter:blur(10px) saturate(1.7);-webkit-backdrop-filter:blur(10px) saturate(1.7);
  box-shadow:inset 0 1px 0 var(--gl-edge),inset 0 -8px 12px -8px color-mix(in srgb,var(--tint,var(--wash,var(--brand))) 55%,transparent),0 8px 14px -10px var(--tint,var(--wash,var(--brand)));
  transition:rotate .6s var(--ease),scale .6s var(--ease)}
.sec-ic::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(158deg,var(--gl-gloss),transparent 46%)}
.sec-ic svg{position:relative;z-index:1;width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
h3>.sec-ic,h2>.sec-ic{margin-right:2px}
.card:hover>h3>.sec-ic,.it:hover .sec-ic,button:hover>.sec-ic{rotate:-8deg;scale:1.08}
button>.sec-ic{width:24px;height:24px;border-radius:8px 8px 8px 3px;margin-right:6px;vertical-align:-6px;font-size:12px}
button>.sec-ic svg{width:14px;height:14px}
.sec-ic.big{width:44px;height:44px;border-radius:14px 14px 14px 5px;font-size:22px}
.sec-ic.big svg{width:24px;height:24px}
