/* ==========================================================================
   Ankhdase design system
   Papyrus + lapis + gold. Warm enough for six-year-olds, clean enough that a
   fourteen-year-old is not embarrassed to be seen using it.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* --- surfaces --- */
  --bg:           #f7f2e7;
  --bg-deep:      #efe7d6;
  --surface:      #ffffff;
  --surface-2:    #fbf7ee;
  --surface-3:    #f1ebdd;
  --border:       #e3d9c3;
  --border-soft:  #eee7d8;

  /* --- ink --- */
  --ink:          #232838;
  --ink-2:        #5a6076;
  --ink-3:        #8b90a3;
  --ink-invert:   #ffffff;

  /* --- brand --- */
  --gold:         #d99a2b;
  --gold-deep:    #b57a15;
  --gold-soft:    #fdf1d8;
  --lapis:        #2f4f9e;
  --lapis-deep:   #22397a;
  --lapis-soft:   #e6ecfb;
  --turquoise:    #14958f;
  --turquoise-soft: #dcf3f1;
  --coral:        #e05b3c;
  --coral-soft:   #fde8e2;

  /* wordmark: "da" and "se" sit a step apart on the same warm ramp */
  --brand-da:     #b57a15;
  --brand-se:     #c9642a;

  /* --- semantic --- */
  --ok:           #17945a;
  --ok-soft:      #ddf5e8;
  --warn:         #cf8a09;
  --warn-soft:    #fdf0d5;
  --bad:          #d4402a;
  --bad-soft:     #fde6e1;

  /* --- subjects (mirrors content/curriculum.js) --- */
  --sub-math:     #3b82f6;
  --sub-reading:  #f97316;
  --sub-typing:   #14b8a6;
  --sub-logic:    #a855f7;
  --sub-world:    #22c55e;
  --sub-arts:     #ec4899;

  /* --- shape --- */
  --r-sm: 8px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(35,40,56,.06), 0 2px 8px rgba(35,40,56,.05);
  --shadow-2: 0 2px 4px rgba(35,40,56,.06), 0 8px 24px rgba(35,40,56,.09);
  --shadow-3: 0 8px 16px rgba(35,40,56,.08), 0 24px 48px rgba(35,40,56,.14);
  --ring: 0 0 0 3px var(--lapis-soft), 0 0 0 5px var(--lapis);

  /* --- type --- */
  --font-display: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Mono', 'SF Mono', ui-monospace, 'Consolas', monospace;
  --font-scale: 1;

  --header-h: 62px;
  --dur: 180ms;
}

html[data-theme='dark'] {
  --bg:           #10131d;
  --bg-deep:      #0a0d15;
  --surface:      #191d2b;
  --surface-2:    #1f2434;
  --surface-3:    #262c40;
  --border:       #2f3750;
  --border-soft:  #262c40;

  --ink:          #eef1f8;
  --ink-2:        #a8b0c6;
  --ink-3:        #737c96;

  --gold:         #f0b743;
  --gold-deep:    #d59a20;
  --gold-soft:    #33291029;
  --lapis:        #7ea2f5;
  --lapis-deep:   #5b84e8;
  --lapis-soft:   #1b2540;
  --turquoise:    #3fd0c6;
  --turquoise-soft: #10312f;
  --coral:        #ff8163;
  --coral-soft:   #331913;

  /* lifted for contrast on the dark ground, same one-step relationship */
  --brand-da:     #f0b743;
  --brand-se:     #f6905f;

  --ok:           #45d68d;   --ok-soft:   #0f2c1f;
  --warn:         #f0b743;   --warn-soft: #2e2410;
  --bad:          #ff6f56;   --bad-soft:  #331714;

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 4px 16px rgba(0,0,0,.45);
  --shadow-3: 0 12px 40px rgba(0,0,0,.55);
  --ring: 0 0 0 3px var(--lapis-soft), 0 0 0 5px var(--lapis);
}

/* accessibility switches, toggled on <html> */
html[data-dyslexic='1'] {
  --font-body: 'Comic Sans MS', 'Trebuchet MS', Verdana, sans-serif;
  --font-display: 'Comic Sans MS', 'Trebuchet MS', Verdana, sans-serif;
  letter-spacing: .015em;
  word-spacing: .08em;
}
html[data-contrast='1'] {
  --ink: #000; --ink-2: #1a1a1a; --border: #000; --bg: #fff; --surface: #fff;
  --shadow-1: 0 0 0 1px #000; --shadow-2: 0 0 0 2px #000; --shadow-3: 0 0 0 2px #000;
}
html[data-contrast='1'][data-theme='dark'] {
  --ink: #fff; --ink-2: #eaeaea; --border: #fff; --bg: #000; --surface: #0b0b0b;
}
html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ========================= base ========================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -8%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 60%),
    radial-gradient(800px 480px at 90% 0%, color-mix(in srgb, var(--lapis) 9%, transparent), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
a  { color: var(--lapis); text-decoration-color: color-mix(in srgb, var(--lapis) 40%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
img, svg, canvas { max-width: 100%; }
small { font-size: .82em; color: var(--ink-2); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; align-items: center; gap: .6rem; }
.row-wrap { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.hide { display: none !important; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ========================= buttons ========================= */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  padding: .62rem 1.15rem; min-height: 44px;
  border-radius: var(--r-full); border: 2px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) cubic-bezier(.2,.9,.3,1.3), box-shadow var(--dur), background var(--dur), border-color var(--dur);
  box-shadow: var(--shadow-1);
  user-select: none;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn-primary { --btn-bg: var(--lapis); --btn-fg: #fff; --btn-bd: var(--lapis-deep); }
.btn-gold    { --btn-bg: var(--gold); --btn-fg: #2a1d05; --btn-bd: var(--gold-deep); }
.btn-ghost   { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--surface-2); }
.btn-outline { --btn-bg: transparent; }
.btn-danger  { --btn-bg: var(--bad-soft); --btn-fg: var(--bad); --btn-bd: color-mix(in srgb, var(--bad) 30%, transparent); }
.btn-lg { font-size: 1.12rem; padding: .85rem 1.7rem; min-height: 54px; }
.btn-sm { font-size: .85rem; padding: .35rem .8rem; min-height: 34px; border-width: 1.5px; }
.btn-icon { padding: .5rem; width: 44px; min-height: 44px; border-radius: var(--r-full); }
.btn-block { display: flex; width: 100%; }

/* ========================= form controls ========================= */

.field { display: block; margin-bottom: .9rem; }
.field > label, .label {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: .88rem; color: var(--ink-2); margin-bottom: .3rem;
}
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r); padding: .6rem .8rem; min-height: 44px;
  transition: border-color var(--dur), box-shadow var(--dur);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 3px var(--lapis-soft); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--lapis); margin: 0; }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-full); padding: 3px; gap: 2px; }
.seg button {
  font: inherit; font-family: var(--font-display); font-weight: 700; font-size: .88rem;
  border: 0; background: transparent; color: var(--ink-2);
  padding: .42rem .95rem; border-radius: var(--r-full); cursor: pointer; min-height: 38px;
  transition: background var(--dur), color var(--dur);
}
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  padding: .22rem .68rem; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--ink-2); border: 1.5px solid transparent;
  cursor: default; white-space: nowrap;
}
button.chip { cursor: pointer; min-height: 32px; transition: all var(--dur); }
button.chip:hover { border-color: var(--border); }
button.chip[aria-pressed='true'] { background: var(--lapis); color: #fff; }
.chip-gold { background: var(--gold-soft); color: var(--gold-deep); }
.chip-ok   { background: var(--ok-soft); color: var(--ok); }
.chip-bad  { background: var(--bad-soft); color: var(--bad); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }

/* ========================= cards ========================= */

.card {
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow-1);
}
.card-pad-lg { padding: 1.75rem; }
.card-flush { padding: 0; overflow: hidden; }

.panel {
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden;
}
.panel > header {
  padding: .9rem 1.25rem; border-bottom: 1.5px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface-2);
}
.panel > header h2, .panel > header h3 { margin: 0; font-size: 1.05rem; }
.panel > .body { padding: 1.25rem; }

/* ========================= app header ========================= */

.appbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1.5px solid var(--border-soft);
}
.appbar .wrap { display: flex; align-items: center; gap: 1rem; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--gold), var(--coral));
  color: #fff; font-size: 20px; line-height: 1;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--gold) 45%, transparent);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
/* "ankh · da · se" — the two syllables after the ankh take slightly different
   warm tones, echoing the gold-to-coral gradient in the brand mark. Kept close
   together so it reads as one word, not three. */
.brand-name em { font-style: normal; color: var(--brand-da); }
.brand-name em.se { color: var(--brand-se); }

.navlinks { display: flex; gap: .15rem; }
.navlinks a {
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  color: var(--ink-2); text-decoration: none; padding: .45rem .8rem; border-radius: var(--r-full);
  transition: background var(--dur), color var(--dur);
}
.navlinks a:hover { background: var(--surface-3); color: var(--ink); }
.navlinks a[aria-current='page'] { background: var(--lapis-soft); color: var(--lapis); }

/* XP pill in the header */
.xp-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface-3); border-radius: var(--r-full); padding: .25rem .3rem .25rem .75rem;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
}
.xp-bar { width: 66px; height: 7px; border-radius: var(--r-full); background: var(--border); overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--coral)); border-radius: inherit; transition: width .6s cubic-bezier(.2,.9,.3,1); }
.streak-pill { display: inline-flex; align-items: center; gap: .25rem; font-family: var(--font-display); font-weight: 800; font-size: .9rem; color: var(--coral); }

.avatar {
  width: 38px; height: 38px; border-radius: var(--r-full); flex: none;
  display: grid; place-items: center; font-size: 20px;
  background: var(--lapis-soft); border: 2px solid var(--border); cursor: pointer;
}

/* ========================= activity cards ========================= */

.tile-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) cubic-bezier(.2,.9,.3,1.3), box-shadow var(--dur), border-color var(--dur);
  cursor: pointer;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: color-mix(in srgb, var(--tile-color, var(--lapis)) 45%, transparent); }
.tile:focus-visible { box-shadow: var(--ring); }
.tile-art {
  height: 108px; display: grid; place-items: center; font-size: 46px; position: relative;
  background:
    radial-gradient(120% 120% at 30% 15%, color-mix(in srgb, var(--tile-color) 26%, transparent), transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--tile-color) 16%, var(--surface)), var(--surface));
}
.tile-art::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--tile-color) 30%, transparent) 1px, transparent 0);
  background-size: 14px 14px; opacity: .5;
}
.tile-art > * { position: relative; z-index: 1; filter: drop-shadow(0 3px 5px rgba(0,0,0,.18)); }
.tile-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.tile-title { font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; line-height: 1.2; }
.tile-tag { font-size: .84rem; color: var(--ink-2); line-height: 1.35; flex: 1; }
.tile-meta { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; }
.tile-fav {
  position: absolute; top: .55rem; right: .55rem; z-index: 2;
  width: 32px; height: 32px; border-radius: var(--r-full); border: 0;
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px);
  display: grid; place-items: center; cursor: pointer; font-size: 15px; opacity: 0;
  transition: opacity var(--dur), transform var(--dur);
}
.tile:hover .tile-fav, .tile-fav[aria-pressed='true'] { opacity: 1; }
.tile-fav:hover { transform: scale(1.15); }
.tile-badge {
  position: absolute; top: .55rem; left: .55rem; z-index: 2;
  font-family: var(--font-display); font-weight: 800; font-size: .7rem;
  padding: .15rem .55rem; border-radius: var(--r-full);
  background: var(--gold); color: #2a1d05;
}

/* subject dot */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--tile-color, var(--lapis)); }

/* ========================= progress bits ========================= */

.meter { height: 10px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--lapis); transition: width .5s cubic-bezier(.2,.9,.3,1); }
.meter.sm { height: 6px; }
.meter.lg { height: 16px; }

.stat { text-align: center; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 1rem; }

/* badge chips */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .75rem; }
.badge-item { text-align: center; padding: .7rem .4rem; border-radius: var(--r); background: var(--surface-2); border: 1.5px solid var(--border-soft); }
.badge-item .ico { font-size: 30px; line-height: 1; display: block; }
.badge-item .nm { font-family: var(--font-display); font-weight: 700; font-size: .74rem; margin-top: .3rem; line-height: 1.2; }
.badge-item.locked { opacity: .38; filter: grayscale(1); }

/* streak calendar */
.cal { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; }
.cal i { width: 12px; height: 12px; border-radius: 3px; background: var(--surface-3); display: block; }
.cal i[data-l='1'] { background: color-mix(in srgb, var(--ok) 30%, var(--surface-3)); }
.cal i[data-l='2'] { background: color-mix(in srgb, var(--ok) 55%, var(--surface-3)); }
.cal i[data-l='3'] { background: color-mix(in srgb, var(--ok) 78%, var(--surface-3)); }
.cal i[data-l='4'] { background: var(--ok); }

/* ========================= toasts & modals ========================= */

#toasts {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column-reverse; gap: .5rem; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 700;
  padding: .65rem 1.15rem; border-radius: var(--r-full); box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: .55rem; max-width: min(92vw, 460px);
  animation: toast-in .3s cubic-bezier(.2,.9,.3,1.4);
}
.toast.gold { background: var(--gold); color: #2a1d05; }
.toast.bad  { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.94); } }

dialog {
  border: 0; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-3); max-width: min(560px, 92vw); width: 100%;
}
dialog::backdrop { background: color-mix(in srgb, #10131d 60%, transparent); backdrop-filter: blur(3px); }
dialog .dlg-head { padding: 1.25rem 1.5rem .5rem; }
dialog .dlg-body { padding: 0 1.5rem 1rem; }
dialog .dlg-foot { padding: 1rem 1.5rem 1.5rem; display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }

/* ========================= tables ========================= */

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
table.data th {
  font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  position: sticky; top: 0; background: var(--surface-2); z-index: 1;
}
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* mastery heat cell */
.heat { display: inline-block; width: 100%; min-width: 34px; text-align: center; border-radius: var(--r-sm); padding: .18rem .3rem; font-weight: 700; font-size: .78rem; }

/* ========================= misc ========================= */

.hr { height: 1.5px; background: var(--border-soft); border: 0; margin: 1.25rem 0; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); }
.empty .ico { font-size: 48px; display: block; margin-bottom: .5rem; opacity: .6; }

.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

.kbd {
  display: inline-block; font-family: var(--font-mono); font-size: .82em;
  padding: .1em .45em; border-radius: 5px; background: var(--surface-3);
  border: 1px solid var(--border); border-bottom-width: 2px;
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 1.6rem); }
  .navlinks { display: none; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
  .tile-art { height: 82px; font-size: 34px; }
  .stat-value { font-size: 1.5rem; }
}

@media print {
  .appbar, .btn, #toasts { display: none !important; }
  body { background: #fff; }
}
