/* ==========================================================================
   MerryMC Updates - styles on top of base.css (the site's shared theme)
   ========================================================================== */

/* page background lives on <html> so the fixed stars/forest show through */
html {
  background:
    radial-gradient(1400px 700px at 50% -15%, #1d3a2b 0%, transparent 70%),
    linear-gradient(180deg, #0a1410 0%, #0b1511 40%, #0e1b15 100%) fixed;
}
:root[data-theme="snowday"] {
  background: radial-gradient(1400px 700px at 50% -15%, #ffffff 0%, transparent 70%), linear-gradient(180deg, #e9eee9, #eef1ec) fixed;
}
body { padding-bottom: 140px; background: transparent; }

.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 33% 8%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 22%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 76% 12%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 40%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 66% 48%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 44% 62%, rgba(255,255,255,.3), transparent 60%);
}
:root[data-theme="snowday"] .stars { display: none; }
.forest { position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; pointer-events: none; opacity: 0.55; }
.forest svg { width: 100%; height: 100%; display: block; }

.px-icon, .prop-svg { image-rendering: pixelated; flex: none; display: block; }

/* ------------------------------------------------------------------ header */
.u-header { position: relative; max-width: 1240px; margin: 0 auto; padding: 8px 24px 0; }
.u-header .logo-wrap { height: clamp(170px, 23vw, 320px); margin: 0 -24px; }
.u-header.compact .logo-wrap { height: clamp(110px, 13vw, 170px); }
.lights { height: 40px; overflow: hidden; }
.u-header > .lights { margin: -6px -24px 4px; }
.lights svg { display: block; width: 100%; height: 40px; }
.lights .bulb { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px currentColor); } 50% { opacity: .35; filter: none; } }

.u-nav { margin-top: 2px; }
.u-nav .crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font: 11px var(--font-pixel); text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.u-nav .crumbs a { padding: 6px 6px; }
.u-nav .crumbs b { color: var(--gold); font-weight: 400; padding: 6px 4px; }
.u-nav .crumbs .sep { opacity: .6; }

/* -------------------------------------------------------------------- main */
.u-main { max-width: 1000px; margin: 0 auto; padding: 22px 24px 0; }
.u-main.list, .u-main.catalog { max-width: 1100px; }

.p-title {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 18px 0 14px;
  font: 700 clamp(22px, 3.4vw, 34px) var(--font-pixel);
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink); text-align: center;
}
.p-title::before, .p-title::after {
  content: ""; flex: 1; max-width: 220px; height: 6px; border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--cranberry) 0 8px, #f4efe6 8px 14px); opacity: .85;
}
.u-intro { text-align: center; color: var(--ink-2); font-size: 15px; margin: 0 auto 26px; max-width: 640px; }
.u-intro.left { text-align: left; margin-left: 0; }

/* -------------------------------------------------------------- pills etc */
.pill.latest { background: var(--cranberry); border-color: transparent; color: #fff; }
.pill.new { border-color: var(--good); color: var(--good); }
.pill.label { border-color: var(--gold); color: var(--gold); }
.chip { text-decoration: none; }
.chip .px-icon { margin-right: 2px; }
a.chip:hover { border-color: var(--border-strong); color: var(--ink); }

/* ------------------------------------------------------------ release hero */
.rel-hero {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0 0 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.hero-lights { margin: -14px 8px 0; height: 40px; }
.rel-hero-in { display: flex; gap: 22px; align-items: center; padding: 8px 26px 0; }
.rel-hero-text { flex: 1; min-width: 0; }
.ver-ribbon {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 24px 8px 18px;
  background: var(--cranberry); color: #fff;
  font: 700 16px var(--font-pixel); letter-spacing: .05em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%);
}
.rel-title { margin: 14px 0 10px; font: 700 clamp(22px, 3.6vw, 34px)/1.15 var(--font-pixel); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.rel-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rel-summary { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.rel-hero-prop { flex: none; }
.rel-hero-prop .prop { --px: 4px; }

.page-error { margin-bottom: 18px; }

/* --------------------------------------------------------------------- toc */
.toc {
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
  margin: 18px 0 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.toc-t { font: 10px var(--font-pixel); text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.toc a { font: 12px var(--font-ui); color: var(--ink-2); text-decoration: none; padding: 5px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.toc a:hover { color: var(--ink); border-color: var(--border-strong); }

/* -------------------------------------------------------------------- body */
.rel-body {
  position: relative;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 30px 30px;
  font-size: 16px; line-height: 1.65; color: var(--ink);
}
.rel-body > :first-child { margin-top: 0; }
.rel-body a { color: var(--frost); }
.rel-body .btn.primary { color: #fff; text-decoration: none; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state svg { margin: 0 auto 12px; }

.blk-h {
  display: flex; align-items: center; gap: 12px;
  margin: 34px 0 12px; padding-bottom: 8px;
  font: 700 19px/1.25 var(--font-pixel); text-transform: uppercase; letter-spacing: .03em; color: var(--ink);
  border-bottom: 2px dashed var(--border-strong);
  scroll-margin-top: 16px;
}
.blk-title { margin: 22px 0 10px; font: 400 13px/1.3 var(--font-pixel); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.blk-p { margin: 12px 0; }
.blk { margin: 16px 0; }
.ic { font: 0.88em var(--font-mono); background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; color: var(--ink); }
.inline-prop { display: inline-block; vertical-align: -0.35em; margin: 0 1px; }
.inline-prop svg { height: 1.4em; width: auto; }

/* lists */
.blk-list { margin: 8px 0; padding-left: 26px; }
.blk-list li { margin: 5px 0; }
.blk-list li::marker { color: var(--cranberry-ink); }
.blk-list.num li::marker { font: 700 13px var(--font-pixel); color: var(--gold); }
.blk-list .blk-list { margin: 4px 0; }

/* changes */
.chg-sum { display: flex; gap: 14px; flex-wrap: wrap; font: 12px var(--font-mono); color: var(--muted); margin-bottom: 8px; }
.chg-count { display: inline-flex; align-items: center; gap: 6px; }
.tag-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; background: var(--tc); }
.changes { list-style: none; margin: 0; padding: 0; }
.changes li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.changes li:last-child { border-bottom: 0; }
.tag {
  flex: none; min-width: 84px; text-align: center;
  font: 400 10px/1 var(--font-pixel); text-transform: uppercase; letter-spacing: .03em;
  padding: 5px 7px; border-radius: 5px;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  position: relative; top: -1px;
}
.tag-new { --tc: #4cc38a; } .tag-improved { --tc: #6fb3ff; } .tag-fixed { --tc: #e3b04b; }
.tag-changed { --tc: #b48cf2; } .tag-removed { --tc: #ff7b86; } .tag-event { --tc: #f08a3c; } .tag-other { --tc: #9aa3ab; }
:root[data-theme="snowday"] .tag-new { --tc: #11804f; } :root[data-theme="snowday"] .tag-improved { --tc: #2a6fb8; }
:root[data-theme="snowday"] .tag-fixed { --tc: #94660a; } :root[data-theme="snowday"] .tag-changed { --tc: #6d43b5; }
:root[data-theme="snowday"] .tag-removed { --tc: #b3242f; } :root[data-theme="snowday"] .tag-event { --tc: #b5541a; }
.chg-text { min-width: 0; }

/* note */
.note { display: flex; gap: 14px; margin: 18px 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--nc); background: color-mix(in srgb, var(--nc) 10%, var(--surface)); border-left-width: 5px; }
.note-ic { flex: none; padding-top: 2px; }
.note-title { font: 400 12px var(--font-pixel); text-transform: uppercase; letter-spacing: .04em; color: var(--nc); margin-bottom: 4px; }
.tone-info { --nc: var(--frost); } .tone-tip { --nc: var(--good); } .tone-warning { --nc: var(--warning); }
.tone-important { --nc: var(--cranberry-ink); } .tone-fun { --nc: #ff7ad9; }

/* quote */
.blk-quote { margin: 20px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); }
.blk-quote blockquote { margin: 0; font-size: 19px; font-style: italic; color: var(--ink); }
.blk-quote figcaption { margin-top: 6px; font: 12px var(--font-mono); color: var(--muted); }

/* image */
.blk-img { margin: 20px auto; text-align: center; }
.blk-img img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; border: 4px solid var(--surface-3); box-shadow: 0 10px 30px rgba(0,0,0,.3); image-rendering: auto; }
.blk-img figcaption { margin-top: 8px; font: 12px var(--font-mono); color: var(--muted); }
.img-missing { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--border-strong); border-radius: 10px; color: var(--ink-2); font-size: 14px; }
.img-missing small { color: var(--muted); }

/* code */
.blk-code { margin: 16px 0; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #0a120e; }
:root[data-theme="snowday"] .blk-code { background: #f3f1ea; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font: 10px var(--font-pixel); text-transform: uppercase; color: var(--muted); }
.copy { font: 10px var(--font-pixel); text-transform: uppercase; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 5px 8px; cursor: pointer; }
.copy:hover { color: var(--ink); }
.blk-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font: 13px/1.55 var(--font-mono); color: var(--ink); }

/* table */
.blk-table table.data td, .blk-table table.data th { text-align: left; white-space: normal; }
.blk-table table.data td { color: var(--ink); font-size: 14px; }
.blk-table { border: 1px solid var(--border); border-radius: 10px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.stat-prop svg { margin: 0 auto 8px; }
.stat-v { font: 700 30px/1.1 var(--font-ui); color: var(--ink); }
.stat-k { margin-top: 6px; font: 10px var(--font-pixel); text-transform: uppercase; color: var(--muted); }
.stat-n { margin-top: 4px; font: 12px var(--font-mono); color: var(--ink-2); }

/* feature cards */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.feat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.feat-prop { display: flex; align-items: flex-end; height: 72px; margin-bottom: 10px; }
.feat-prop svg { max-height: 72px; width: auto; }
.feat-t { font: 700 13px var(--font-pixel); text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.feat-x { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* dividers */
.divider { margin: 30px 0; border: 0; }
hr.div-candy { height: 8px; border-radius: 4px; background: repeating-linear-gradient(-45deg, var(--cranberry) 0 10px, #f4efe6 10px 18px); opacity: .9; }
hr.div-plain { height: 1px; background: var(--border-strong); }
.div-lights { height: 40px; }
.div-icons { display: flex; justify-content: center; gap: 22px; opacity: .9; }

/* props row inside notes */
.blk-props { margin: 22px 0; }
.props-cap { text-align: center; font: 12px var(--font-mono); color: var(--muted); margin-top: 6px; }

/* flow diagram */
.flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.flow-step {
  position: relative; flex: 1 1 120px; min-width: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: var(--surface-2); border: 2px solid var(--border-strong); border-radius: 12px; padding: 16px 10px 12px;
}
.flow-n { position: absolute; top: -10px; left: 10px; font: 10px/1 var(--font-pixel); background: var(--cranberry); color: #fff; padding: 4px 6px; border-radius: 5px; }
.flow-l { font: 700 13px var(--font-pixel); text-transform: uppercase; color: var(--ink); }
.flow-x { font-size: 12px; color: var(--ink-2); font-family: var(--font-mono); }
.flow-arrow { flex: none; display: flex; align-items: center; color: var(--gold); }
@container (max-width: 560px) {
  .flow { flex-direction: column; }
  .flow-step { flex: none; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); height: 28px; }
}
.rel-body, .blk-section, .col, .cat-demo { container-type: inline-size; }

/* bars */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar-l { color: var(--ink-2); overflow-wrap: anywhere; }
.bar-track { height: 18px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(255,255,255,.12) 10px 12px); }
.bar-v { font: 600 13px var(--font-ui); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
@container (max-width: 480px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; order: 3; } }

/* compare */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.cmp-side { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; height: 100%; }
.cmp-side.before { opacity: .85; }
.cmp-side.after { border: 2px solid var(--s1); }
.cmp-t { display: flex; align-items: center; gap: 8px; font: 700 12px var(--font-pixel); text-transform: uppercase; color: var(--ink-2); }
.cmp-side.after .cmp-t { color: var(--s1); }
.cmp-arrow { color: var(--gold); }
@container (max-width: 560px) { .compare { grid-template-columns: 1fr; } .cmp-arrow { justify-self: center; transform: rotate(90deg); } }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--cranberry) 0 8px, #f4efe6 8px 14px); opacity: .7; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe27a, #d9a522); border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--gold); }
.timeline li:nth-child(3n+2) .tl-dot { background: radial-gradient(circle at 35% 35%, #ff8d95, #c4303c); box-shadow: 0 0 0 2px var(--cranberry); }
.timeline li:nth-child(3n) .tl-dot { background: radial-gradient(circle at 35% 35%, #8be0b4, #2f7d4f); box-shadow: 0 0 0 2px var(--pine); }
.tl-when { font: 11px var(--font-mono); color: var(--muted); }
.tl-t { font-weight: 600; color: var(--ink); }
.tl-x { font-size: 14px; color: var(--ink-2); }

/* tree diagram */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 30px; }
.tree li { position: relative; padding: 5px 0; }
.tree ul > li::before { content: ""; position: absolute; left: -18px; top: 0; height: 22px; width: 16px; border-left: 2px solid var(--axis); border-bottom: 2px solid var(--axis); border-bottom-left-radius: 4px; }
.tree ul > li:not(:last-child)::after { content: ""; position: absolute; left: -18px; top: 20px; bottom: -5px; border-left: 2px solid var(--axis); }
.tree-node { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; font-size: 14px; }
.tree > li > .tree-node { border: 2px solid var(--gold); font-weight: 600; }

/* section + columns */
.blk-section { margin: 22px 0; padding: 16px 20px 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.sec-t { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 700 14px var(--font-pixel); text-transform: uppercase; color: var(--ink); }
.blk-section .feat, .blk-section .stat, .blk-section .cmp-side, .blk-section .flow-step, .blk-section .tree-node { background: var(--surface-3); }
.cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 20px; margin: 16px 0; }
.cols > .col > :first-child { margin-top: 0; }
@container (max-width: 600px) { .cols { grid-template-columns: 1fr; } }
.blk-link { margin: 18px 0; }
.blk-link .btn { display: inline-block; text-decoration: none; padding: 12px 16px; }

/* problem box */
.blk-error { margin: 14px 0; padding: 12px 14px; border: 2px solid var(--critical); border-radius: 10px; background: color-mix(in srgb, var(--critical) 14%, var(--surface)); font: 13px/1.5 var(--font-mono); color: var(--ink); }
.blk-error b { font: 400 11px var(--font-pixel); text-transform: uppercase; color: var(--cranberry-ink); }
.blk-error ul { margin: 6px 0; padding-left: 18px; }
.blk-error code { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ scenes */
.rel-scene { margin-top: 30px; }
.scene { position: relative; --px: 4px; }
.scene-props { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: flex-end; gap: 6px 14px; padding: 0 12px; }
.prop {
  --px: inherit;
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit;
  transform-origin: 50% 100%;
}
.prop svg { width: calc(var(--w) * var(--px) * var(--k, 1)); height: calc(var(--h) * var(--px) * var(--k, 1)); filter: drop-shadow(0 3px 0 rgba(0,0,0,.28)); }
.prop.flip svg { transform: scaleX(-1); }
.prop:hover svg { filter: drop-shadow(0 3px 0 rgba(0,0,0,.28)) brightness(1.12); }
.prop:focus-visible { outline: 2px solid var(--frost); outline-offset: 4px; border-radius: 4px; }
.prop.hop { animation: hop .55s cubic-bezier(.3,.7,.4,1); }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.08, .9); } 45% { transform: translateY(-26px) scale(.95, 1.06); } 75% { transform: translateY(0) scale(1.06, .94); } 100% { transform: none; } }
.prop-cap { margin-top: 4px; font: 10px var(--font-pixel); text-transform: uppercase; color: var(--ink-2); }
.prop-missing { width: 48px; height: 48px; justify-content: center; border: 2px dashed var(--critical); border-radius: 8px; color: var(--cranberry-ink); font: 700 18px var(--font-pixel); cursor: help; }
.prop-missing small { position: absolute; top: 100%; font: 10px var(--font-mono); white-space: nowrap; }

/* snow */
.scene-snow .scene-props { margin-bottom: -16px; }
.snow-ground { display: block; width: 100%; height: 34px; }
.scene-snow.compact .snow-ground { height: 26px; }
/* feast: thanksgiving table */
.scene-feast .scene-props { margin-bottom: -6px; }
.feast-table .cloth {
  height: 26px; border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(196,48,60,.55) 0 6px, transparent 6px 26px),
    repeating-linear-gradient(0deg, rgba(232,130,42,.55) 0 6px, transparent 6px 13px),
    #f4e6c8;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
}
.feast-table .wood { height: 14px; border-radius: 0 0 6px 6px; background: repeating-linear-gradient(90deg, #6b3d1c 0 40px, #5a3216 40px 42px); border-top: 2px solid #3a2010; }
.scene-feast.compact .cloth { height: 18px; }
/* mantel: fireplace */
.mantel-shelf { position: relative; z-index: 2; height: 18px; margin: 0 -8px; border-radius: 4px; background: linear-gradient(#7a4a24, #4f2c12); border-bottom: 4px solid #2e1a0a; box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.mantel-wall { position: relative; height: 150px; margin: 0 8px; background-size: 64px 64px; image-rendering: pixelated; border-radius: 0 0 6px 6px; display: flex; justify-content: center; align-items: flex-end; box-shadow: inset 0 10px 18px rgba(0,0,0,.4); }
.hearth { position: relative; width: min(260px, 60%); height: 110px; background: #120b07; border-radius: 60px 60px 0 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; box-shadow: inset 0 0 30px rgba(232,130,42,.45); }
.flames { width: 120px; height: 90px; image-rendering: pixelated; animation: flicker 1.1s steps(3) infinite; transform-origin: 50% 100%; }
.logs { width: 150px; height: 18px; background-size: 32px 32px; border-radius: 4px; image-rendering: pixelated; }
@keyframes flicker { 0% { transform: scale(1, 1); } 33% { transform: scale(1.06, .93); } 66% { transform: scale(.95, 1.07); } 100% { transform: scale(1, 1); } }

/* ------------------------------------------------------------------ pager */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 26px; }
.pager-link { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.pager-link:hover { border-color: var(--gold); }
.pager-link.newer { text-align: right; }
.pl-k { font: 10px var(--font-pixel); text-transform: uppercase; color: var(--muted); }
.pl-v { font: 700 14px var(--font-pixel); color: var(--gold); }
.pl-t { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager-all { align-self: center; text-decoration: none; }

/* ----------------------------------------------------------------- footer */
.u-foot { max-width: 1000px; margin: 60px auto 0; padding: 0 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; font: 12px var(--font-mono); color: var(--muted); }
.u-foot a { color: var(--ink-2); }
.u-foot button { font: 10px var(--font-pixel); text-transform: uppercase; background: var(--surface); color: var(--ink-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

/* ========================================================== UPDATES PAGE */
.latest-gift {
  position: relative; border-radius: 18px; padding: 40px 22px 30px;
  background-size: 48px 48px; image-rendering: pixelated;
  border: 1px solid var(--border-strong); text-align: center;
}
.latest-gift::before, .latest-gift::after { content: ""; position: absolute; background: linear-gradient(90deg, #b8860b, #f2c641 40%, #b8860b); opacity: .95; }
.latest-gift::before { left: calc(50% - 12px); width: 24px; top: 0; bottom: 0; }
.latest-gift::after { top: calc(50% - 12px); height: 24px; left: 0; right: 0; background: linear-gradient(180deg, #b8860b, #f2c641 40%, #b8860b); }
.latest-gift .bow { position: absolute; z-index: 2; left: 50%; top: -4px; transform: translateX(-50%); }
.gift-tag {
  position: relative; z-index: 1; display: inline-block; max-width: 560px; width: 100%; text-align: left; text-decoration: none; color: inherit;
  background: rgba(12, 22, 18, .93); border: 2px solid #f2c641; border-radius: 14px;
  padding: 18px 22px 16px; box-shadow: 0 12px 34px rgba(0,0,0,.45);
  transition: transform .15s;
}
:root[data-theme="snowday"] .gift-tag { background: rgba(255,253,248,.96); }
.gift-tag:hover { transform: translateY(-3px); }
.gt-k { display: flex; align-items: center; gap: 8px; font: 11px var(--font-pixel); text-transform: uppercase; color: var(--gold); letter-spacing: .05em; }
.gt-row { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.gt-v { font: 700 28px var(--font-pixel); color: var(--ink); }
.gt-t { font: 600 18px var(--font-ui); color: var(--ink); }
.gt-s { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.gt-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font: 12px var(--font-mono); color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 30px 0 16px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.toolbar input[type="search"] { flex: 1 1 240px; font-size: 15px; padding: 10px 12px; }
.tb-count { font: 12px var(--font-mono); color: var(--muted); margin-left: auto; }

.majors { display: flex; flex-direction: column; gap: 16px; }
.major { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; scroll-margin-top: 12px; }
.major[open] { border-color: var(--border-strong); }
.major summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; user-select: none; }
.major summary::-webkit-details-marker { display: none; }
.major summary:hover { background: var(--surface-2); }
.major summary:focus-visible { outline: 2px solid var(--frost); outline-offset: -2px; }
.m-badge {
  flex: none; width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--cranberry); border-radius: 12px; position: relative; overflow: hidden;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.25);
}
.m-badge::before { content: ""; position: absolute; left: calc(50% - 4px); top: 0; bottom: 0; width: 8px; background: var(--gold); opacity: .9; }
.m-badge::after { content: ""; position: absolute; top: calc(50% - 4px); left: 0; right: 0; height: 8px; background: var(--gold); opacity: .9; }
.m-v { position: relative; z-index: 1; font: 700 18px/1 var(--font-pixel); color: #fff; background: rgba(10,16,13,.72); padding: 5px 6px 4px; border-radius: 5px; }
.major:nth-child(3n+2) .m-badge { background: var(--pine); }
.major:nth-child(3n) .m-badge { background: #2f6fb0; }
.m-prop { flex: none; display: flex; align-items: flex-end; height: 64px; }
.m-prop svg { max-height: 64px; width: auto; }
.m-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-title { font: 700 17px var(--font-pixel); text-transform: uppercase; color: var(--ink); }
.m-meta { font: 12px var(--font-mono); color: var(--muted); }
.m-chev { flex: none; color: var(--ink-2); transition: transform .2s; }
.major[open] .m-chev { transform: rotate(180deg); }
.m-body { padding: 4px 18px 18px; border-top: 1px dashed var(--border-strong); }
.m-sum { margin: 12px 0 4px; color: var(--ink-2); }
.minor { margin-top: 14px; }
.minor-h { display: flex; align-items: center; gap: 10px; font: 11px var(--font-pixel); color: var(--gold); margin-bottom: 6px; }
.minor-h i { flex: 1; height: 1px; background: var(--border); }
.rel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rel-row {
  display: grid; grid-template-columns: 76px 34px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit;
  background: var(--surface-2); border: 1px solid var(--border);
}
.rel-row:hover { border-color: var(--gold); background: var(--surface-3); }
.rel-row:focus-visible { outline: 2px solid var(--frost); outline-offset: 1px; }
.r-v { font: 700 13px var(--font-pixel); color: var(--gold); }
.r-ic { display: flex; justify-content: center; }
.r-ic svg { max-height: 30px; width: auto; }
.r-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: var(--ink); }
.r-s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-d { font: 12px var(--font-mono); color: var(--muted); white-space: nowrap; }

/* ================================================================ CATALOG */
.cat-h { font: 700 20px var(--font-pixel); text-transform: uppercase; margin: 40px 0 14px; color: var(--ink); scroll-margin-top: 12px; }
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.prop-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; color: inherit; font: inherit; }
.prop-tile:hover { border-color: var(--gold); }
.pt-art { height: 84px; display: flex; align-items: flex-end; }
.pt-art svg { max-height: 84px; width: auto; }
.prop-tile code { font: 12px var(--font-mono); color: var(--ink); }
.prop-tile small { font-size: 11px; color: var(--muted); }
.cat-item { margin: 16px 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; scroll-margin-top: 12px; }
.cat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-name { font: 700 13px var(--font-mono); color: var(--gold); background: var(--surface-2); border: 1px solid var(--border-strong); padding: 3px 8px; border-radius: 6px; }
.cat-desc { color: var(--ink-2); flex: 1; min-width: 200px; }
.cat-al { font: 11px var(--font-mono); color: var(--muted); }
.cat-demo { margin: 0 0 12px; padding: 16px 20px; background: var(--page); }
.cat-item .scene { margin: 10px 0 14px; }

/* ----------------------------------------------------------------- mobile */
@media (max-width: 700px) {
  .u-header, .u-main, .u-foot { padding-left: 16px; padding-right: 16px; }
  .u-header .logo-wrap, .u-header > .lights { margin-left: -16px; margin-right: -16px; }
  .rel-hero-in { flex-direction: column-reverse; align-items: flex-start; padding: 6px 16px 0; gap: 8px; }
  .rel-body { padding: 18px 16px 20px; }
  .scene { --px: 3px; }
  .rel-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .r-ic { display: none; }
  .r-main { grid-column: 1 / -1; order: 3; }
  .r-s { white-space: normal; }
  .major summary { gap: 10px; padding: 12px; }
  .m-prop { display: none; }
  .m-badge { width: 52px; height: 52px; }
  .m-title { font-size: 14px; }
  .m-body { padding: 4px 12px 14px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-all { grid-column: 1 / -1; order: 3; justify-self: center; }
  .mantel-wall { height: 120px; }
  .gt-v { font-size: 22px; }
  .tag { min-width: 72px; }
}
@media (max-width: 420px) { .scene { --px: 2.5px; } }

@media (prefers-reduced-motion: reduce) {
  .lights .bulb, .flames, .prop.hop { animation: none !important; }
  .gift-tag, .m-chev { transition: none; }
}
