/* Ukung colour themes: ONE place for every colour token. Each page links this
   before its own <style>, and /theme.js (first script in <head>) sets
   <html data-theme="dark|light"> before first paint, from the visitor's choice:
     dark  = "Golden Hour" (default): warm brown-black ground, amber gold.
     light = "Paper & Ink": warm paper ground, ink text, deep gold.
   Pages use the tokens, never literal colours. For a translucent shade use the
   matching -rgb token: rgba(var(--ink-rgb),.9). Shadows: rgba(var(--shadow-rgb),calc(.6*var(--shadow-k))).
   Photo viewers (lightbox, quick view, trip-viewer lightbox, globe) stay dark in
   both themes: they get the dark tokens re-declared at the bottom. */

:root,
:root[data-theme="light"] :is(#lightbox, #globe-view, #tv-lb, #uk-qv, #lb-cmt-panel, [id^="lb-"]){
  --ink:#14110E;          /* page ground */
  --ink2:#1E1A16;         /* raised ground: inputs, cards, panels */
  --surface:rgba(30,26,22,0.95);
  --line:#2E2822;         /* solid hairline */
  --text:#F3ECE2;
  --text-soft:#CFC6B9;    /* long-form body text (legal pages) */
  --muted:#A39888;
  --gold:#E8A93C;
  --gold-lt:#F4C46A;      /* hover / emphasis */
  --gold-dim:rgba(232,169,60,0.12);
  --gold-glow:rgba(232,169,60,0.24);
  --border:rgba(232,169,60,0.16);
  --border-h:rgba(232,169,60,0.42);
  --red:#9B2335;          /* destructive fills */
  --danger:#E5827F;       /* destructive / error text */
  --ink-rgb:20,17,14;
  --text-rgb:243,236,226;
  --ink2-rgb:30,26,22;
  --gold-rgb:232,169,60;
  --gold-lt-rgb:244,196,106;
  --muted-rgb:163,152,136;
  --danger-rgb:229,130,127;
  --red-rgb:155,35,53;
  --shadow-rgb:0,0,0;
  --shadow-k:1;
  --serif:'Cormorant Garamond',serif;
  --sans:'DM Sans',sans-serif;
  /* A favourite's heart: red in both themes, so it reads against gold and paper alike. */
  --heart:#E5566B;
  color-scheme:dark;
}

:root[data-theme="light"]{
  --heart:#C42B3E;
  --ink:#F7F2EA;
  --ink2:#EFE7DA;
  --surface:rgba(255,252,246,0.97);
  --line:#DDD2C2;
  --text:#1F1A15;
  --text-soft:#3D352C;
  --muted:#6B6155;
  --gold:#8F5C08;
  --gold-lt:#74490A;
  --gold-dim:rgba(143,92,8,0.10);
  --gold-glow:rgba(143,92,8,0.18);
  --border:rgba(143,92,8,0.20);
  --border-h:rgba(143,92,8,0.48);
  --red:#B3261E;
  --danger:#B3261E;
  --ink-rgb:247,242,234;
  --text-rgb:31,26,21;
  --ink2-rgb:239,231,218;
  --gold-rgb:143,92,8;
  --gold-lt-rgb:116,73,10;
  --muted-rgb:107,97,85;
  --danger-rgb:179,38,30;
  --red-rgb:179,38,30;
  --shadow-rgb:60,42,20;
  --shadow-k:.35;
  color-scheme:light;
}

/* The pickers' chevron, per theme. Quiet text controls like the menu links (11px,
   tracked uppercase, muted, gold on hover); the one boxed control in a menu is Sign in. */
:root{--picker-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%23A39888' stroke-width='1.3'/%3E%3C/svg%3E")}
:root[data-theme="light"]{--picker-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%236B6155' stroke-width='1.3'/%3E%3C/svg%3E")}
/* The language and theme pickers (owner, 2026-11-11): the button shows a short face
   ("EN" / "中文" / "ES", a theme icon) and opens a themed list under it (UkungPicker in
   theme.js). They replaced native <select>s, whose open list the browser draws. */
.ukung-picker{position:relative;display:inline-flex;align-items:center;vertical-align:middle}
.ukung-picker-btn{
  display:inline-flex;align-items:center;margin:0;cursor:pointer;
  font-family:var(--sans);font-size:11px;letter-spacing:2px;text-transform:uppercase;line-height:1.2;
  color:var(--muted);padding:6px 16px 6px 0;border:none;border-radius:0;
  background:transparent var(--picker-chev) no-repeat right 0 center/9px 6px;transition:color .2s;
}
.ukung-picker-btn:hover,.ukung-picker.open .ukung-picker-btn{color:var(--gold)}
.ukung-picker-btn:focus-visible{outline:1px solid var(--border-h);outline-offset:3px}
.ukung-picker-face{display:inline-flex;align-items:center;min-height:15px}
.ukung-picker-face svg,.ukung-picker-icon svg{display:block}
.ukung-picker-menu{
  position:absolute;top:calc(100% + 8px);right:0;z-index:2000;min-width:170px;
  padding:6px 0;background:var(--ink2);border:1px solid var(--border-h);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.ukung-picker-menu[hidden]{display:none}
.ukung-picker-opt{
  display:flex;align-items:center;gap:10px;padding:9px 16px;cursor:pointer;white-space:nowrap;
  font-family:var(--sans);font-size:13px;letter-spacing:.3px;color:var(--text);outline:none;
}
.ukung-picker-opt:hover,.ukung-picker-opt:focus{background:var(--gold-dim);color:var(--gold-lt)}
.ukung-picker-opt[aria-selected="true"]{color:var(--gold)}
.ukung-picker-opt[aria-selected="true"]::after{content:'';margin-left:auto;width:9px;height:5px;
  border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(-45deg)}
.ukung-picker-icon{display:inline-flex;color:var(--gold)}
@media (max-width:640px){
  .ukung-picker-btn{font-size:10px;letter-spacing:1.5px;padding:12px 14px 12px 4px;background-position:right 2px center}
  .ukung-picker-opt{padding:13px 18px;font-size:14px}
}

/* The Ukung wordmark: the Route U mark + "kung" (brand/build-icons.js draws it).
   Two one-colour layers used as masks, so it takes the theme's colours anywhere:
   the road in --gold, the destination dot and "kung" in --wm-ink (default --text).
   Markup: <a href="/" class="ukung-wordmark" aria-label="Ukung"></a>, sized by
   --wm-h (its full height, descender included; the k is ~72% of it).
   Doubled class so a page's older .nav-logo / .brand font rules can't override it. */
.ukung-wordmark.ukung-wordmark{
  display:inline-block;position:relative;flex-shrink:0;vertical-align:middle;
  height:var(--wm-h,24px);aspect-ratio:2510/894;
  font-size:0;letter-spacing:0;color:transparent;text-decoration:none;
}
.ukung-wordmark::before,.ukung-wordmark::after{
  content:"";position:absolute;inset:0;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-size:100% 100%;mask-size:100% 100%;
}
.ukung-wordmark::before{background:var(--gold);
  -webkit-mask-image:url(/brand/wordmark-u.svg?v=2);mask-image:url(/brand/wordmark-u.svg?v=2)}
.ukung-wordmark::after{background:var(--wm-ink,var(--text));
  -webkit-mask-image:url(/brand/wordmark-ink.svg?v=2);mask-image:url(/brand/wordmark-ink.svg?v=2)}
a.ukung-wordmark:focus-visible{outline:1px solid var(--gold);outline-offset:4px}
