/* generated from roles/designer/materials/library/kit/ink-theme.css by ink-theme-sync.py; do not edit */
/* 水墨 dark theme: the one shared dark look of Wine's local pages and the JB Hub, and its corner switch.
   Source of truth: roles/designer/materials/library/kit/ink-theme.css (with ink-theme.js). Pages get copies
   from ink-theme-sync.py; never edit a copy. Wine (2026-11-18): "i really like .../reader/ the dark theme here".

   What it does
     Dark is the reading aid's dark palette (temp/reading-aid/reader/reader.css), unchanged, put on every
     token name the ink pages use. Light is each page's own CSS: this file declares no light values at all,
     so a page in light looks exactly as it did before the theme was hooked.

   When dark applies
     html[data-theme="dark"]                                          (ink-theme.js sets it)
     prefers-color-scheme: dark, and html is neither [data-theme="light"] nor [data-ink-follow="none"]
                                                                      (a fallback for the moment before the
                                                                       script runs, or a page without it)
     [data-ink-follow="none"] marks a page that stays light until the first click (the JB Hub): the
     system setting never turns it dark.
     The selectors start with html:root so they outrank a page's own :root and :root[data-theme="dark"]
     blocks wherever the two files sit in the page; this file is unlayered, so it also wins over
     Tailwind's @layer theme.

   Token names covered (each maps to a reader dark value; no new hues)
     reader / kit:  --paper --reserve --ink --ink2 --meta --wash --wash2 --en-c --zhupi --seal
                    --zhupi-wash --zhupi-ring --act --act-wash --hair --hair2 --tint --brush --brush2
     kit aliases:   --card (reserve, .92) --tag (wash) --seal-en (seal, .8) --act-line (ink, .34)
                    --meta2 (wash2)
     rgb triplets:  --ik (ink) --pp (reserve)   (sizzle review, sizzle marks review, packaging review)
     older names:   --muted (meta) --line (hair2) --accent (the Hub's now colour)   (shorts cut review)
     JB Hub:        --color-paper -ink -ink2 -wash -wash2 -seal -meta -act -act-wash, the grounds
                    --color-ink-900 … -600, the lines --color-line -line-bright -line-field, and the old
                    names --color-parchment -parchment-dim -parchment-faint -ember -amber -heather.
                    Two Hub hues have no reader twin: --color-now (slate blue) and --color-posted (sage);
                    they keep their own hue, lifted to the reader's dark lightness (as --act #755A34 →
                    #C9A066 was): -now #81A0BB, -posted #81B199, also on -slate -gilt -sage and the washes.
     Hard-coded colours (a literal #hex or rgba in a page's rules) are not tokens and stay as they are;
     each page handles its own when it hooks the theme.

   The two dark blocks below must stay identical: ink-theme-sync.py --check refuses a source where they
   differ.

   The reader's light tokens, for reference only (reader.css :root; never applied by this file):
     --paper:#F4F0E6; --reserve:#F9F6EE; --ink:#141412; --ink2:#3A3935; --meta:#605E59;
     --wash:#8C8A83; --wash2:#B9B5AA; --en-c:#6E6B63;
     --zhupi:#9A2A20; --seal:#B8241C; --zhupi-wash:rgba(184,36,28,.07); --zhupi-ring:rgba(184,36,28,.55);
     --act:#755A34; --act-wash:rgba(117,90,52,.10);
     --hair:rgba(20,20,18,.12); --hair2:rgba(20,20,18,.2); --tint:rgba(20,20,18,.045);
     --brush / --brush2: the same two brush strokes in %23B8241C; color-scheme:light.

   The switch: #ink-theme, a round paper button in the lower-left corner with an ensō (圆相) brush ring:
   a crescent moon inside while light (click for night), a small sun while dark (click for day). A page with its own
   bar along the bottom lifts it with --ink-theme-lift (for example 56px under 1024px). */

/* ---------- dark: the click (or the script's resolve) ---------- */
html:root[data-theme="dark"]{
  --paper:#1B1814; --reserve:#221E19; --ink:#EDE5D6; --ink2:#CFC5B3; --meta:#A39D92; --wash:#8F8B82; --wash2:#5E5B55; --en-c:#A8A196;
  --zhupi:#E58A75; --seal:#DA5A4C; --zhupi-wash:rgba(229,138,117,.10); --zhupi-ring:rgba(229,138,117,.6);
  --act:#C9A066; --act-wash:rgba(201,160,102,.12);
  --hair:rgba(237,229,214,.12); --hair2:rgba(237,229,214,.2); --tint:rgba(237,229,214,.05);
  --brush:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.6 C 14 2.2, 27 4.4, 41 3.1 S 66 2.3, 79 3.7 S 93 3.2, 99 2.5' fill='none' stroke='%23E58A75' stroke-width='1.9' stroke-linecap='round' vector-effect='non-scaling-stroke' opacity='.92'/%3E%3C/svg%3E");
  --brush2:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 2.9 C 12 4.1, 30 2.4, 46 3.5 S 70 4.0, 84 2.8 S 95 3.3, 99 3.9' fill='none' stroke='%23E58A75' stroke-width='2.1' stroke-linecap='round' vector-effect='non-scaling-stroke' opacity='.9'/%3E%3C/svg%3E");
  --card:rgba(34,30,25,.92); --tag:#8F8B82; --seal-en:rgba(218,90,76,.8); --act-line:rgba(237,229,214,.34); --meta2:#5E5B55;
  --ik:237,229,214; --pp:34,30,25;
  --muted:#A39D92; --line:rgba(237,229,214,.2); --accent:#81A0BB;
  --color-paper:#1B1814; --color-ink:#EDE5D6; --color-ink2:#CFC5B3; --color-wash:#8F8B82; --color-wash2:#5E5B55;
  --color-seal:#DA5A4C; --color-meta:#A39D92; --color-act:#C9A066; --color-act-wash:rgba(201,160,102,.12);
  --color-now:#81A0BB; --color-now-wash:rgba(129,160,187,.12); --color-posted:#81B199; --color-posted-wash:rgba(129,177,153,.12);
  --color-ink-900:#1B1814; --color-ink-850:#221E19; --color-ink-800:#282420; --color-ink-700:#2E2A25; --color-ink-600:#34312B;
  --color-line:#5E5B55; --color-line-bright:#8F8B82; --color-line-field:#A39D92;
  --color-parchment:#EDE5D6; --color-parchment-dim:#CFC5B3; --color-parchment-faint:#A39D92;
  --color-ember:#C9A066; --color-amber:#C9A066; --color-slate:#81A0BB; --color-gilt:#81A0BB; --color-sage:#81B199; --color-heather:#CFC5B3;
  color-scheme:dark;
}
html:root[data-theme="dark"] #grain{opacity:.5}
html:root[data-theme="dark"] body{background-image:none}   /* the kit's paper glow is drawn for light paper; dark paper is flat, as in the reader */

/* ---------- dark: macOS, until the first click (not on a [data-ink-follow="none"] page) ---------- */
@media (prefers-color-scheme: dark){
  html:root:not([data-theme="light"]):not([data-ink-follow="none"]){
  --paper:#1B1814; --reserve:#221E19; --ink:#EDE5D6; --ink2:#CFC5B3; --meta:#A39D92; --wash:#8F8B82; --wash2:#5E5B55; --en-c:#A8A196;
  --zhupi:#E58A75; --seal:#DA5A4C; --zhupi-wash:rgba(229,138,117,.10); --zhupi-ring:rgba(229,138,117,.6);
  --act:#C9A066; --act-wash:rgba(201,160,102,.12);
  --hair:rgba(237,229,214,.12); --hair2:rgba(237,229,214,.2); --tint:rgba(237,229,214,.05);
  --brush:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.6 C 14 2.2, 27 4.4, 41 3.1 S 66 2.3, 79 3.7 S 93 3.2, 99 2.5' fill='none' stroke='%23E58A75' stroke-width='1.9' stroke-linecap='round' vector-effect='non-scaling-stroke' opacity='.92'/%3E%3C/svg%3E");
  --brush2:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 2.9 C 12 4.1, 30 2.4, 46 3.5 S 70 4.0, 84 2.8 S 95 3.3, 99 3.9' fill='none' stroke='%23E58A75' stroke-width='2.1' stroke-linecap='round' vector-effect='non-scaling-stroke' opacity='.9'/%3E%3C/svg%3E");
  --card:rgba(34,30,25,.92); --tag:#8F8B82; --seal-en:rgba(218,90,76,.8); --act-line:rgba(237,229,214,.34); --meta2:#5E5B55;
  --ik:237,229,214; --pp:34,30,25;
  --muted:#A39D92; --line:rgba(237,229,214,.2); --accent:#81A0BB;
  --color-paper:#1B1814; --color-ink:#EDE5D6; --color-ink2:#CFC5B3; --color-wash:#8F8B82; --color-wash2:#5E5B55;
  --color-seal:#DA5A4C; --color-meta:#A39D92; --color-act:#C9A066; --color-act-wash:rgba(201,160,102,.12);
  --color-now:#81A0BB; --color-now-wash:rgba(129,160,187,.12); --color-posted:#81B199; --color-posted-wash:rgba(129,177,153,.12);
  --color-ink-900:#1B1814; --color-ink-850:#221E19; --color-ink-800:#282420; --color-ink-700:#2E2A25; --color-ink-600:#34312B;
  --color-line:#5E5B55; --color-line-bright:#8F8B82; --color-line-field:#A39D92;
  --color-parchment:#EDE5D6; --color-parchment-dim:#CFC5B3; --color-parchment-faint:#A39D92;
  --color-ember:#C9A066; --color-amber:#C9A066; --color-slate:#81A0BB; --color-gilt:#81A0BB; --color-sage:#81B199; --color-heather:#CFC5B3;
  color-scheme:dark;
  }
  html:root:not([data-theme="light"]):not([data-ink-follow="none"]) #grain{opacity:.5}
  html:root:not([data-theme="light"]):not([data-ink-follow="none"]) body{background-image:none}
}

/* ---------- the switch: same corner, same size, on every page ---------- */
#ink-theme{
  all:initial; box-sizing:border-box; position:fixed; z-index:65;
  left:max(14px, env(safe-area-inset-left, 0px));
  bottom:calc(max(14px, env(safe-area-inset-bottom, 0px)) + var(--ink-theme-lift, 0px));
  width:34px; height:34px; display:grid; place-items:center; padding:0; margin:0; border:0; border-radius:50%;
  background:var(--paper, #F4F0E6); color:var(--ink2, #3A3935); opacity:.6; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:opacity .3s ease, color .3s ease;
}
#ink-theme:hover{opacity:1; color:var(--ink, #141412)}
#ink-theme:focus-visible{opacity:1; outline:1px solid var(--ink2, #3A3935); outline-offset:3px}
#ink-theme svg{display:block; width:28px; height:28px; overflow:visible; pointer-events:none}
#ink-theme .enso{transition:transform .7s cubic-bezier(.16,1,.3,1); transform-origin:16px 16px}
#ink-theme .moon,#ink-theme .full{transform-origin:16px 16px; transition:opacity .45s ease, transform .6s cubic-bezier(.16,1,.3,1)}
#ink-theme .full{opacity:0; transform:scale(.55)}
html[data-theme="dark"] #ink-theme .moon{opacity:0; transform:rotate(-50deg) scale(.6)}
html[data-theme="dark"] #ink-theme .full{opacity:1; transform:none}
html[data-theme="dark"] #ink-theme .enso{transform:rotate(-24deg)}
@media (prefers-reduced-motion: reduce){ #ink-theme,#ink-theme *{transition:none !important} }
@media print{ #ink-theme{display:none} }
