/* v2 tokens — the only place with colour values. Base: scheme A 霧灰藍 (#DAE0E4 family). UI: 紅 年赤 #9E3729 (primary) + 金 gold + 群青 ultramarine #23308C. Festive decoration uses the 歲家 palette (--v2-deco-*, from work/palette-v4/palettes.json). */
@font-face { font-family: "V2 Serif"; src: url("../fonts/v2-serif-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "V2 Sans"; src: url("../fonts/v2-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "V2 Sans"; src: url("../fonts/v2-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "V2 Inter"; src: url("../../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --v2-bg: #DAE0E4;
  --v2-surface: #EEF2F4;
  --v2-surface-2: #CDD5DA;
  --v2-pic-bg: #F7F9FA;      /* merch picture frame: a step lighter than the card face, so clear acrylic reads */
  --v2-card: rgba(238, 242, 244, .9);
  --v2-ink: #14181C;
  --v2-ink-2: #46515A;       /* muted text, 5.8:1 on --v2-bg */
  --v2-ink-2-strong: #353E46; /* muted text sitting straight on a picture (bg25d_v2 sets) */
  --v2-line: #A9B4BB;
  --v2-line-soft: rgba(20, 24, 28, .1);
  --v2-primary: #9E3729;     /* 年赤 — white on it 6.9:1 */
  --v2-primary-deep: #7F2A1F;
  --v2-primary-soft: rgba(158, 55, 41, .1);
  --v2-accent: #23308C;      /* 群青 ultramarine — white on it 10.6:1, 7.6:1 on --v2-bg */
  --v2-accent-soft: rgba(35, 48, 140, .09);
  --v2-gold: #7A5A16;        /* 深金 deep gold — gold text, 5.6:1 on surface */
  --v2-gold-line: #B8913A;   /* 金 — rails, borders, seals, fills (non-text) */
  --v2-gold-soft: rgba(184, 145, 58, .16);
  /* 歲家 decoration palette (palette-v4) — lantern mounts, stage, red-packet glyphs, festive chips. Fills/lines only, never small text. */
  --v2-deco-red: #9E3729;      /* 年赤 (年) */
  --v2-deco-rust: #A34017;     /* 鏽赤 (年 精2) */
  --v2-deco-cinnabar: #AA2F33; /* 硃砂 (夕) */
  --v2-deco-gold: #9F824E;     /* 望金 (望) */
  --v2-deco-gold-2: #8D6B25;   /* 禾金 (黍) */
  --v2-deco-indigo: #202360;   /* 歲靛 (黍) */
  --v2-deco-teal: #386571;     /* 墨青 (夕) */
  --v2-deco-silk: #C1B3A2;     /* 素絹 (頡) */
  --v2-deco-paper: #FAF1EB;    /* 箋上高光 (頡) */
  --v2-deco-gold-soft: rgba(159, 130, 78, .18);
  --v2-deco-indigo-shade: rgba(32, 35, 96, .2);
  --v2-ok: #2C5E3F;
  --v2-warn: #8A2F22;
  --v2-lv-hi: #2C5E3F; --v2-lv-mid: #7B5A12; --v2-lv-lo: #9E3729; --v2-lv-full: #7A848C;
  --v2-on-dark: #EEF2F4;
  --v2-veil-rgb: 218, 224, 228;
  --v2-on-dark-2: #AAB5BD; --v2-on-dark-3: #C9D2D8; --v2-dark-line: #5B6670; --v2-dark-line-2: #3A444C;
  --v2-err-bg: #F6ECEA; --v2-off: #6B757D; --v2-white: #fff;
  /* role tokens: text-on-surface variants of the UI colours + glass/plate. Day values equal the base colours; the B night scheme (below) lifts them. */
  --v2-primary-ink: var(--v2-primary); --v2-primary-deep-ink: var(--v2-primary-deep); --v2-accent-ink: var(--v2-accent);
  --v2-ok-ink: var(--v2-ok); --v2-warn-ink: var(--v2-warn);
  --v2-glass-rgb: 238, 242, 244;      /* header / action bar / chips / stamps glass */
  --v2-card-edge: rgba(255, 255, 255, .7);
  --v2-inv-bg: var(--v2-ink); --v2-inv-ink: var(--v2-on-dark);   /* inverted chips: skip link, language on, notice */
  --v2-plate: #EEF2F4; --v2-plate-rgb: 238, 242, 244; --v2-plate-ink: #46515A; --v2-plate-ink-strong: #14181C;  /* logo + QR plates stay light in every scheme */
  /* aliases read by ../js/qr.js (demo QR colours) */
  --surface: var(--v2-surface); --ink: var(--v2-ink); --accent: var(--v2-primary);
  --v2-shadow: 0 0.0625rem 0 rgba(255, 255, 255, .6) inset, 0 1px 2px rgba(20, 24, 40, .06), 0 .375rem 1rem -.375rem rgba(20, 24, 40, .12), 0 1.5rem 3rem -1.25rem rgba(20, 24, 40, .2);
  --v2-radius: 1rem; --v2-radius-s: 0.625rem;

  /* type: 6 sizes */
  --v2-fs-1: 0.75rem;   /* small / English subtitle */
  --v2-fs-2: 0.875rem;   /* secondary */
  --v2-fs-3: 1rem;   /* body */
  --v2-fs-4: 1.25rem;   /* card title */
  --v2-fs-5: clamp(1.625rem, 3vw, 2.125rem);   /* section title */
  --v2-fs-6: clamp(2.75rem, 6.4vw, 5.5rem); /* display */
  --v2-serif: "V2 Serif", "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;
  --v2-sans: "V2 Inter", "V2 Sans", "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --v2-num: "V2 Inter", "V2 Sans", sans-serif;
  --v2-ease: cubic-bezier(.2, .7, .2, 1);
  --v2-top-h: 4.25rem;
  --v2-bar-h: 4.75rem;
  /* r5 spacing scale (rem) — every new gap / padding uses one of these */
  --v2-sp-1: .25rem; --v2-sp-2: .5rem; --v2-sp-3: .75rem; --v2-sp-4: 1rem; --v2-sp-5: 1.5rem; --v2-sp-6: 2rem; --v2-sp-7: 3rem; --v2-sp-8: 4.5rem;
  --v2-fs-0: .6875rem;  /* mono micro label */
  --v2-thin: 200; --v2-heavy: 800;   /* weight contrast: giant thin numerals vs heavy labels (Inter variable 100–900) */
  /* r5 liquid glass — day (A / placeholder): light glass, dark text */
  --g-a: .72; --g-a-lite: .62; --g-a-solid: .95;
  --g-blur: 1.25rem; --g-sat: 1.6; --g-blur-s: .5rem;
  --g-sheen: rgba(255, 255, 255, .42);     /* top-lit sheen */
  --g-hi: rgba(255, 255, 255, .45);        /* specular fill (raises the light glass → dark text only gains contrast) */
  --g-rim: rgba(255, 255, 255, .98);       /* rim light nearest the light */
  --g-edge: rgba(255, 255, 255, .6);       /* base rim */
  --g-line: rgba(20, 24, 28, .14);         /* hairline on lite tiles */
  --g-glow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(20, 24, 40, .08), inset 0 0 1.5rem rgba(255, 255, 255, .22);
  --g-press: inset 0 2px 6px rgba(20, 24, 40, .18);
  --v2-grid-line: rgba(20, 24, 28, .06);   /* fine drafting grid behind figures */
  --v2-hatch: rgba(20, 24, 28, .08);       /* full / disabled hatch */
  --v2-on-primary-ring: #FFFFFF;
  --v2-gloss: rgba(255, 255, 255, .15); --v2-gloss-line: rgba(255, 255, 255, .3); --v2-gloss-shade: rgba(0, 0, 0, .22); --v2-gloss-dim: rgba(255, 255, 255, .07);   /* top-lit gloss on red / ultramarine fills */
  --v2-foot-bg: rgba(16, 20, 26, .9);
  /* icon masks (colour comes from background-color: currentColor) */
  --v2-i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E");
  --v2-i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 22 20H2z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='miter'/%3E%3Cpath d='M12 9.5v5M12 16.5v2' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --v2-i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16M12 4v16' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E");
  --v2-i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
}
@media (max-width: 760px) { :root { --v2-top-h: 6.25rem; --v2-bar-h: 4.5rem; } }
/* ---------- B 藍調夜景 night scheme ----------
   Set by world.js as html[data-v2-night] ONLY after every layer of a night set (B) has actually loaded; a missing picture falls back to the
   placeholder set and drops the attribute, so the day (dark-text) scheme is never left on a dark picture or vice versa. A / placeholder are untouched. */
html[data-v2-night] {
  color-scheme: dark;
  --v2-bg: #10172B; --v2-surface: #1C2540; --v2-surface-2: #2C3756;
  --v2-pic-bg: #EEF2F5;                     /* merch frame stays light (approved), a hair softer on night */
  --v2-card: rgba(17, 24, 45, .8); --v2-glass-rgb: 17, 24, 45; --v2-card-edge: rgba(255, 255, 255, .1);
  --v2-ink: #F1F4F8;                        /* 15.6:1 on #121A30, 12.2:1 on a card over the brightest sky */
  --v2-ink-2: #C3CCD8; --v2-ink-2-strong: #E2E7ED;
  --v2-line: #4C5878; --v2-line-soft: rgba(255, 255, 255, .12);
  --v2-primary-ink: #FF9C8A; --v2-primary-deep-ink: #F4A592; --v2-primary-soft: rgba(255, 140, 120, .16);   /* 年赤 text lifted; fills stay #9E3729 */
  --v2-accent: #2F3FA8; --v2-accent-ink: #AEB9FF; --v2-accent-soft: rgba(150, 165, 255, .16);               /* 群青 */
  --v2-gold: #E9BF6E; --v2-gold-line: #C9A24A; --v2-gold-soft: rgba(201, 162, 74, .2);                      /* 金 */
  --v2-ok-ink: #8FE0A8; --v2-warn-ink: #FF9B8E; --v2-err-bg: #3A1F27; --v2-off: #9AA4B8;
  --v2-lv-hi: #5CC47F; --v2-lv-mid: #D6A644; --v2-lv-lo: #E2685A; --v2-lv-full: #8A94A6;
  --v2-veil-rgb: 10, 16, 34;
  --v2-inv-bg: #EEF2F4; --v2-inv-ink: #14181C;
  --v2-deco-indigo-shade: rgba(0, 0, 0, .35);
  --v2-shadow: 0 0.0625rem 0 rgba(255, 255, 255, .06) inset, 0 1px 2px rgba(0, 0, 0, .14), 0 .5rem 1.25rem -.5rem rgba(0, 0, 0, .26), 0 2rem 3.5rem -1.5rem rgba(0, 0, 0, .34);
  --surface: #EEF2F4; --ink: #14181C;       /* QR stays dark-on-light so it scans */
  /* r5 liquid glass — night: deep blue glass, light text. Tint kept ≥ .66 so text keeps AA over the lit town */
  --g-a: .68; --g-a-lite: .5; --g-a-solid: .94;
  --g-sheen: rgba(255, 255, 255, .075); --g-hi: rgba(255, 255, 255, .05); --g-rim: rgba(255, 255, 255, .62); --g-edge: rgba(255, 255, 255, .15);
  --g-line: rgba(255, 255, 255, .13);
  --g-glow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .22), inset 0 0 2.5rem rgba(150, 170, 255, .05);
  --g-press: inset 0 2px 8px rgba(0, 0, 0, .45);
  --v2-grid-line: rgba(255, 255, 255, .05); --v2-hatch: rgba(255, 255, 255, .07);
  --v2-foot-bg: rgba(7, 10, 20, .82);
}
