/* Stickee Studios: the gear and the settings panel every game page gets, and
   the account rows the panel shares with /account/. Self-contained: a game
   page has its own stylesheet, so nothing here leans on /style.css. Every
   class is prefixed stk-. The panel is a studio sticker on top of any game,
   cream and ink, the same on dark and light games. */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/fredoka-600.woff2) format('woff2');
}
:root {
  --stk-panel: #fff8ea; --stk-well: #fffdf6; --stk-border: #dcb98c; --stk-wood: #c9925a; --stk-wood-dark: #a8642a;
  --stk-text: #3b2a1a; --stk-strong: #2a1c0f; --stk-dim: #6f5a44; --stk-orange: #c2410c; --stk-blue: #1670b0;
  --stk-gold: #ffcc4d; --stk-gold-edge: #d9a520; --stk-gold-dark: #b8860b; --stk-green: #8cc56b; --stk-green-dark: #4b8a22;
  --stk-display: 'Fredoka', "Segoe UI", system-ui, sans-serif;
  --stk-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- the gear: sits in the page's site-bar (full page) or the studio dialog's bar (framed) ---------- */
.stk-gear-slot { margin-left: auto; display: inline-flex; align-items: center; }
.stk-gear {
  width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--stk-border); background: var(--stk-well);
  color: var(--stk-wood-dark); display: inline-grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 2px 0 var(--stk-border);
  font: inherit; line-height: 1; flex: none;
}
.stk-gear svg { width: 16px; height: 16px; display: block; }
.stk-gear:hover, .stk-gear:focus-visible { border-color: var(--stk-wood); background: #fff; outline: none; }
.stk-gear:focus-visible { box-shadow: 0 2px 0 var(--stk-border), 0 0 0 3px rgba(22,112,176,.35); }

/* ---------- the panel ---------- */
.stk-backdrop { position: fixed; inset: 0; z-index: 2147483000; background: rgba(30,20,5,.4); }
.stk-panel {
  position: fixed; z-index: 2147483001; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, 100vw - 24px); max-height: min(85vh, 85dvh); overflow: auto; overscroll-behavior: contain;
  background: var(--stk-panel); color: var(--stk-text); border: 3px solid var(--stk-wood); border-radius: 16px;
  box-shadow: 0 4px 0 var(--stk-wood-dark), 0 12px 28px rgba(60,40,10,.3);
  font: 14px/1.4 var(--stk-body); text-align: left; -webkit-text-size-adjust: 100%;
}
.stk-panel *, .stk-panel *::before, .stk-panel *::after { box-sizing: border-box; }
.stk-panel[hidden], .stk-backdrop[hidden] { display: none; }
@media (max-width: 559px) {
  .stk-panel { left: 0; top: auto; bottom: 0; transform: none; width: 100vw; max-height: min(88vh, 88dvh); border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -8px 28px rgba(60,40,10,.3); }
}
.stk-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 16px; position: sticky; top: 0; background: var(--stk-panel); border-bottom: 2px dashed var(--stk-border); }
.stk-head h2 { margin: 0; font: 600 20px/1 var(--stk-display); color: var(--stk-orange); flex: 1 1 auto; }
.stk-x {
  width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--stk-border); background: var(--stk-well); color: var(--stk-dim);
  font: 700 20px/1 var(--stk-display); display: grid; place-items: center; cursor: pointer; padding: 0; flex: none;
}
.stk-x:hover, .stk-x:focus-visible { border-color: var(--stk-wood); color: var(--stk-strong); outline: none; }
.stk-body { padding: 6px 16px 16px; }
.stk-sec { margin: 12px 0 4px; font: 700 11px/1 var(--stk-body); letter-spacing: .12em; text-transform: uppercase; color: var(--stk-dim); }
.stk-rows { display: flex; flex-direction: column; }
.stk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid rgba(220,185,140,.45); }
.stk-row:last-child { border-bottom: 0; }
.stk-row > span:first-child, .stk-row > label:first-child { font: 600 15px/1.2 var(--stk-display); color: var(--stk-strong); min-width: 0; }
.stk-row .stk-note { display: block; font: 400 12px/1.3 var(--stk-body); color: var(--stk-dim); }
.stk-empty { color: var(--stk-dim); font-size: 13px; padding: 6px 0 2px; }

/* switch */
.stk-switch {
  width: 44px; height: 24px; border-radius: 999px; border: 2px solid var(--stk-border); background: var(--stk-well); position: relative;
  cursor: pointer; padding: 0; flex: none; transition: background .15s;
}
.stk-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px; background: #fff; border: 2px solid var(--stk-border); transition: left .15s; }
.stk-switch[aria-checked="true"] { background: var(--stk-green); border-color: var(--stk-green-dark); }
.stk-switch[aria-checked="true"]::after { left: 22px; border-color: var(--stk-green-dark); }
.stk-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(22,112,176,.35); }

/* segmented choice */
.stk-seg { display: inline-flex; border: 2px solid var(--stk-border); border-radius: 999px; background: var(--stk-well); padding: 2px; gap: 2px; flex: none; max-width: 60%; }
.stk-seg button { border: 0; background: transparent; color: var(--stk-dim); font: 600 12px/1 var(--stk-display); padding: 5px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.stk-seg button[aria-checked="true"] { background: var(--stk-gold); color: var(--stk-strong); box-shadow: inset 0 -2px 0 var(--stk-gold-edge); }
.stk-seg button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(22,112,176,.35); }

/* range */
.stk-range { display: flex; align-items: center; gap: 8px; flex: 0 1 55%; }
.stk-range input { width: 100%; accent-color: var(--stk-orange); }
.stk-range output { font: 600 12px/1 var(--stk-body); color: var(--stk-dim); min-width: 28px; text-align: right; }

/* text */
.stk-text { flex: 0 1 55%; display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.stk-text input {
  width: 100%; font: 500 14px var(--stk-body); color: var(--stk-strong); background: #fff; border: 2px solid var(--stk-border); border-radius: 10px; padding: 6px 9px;
}
.stk-text input:focus { outline: none; border-color: var(--stk-blue); box-shadow: 0 0 0 3px rgba(22,112,176,.2); }
.stk-text .stk-note { text-align: right; }
.stk-text .stk-note.bad { color: #c8283f; }
.stk-text .stk-note.ok { color: var(--stk-green-dark); }

/* buttons and links */
.stk-btn {
  font: 700 13px var(--stk-display); letter-spacing: .02em; border: 2px solid var(--stk-gold-edge); background: linear-gradient(180deg, #ffd96a, var(--stk-gold));
  color: var(--stk-strong); border-radius: 10px; padding: 7px 12px; box-shadow: 0 3px 0 var(--stk-gold-dark); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block;
}
.stk-btn.plain { background: var(--stk-well); border-color: var(--stk-border); box-shadow: 0 3px 0 var(--stk-border); color: var(--stk-text); }
.stk-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--stk-gold-dark); }
.stk-btn.plain:active { box-shadow: 0 1px 0 var(--stk-border); }
.stk-btn[disabled] { opacity: .6; cursor: default; }
.stk-btn.google { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-color: var(--stk-border); box-shadow: 0 3px 0 var(--stk-border); color: var(--stk-strong); }
.stk-btn.google svg { width: 16px; height: 16px; }
.stk-link { color: var(--stk-blue); font-size: 13px; text-decoration: none; }
.stk-link:hover { text-decoration: underline; }
.stk-btn.loading { position: relative; color: transparent; }
.stk-btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid var(--stk-strong); border-right-color: transparent; border-radius: 999px; animation: stk-spin .7s linear infinite; }
@keyframes stk-spin { to { transform: rotate(360deg); } }

/* the account block at the bottom of the panel */
.stk-account { margin-top: 12px; padding: 10px 12px; background: var(--stk-well); border: 2px solid var(--stk-border); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.stk-account .stk-who { font: 600 14px/1.3 var(--stk-display); color: var(--stk-strong); }
.stk-account .stk-who small { display: block; font: 400 12px/1.3 var(--stk-body); color: var(--stk-dim); }
.stk-account .stk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stk-account .stk-err { color: #c8283f; font-size: 12.5px; }
.stk-account .stk-err:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .stk-switch, .stk-switch::after { transition: none; }
}

/* ---------- the studio flags (config/studio): the banner line in the panel, the screen over a game taken off for a bit ---------- */
.stk-flag { margin: 0 0 10px; padding: 8px 10px; background: #fff3c4; border: 2px solid #e4c46a; border-radius: 10px; font: 600 13px/1.4 var(--stk-display); color: var(--stk-strong); }
.stk-flag[hidden] { display: none; }
.stk-off { position: fixed; inset: 0; z-index: 2147482000; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; box-sizing: border-box; padding: 16px; background: rgba(30,20,5,.55); color: inherit; }
.stk-off[open] { display: grid; place-items: center; }
.stk-off::backdrop { background: transparent; }
.stk-off-card { background: var(--stk-panel); border: 3px solid var(--stk-border); border-radius: 16px; box-shadow: 0 6px 0 var(--stk-wood); padding: 20px 22px; max-width: 360px; text-align: center; font: 400 14px/1.45 var(--stk-body); color: var(--stk-text); }
.stk-off-card h2 { margin: 0 0 8px; font: 700 22px/1.2 var(--stk-display); color: var(--stk-strong); }
.stk-off-card p { margin: 0 0 12px; }
.stk-off-card a { color: var(--stk-blue); font: 600 14px var(--stk-display); }
/* the testers-only gate on a beta page: the off screen's card with the Google button in it */
.stk-gate .stk-actions { justify-content: center; margin: 2px 0 10px; }
.stk-gate .stk-err { min-height: 1.2em; margin: 0 0 8px; font-size: 13px; color: #c8283f; }

/* ---------- the Slate look (UI_LOOK_TOGGLE_SPEC.md) ----------
   Two ways in: a portal page carries html[data-look="slate"], so everything this file draws there
   (the account card on /account/, the gate box on /beta/, the panel) follows; on a game page the
   <html> never gets the attribute, so studio.js puts .stk-slate on the gear, the panel, the backdrop,
   the off screen and the gate instead. S is "under either". */
.stk-slate, html[data-look="slate"] {
  --stk-panel: #171a21; --stk-well: #1f232c; --stk-border: #2a303b; --stk-wood: #2a303b; --stk-wood-dark: #0b0d11;
  --stk-text: #d7dce5; --stk-strong: #ffffff; --stk-dim: #8e97a8; --stk-orange: #ffffff; --stk-blue: #8ec5f2;
  --stk-gold: #f5c451; --stk-gold-edge: #f5c451; --stk-gold-dark: #f5c451; --stk-green: #3f8f5a; --stk-green-dark: #5ad08a;
  --stk-display: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
  --stk-body: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
}
.stk-gear:is(.stk-slate, html[data-look="slate"] *) { border-width: 1px; box-shadow: none; color: var(--stk-text); }
.stk-panel:is(.stk-slate, html[data-look="slate"] *) { border: 1px solid var(--stk-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.6); color-scheme: dark; }
.stk-backdrop:is(.stk-slate, html[data-look="slate"] *) { background: rgba(0,0,0,.6); }
:is(.stk-slate, html[data-look="slate"]) .stk-head { border-bottom: 1px solid var(--stk-border); }
:is(.stk-slate, html[data-look="slate"]) .stk-head h2 { font: 600 17px/1 var(--stk-body); }
:is(.stk-slate, html[data-look="slate"]) :is(.stk-x, .stk-switch, .stk-seg, .stk-text input, .stk-account) { border-width: 1px; }
:is(.stk-slate, html[data-look="slate"]) .stk-row { border-bottom-color: var(--stk-border); }
:is(.stk-slate, html[data-look="slate"]) .stk-row > span:first-child, :is(.stk-slate, html[data-look="slate"]) .stk-row > label:first-child { font: 600 14px/1.2 var(--stk-body); }
:is(.stk-slate, html[data-look="slate"]) .stk-switch::after { background: var(--stk-dim); border-color: transparent; }
:is(.stk-slate, html[data-look="slate"]) .stk-switch[aria-checked="true"]::after { background: #fff; }
:is(.stk-slate, html[data-look="slate"]) .stk-seg button[aria-checked="true"] { box-shadow: none; color: #1a1300; }
:is(.stk-slate, html[data-look="slate"]) .stk-text input { background: var(--stk-well); color: var(--stk-strong); }
:is(.stk-slate, html[data-look="slate"]) .stk-btn { border: 0; background: var(--stk-gold); color: #1a1300; box-shadow: none; }
:is(.stk-slate, html[data-look="slate"]) :is(.stk-btn.plain, .stk-btn.google) { background: var(--stk-well); border: 1px solid var(--stk-border); color: var(--stk-text); box-shadow: none; }
:is(.stk-slate, html[data-look="slate"]) .stk-btn:active { transform: translateY(1px); box-shadow: none; }
:is(.stk-slate, html[data-look="slate"]) .stk-flag { background: #2a2412; border: 1px solid #5a4a1a; color: #f5e6b0; font: 500 13px/1.4 var(--stk-body); }
.stk-off:is(.stk-slate, html[data-look="slate"] *) { background: rgba(0,0,0,.6); }
:is(.stk-slate, html[data-look="slate"]) .stk-off-card { border: 1px solid var(--stk-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
:is(.stk-slate, html[data-look="slate"]) .stk-off-card h2 { font: 600 20px/1.2 var(--stk-body); }
:is(.stk-slate, html[data-look="slate"]) .stk-off-card a { font: 600 14px var(--stk-body); }
