:root,
:root[data-theme="ivory"] {
  /* Brand palette #4 Dusty Rose & Charcoal (dusty rose #E3CDCC, charcoal #3E393B, pewter #A29C9F, mist #F7F3F2, graphite #1E1B1C); all text AA */
  --bg: #F1E5E4;
  --fg: #1E1B1C;
  --muted: #6E6466;
  --rule: #E3CDCC;
  --accent: #8A5A5E;
  /* depth: shadows tinted from the charcoal, never pure black on the rose ground */
  --shadow-sm: 0 1px 0.125rem rgb(62 40 44 / .10), 0 0.375rem 0.875rem -0.375rem rgb(62 40 44 / .22);
  --shadow-lg: 0 0.125rem 0.25rem rgb(62 40 44 / .10), 0 1.375rem 2.5rem -0.875rem rgb(62 40 44 / .38);
  --shade: rgb(62 40 44 / .22);   /* the shadows' tint as one colour, for a shadow drawn as a filter or a gradient */
  --glow: rgb(255 255 255 / .75);
  --glow-2: rgb(138 90 94 / .16);
  /* the menu: a brighter deep rose at the top fading into the page colour at the bottom. On it the menu's grey labels and
     rose "current" text are a shade darker so they stay readable (AA: labels 5.3, current 4.9 at the top) */
  --rail-bg: linear-gradient(180deg, #EFD8D7 0%, #F1E5E4 100%);
  --rail-muted: #5E5557;
  --rail-accent: #7E4F54;
  --font-body: 'Prompt', 'Leelawadee UI', sans-serif;
  --font-display: 'Prompt', 'Leelawadee UI', sans-serif;
}
:root[data-theme="ink"] {
  --bg: #2A2528;   /* (#1E1B1C till 25/11/2026: owner, a bit too dark) a lifted rose-charcoal */
  --fg: #F1E5E4;
  --muted: #BDB5B8;   /* (#A29C9F till 25/11/2026: a step lighter, so it stays AA on the lighter ground and its moods) */
  --rule: #463F42;
  --accent: #DDA9AD;
  --shadow-sm: 0 1px 0.125rem rgb(0 0 0 / .35), 0 0.5rem 1rem -0.375rem rgb(0 0 0 / .5);
  --shadow-lg: 0 0.125rem 0.25rem rgb(0 0 0 / .35), 0 1.5rem 2.75rem -0.875rem rgb(0 0 0 / .7);
  --shade: rgb(0 0 0 / .55);
  --glow: rgb(221 169 173 / .09);
  --glow-2: rgb(221 169 173 / .07);
  --rail-bg: linear-gradient(180deg, #44373B 0%, #2E282B 100%);   /* dark: a lifted rose-charcoal panel, fading slightly; all menu text AA (labels 4.5 at the top) */
  --rail-muted: #BDB5B8;
  --rail-accent: #DDA9AD;
  --font-body: 'Prompt', 'Leelawadee UI', sans-serif;
  --font-display: 'Prompt', 'Leelawadee UI', sans-serif;
}

* { box-sizing: border-box; }
/* The whole website scales with the window (owner, 14/11/2026: on a 3440 x 1440 screen it looked as small as 100% zoom;
   it should look like 150%). Every size in this file is in rem, so the page's base size scales all of it together, like the
   browser's own zoom: 16px in a window 790 px tall (a 1440 x 900 screen, the size it was designed at), growing with the
   window's height (how much page fits on the screen, which follows its physical size) to 24px, 150%, in a 3440 x 1440
   screen's window (1263 px tall inside the browser); held back by the width (a tall narrow window does not blow up); from
   15px on small laptops to 25.6px (1.6x) on the largest screens. Phones stay at 16px. The website's pages and the corner
   tool (html.site); the other dev tools that share this file keep their own sizes. */
html.site { font-size: clamp(15px, min(16px + (100vh - 790px) * 0.0169, 100vw / 80), 25.6px); }
@media (max-width: 767px) { html.site { font-size: 16px; } }
html, body { height: 100%; margin: 0; }
/* The page's mood: its background follows the product category in focus (owner, 25/11/2026: a dynamic background,
   subtle gradients and minor decoration that never distracts). Each category two tint colours, laid over the page's own
   ground as soft glows (bottom right, and the left edge). (A line-art motif per mood was tried and taken out, owner
   25/11/2026: it read as cheap icons; its decoration is to be chosen from tools/mockups.)
   body[data-mood]: an item page its category's (build.js), the home page the line in its spotlight (home.js), else the
   home page's own. The tints are registered colours, so a change of mood cross-fades (home.js changes it with the
   spotlight). The white glow at the top left (the light) stays.
   Strength (owner, 25/11/2026: the first version, glows in the corners only, could not be seen at all): the whole ground
   is washed in the mood, its second colour at the top left fading to its first at the bottom right (--wash-k of each
   mixed into the page colour), then a glow of each at its corner (--mood-k); both less on the dark theme. The secondary
   text takes the menu's darker grey (--rail-muted) so it stays AA on every tint. The tints are pastels, about as light
   as the page (relative luminance 0.55 or more): they turn its hue, never darken it (darker ones took that grey under
   4.5:1 in the bottom right corner). */
/* One colour, never beige (owner, 26/11/2026, mock-up G: F1): each mood is one hue, --mood-b its paler self (two hues
   met in a grey band: aqua and butter, tan and pink); a yellow one the clear yellow, ซองสี's butter (the most yellow: owner,
   26/11/2026, "ALL ordination cards deserve ... the most yellow theme"), a tan one (sand) the brand's rose, a neutral one a
   cool grey: never a dull beige (it read as dirty paper). OKLCH lightness 0.87 and 0.93 (the yellow: 0.90 and 0.95), as
   tint.js makes a piece's (one rule for both). Before: home rose + sand, ซองสี aqua + butter, ซองขาว greige + white, VIP
   mulberry + gold, การ์ดบวช saffron + light gold, การ์ดศพ slate + stone, การ์ดอื่นๆ gold + peach, งานแต่ง blush + champagne. */
@property --mood-a { syntax: '<color>'; inherits: true; initial-value: #f5c7cb; }
@property --mood-b { syntax: '<color>'; inherits: true; initial-value: #fce0e2; }
:root { --mood-k: 68%; --wash-k: 24%; }   /* (45% and 17% till the owner asked for a stronger bloom, 25/11/2026) */
:root[data-theme="ink"] { --mood-k: 28%; --wash-k: 10%; }   /* (16% and 8%: the moods hardly showed on the dark theme) */
body { --mood-a: #f5c7cb; --mood-b: #fce0e2; }                                  /* the home page: the brand's rose */
body[data-mood="colour"] { --mood-a: #ace0e0; --mood-b: #d1efef; }             /* ซองสี 80g: aqua */
body[data-mood="white"] { --mood-a: #cfd5db; --mood-b: #e5e8ec; }              /* ซองขาว: clean paper, a cool grey */
body[data-mood="vip"] { --mood-a: #eccad3; --mood-b: #f7e2e7; }                /* ซองสีฝายุโรป: mulberry */
body[data-mood="ordination"] { --mood-a: #f3df8f; --mood-b: #faefc5; }         /* การ์ดบวช: the yellow (every card: tint.js) */
body[data-mood="funeral"] { --mood-a: #d1d5d9; --mood-b: #e6e8eb; }            /* การ์ดศพ: calm slate */
body[data-mood="other"] { --mood-a: #f3df8f; --mood-b: #faefc5; }              /* การ์ดอื่นๆ: the yellow (its gold cards) */
body[data-mood="wedding"] { --mood-a: #f9c4cf; --mood-b: #ffdee5; }            /* การ์ดงานแต่ง: blush */
body {
  --muted: var(--rail-muted);
  background:
    radial-gradient(62.5rem 40rem at 20% -16%, var(--glow), transparent 70%) no-repeat,
    radial-gradient(84rem 62rem at 104% 108%, color-mix(in srgb, var(--mood-a) var(--mood-k), transparent), transparent 70%) no-repeat,
    radial-gradient(62rem 52rem at -6% 70%, color-mix(in srgb, var(--mood-b) var(--mood-k), transparent), transparent 70%) no-repeat,
    linear-gradient(150deg, color-mix(in srgb, var(--mood-b) var(--wash-k), var(--bg)) 10%, color-mix(in srgb, var(--mood-a) var(--wash-k), var(--bg)) 90%) fixed,
    var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.6;
}
/* The background's decoration (owner, 25/11/2026: picked from tools/mockups, C3): fine arcs of foil sweeping past two
   corners, behind everything, a slow glint travelling along them, as on the cards' own gold. Each category its metal, its
   three tones registered colours so a change of mood cross-fades it too: gold (the cards' foil, look.js FOIL_STOPS) for the
   home page, การ์ดบวช and การ์ดอื่นๆ; rose gold for ซองสีฝายุโรป and การ์ดงานแต่ง; silver for ซองขาว and การ์ดศพ;
   champagne for ซองสี 80g. A ring is drawn as its border only (a mask cut from its inside). */
@property --m-dark { syntax: '<color>'; inherits: true; initial-value: #8c6620; }
@property --m-mid { syntax: '<color>'; inherits: true; initial-value: #c9a24a; }
@property --m-light { syntax: '<color>'; inherits: true; initial-value: #f2dc92; }
/* and a second metal (--n-*), the first's own unless a category has two: การ์ดศพ silver and gold (owner, 26/11/2026: "most
   funeral cards are the combination of two"); --metals: 2 tells tint.js a hero piece's metal is the second one there */
@property --n-dark { syntax: '<color>'; inherits: true; initial-value: #8c6620; }
@property --n-mid { syntax: '<color>'; inherits: true; initial-value: #c9a24a; }
@property --n-light { syntax: '<color>'; inherits: true; initial-value: #f2dc92; }
body { --m-dark: #8c6620; --m-mid: #c9a24a; --m-light: #f2dc92; --n-dark: var(--m-dark); --n-mid: var(--m-mid); --n-light: var(--m-light);
  transition: --mood-a 1.4s ease, --mood-b 1.4s ease, --m-dark 1.4s ease, --m-mid 1.4s ease, --m-light 1.4s ease, --n-dark 1.4s ease, --n-mid 1.4s ease, --n-light 1.4s ease; }
body:is([data-mood="vip"], [data-mood="wedding"]) { --m-dark: #8a4f45; --m-mid: #c98a7c; --m-light: #f3d2c7; }
body:is([data-mood="white"], [data-mood="funeral"]) { --m-dark: #6d7177; --m-mid: #a9adb3; --m-light: #eef0f2; }
body[data-mood="colour"] { --m-dark: #8f7a52; --m-mid: #cbb488; --m-light: #f3e6c6; }
body[data-mood="funeral"] { --n-dark: #8c6620; --n-mid: #c9a24a; --n-light: #f2dc92; --metals: 2; }   /* (silver, and gold) */
/* the small marks and their labels (the menu's groups and current page, the diamonds under the current line or page, the
   colour families, the links' arrows) in the theme's metal, following each category and the piece on show (owner,
   26/11/2026); deepened toward the ink on the light theme and brightened on the dark one, so their text stays AA. Selected
   controls (a size chip, a colour) keep the old rose */
body { --mark: color-mix(in oklab, var(--m-dark) 70%, var(--fg)); }
:root[data-theme="ink"] body { --mark: color-mix(in oklab, var(--m-mid) 55%, var(--m-light)); }
.arcs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.arcs i { position: absolute; border-radius: 50%; border: 2px solid transparent; opacity: .8;
  --r-dark: var(--m-dark); --r-mid: var(--m-mid); --r-light: var(--m-light);
  background: repeating-linear-gradient(160deg, var(--r-dark) 0%, var(--r-mid) 5.7%, var(--r-light) 8.8%, var(--r-mid) 12.6%, var(--r-light) 17.4%, var(--r-dark) 22%, var(--r-mid) 26.8%, var(--r-dark) 30.4%, var(--r-dark) 31.6%) border-box;
  background-size: 100% 260%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  transform: rotate(var(--arc-a, 0deg)); transition: transform 1.6s ease; }   /* (still: the glint sits where the mood's last change left it, a new place at random each time (tint.js setTint), eased there; it turned for ever before, the page never resting: owner, 25/11/2026) */
.arcs i:nth-child(1) { left: -30rem; bottom: -40rem; width: 56rem; height: 56rem; }
.arcs i:nth-child(n+2) { --r-dark: var(--n-dark); --r-mid: var(--n-mid); --r-light: var(--n-light); }   /* (the second metal: the thin ring beside the big one, and the one on the right) */
.arcs i:nth-child(2) { transform: rotate(calc(var(--arc-a, 0deg) * -1.3 + 40deg)); }
.arcs i:nth-child(3) { transform: rotate(calc(var(--arc-a, 0deg) * .8 + 120deg)); }
.arcs i:nth-child(2) { left: -26rem; bottom: -41rem; width: 56rem; height: 56rem; border-width: 1px; opacity: .5; }
.arcs i:nth-child(3) { right: -30rem; top: 7rem; width: 44rem; height: 44rem; }   /* (in from the right edge under the menu bar: never across the header) */
:root[data-theme="ink"] .arcs i { opacity: .45; }
:root[data-theme="ink"] .arcs i:nth-child(2) { opacity: .28; }
@media (max-width: 767px) { .arcs i:nth-child(1) { left: -20rem; bottom: -30rem; width: 36rem; height: 36rem; } .arcs i:nth-child(2) { display: none; } .arcs i:nth-child(3) { right: -18rem; top: -26rem; width: 30rem; height: 30rem; } }
@media (prefers-reduced-motion: reduce) { body { transition: none; } .arcs i { transition: none; } }
body.mood-now { transition: none; }   /* (set at once: the home page arriving on its first line) */
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0.375rem 0.5rem; transition: color .15s; }
button:hover { color: var(--accent); }
:focus-visible { outline: 0.125rem solid var(--accent); outline-offset: 0.125rem; }

.topbar {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0 1.75rem; position: relative; z-index: 2;   /* (its rule: the metal line below; no hairline or shadow: D3) */
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--m-dark) 12%, var(--n-light) 30%, var(--m-mid) 50%, var(--n-light) 70%, var(--m-dark) 88%, transparent) var(--glint-x, 30%) 0 / 200% 100%;   /* (the two metals in turn) */
  transition: background-position 1.6s ease; }   /* (its glint still, at a new place each time the mood changes: tint.js setTint; owner, 25/11/2026: it slid for ever before) */
@media (prefers-reduced-motion: reduce) { .topbar::after { transition: none; } }
/* the inner band of the SCT badge (script SCT between the two rules), tinted through a mask so it follows the theme.
   The full circular badge (logo.svg) is kept for other uses. */
.top-end { display: flex; align-items: center; gap: 1.125rem; justify-self: end; min-width: 0; }
.wordmark { position: relative; display: block; flex: none; justify-self: start; width: 6.75rem; height: 2.75rem; color: var(--accent); transition: color .2s; }
/* the top row's metal line (owner, 25/11/2026: mock-up D3): the logo, the search's underline and the row's rule in the
   category's metal (body --m-dark / mid / light, as the arcs), cross-fading with the mood; a slow glint along the rule */
.logo { position: absolute; inset: 0; background: linear-gradient(160deg, var(--m-dark), var(--n-mid) 50%, var(--m-dark)); -webkit-mask: url(/assets/logo-mark.svg) center / contain no-repeat; mask: url(/assets/logo-mark.svg) center / contain no-repeat; }
.wordmark:hover .logo { filter: brightness(1.12); }
:root[data-theme="ink"] .logo { background: linear-gradient(160deg, var(--m-mid), var(--n-light) 50%, var(--m-mid)); }
.search-wrap { position: relative; }
#search {
  width: 15rem; max-width: 100%; border: 0; border-bottom: 1px solid var(--m-mid);
  background: transparent; padding: 0.375rem 0.125rem; border-radius: 0; transition: border-color .2s;
}
#search:focus { outline: none; border-bottom-color: var(--accent); }
#search::placeholder { color: var(--muted); opacity: 1; }
#search-results {
  position: absolute; top: calc(100% + 0.375rem); left: -0.75rem; z-index: 5; min-width: calc(100% + 1.5rem);
  margin: 0; padding: 0.375rem 0.75rem; list-style: none;
  background: var(--bg); border-radius: 0.25rem; box-shadow: var(--shadow-lg);
}
#search-results[hidden] { display: none; }
.topbar:has(#search-results:not([hidden])) { z-index: 4; }   /* an open list sits over the menu bar (#nav is z-index 3) */
#search-results li { padding: 0.5rem 0.125rem; font-size: 0.8125rem; border-top: 1px solid var(--rule); cursor: pointer; }
#search-results li:first-child { border-top: 0; }
#search-results li[aria-selected="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: 0.25rem; }
#search-results li.empty { color: var(--muted); cursor: default; }
.contact { margin-left: auto; color: var(--muted); font-size: 0.75rem; display: flex; gap: 1.125rem; letter-spacing: .02em; }
.contact a:hover { color: var(--accent); }
/* the LINE QR dialog (site.js showLineQr): a small pane on the page's colour, the QR on white with a soft frame, the ID
   in the theme's metal; on a phone (no hover, a touch screen) a button opens the LINE app, as the QR cannot be scanned there */
.line-qr { width: min(20rem, calc(100vw - 2rem)); padding: 0 1.5rem 1.375rem; border: 0; border-radius: 0.875rem; background: var(--bg); color: var(--fg);
  box-shadow: var(--shadow-lg); text-align: center; font-family: var(--font-body); overflow: hidden; }
/* its head: a band of the page's mood with two fine arcs of its metal, the round LINE picture in a metal ring overlapping its edge */
.line-qr-head { position: relative; height: 5.25rem; margin: 0 -1.5rem 2.75rem;
  background: radial-gradient(9rem 6rem at 100% 0, color-mix(in srgb, var(--mood-a) 70%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--mood-b) 55%, var(--bg)), color-mix(in srgb, var(--mood-a) 45%, var(--bg)));
  border-bottom: 1px solid color-mix(in srgb, var(--m-mid) 55%, transparent); }
.line-qr-head::before, .line-qr-head::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--m-mid) 60%, transparent); pointer-events: none; }
.line-qr-head::before { width: 13rem; height: 13rem; left: -7rem; top: -9rem; }
.line-qr-head::after { width: 9rem; height: 9rem; right: -4.5rem; top: -1rem; border-color: color-mix(in srgb, var(--n-mid) 55%, transparent); }
.line-qr-av { position: absolute; left: 50%; bottom: 0; width: 5.25rem; height: 5.25rem; translate: -50% 50%; border-radius: 50%; padding: 0.1875rem;
  background: linear-gradient(150deg, var(--m-dark), var(--m-light) 45%, var(--n-mid) 70%, var(--m-dark)); box-shadow: var(--shadow-sm); }
.line-qr-id { margin: 0.125rem 0 1rem; color: var(--muted); font-size: 0.8125rem; letter-spacing: .04em; }
.line-qr-id b { color: var(--mark); font-weight: 600; letter-spacing: .02em; }
.line-qr::backdrop { background: rgb(30 27 28 / .42); }
.line-qr[open] { animation: line-qr-in .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes line-qr-in { from { opacity: 0; transform: translateY(0.5rem) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .line-qr[open] { animation: none; } }
.line-qr h2 { margin: 0; font-size: 1.1875rem; font-weight: 600; }
.line-qr-code { display: block; width: 12.5rem; height: 12.5rem; margin: 0 auto; padding: 0.5rem; background: #fff; border-radius: 0.5rem; box-shadow: var(--shadow-sm); }
.line-qr-how { margin: 0.875rem 0 0; color: var(--muted); font-size: 0.875rem; }
.line-qr-x { position: absolute; top: 0.375rem; right: 0.375rem; z-index: 1; min-height: 2.75rem; padding: 0 0.75rem; font-size: 0.8125rem; color: var(--fg); }
/* the shop on Google Maps: a pin first in the row, drawn as the theme button's icons are (owner, 26/11/2026: an icon, leftmost) */
.contact-map { display: inline-flex; align-items: center; }
.contact-map svg { width: 1.0625rem; height: 1.0625rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact .ci { display: none; }   /* (the LINE and phone icons: a phone's top row only, below) */
#menu-toggle { display: none; }
#theme-toggle { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border-radius: 50%; transition: color .15s, background-color .2s; }
#theme-toggle:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
#theme-toggle svg { width: 1.1875rem; height: 1.1875rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#theme-toggle .i-sun, :root[data-theme="ink"] #theme-toggle .i-moon { display: none; }
:root[data-theme="ink"] #theme-toggle .i-sun { display: block; }

/* the menu bar under the header (like the old sctcards.net): หน้าหลัก · การ์ด ▾ · ซอง ▾ · สินค้าอื่นๆ ▾ · เกี่ยวกับเรา · ติดต่อเรา */
#nav { --muted: var(--rail-muted); --accent: var(--rail-accent); position: relative; z-index: 3; background: var(--rail-bg); border-bottom: 1px solid var(--rule); }
/* the menu bar takes the page's mood too (owner, 25/11/2026: it should blend in): on a PC its first tint at the top,
   fading into the page's own (mood-washed) ground at its foot, so the bar and the page are one surface; on the dark theme
   a faint tint over its lifted panel. (A phone keeps the solid bar: there it opens over the page.) Menu text stays AA:
   the tints are pastels about as light as the bar. */
@media (min-width: 768px) {
  :root { --rail-k: 26%; --rail-under: transparent; }   /* (42% till the metal line, D3: the menu a lighter tint under it) */
  :root[data-theme="ink"] { --rail-k: 15%; --rail-under: var(--rail-bg); }   /* (22% took the rose "current" label to 4.4:1 under the lightest pastel) */
  #nav { background: linear-gradient(180deg, color-mix(in srgb, var(--mood-a) var(--rail-k), transparent), transparent), var(--rail-under); }
}
.nav-bar { display: flex; justify-content: center; margin: 0; padding: 0 1.75rem; list-style: none; }
.nav-item > a, .nav-top { position: relative; display: flex; align-items: center; gap: 0.4375rem; height: 100%; padding: 0.6875rem 1.125rem; font-size: 0.9375rem; color: var(--fg); transition: color .15s; }
.nav-item > a:hover, .nav-top:hover, .nav-item.is-open > .nav-top { color: var(--accent); }
.nav-top::after { content: ""; width: 0.375rem; height: 0.375rem; margin-top: -0.1875rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .7; transition: transform .2s; }
.nav-item.is-open > .nav-top::after { transform: rotate(-135deg); margin-top: 0.1875rem; }
/* where you are: the page's link or its section, accented with a small diamond underneath */
.nav-item > a[aria-current="page"], .nav-item.is-here > .nav-top { color: var(--mark); font-weight: 500; }
.nav-item > a[aria-current="page"]::before, .nav-item.is-here > .nav-top::before { content: ""; position: absolute; left: 50%; bottom: -0.25rem; width: 0.4375rem; height: 0.4375rem; margin-left: -0.2188rem; background: var(--mark); transform: rotate(45deg); }
.nav-item.has-panel { position: relative; }
.nav-panel { position: absolute; top: 100%; left: 50%; z-index: 4; min-width: 14.375rem; padding: 0.75rem 1.25rem 0.875rem; background: var(--bg); border-radius: 0.625rem; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 0.375rem); transition: opacity .18s, transform .18s, visibility 0s .18s; }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel li { padding: 0.25rem 0; }
.nav-panel a { display: flex; align-items: center; gap: 0.625rem; font-size: 0.9063rem; white-space: nowrap; transition: color .15s; }
.nav-panel a::before { content: ""; flex: none; width: 0.375rem; height: 0.375rem; box-sizing: border-box; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent); transform: rotate(45deg); transition: border-color .15s, background-color .15s; }
.nav-panel a:hover { color: var(--accent); }
.nav-panel a:hover::before { border-color: var(--mark); }
.nav-panel a[aria-current="page"] { color: var(--mark); font-weight: 500; }
.nav-panel a[aria-current="page"]::before { background: var(--mark); border-color: var(--mark); }
/* การ์ด: every occasion side by side, under the middle of the bar */
.nav-item.has-panel:has(.nav-mega) { position: static; }
.nav-mega { display: grid; grid-template-columns: repeat(5, 1fr); width: max-content; gap: 0 2.75rem; padding: 1.125rem 2rem 1.25rem; }   /* (equal columns, the widest one's width: evenly spaced, owner 16/11/2026; max-content: not squeezed to the room right of centre) */
/* ซอง: two columns (plain envelopes | VIP sizes), a thin rule between them */
.nav-cols { display: grid; grid-template-columns: repeat(2, max-content); padding: 0.75rem 0 0.875rem; }
.nav-cols .nav-col { padding: 0 1.5rem; }
.nav-cols .nav-col + .nav-col { border-left: 1px solid var(--rule); }
.nav-group { display: flex; align-items: center; gap: 0.5625rem; margin: 0 0 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule); font-size: 0.8125rem; font-weight: 600; letter-spacing: .04em; color: var(--mark); }
.nav-group::before { content: ""; width: 0.375rem; height: 0.375rem; background: var(--mark); transform: rotate(45deg); }
.nav-item.is-open > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s, transform .18s; }
@media (hover: hover) {                   /* a mouse opens a panel just by pointing at it */
  .nav-item.has-panel:hover > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s, transform .18s; }
  .nav-item.has-panel:hover > .nav-top { color: var(--accent); }
}

main { min-width: 0; min-height: 0; padding: 1.375rem 2rem 0 1.75rem; display: flex; flex-direction: column; }
h1 { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.45; letter-spacing: .005em; }
main > h1 { font-size: 1.875rem; line-height: 1.3; margin-bottom: 1.125rem; text-align: center; }   /* item pages: the title alone heads the grid, centred over it (owner, 20/11/2026) */
.facts { margin: 0.125rem 0 0.875rem; color: var(--muted); font-size: 0.7813rem; }
/* the way across to the page's neighbours in its category (item.js across; owner, 25/11/2026: quick, clean, not
   distracting): one row of small muted names under the title, the page on show darker with the menu's rose lozenge under
   it; pointed at, a name turns rose. Centred under a centred title, from the left under a showcase's. */
.sibs ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.sibs a { position: relative; display: block; padding: 0.25rem 0 0.625rem; color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.sibs a:hover, .sibs a:focus-visible { color: var(--accent); }
.sibs a[aria-current="page"] { color: var(--fg); font-weight: 500; }
.sibs a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 0.125rem; width: 0.3125rem; height: 0.3125rem; margin-left: -0.1563rem; background: var(--mark); transform: rotate(45deg); }
main > h1 + .sibs { margin: -0.75rem 0 0.75rem; }   /* (tucked under the title, over the grid or the details) */
.env-head + .sibs { margin-top: 0.75rem; }
.env-head + .sibs ul { justify-content: flex-start; }

.grid {
  /* scrolls on its own, no pages and no visible scrollbar (wheel, trackpad, touch and keyboard still scroll it); a soft fade
     at the bottom edge hints that there is more. Columns: as many 13.75rem+ tiles as fit (at most 4), sharing the width. */
  list-style: none; margin: 0 -0.875rem; padding: 0.5rem 0.875rem 3.5rem; flex: 1; min-height: 0;   /* side padding = room for shadows */
  overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
  display: grid; gap: 1.5rem; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(max(13.75rem, calc((100% - 3 * 1.5rem) / 4)), 1fr));   /* at most 4 (owner) */
}
.grid::-webkit-scrollbar { display: none; }
/* a page of only a few, six or fewer (owner, 26/11/2026: "optimize the placement / centering"; "no scroll for only these 5
   items"; item.js --n): all in one row, centred across and in the height left under the title, each as wide as the row
   shares out, at most a little bigger than a gallery tile (safe: never cut off at the top on a short window) */
.grid.grid-few { display: flex; flex-wrap: wrap; justify-content: center; align-content: safe center; }
.grid.grid-few > li { flex: 0 1 min(26rem, calc((100% - (var(--n) - 1) * 1.5rem) / var(--n))); }
.grid.grid-few .code { font-size: 1.25rem; }   /* (bigger tiles, bigger names: owner, 26/11/2026 "increase font size to help") */
/* colour swatch pages (VIP envelopes): the size's details, then every colour as its own envelope; hover or focus lifts it
   and shows its colour (Thai, English) above it. Not clickable yet. */
.env-info { display: flex; flex-wrap: wrap; gap: 0.375rem 1.75rem; margin: -0.375rem 0 0.375rem; }
.env-info div { display: flex; align-items: baseline; gap: 0.5rem; }
.env-info dt { color: var(--muted); font-size: 0.8125rem; }
.env-info dd { margin: 0; font-size: 1rem; font-weight: 500; }
.env-notes { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.7813rem; }
.sw-grid { grid-template-columns: repeat(auto-fill, minmax(10.625rem, 1fr)); gap: 1.875rem 1.625rem; padding-top: 3.875rem; align-items: end; }   /* top: room for the first row's tooltips */
.sw-grid.sw-few { grid-template-columns: repeat(auto-fill, minmax(16.25rem, 21.25rem)); gap: 2.125rem 2.125rem; }   /* a handful of colours: bigger envelopes */
.sw { position: relative; outline: none; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.sw img { display: block; width: 100%; height: auto; border-radius: 0.125rem; box-shadow: 0 0.375rem 0.875rem rgb(62 40 44 / .16), 0 1px 0.125rem rgb(62 40 44 / .12); transition: box-shadow .3s ease; }
.sw:hover, .sw:focus-visible { transform: translateY(-0.375rem); z-index: 2; }
.sw:hover img, .sw:focus-visible img { box-shadow: 0 1rem 1.75rem rgb(62 40 44 / .24), 0 0.125rem 0.25rem rgb(62 40 44 / .14); }
.sw-tip { position: absolute; left: 50%; bottom: calc(100% + 0.625rem); display: flex; flex-direction: column; align-items: center; padding: 0.375rem 0.75rem 0.3125rem; border-radius: 0.5rem;
  background: rgb(30 27 28 / .9); color: #fff; font-size: 0.8438rem; font-weight: 500; line-height: 1.35; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(-50%, 0.25rem); transition: opacity .18s ease, transform .18s ease; }
.sw-tip span { font-size: 0.7188rem; font-weight: 400; opacity: .8; }
.sw-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -0.375rem; border: 0.375rem solid transparent; border-top-color: rgb(30 27 28 / .9); }
.sw:hover .sw-tip, .sw:focus-visible .sw-tip { opacity: 1; transform: translate(-50%, 0); }
/* showcase pages (a VIP envelope built in 3D, src/assets/showcase.js): the envelope on the left, filling the height (a
   drawn envelope in the chosen colour, with the 3D view fading in over it on desktops); on the right the details at the top
   and under them every colour to pick, as large as the space left allows (owner, 13/11/2026: use the space, big colours).
   The page is as wide as the others (up to 90rem, centred: owner, 14/11/2026), the envelope's column as wide as its share
   allows, and the rest is the colours'. Sizes that follow the page are in its own units (cqw / cqh of main, see the desktop rules below). */
.env-show { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 2.25rem; }
.env-stage { position: relative; align-self: stretch; min-height: 0; display: grid; place-items: center; }
.env-stage .envc { width: calc(min(62%, 35rem) * var(--k, 1)); transition: opacity .5s ease; }   /* (--k: its size against its set's widest, item.js) */
.env-stage-3d { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.env-stage.is-3d .envc { opacity: 0; }
/* no flat placeholder (owner, 25/11/2026): with the scripts running (html.js, before the first paint) the drawn envelope never
   shows on the stage, its 3D fading in instead; only when the 3D fails (showcase.js .no-3d) */
.js .env-stage:not(.no-3d) .envc { opacity: 0; }
.env-stage.is-3d .env-stage-3d { opacity: 1; }
/* another size's 3D loading behind the one on show, then the two cross-fading (showcase.js mount: the drawing never shows
   between two 3D envelopes) */
.env-stage .env-stage-3d.is-next, .env-stage .env-stage-3d.is-gone { opacity: 0; pointer-events: none; }
/* the A4 letter folding over the stage (src/assets/fold.js: white เบอร์ 9): the drawn envelope steps back meanwhile, and the
   3D, still hidden, takes no clicks. The sheet as large as the stage allows, in three hinged thirds (the bottom one hangs
   on the middle), each with its inside (one third of the A4 picture) and its plain outside; it turns and scales about the
   top third's middle, which ends up as the folded sheet */
.env-stage.is-fold .envc { opacity: 0; }
.env-stage.is-fold .env-stage-3d { pointer-events: none; }
.env-stage-3d.no-card .tent { visibility: hidden !important; }   /* the 3D card, till the folded sheet reaches it (fold.js) */
/* the fold under way: the hero takes no clicks, taps or drags (showcase.js); everything in it, the 3D envelope's own
   pointer-events: auto (viewer3d.css) included */
.env-stage.is-busy, .env-stage.is-busy * { pointer-events: none !important; }
.a4 { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; perspective: 1400px; container-type: size; pointer-events: none; opacity: 0; }
.a4-sheet { position: relative; height: min(86cqh, 62cqw * 1.4143); aspect-ratio: 210 / 297; transform-style: preserve-3d; transform-origin: 50% 16.667%; }
.a4-p { position: absolute; left: 0; width: 100%; height: calc(100% / 3); transform-style: preserve-3d; transform-origin: 50% 0; }
.a4-t { top: 0; }
.a4-m { top: calc(100% / 3); }
.a4-b { top: 100%; height: 100%; }   /* (inside the middle third: its own height, under it) */
.a4-f { position: absolute; inset: 0; backface-visibility: hidden; background: #fbfbf9 no-repeat; box-shadow: 0 0.5rem 1.5rem -0.5rem rgb(62 40 44 / .28); }
.a4-in { background-image: var(--inside); background-size: 100% 300%; }
.a4-t > .a4-in { background-position: 0 0; }
.a4-m > .a4-in { background-position: 0 50%; }
.a4-b > .a4-in { background-position: 0 100%; }
.a4-out { transform: rotateX(180deg); }
.a4-sh { position: absolute; inset: 0; background: #2a2018; opacity: 0; }
/* the folded sheet handed over to the 3D card (fold.js): a flat copy of its heading third, its corner at the stage's,
   pinned onto four screen points by its transform (no perspective of its own) */
.a4-flat { position: absolute; left: 0; top: 0; z-index: 2; width: 1000px; height: calc(1000px * 99 / 210); transform-origin: 0 0; pointer-events: none;
  background: #fff no-repeat 0 0 / 100% 300%; background-blend-mode: multiply; box-shadow: 0 0.5rem 1.5rem -0.5rem rgb(62 40 44 / .28); }   /* (its paper colour: fold.js, the 3D card's) */
/* the side's content sits in the middle of its height, as the envelope does on the left: with room to spare the details
   come down (owner, 14/11/2026: more space above them); never cut at the top when it scrolls (safe) */
.env-side { min-height: 0; display: flex; flex-direction: column; justify-content: safe center; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 0.25rem 0.875rem 1.25rem 0.375rem; container: side / size; }
.env-side::-webkit-scrollbar { display: none; }
/* the heading (owner, 16/11/2026): the name big over two lines; beside it two small rows, its size and colour count, then
   its weight, spread over the name's height so each row sits beside one of its lines */
.env-head { display: grid; grid-template-columns: auto 1fr; column-gap: 2rem; margin-bottom: 0.25rem; }
.env-head h1 { margin: 0; font-size: 2.25rem; line-height: 1.2; }
.env-head h1 span { display: block; }
.env-head .env-info { display: flex; flex-wrap: wrap; align-content: space-around; gap: 0 1.75rem; margin: 0; }
.env-head .env-info div:last-child { flex-basis: 100%; }   /* the weight on a row of its own */
.env-head .env-info dd { white-space: nowrap; }
@container side (max-width: 34rem) {   /* no room beside the name: the facts under it */
  .env-head { grid-template-columns: 1fr; row-gap: 0.625rem; }
  .env-head .env-info { row-gap: 0.25rem; }
}
.env-pick { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.625rem; margin: 1.25rem 0 0.875rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
/* the VIP pages' heading (owner, 26/11/2026: mock-up H1 with H2's title and facts strip; item.js env-h1): the kind light, the
   size bold, one line; the facts a soft strip of three, the label over the value; the sizes as tabs on a line, the current one
   underlined, the line the divider over the colours. Its marks in the theme's metal (--mark). (.env-head.env-h1: over the
   older .env-head rules, the phone's too) */
.env-head.env-h1 { display: block; }
.env-head.env-h1 h1 { margin: 0; font-size: 2rem; font-weight: 400; line-height: 1.25; color: var(--muted); }   /* (its title as H2's: the kind light, the size bold, one line) */
.env-head.env-h1 h1 span { display: inline; font-weight: 600; color: var(--fg); }
.env-head.env-h1 .env-info { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; max-width: 38rem; margin: 1rem 0 0; padding: 0.75rem 0; border-radius: 0.625rem;
  background: color-mix(in srgb, #fff 55%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); }
:root[data-theme="ink"] .env-head.env-h1 .env-info { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.env-head.env-h1 .env-info div { display: block; flex-basis: auto; padding: 0 1rem; text-align: center; }
.env-head.env-h1 .env-info div + div { border-left: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.env-head.env-h1 .env-info dt { font-size: 0.75rem; }
.env-head.env-h1 .env-info dd { font-size: 1.125rem; }
.env-head.env-h1 + .sibs { margin: 1.25rem 0 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.env-head.env-h1 + .sibs ul { justify-content: flex-start; gap: 0 1.5rem; }
.env-head.env-h1 + .sibs a { padding: 0.375rem 0 0.625rem; margin-bottom: -1px; font-size: 0.9375rem; border-bottom: 2px solid transparent; }
.env-head.env-h1 + .sibs a[aria-current="page"] { border-bottom-color: var(--mark); }
.env-head.env-h1 + .sibs a[aria-current="page"]::after { content: none; }
.env-head.env-h1 + .sibs + .env-pick { margin-top: 1rem; padding-top: 0; border-top: 0; }   /* (the tabs' line divides already) */
.env-pick-k { color: var(--muted); font-size: 0.8125rem; }
.env-pick-th { font-size: 1.25rem; font-weight: 600; }
.env-pick-en { color: var(--muted); font-size: 0.875rem; }
/* the colours under the details (.sw-area): a row per colour family, its name in front (src/render/item.js colourPick).
   An envelope is as large as the space allows with every row in view: the lesser of the width a row can give it (after
   the names' column) and the height a row can (--rows rows, --cols the longest row; set on the area). The area asks for
   the height its rows need at the width-bound size (--need, in the side's units), so whatever is spare goes round the
   whole side, not under the colours; on a short screen it gives way, down to a least height, then the side scrolls.
   In a tall narrow side the names go above their rows instead. */
.sw-area { --lab: 6rem; --labh: 0rem; --aw: calc(100cqw - 1.25rem); --ag: clamp(0.5rem, var(--aw) * 0.019, 1.375rem);
  --need: calc(var(--rows) * ((var(--aw) - var(--lab) - var(--cols) * var(--ag)) / var(--cols) / (var(--envc-ratio)) + var(--labh)) + (var(--rows) - 1) * var(--ag) + 0.75rem);
  flex: 0 1 var(--need); min-height: 18.75rem; container-type: size; }
.sw-pick { --g: clamp(0.5rem, 1.9cqw, 1.375rem); --gy: clamp(0.5rem, min(1.9cqw, 2.4cqh), 1.375rem);
  --cw: min((100cqw - var(--lab) - var(--cols) * var(--g)) / var(--cols), ((100cqh - 0.5rem - (var(--rows) - 1) * var(--gy)) / var(--rows) - var(--labh)) * (var(--envc-ratio)));
  display: grid; grid-template-columns: var(--lab) repeat(var(--cols), var(--cw)); gap: var(--gy) var(--g); align-items: center; }
.sw-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; row-gap: 0.25rem; }
.sw-fam { grid-column: 1; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: var(--mark); letter-spacing: .02em; }
.sw-row > :nth-child(2) { grid-column: 2; }   /* a row's envelopes (or a colour's empty place, .sw-gap) start after the names' column */
/* the colour page's rows are its sizes, drawn to scale (--s: the die's width over the widest's; the area's --envc-ratio
   fits the tallest as drawn), each in the middle of its cell */
.sw-row[data-sz] .sw-chip { width: calc(100% * var(--s)); justify-self: center; }
.sw-pick:has(> .sw-row[data-sz]) { --gy: clamp(0.875rem, 3.2cqh, 1.5rem); }   /* sizes of different heights: more air between the rows */
@container side (aspect-ratio < 0.62) {
  .sw-area { --lab: 0rem; --labh: 1.3rem; }
  .sw-pick { grid-template-columns: repeat(var(--cols), var(--cw)); }
  .sw-fam { grid-column: 1 / -1; font-size: 0.75rem; }
  .sw-row > :nth-child(2) { grid-column: 1; }
}
.sw-chip { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 0.1875rem; cursor: pointer; outline: 0.125rem solid transparent; outline-offset: 0.1875rem;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), outline-color .2s ease; }
/* a colour in its own paper weight (item.js swChip gsm: น้ำตาลคราฟท์ 125g): a small tag on its top corner, in the theme's
   metal (owner, 26/11/2026) */
.sw-chip:has(.sw-tag) { position: relative; }
.sw-tag { position: absolute; top: -0.4375rem; right: -0.4375rem; z-index: 1; padding: 0.0625rem 0.375rem; border-radius: 62.4375rem; background: var(--mark); color: var(--bg);
  font-size: 0.625rem; font-weight: 600; line-height: 1.5; letter-spacing: .02em; box-shadow: var(--shadow-sm); pointer-events: none; }
/* a drawn envelope (src/render/item.js envDrawn): the folded envelope from the back in the colour --c, flat shapes from the
   die outline. Every part is exactly the colour --c, whatever the flap does: no light, no shade on the paper (owner,
   13/11/2026: the colour is what is being chosen); its seams and the flap's shadow on the body give it its form. A seam
   is a line in a darker tone of the same colour (--seam), so it shows as clearly on a dark envelope as on a pale one. The
   closing flap is its own piece, hinged along the top and lifted --lift degrees toward the viewer (showcase.js: a wind that
   comes and goes); its shadow grows as it lifts.
   Sizes follow the envelope's own width (cqw), so the same drawing works small and large. */
.envc { position: relative; display: block; width: 100%; aspect-ratio: var(--envc-ratio); container-type: inline-size; --lift: 0; --seam: color-mix(in srgb, var(--c) 80%, #1a1208); --sw: 9; border-radius: 1cqw; box-shadow: var(--shadow-sm); }
.envc-big { box-shadow: var(--shadow-lg); --sw: 3; }   /* a seam's width is in the drawing's units (1000 across): about 1 px small, 1.5 px large */
.envc-3d { position: absolute; inset: 0; perspective: 170cqw; perspective-origin: 50% 30%; }   /* close enough that a lifting flap visibly comes toward the viewer */
.envc svg { position: absolute; left: 0; top: 0; width: 100%; display: block; overflow: visible; }
.envc-defs { position: absolute; }
.envc-b { height: 100%; }
.envc-f, .envc-s { height: calc(var(--envc-flap) * 100%); transform-origin: 50% 0; }
.e-in { fill: var(--fill, var(--ci, var(--c))); }   /* under the flap: a two-tone envelope's inside colour */
/* a two-tone one, drawn open (src/render/item.js envOpen): the whole drawing fitted in the box, its shadow on its own shape */
.envc-2 { box-shadow: none; }
.envc .envc-o { height: 100%; filter: drop-shadow(0 0.0625rem 0.125rem rgb(62 40 44 / .25)); }
.e-flapin { fill: var(--ci); stroke: color-mix(in srgb, var(--ci) 80%, #1a1208); stroke-width: var(--sw); stroke-linejoin: round; }
.e-side, .e-bot { fill: var(--fill, var(--c)); stroke: var(--seam); stroke-width: var(--sw); stroke-linejoin: round; }
/* a faint paper grain over every face (owner, 14/11/2026), mid grey = no change (soft-light), so the colour stays the
   colour; a swatch with its own paper (--fill: the kraft) has none */
.e-grain { fill: url(#envc-grain); stroke: none; mix-blend-mode: soft-light; opacity: var(--grain, 1); pointer-events: none; }
.envc-f { fill: var(--fill, var(--c)); stroke: var(--seam); stroke-width: var(--sw); stroke-linejoin: round; transform: rotateX(calc(var(--lift) * 1deg)); will-change: transform; }
.envc-s { --grain: 0; --fill: rgb(30 20 8); fill: rgb(30 20 8); stroke: none; filter: blur(1.1cqw); opacity: calc(.14 + var(--lift) * .009); transform: translateY(calc(.5cqw + var(--lift) * .2cqw)) scaleX(calc(1 - var(--lift) * .0015)); }
.sw-chip:hover, .sw-chip:focus-visible { transform: translateY(-0.1875rem); }
.sw-chip[aria-checked="true"] { outline-color: var(--accent); }
.sw-chip:focus-visible { outline-color: var(--fg); }
/* a showcase with sizes (ซองขาว, ซองสี 80 กรัม: src/render/item.js sizedShowcase, showcase.js): a stage per size, one showing
   (the drawn envelope, or the product photo of a size whose die has not come), filling the stage; the size switch under
   the name, then the colour picked and that size's colours, one row of them */
.env-sized [hidden] { display: none; }
.env-sized .env-stage { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.sz-stage { grid-area: 1 / 1; place-self: stretch; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.sz-photo { display: block; max-width: 88%; max-height: 88%; border-radius: 0.1875rem; box-shadow: var(--shadow-lg); }
/* the sizes as pills (the colour page: words only), the one picked filled in the accent */
.sz-pick { display: flex; flex-wrap: wrap; gap: 0.5rem 0.625rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.sz-chip { padding: 0.3125rem 1.125rem; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 62.4375rem; font-size: 0.9375rem; line-height: 1.5; white-space: nowrap;
  transition: color .15s, background-color .2s, border-color .2s; }
.sz-chip:hover { border-color: var(--accent); }
.sz-chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
/* the white page: each size drawn small in its own shape (a photo until its die comes), its name under it; the shapes sit
   in one band (--th high) so the names line up */
.sz-pick:has(.envc, img) { --th: 6.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 0.75rem; }   /* (ซองขาว: bigger, three a row, the เบอร์ 9 labels then 7 and 29: owner, 26/11/2026) */
.sz-pick:has(.envc, img) .sz-chip { display: grid; grid-template-rows: var(--th) auto; justify-items: center; align-items: start; row-gap: 0.625rem; padding: 0.25rem 0.125rem;
  border: 0; border-radius: 0.375rem; background: none; color: color-mix(in srgb, var(--fg) 78%, var(--bg)); font-size: 0.8125rem; line-height: 1.35; white-space: normal; text-align: center; }
/* to scale (owner, 19/11/2026): the widest as large as its cell and the band allow (--fit: the tallest as drawn fills the
   band), every other at --s of it */
.sz-chip > .envc { width: calc(var(--s, 1) * min(100%, var(--th) * (var(--fit, var(--envc-ratio))))); align-self: end; }   /* all on one line, as if side by side on a table */
.sz-sub { display: block; margin-top: 0.0625rem; font-size: 0.75rem; line-height: 1.35; color: var(--muted); }
/* a ฉลาก in its own colour, deep enough to read (4.5:1 or more on the page), lighter on the dark theme (owner, 26/11/2026) */
.sz-sub[data-tone="y"] { color: #7a5c00; } .sz-sub[data-tone="b"] { color: #1f4e9a; } .sz-sub[data-tone="p"] { color: #a8306a; }
:root[data-theme="ink"] .sz-sub[data-tone="y"] { color: #e3b94c; } :root[data-theme="ink"] .sz-sub[data-tone="b"] { color: #8fb1f0; } :root[data-theme="ink"] .sz-sub[data-tone="p"] { color: #f09cc3; }
.sz-pick:has(.envc, img) .sz-chip { font-size: 1.0625rem; } .sz-pick:has(.envc, img) .sz-sub { font-size: 0.875rem; }   /* (ซองขาว's bigger swatches: their names a size up: owner, 26/11/2026) */   /* a ฉลาก, under its size: smaller and greyer */
.sz-chip > img { width: var(--th); height: var(--th); max-width: 100%; object-fit: cover; border-radius: 0.1875rem; box-shadow: var(--shadow-sm); }
.sz-chip > :is(.envc, img) { outline: 0.125rem solid transparent; outline-offset: 0.1875rem; transition: transform .25s cubic-bezier(.16, 1, .3, 1), outline-color .2s ease; }
.sz-chip:hover > :is(.envc, img), .sz-chip:focus-visible > :is(.envc, img) { transform: translateY(-0.1875rem); }
.sz-pick:has(.envc, img) .sz-chip:hover, .sz-pick:has(.envc, img) .sz-chip[aria-checked="true"] { color: var(--accent); }
.sz-chip[aria-checked="true"] > :is(.envc, img) { outline-color: var(--accent); }
@media (max-width: 767px) {
  .sz-chip { min-height: 2.75rem; }   /* finger-sized */
  .sibs ul { gap: 0 1rem; }   /* (a category's other pages on one line: VIP's six sizes did 5 + 1) */
  .sibs a { padding: 0.625rem 0 0.8125rem; }   /* (finger-sized: 44 px) */
  .sz-pick:not(:has(.envc, img)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); }   /* (even columns: six sizes 3 + 3, not 5 + 1) */
  .sz-pick:not(:has(.envc, img)) .sz-chip { text-align: center; padding-inline: 0.5rem; }
  .sz-pick:has(.envc, img) { --th: 4.25rem; }
}
@media (max-width: 767px) {
  .env-show { display: block; }
  /* the envelope stays at the top while the colours scroll under it, so a colour picked further down is seen on it at once.
     Nearly solid behind, no frosted blur: a backdrop-filter here made Chrome draw the 3D envelope where it was before the
     strip stuck (some 70 px too high, its flap cut off) */
  .env-stage { position: sticky; top: 0; z-index: 3; height: min(80vw, 46svh); margin: 0 -1rem 0.875rem; }
  .env-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 94%, transparent);
    box-shadow: 0 0.5rem 1rem -0.75rem rgb(62 40 44 / .25); }
  .env-stage-3d { top: 2.25rem; }   /* headroom: pinned to the screen's top edge, the open flap's tip (higher at some turns) is not cut off */
  .env-stage .envc { width: calc(78% * var(--k, 1)); }
  .env-side { display: block; overflow: visible; padding: 0 0 1.5rem; container-type: normal; }
  .sw-area { flex: none; min-height: 0; container-type: normal; }
  .env-head { display: block; }
  .env-head h1 { font-size: 1.5rem; margin-bottom: 0.625rem; }
  .env-head h1 span { display: inline; }
  .env-head .env-info { display: flex; gap: 0.375rem 1.5rem; }
  .env-head.env-h1 h1 { font-size: 1.5rem; }   /* (a phone: the VIP heading smaller, its facts strip tighter so the three fit across) */
  .env-head.env-h1 .env-info div { padding: 0 0.5rem; }
  .env-head.env-h1 .env-info dd { font-size: 0.9375rem; }
  .env-head.env-h1 + .sibs ul { flex-wrap: nowrap; gap: 0 1.25rem; overflow-x: auto; scrollbar-width: none; }   /* (the six sizes one row, swiped across, not wrapped) */
  .env-head.env-h1 + .sibs ul::-webkit-scrollbar { display: none; }
  .sw-pick { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0.875rem 0.625rem; }   /* the names above their rows */
  .sw-fam { grid-column: 1 / -1; font-size: 0.75rem; }
  .sw-row > :nth-child(2) { grid-column: 1; }
}
.grid [hidden] { display: none; }
.tile { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
/* a row's labels one height (owner, 26/11/2026: "match the label height"): each tile as tall as its row's tallest, its label
   taking what is left, its words in the middle (a one-line name beside a two-line one) */
.tile { display: flex; flex-direction: column; }
.tile a { flex: 1; display: flex; flex-direction: column; }
.tile:hover, .tile:focus-within { transform: translateY(-0.25rem); }
/* each photo and its number one label (owner, 26/11/2026: mock-up E2; the number sat halfway between two rows and could be
   read as the wrong card's): the photo over a paper strip carrying the number, one rounded card with one shadow */
.tile a { border-radius: 0.375rem; overflow: hidden; background: var(--tile-strip); box-shadow: var(--shadow-sm); transition: box-shadow .35s cubic-bezier(.16, 1, .3, 1); }
:root { --tile-strip: color-mix(in srgb, #fff 70%, var(--bg)); }
:root[data-theme="ink"] { --tile-strip: color-mix(in srgb, var(--fg) 8%, var(--bg)); }   /* (dark: a pane a step lighter than the page, its light number AA on it) */
.tile:hover a, .tile:focus-within a { box-shadow: var(--shadow-lg); }
.tile a:focus-visible { outline: none; }   /* a focused tile shows like a hovered one (lift, deeper shadow, rose number) instead of a box */
.tile a:hover { color: inherit; }
/* one photo frame for the whole page, the shape of its tallest photo (item.js: 5:4 on the card pages, square on the
   envelope pages); a wider photo fills it, trimmed at the sides, so every row lines up (owner, 16/11/2026). The pop-up
   still shows the whole photo. */
.tile .ph { position: relative; display: block; aspect-ratio: var(--tile-ratio, 5 / 4); }
/* the card in a 3D design's photo (item.js .t-hot): pointed at, it lights up as in the pop-up and says ดูแบบ 3D; clicked, the
   pop-up opens straight into 3D (viewer.js). Only the card takes the pointer; the rest of the tile opens the photo pop-up */
.t-hot { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.t-card { pointer-events: all; cursor: pointer; fill: rgb(255 255 255 / 0); stroke: rgb(255 255 255 / 0); stroke-width: 2; vector-effect: non-scaling-stroke; transition: fill .2s ease, stroke .2s ease; }
.t-card:hover { fill: rgb(255 255 255 / .14); stroke: rgb(255 255 255 / .9); }
.t-hint { pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.t-hint rect { fill: rgb(30 27 28 / .72); }
.t-hint text { fill: #fff; font-family: var(--font-body); font-weight: 500; }
.t-card:hover + .t-hint { opacity: 1; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; }   /* (its corners and shadow: the label's, .tile a) */
.tile .code { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0.5rem 0 0.5625rem; text-align: center; font-size: 1.0625rem; font-weight: 500; letter-spacing: .08em; color: var(--fg); font-variant-numeric: tabular-nums; transition: color .2s; }
.tile .code.is-name { padding-inline: 0.5rem; letter-spacing: 0; text-wrap: balance; white-space: pre-line; }   /* (a product's name, not a number: the numbers' wide tracking stretched it, and a long one wraps evenly) */
.tile:hover .code, .tile:focus-within .code { color: var(--accent); }

/* The home and about pages fill what is left under the menu */
.home, .about { flex: 1; min-height: 0; display: grid; padding-bottom: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.tagline { margin: 1.75rem 0 0; font-family: var(--font-display); font-size: 1.375rem; line-height: 1.5; text-wrap: balance; }   /* balanced lines: no lone last word */
.cta { display: inline-block; margin-top: 0.625rem; padding-bottom: 0.1875rem; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; color: var(--accent); line-height: 1.8; transition: background-size .45s cubic-bezier(.16, 1, .3, 1), letter-spacing .45s cubic-bezier(.16, 1, .3, 1); }
.cta:hover { letter-spacing: .02em; background-size: 40% 1px; }
.about { grid-template-rows: minmax(0, 1fr) auto; justify-items: center; padding-bottom: 0.75rem; }
.about-text { align-self: center; width: min(100%, 42.5rem); overflow-y: auto; scrollbar-width: none; max-height: 100%; line-height: 1.8; font-size: 0.9063rem; }
.about-text h1 { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 1.125rem; font-size: 1.875rem; }
.about-text h1::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--mark); transform: rotate(45deg); flex: none; }
.about-text p { margin: 0 0 0.875rem; text-wrap: pretty; }
.about-text p:not(.tagline) { color: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
.about-text h1 + p { font-size: 1.0313rem; line-height: 1.8; color: var(--fg); }   /* lead paragraph */
/* the 60 years, marked with a soft accent highlighter */
.about strong { font-weight: 600; color: var(--accent); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 18%, transparent) 62%); padding: 0 0.125rem; }
.about-text .tagline { display: flex; align-items: flex-start; gap: 0.875rem; font-size: 1.0625rem; line-height: 1.5; margin-top: 1.375rem; color: var(--accent); text-wrap: balance; }
.about-text .tagline::before { content: ""; width: 2rem; height: 1px; margin-top: .75em; background: currentColor; flex: none; }   /* sits on the first line's middle */
.about address { justify-self: stretch; font-style: normal; color: var(--muted); font-size: 0.75rem; line-height: 1.7; border-top: 1px solid var(--rule); padding-top: 0.625rem;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 0.375rem 2rem; }
.about address p { margin: 0; }
/* each heading with its icon (owner, 26/11/2026: a pin, a chat bubble, a handset), drawn as the theme button's are; the
   address's Google Maps link on its heading's line */
.addr-k { display: flex; align-items: center; gap: 0.4em; font-size: 0.6563rem; line-height: 1.4; letter-spacing: .14em; color: var(--accent); margin-bottom: 0.25rem; }
.addr-k svg { flex: none; width: 1.35em; height: 1.35em; margin-top: -0.08em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.about address a { color: var(--fg); white-space: nowrap; }   /* a phone number never breaks across lines */
.about address a:hover { color: var(--accent); }
.about .addr-line a { color: var(--accent); font-weight: 600; }
.about .addr-map { margin-left: 0.625rem; padding-left: 0.625rem; border-left: 1px solid var(--rule); color: var(--accent); font-weight: 500; letter-spacing: 0; }   /* (the shop on Google Maps, under its address: owner, 26/11/2026) */   /* LINE first and in the accent: the way to reach us (no e-mail: owner, 16/11/2026) */
.about .addr-line a:hover { color: var(--fg); }

/* The home page's lines (src/render/home.js homeShow; docs/superpowers/specs/2026-11-18-home-spotlight-design.md).
   Everywhere but a PC (phones, touch tablets) it is only a quick way into the catalogs: each line's name and total, then
   its size links, one under the other (each line's panel, its slot hidden); no pieces. A PC's table and spotlight are
   further down. On a touch tablet the desktop page does not scroll, so the column does. */
.home { overflow-y: auto; }
.hs-slot, .hs-piece { display: none; }
/* a phone's picture of each line (owner, 26/11/2026: the phone polish; the list was text alone): its featured product's
   photo, a wide strip above its name, a tap opens its page. Not on a PC, where the spotlight shows the line (lazy: never
   fetched there) */
/* (a phone's picture of each line: the line's real designs fanned, built from the 3D files, see-through so the page's mood
   shows behind; tools/mobile-banners.mjs: owner, 26/11/2026 "don't use picture ... using our design files") */
.hs-photo { display: block; margin: -0.25rem -0.5rem 0.5rem; }
.hs-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 450; }
@media (min-width: 768px) { .hs-photo { display: none; } }
.hs-row { display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.hs-row > li { order: var(--turn, 0); }   /* (a phone's list in the showcase's order, 4 3 5 2 6 1 7: owner, 26/11/2026; a PC's row keeps its own, below) */
/* A line's text is a small price-list: its name with its total at the far end, a rule, then its links as rows, one under
   the other with a hairline between (owner, 25/11/2026: that each could be clicked did not show). A row reads as a way in
   at rest: it spans the list, its count at the far end, then an arrow in the accent (the menu's own, turned to point on);
   pointed at, the whole row tints and the arrow steps forward. Name, rule and rows share one left and one right edge. */
.hs-text h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0; padding: 0 0.5rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 26%, transparent); font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.hs-total { flex: none; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.hs-sizes { margin: 0; padding: 0; list-style: none; }
.hs-sizes li + li { border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.hs-sizes a { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; padding: 0 0.5rem; font-size: 0.9375rem; transition: background-color .15s; }   /* finger-sized */
.hs-sizes a span { margin-left: auto; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hs-sizes a::after { content: ""; flex: none; width: 0.4375rem; height: 0.4375rem; margin-right: 0.125rem; border: solid var(--mark); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.hs-sizes a:not(:has(span))::after { margin-left: auto; }   /* (a row without a count: the arrow still at the far end) */
.hs-sizes a:hover, .hs-sizes a:focus-visible { background: color-mix(in srgb, var(--accent) 11%, transparent); color: inherit; }   /* (its name stays dark, not the links' rose: over the tint that looked switched off) */
.hs-sizes a:hover::after, .hs-sizes a:focus-visible::after { transform: translateX(0.1875rem) rotate(45deg); }
.hs-sizes a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* a line with many links (home.js cols: ซองสีฝายุโรป, ซองขาว): two equal columns filled top to bottom (--rows: half the
   links, rounded up), each row closed by its hairline, so both columns read as one table under the name */
.hs-sizes.is-2col { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), auto); grid-auto-columns: minmax(0, 1fr); column-gap: 1.25rem; }
.hs-sizes.is-2col li + li { border-top: 0; }
.hs-sizes.is-2col li { border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
@media (prefers-reduced-motion: reduce) { .hs-sizes a, .hs-sizes a::after { transition: none; } }

/* the pieces (PC only): each fitted inside its box whatever its shape (contain), at its own aspect ratio --r: the VIP
   envelope's drawing, a card's 7 x 5 in front, the blank เบอร์ 9 envelope. The boxes are size containers (below). */
.hp { display: grid; place-items: center; width: 100%; height: 100%; --r: 7 / 5; }
.hp > * { display: block; width: min(100cqw, 100cqh * var(--r)); aspect-ratio: var(--r); }
.hp > .envc { --r: var(--envc-ratio); }
/* a card's flat front, as the 3D viewer builds it: the paper, the print multiplied over it (white = bare paper), then the
   gold, the foil file as a mask over the viewer's gold bands (home.js writes them inline, look.js foilGradient) on a layer
   9 faces tall, as there: at the face's own size its stripes are 6 times too tight. (Direct child only: the 3D viewer
   has faces of its own.) */
.hp > .face { position: relative; background: var(--paper); isolation: isolate; box-shadow: var(--shadow-lg); }
/* a card that reads upright (home.js face): the face stands tall (its --r), its landscape artwork as wide as the face is
   tall, turned a quarter back about the middle; on its own paper (a turned box blends only within itself) */
.hp .face-art { position: absolute; left: 50%; top: 50%; width: calc(100% / (var(--r))); height: calc(100% * (var(--r))); background: var(--paper); transform: translate(-50%, -50%) rotate(-90deg); }
.hp .face-print { position: absolute; inset: 0; background: center / 100% 100% no-repeat; mix-blend-mode: multiply; }
.hp .gold { position: absolute; inset: 0; -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  background-position: center; background-size: 100% 900%; background-repeat: no-repeat; }
/* the placeholders: plain paper with a soft paper shadow, no words (a plain piece looks intentional). The envelope (its
   shape --r from its own drawing, home.js) casts its shadow from its drawn shape, a little inside its box. */
.hp-blank-card { position: relative; background: #fbf9f4; box-shadow: var(--shadow-lg); }
/* a card's sample text (home.js turns it on and off on the row's cards, owner 18/11/2026): one layer per line, the text's
   mask in gold (or ink), each line wiped in from its left one after another as the 3D viewer reveals it, and out again
   last line first; a blank card's simulated lines are soft gold bars */
.face-text { position: absolute; inset: 0; pointer-events: none; }
.face-text i { position: absolute; inset: 0; background: var(--gold) center / 100% 900% no-repeat;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  clip-path: inset(calc(var(--y0) * 100%) calc((1 - var(--x0)) * 100%) calc((1 - var(--y1)) * 100%) calc(var(--x0) * 100%));
  transition: clip-path .3s ease-in calc((var(--n) - 1 - var(--i)) * 60ms); }
.face-text.is-ink i { background: #2e2a26; }
/* text in its own colours (the wedding cards): the text image over the ink, cut out by itself, line by line, exactly as
   the 3D viewer's finished text (viewer3d.css .ink-text); its foil words (.ft-foil) as above */
.face-text.is-colour i:not(.ft-foil) { background: #2e2a26 var(--mask) center / 100% 100% no-repeat; }
.face-text.is-sim i { -webkit-mask: none; mask: none; opacity: .55;
  clip-path: inset(calc(var(--y0) * 100%) calc((1 - var(--x0)) * 100%) calc((1 - var(--y1)) * 100%) calc(var(--x0) * 100%) round 1rem); }
.is-text > .face-text i { clip-path: inset(calc(var(--y0) * 100%) calc((1 - var(--x1)) * 100%) calc((1 - var(--y1)) * 100%) calc(var(--x0) * 100%));
  transition: clip-path .55s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * 140ms); }
.is-text > .face-text.is-sim i { clip-path: inset(calc(var(--y0) * 100%) calc((1 - var(--x1)) * 100%) calc((1 - var(--y1)) * 100%) calc(var(--x0) * 100%) round 1rem); }
@media (prefers-reduced-motion: reduce) { .face-text i { transition: none; } }
.hp > .hp-blank-env { filter: drop-shadow(0 0.0625rem 0.125rem var(--shade)) drop-shadow(0 0.875rem 1.25rem var(--shade)); }
/* the text takes the menu's darker grey and rose: toward the bottom right the page's rose glow takes the plain ones under 4.5:1 */
.hs { --muted: var(--rail-muted); --accent: var(--rail-accent); }


@media (min-width: 768px) {
  body { display: grid; grid-template-rows: 4rem auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); overflow: hidden; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  main { width: min(100%, 90rem); justify-self: center; padding-left: 2rem; }
  /* a showcase page: as wide as the others (centred), and its own size is the measure for what is in it (the envelope's
     column: as wide as the page's height can use, 86% of it, and never more than half the width) */
  main:has(.env-show) { container-type: size; }
  .env-show { grid-template-columns: min(52cqw, 86cqh) minmax(0, 1fr); gap: 0 clamp(1.75rem, 2.6cqw, 3.75rem); }
}

/* The home page on a PC (a mouse and room: the same test as site.js's for loading the showpiece's script): the lines
   standing on a table along the bottom, one of them large in the spotlight above. No box, panel or wall of its own: the
   pieces stand on the page's own background, in its theme. Only the panel that is on shows. The spotlight is one fixed
   area in the middle, as wide as the height allows (and never more than half the page), its text to its right; the row's
   slots are equal, the pieces standing on one soft shadow. Every size from the show's own (cqw / cqh) or rem. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .home { overflow: visible; grid-template-rows: minmax(0, 1fr); }
  /* --box: every piece box's shape, the spotlight's and the slots': a little wider than a 7 x 5 card. The gap over the row
     is 3% of the window's height (3cqh here meant that: the show is no container of itself) */
  .hs { container-type: size; display: grid; grid-template-rows: minmax(0, 1fr) auto; row-gap: 3svh; --box: 1.45; }
  /* the spotlight: each panel sits in its line's item of the row (home.js homeShow), placed from the row onto the one area
     above it, less the gap (100% = the row's height). Only its piece and text take the pointer: the rest of the area is not
     the row (home.js holds the turns while the pointer is on the row) */
  /* The piece and its text are one group, in the middle of the area both ways (owner, 18/11/2026). A card's box is its
     face's; an envelope's is the closed envelope itself (its shape on the box, homeShow), so the group is centred on what
     shows: its 3D rises above it while its flap stands open and its card stands out of it (about 0.61 of its height for
     the VIP), so a closed envelope is at most 43% of the area's height (--env-h) and the open one still clears the menu bar. */
  .hs-spot { position: absolute; left: 0; right: 0; bottom: calc(100% + 3svh); height: calc(100cqh - 100% - 3svh); container-type: size; pointer-events: none;
    display: flex; align-items: center; justify-content: center; gap: var(--gap);
    /* its text in proportion to its piece on every desktop (owner, 19/11/2026: too small on a large one): one size from the
       show's height (the piece is about 70% of it), so the heading is about 9% of the piece's height and the size links
       about 5%, the longest list (VIP's six) still clear of the row; all the text's measures in em of it, so the block keeps
       its proportions; --side, that list unwrapped, with it */
    font-size: clamp(1rem, 3.4cqh, 2.25rem);
    --gap: 4.5cqw; --side: 17em; --room: calc(94cqw - var(--gap) - var(--side));
    --ph: min(90cqh, 50cqw / var(--box), var(--room) / var(--box)); --pw: calc(var(--ph) * var(--box));
    /* One scale for every piece (owner, 25/11/2026: the seven in true proportion to each other): --in, the pixels of an
       inch: as large as the tallest fits the area's height (the VIP open: its flap, body and size mark, about 10.2 in)
       and the widest leaves its text room (the white เบอร์ 9 and its mark, 10.5 in, beside the two-column text). Each
       piece's box is its real size at it (--iw x --ih in, homeShow), its 3D drawn to the same scale (home.js inch) */
    --in: min(9.2cqh, (94cqw - var(--gap) - 22em) / 10.5); }   /* (9.7 till the caption under the piece took its line, 25/11/2026) */
  .hs-spot:not(.is-on) { display: none; }
  .hs-piece { position: relative; flex: none; display: block; width: var(--pw); height: var(--ph); container-type: size; pointer-events: none; }   /* (a placeholder: no real size) */
  .hs-piece[style*="--iw"] { width: calc(var(--iw) * var(--in)); height: calc(var(--ih) * var(--in)); }
  /* an envelope: its height from its shape; and room kept for what shows round it once open, so the group centres on all
     of it and its text stands clear: its flap above (or the card standing out of the pocket, 1.6 in, if that is
     higher), its size marks under it and at its right (1.1 in: viewer3d.js SHOW.gap + the mark). Layout, not a
     transform: the flight and the 3D measure it as it is, and nothing moves while it opens */
  .hs-piece:has(> .hp[data-piece="env"])[style*="--iw"] { height: calc(var(--iw) * var(--in) / (var(--envc-ratio)));
    margin: calc((max(var(--envc-flap) * var(--iw) / (var(--envc-ratio)), 1.6) + 0.3) * var(--in)) calc(1.1 * var(--in)) calc(1.65 * var(--in)) 0; }   /* (bottom: its size mark, then its caption) */   /* (+0.3 in: the open flap, leaning back in 3D, stands a little taller than its depth) */
  .hs-piece, .hs-text { transition: translate .8s cubic-bezier(.22, 1, .36, 1); }   /* the pair re-centred on a settled 3D model (home.js recentre) */
  /* its text: as wide as its longest row asks (never under 12.5em: a short list still reads as a list, nor over --side),
     so a name and its count stay near each other; the name a clear step over the rows, no more (owner, 25/11/2026: the
     large bold name beside thin links looked awkward) */
  .hs-text { flex: none; width: max-content; min-width: 12.5em; max-width: var(--side); pointer-events: auto; }
  .hs-text h2 { gap: 1.1em; padding: 0 0.36em 0.36em; font-size: 1.4em; line-height: 1.3; }   /* (0.5em of the text's size each side, as the rows) */
  .hs-total { font-size: 0.62em; }   /* (inside the h2: 0.87 of the text's size) */
  .hs-sizes a { min-height: 0; gap: 0.9em; padding: 0.44em 0.53em; font-size: 0.9375em; line-height: 1.5; white-space: nowrap; }
  /* two columns: the text as wide as both need, never capped (capped, its widest rows overflowed and their arrows fell out
     of line); --side, about that width, is the room the piece leaves it; a gap in proportion */
  .hs-spot:has(.is-2col) { --side: 22em; }
  .hs-spot:has(.is-2col) .hs-text { max-width: none; }
  .hs-sizes.is-2col { column-gap: 1.1em; }
  .hs-sizes a::after { width: 0.44em; height: 0.44em; margin-right: 0.13em; }
  .hs-sizes a span { font-size: 0.8667em; }   /* (inside the link: 0.8125 of the text's size) */

  /* the row: equal columns, one per line, a slot in the middle of each; its piece stands on the bottom of its box, on the
     table. A piece's height from the show's, held by the width so seven boxes (and their fans) still fit side by side */
  .hs-row { --th: min(13cqh, 8cqw); grid-row: 2; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
  .hs-row > li { order: 0; }   /* (the row keeps its own order: 1 to 7) */
  /* the table: each piece its own soft shadow where it stands, as wide as it is, darkest along its foot (owner, 26/11/2026:
     each one's own, not one long shadow under the row). A piece lifted (hover, focus) leaves it on the table, smaller and
     fainter; a fan's other pieces have none (stacked, theirs would darken the one) */
  .hs-thumb .hp > :is(.envc, .face)::after { content: ""; position: absolute; left: -14%; right: -14%; top: calc(100% - 1px); height: min(1.5rem, 24cqh); pointer-events: none;
    background: radial-gradient(ellipse 44% 50% at 50% 0, var(--shade), transparent), radial-gradient(ellipse 50% 100% at 50% 0, var(--shade), transparent);   /* (owner, 26/11/2026: stronger and a bit wider; a tighter, darker band along the foot) */ transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .3s ease; }
  .hs-slot:hover .hs-thumb .hp > ::after, .hs-slot:focus-visible .hs-thumb .hp > ::after { transform: translateY(0.375rem) scaleX(.86); opacity: .6; }
  .hs-thumb .hp > .hs-fan-e::after { content: none; }
  .hs-slot { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 auto; width: max-content;
    padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }   /* (a button: chooses the line on show) */
  .hs-slot:focus-visible { outline: none; }   /* focus shows as hover does (the lift, the rose name), its name underlined, instead of a box */
  .hs-thumb { display: block; width: calc(var(--th) * var(--box)); height: var(--th); container-type: size; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
  .hs-thumb .hp { place-items: end center; }
  .hs-thumb .hp > * { box-shadow: var(--shadow-sm); }
  .hs-thumb .hp > .hp-blank-env { box-shadow: none; filter: drop-shadow(0 0.0625rem 0.125rem var(--shade)) drop-shadow(0 0.25rem 0.375rem var(--shade)); }
  .hs-slot:hover .hs-thumb, .hs-slot:focus-visible .hs-thumb { transform: translateY(-0.375rem); }
  .hs-name { display: block; margin-top: 1rem; font-size: 0.9375rem; line-height: 1.4; color: color-mix(in srgb, var(--fg) 78%, var(--bg)); transition: color .2s; }
  .hs-slot:hover .hs-name, .hs-slot:focus-visible .hs-name { color: var(--mark); }
  .hs-slot:focus-visible .hs-name { text-decoration: underline; text-underline-offset: 0.3125rem; }
  /* the line in the spotlight, marked as the menu marks the page on show: the accent, a small lozenge under it */
  .hs-name::after { content: ""; display: block; width: 0.4375rem; height: 0.4375rem; margin: 0.375rem auto 0; background: var(--mark); transform: rotate(45deg); opacity: 0; transition: opacity .3s ease; }
  .hs-slot[aria-checked="true"] .hs-name { color: var(--mark); font-weight: 500; }
  .hs-slot[aria-checked="true"] .hs-name::after { opacity: 1; }
  /* the fan (home.js): the line's other pieces under the slot's own, all in one cell, each turned about a point well under
     them (like a hand of cards: they swing out to the sides) while the slot is pointed at, one after another; folded back
     when it is left */
  .hs-thumb .hp > * { grid-area: 1 / 1; }
  .hs-fan-e { transform-origin: 50% 260%; transform: rotate(0); opacity: 0; transition: transform .5s cubic-bezier(.22, 1, .36, 1) var(--d, 0s), opacity .25s ease var(--d, 0s); }
  .hs-slot.is-fan .hs-fan-e { transform: rotate(var(--a)); opacity: 1; cursor: pointer; }
  /* a fanned piece pointed at: drawn a little out of the hand, keeping its place in the stack (owner, 25/11/2026: not
     brought on top); clicked, it is the one shown (home.js pickFanned). Once the fan is open (.is-open) its pieces answer at once, the opening's stagger off */
  .hs-slot.is-open .hs-fan-e { transition-delay: 0s; }
  .hs-slot.is-fan .hs-fan-e:hover { transform: rotate(var(--a)) translateY(-7%); box-shadow: var(--shadow-lg); }
  /* the slot's own piece turns about the same point: half a step in a hand with no middle place (home.js), else not at all */
  .hs-thumb .hp > :last-child { transform-origin: 50% 260%; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
  .hs-slot.is-fan .hs-thumb .hp > :last-child { transform: rotate(var(--a, 0deg)); }
  /* an open fan lies over everything round it (the next slots, their names, the spotlight's layer), and the slots either
     side of it fade back, so its pieces read clearly where they reach over them (owner, 25/11/2026) */
  .hs-slot { transition: opacity .3s ease; }
  .hs-slot.is-fan { z-index: 2; }
  .hs-row > li:has(> .hs-slot.is-fan) + li > .hs-slot, .hs-row > li:has(+ li > .hs-slot.is-fan) > .hs-slot { opacity: .25; }
  /* a slot of envelopes drawn to scale (home.js: ซองขาว): each in its own shape (its --envc-ratio), --s of the width the
     widest (--mr its shape) has when it fills the slot */
  .hs-thumb .hp[style*="--mr"] > .envc { width: calc(min(100cqw, 100cqh * (var(--mr))) * var(--s)); }
  @media (prefers-reduced-motion: reduce) { .hs-thumb, .hs-fan-e, .hs-thumb .hp > :last-child, .hs-thumb .hp > ::after, .hs-slot { transition: none; } }
  /* with the script (home.js): a piece growing out of its slot passes over the row, and never takes the pointer from it
     (its link's box, the fixed area, still does) */
  .hs.is-live .hs-spot { z-index: 1; }
  .hs.is-live .hs-piece .hp { pointer-events: none; }
  /* a placeholder, once grown into the spotlight, lifts gently (home.js marks the panel is-float; the growth moves its child,
     this its box) */
  @media (prefers-reduced-motion: no-preference) { .hs-spot.is-float .hp[data-piece="placeholder"] { animation: hs-float 5s ease-in-out infinite; } }
  @keyframes hs-float { 50% { transform: translateY(-0.3125rem); } }
  /* an envelope (VIP, ซองขาว) stands lower and smaller than the box: its 3D takes over at the drawing's size and place
     (home.js), and stands with its flap open above it (the VIP's about 0.72 of its height), its measures under and beside
     it; drawn to the box's full height, the open flap would reach into the menu bar. A long one (the white เบอร์ 9) is
     held by the box's width instead */
  .hs-piece .hp[data-piece="env"] > .envc { width: 100cqw; }   /* (its box is the envelope) */
  /* its 3D (home.js go3d) over it. The host is inert (home.js): nothing in it takes the pointer or focus, the
     envelope's own pointer-events: auto (viewer3d.css) included, so a click on it opens the line's page (the link).
     A card's 3D appears on its flat face, which then hides at once; an envelope's fades in as its drawing fades out under
     it (as on its own page) */
  .hs-3d { position: absolute; inset: 0; pointer-events: none; }
  /* its 3D is drawn to the page's scale whatever its host's size (home.js inch), so the host only needs room round the
     piece: a card's to stand and turn; an envelope's for its open flap and card above and its size marks (home.js
     overlay then places it so the body lies on the drawing) */
  .hs-piece:has(> .hp[data-piece="card"]) > .hs-3d { inset: -40% -25%; }
  .hs-piece:has(> .hp[data-piece="env"]) > .hs-3d { inset: -100% -45% -45%; }
  .hs .v3d { pointer-events: none; }
  /* only the 3D object itself takes the pointer (its host reaches past the box, over the text's side): dragged round, its
     card packed or laid flat by a click (viewer3d.js); nothing on it leads away (owner, 18/11/2026) */
  .hs .v3d .env.is-in, .hs .v3d .tent { pointer-events: auto; cursor: grab; }
  .hs-piece.is-3d [data-piece="card"] { visibility: hidden; }
  .hs-piece [data-piece="env"] { transition: opacity .5s ease; }
  /* a chosen envelope's 3D flying in (home.js go3d fly): its drawing never shows; the flight rides over the row (the open
     fan included); its measures appear once it has landed (their own fade, viewer3d.css) */
  .hs-piece.is-fly > .hp { opacity: 0; transition: none; }
  /* no flat placeholder (owner, 25/11/2026): with the scripts running (html.js, set before the first paint) the spotlight's
     flat piece never shows, its 3D fading or flying in instead; it shows only when the 3D fails (.is-flat, html.no-3d), and
     under reduced motion (no 3D is played there). A placeholder line (no 3D at all) keeps its drawing */
  @media (prefers-reduced-motion: no-preference) {
    .js:not(.no-3d) .hs-spot .hs-piece:not(.is-flat) > .hp:not([data-piece="placeholder"]) { opacity: 0; transition: none; }
  }
  /* the name of what is on show (homeShow, home.js capFill), the whole bubble the link to it: a little speech bubble to the
     left of the piece, card or envelope, its tail pointing at it (owner, 25/11/2026: in place of the line under it). Its
     right end at the piece's left edge, a little up from its middle: home.js recentre measures the settled 3D (here the
     flat piece's box, till then). Positioned by translate; its pop and float by transform (they add up); pointed at, it
     grows a touch (scale) and turns rose. Held back while a piece flies in */
  .hs-cap { position: absolute; left: calc(-0.35 * var(--in)); top: 38%; z-index: 2; translate: -100% -50%; white-space: nowrap; pointer-events: auto;
    padding: 0.45em 0.95em 0.5em; border-radius: 1.2em; font-size: 0.64em; line-height: 1.35; color: var(--muted);
    background: color-mix(in srgb, #fff 82%, var(--bg)); filter: drop-shadow(0 0.08em 0.12em rgb(62 40 44 / .12)) drop-shadow(0 0.5em 0.9em rgb(62 40 44 / .14));
    transform-origin: 100% 50%; transition: color .15s, scale .25s cubic-bezier(.34, 1.56, .64, 1); }
  .hs-cap::after { content: ""; position: absolute; left: calc(100% - 0.1em); top: 50%; width: 0.6em; height: 0.8em; translate: 0 -50%; background: inherit; clip-path: polygon(0 0, 100% 50%, 0 100%); }   /* its tail, toward the piece */
  :root[data-theme="ink"] .hs-cap { --accent: #7E4F54; background: #fbf7f6; color: #5E5557; filter: drop-shadow(0 0.1em 0.2em rgb(0 0 0 / .35)) drop-shadow(0 0.5em 1em rgb(0 0 0 / .3)); }   /* (dark: a white bubble, dark text: owner, 25/11/2026) */
  :root[data-theme="ink"] .hs-cap b { color: #1E1B1C; }
  :root[data-theme="ink"] .hs-cap:hover b, :root[data-theme="ink"] .hs-cap:focus-visible b { color: inherit; }
  .hs-cap b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; transition: color .15s; }
  .hs-cap:hover, .hs-cap:focus-visible { color: var(--accent); scale: 1.05; }
  .hs-cap:hover b, .hs-cap:focus-visible b { color: inherit; }
  .hs-cap:focus-visible { outline: 2px solid var(--accent); outline-offset: 0.2em; }
  .hs-piece.is-fly > .hs-cap { opacity: 0; transition: none; }
  /* with the script it arrives last, once the piece has settled (home.js capIn): it pops out of its tail with a little
     bounce, then floats gently; under reduced motion it only fades in */
  .hs.is-live .hs-cap:not(.is-in) { opacity: 0; pointer-events: none; }
  /* (then still: an endless 2 px bob after it made the browser restyle the page every frame: 26/11/2026, desktop performance) */
  .hs.is-live .hs-cap.is-in { animation: cap-pop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
  @keyframes cap-pop { from { opacity: 0; transform: scale(.35) rotate(-6deg); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .hs.is-live .hs-cap.is-in { animation: cap-fade .3s ease both; } }
  @keyframes cap-fade { from { opacity: 0; } }
  .hs.is-live .hs-spot:has(> .hs-piece.is-fly) { z-index: 3; }
  .hs .hs-3d.is-flying .v3d-dims { opacity: 0; transition: none; }
  .hs-piece [data-piece="env"] + .hs-3d { opacity: 0; transition: opacity .6s ease; }
  .hs-piece.is-3d [data-piece="env"] { opacity: 0; }
  .hs-piece.is-3d [data-piece="env"] + .hs-3d { opacity: 1; }
}

/* short screens: the about text tightens a little so it fits without scrolling */
@media (min-width: 768px) and (max-height: 800px) {
  .about-text { line-height: 1.7; font-size: 0.875rem; }
  .about-text h1 { margin-bottom: 0.75rem; }
  .about-text h1 + p { font-size: 0.9688rem; line-height: 1.7; }
  .about-text p { margin-bottom: 0.625rem; }
  .about-text .tagline { margin-top: 0.75rem; }
}

@media (max-width: 767px) {
  html, body { height: auto; }
  body { min-height: 100svh; }   /* short pages still fill the screen, so the background glow has no seam */
  .topbar { flex-wrap: wrap; gap: 0.5rem 0; padding: 0.5rem 1rem; }   /* (no gap across: the top row's buttons are 44 px boxes, spaced by their own) */
  /* (the top bar, the search with it, stays at the top while the page scrolls: owner, 26/11/2026; the page shows faintly
     through it; a link to a design on the page stops below it) */
  .topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(0.625rem); backdrop-filter: blur(0.625rem); }
  html { scroll-padding-top: 7rem; }
  .top-end { display: contents; }
  /* (finger-sized: 44 px tall targets for the contact links, the theme and menu buttons, the menu's links; owner, 26/11/2026:
     the phone polish. The contact links are the shop's phone lines: a tap calls) */
  /* (a phone: the contact row as three icons in the top row, map, LINE, phone, before the theme and menu buttons: owner,
     26/11/2026; a tap opens Google Maps, the LINE app's add-friend page, the dialler with the number in; the second number
     is on the About page) */
  .contact { margin-left: auto; gap: 0; color: var(--fg); }
  .contact a { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; }
  .contact span, .contact .contact-tel2 { display: none; }
  .contact .ci { display: block; width: 1.375rem; height: 1.375rem; }
  .contact-line .ci { fill: currentColor; }
  .contact-tel .ci, .contact-map svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .contact-map svg { width: 1.375rem; height: 1.375rem; }
  #theme-toggle, #menu-toggle { min-width: 2.75rem; min-height: 2.75rem; }
  .nav-panel li { padding: 0; }
  .nav-panel a { min-height: 2.75rem; }
  #menu-toggle { display: inline-block; }
  #nav { display: none; }
  body.is-open #nav { display: block; }
  .nav-bar { flex-direction: column; padding: 0.5rem 1rem 1rem; }
  .nav-item > a, .nav-top { padding: 0.5625rem 0; height: auto; }
  .nav-top { pointer-events: none; font-weight: 600; color: var(--accent); }
  .nav-top::after, .nav-item > a[aria-current="page"]::before, .nav-item.is-here > .nav-top::before { display: none; }
  .nav-panel, .nav-mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: none; padding: 0 0 0.375rem 0.875rem; min-width: 0; border-radius: 0; }
  .nav-mega, .nav-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
  .nav-cols .nav-col { padding: 0; } .nav-cols .nav-col + .nav-col { border-left: 0; }
  main { padding: 1rem; }
  main > h1 { font-size: 1.5rem; margin-bottom: 0.875rem; }
  .search-wrap { order: 5; flex: 1 1 100%; min-width: 0; }
  #search { width: 100%; }
  .home, .about { grid-template-rows: none; padding: 2rem 0; }
  .wordmark { width: 5.875rem; height: 2.375rem; }
  .about address { grid-template-columns: 1fr; }
  .about-text { overflow: visible; }
  .tagline { font-size: 1.1875rem; }
  .grid { overflow: visible; -webkit-mask-image: none; mask-image: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0.25rem 0 1rem; gap: 1.25rem 0.875rem; }
  .grid.grid-few > li { flex-basis: calc(50% - 0.4375rem); }
  .grid.grid-few .code { font-size: 1.0625rem; }   /* (a phone's small tiles: the gallery's own size) */   /* (two a row as every gallery; an odd last one centred) */
}
@media (max-width: 359px) {   /* (a very narrow phone: the top row's five buttons and the logo still on one line) */
  .wordmark { width: 4.75rem; }
  .contact a { min-width: 2.25rem; }
}



/* Design pop-up */
#viewer {
  position: fixed; inset: 0; z-index: 20; background: inherit;   /* (the page's: its mood, glows and wash; owner, 25/11/2026) */
  /* picture and details are one group centred on the screen (the menu is hidden behind the pop-up, so nothing to offset) */
  display: flex; justify-content: center; align-items: center; gap: 3.5rem; padding: 3.5rem 4rem 2.5rem;
  animation: v-in .18s ease;
}
@keyframes v-in { from { opacity: 0; } }
.v-close { position: absolute; top: 0.75rem; right: 1.25rem; }
/* the picture box takes the photo's own shape (set from the photo; 5:4 is the most common), so no empty band pushes the details away */
.v-photos { min-height: 0; min-width: 0; height: 100%; flex: 0 1 auto; aspect-ratio: var(--ar, 1.25); display: flex; gap: 1.25rem; align-items: center; justify-content: center; }
.v-photos { position: relative; }
.v3d-host { position: absolute; inset: 0; z-index: 1; }
#viewer.is-env-fly .v3d-host { z-index: 3; }
#viewer > .arcs { position: absolute; z-index: -1; }   /* (its foil arcs, under everything in it: viewer.js) */
#viewer > .arcs i { opacity: .45; }   /* (fainter there: one passes behind the details) */   /* the envelope travelling to or from its swatch: in front of the details (viewer.js) */
/* the 3D card may grow past the photo's box when zoomed (only the screen edge clips it); the details and close stay on top */
#viewer .v3d { overflow: visible; }
#viewer { overflow: hidden; }
.v-close { z-index: 3; }
/* the brand in the pop-up too (owner, 25/11/2026): the logo in its metal, at the top left, opposite the close button */
.v-brand { position: absolute; top: 0.55rem; left: 1.75rem; z-index: 3; width: 5.4rem; height: 2.2rem; pointer-events: none; }   /* (clear of the photo below it) */
@media (max-width: 767px) { .v-brand { left: 1rem; width: 5.5rem; height: 2.25rem; } }
/* the card in the photo, clickable for the 3D view: lit up with a "ดูแบบ 3D" label on hover / keyboard focus */
.v-hot { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.v-hot .v-card { pointer-events: all; cursor: pointer; outline: none; fill: rgb(255 255 255 / 0); stroke: rgb(255 255 255 / 0); stroke-width: 2; vector-effect: non-scaling-stroke;
  transition: fill .25s ease, stroke .25s ease; }
.v-hot .v-card:hover, .v-hot .v-card:focus-visible { fill: rgb(255 255 255 / .14); stroke: rgb(255 255 255 / .9); }
.v-hint { pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.v-hint rect { fill: rgb(30 27 28 / .72); }
.v-hint text { fill: #fff; font-family: var(--font-body); font-weight: 500; }
.v-hot .v-card:hover + .v-hint, .v-hot .v-card:focus-visible + .v-hint, .v-hot.is-hint .v-hint { opacity: 1; }
.v-glint { pointer-events: none; }
.v-trace { pointer-events: none; fill: none; stroke: #fff6dc; stroke-dasharray: 22 78; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 0.25rem rgb(255 236 180 / .9)); }
.v-photos .v-main.is-melting { opacity: 0; transition: opacity .5s ease .2s; }   /* the photo melts away as the 3D card takes over */
/* sample text (on by default): filled while it shows ("ซ่อนข้อความ"), plain outline once hidden ("แสดงข้อความ") */
.v-text { display: block; margin: 0.3em 0 0.9em; padding: 0.38em 1.08em; border: 1px solid var(--rule); border-radius: 62.4375rem; font-size: 0.8125em; }
.v-text[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.v-photos img { min-width: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0.1875rem; filter: drop-shadow(0 1.125rem 1.625rem rgb(62 40 44 / .3)) drop-shadow(0 0.125rem 0.1875rem rgb(62 40 44 / .12)); }
:root[data-theme="ink"] .v-photos img { filter: drop-shadow(0 1.125rem 1.625rem rgb(0 0 0 / .6)) drop-shadow(0 0.125rem 0.1875rem rgb(0 0 0 / .3)); }
.v-main { flex: 1 1 0; width: 100%; height: 100%; }
.v-env { flex: 2 1 0; }
/* the details beside the photo grow with the window's width too, not only its height (the site's base size): on a wide
   monitor the photo is huge and the text was left small (owner, 16/11/2026). Everything in the column is in em of this. */
.v-side { font-size: clamp(1rem, 0.55rem + 0.7vw, 1.5rem); flex: 0 0 18em; align-self: center; max-height: 100%; overflow-y: auto; scrollbar-width: none; position: relative; z-index: 2; }
.v-side::-webkit-scrollbar { display: none; }
/* the details (viewer.js render; owner, 25/11/2026: mock-up B2 with B1's top and envelope card): the design's number large
   ("No." small before it), the item under it, then the facts as a table, a hairline under each row, the label grey at the
   left and the value at the right; then the envelope that goes with it as a card of its own */
.v-no { display: flex; align-items: baseline; gap: 0.3em; margin: 0 0 0.3em; line-height: 1; }
.v-no small { color: var(--muted); font-size: 0.8em; }
.v-no b { font-size: 2.6em; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.v-no.is-name b { display: block; font-size: 1.7em; line-height: 1.3; white-space: pre-line; text-wrap: balance; }   /* (a product's name: a size smaller than a number, its own line breaks kept) */
.v-title { margin: 0 0 0.85em; font-size: 1.05em; font-weight: 500; line-height: 1.4; }
.v-specs { margin: 0 0 1em; border-top: 1px solid color-mix(in srgb, var(--fg) 26%, transparent); }
.v-specs div { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; padding: 0.5em 0.15em; border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.v-specs dt { color: var(--muted); font-size: 0.85em; }
.v-specs dd { margin: 0; font-weight: 500; text-align: right; }
/* the matching envelope: a small swatch under the details (viewer.js envSwatch); a click brings it into the 3D view */
.v-envsw { position: relative; display: flex; align-items: center; gap: 0.9em; width: 100%; margin: 0 0 1em; padding: 0.65em; border: 0; border-radius: 0.6em; text-align: left; color: inherit;
  background: color-mix(in srgb, #fff 45%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); }
/* dark: a pane a step lighter than the page, not white (its light text was nearly lost on it) */
:root[data-theme="ink"] .v-envsw { background: color-mix(in srgb, var(--fg) 7%, transparent); }
:root[data-theme="ink"] button.v-envsw:hover, :root[data-theme="ink"] button.v-envsw:focus-visible { background-color: color-mix(in srgb, var(--accent) 14%, color-mix(in srgb, var(--fg) 7%, transparent)); }
.v-envsw-img { display: block; flex: none; width: 5.5em; background: #f7f6f2 no-repeat; border-radius: 0.125rem; box-shadow: var(--shadow-sm); transition: opacity .25s ease; }
.v-envsw-words { display: grid; min-width: 0; line-height: 1.4; }
.v-envsw-words small { color: var(--muted); font-size: 0.78em; }
.v-envsw-words b { font-weight: 500; }
.v-envsw-go { display: inline-flex; align-items: center; gap: 0.5em; margin-top: 0.15em; color: var(--accent); font-size: 0.85em; }
.v-envsw-go::after { content: ""; width: 0.42em; height: 0.42em; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.v-envsw-img.is-drawn { background: none; box-shadow: none; }   /* a drawn plain envelope (viewer.js envDraw): it has its own shadow */
button.v-envsw { cursor: pointer; transition: background-color .15s; }
button.v-envsw:hover, button.v-envsw:focus-visible { background-color: color-mix(in srgb, var(--accent) 9%, rgb(255 255 255 / .45)); }
button.v-envsw:hover .v-envsw-go::after, button.v-envsw:focus-visible .v-envsw-go::after { transform: translateX(0.1875rem) rotate(45deg); }
.v-envsw.is-gone .v-envsw-img { opacity: 0; }   /* its envelope out in 3D: the swatch gone from the card, the card stays */
.v-thumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.v-thumbs button { padding: 0; width: 3.5em; opacity: .6; transition: opacity .15s; }
.v-thumbs button:hover, .v-thumbs button[aria-current] { opacity: 1; }
.v-thumbs img { display: block; width: 100%; height: auto; border-radius: 0.125rem; box-shadow: var(--shadow-sm); }
.v-nav button { font-size: 1.4em; min-width: 1.8em; min-height: 1.8em; }   /* previous / next, in step with the text */

@media (max-width: 767px) {
  #viewer { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 1rem; padding: 3.5rem 1rem 1.5rem; overflow-y: auto; }
  .v-photos { gap: 0.625rem; height: auto; flex: none; aspect-ratio: auto; }   /* (the 3D card stays in this box: no growing, owner 26/11/2026) */
  /* finger-sized: previous / next, the close button, the text toggle */
  .v-nav button { min-width: 2.75rem; min-height: 2.75rem; font-size: 1.375rem; }
  /* the close button stays at the top while the details scroll; previous / next float at the bottom corners, in the
     thumb's reach, as round buttons on the page's colour (owner, 26/11/2026: the phone polish); room kept under the details */
  .v-close { position: fixed; top: 0.5rem; right: 0.75rem; min-height: 2.75rem; padding: 0 0.875rem; border-radius: 1.375rem; background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: var(--shadow-sm); }
  #viewer { padding-bottom: 5.5rem; }
  .v-nav { position: fixed; left: 0; right: 0; bottom: max(0.875rem, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; padding: 0 0.875rem; pointer-events: none; z-index: 4; }
  .v-nav button { pointer-events: auto; width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: var(--shadow-sm); }
  .v-nav button:disabled { opacity: .35; }
  .v-text { padding: 0.5rem 1rem; }
  .v-photos img { height: auto; max-height: 45vh; }
  .v-side { font-size: 1rem; flex: none; align-self: start; max-height: none; overflow: visible; }   /* a phone: the site's own size */
}
