/* ============================================================================
   hub-overlay.css — the "dark glass console" design system for hub windows.

   This is the reusable visual language for every surface that opens inside the
   castle hub (merchant / ranks / bag / loadouts / codex / profile). Direction
   locked 2026-06-05: dark frosted glass + gold hairlines + Cinzel titles +
   tabular numbers + SVG icons + one glowing CTA.

   SKINNABLE-FRAME SEAM (important): panels get their "frame" look from the
   --hg-frame-* tokens and the .hg-frame treatment below — NOT from hard-coded
   borders. When Teammate B's PNG-layer art lands, a carved-wood / stone frame
   becomes a drop-in skin: set --hg-frame-bg to a 9-slice border-image (or add
   body.hg-skin-art overrides) and the glass console becomes the skeuomorphic
   stall with no layout change. Keep frame styling flowing through these tokens.

   Opt-in per page with <body class="hub-glass"> + linking this file AFTER the
   page's own stylesheet so the reskin wins.
   ========================================================================== */

/* The plate type travels with the seam. Every object skin below is authored in
   type B (Metamorphous titles, Alegreya words), and a page that opts into a
   plate must not have to remember a separate font link for it: territory.html
   loads these in its own <head>, plaza.html does not. Loading them here means
   any surface that takes an object gets the picked type, not a Georgia
   fallback that quietly ships the wrong look. */
@import url('https://fonts.googleapis.com/css2?family=Metamorphous&family=Alegreya:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --hg-gold:    #D4A64B;
  --hg-gold-2:  #f0d28a;
  --hg-ink:     #f3ecdd;
  --hg-sub:     #bdb2a0;
  --hg-faint:   #8b8170;

  /* Frame seam — swap these (or border-image) for PNG art later. */
  --hg-frame-bg:     linear-gradient(180deg, rgba(36,30,48,.66), rgba(18,14,26,.72));
  --hg-frame-border: 1px solid rgba(212,166,75,.28);
  --hg-frame-radius: 16px;
  --hg-frame-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 48px rgba(0,0,0,.5);
  --hg-frame-blur:   16px;
}

/* ── Reusable components (for native hub surfaces built directly in glass) ── */
.hg-frame {
  background: var(--hg-frame-bg);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
  border: var(--hg-frame-border);
  border-radius: var(--hg-frame-radius);
  box-shadow: var(--hg-frame-shadow);
}
.hg-title { font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: 3px; color: var(--hg-gold-2);
  text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hg-num { font-variant-numeric: tabular-nums; font-family: ui-monospace,'SFMono-Regular',monospace; }
.hg-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; border: none; cursor: pointer;
  font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 1.5px; font-size: 14px; color: #140e06;
  background: linear-gradient(180deg, var(--hg-gold-2), var(--hg-gold));
  box-shadow: 0 6px 22px rgba(212,166,75,.4), 0 0 0 1px rgba(255,255,255,.25) inset;
}
.hg-cta:hover { filter: brightness(1.05); }
.hg-cta:disabled { opacity: .45; cursor: default; box-shadow: none; }

/* ============================================================================
   PACKS.HTML glass reskin (body.hub-glass). Restyles the existing markup into
   the glass console — no markup/JS changes, so the claim + ceremony flow is
   untouched. As other surfaces adopt .hub-glass, add their sections below.
   ========================================================================== */

body.hub-glass { font-family: 'Inter', system-ui, sans-serif; }

/* Header — centered Cinzel plate */
body.hub-glass .bazaar-header {
  display: block; text-align: center; border-bottom: none;
  background: none; padding: 6px 18px 18px;
}
body.hub-glass .bazaar-header h1 {
  font-size: 22px; letter-spacing: 4px; color: var(--hg-gold-2);
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
body.hub-glass .bazaar-header .sub { color: var(--hg-sub); letter-spacing: 1px; }

/* Tabs — glass pill row */
body.hub-glass .tab-bar {
  border-bottom: none; gap: 8px; padding: 6px; justify-content: center;
  background: var(--hg-frame-bg); border: var(--hg-frame-border); border-radius: 14px;
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
  max-width: 520px; margin: 0 auto 18px;
}
body.hub-glass .tab-btn {
  flex: 1; border-radius: 10px; border: 1px solid transparent; padding: 10px 8px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; color: var(--hg-sub);
}
body.hub-glass .tab-btn.active {
  color: #100c08; border-color: var(--hg-gold);
  background: linear-gradient(180deg, var(--hg-gold-2), var(--hg-gold));
  box-shadow: 0 6px 18px rgba(212,166,75,.28);
}

/* Section labels — drop the emoji glyph, keep the gold caps */
body.hub-glass .section-label { color: var(--hg-sub); letter-spacing: 2px; font-size: 10px; }
body.hub-glass .section-label .icon { display: none; }

/* Daily claim — premium glass-gold hero CTA */
body.hub-glass .daily-bar { max-width: 560px; margin: 0 auto 20px; }
body.hub-glass .daily-claim-btn {
  padding: 20px 24px; border-radius: var(--hg-frame-radius); font-size: 16px; letter-spacing: 2px;
  color: #140e06; border: 1px solid var(--hg-gold);
  background: linear-gradient(180deg, var(--hg-gold-2), var(--hg-gold));
  box-shadow: 0 10px 30px rgba(212,166,75,.4), inset 0 1px 0 rgba(255,255,255,.4);
}
body.hub-glass .daily-claim-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--hg-gold-2), var(--hg-gold)); filter: brightness(1.05);
  transform: translateY(-1px); box-shadow: 0 14px 36px rgba(212,166,75,.5);
}
body.hub-glass .daily-claim-btn .btn-icon { font-size: 20px; }
/* Claimed state → glass panel */
body.hub-glass .daily-claimed-bar {
  background: var(--hg-frame-bg); border: var(--hg-frame-border); border-radius: var(--hg-frame-radius);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .daily-claimed-bar .left .text { color: var(--hg-ink); }
body.hub-glass .countdown-badge {
  color: var(--hg-gold-2); background: rgba(212,166,75,.1); border-color: rgba(212,166,75,.25);
  font-variant-numeric: tabular-nums;
}

/* Inventory + buy + shop cards → glass frames */
body.hub-glass .pack-card,
body.hub-glass .buy-pack-card,
body.hub-glass .shop-item,
body.hub-glass .earn-info,
body.hub-glass .token-card {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .pack-name { font-family: 'Cinzel', serif; }
body.hub-glass .price-btn,
body.hub-glass .item-price {
  font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace;
}

/* Earn rows */
body.hub-glass .earn-item { gap: 12px; }
body.hub-glass .earn-item .label { color: var(--hg-ink); font-weight: 600; font-family: 'Inter', sans-serif; }
body.hub-glass .earn-item .desc { color: var(--hg-sub); }

/* Shared helper: any element opted into a glass frame */
.hg-glass-panel {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}

/* ============================================================================
   THE NOTICE BOARD — the painted skin (#1787). Round 2 of the build,
   2026-08-22: Wray's picks from the generated frames. The CAPPED BOARD
   (a parchment sheet under a shingled roof cap, on a thick sill with iron
   brackets and legs; a candle stub, claw scratches, a wisp on the ridge),
   the 9LV HEAD pressed in wax as the seal on every frame, the house sigil
   in STAINED GLASS as the medallion on the lintel, type pairing B
   (Metamorphous titles, Alegreya words: the storybook-serif move), and
   the OAK PLANK as the button. Wax stays a seal, never a button.

   The plate is the approved concept board itself: the round-6 gen, redrawn
   at 2K by self-reference (nothing changed), keyed, the seal and pinned
   scrap painted out, cut as ONE 9-slice: top = shingles + lintel + the
   shadow under them, bottom = sill + candle + legs, sides = the oak
   strips, middle = clean parchment that stretches. Slices are source px
   measured off the plate; --cb-s scales them to the panel's width so the
   board keeps the gen's proportions at every size. Wisp, seal and
   medallion are sprites the page lays on top.

   Opt in per panel: .hg-plate beside .hg-glass-panel, with the structure
   territory-world.js boardSheet() builds (.hg-sigil, .hg-title, .hg-sheet,
   plus .hg-wisp and .hg-seal). !important throughout because
   .hg-glass-panel pins background/border at important priority and the
   glass `border` shorthand resets border-image there too.

   Sources: Drive gens-inbox/ui-chrome-a/ (frames-13-capped-board-marked,
   seal-9lv-head, button-01-oak-plank, the sigil roundels); prompts in
   audit/ui-gen/2026-08-22/. Concept rounds: the #1787 sheet.

   Rollout: territory's sheets first; the HUD chips stay glass; other
   screens take their own object from the map on the sheet (journal,
   banner, glass transom, ...) through this same seam.
   ========================================================================== */
:root {
  --hg-plate-img:    url(/assets/ui/plates/cap-board.webp?v=2026-08-22d);
  --hg-plate-wisp:   url(/assets/ui/plates/wisp.webp?v=2026-08-22d);
  --hg-plate-seal:   url(/assets/ui/plates/seal-9lv.webp?v=2026-08-22d);
  --hg-plate-btn:    url(/assets/ui/plates/button-oak.webp?v=2026-08-22f);
  /* --hg-plate-sigil is set per player by the page; unset = no medallion */
  --cb-s: 0.19;                      /* plate source px -> css px, phone */
  /* the capped board's slice lines (source px); an object variant overrides
     these four plus --hg-slice and the image */
  --hg-slice: 715 254 736 241;
  --hg-sl-t: 715px; --hg-sl-r: 254px; --hg-sl-b: 736px; --hg-sl-l: 241px;
  --hg-plate-fill:   #cbb48f;        /* the plate's parchment, under the image */
  --hg-plate-ink:    #2b1d12;
  --hg-plate-ink-2:  #4a3420;
  --hg-plate-ink-3:  #6b5538;
  --hg-plate-rule:   rgba(92,64,20,.35);
  --hg-plate-well:   rgba(92,64,20,.10);
  --hg-plate-red:    #9c2a24;
  --hg-plate-gold:   #f0d28a;
  /* How far the wisp hangs above the board's ridge. It is positioned from the
     PADDING box, so its rise above the border box is 205 source px scaled, and
     a container hosting a plate must reserve at least this much above it or
     the wisp is clipped by the window. Measured at --cb-s 0.31 the rise is
     64px, and territory's gate reserved a flat 56px tuned at phone scale, so
     the wisp lost 8px off its top on a desktop. */
  --hg-plate-rise:   calc(205px * var(--cb-s));
  --hg-plate-head:   'Metamorphous', 'Cinzel', serif;
  --hg-plate-body:   'Alegreya', Georgia, serif;
}
@media (min-width: 421px) { :root { --cb-s: 0.27; } }
@media (min-width: 640px) { :root { --cb-s: 0.31; } }

/* the board */
.hg-plate {
  position: relative;
  color: var(--hg-plate-ink);
  font-family: var(--hg-plate-body);
  background: var(--hg-plate-fill) !important;
  /* The fill is a safety net for the parchment, so it must stop at the padding
     box. Painted across the whole border box it showed wherever the plate art
     is transparent (beside the cap, between the legs, around the sill), which
     put a tan card behind a cut-out object. Most visible at desktop scale,
     where the border areas are widest. */
  background-clip: padding-box !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: calc(var(--hg-sl-t) * var(--cb-s)) calc(var(--hg-sl-r) * var(--cb-s)) calc(var(--hg-sl-b) * var(--cb-s)) calc(var(--hg-sl-l) * var(--cb-s)) !important;
  border-image-source: var(--hg-plate-img) !important;
  border-image-slice: var(--hg-slice) fill !important;
  border-image-width: calc(var(--hg-sl-t) * var(--cb-s)) calc(var(--hg-sl-r) * var(--cb-s)) calc(var(--hg-sl-b) * var(--cb-s)) calc(var(--hg-sl-l) * var(--cb-s)) !important;
  border-image-repeat: stretch !important;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 26px 30px rgba(0,0,0,.55));
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 0 6px 10px;
}
/* the wisp on the ridge: a sprite that breathes and drifts a little */
.hg-wisp {
  position: absolute; left: 50%; width: calc(1486px * var(--cb-s)); height: calc(199px * var(--cb-s));
  top: calc(-1 * (715px + 205px) * var(--cb-s)); margin-left: calc(-743px * var(--cb-s));
  background: var(--hg-plate-wisp) center / contain no-repeat; pointer-events: none;
  animation: hg-wisp 3.6s ease-in-out infinite;
}
@keyframes hg-wisp { 50% { transform: translateY(-4px); filter: brightness(1.15); } }
/* the medallion: the house sigil in glass, hung on the lintel */
.hg-sigil {
  position: absolute; left: 50%; width: 92px; height: 92px; margin-left: -46px;
  top: calc(-1 * (715px - 560px) * var(--cb-s) - 58px);
  background: var(--hg-plate-sigil, none) center / contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.6));
  animation: hg-sigil-glow 4.5s ease-in-out infinite; pointer-events: none;
}
.hg-sigil::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255,170,70,.5), rgba(255,120,40,0) 70%);
  animation: hg-sigil-light 4.5s ease-in-out infinite;
}
:root:not([style*="--hg-plate-sigil"]) .hg-sigil { display: none; }
@keyframes hg-sigil-glow { 50% { filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(255,150,60,.45)); } }
@keyframes hg-sigil-light { 50% { transform: scale(1.25); opacity: .8; } }
/* the seal: the 9LV head in wax, upper right of the sheet, a touch askew */
.hg-seal {
  position: absolute; right: 2px; top: calc(-170px * var(--cb-s)); width: 54px; height: 54px;
  background: var(--hg-plate-seal) center / contain no-repeat; transform: rotate(8deg);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); pointer-events: none;
}
/* the title, in ink on the sheet under the medallion */
.hg-plate .hg-title {
  font-family: var(--hg-plate-head); font-weight: 400; color: var(--hg-plate-ink);
  text-shadow: none; letter-spacing: 2px; font-size: 20px; margin: 30px 0 6px;
}
:root:not([style*="--hg-plate-sigil"]) .hg-plate .hg-title { margin-top: 26px; }
.hg-plate .hg-num { font-family: var(--hg-plate-body); font-weight: 700; color: var(--hg-plate-ink); font-variant-numeric: tabular-nums; }
/* the sheet IS the board's parchment now: the container is plain */
.hg-sheet { position: relative; background: none; border: 0; box-shadow: none; padding: 0 4px; text-align: center; }

/* THE OBJECT STAYS WHOLE (#1851). A board taller than the screen used to have
   its cap or its sill cut off at first paint: the gate scrolls, so the missing
   end was reachable, but a notice board with no sill does not read as an
   object, it reads as a broken image. Cap and sill are the frame's fixed
   borders, so the fix is to bound the board at its container's height and let
   the parchment scroll INSIDE it. Measured on a true 390x780 phone before
   this: the deploy board ran 857px tall against 724px of room, so 133px of
   sill and legs sat below the fold, and the TERRITORY board missed by 14.

   Only territory-world.js builds .hg-plate, and it always mounts into #gate or
   #mapscreen, both `position: fixed; inset: 0`, so the percentage resolves. */
.hg-plate { display: flex; flex-direction: column; max-height: 100%; }
.hg-plate > .hg-sheet { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.hg-pins { display: none; }
/* THE OAK PLANK — the button, on its own (#1850).

   Wray picked the plank as THE button and wax as a seal that is never a
   button. This started life scoped inside a plate, which was fine while
   territory's boards were the only thing painted, and is not fine now: the
   plaza needs a plank for its menu (#1857) and for surfaces that are not
   plates at all. So the look lives on .hg-plank and the plate keeps working
   by opting its .hg-cta into it, rather than a second copy of the maths.

   The plate is one long plank cut 0 300 0 300, so the ENDS are art and the
   middle stretches to whatever the label needs. Nothing is sliced top or
   bottom, so the height is padding plus line box, and a taller button just
   makes a thicker plank. It presses by moving down 3px and dropping its
   shadow, because a plank on a peg is the thing being imitated. */
.hg-plank,
.hg-plate .hg-cta {
  font-family: var(--hg-plate-head); font-weight: 400; font-size: 14px; letter-spacing: .5px;
  color: var(--hg-plate-gold); text-shadow: 0 2px 0 #2a1608, 0 0 6px rgba(0,0,0,.4);
  background: none; border-radius: 0; position: relative; padding: 14px 6px; white-space: nowrap;
  border: 0 solid transparent; border-width: 0 30px;
  /* Sliced only left and right, so the whole source height is squeezed into the
     button and the ends stay art. That geometry is why this plate is the one
     stored losslessly: a single stray row lands as a full-width line across
     every button in the game, and the lossy webp encoder re-creates key colour
     at a cut-out's alpha edge no matter what quality it is given. It was
     briefly sliced 10 top and bottom to hide such a row; with the plate
     genuinely clean that is no longer needed, and slicing nothing keeps the
     plank's carved top and bottom edge whole. */
  border-image: var(--hg-plate-btn) 0 300 0 300 fill / 0 30px stretch;
  box-shadow: none; filter: drop-shadow(0 5px 4px rgba(0,0,0,.45));
  transition: transform .08s, filter .08s;
  -webkit-appearance: none; appearance: none; cursor: pointer; text-decoration: none;
  display: inline-block; text-align: center;
}
.hg-plank:hover,
.hg-plate .hg-cta:hover { filter: drop-shadow(0 5px 4px rgba(0,0,0,.45)) brightness(1.06); }
.hg-plank:active,
.hg-plate .hg-cta:active { transform: translateY(3px); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.hg-plank:disabled, .hg-plank[aria-disabled="true"],
.hg-plate .hg-cta:disabled { opacity: .6; transform: none; pointer-events: none; }
/* A plank on a dark scene rather than on parchment wants its own lift, or it
   reads as a sticker. Opt in with .hg-plank--float. */
.hg-plank--float { filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.hg-plank--float:hover { filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) brightness(1.06); }
.hg-plank--float:active { filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
/* A row of planks: the ends are 30px of art each, so they need real gaps or
   two planks read as one long one. */
.hg-plank-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hg-plank-row .hg-plank { flex: 1 1 auto; min-width: 0; }
@media (prefers-reduced-motion: reduce) {
  .hg-wisp, .hg-sigil, .hg-sigil::before { animation: none; }
}

/* ── THE JOURNAL (#1787): the spellbook's object. A leather-bound cover with
   iron corners, a buckled strap across the top third, claw scratches, a
   ribbon bookmark; the header sits on a parchment label pinned to the
   leather, the tabs ride the strap, the house medallion is the clasp on the
   buckle, the wisp perches on the top edge, the seal sits low on the cover.
   Plate: the round-6 journal gen redrawn bare at 2K by self-reference
   (audit/ui-gen/2026-08-22/frames/polish-journal-2k-bare.txt), keyed, one
   9-slice: top = corners + strap, bottom = corners + scratches + ribbon,
   sides = the corner pieces, middle = leather that stretches. ── */

/* the clasp: the medallion over the buckle, centre of the strap (strap 338..557 of 2205) */

/* the seal low on the cover, left, where the gen had it */

/* the label: the parchment sheet pinned to the leather; the page's header lives on it */

/* the tabs ride the strap */

/* filters and sort on the leather */

/* ---- market.html — the wagering book (mk-*) ---- */
body.hub-glass .mk-title { font-family: 'Cinzel', serif; color: var(--hg-gold-2); letter-spacing: 2px; }
body.hub-glass .mk-sub, body.hub-glass .mk-subhead { color: var(--hg-sub); }
body.hub-glass .mk-tab { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 1px; border-radius: 10px; color: var(--hg-sub); }
body.hub-glass .mk-tab.is-active {
  color: #100c08; border-color: var(--hg-gold);
  background: linear-gradient(180deg, var(--hg-gold-2), var(--hg-gold)); box-shadow: 0 6px 18px rgba(212,166,75,.28);
}
body.hub-glass .mk-card, body.hub-glass .mk-pnl, body.hub-glass .mk-pnl-cell {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .mk-pnl-value, body.hub-glass .mk-pick-odds { font-variant-numeric: tabular-nums; }

/* ---- token.html — $9LV (page-header + *-card) ---- */
body.hub-glass .page-header h1 { font-family: 'Cinzel', serif; }
body.hub-glass .page-eyebrow { color: var(--hg-gold-2); letter-spacing: 2px; }
body.hub-glass .info-card,
body.hub-glass .stat-card,
body.hub-glass .burn-card,
body.hub-glass .rule-card,
body.hub-glass .staking-card,
body.hub-glass .data-table {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .stat-card-value { font-variant-numeric: tabular-nums; }

/* ---- loadouts.html (ll-*) — frame the panels, NOT the cards inside ---- */
body.hub-glass .ll-title { font-family: 'Cinzel', serif; color: var(--hg-gold-2); letter-spacing: 2px; }
body.hub-glass .ll-intro { color: var(--hg-sub); }
body.hub-glass .ll-slot,
body.hub-glass .ll-empty-state,
body.hub-glass .ll-paywall,
body.hub-glass .ll-picker-item,
body.hub-glass .ll-modal {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .ll-slot-name { font-family: 'Cinzel', serif; }

/* ---- spellbook.html / codex (sb-*) — frame the chrome, NOT the .card-wrap cards ---- */
body.hub-glass .sb-header h1, body.hub-glass .sb-progress-text { font-family: 'Cinzel', serif; }
body.hub-glass .sb-filters,
body.hub-glass .sb-progress,
body.hub-glass .sb-search-wrap,
body.hub-glass .fuel-card {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .sb-progress-fill { background: linear-gradient(90deg, var(--hg-gold), var(--hg-gold-2)); }

/* ---- profile-public.template.html (pp-*) — frame the panels, keep the hero ---- */
body.hub-glass .pp-stat,
body.hub-glass .card {
  background: var(--hg-frame-bg) !important; border: var(--hg-frame-border) !important;
  border-radius: var(--hg-frame-radius); box-shadow: var(--hg-frame-shadow);
  -webkit-backdrop-filter: blur(var(--hg-frame-blur)); backdrop-filter: blur(var(--hg-frame-blur));
}
body.hub-glass .pp-stat__val { font-variant-numeric: tabular-nums; }
body.hub-glass .card-header .label, body.hub-glass .pp-name { font-family: 'Cinzel', serif; }

/* ==========================================================================
   THE PLAZA'S NOTICE BOARD (#1850 — the first plaza object)

   Wray, 2026-08-22: the painted chrome moves into the plaza loop, because
   that is the screen players land on now. His pairing from the #1787 rounds
   is notices = the capped board, so the plaza's floating glass pills become
   notes pinned to a small plank board: shingled cap, oak strips, sill with
   iron brackets, the wisp on the ridge, each note a pinned scrap in the
   storybook body face.

   Same plate and the same slice lines as territory's sheets (cap-board.webp,
   715 / 254 / 736 / 241), scaled small by its own --nb-s so a board holding
   three short notes keeps the gen's proportions. This is the pattern the
   held hub board (#1844) proved, re-homed where Wray wants it.

   It lives HERE rather than in plaza.html for two reasons: #notes exists on
   no other page, so nothing else can catch these rules, and plaza.html is
   another folder's file. Specificity is the only trick: plaza.html's <style>
   is parsed AFTER this file, so the rail's `#sidecol #notes` beats a plain
   `#notes` here and the two contested properties carry !important. The plate
   properties themselves are uncontested, so they do not.

   The wisp's offsets are measured from the PADDING box (that is where an
   absolutely positioned child anchors), which is why -(715 + 205) reads as
   floating far above the board but paints just clear of the ridge.
   ========================================================================== */
#notes {
  --nb-s: .105;                       /* plate source px -> css px */
  width: min(72vw, 300px);
  padding: 0 2px 3px;
  background: var(--hg-plate-fill);
  border-style: solid;
  border-color: transparent;
  border-width: calc(715px * var(--nb-s)) calc(254px * var(--nb-s)) calc(736px * var(--nb-s)) calc(241px * var(--nb-s));
  border-image-source: var(--hg-plate-img);
  border-image-slice: var(--hg-slice) fill;
  border-image-width: calc(715px * var(--nb-s)) calc(254px * var(--nb-s)) calc(736px * var(--nb-s)) calc(241px * var(--nb-s));
  border-image-repeat: stretch;
  border-radius: 0;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55));
}
/* An empty board is no board: a player with nothing waiting sees the plaza,
   not a blank plank. Both selectors are needed because the rail's rule sets
   display at a higher specificity than a plain #notes. */
#notes:empty, #sidecol #notes:empty { display: none; }
/* the wisp on the ridge */
#notes::before {
  content: ''; position: absolute; left: 50%; pointer-events: none;
  width: calc(1486px * var(--nb-s)); height: calc(199px * var(--nb-s));
  top: calc(-1 * (715px + 205px) * var(--nb-s)); transform: translateX(-50%);
  background: var(--hg-plate-wisp) center / contain no-repeat;
  animation: hg-plaza-wisp 3.6s ease-in-out infinite;
}
@keyframes hg-plaza-wisp { 50% { transform: translateX(-50%) translateY(-3px); filter: brightness(1.15); } }

/* each note: a scrap of paper pinned to the plank, ink on parchment */
#notes .p-note {
  border-radius: 0; padding: 6px 9px; gap: 8px;
  background: rgba(255, 255, 255, .38);
  border: 1px solid var(--hg-plate-rule);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .25);
  color: var(--hg-plate-ink);
  font-family: var(--hg-plate-body); font-weight: 700; font-size: 13px; letter-spacing: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transform: translateY(-6px) rotate(-.6deg);
}
#notes .p-note:nth-child(even) { transform: translateY(-6px) rotate(.7deg); }
#notes .p-note.show { transform: rotate(-.6deg); }
#notes .p-note:nth-child(even).show { transform: rotate(.7deg); }
/* the pin holding it: a small iron square, right of the words */
#notes .p-note::after {
  content: ''; width: 6px; height: 6px; flex: none; margin-left: auto; background: #232120;
  box-shadow: inset 1px 1px 0 #3a3a44, 1px 1px 0 rgba(0, 0, 0, .4);
}
/* the status dot keeps its colour but loses the glass glow */
#notes .p-note .dot { box-shadow: none; }

/* In the rail the board is a column child, so it needs its own positioning for
   the wisp to anchor to it, and room above for the wisp to hang in.

   top/left must be reset with it. The plaza pins the floating pills with
   `position: fixed; top: 58px; left: 12px`, and the rail's own rule only
   changed position to static, which parks those offsets. Turning the board
   relative wakes them up again and pushes it 12px past the rail's right edge
   and 58px down. Measured: left 1005 in a 1280 viewport whose rail content
   ends at 1268, so the right oak strip was cut off by the window. */
@media (min-aspect-ratio: 1/1) {
  #sidecol #notes {
    position: relative !important;
    top: auto; left: auto;
    width: auto; max-width: none;
    margin-top: calc(205px * var(--nb-s) + 12px);
  }
}
@media (prefers-reduced-motion: reduce) { #notes::before { animation: none; } }
