/* The Deal Goat app. Palette matches work/dev-site/site.html (light + dark). */
:root {
  --bg: #fff5e4; --surface: #fffdf7; --ink: #2d241e; --muted: #665346; --line: #e0c8aa;
  --accent: #a43b0b; --accent-ink: #fff; --soft: #fae2c1; --highlight: #efb44e; --highlight-ink: #2d241e;
  --good: #2f6b3a; --bad: #a3281b; --shadow: 0 8px 25px #100a2014; --radius: 14px;
  color-scheme: light dark;
}
/* Theme (src/prefs.php): html[data-theme] is light, dark or auto (follow the device). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1929; --surface: #18283b; --ink: #eff6fc; --muted: #bed0dd; --line: #344c60;
    --accent: #83e9d1; --accent-ink: #0e1929; --soft: #25374a; --highlight: #f9d463; --highlight-ink: #182435;
    --good: #8fe0a0; --bad: #ff9a8a; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1929; --surface: #18283b; --ink: #eff6fc; --muted: #bed0dd; --line: #344c60;
  --accent: #83e9d1; --accent-ink: #0e1929; --soft: #25374a; --highlight: #f9d463; --highlight-ink: #182435;
  --good: #8fe0a0; --bad: #ff9a8a; --shadow: none;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin-top: .5rem; }
h3 { font-size: 1.05rem; margin-top: 1.25rem; }
p { margin: 0 0 .75rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.warn { color: var(--bad); font-weight: 600; }
.ok-text { color: var(--good); font-weight: 600; }
.narrow { max-width: 460px; margin: 2rem auto; }
.narrow-wide { max-width: 900px; margin: 1.5rem auto; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
/* The goat pops out: big, hanging over the bottom of the header bar, with a shadow and a wiggle on hover (logo-badge.png = logo.png without its empty sides). */
.brand img { width: auto; height: 64px; margin: -6px 0; position: relative; z-index: 6; filter: drop-shadow(0 6px 10px #100a2040);
  transform-origin: 50% 80%; transition: transform .25s cubic-bezier(.175, .885, .32, 1.275); }
@media (min-width: 1000px) { .brand img { height: 84px; margin: -6px 0 -34px; } body:not(.skin-front) > main.wrap { padding-top: 16px; } }   /* one-row header: hang over the edge; room under it */
/* Header (signed-in / admin look; the user look is .ftop in front.css). A grid, so nothing lands under the logo:
     phones        [logo][search/city box ]        641–999px  [logo][search      ][you]
                   [links ··········][you]                    [links ·················]
     ≥ 1000px      [logo][search                 ][🔥 you]
                   [    ][Top % off  Directory  Dice  Games  Saved  Business  Admin]   the links as soft tabs, the page you're on lit up */
.top-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search me" "nav nav nav"; align-items: center; gap: 8px 16px; }
.top-row > .brand { grid-area: brand; }
.top-row > .search, .top-row > .qbox { grid-area: search; min-width: 0; }
.top-row > .nav { grid-area: nav; }
.top-me { grid-area: me; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.top-me a { color: var(--ink); text-decoration: none; font-weight: 600; }
@media (max-width: 640px) { .top-row { grid-template-areas: "brand search search" "nav nav me"; } }
@media (min-width: 1000px) {
  .top-row { grid-template-areas: "brand search me" "brand nav nav"; gap: 6px 20px; padding-top: 10px; padding-bottom: 8px; }
  .top-row > .brand { align-self: center; }
  .brand img { margin: -4px 0; }   /* the logo spans both rows now: no need to hang over the edge */
  body:not(.skin-front) > main.wrap { padding-top: 8px; }
  .top-row > .nav { flex-wrap: nowrap; gap: 4px; margin-left: -10px; overflow-x: auto; scrollbar-width: none; }
  .top-row > .nav::-webkit-scrollbar { display: none; }
  .top-row > .nav > a { padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-size: .95rem; transition: background-color .15s; }
  .top-row > .nav > a:hover { background: var(--soft); color: var(--ink); }
  .top-row > .nav > a[aria-current="page"] { background: color-mix(in srgb, var(--highlight) 55%, transparent); }
}
}
.brand:hover img, .brand:focus-visible img { transform: rotate(-6deg) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .brand img { transition: none; } .brand:hover img, .brand:focus-visible img { transform: none; } }
.search { flex: 1; min-width: 180px; }
.search input { width: 100%; }
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--accent); }
.pill { background: var(--soft); padding: 6px 12px; border-radius: 999px; }
.foot { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 6px; padding-top: 32px; padding-bottom: 40px; color: var(--muted); font-size: .9rem; }
.foot-line { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 6px; overflow: hidden; margin-left: -10px; padding: 2px 0 6px; }  /* bottom room so link underlines are not clipped */
/* Each part's divider sits 1px outside its box, so the divider that starts any row falls outside .foot-line and is clipped. */
.foot-part { border-left: 1px solid color-mix(in srgb, currentColor 45%, transparent); margin-left: -1px; padding: 0 10px; line-height: 1.2; }
@media (max-width: 600px) { .foot-part { flex-basis: 100%; } }   /* phones: one part per line */

/* Forms */
input, select, button, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 42px; }
input[type="checkbox"] { min-height: 0; width: 20px; height: 20px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 12px; }
.form legend { font-weight: 700; padding: 0 6px; }
.form > .btn, .form > .btn-small, .form > .inline { justify-self: start; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.row-form label { display: grid; gap: 4px; font-weight: 600; }
.row-form input[type="search"], .row-form input[type="email"] { flex: 1; min-width: 200px; }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.btn, .btn-small { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; cursor: pointer; }
.btn { padding: 11px 20px; min-height: 44px; }
.btn-small { padding: 6px 14px; min-height: 34px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* Messages, badges */
.flash { background: var(--soft); border-left: 4px solid var(--highlight); padding: 10px 14px; border-radius: 8px; margin: 14px 0; }
.flash-error { border-left-color: var(--bad); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); vertical-align: middle; text-transform: capitalize; }
.badge-approved, .badge-active { background: color-mix(in srgb, var(--good) 22%, transparent); }
.badge-pending, .badge-paused { background: color-mix(in srgb, var(--highlight) 40%, transparent); }
.badge-suspended, .badge-rejected, .badge-ended { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Home */
.hero { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 24px 0 10px; }
.hero h1 { margin-bottom: 0; }
.hero .hero-tagline { margin: 4px 0 0; }
.appearance-form .theme-status { margin: 0; transition: opacity .4s; }
.appearance-form .check { align-items: flex-start; }
.appearance-form .theme-status:empty { display: none; }
.appearance-form .theme-status.is-fading { opacity: 0; }
.city-pick { display: grid; gap: 4px; font-weight: 600; }
.slot { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 0; background: var(--surface); border: 2px solid var(--highlight);
  border-radius: calc(var(--radius) + 4px); overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow); }
.slot-img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.slot-body { padding: 22px 26px; display: grid; align-content: center; gap: 4px; }
.slot-tag { display: inline-block; justify-self: start; background: var(--highlight); color: var(--highlight-ink); font-weight: 800; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; }
.slot-title { font-size: 1.15rem; font-weight: 600; }
.slot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 680px) { .slot { grid-template-columns: 1fr; } .slot-img { min-height: 180px; max-height: 220px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-link:hover h3 { color: var(--accent); }
.card-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
@media (max-width: 600px) { .card-img-text { aspect-ratio: 16 / 7; } }
.card-img-text { display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.card-body { padding: 12px 14px 16px; }
.card-kicker { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.card-kicker a { color: inherit; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.card-meta strong { color: var(--ink); }
.save { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted);
  font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); }
.save.is-saved { color: var(--bad); }
.save.save-text { position: static; width: auto; height: auto; border-radius: 999px; font-size: 1rem; box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); padding: 11px 20px; }

/* Deal page */
.deal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin: 28px 0; align-items: start; }
.deal-img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 460px; }
.deal-title { font-size: 1.3rem; font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 760px) { .deal { grid-template-columns: 1fr; } }

/* Panels, tables */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }
.panel.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .panel.two { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td input[type="number"] { width: 120px; }
.actions { white-space: nowrap; }
.actions form { display: inline-flex; gap: 6px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list li > div { flex-basis: 100%; }
.prices { margin: 0 0 8px; padding-left: 18px; }

/* Business */
.biz-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.balance { background: var(--surface); border: 2px solid var(--highlight); border-radius: var(--radius); padding: 16px 20px; min-width: 240px; }
.balance-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0; }
.balance-num { font-size: 2.2rem; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 20px; }
.package { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.package h2 { margin: 0; }
.package-price { font-size: 2rem; font-weight: 800; margin: 4px 0 0; }
.package-tokens { font-weight: 700; margin: 0; }
.package-bonus { color: var(--good); font-weight: 700; margin: 0; }
.package .btn { margin-top: auto; }
.package > p:last-of-type { margin-bottom: 14px; }
.package-silver { border: 2px solid var(--line); }
.package-gold { border: 2px solid var(--highlight); }

/* Admin */
.subnav, .tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 20px 0 16px; }
.subnav a, .tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.subnav a[aria-current="page"], .tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.subnav .badge { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); text-decoration: none; font-weight: 600; }
.stat span { display: block; font-size: 1.8rem; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
a.stat:hover { border-color: var(--accent); }
.claim { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.wide-form { max-width: none; }
.kit { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.kit-files { display: grid; gap: 2px; align-content: start; }
.kit-files a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.kit-files a[aria-current="page"] { background: var(--soft); font-weight: 700; }
.kit-body { min-width: 0; }
.kit-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kit pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; white-space: pre-wrap; word-break: break-word; font-size: .88rem; max-height: 75vh; overflow: auto; }
@media (max-width: 760px) { .kit { grid-template-columns: 1fr; } }
.kit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kit-head p { margin: 0; }
pre.notes { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px; font-size: .9rem; margin: 0; }
.row-form .btn { align-self: end; }

/* System + Stats (chart color validated: light #a43b0b, dark #36a38c on the panel surfaces) */
:root { --chart: #a43b0b; --chart-grid: #ead9c2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart: #36a38c; --chart-grid: #2a3d52; } }
:root[data-theme="dark"] { --chart: #36a38c; --chart-grid: #2a3d52; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 18px; }
.sys-grid .panel { margin: 9px 0; }
.sys-list { list-style: none; margin: 0; padding: 0; }
.sys-list li { display: grid; grid-template-columns: 22px minmax(110px, 1fr) auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sys-icon { font-weight: 800; text-align: center; border-radius: 50%; width: 20px; height: 20px; line-height: 20px; font-size: .8rem; }
.sys-ok .sys-icon { color: var(--good); }
.sys-warn .sys-icon { background: var(--bad); color: var(--surface); }
.sys-info .sys-icon { color: var(--muted); }
.sys-label { font-weight: 600; }
.sys-value { text-align: right; font-variant-numeric: tabular-nums; }
.sys-hint { grid-column: 2 / 4; font-size: .85rem; color: var(--muted); }
.sys-warn .sys-hint { color: var(--bad); }
pre.log { max-height: 340px; overflow: auto; font-size: .8rem; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 18px; }
.chart-panel { margin: 9px 0; }
.chart-panel h2 { margin-bottom: 2px; }
.chart { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.chart .bar { fill: var(--chart); }
.chart .hit { fill: transparent; }
.chart .col:hover .bar { opacity: .8; }
.chart .col:hover .hit { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 13px; font-family: inherit; }
details summary { cursor: pointer; color: var(--accent); }
@media (max-width: 520px) { .chart-grid, .sys-grid { grid-template-columns: 1fr; } }

.foot-version { white-space: nowrap; }


/* Pager */
.pager-summary { margin: 0 0 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 8px; }
.pager-nums { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pager-num, .pager-step { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; }
a.pager-num:hover, a.pager-step:hover { border-color: var(--accent); color: var(--accent); }
.pager-num[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager-step.is-off { opacity: .45; }
.pager-gap { color: var(--muted); padding: 0 2px; }
@media (max-width: 520px) { .pager { justify-content: center; } .pager-nums { order: 3; width: 100%; justify-content: center; } }

/* Patch drop zone */
.dropzone { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 30px 18px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 400; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-within, .dropzone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.dropzone.is-busy { opacity: .7; cursor: progress; }
.dropzone.is-error { border-color: var(--bad); }
.dropzone-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; min-height: 0; }
.dropzone-icon { font-size: 1.6rem; color: var(--accent); line-height: 1; }
.dropzone-title { font-size: 1.05rem; }
.dropzone-sub { color: var(--muted); font-size: .88rem; }
.dropzone-status { font-weight: 700; min-height: 1.2em; }
.dropzone.is-error .dropzone-status { color: var(--bad); }

/* Two-step sign-in + mail */
.twofa-setup { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.qr-box { background: #fff; padding: 8px; border-radius: 12px; line-height: 0; }
.qr-box svg { width: 220px; height: 220px; }
@media (max-width: 640px) { .twofa-setup { grid-template-columns: 1fr; justify-items: center; } }
code.secret { font-size: 1.05rem; letter-spacing: .06em; background: var(--soft); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.code-input { font-size: 1.3rem; letter-spacing: .2em; font-variant-numeric: tabular-nums; max-width: 220px; }
.recovery-codes { columns: 2; list-style: none; padding: 0; margin: 0 0 14px; }
.recovery-codes li { padding: 4px 0; font-size: 1.05rem; }
.mail-previews { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.mail-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff5e4; }
@media (max-width: 760px) { .mail-previews { grid-template-columns: 1fr; } }

/* In-page confirm box, notices and field errors (instead of browser pop-ups) */
.dg-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 22px 24px 18px;
  width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px #0005; }
.dg-dialog::backdrop { background: #10091f66; backdrop-filter: blur(2px); }
.dg-dialog[open] { animation: dg-pop .14s ease-out; }
@keyframes dg-pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.dg-dialog-msg { font-size: 1.05rem; font-weight: 600; margin: 0 0 18px; line-height: 1.45; }
.dg-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dg-dialog-actions .btn-small { min-height: 40px; padding: 8px 18px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--highlight); border-radius: 10px;
  padding: 10px 14px; box-shadow: var(--shadow), 0 8px 24px #0002; font-weight: 600; transition: opacity .3s, transform .3s; }
.toast-error { border-left-color: var(--bad); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); }
.field-error { display: block; color: var(--bad); font-size: .88rem; font-weight: 600; margin-top: 2px; }
[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }

/* Mail setup */
.mail-setup fieldset { margin: 0; }
.radio { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.radio input { margin-top: 3px; min-height: 0; width: 18px; height: 18px; flex: none; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.mail-setup[data-mode="log"] [data-smtp-fields], .mail-setup[data-mode="mail"] [data-smtp-fields] { display: none; }
.setup-grid label { align-content: end; }
.mail-setup fieldset { min-width: 0; }
.setup-grid > label { min-width: 0; }
.setup-grid input, .setup-grid select { width: 100%; min-width: 0; }

/* Patches tab stands out in the admin menu */
.subnav a.subnav-patches { border: 2px solid var(--highlight); background: color-mix(in srgb, var(--highlight) 22%, var(--surface)); }
.subnav a.subnav-patches span { color: var(--accent); font-weight: 800; }
.subnav a.subnav-patches:hover { background: color-mix(in srgb, var(--highlight) 38%, var(--surface)); }
.subnav a.subnav-patches[aria-current="page"] { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); }
.subnav a.subnav-patches[aria-current="page"] span { color: var(--highlight-ink); }

/* Admin → Users → Add a user */
#add-user summary { cursor: pointer; }
#add-user[open] summary { margin-bottom: 12px; }
.add-user-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.add-user-grid input, .add-user-grid select { width: 100%; }

/* Several deals at one restaurant (admin look) */
.card-more-deals { margin: 6px 0 0; font-size: .85rem; font-weight: 700; color: var(--accent); }

/* Token slot: banner across the whole row of the deal grid */
.slot-banner { grid-column: 1 / -1; margin: 0; grid-template-columns: minmax(0, 38%) 1fr; }
.slot-media { display: block; min-height: 240px; background: var(--soft); text-decoration: none; color: var(--ink); }
.slot-media img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; display: block; }
.slot-media.is-logo { background: #fff; display: grid; place-items: center; }
.slot-media.is-logo img { object-fit: contain; padding: 28px; max-height: 260px; }
.slot-noimg { display: grid; place-items: center; height: 100%; min-height: 240px; font-size: 1.6rem; font-weight: 800; padding: 20px; text-align: center; }
.slot-banner h2 a { color: inherit; text-decoration: none; }
.slot-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin: 2px 0 4px; }
.slot-banner.is-preview { border-style: dashed; }
@media (max-width: 680px) { .slot-banner { grid-template-columns: 1fr; } .slot-media, .slot-media img { min-height: 180px; max-height: 220px; } }

/* Admin → Stripe */
.subnav a.subnav-stripe { border: 2px solid #635bff; }
.subnav a.subnav-stripe span { color: #635bff; font-weight: 800; }
.subnav a.subnav-stripe[aria-current="page"] { background: #635bff; border-color: #635bff; color: #fff; }
.subnav a.subnav-stripe[aria-current="page"] span { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .subnav a.subnav-stripe { border-color: #a29dff; } :root:not([data-theme="light"]) .subnav a.subnav-stripe span { color: #a29dff; } }
:root[data-theme="dark"] .subnav a.subnav-stripe { border-color: #a29dff; }
:root[data-theme="dark"] .subnav a.subnav-stripe span { color: #a29dff; }
.stripe-check.is-ok { border-left: 5px solid var(--good); }
.stripe-check.is-bad { border-left: 5px solid var(--bad); }
.stripe-check ul { margin: 0; padding-left: 20px; }
.steps { padding-left: 22px; display: grid; gap: 8px; margin: 0 0 16px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }

/* Admin → Backups */
.backup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-bottom: 18px; }
.backup-card { display: flex; flex-direction: column; margin: 0; }
.backup-card ul { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 4px; }
.backup-card .btn { margin-top: auto; align-self: flex-start; }
.backup-warn { font-weight: 700; color: var(--bad); }

/* Admin → Permissions */
.perm-table td:nth-child(2) { min-width: 220px; }
.perm-table select { min-width: 170px; }
.perm-table tr:target td { background: var(--highlight); }
.backup-who { margin: 0 0 10px; }

/* Admin → Mail → Where emails go · Admin → Prices & settings → Footer */
.mail-routes td { vertical-align: top; }
.mail-routes-form { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.mail-routes-form > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 820px) { .mail-routes-form { grid-template-columns: 1fr; } }
.mail-routes-form textarea { width: 100%; font-family: inherit; }
.foot-preview { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; }

/* Dice: roll for a random deal (views/dice.php, app.js). Red die with a gold rim, like the original Mega Deal Roller. */
.dice-page { max-width: 640px; margin: 24px auto 48px; text-align: center; }
.dice-mascot { width: 128px; height: auto; margin: 0 auto 8px; display: block; animation: dice-float 4s ease-in-out infinite; }
@keyframes dice-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.dice-box { margin: 22px auto 26px; min-height: 200px; padding: 26px; display: flex; align-items: center; justify-content: center;
  border: 5px solid var(--highlight); border-radius: 25px; background: linear-gradient(135deg, #d32f2f 0%, #9a1b1b 100%); color: #fff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .35), inset 0 0 20px rgba(0, 0, 0, .3); overflow: hidden; }
.dice-text { display: flex; flex-direction: column; gap: 6px; align-items: center; text-shadow: 2px 2px 6px rgba(0, 0, 0, .6); line-height: 1.35; }
.dice-hint { font-size: 1.35rem; font-weight: 700; }
.dice-win { font-size: 2rem; }
.dice-restaurant { font-size: 1.6rem; font-weight: 800; color: #ffe27a; }
.dice-title { font-size: 1.15rem; font-weight: 600; }
.dice-price { display: inline-block; margin-top: 4px; padding: 2px 12px; border-radius: 999px; background: rgba(0, 0, 0, .28); font-weight: 700; }
/* Each deal shown while rolling drops in once. app.js sets the speed per tick: --tick (how long it takes), --blur and --shift
   (how far it falls), so a hard flick streaks and blurs, then slows to a gentle, readable drop; a soft tap ticks over calmly. */
.dice-box.is-rolling .dice-text.is-tick { animation: dice-slot var(--tick, 100ms) cubic-bezier(.2, .7, .3, 1) both; }
@keyframes dice-slot { 0% { filter: blur(var(--blur, 3px)); transform: translateY(calc(-1 * var(--shift, 20px))); opacity: .15; }
  100% { filter: blur(0); transform: translateY(0); opacity: 1; } }
.dice-box.is-done .dice-text { animation: dice-tada .8s cubic-bezier(.175, .885, .32, 1.275) both; }
@keyframes dice-tada { 0% { transform: scale(.8); opacity: 0; } 50% { transform: scale(1.1) rotate(-3deg); } 75% { transform: scale(1.1) rotate(3deg); } 100% { transform: scale(1); opacity: 1; } }
.dice-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dice-roll { font-size: 1.2rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: 14px 36px; }
.dice-roll[aria-disabled="true"] { opacity: .7; pointer-events: none; }
/* Flick physics (app.js): the button and the die take mouse/finger flicks; vertical swipes on the die still scroll the page. */
.dice-roll { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.dice-box { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .08s linear; }
.dice-box.is-rolling { cursor: progress; }
.dice-tip { margin-bottom: 2px; }
.skin-front .dice-roll { color: var(--highlight-ink); }
/* Dice filters: city + food type chips (views/dice.php). Radios stay real inputs for keyboard and no-JS use. */
.dice-filters { display: grid; gap: 14px; justify-items: center; margin: 14px 0 6px; }
.dice-filter-city { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 700; }
.dice-filter-city select { min-width: 180px; max-width: 100%; }
.dice-foods { border: 0; padding: 0; margin: 0; min-width: 0; width: 100%; }
.dice-foods legend { font-weight: 700; margin: 0 auto 8px; padding: 0; }
.dice-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dice-chip { position: relative; cursor: pointer; }
.dice-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.dice-chip > span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s; }
.dice-chip small { color: var(--muted); font-weight: 600; }
.dice-chip:hover > span { border-color: var(--muted); }
.dice-chip input:checked + span { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); }
.dice-chip input:checked + span small { color: inherit; }
.dice-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.dice-city { font-size: .95rem; font-weight: 600; opacity: .9; }
@media (max-width: 480px) { .dice-chip > span { padding: 6px 11px; font-size: .92rem; } }
@media (prefers-reduced-motion: reduce) { .dice-mascot, .dice-box.is-rolling .dice-text.is-tick, .dice-box.is-done .dice-text { animation: none; } }

/* Confirm-email-first banner and page */
.confirm-bar { background: color-mix(in srgb, var(--highlight) 35%, var(--surface)); border-bottom: 1px solid var(--line); font-size: .92rem; }
.confirm-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.confirm-bar form { margin: 0; }
.confirm-steps { padding-left: 22px; display: grid; gap: 4px; }

/* Admin → Users: fit the page (no sideways scrolling); buttons wrap inside their cell */
.users-table th { white-space: nowrap; }
.users-table td:first-child { min-width: 12em; }   /* long emails break only after the @ */
.users-table .badge { white-space: nowrap; margin: 0 4px 4px 0; }
.users-table td:nth-child(2) { white-space: nowrap; }
.users-table td:nth-child(5) { white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-actions form { display: inline-flex; gap: 6px; margin: 0; }

/* A message shown inside the card it belongs to (flash_here) */
.flash-card { margin: 4px 0 14px; }

/* Jumping to a card (#setup, #where …) stops below the sticky header instead of under it */
[id] { scroll-margin-top: 84px; }

/* Business dashboard → People */
.people-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.people-list form { margin: 0; }
/* Admin → Business roles */
.roles-table td, .roles-table th { text-align: center; }
.roles-table td:first-child, .roles-table th:first-child { text-align: left; min-width: 12em; }
.roles-table input[type=text] { width: 100%; }

/* ── Featured slot looks (Admin → Campaigns → Featured slot look). "classic" = the original styles above. ── */
.slot-bar, .slot-badge { margin: 0; }
/* Gold frame */
.slot-look-gold { position: relative; overflow: visible !important; border: 4px solid var(--highlight) !important;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--highlight) 30%, transparent), 0 18px 40px rgba(60, 30, 0, .18) !important; }
.slot-look-gold .slot-media { border-radius: 8px 0 0 8px; overflow: hidden; }
.slot-look-gold .slot-badge { position: absolute; top: -16px; left: 28px; z-index: 1; background: var(--highlight); color: var(--highlight-ink);
  font: 800 13px/1 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
.slot-look-gold .slot-body { background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--highlight) 22%, var(--surface)) 100%); border-radius: 0 8px 8px 0; }
.slot-look-gold .slot-tag { background: transparent !important; color: var(--accent) !important; padding: 0 !important; }
/* Dark spotlight */
.slot-look-dark { border: 0 !important; box-shadow: 0 20px 45px rgba(30, 15, 0, .35) !important; }
.slot-look-dark .slot-body { background: #2d241e; color: #fff5e4; }
.slot-look-dark h2 a, .slot-look-dark .slot-title { color: #fff5e4 !important; }
.slot-look-dark .slot-price { color: #f9c45a !important; }
.slot-look-dark .slot-hours { color: #d8c6b0 !important; }
.slot-look-dark .slot-tag { background: #f9c45a !important; color: #2d241e !important; }
.slot-look-dark .btn:not(.btn-ghost) { background: #f9c45a !important; color: #2d241e !important; }
.slot-look-dark .btn-ghost { color: #fff5e4 !important; box-shadow: inset 0 0 0 1px #fff5e4 !important; }
/* Marquee bar */
.slot-look-marquee { border: 3px solid #a43b0b !important; box-shadow: 0 16px 38px rgba(80, 30, 0, .18) !important; grid-template-rows: auto 1fr; }
.slot-look-marquee .slot-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 12px; text-align: center;
  background: repeating-linear-gradient(135deg, #a43b0b 0 18px, #8f330a 18px 36px); color: #fff; font: 800 14px/1.2 system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.slot-look-marquee .slot-price { font-size: clamp(36px, 3.4vw, 52px) !important; }
.slot-banner.is-preview.slot-look-gold, .slot-banner.is-preview.slot-look-marquee { border-style: dashed !important; }
/* Admin → Campaigns → Featured slot look */
.look-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.look-choice { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.look-choice .check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.look-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Status badges (approved / pending / suspended …): their own plain font, so a badge inside a big serif heading
   doesn't pick up the heading's font and tight letter spacing; bigger next to a page title */
.badge { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-style: normal; letter-spacing: .02em; line-height: 1.5; white-space: nowrap; }
h1 .badge, h2 .badge { font-size: 14px; font-weight: 700; padding: 4px 12px; margin-left: 10px; vertical-align: .35em; }
h1 .badge { font-size: 15px; padding: 5px 14px; }
.badge-approved, .badge-active { color: var(--good); }
.badge-suspended, .badge-rejected { color: var(--bad); }

/* Business → Details: contact fields */
.details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.details-grid input, .details-grid select { min-width: 0; width: 100%; }
.details-grid-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.details-form fieldset { margin: 4px 0 10px; }
@media (max-width: 600px) { .details-grid, .details-grid-3 { grid-template-columns: 1fr; } }

/* Contact page and help line */
.contact-page { max-width: 640px; margin: 24px auto 48px; }
.contact-card { display: grid; gap: 14px; }
.contact-card dt { font-weight: 700; }
.contact-card dd { margin: 2px 0 0; }
.help-line { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.contact-place { margin-left: 26px; }

/* Contact form: the honeypot field is off-screen for people (bots fill it in) */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.spam-row { padding: 10px 0; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.spam-row:first-of-type { border-top: 0; }
.spam-row label.check { align-items: baseline; flex-wrap: wrap; font-weight: 400; }
.spam-nums { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 6px 0 0 26px; }
.spam-nums label { display: flex; align-items: center; gap: 8px; }
.spam-nums input { width: 90px; }
.contact-form label.check { font-weight: 400; margin: 4px 0 2px; }
.contact-form textarea { width: 100%; font-family: inherit; }
.msg-tabs { margin: 8px 0 12px; }
.msg-list li { display: grid; gap: 6px; }
.msg-body { margin: 0; white-space: normal; }

/* Maintenance mode */
.maint-bar { background: #a43b0b; color: #fff; font-size: .92rem; }
.maint-bar .wrap { padding-top: 8px; padding-bottom: 8px; }
.maint-bar a { color: #fff; font-weight: 700; }
.maintenance-page { max-width: 560px; margin: 60px auto; text-align: center; }
/* Stripe test / live */
.mode-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.mode-pill { font: 800 15px/1 system-ui, sans-serif; letter-spacing: .08em; padding: 10px 16px; border-radius: 999px; }
.mode-pill.is-test { background: color-mix(in srgb, var(--highlight) 45%, transparent); color: var(--ink); }
.mode-pill.is-live { background: #2f6b3a; color: #fff; }
.key-sets { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.key-sets fieldset { margin: 0; }
@media (max-width: 820px) { .key-sets { grid-template-columns: 1fr; } }


/* Deal photos (src/dealphotos.php): business dashboard + Admin → Deal photos */
.deal-photo-box { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.deal-photo-thumb { margin: 0; width: 160px; }
.deal-photo-thumb img { width: 160px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.deal-photo-thumb figcaption { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.deal-photo-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; flex: 1 1 280px; }
.deal-photo-form label { display: flex; flex-direction: column; gap: 4px; }
.deal-photo-form .hint { flex-basis: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.photo-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.photo-meta { padding: 10px 12px; line-height: 1.5; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; margin-top: auto; }
.photo-actions input { flex: 1 1 140px; min-width: 0; }

/* Suggest a deal (src/suggestions.php) */
.suggest-tips { margin: 14px 0 0; padding-left: 18px; line-height: 1.6; }
.suggest-list li { padding: 12px 0; }
.suggest-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.suggest-url { word-break: break-all; }
.badge.suggest-wait { background: #e7eef8; color: #24466f; }
.badge.suggest-review { background: #fbe9c8; color: #6b4300; }
.badge.suggest-ok { background: #dcefdc; color: #1f5a28; }
.badge.suggest-no { background: #f3dede; color: #7a2323; }
.checklist li { padding: 6px 0; }
.chart.hbar { max-width: 640px; }
.chart.hbar .hbar-label { font-size: 13px; fill: var(--ink); }
.chart.hbar .hbar-value { font-size: 13px; }
.chart.hbar .track { fill: var(--chart-grid); opacity: .45; }

/* Suggester badges (src/badges.php) */
.gbadge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; font-weight: 700; font-size: .85rem; line-height: 1.2; border: 1px solid transparent; white-space: nowrap; }
.gbadge-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 14px; }
.gbadge-bronze { background: #f3dcc4; color: #6b3a12; border-color: #d9a878; }
.gbadge-silver { background: #e6e9ee; color: #3a4350; border-color: #b9c1cc; }
.gbadge-gold   { background: #fbe8a6; color: #6a4b00; border-color: #e3bf4f; }
.gbadge-green  { background: #d7efd9; color: #1f5a28; border-color: #93c99a; }
.gbadge-blue   { background: #dbe7f8; color: #234a7a; border-color: #9bb8e0; }
.gbadge-purple { background: #eadcf6; color: #4f2a73; border-color: #bf9be0; }
.gbadge-red    { background: #f6d9d6; color: #7a2323; border-color: #e0a19a; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.badge-table input:not([type="checkbox"]), .badge-table select { width: 100%; min-width: 0; }
.badge-icon-input { max-width: 64px; text-align: center; font-size: 18px; }
.badge-num-input { max-width: 90px; }
.nowrap { white-space: nowrap; }
.badge-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.badge-meter { width: 100%; max-width: 360px; height: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge-meter { accent-color: var(--chart); }

/* Deal list bar: "Showing 1–20 of …" on the left, Sort by on the right (views/home.php, views/search.php). */
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.list-bar .pager-summary { margin: 0; }
.sort-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sort-pick select { min-height: 38px; padding: 6px 10px; }
@media (max-width: 480px) { .sort-pick { width: 100%; } .sort-pick select { flex: 1; } }

/* City heading size (views/home.php, app.js, src/prefs.php TITLE_SIZES). Medium = the normal h1. */
.city-title { cursor: default; border-radius: 6px; }
.city-title:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.hero h1.city-title.size-xs { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.hero h1.city-title.size-s  { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.hero h1.city-title.size-l  { font-size: clamp(2rem, 4vw, 2.9rem); }
.hero h1.city-title.size-xl { font-size: clamp(2.4rem, 5.2vw, 3.8rem); }
.hero > div:first-child { position: relative; min-width: 0; }
.size-menu { position: absolute; left: 0; z-index: 6; display: grid; gap: 8px; justify-items: start; margin-top: 6px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 25px #100a2033;
  width: max-content; max-width: min(560px, calc(100vw - 32px)); }
.size-menu-head { margin: 0; font-weight: 700; }
.size-menu-row { display: flex; flex-wrap: wrap; gap: 6px; }
.size-opt { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.size-opt:hover { border-color: var(--muted); }
.size-opt[aria-pressed="true"] { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); }
.size-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.size-opt-xs { font-size: .78rem; } .size-opt-s { font-size: .88rem; } .size-opt-m { font-size: 1rem; } .size-opt-l { font-size: 1.12rem; } .size-opt-xl { font-size: 1.25rem; }
.size-menu-status { margin: 0; min-height: 1.2em; }

/* ── Phones: one box that switches between Search 🔍 and City 📍 (views/partials_qbox.php), and a person icon for the account.
      Desktop never shows .qbox or .acct-icon. Works in both looks; front.css adds the user-look details. ── */
.qbox, .acct-icon { display: none; }
@media (max-width: 640px) {
  .search, .fsearch, .fcity, .hero .city-pick { display: none; }
  .qbox { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
  .qbox-modes { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
  .qbox-modes label { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; cursor: pointer; font-size: 17px; line-height: 1; }
  #qm-search:checked ~ .qbox-modes label[for="qm-search"], #qm-city:checked ~ .qbox-modes label[for="qm-city"] { background: var(--highlight); }
  #qm-search:focus-visible ~ .qbox-modes label[for="qm-search"], #qm-city:focus-visible ~ .qbox-modes label[for="qm-city"] { outline: 3px solid var(--accent); outline-offset: 1px; }
  .qbox form { flex: 1; min-width: 0; display: flex; gap: 6px; }
  .qbox input[type="search"], .qbox select { width: 100%; min-width: 0; min-height: 40px; }
  .qbox-city { display: none !important; }
  #qm-city:checked ~ .qbox-search { display: none; }
  #qm-city:checked ~ .qbox-city { display: flex !important; }

  /* Account: a person icon on the far right instead of the name; tap shows the name (app.js), double-tap shows initials. */
  .acct { margin-left: auto; display: inline-grid !important; place-items: center; width: 40px; height: 40px; padding: 0 !important; border-radius: 999px; }
  .acct .acct-name { display: none; }
  .acct .acct-icon { display: block; }
  .acct.show-initials .acct-icon { display: none; }
  .acct.show-initials::after { content: attr(data-initials); font-weight: 800; font-size: 15px; letter-spacing: .02em; animation: acct-pop .5s cubic-bezier(.175, .885, .32, 1.275); }

  /* Admin look: row 1 logo + box, row 2 the links with the person icon pushed right. */
  .top-row { gap: 8px 10px; }
  /* Logo fills its corner: logo.png has empty space on both sides, so crop to a square as tall as the search row. */
  .brand img { height: 54px; margin: -4px 0 -10px; }   /* phones: big, but only a little overhang */
  .brand { flex: none; padding: 0 2px; }
  .nav { flex: 1 0 100%; gap: 8px; }   /* 8px so Dice, 🏷️, 🍴, Saved, Business, Admin and the person icon fit one row at 360px */
}
@keyframes acct-pop { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.acct-pop { position: fixed; z-index: 20; min-width: 180px; max-width: calc(100vw - 24px); padding: 12px 14px; display: grid; gap: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 25px #100a2033; }
.acct-pop strong { font-size: 1rem; overflow-wrap: anywhere; }
.acct-pop a { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .acct.show-initials::after { animation: none; } }

/* Suggestion box link: bottom right of the footer (views/layout.php). On phones it sits on its own line. */
.foot-idea { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none;
  font-weight: 600; white-space: nowrap; background: var(--surface); }
.foot-idea:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .foot-idea { margin: 8px 0 0; } }

/* Deal page map (views/deal.php, app.js): the address is a link; the map opens under the facts. */
.addr-link { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.addr-link:hover, .addr-link[aria-expanded="true"] { color: var(--accent); text-decoration-style: solid; }
.deal-map { margin: 4px 0 16px; }
.deal-map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--soft); aspect-ratio: 16 / 10; max-height: 340px; width: 100%; }
.deal-map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.deal-map-links { margin: 6px 0 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 0; }
.skin-front .linklike { color: var(--ink); }

/* Birthday (views/layout.php, src/birthday.php): a pill near the top middle, and confetti from app.js. */
.bday-bar { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 14px auto 0; padding: 0 16px; max-width: 100%; }
.bday-pill { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(135deg, #f9d463, #ff9a8a); color: #2a1a0e; font-weight: 800; text-decoration: none; text-align: center;
  box-shadow: 0 6px 18px #e8452c33; animation: bday-in .6s cubic-bezier(.175, .885, .32, 1.275); }
.bday-pill:hover { box-shadow: 0 8px 24px #e8452c55; transform: translateY(-1px); }
.bday-pill-more { font-weight: 600; }
.bday-close { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
@keyframes bday-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: 0; display: block; border-radius: 2px; }
@media (max-width: 480px) { .bday-pill { padding: 8px 14px; font-size: .95rem; } }
@media (prefers-reduced-motion: reduce) { .bday-pill { animation: none; } }

/* Biggest discounts (views/top_deals.php). Nav link: "🏷️ Top % off" between Dice and Saved; just 🏷️ on phones. */
@media (max-width: 640px) { .nav-pct-label { display: none; } .nav-pct { font-size: 1.15rem; } }
.pct-badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: #e8452c; color: #fff;
  font-weight: 800; font-size: .85rem; letter-spacing: .01em; box-shadow: 0 2px 8px #0003; }
.card, .fcard { position: relative; }
/* 🐐 Goat Deal of the Day: free highlight of the biggest % off (not a paid slot). */
.goat-day { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 22px; margin: 6px 0 22px;
  padding: 30px 24px 22px; border-radius: 18px; text-decoration: none; color: #fff8e6; overflow: hidden;
  background: radial-gradient(circle at 15% 20%, #ffffff22 0, transparent 40%), linear-gradient(135deg, #b8261a, #e8452c 55%, #f39c12);
  border: 3px solid #f9d463; box-shadow: 0 10px 30px #b8261a44; transition: transform .2s, box-shadow .2s; }
.goat-day:hover { transform: translateY(-2px); box-shadow: 0 14px 34px #b8261a66; }
.goat-day:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.goat-day-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); padding: 4px 16px; border-radius: 0 0 12px 12px;
  background: #f9d463; color: #2a1a0e; font-weight: 900; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.goat-day-pct { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; background: #fff8e6; color: #b8261a;
  font-weight: 900; font-size: 2.2rem; line-height: 1; box-shadow: inset 0 0 0 4px #f9d463; text-align: center; }
.goat-day-pct small { display: block; font-size: .9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.goat-day-body { display: grid; gap: 4px; min-width: 0; }
.goat-day-name { font-size: 1.5rem; font-weight: 900; color: #fff; }
.goat-day-title { font-size: 1.08rem; font-weight: 600; }
.goat-day-meta { font-size: .92rem; opacity: .9; }
.goat-day-img { width: 140px; height: 104px; object-fit: cover; border-radius: 12px; border: 2px solid #f9d463; background: #fff8e6; }
@media (max-width: 640px) {
  .goat-day { grid-template-columns: auto 1fr; padding: 34px 16px 18px; gap: 12px 14px; }
  .goat-day-pct { width: 84px; height: 84px; font-size: 1.7rem; }
  .goat-day-name { font-size: 1.2rem; }
  .goat-day-img { display: none; }
}
@media (prefers-reduced-motion: reduce) { .goat-day { transition: none; } .goat-day:hover { transform: none; } }

/* Admin-editable help text (src/pagetext.php). */
.page-text { white-space: normal; }
.page-intro { margin: 4px 0 14px; }

/* Editable pages: Privacy Policy, Terms of Service (views/cms_page.php, src/cms.php). Readable line length, works in both looks. */
.legal { max-width: 760px; margin: 0 auto; }
.legal-updated { margin-top: -4px; }
.legal-body { line-height: 1.65; }
.legal-body h2 { margin: 2em 0 .5em; padding-top: .3em; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-body h3 { margin: 1.4em 0 .4em; font-size: 1.05rem; scroll-margin-top: 90px; }
.legal-body ul { padding-left: 1.3em; }
.legal-body li { margin: .3em 0; }
.legal-body a { overflow-wrap: anywhere; }
.legal-toc { margin: 14px 0 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal-toc summary { font-weight: 700; cursor: pointer; }
.legal-toc ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2; column-gap: 28px; }
.legal-toc li { margin: 3px 0; break-inside: avoid; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }
.legal-other { margin-top: 2.5em; }
.legal-preview { max-width: none; }
/* Admin → Pages */
.cms-list > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cms-list p { margin: 2px 0; }
.cms-body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.5; min-height: 420px; }
.cms-help { margin: 4px 0 10px; } .cms-help summary { cursor: pointer; font-weight: 600; } .cms-help code { font-size: .88em; }
.cms-revs > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cms-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Food directory (/places, views/places.php): restaurants whose deals have ended. Both looks (variables only). ── */
.dir-filters { margin: 6px 0 12px; }
.dir-filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.dir-field { display: grid; gap: 4px; font-weight: 600; }
.dir-field-q { flex: 1 1 260px; }
.dir-field-q input { width: 100%; }
.dir-chips { justify-content: flex-start; margin: 0 0 14px; }
a.dice-chip { text-decoration: none; }
.dice-chip[aria-current] > span { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); }
.dice-chip[aria-current] > span small { color: inherit; }
.dice-chip:focus-visible { outline: none; }
.dice-chip:focus-visible > span { outline: 3px solid var(--accent); outline-offset: 2px; }
.dir-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.dir-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.dir-img { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.dir-img-none { display: grid; place-items: center; font-size: 1.8rem; border: 1px solid var(--line); }
.dir-body { flex: 1; min-width: 0; }
.dir-name { font-size: 1.08rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.dir-meta { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.dir-addr { margin: 0 0 4px; font-size: .95rem; overflow-wrap: anywhere; }
.dir-addr a { text-decoration: none; }
.dir-addr a:hover { text-decoration: underline; }
.dir-links { margin: 0; }
.dir-phone { margin: 0 0 4px; font-size: .95rem; }   /* only shown when the restaurant has a number (migration 044) */
.dir-phone a { text-decoration: none; font-weight: 600; white-space: nowrap; }
.dir-phone a:hover { text-decoration: underline; }
.dir-phone-edit { margin-top: 6px; }
.dir-phone-edit summary { cursor: pointer; color: var(--muted, inherit); }
.dir-phone-edit form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.dir-phone-edit input[type="tel"] { width: 12em; max-width: 100%; }
.dir-staff { flex: none; }
.ended-deal { max-width: 640px; margin: 28px auto; }
.ended-deal .slot-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Admin → Add a deal (views/admin/manual_deal.php): fields left, live visitor-look card right. ── */
.md-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.md-preview { position: sticky; top: 84px; display: grid; gap: 10px; }
.md-preview h3 { margin: 0; font-size: 1rem; }
.md-front { padding: 14px; border-radius: var(--radius); border: 1px dashed var(--line); }
.md-front .grid.md-grid { grid-template-columns: minmax(0, 320px); justify-content: center; }   /* beats .skin-front .grid (front.css) */
.md-facts { margin: 4px 0 0; font-size: .92rem; }
.md-notes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.md-note { display: flex; gap: 8px; align-items: baseline; padding: 7px 12px; border-radius: 10px; background: var(--soft); font-size: .93rem; }
.md-note > span { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font-weight: 800; font-size: .8rem; background: var(--surface); }
.md-ok { background: color-mix(in srgb, var(--good) 14%, transparent); }
.md-ok > span { color: var(--good); }
.md-warn { background: color-mix(in srgb, var(--highlight) 30%, transparent); }
.md-end { align-items: center; flex-wrap: wrap; }
.md-end input[type="date"] { min-height: 36px; padding: 4px 8px; }
.md-start { max-width: 240px; }
.md-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.deal-details { margin: 0 0 16px; color: var(--ink); }
@media (max-width: 860px) { .md-layout { grid-template-columns: minmax(0, 1fr); } .md-preview { position: static; order: -1; } }
.dir-pagebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 14px; margin: 0 0 8px; }
.dir-pagebar .pager-summary { margin: 0; }
.dir-per label { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.dir-per select { min-height: 34px; padding: 4px 8px; }
/* Add a deal: photo drop box, bookmark, ending soon (views/admin/manual_deal.php, manual_deals.php) */
.md-photo { gap: 10px; }
.md-drop { display: flex; gap: 14px; align-items: center; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); transition: border-color .12s, background .12s; }
.md-drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--highlight) 18%, var(--bg)); }
.md-drop.has-file { border-style: solid; border-color: var(--good); }
.md-drop-text { margin: 0 0 6px; }
.md-thumb { flex: none; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.md-file { display: inline-flex !important; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; }
.md-file input { max-width: 100%; font-size: .85rem; min-height: 0; padding: 4px; }
.md-drop-status { margin: 6px 0 0; min-height: 1.2em; }
.md-picked { margin: -6px 0 0; color: var(--good); font-weight: 600; }
.md-steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 8px; }
.md-bm { cursor: grab; }
.md-ending li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; }
.md-ending .badge { text-transform: none; }
@media (max-width: 520px) { .md-drop { flex-direction: column; align-items: flex-start; } }
.md-ending li > div { flex: 1 1 320px; }
/* Admin → Stats → Visitors (views/admin/stats_visitors.php) */
.stat small { display: block; font-weight: 500; font-size: .8rem; margin-top: 2px; }
.vexplain { margin: 4px 0 16px; }
.vexplain summary { cursor: pointer; }
.vexplain ul { margin: 10px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.vlists { align-items: start; }
.vlists .panel { min-width: 0; }
.vtable td:first-child { overflow-wrap: anywhere; }
/* Account → Display settings → Top menu */
.menu-pick-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
/* Games (views/games.php) and Goat Snake (views/snake.php, public/assets/snake.js). Both looks: variables only. */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.game-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: transform .12s, border-color .12s; }
.game-card:hover, .game-card:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.game-icon { font-size: 2.6rem; line-height: 1; flex: none; }
.game-body { display: grid; gap: 4px; }
.game-body strong { font-size: 1.15rem; }
.game-meta { font-size: .85rem; font-weight: 700; color: var(--accent); }
.snake-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.snake-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: center; min-width: 0; }
.snake-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; width: 100%; max-width: 520px; }
.snake-score { font-size: 1.3rem; }
.snake-stage { position: relative; width: 100%; max-width: 520px; display: grid; justify-items: center; }
.snake-canvas { display: block; max-width: 100%; border-radius: 12px; border: 2px solid var(--line); touch-action: none; outline: none; }
.snake-canvas:focus-visible { border-color: var(--accent); }
.snake-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border-radius: 12px; }
.snake-overlay[hidden] { display: none; }
.snake-overlay-title { margin: 0; font-size: 1.5rem; font-weight: 800; }
.snake-overlay p { margin: 0; }
.snake-pad { display: none; grid-template-areas: ". up ." "left down right"; grid-template-columns: repeat(3, 64px); gap: 8px; }
.snake-pad button { min-height: 52px; font-size: 1.2rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); touch-action: manipulation; }
.snake-pad button:active { background: var(--soft); }
.snake-pad [data-dir="up"] { grid-area: up; } .snake-pad [data-dir="left"] { grid-area: left; } .snake-pad [data-dir="down"] { grid-area: down; } .snake-pad [data-dir="right"] { grid-area: right; }
@media (pointer: coarse), (max-width: 700px) { .snake-pad { display: grid; } }
.snake-board h2 { margin-top: 0; }
.snake-tabs { margin: 8px 0 10px; }
.snake-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 650; cursor: pointer; }
.snake-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.snake-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.snake-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg); }
.snake-list li.is-me { outline: 2px solid var(--highlight); }
.snake-list .snake-empty { background: none; }
.snake-place { width: 1.8em; text-align: center; font-weight: 800; flex: none; }
.snake-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.snake-pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.snake-me { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; justify-items: start; }
.snake-me p { margin: 0; }
.btn-link { background: none; border: 0; padding: 0 4px; color: var(--muted); cursor: pointer; text-decoration: underline; min-height: 0; }
@media (max-width: 860px) { .snake-layout { grid-template-columns: minmax(0, 1fr); } }
.snake-list[hidden] { display: none; }
@media (max-width: 430px) { .nav { gap: 5px; } .nav > a, .nav .nav-pct { font-size: .92rem; } }   /* admin look: 🎮 🎲 🏷️ 🍴 Saved Business Admin + the person icon on one row at 375–430 px */
/* Admin → Menu (views/admin/menu.php) */
.menu-order { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; max-width: 640px; }
.menu-order li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.menu-order li:target { outline: 2px solid var(--highlight); }
.menu-order-n { font-weight: 800; color: var(--muted); width: 1.4em; }
.menu-order-label { flex: 1; min-width: 0; }
/* Daily Deal Word (views/word.php, public/assets/word.js). Both looks: variables only. Colors carry a pattern too (border) for color-blind players. */
.word-panel { display: grid; gap: 12px; justify-items: center; }
.word-grid { display: grid; gap: 6px; }
.word-row { display: grid; grid-template-columns: repeat(5, clamp(44px, 12vw, 58px)); gap: 6px; }
.word-row.is-shake { animation: word-shake .35s; }
@keyframes word-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.word-cell { aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 800; text-transform: uppercase;
  border: 2px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); transition: transform .14s; }
.word-cell.is-typed { border-color: var(--muted); }
.word-cell.is-flip { transform: rotateX(90deg); animation: word-flip .28s forwards; }
@keyframes word-flip { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
.word-cell.is-hit, .word-keys .is-hit { background: var(--good); border-color: var(--good); color: var(--surface); }
.word-cell.is-near, .word-keys .is-near { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); border-style: dashed; }
.word-cell.is-miss, .word-keys .is-miss { background: var(--muted); border-color: var(--muted); color: var(--surface); }
.word-msg { min-height: 1.4em; margin: 0; font-weight: 700; text-align: center; }
.word-done { display: grid; justify-items: center; gap: 4px; }
.word-done[hidden], .word-keys[hidden] { display: none; }
.word-keys { display: grid; gap: 6px; width: 100%; max-width: 520px; }
.word-krow { display: flex; gap: 5px; justify-content: center; }
.word-krow button { flex: 1 1 0; max-width: 44px; min-height: 50px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 800; font-size: 1rem; cursor: pointer; touch-action: manipulation; }
.word-krow button.is-wide { flex: 1.6 1 0; max-width: 70px; font-size: .8rem; }
.word-krow button:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .word-cell.is-flip, .word-row.is-shake { animation: none; transform: none; } }
.game-card-daily { border-color: var(--highlight); border-width: 2px; }

/* Admin → Games */
.games-admin-table td { vertical-align: middle; }
.games-admin-actions { white-space: nowrap; text-align: right; }
.games-admin-pick { margin-top: 4px; }
.games-admin-off { list-style: none; padding: 0; margin: 0; }
.games-admin-off li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stat-word span { font-size: 1.25rem; line-height: 1.25; }

/* Goat Checkers (views/checkers.php, views/checkers_game.php) */
.checkers-main { display: grid; gap: 18px; min-width: 0; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-msg:empty { display: none; }
.ck-msg { font-weight: 650; color: var(--accent); margin: 8px 0; }
.ck-callout { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin: 10px 0; border-radius: 12px; background: color-mix(in srgb, var(--highlight) 28%, var(--surface)); border: 1px solid var(--highlight); }
.ck-callout-wait { background: var(--bg); border-color: var(--line); }
.ck-callout input { flex: 1 1 220px; min-width: 0; }
.ck-players, .ck-games { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.ck-players li, .ck-games li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--bg); }
.ck-players .ck-pl-name { font-weight: 700; }
.ck-players li > button { margin-left: auto; }
.ck-games li > .badge { margin-left: auto; text-transform: none; }
.ck-games li.is-turn { outline: 2px solid var(--highlight); }
.ck-practice { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.ck-practice label { display: grid; gap: 4px; font-weight: 650; font-size: .9rem; }
.ck-rules ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.ck-lb .snake-pts, .ck-lb .snake-name { line-height: 1.25; }
.ck-game { display: grid; gap: 10px; justify-items: center; max-width: 560px; margin: 0 auto; }
.ck-player { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ck-player.is-turn { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.ck-chip { font-size: 1.4rem; }
.ck-pname { font-weight: 750; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ck-board-wrap { position: relative; width: 100%; }
.ck-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 3px solid color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.ck-sq { appearance: none; border: 0; padding: 0; margin: 0; position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; font: inherit; color: inherit; cursor: default; }
.ck-sq.is-light { background: var(--soft); }
.ck-sq.is-dark { background: color-mix(in srgb, var(--accent) 55%, #6b3e1f); cursor: pointer; }
.ck-sq.is-last { box-shadow: inset 0 0 0 100px color-mix(in srgb, var(--highlight) 30%, transparent); }
.ck-sq.is-sel { box-shadow: inset 0 0 0 4px var(--highlight); }
.ck-sq.is-target::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: var(--highlight); opacity: .85; }
.ck-sq.can-move .ck-piece { box-shadow: 0 0 0 3px var(--highlight), 0 2px 4px rgba(0,0,0,.35); }
.ck-sq:focus-visible { outline: 3px solid var(--highlight); outline-offset: -3px; z-index: 1; }
.ck-sq:disabled { cursor: default; }
.ck-piece { position: relative; width: 80%; height: 80%; border-radius: 50%; display: grid; place-items: center; font-size: clamp(14px, 5vw, 30px); line-height: 1; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.ck-piece.ck-g { background: #fff7e6; border: 3px solid #e7b04b; }
.ck-piece.ck-s { background: #2f2a26; border: 3px solid #9a8f85; }
.ck-crown { position: absolute; top: -18%; right: -10%; font-size: .62em; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.ck-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); }
.ck-overlay[hidden] { display: none; }
.ck-overlay-title { margin: 0; font-size: 1.6rem; font-weight: 800; }
.ck-overlay p { margin: 0; }
.ck-overlay-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ck-status { margin: 0; min-height: 1.5em; text-align: center; font-weight: 650; }
.ck-draw, .ck-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--highlight) 28%, var(--surface)); }
.ck-draw[hidden], .ck-confirm[hidden], .ck-tools [hidden], .ck-share[hidden] { display: none; }
.ck-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ck-share { width: 100%; }
.ck-link { display: flex; gap: 8px; }
.ck-link input { flex: 1; min-width: 0; }
.games-privacy .hint { margin-top: -4px; }
.game-card-versus { border-color: var(--good); border-width: 2px; }

/* Goat Battle (views/game_controls_battle.php) */
.game-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.game-wide > .snake-panel { grid-column: 1 / -1; }
@media (max-width: 860px) { .game-wide { grid-template-columns: minmax(0, 1fr); } }
.game-wide .snake-top, .game-wide .snake-stage { max-width: 900px; }
.gb-controls { display: grid; gap: 10px; width: 100%; max-width: 900px; }
.gb-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.gb-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 650; }
.gb-aim label { flex: 1 1 240px; }
.gb-aim input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--accent); }
.gb-aim output { min-width: 3.2em; font-variant-numeric: tabular-nums; font-weight: 800; }
.gb-coins { font-weight: 800; }
.gb-turn { margin-left: auto; }
.gb-shop { width: 100%; max-width: 900px; }
.gb-shop[hidden] { display: none; }
.gb-shop h3 { margin-top: 0; }
.gb-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.gb-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.gb-item-text { display: grid; gap: 2px; min-width: 0; }
.gb-item-name { font-weight: 750; }
.gb-item button { flex: none; }
.ck-fly { position: absolute; left: 0; top: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; will-change: transform; }
.ck-replay { display: grid; gap: 8px; justify-items: center; width: 100%; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ck-replay[hidden], .ck-tools [hidden] { display: none; }
.ck-replay-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.ck-replay input[type="range"] { width: 100%; accent-color: var(--accent); }
.ck-speed { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; }
.ck-speed select { padding: 4px 8px; }
.ck-note { text-align: center; margin: 0; }
.games-suggest { margin-top: 22px; }
.games-suggest-form { display: grid; gap: 10px; max-width: 640px; }
.games-suggest-link { text-align: center; margin: 18px 0 0; }

/* Goat Battle online (views/battle_online.php) */
.bo-game { display: grid; gap: 10px; justify-items: center; max-width: 900px; margin: 0 auto; }
.bo-players { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; width: 100%; }
.bo-pl { padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.bo-pl-s { text-align: right; }
.bo-pl.is-turn { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.bo-score { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bo-stage { width: 100%; display: grid; justify-items: center; }
.bo-canvas { display: block; max-width: 100%; border-radius: 12px; border: 2px solid var(--line); touch-action: none; }
.bo-game .gb-controls[hidden], .bo-game .ck-share[hidden] { display: none; }
.ck-cpu-h { margin: 18px 0 4px; }
.ck-cpu-board summary { margin: 6px 0; cursor: pointer; }
.game-wide #versus { margin-top: 0; }

/* Games: full screen / large screen (app.js "Games: full screen"). The game's own panel fills the screen; the game scripts refit to it.
   Where the browser won't do real full screen (iPhone), the same class fills the browser window instead. */
.fs-btn[hidden] { display: none; }
.fs-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
html.has-fullscreen, html.has-fullscreen body { overflow: hidden; }
html .is-fullscreen.is-fullscreen { position: fixed; inset: 0; z-index: 40; margin: 0; width: 100%; height: 100%; max-width: none; box-sizing: border-box; overflow: auto; overscroll-behavior: contain;
  background: var(--bg); border: 0; border-radius: 0; box-shadow: none; align-content: center; align-content: safe center; gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
.is-fullscreen::backdrop { background: var(--bg); }
.is-fullscreen .snake-top, .is-fullscreen .snake-stage, .is-fullscreen .gb-controls, .game-wide .is-fullscreen .snake-top, .game-wide .is-fullscreen .snake-stage { max-width: none; }
.is-fullscreen .snake-top { max-width: 1400px; }
.is-fullscreen .gb-controls { max-width: 1100px; }
.is-fullscreen .snake-canvas, .is-fullscreen .bo-canvas { max-width: none; }
.is-fullscreen .snake-pad { grid-template-columns: repeat(3, 72px); }
/* Checkers: app.js sizes the board to the space left ([data-fs-square]); the pieces grow with it */
.is-fullscreen.ck-game .ck-board-wrap { margin: 0 auto; }
.is-fullscreen .ck-board { container-type: inline-size; }
.is-fullscreen .ck-piece { font-size: max(14px, 6.4cqi); }
.is-fullscreen .ck-player, .is-fullscreen .bo-players { max-width: 900px; }
/* Daily Deal Word: bigger tiles and keys */
.is-fullscreen.word-panel { justify-items: center; }
.is-fullscreen .word-row { grid-template-columns: repeat(5, clamp(44px, min(14vw, 8.5vh), 92px)); }
.is-fullscreen .word-cell { font-size: clamp(1.3rem, min(6vw, 4.6vh), 2.8rem); }
.is-fullscreen .word-keys { max-width: 760px; }
.is-fullscreen .word-krow button { max-width: 68px; min-height: clamp(50px, 7vh, 66px); font-size: 1.15rem; }
.is-fullscreen .word-krow button.is-wide { max-width: 104px; }
.game-card-hidden { opacity: .62; border-style: dashed; }
.game-top-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a[aria-current="page"] .muted { color: inherit; opacity: .85; }
/* Visit streak (src/streaks.php): account page #streak, and the milestone pill + confetti on the next page (views/layout.php, app.js) */
.streak-now { display: grid; gap: 2px; margin-bottom: 12px; }
.streak-now p { margin: 0; }
.streak-big { font-size: 1.15rem; }
.streak-big strong { font-size: 2rem; line-height: 1; margin-right: 2px; }
.streak-miles { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.streak-mile { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); text-align: center; }
.streak-mile-icon { font-size: 2rem; line-height: 1.1; filter: grayscale(1); opacity: .35; }
.streak-mile-label { font-weight: 750; color: var(--muted); }
.streak-mile-state { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.streak-mile.is-earned { border: 2px solid var(--highlight); background: var(--surface); box-shadow: 0 4px 12px color-mix(in srgb, var(--highlight) 35%, transparent); }
.streak-mile.is-earned .streak-mile-icon { filter: none; opacity: 1; }
.streak-mile.is-earned .streak-mile-label { color: var(--ink); }
.streak-mile.is-earned .streak-mile-state { color: var(--good); font-weight: 700; }
/* Games: "My games" tab (views/partials_game_board.php) */
.game-mine-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin: 0 0 10px; }
.game-mine-stats > div { padding: 8px 6px; border-radius: 10px; background: var(--bg); text-align: center; font-size: .82rem; color: var(--muted); line-height: 1.2; }
.game-mine-stats strong { display: block; font-size: 1.25rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.game-mine-list .snake-name { line-height: 1.25; }
.game-mine p { margin: 0 0 8px; }
.goat-day-when { font-size: .88rem; font-weight: 800; color: #f9d463; }
/* Drawn game icons (src/games.php game_icon_html) */
img.game-icon-img { display: block; flex: none; }
img.game-icon.game-icon-img { width: 3.2rem; height: 3.2rem; margin-top: -2px; }
img.hero-game-icon { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.22em; }
/* Leaderboards page (views/games_leaderboards.php) */
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; align-items: start; }
.lb-card { margin: 0; }
.lb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lb-head > div { flex: 1; min-width: 0; }
.lb-head h2 { margin: 0; font-size: 1.1rem; }
.lb-icon.game-icon { font-size: 2rem; }
img.lb-icon.game-icon-img { width: 2.6rem; height: 2.6rem; }
.lb-mine { margin: 0; }
.games-lb-link { margin: -6px 0 16px; }
/* Goat Checkers: rules + time pickers, 10×10 board, clocks (views/checkers.php, views/checkers_game.php) */
.ck-settings { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 6px; }
.ck-settings label { display: grid; gap: 4px; font-weight: 650; font-size: .9rem; }
.ck-practice-friend { margin-top: 12px; }
.ck-board.ck-board-10 { grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); }
.ck-board-10 .ck-piece { font-size: clamp(11px, 4vw, 24px); }
.is-fullscreen .ck-board-10 .ck-piece { font-size: max(11px, 5.2cqi); }
.ck-clock { margin-left: auto; padding: 3px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; min-width: 4.2em; text-align: center; }
.ck-clock[hidden] { display: none; }
.ck-player.is-turn .ck-clock { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ck-clock.is-low { background: var(--bad) !important; border-color: var(--bad) !important; color: #fff !important; }
.ck-tag { font-size: .78rem; }
.snake-look { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; font-weight: 650; }
.snake-look label { display: flex; gap: 6px; align-items: center; }
.snake-prefs .details-grid { margin-bottom: 4px; }
/* 🔥 streak chip in the header (views/layout.php) */
.streak-chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .9rem; text-decoration: none;
  background: color-mix(in srgb, #ff7a3d 18%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, #ff7a3d 45%, var(--line)); white-space: nowrap; }
.streak-chip:hover { border-color: #ff7a3d; }
.points-how { margin: 6px 0; } .points-how summary { cursor: pointer; font-weight: 650; }
.points-table input[type="number"] { width: 6.5em; }
.points-table input.points-icon { width: 3.2em; text-align: center; }
.points-table input { min-height: 36px; }
/* Games page: Leaderboards + today's champions on the right when there's room (views/games.php) */
.hero.hero-split { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 28px; flex-wrap: wrap; }
.hero.hero-split > div:first-child { flex: 1 1 340px; min-width: 0; }
.games-hero-side { flex: 0 1 340px; display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.games-hero-side p { margin: 0; }
.games-champs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: .92rem; }
.game-champ { display: block; margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--accent); }
@media (max-width: 700px) { .games-hero-side { flex-basis: 100%; } }
/* Share buttons (views/partials_share.php, app.js DGShare) */
.share-bar { margin: 14px 0 6px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface); }
.share-bar-small { margin: 8px 0 0; padding: 8px 10px; width: 100%; }
.share-head { margin: 0 0 8px; font-weight: 750; }
.share-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: inherit; font-size: .9rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.share-btn[hidden] { display: none; }
.share-native { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.share-native:hover { color: var(--accent-ink); filter: brightness(1.05); }
.share-msg { margin: 6px 0 0; min-height: 1em; }

/* Fallback pictures (src/fallbackimages.php): the emoji tile when a deal has no picture that loads.
   Colour comes from the restaurant name (.fb-t0 … .fb-t11); app.js builds the same tile when a photo fails. */
.fb-tile { --fb1: #ffe3c2; --fb2: #f8b98b; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t0  { --fb1: #ffe3c2; --fb2: #f8b98b; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t1  { --fb1: #fff1b8; --fb2: #f6cf6a; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t2  { --fb1: #e3f4c8; --fb2: #b5dc8a; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t3  { --fb1: #c9f0e1; --fb2: #85d3b6; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t4  { --fb1: #cdeefa; --fb2: #8ccbe8; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t5  { --fb1: #dbe3ff; --fb2: #a8b6f2; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t6  { --fb1: #eadcff; --fb2: #c2a5f0; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t7  { --fb1: #ffdcef; --fb2: #f2a5cb; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t8  { --fb1: #ffd9d2; --fb2: #f3a08f; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t9  { --fb1: #f4e6d4; --fb2: #d9b48a; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t10 { --fb1: #e8f0d0; --fb2: #c6cf8b; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
.fb-tile.fb-t11 { --fb1: #d8f1f0; --fb2: #94cfcb; background: linear-gradient(135deg, var(--fb1), var(--fb2)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fb-tile[class] { background: linear-gradient(135deg, color-mix(in srgb, var(--fb1) 30%, #132131), color-mix(in srgb, var(--fb2) 42%, #132131)); }
}
:root[data-theme="dark"] .fb-tile[class] { background: linear-gradient(135deg, color-mix(in srgb, var(--fb1) 30%, #132131), color-mix(in srgb, var(--fb2) 42%, #132131)); }
.fb-tile[hidden] { display: none !important; }
.fb-tile .fb-emoji { display: block; font-size: 2.2em; line-height: 1.1; }
.deal-fig { margin: 0; }
.deal-fig-label { margin: 6px 2px 0; }
.deal-tile { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius); font-size: 3rem; }
.goat-day-img.fb-tile { display: grid; place-items: center; font-size: 1.6rem; }
.card-img-text.fb-tile { place-content: center; justify-items: center; gap: 4px; }
.card-img-text .fb-emoji { font-size: 1.4em; }
.slot-noimg .fb-emoji { font-size: 1.6em; margin-bottom: 6px; }
.slot-media.is-broken img { display: none; }
.dir-img-none.fb-tile { border-color: transparent; }
.dir-img-none .fb-emoji { font-size: 1em; }

/* Admin → Default images and Images that didn't load */
.fb-order { padding-left: 1.3em; line-height: 1.7; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 12px 0; }
.fb-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.fb-item.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.fb-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.fb-item-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.fb-item, .fb-item-body, .fb-item-body .form, .fb-item-body label { min-width: 0; max-width: 100%; }
.fb-item-body .form { gap: 8px; width: 100%; }
.fb-item-body input:not([type=checkbox]), .fb-item-body textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.fb-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.fb-preview { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.fb-preview .fb-tile { width: 92px; height: 70px; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; }
.fb-table td { vertical-align: top; }
.fb-table .fb-url { max-width: 260px; overflow-wrap: anywhere; }
.staff-photo-now { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.staff-photo-now figure { margin: 0; width: 220px; }
.staff-photo-now img, .staff-photo-now .fb-tile { width: 220px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: grid; place-items: center; font-size: 2rem; border: 1px solid var(--line); }
.staff-photo-now figcaption { font-size: .85rem; margin-top: 4px; }
#defaults .form input, #cuisines .form input, #cuisines .form textarea, #photo .form input { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* Deal page → "Picture for this deal" (staff, views/partials_staff_picture.php) */
.deal-media { display: grid; gap: 16px; min-width: 0; align-content: start; }
.staff-pick h2 { font-size: 1.1rem; margin: 0 0 6px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); gap: 10px; margin: 10px 0; }
.pick-opt { position: relative; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: .85rem; line-height: 1.3; }
.pick-opt input { position: absolute; top: 10px; left: 10px; margin: 0; z-index: 1; }
.pick-opt:hover, .pick-opt:focus-within { border-color: var(--accent); }
.pick-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pick-thumb img, .pick-thumb .fb-tile { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--line); font-size: 1.6rem; }
.pick-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 0; }

/* Games page: the Leaderboards box sits in the last column of the game-card grid, at the same width as a card */
.hero.games-hero { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.games-hero > div:first-child { grid-column: 1 / -2; }
.games-hero .games-hero-side { grid-column: -2 / -1; padding: 16px; justify-self: stretch; align-self: stretch; align-content: start; }   /* as tall as the heading + Friends box beside it, so the bottoms line up */
@media (max-width: 700px) { .games-hero > div:first-child, .games-hero .games-hero-side { grid-column: 1 / -1; } }
.deal > .staff-pick { grid-column: 1; grid-row: 2; margin: 0; }
.deal:has(> .staff-pick) > .deal-body { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 760px) { .deal > .staff-pick, .deal:has(> .staff-pick) > .deal-body { grid-column: auto; grid-row: auto; } }

/* Quick messages in online games (views/partials_quick_chat.php, quickchat.js) */
.qchat { display: grid; gap: 8px; margin: 8px 0 4px; }
.qchat-feed { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.qchat-bubble { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 92%; padding: 7px 12px; border-radius: 16px 16px 16px 4px;
  background: var(--soft); border: 1px solid var(--line); font-weight: 600; animation: qchat-in .28s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .6s, transform .6s; }
.qchat-bubble.is-mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--surface); }
.qchat-bubble.is-old { opacity: 0; transform: translateY(-6px); }
.qchat-who { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.qchat-emoji { font-size: 1.35rem; line-height: 1; }
@keyframes qchat-in { from { opacity: 0; transform: scale(.6) translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qchat-bubble { animation: none; transition: none; } }
.qchat-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.qchat-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; transition: transform .1s, border-color .1s; }
.qchat-btn:hover, .qchat-btn:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.qchat-btn:active { transform: scale(.95); }
.qchat-bar.is-sending .qchat-btn { opacity: .55; pointer-events: none; }
.qchat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }

/* Watch mode (src/watch.php): the player's box, the watcher's banner, the lobby list */
.watch-box { display: grid; gap: 6px; padding: 12px 14px; margin: 6px 0; }
.watch-box.is-open { border-color: var(--good); }
.watch-line { margin: 0; }
.watch-box [hidden] { display: none !important; }   /* the watch link row only shows while the game is open for watching */
.watch-banner { margin: 0 auto 12px; max-width: 560px; padding: 10px 14px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); }
.watch-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* Checkers: "Show last move" flashes the squares of the last move */
.ck-flash-last .ck-sq.is-last { animation: ck-last-flash .5s ease-in-out 3; }
@keyframes ck-last-flash { 50% { box-shadow: inset 0 0 0 100px color-mix(in srgb, var(--highlight) 75%, transparent); } }
@media (prefers-reduced-motion: reduce) { .ck-flash-last .ck-sq.is-last { animation: none; } }

/* "Your turn!" alert (views/partials_turn_banner.php, turn.js) */
[data-turn-anchor] { position: relative; }
.turn-pop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 6; }
.turn-pop[hidden] { display: none; }
.turn-pop-card { display: grid; justify-items: center; gap: 4px; padding: 18px 28px 16px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 3px solid var(--highlight); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); text-align: center; color: var(--ink); }
.turn-pop-card strong { font-size: clamp(26px, 6vw, 42px); line-height: 1.1; }
.turn-pop-card span:last-child { font-weight: 600; color: var(--muted); }
.turn-pop-pic { width: clamp(96px, 30vw, 180px); height: auto; max-height: 180px; object-fit: contain; }
.turn-pop-card .turn-emoji { font-size: clamp(64px, 16vw, 110px); line-height: 1; }
.turn-pop.is-show .turn-pop-card { animation: turn-pop 2.3s ease forwards; }
@keyframes turn-pop { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 12% { opacity: 1; transform: scale(1.08) rotate(2deg); } 20% { transform: scale(1) rotate(0); }
  80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.94); } }
.turn-chip { display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; margin: 4px auto 6px; padding: 6px 18px 6px 8px; border-radius: 999px;
  background: var(--highlight); color: #2b1a0a; font-size: 1.15rem; box-shadow: 0 4px 14px color-mix(in srgb, var(--highlight) 55%, transparent); animation: turn-pulse 1.8s ease-in-out infinite; }
.turn-chip[hidden] { display: none; }
.turn-chip-pic { width: 40px; height: 40px; object-fit: contain; }
.turn-chip .turn-emoji { font-size: 1.8rem; line-height: 1; }
@keyframes turn-pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .turn-pop.is-show .turn-pop-card, .turn-chip { animation: none; } }
/* Game console → Your turn pictures */
.turn-pics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.turn-pic-slot { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.turn-pic-preview { display: grid; place-items: center; height: 130px; border-radius: 10px;
  background: repeating-conic-gradient(color-mix(in srgb, var(--line) 70%, transparent) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.turn-pic-preview img { max-width: 120px; max-height: 120px; object-fit: contain; }
.turn-pic-preview .turn-emoji { font-size: 72px; }
.turn-pic-slot .form { gap: 6px; }
.turn-pic-slot input[type=file] { max-width: 100%; min-width: 0; }

/* Watcher reactions (react.js, DGFloat in app.js) */
.react-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 8px 0; }
.react-btn { font-size: 1.5rem; line-height: 1; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .1s; }
.react-btn:hover, .react-btn:focus-visible { transform: scale(1.15); border-color: var(--accent); }
.react-btn:active { transform: scale(.9); }
.react-bar.is-sending .react-btn { opacity: .5; pointer-events: none; }
.react-float { position: absolute; left: var(--x, 50%); bottom: 6%; font-size: 2.4rem; pointer-events: none; z-index: 7; animation: react-up 2.5s ease-out forwards; }
@keyframes react-up { 0% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -20px) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), -260px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .react-float { animation-duration: 1.2s; } }

/* Goat Four (views/four_game.php, four.js) */
.fr-board-wrap { position: relative; width: min(100%, 560px); }
.fr-board { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px; gap: 2px; background: #2f6fb0; border-radius: 16px; box-shadow: inset 0 -6px 0 #1f4f80, 0 6px 18px rgba(0, 0, 0, .18); }
.fr-col { appearance: none; border: 0; padding: 0; margin: 0; background: transparent; display: grid; grid-template-rows: repeat(6, 1fr); border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.fr-col:disabled { cursor: default; }
.fr-board.is-playable .fr-col:not(:disabled):hover, .fr-col:not(:disabled):focus-visible { background: rgba(255, 255, 255, .16); }
.fr-col:focus-visible { outline: 3px solid var(--highlight); outline-offset: -2px; }
.fr-cell { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 7%; }
.fr-cell::before { content: ''; grid-area: 1 / 1; width: 100%; height: 100%; border-radius: 50%; background: var(--bg, #fdf6ea); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .35); }
.fr-p { grid-area: 1 / 1; z-index: 1; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: clamp(14px, 4.6vw, 30px); line-height: 1; }
.fr-cell.is-g .fr-p { background: #fff7e6; border: 3px solid #e7b04b; }
.fr-cell.is-s .fr-p { background: #2f2a26; border: 3px solid #9a8f85; }
.fr-cell.is-last .fr-p { box-shadow: 0 0 0 3px var(--highlight); }
.fr-cell.is-win .fr-p { box-shadow: 0 0 0 4px #ffcf3f, 0 0 18px #ffcf3f; animation: fr-win .7s ease-in-out infinite alternate; }
.fr-cell.is-drop .fr-p { animation: fr-drop calc(.14s + var(--rows, 1) * .055s) cubic-bezier(.55, 0, .75, .9) both; }
.fr-flash-last .fr-cell.is-last .fr-p { animation: fr-flash .45s ease-in-out 3; }
@keyframes fr-drop { from { transform: translateY(calc(var(--rows, 1) * -115%)); } 85% { transform: translateY(4%); } to { transform: none; } }
@keyframes fr-win { to { transform: scale(1.08); } }
@keyframes fr-flash { 50% { box-shadow: 0 0 0 6px var(--highlight), 0 0 16px var(--highlight); } }
@media (prefers-reduced-motion: reduce) { .fr-cell.is-drop .fr-p, .fr-cell.is-win .fr-p, .fr-flash-last .fr-cell.is-last .fr-p { animation: none; } }
html[data-theme="dark"] .fr-board { background: #24548a; box-shadow: inset 0 -6px 0 #183a61, 0 6px 18px rgba(0, 0, 0, .4); }
.is-fullscreen .fr-board-wrap { width: min(100%, 92vh * 7 / 6, 900px); }
.pick-delete { margin: 8px 0 0; }

/* Picture look: padding and border on our own pictures (PIC_LOOK in src/fallbackimages.php, views/partials_pic_look.php) */
img.pic-look { box-sizing: border-box !important; }
img.pic-fit-contain { object-fit: contain !important; }
img.pic-fit-cover { object-fit: cover !important; }
img.pic-pad-0 { padding: 0 !important; }
img.pic-pad-s { padding: 3% !important; }
img.pic-pad-m { padding: 6% !important; }
img.pic-pad-l { padding: 11% !important; }
img.pic-bd-0 { border: 0 !important; }
img.pic-bd-thin { border: 3px solid var(--pic-bc) !important; }
img.pic-bd-thick { border: 7px solid var(--pic-bc) !important; }
img.pic-bc-gold { --pic-bc: #e7b04b; }
img.pic-bc-accent { --pic-bc: var(--accent); }
img.pic-bc-dark { --pic-bc: #2f2a26; }
img.pic-bc-white { --pic-bc: #fff; }
img.pic-bg-soft { background: var(--soft) !important; }
img.pic-bg-white { background: #fff !important; }
img.pic-bg-dark { background: #1f1b18 !important; }
img.pic-bg-sky { background: #dbeefe !important; }
img.dir-img.pic-bd-thin, img.goat-day-img.pic-bd-thin { border-width: 2px !important; }
img.dir-img.pic-bd-thick, img.goat-day-img.pic-bd-thick { border-width: 3px !important; }
.look-edit { margin-top: 4px; }
.look-edit summary { cursor: pointer; }
.look-form { display: grid; gap: 8px; margin-top: 8px; }
.look-preview { width: min(100%, 240px); aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--line); }
.look-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.look-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); gap: 6px 10px; }
.look-fields select { width: 100%; }
.look-lib { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 4px; }
.look-lib > p { margin: 0 0 2px; }
.look-lib-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.look-lib-item:last-child { border-bottom: 0; }
.look-lib-item .look-edit { flex-basis: 100%; margin-top: 0; }
.look-lib-name { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.look-lib-name img { width: 56px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }

/* Goat Star (views/star_game.php, star.js): 121 holes placed by star.js (left/top in %), a star drawn behind them */
.st-board-wrap { position: relative; width: min(100%, 600px); }
.st-board { position: relative; aspect-ratio: 14.4 / 16.4; width: 100%; user-select: none; -webkit-tap-highlight-color: transparent; }
.st-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-tri { fill: #f3d08a; stroke: #c98d2a; stroke-width: .5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html[data-theme="dark"] .st-tri { fill: #5a4422; stroke: #a8781f; }
.st-hole { position: absolute; width: 6.1%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  background: #fdf6ea; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35); display: grid; place-items: center; cursor: default; }
html[data-theme="dark"] .st-hole { background: #2b2520; }
.st-hole.st-home-g { background: #fff1cf; }
.st-hole.st-home-s { background: #e4dcd2; }
html[data-theme="dark"] .st-hole.st-home-g { background: #4a3a1e; }
html[data-theme="dark"] .st-hole.st-home-s { background: #3a3430; }
.st-hole:not(:disabled) { cursor: pointer; }
.st-hole:focus-visible { outline: 3px solid var(--highlight); outline-offset: 1px; }
.st-p { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: clamp(11px, 3.6vw, 24px); line-height: 1; box-sizing: border-box; }
.st-hole.is-g .st-p, .st-fly.is-g { background: #fff7e6; border: 2px solid #e7b04b; }
.st-hole.is-s .st-p, .st-fly.is-s { background: #2f2a26; border: 2px solid #9a8f85; }
.st-board.is-playable .st-hole:not(:disabled):hover .st-p { transform: scale(1.08); }
.st-hole.is-sel .st-p { box-shadow: 0 0 0 3px var(--accent), 0 0 12px var(--accent); transform: scale(1.1); }
.st-hole.is-dest { background: color-mix(in srgb, var(--highlight) 55%, #fff); box-shadow: 0 0 0 2px var(--highlight); animation: st-pulse 1s ease-in-out infinite alternate; }
.st-hole.is-trail { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35), 0 0 0 2px color-mix(in srgb, var(--highlight) 60%, transparent); }
.st-hole.is-last .st-p { box-shadow: 0 0 0 3px var(--highlight); }
.st-fly { position: absolute; width: 6.1%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 3; pointer-events: none;
  transition: left .2s ease-in-out, top .2s ease-in-out; box-shadow: 0 6px 12px rgba(0, 0, 0, .3); }
.st-fly.is-hop { animation: st-hop .23s ease-in-out; }
.st-fly.no-move { transition: none; }
.st-flash-last .st-hole.is-last .st-p { animation: fr-flash .45s ease-in-out 3; }
.st-count { margin-left: auto; }
@keyframes st-pulse { to { box-shadow: 0 0 0 4px var(--highlight); } }
@keyframes st-hop { 50% { transform: translate(-50%, -50%) scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .st-hole.is-dest, .st-fly, .st-flash-last .st-hole.is-last .st-p { animation: none; transition: none; } }
.is-fullscreen .st-board-wrap { width: min(100%, 92vh * 14.4 / 16.4, 900px); }
.st-fly[hidden] { display: none; }
.pic-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.pic-find { margin: 0 0 12px; align-items: flex-end; }
.pic-found { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.pic-found a { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.pic-found a:hover, .pic-found a:focus-visible { border-color: var(--accent); }
.pic-found img, .pic-found .fb-tile { width: 72px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; flex: none; font-size: 1.3rem; }

/* Invite a member by name (views/checkers.php, checkers_lobby.js) and the invite notice on every page (app.js, src/invites.php) */
.ck-invite { margin: 12px 0 4px; display: grid; gap: 4px; }
.ck-invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-invite-row input { flex: 1 1 200px; min-width: 0; }
.ck-invite-yes { color: var(--ok, #2e7d32); font-weight: 600; }
html[data-theme="dark"] .ck-invite-yes { color: #7fd8a0; }
.ck-invite-matches { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-invite-matches:empty { display: none; }
.invite-pop { position: fixed; right: 16px; top: 12px; z-index: 60; width: min(340px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--highlight); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); animation: invite-in .35s ease-out; }
.invite-pop[hidden] { display: none; }
.invite-pop p { margin: 0 0 8px; padding-right: 18px; }
.invite-pop-x { position: absolute; top: 4px; right: 8px; border: 0; background: none; font: inherit; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.invite-pop-note { color: var(--muted); }
.invite-pop-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes invite-in { from { transform: translateY(-16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .invite-pop { animation: none; } }
.lb-note { margin: -4px 0 8px; }

/* The invite card: a header line; in the empty margin beside the page on big screens; a small chip on game pages without that room */
.invite-pop-head { margin: 0 0 4px !important; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.invite-pop-chip { display: none; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 2px 22px 2px 2px; text-align: left; }
.invite-pop.is-chip { width: auto; max-width: min(260px, calc(100vw - 32px)); padding: 8px 12px; border-radius: 999px; }
.invite-pop.is-chip > :not(.invite-pop-chip):not(.invite-pop-x) { display: none; }
.invite-pop.is-chip .invite-pop-chip { display: block; animation: invite-wiggle 1.2s ease-in-out 2; }
.invite-pop.is-chip .invite-pop-x { top: 50%; transform: translateY(-50%); font-size: 1.1rem; }
@keyframes invite-wiggle { 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .invite-pop.is-chip .invite-pop-chip { animation: none; } }

/* Goat Battle online in full screen (views/battle_online.php, battle_online.js fit()): wide screens put the battlefield left and
   everything else (status, shop, aim and fire, messages, watch, tools) in a scrolling column on the right */
.bo-side { display: contents; }
@media (min-aspect-ratio: 5/4) {
  .bo-game.is-fullscreen { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 10px 16px; overflow: hidden; }
  .bo-game.is-fullscreen > .bo-players { grid-column: 1; grid-row: 1; width: 100%; max-width: none; }
  .bo-game.is-fullscreen > .bo-stage { grid-column: 1; grid-row: 2; align-self: center; }
  .bo-game.is-fullscreen > .bo-side { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 10px; align-self: stretch; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding-right: 2px; }
  .bo-game.is-fullscreen .bo-side .gb-row { flex-wrap: wrap; }
  .bo-game.is-fullscreen .bo-side .gb-aim label { display: grid; gap: 2px; width: 100%; }
  .bo-game.is-fullscreen .bo-side .gb-aim input[type="range"] { width: 100%; }
  .bo-game.is-fullscreen > .ck-share { grid-column: 1 / -1; }
}

/* Goat Battle modes (views/partials_battle_modes.php) */
.bt-modes { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 6px; margin: 4px 0 8px; display: grid; gap: 6px; min-width: 0; }
.bt-modes legend { padding: 0 4px; }
.bt-modes-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.bt-flags .check { margin: 0; }
.bt-modes-note { margin: 0; }
.bo-mode { margin: -4px 0 0; text-align: center; }
.bo-game.is-fullscreen > .bo-mode { display: none; }
.game-panel .bt-modes, .snake-panel ~ .bt-modes { max-width: 900px; }

/* Goat Battle online: the result card over the battlefield (battle_online.js showResult) */
.bo-stage { position: relative; }
.bo-result { z-index: 2; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 3px solid var(--line); animation: bo-result-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.bo-result.is-win { border-color: #f6c343; box-shadow: inset 0 0 0 4px color-mix(in srgb, #f6c343 35%, transparent), 0 0 40px color-mix(in srgb, #f6c343 45%, transparent); }
.bo-result.is-loss { border-color: var(--line); }
.bo-result-trophy { font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1; margin: 0; }
.bo-result.is-win .bo-result-trophy { animation: bo-trophy 1.2s ease-in-out infinite alternate; }
.bo-result .ck-overlay-title { font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
.bo-result-sub { font-weight: 600; color: var(--muted); }
@keyframes bo-result-in { from { opacity: 0; transform: scale(.85); } }
@keyframes bo-trophy { to { transform: translateY(-6px) rotate(-6deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bo-result, .bo-result-trophy { animation: none !important; } }

/* Goat Fleet (views/fleet_game.php, fleet.js): two 10 × 10 seas */
.fl-game { display: grid; gap: 10px; }
.fl-status { text-align: center; min-height: 1.4em; }
.fl-seas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px 24px; align-items: start; }
.fl-game.is-placing .fl-sea-them { display: none; }
.fl-game.is-placing .fl-seas { grid-template-columns: minmax(0, 520px); justify-content: center; }
.fl-sea-h { font-size: 1.05rem; margin: 0 0 6px; }
.fl-grid-wrap { position: relative; }
.fl-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 6px; border-radius: 12px; background: #2f6fb0; box-shadow: inset 0 -4px 0 #1f4f80; }
html[data-theme="dark"] .fl-grid { background: #24548a; }
.fl-cell { aspect-ratio: 1; border: 0; padding: 0; margin: 0; border-radius: 4px; background: #cfe6fb; font: inherit; font-size: clamp(9px, 2.4vw, 18px); line-height: 1;
  display: grid; place-items: center; color: #1f4f80; cursor: default; position: relative; }
html[data-theme="dark"] .fl-cell { background: #6f9cc8; }
.fl-grid.is-aiming .fl-cell:not(:disabled) { cursor: crosshair; }
.fl-grid.is-aiming .fl-cell:not(:disabled):hover, .fl-grid.is-aiming .fl-cell:not(:disabled):focus-visible { background: #fff3c4; box-shadow: inset 0 0 0 2px #e7b04b; }
.fl-cell:focus-visible { outline: 3px solid var(--highlight); outline-offset: 1px; z-index: 1; }
.fl-cell.is-boat { background: #b9a48a; color: #2f2a26; }
.fl-cell.is-boat.is-across.is-bow { border-radius: 40% 4px 4px 40%; }
.fl-cell.is-boat.is-across.is-stern { border-radius: 4px 40% 40% 4px; }
.fl-cell.is-boat.is-down.is-bow { border-radius: 40% 40% 4px 4px; }
.fl-cell.is-boat.is-down.is-stern { border-radius: 4px 4px 40% 40%; }
.fl-cell.is-boat.is-sunk { background: #6b4b3a; }
.fl-cell.is-hit { background: #f8c9b8; }
.fl-cell.is-boat.is-hit { background: #e8916e; }
.fl-cell.is-boat.is-sunk.is-hit { background: #7a3b2b; }
.fl-cell.is-miss { color: #1f4f80; font-size: clamp(14px, 3.4vw, 26px); }
.fl-cell.is-last { box-shadow: inset 0 0 0 3px var(--highlight); }
.fl-cell.is-chosen { box-shadow: inset 0 0 0 2px #e7b04b; }
.fl-cell.is-preview { background: #a7e3b0 !important; }
.fl-cell.is-bad { background: #f2aaa0 !important; }
.fl-cell.is-aimed { animation: fl-aim .6s ease-in-out infinite alternate; }
.fl-cell.is-new { animation: fl-pop .5s cubic-bezier(.2, 1.6, .4, 1); z-index: 1; }
@keyframes fl-pop { from { transform: scale(1.9); } }
@keyframes fl-aim { to { background: #fff3c4; } }
.fl-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.7); opacity: 0; pointer-events: none; z-index: 3; white-space: nowrap;
  padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: clamp(1.1rem, 3.4vw, 1.8rem); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: opacity .2s, transform .25s; }
.fl-flash.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fl-flash.is-hit { color: #c0392b; border: 3px solid #e8916e; }
.fl-flash.is-miss { color: #1f4f80; border: 3px solid #9cc9f2; }
.fl-flash.is-low { top: auto; bottom: -8px; }
.fl-place { display: grid; gap: 8px; margin-top: 10px; }
.fl-place-help { margin: 0; }
.fl-tray { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-boat { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: .9rem; cursor: pointer; color: inherit; }
.fl-boat-body { letter-spacing: -1px; color: #8a5a2b; }
.fl-boat.is-chosen { border-color: #e7b04b; box-shadow: 0 0 0 2px #e7b04b; }
.fl-boat.is-out { opacity: .6; }
.fl-place-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-result { z-index: 4; border: 3px solid var(--line); }
.fl-result.is-win { border-color: #f6c343; box-shadow: 0 0 40px color-mix(in srgb, #f6c343 45%, transparent); }
.fl-result-trophy { font-size: clamp(2.6rem, 8vw, 4.5rem); line-height: 1; margin: 0; }
.is-fullscreen.fl-game .fl-seas { max-width: min(100%, 160vh); margin: 0 auto; width: 100%; }
@media (prefers-reduced-motion: reduce) { .fl-cell.is-new, .fl-cell.is-aimed { animation: none; } .fl-flash { transition: none; } }
.ck-game.fl-game { max-width: 1120px; justify-items: stretch; width: 100%; }
.fl-place[hidden] { display: none; }
.fl-cell[disabled] { opacity: 1; cursor: default; }
html[data-theme="dark"] .fl-cell.is-boat { background: #d8c3a5; }
html[data-theme="dark"] .fl-cell.is-boat.is-sunk { background: #5a3a2c; }

/* Goat Flap (views/game_controls_flap.php) and same-course challenges (views/race_game.php) */
.flap-modes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.flap-modes [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.flap-note { text-align: center; margin: 8px 0 0; }
.race-players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.race-player { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.race-player.is-winner { border-color: #e0a800; box-shadow: 0 0 0 2px rgba(224, 168, 0, .35); }
.race-player.is-done .race-name::after { content: " ✓"; color: #2f8a3a; }
.race-name, .race-best { margin: 0 0 6px; }
.race-best strong { font-size: 1.5rem; }
.race-runs { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.race-runs li { min-width: 2.2em; text-align: center; padding: 3px 6px; border-radius: 8px; background: var(--chip, rgba(0, 0, 0, .06)); font-weight: 600; }
.race-runs li.is-best { background: var(--highlight); color: var(--highlight-ink); }
.race-runs li.is-left { opacity: .55; font-weight: 400; }
.race-runs li.is-flying { animation: race-pulse 1s ease-in-out infinite; }
@keyframes race-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .race-runs li.is-flying { animation: none; } }
/* Replays (src/race.php, race.js): ▶ on a run's score plays it on the canvas */
.race-runs { flex-wrap: wrap; }
.race-runs li:has(> .race-replay-btn) { padding: 0; }
.race-replay-btn { font: inherit; color: inherit; background: none; border: 0; border-radius: 8px; padding: 3px 8px; min-height: 30px; cursor: pointer; white-space: nowrap; }
.race-replay-btn:hover { background: rgba(127, 127, 127, .2); }
.race-replay-btn:focus-visible { outline: 2px solid var(--accent, #2f6fd6); outline-offset: 1px; }
.race-replay-btn.is-playing { box-shadow: 0 0 0 2px var(--accent, #2f6fd6); }
.race-replay-btn:disabled { opacity: .6; cursor: progress; }
.race-replay-hint { margin: 8px 0 0; }
.race-replay-tag { margin: 0 0 6px; font-weight: 600; text-align: center; }
/* Ghosts (race.js): race your best run; both bests together */
.race-ghost-row { margin: 10px 0 0; justify-content: center; }
.race-ghost-row[hidden], .race-both [hidden] { display: none; }
.race-both { margin: 10px 0 0; }
.race-result { text-align: center; margin: 14px 0; padding: 12px; border-radius: 12px; background: rgba(255, 229, 138, .35); }
.race-result[hidden] { display: none; }
.race-trophy { font-size: 3rem; margin: 0; line-height: 1.1; }
.race-result-title { font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.race-status { min-height: 1.4em; }
@media (max-width: 480px) { .race-players { grid-template-columns: 1fr; } }
.game-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.game-pager[hidden] { display: none; }

/* Goat Checkers: the Glossy board (views/checkers_game.php "Board" picker; checkers.js puts .ck-skin-gloss on the game) */
.ck-skin-gloss .ck-board { position: relative; border: 0; border-radius: 16px; background: #0b1220;
  box-shadow: 0 0 0 2px #e9eef6, 0 0 0 5px #3a4766, 0 0 0 6px #10182c, 0 16px 34px rgba(10, 20, 45, .45); }
.ck-skin-gloss .ck-board::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 34%, transparent 35%); }
.ck-skin-gloss .ck-sq.is-light { background: linear-gradient(145deg, #ffffff, #e4eaf3); }
.ck-skin-gloss .ck-sq:disabled { opacity: 1; }   /* light squares are disabled buttons; the site fades those, which turns them grey on the dark board */
.ck-skin-gloss .ck-sq.is-dark { background: linear-gradient(145deg, #34508f, #15203d); }
.ck-skin-gloss .ck-sq.is-last { box-shadow: inset 0 0 0 100px rgba(94, 231, 255, .2); }
.ck-skin-gloss .ck-sq.is-sel { box-shadow: inset 0 0 0 3px #5ee7ff, inset 0 0 18px rgba(94, 231, 255, .65); }
.ck-skin-gloss .ck-sq.is-target::after { background: #5ee7ff; box-shadow: 0 0 12px #5ee7ff; }
.ck-skin-gloss .ck-sq:focus-visible { outline-color: #5ee7ff; }
/* Pieces: the shine is a background layer, under the goat / sheep */
.ck-skin-gloss .ck-piece { box-shadow: 0 4px 9px rgba(0, 0, 0, .5), inset 0 -5px 9px rgba(0, 0, 0, .3); }
.ck-skin-gloss .ck-piece.ck-g { border: 2px solid #fff3cf;
  background: radial-gradient(ellipse 46% 26% at 42% 20%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 38% 30%, #fff6d8 0%, #ffd978 38%, #e5a12c 72%, #9c620a 100%); }
.ck-skin-gloss .ck-piece.ck-s { border: 2px solid #c9d4e6;
  background: radial-gradient(ellipse 46% 26% at 42% 20%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 38% 30%, #5d6674 0%, #2b3038 40%, #121418 78%, #000 100%); }
.ck-skin-gloss .ck-sq.can-move .ck-piece { box-shadow: 0 0 0 3px #5ee7ff, 0 0 16px rgba(94, 231, 255, .8), 0 4px 9px rgba(0, 0, 0, .5); }
/* Glossy board: sparkles on the pieces whose turn it is (checkers.js gleam()) */
.ck-glint { position: absolute; left: var(--gx, 80%); top: var(--gy, 20%); width: 58%; height: 58%; translate: -50% -50%; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px rgba(255, 240, 190, 1)); animation: ck-glint 1s ease-in-out forwards; }
.ck-glint::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#ffffff, #fff4c8);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
@keyframes ck-glint { 0% { transform: scale(0) rotate(0); opacity: 0; } 40% { transform: scale(1) rotate(45deg); opacity: 1; } 100% { transform: scale(0) rotate(90deg); opacity: 0; } }
.ck-skin-gloss .ck-piece.is-gleam::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .7) 46%, transparent 60%) no-repeat; background-size: 260% 100%; animation: ck-sweep .9s ease-out forwards; }
@keyframes ck-sweep { from { background-position: 130% 0; } to { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .ck-glint, .ck-skin-gloss .ck-piece.is-gleam::after { display: none; } }

/* Friends box on the Games page (views/partials_friends.php, public/assets/friends.js) */
.friends-box { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.friends-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.friends-head h2 { margin: 0; font-size: 1.15rem; }
.friends-count { font-weight: 600; font-size: .9rem; color: var(--muted); }
.friends-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.friends-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 8px; border-radius: 10px; }
.friends-item.is-online { background: color-mix(in srgb, #2f9e44 9%, transparent); }
.friends-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.friends-dot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); flex: none; }
.is-online .friends-dot { background: #2f9e44; box-shadow: 0 0 0 3px color-mix(in srgb, #2f9e44 25%, transparent); }
.friends-tools { display: inline-flex; gap: 6px; }
.friends-x { min-width: 2em; }
.friends-challenge { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.friends-challenge select { padding: 4px 8px; }
.friends-request { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--highlight) 28%, var(--surface)); }
.friends-request > span { flex: 1 1 12em; font-weight: 650; }
.friends-add { display: flex; gap: 6px; }
.friends-add input { flex: 1; min-width: 0; }
.friends-add[hidden], .friends-suggest[hidden], .friends-sent[hidden], .friends-empty[hidden] { display: none; }
.friends-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.friends-msg { margin: 0; min-height: 1.2em; }
.friends-msg.is-bad { color: var(--danger, #b3261e); }
.friends-sent, .friends-note { margin: 0; }
.friends-sent .linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

/* Admin → Patches: warning on a patch older than the running version (views/admin/patch.php) */
.patch-old { padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; border: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.patch-old p { margin: 0 0 6px; }
.patch-old p:last-child { margin: 0; }
.patch-old-ok { margin: 0 0 10px; font-weight: 650; }
/* Games privacy: the "Keep me private" switch above the other settings */
.games-private { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 12px; }
.games-private.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.games-private .hint { margin: 4px 0 0; }

/* Goat Gems · Casino board (public/assets/gems.js sets data-skin on the canvas): a dark, gold-trimmed Play / Paused panel instead of the cream one */
canvas[data-skin="casino"] + .snake-overlay { background: radial-gradient(ellipse 78% 46% at center, rgba(20,3,9,.92) 50%, rgba(20,3,9,.45) 100%); color: #f6e2a8; }   /* dark behind the words only: the board stays clear around them */
canvas[data-skin="casino"] + .snake-overlay p:not(.snake-overlay-title) { text-shadow: 0 1px 2px #000; }
canvas[data-skin="casino"] + .snake-overlay .muted { color: rgba(246,226,168,.78); }
canvas[data-skin="casino"] + .snake-overlay .snake-overlay-title { background: linear-gradient(#fff6c4, #ffd34d 45%, #e09a12 55%, #ffe48a); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; letter-spacing: .02em; }
canvas[data-skin="casino"] + .snake-overlay .btn { background: linear-gradient(#ffe48a, #e7b43a 50%, #b07a14); color: #2a0610; border-color: #8f5f0c; box-shadow: 0 0 14px rgba(255,200,80,.45); }

/* Goat Gems · mode tabs (views/partials_gems_modes.php), Zen's Finish button, the mode on a challenge page */
.gems-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 8px; }
.gems-mode { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: inherit; text-decoration: none; font-weight: 650; font-size: .9rem; line-height: 1.2; }
.gems-mode:hover { border-color: var(--accent); }
.gems-mode.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gems-mode-pitch { text-align: center; margin: 0 0 10px; }
.gems-finish { text-align: center; margin: 8px 0 0; }
.gems-mode-tag { display: inline-block; vertical-align: middle; font: 650 .9rem/1.2 system-ui, sans-serif; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

/* Points milestones (Account → Your points; v3.06.32): the bar to the next milestone, the smaller "see all" grid, the admin hints */
.pt-bar { display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; margin: 0 0 10px; appearance: none; -webkit-appearance: none;
  background: color-mix(in srgb, var(--line) 70%, transparent); accent-color: var(--accent); }
.pt-bar::-webkit-progress-bar { background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 999px; }
.pt-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--highlight), var(--accent)); border-radius: 999px; }
.pt-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--highlight), var(--accent)); border-radius: 999px; }
.streak-miles-small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 8px; }
.streak-miles-small .streak-mile { padding: 8px 4px; }
.streak-miles-small .streak-mile-icon { font-size: 1.5rem; }
.streak-miles-small .streak-mile-label { font-size: .85rem; }
.pt-top { background: color-mix(in srgb, var(--highlight) 14%, transparent); border-radius: 10px; padding: 8px 10px; }
.pt-ladder { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.points-table input[name="badge_min[]"] { width: 9.5rem; min-width: 9.5rem; }

/* Share buttons in their apps' colours (v3.06.33) */
.share-btn.share-whatsapp { background: #25d366; border-color: #1ebe5a; color: #fff; }
.share-btn.share-line { background: #06c755; border-color: #05b04b; color: #fff; }
.share-btn.share-whatsapp:hover, .share-btn.share-line:hover { filter: brightness(.95); }

/* Account → Your points: one area. Opening "See all" swaps the 5-card preview for the full grid (v3.06.34) */
#points:has(.pt-all[open]) .pt-preview { display: none; }
.pt-all .pt-all-hide, .pt-all[open] .pt-all-show { display: none; }
.pt-all[open] .pt-all-hide { display: inline; }
.pt-all[open] > .streak-miles-small { margin: 0 0 10px; }
.streak-miles-small .streak-mile-label { font-size: .8rem; overflow-wrap: anywhere; hyphens: auto; }

/* Goat Gems · full screen (public/assets/gems.js adds .gems-panel + data-gems-look to the game's panel). Only the cabinet and the
   top buttons come along, so the board gets the whole screen; pick the mode, board and players before going full screen.
   Casino: a dark velvet room around the machine instead of the page's cream. */
.gems-panel .snake-stage { max-width: 600px; }
.gems-panel .snake-top { max-width: 600px; }
.is-fullscreen.gems-panel :is(.gems-modes, .gems-mode-pitch, .gems-skin-pick, .flap-modes, .flap-note) { display: none; }
.is-fullscreen.gems-panel { justify-items: center; gap: 6px; }
.is-fullscreen.gems-panel .snake-top { max-width: none; justify-content: center; gap: 6px 20px; }
.is-fullscreen.gems-panel .snake-top > span:first-child { display: none; }   /* the score is on the machine */
.is-fullscreen.gems-panel .snake-stage { width: fit-content; max-width: 100%; margin-inline: auto; }   /* the Play panel covers the board only */
.is-fullscreen.gems-panel .snake-canvas { border: 0; border-radius: 14px; }
.is-fullscreen.gems-panel[data-gems-look="casino"], .is-fullscreen.gems-panel[data-gems-look="casino"]::backdrop { background: radial-gradient(ellipse at 50% 45%, #3d0b1a, #12030a 65%, #070103); color: #f6e2a8; }
.is-fullscreen.gems-panel[data-gems-look="casino"] .snake-canvas { box-shadow: 0 0 0 1px rgba(255,214,120,.25), 0 0 40px rgba(255,180,60,.18), 0 20px 60px rgba(0,0,0,.6); }
.is-fullscreen.gems-panel[data-gems-look="casino"] .snake-top .btn-ghost { color: #f6e2a8; background: rgba(255,214,120,.06); border-color: rgba(246,226,168,.45); }
.is-fullscreen.gems-panel[data-gems-look="casino"] .gems-finish .btn-small { background: linear-gradient(#ffe48a, #e7b43a 50%, #b07a14); color: #2a0610; border-color: #8f5f0c; }
@media (max-width: 520px) { .is-fullscreen.gems-panel .snake-top { gap: 6px 8px; } .is-fullscreen.gems-panel .snake-top > span:nth-child(2) { display: none; } }

/* Goat Gems · HD board (public/assets/gems.js "The HD board"): a deep-ocean room in full screen, and a solid white Play / Paused
   card in the middle (text on a solid background stays crisp), the board clear around it. */
.is-fullscreen.gems-panel[data-gems-look="hd"], .is-fullscreen.gems-panel[data-gems-look="hd"]::backdrop { background: radial-gradient(ellipse at 50% 40%, #0d5a78, #052a3d 65%, #021620); color: #eaf6fb; }
.is-fullscreen.gems-panel[data-gems-look="hd"] .snake-canvas { box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.is-fullscreen.gems-panel[data-gems-look="hd"] .snake-top .btn-ghost { color: #eaf6fb; background: rgba(255,255,255,.08); border-color: rgba(234,246,251,.5); }
.gems-water { position: absolute; display: block; pointer-events: none; border-radius: 10px; }   /* behind the game's canvas, same screen pixels */
.gems-water[hidden] { display: none; }
.is-fullscreen.gems-panel .gems-water { border-radius: 14px; }
canvas[data-skin="hd"] + .snake-overlay { background: radial-gradient(ellipse 70% 40% at center, rgba(255,255,255,.97) 58%, rgba(255,255,255,0) 100%); color: #0a3550; }
canvas[data-skin="hd"] + .snake-overlay .muted { color: #2f5d78; }
canvas[data-skin="hd"] + .snake-overlay .snake-overlay-title { color: #0a3550; }
canvas[data-skin="hd"] + .snake-overlay .btn { background: linear-gradient(#3fd0e0, #149bb8); color: #fff; border-color: #0f7f98; }

/* Goat Gems · City Night board (gems.js HD_LOOKS.city). In full screen its skyline (.gems-water.is-wide) covers the whole screen
   behind the board, at exact screen pixels (z-index -1 inside the full-screen panel, under the buttons and the board). */
.is-fullscreen.gems-panel .gems-water.is-wide { position: fixed; left: 0; top: 0; z-index: -1; border-radius: 0; }
.is-fullscreen.gems-panel[data-gems-look="city"], .is-fullscreen.gems-panel[data-gems-look="city"]::backdrop { background: #050816; color: #eaf4ff; }
.is-fullscreen.gems-panel[data-gems-look="city"] .snake-canvas { box-shadow: 0 0 0 1px rgba(120,200,255,.25), 0 20px 60px rgba(0,0,0,.7); }
.is-fullscreen.gems-panel[data-gems-look="city"] .snake-top { color: #eaf4ff; }
.is-fullscreen.gems-panel[data-gems-look="city"] .snake-top .btn-ghost { color: #eaf4ff; background: rgba(12,16,32,.85); border-color: rgba(120,200,255,.45); }
canvas[data-skin="city"] + .snake-overlay { background: radial-gradient(ellipse 70% 40% at center, rgba(10,13,26,.97) 58%, rgba(10,13,26,0) 100%); color: #eaf4ff; }
canvas[data-skin="city"] + .snake-overlay .muted { color: #a9bdd8; }
canvas[data-skin="city"] + .snake-overlay .snake-overlay-title { color: #ffffff; }
canvas[data-skin="city"] + .snake-overlay .btn { background: linear-gradient(90deg, #ff4fd8, #4df0ff); color: #0a0d1a; border-color: transparent; }

/* Goat Gems · Mountain Goat board (gems.js HD_LOOKS.alpine): peaks, a lake and goats across the whole screen in full screen. */
.is-fullscreen.gems-panel[data-gems-look="alpine"], .is-fullscreen.gems-panel[data-gems-look="alpine"]::backdrop { background: #0b3a8a; color: #ffffff; }
.is-fullscreen.gems-panel[data-gems-look="alpine"] .snake-canvas { box-shadow: 0 18px 50px rgba(10,30,60,.45); }
.is-fullscreen.gems-panel[data-gems-look="alpine"] .snake-top { color: #ffffff; text-shadow: 0 1px 2px rgba(0,20,50,.6); }
.is-fullscreen.gems-panel[data-gems-look="alpine"] .snake-top .btn-ghost { color: #16324f; background: rgba(255,255,255,.92); border-color: rgba(22,50,79,.3); text-shadow: none; }
canvas[data-skin="alpine"] + .snake-overlay { background: radial-gradient(ellipse 70% 40% at center, rgba(255,255,255,.97) 58%, rgba(255,255,255,0) 100%); color: #16324f; }
canvas[data-skin="alpine"] + .snake-overlay .muted { color: #3d5f7f; }
canvas[data-skin="alpine"] + .snake-overlay .snake-overlay-title { color: #16324f; }
canvas[data-skin="alpine"] + .snake-overlay .btn { background: linear-gradient(#8fdcff, #2f7fe0); color: #fff; border-color: #2a6cc4; }

/* Goat Checkers: "Show last move" sits in the player bar right under the board (views/checkers_game.php) */
.ck-player .ck-showlast { flex: none; white-space: nowrap; }
.ck-player .ck-showlast[hidden] { display: none; }
.ck-player .ck-clock:not([hidden]) + .ck-showlast { margin-left: 0; }
@media (max-width: 420px) { .ck-showlast-long { display: none; } }

/* Goat Climb · the premium look around the canvas (public/assets/climb.js adds .climb-panel). Cream / brown theme kept. */
.climb-panel { --climb-round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI", system-ui, sans-serif; }
.climb-panel .snake-canvas { border-radius: 18px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 14px 34px rgba(70,45,20,.22), 0 2px 6px rgba(70,45,20,.14); }
.climb-panel .snake-top { font-family: var(--climb-round); font-weight: 700; }
.climb-panel .snake-top strong { font-variant-numeric: tabular-nums; display: inline-block; }
.climb-panel .snake-score.is-pop { animation: climb-pop .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes climb-pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.climb-panel .snake-top .btn-small { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(#fffaf1, #f3e3cc); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(90,55,25,.16);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.climb-panel .snake-top .btn-small:hover:not(:disabled) { transform: scale(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 10px rgba(90,55,25,.2); }
.climb-panel .snake-top .btn-small:active:not(:disabled) { transform: scale(.96); }
.climb-panel .snake-top .btn-small svg { flex: none; }
.climb-panel .snake-overlay { background: rgba(255,255,255,.3); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.6); border-radius: 18px; animation: climb-in .3s cubic-bezier(.2,.9,.3,1.2); }
.climb-panel .snake-overlay-title { font-family: var(--climb-round); font-size: 2.1rem; color: #2a3a6a; text-shadow: 0 2px 0 rgba(255,255,255,.7); }
.climb-panel .snake-overlay .muted { color: #2f416e; }
.climb-panel .snake-overlay .btn { position: relative; overflow: hidden; font-family: var(--climb-round); font-size: 1.1rem; padding: 10px 28px; border-radius: 999px;
  background: linear-gradient(#ffd66b, #f2a93b); color: #4a2a06; border: 1px solid #d4862a; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 16px rgba(200,120,30,.35); transition: transform .15s ease; }
.climb-panel .snake-overlay .btn:hover { transform: scale(1.04); } .climb-panel .snake-overlay .btn:active { transform: scale(.96); }
.climb-panel .snake-overlay .btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); transform: translateX(-120%); animation: climb-sheen 3.2s ease-in-out infinite; }
@keyframes climb-sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes climb-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .climb-panel .snake-overlay, .climb-panel .snake-overlay .btn::after, .climb-panel .snake-score.is-pop { animation: none; } }
.climb-tools { margin-top: 8px; align-items: center; }
.climb-sides { display: none; }
.is-fullscreen.climb-panel .climb-sides:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }   /* a small sky stretched: soft on purpose */
.is-fullscreen.climb-panel { background: #86c4f7; }
.is-fullscreen.climb-panel :is(.flap-modes, .flap-note, .climb-tools) { display: none; }
.is-fullscreen.climb-panel .snake-canvas { border: 0; }

/* Goat Crossing · the new looks (public/assets/cross.js adds .cross-hd to the panel unless the Look is Classic) */
.cross-look-pick { margin-top: 6px; }
.cross-hd .snake-canvas { border-radius: 16px; box-shadow: 0 12px 30px rgba(20,60,30,.22), 0 2px 6px rgba(20,60,30,.14); }
.cross-sides { display: none; }
.is-fullscreen.cross-hd .cross-sides:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }   /* the lanes carried on, a small canvas stretched: soft on purpose */
.is-fullscreen.cross-hd { background: #7fb85a; }
.is-fullscreen.cross-hd .snake-canvas { border-radius: 0; }
.is-fullscreen.cross-hd :is(.flap-modes, .flap-note, .cross-look-pick) { display: none; }

/* Goat Fleet · the new looks (public/assets/fleet_look.js sets .fl-hd on the game unless the Look is Classic). The squares stay
   buttons on top; the ocean (WebGL) and the ships / effects (2D) are canvases under them, sized to whole pixels by the script. */
.fl-look-pick { flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.fl-opt { display: inline-flex; gap: 5px; align-items: center; }
.fl-gpu-hint { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff3d6; border: 1px solid #e7c27a; }
.fl-hd { --fl-round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI", system-ui, sans-serif; }
.fl-hd .fl-water, .fl-hd .fl-fx { position: absolute; z-index: 0; pointer-events: none; display: block; }
.fl-hd .fl-water[hidden], .fl-hd .fl-fx[hidden] { display: none; }
.fl-hd .fl-grid { position: relative; z-index: 1; width: max-content; margin: 0 auto; gap: 0; padding: var(--fl-frame, 18px); background: transparent; box-shadow: 0 14px 30px rgba(60,35,15,.25); border-radius: calc(var(--fl-frame, 18px) * .6);
  grid-template-columns: repeat(10, var(--fl-cell, 34px)); }
.fl-hd .fl-cell, .fl-hd .fl-cell.is-boat, .fl-hd .fl-cell.is-hit, .fl-hd .fl-cell.is-boat.is-hit, .fl-hd .fl-cell.is-boat.is-sunk, .fl-hd .fl-cell.is-boat.is-sunk.is-hit,
.fl-hd .fl-cell.is-preview, .fl-hd .fl-cell.is-bad { width: var(--fl-cell, 34px); height: var(--fl-cell, 34px); aspect-ratio: auto; background: transparent !important; color: transparent; font-size: 0; border-radius: 8px; box-shadow: none; }
.fl-hd .fl-cell.is-new, .fl-hd .fl-cell.is-aimed { animation: none; }
.fl-hd .fl-cell:hover:not(:disabled), .fl-hd .fl-sea-me .fl-cell:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), inset 0 0 14px rgba(255,255,255,.35); }
.fl-hd .fl-grid.is-aiming .fl-cell:not(:disabled):hover, .fl-hd .fl-grid.is-aiming .fl-cell:not(:disabled):focus-visible { background: transparent !important; box-shadow: inset 0 0 0 2px rgba(255,215,90,.9), inset 0 0 16px rgba(255,215,90,.35); }
.fl-hd .fl-grid.is-aiming .fl-cell:disabled { cursor: not-allowed; }
.fl-hd .fl-cell:focus-visible { outline: 3px solid #ffd34a; outline-offset: -3px; }
.fl-hd .fl-cell.is-last, .fl-hd .fl-cell.is-chosen { box-shadow: none; }
.fl-hd .fl-flash { display: none; }
.fl-hd .fl-sea-h { display: inline-flex; gap: 8px; align-items: center; font-family: var(--fl-round); font-size: 1.05rem; padding: 6px 14px; border-radius: 12px 12px 0 0;
  background: linear-gradient(#fffaf1, #f1e2c8); border: 1px solid #e2cba6; border-bottom: 0; margin: 0; }
.fl-hd .fl-sea { text-align: center; }
.fl-hd .fl-sea.is-active .fl-sea-h { background: linear-gradient(#fff3c4, #f6d98b); border-color: #e7b04b; }
.fl-fleet { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; margin: 8px 0 10px; }
.fl-fleet[hidden] { display: none; }
.fl-fleet-item { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.fl-fleet-item.is-sunk .fl-thumb { opacity: .55; }
.fl-fleet-item.is-sunk { position: relative; }
.fl-fleet-item.is-sunk::after { content: ""; position: absolute; left: -2px; right: -2px; top: 7px; height: 2px; background: #c0392b; transform: rotate(-8deg); }
.fl-pips { display: inline-flex; gap: 2px; }
.fl-pips i { width: 7px; height: 7px; border-radius: 2px; background: #cfd9e2; box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); }
.fl-pips i.is-hit { background: #e0533a; }
.fl-hd .fl-tray { gap: 8px; }
.fl-hd .fl-boat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(#fffdf8, #f5ead8); box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(90,55,25,.14);
  transition: transform .15s, box-shadow .15s; font-family: var(--fl-round); font-size: 14px; position: relative; }
.fl-hd .fl-boat.is-chosen { transform: translateY(-2px); border-color: #e7b04b; box-shadow: 0 0 0 2px #e7b04b, 0 0 16px rgba(231,176,75,.55); }
.fl-hd .fl-boat.is-out { opacity: 1; }
.fl-hd .fl-boat.is-out .fl-thumb { opacity: .55; }
.fl-check { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; background: #3aa35b; color: #fff; font-size: 12px; line-height: 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.fl-hd .fl-place-btns .btn-small, .fl-hd .ck-tools .btn-small, .fl-hd [data-fl-ready] { display: inline-flex; align-items: center; gap: 6px; background-image: linear-gradient(#fffaf1, #f3e3cc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(90,55,25,.16); transition: transform .15s, box-shadow .15s; }
.fl-hd .fl-place-btns .btn-small:hover:not(:disabled), .fl-hd .ck-tools .btn-small:hover:not(:disabled) { transform: scale(1.04); }
.fl-hd .fl-place-btns .btn-small:active:not(:disabled), .fl-hd .ck-tools .btn-small:active:not(:disabled) { transform: scale(.96); }
.fl-hd .fl-ico { flex: none; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.fl-hd .fl-ico.is-down { transform: rotate(90deg); }
.fl-hd [data-fl-ready] { background-image: linear-gradient(#f6c260, #d98a2b); color: #3b230c; border-color: #b8741f; position: relative; overflow: hidden; }
.fl-hd [data-fl-ready]:disabled { background-image: linear-gradient(#f3e6d2, #e6d3b6); color: #5a4630; border-color: #b89c78; opacity: 1; }   /* still readable: about 6:1 */
.fl-hd [data-fl-ready].is-go:not(:disabled) { animation: fl-ready-pulse 2.4s ease-in-out infinite; }
.fl-hd [data-fl-ready].is-go:not(:disabled)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); animation: fl-sheen 3s ease-in-out infinite; }
@keyframes fl-ready-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes fl-sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.fl-hd .fl-place-help { font-family: var(--fl-round); font-size: 14px; display: inline-block; justify-self: start; padding: 6px 12px; border-radius: 999px; background: #fff3d6; border: 1px solid #e7c27a; }
.fl-hd .fl-result { background: rgba(255,250,240,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fl-panel-in .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes fl-panel-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .fl-hd:not(.is-placing) .fl-seas { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; }
  .fl-hd.is-placing .fl-seas { grid-template-columns: minmax(0, 1000px); }
  .fl-hd.is-placing .fl-sea-me { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 8px 20px; align-items: start; text-align: left; }
  .fl-hd.is-placing .fl-sea-me > .fl-sea-h { grid-column: 1 / -1; justify-self: center; }
  .fl-hd.is-placing .fl-sea-me > .fl-place { margin-top: 0; }
  .fl-hd.is-placing .fl-tray { flex-direction: column; align-items: stretch; }
}
html .fl-game.is-fullscreen.is-fullscreen.fl-hd { background: linear-gradient(#bfe3f5 0%, #e9f5fb 34%, #7fb8d6 35%, #3f84ad 100%); }   /* a horizon: sky above, the open sea below */
.is-fullscreen.fl-hd :is(.fl-look-pick, .ck-note) { display: none; }
@media (prefers-reduced-motion: reduce) { .fl-hd [data-fl-ready].is-go:not(:disabled), .fl-hd [data-fl-ready]::after, .fl-hd .fl-result { animation: none; } }
.fl-game:not(.fl-hd) .fl-opt { display: none; }


/* Admin → Game console → Town of Goats setup (src/townofgoats.php) */
.tog-form { display: grid; gap: 8px; max-width: 560px; margin: 8px 0; }
.tog-form label { display: grid; gap: 3px; }
.tog-form label:has(input[type="checkbox"]) { display: flex; gap: 8px; align-items: center; }
code.tog-secret { user-select: all; word-break: break-all; }
