/* ennea.css: v0.12 (pink from น้องมะเขือ mixed in, so it is not all one colour); was v0.11 "night garden of น้องมะม่วง". Same family as SETHKORLUS (night sky, glass cards, pill buttons,
   Chonburi (titles + h1-h3) / IBM Plex Sans Thai / Cinzel, gold codes), recoloured to her palette: lavender purple, black and pearl white.
   Every colour and font comes from these tokens. Night only, like sethkorlus.com. */
:root {
  --night: #0d0817;                                  /* page base, deeper and blacker than SETHKORLUS #1C0B2B: her black dress */
  --sky: radial-gradient(55% 32% at 82% 10%, rgba(190, 140, 255, 0.30), transparent 70%), radial-gradient(50% 30% at 8% 34%, rgba(255, 120, 196, 0.16), transparent 70%), radial-gradient(70% 40% at 60% 78%, rgba(150, 96, 230, 0.16), transparent 72%), radial-gradient(120% 70% at 50% 0, #34195e, #1b0d33 55%, #0a0614);
  --surface: rgba(255, 255, 255, 0.05);              /* glass card */
  --surface-2: rgba(255, 255, 255, 0.08);
  --solid: #1b1129;                                   /* pop-up and anything that must not show the sky through */
  --ink: #f8f3ff;                                     /* pearl white */
  --muted: #c6b8de;                                   /* lilac */
  --line: rgba(214, 190, 255, 0.18);
  --accent: #c6a4ff;                                  /* lavender: her hair */
  --accent-2: #9a6ae6;
  --accent-deep: #6b3fa0;
  --accent-ink: #170a26;
  --accent-soft: rgba(198, 164, 255, 0.14);
  --glow: rgba(168, 120, 255, 0.45);
  --pink: #f0389a;                                    /* น้องมะเขือ's pink from sethkorlus.com, for hearts, names and glows */
  --pink-soft: #ffb8dc;
  --pink-glow: rgba(240, 56, 154, 0.4);
  --gold: #ffd27a;                                    /* codes, as type codes on sethkorlus.com */
  --pearl: #fff7fd;
  --fair: #ffc46b;
  --fair-soft: rgba(255, 196, 107, 0.12);
  --dim: #8f82a8;
  --pill: linear-gradient(135deg, #e6d2ff, #b48af2 45%, #ff6fb8);
  --font-display: "Chonburi", "IBM Plex Sans Thai", serif;
  --font-head: "IBM Plex Sans Thai", system-ui, sans-serif;   /* buttons, chips: same as SETHKORLUS (.btn uses the body font) */
  --font-body: "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-latin: "Cinzel", serif;
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { margin: 0; }
html { background: var(--night); }
body { background: transparent; color: var(--ink); font: 400 1rem/1.72 var(--font-body); -webkit-text-size-adjust: 100%; min-height: 100vh; position: relative; }
/* stars: two still layers of small dots, the second one twinkles */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body::before { background:
  radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 12%, #e9dcff 50%, transparent 51%),
  radial-gradient(1.4px 1.4px at 40% 34%, #ffe7b0 50%, transparent 51%), radial-gradient(1px 1px at 88% 46%, #fff 50%, transparent 51%),
  radial-gradient(1.2px 1.2px at 24% 66%, #ff9fd0 50%, transparent 51%), radial-gradient(1px 1px at 64% 78%, #fff 50%, transparent 51%),
  radial-gradient(1.3px 1.3px at 6% 90%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 94% 86%, #ffe7b0 50%, transparent 51%); opacity: 0.8; }
body::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='none' stroke='%23d9c2ff' stroke-width='1.2' opacity='.55'%3E%3Cpath d='M40 30q2 10 12 12q-10 2-12 12q-2-10-12-12q10-2 12-12z'/%3E%3Cpath d='M190 150q1.5 7 8 8.5q-6.5 1.5-8 8.5q-1.5-7-8-8.5q6.5-1.5 8-8.5z'/%3E%3C/g%3E%3Cpath d='M120 214c-4-6-12-3-9 4l9 8 9-8c3-7-5-10-9-4z' fill='%23ff9fd0' opacity='.28'/%3E%3Cpath d='M222 52c-2.5-4-8-2-6 2.5l6 5 6-5c2-4.5-3.5-6.5-6-2.5z' fill='%23c9a6ff' opacity='.3'/%3E%3Ccircle cx='96' cy='120' r='1.4' fill='%23fff' opacity='.6'/%3E%3Ccircle cx='238' cy='232' r='1.2' fill='%23ffe7b0' opacity='.6'/%3E%3C/svg%3E") 0 0 / 260px 260px,
  radial-gradient(1.6px 1.6px at 30% 8%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 58% 22%, #ffb8dc 50%, transparent 51%),
  radial-gradient(1.6px 1.6px at 70% 56%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 16% 44%, #ffe7b0 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 48% 92%, #fff 50%, transparent 51%); opacity: 0.6; }
.bar, main { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.3; text-wrap: balance; margin: 0; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.25; text-shadow: 0 0 28px var(--glow); }
h2 { font-size: 1.12rem; color: #ffd6ec; }
h3 { font-size: 0.95rem; color: var(--accent); }
p { margin: 0; }
a { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.screen:focus { outline: none; }

.bar { position: sticky; top: 0; z-index: 16; display: flex; align-items: center; gap: 6px; max-width: 760px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; white-space: nowrap; } /* same as the SETHKORLUS Jung page header */
.brand .bt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand #brand { font: 400 0.92rem var(--font-display); color: #fff; overflow: hidden; text-overflow: ellipsis; }
.brand .bt small { font: 400 0.56rem var(--font-display); letter-spacing: 0.14em; color: var(--pink); margin-top: 2px; }
.mark { width: 30px; height: 30px; flex: none; fill: none; stroke: #e8a3ff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(242, 200, 107, 0.35)); }
@media (min-width: 600px) { .mark { width: 34px; height: 34px; } .brand { gap: 10px; } .brand #brand { font-size: 1.02rem; } }
@media (max-width: 340px) { .brand .bt small { display: none; } }
.chip { border: 1px solid rgba(255, 255, 255, 0.25); background: var(--surface-2); border-radius: 999px; padding: 4px 16px; min-height: 36px; cursor: pointer; font: 500 0.9rem var(--font-head); color: var(--ink); }
.chip:hover { border-color: var(--accent); }

main { max-width: 760px; margin: 0 auto; padding: 6px 16px 72px; display: grid; gap: 22px; }
.kicker { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; }
.lead { font-size: 1.08rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.stack { display: grid; gap: 12px; }
.list { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.list li::marker, .portrait li::marker { content: "♡  "; color: var(--pink-soft); font-size: 0.8em; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.note { border: 1px solid rgba(255, 210, 122, 0.4); background: var(--fair-soft); border-radius: 14px; padding: 10px 14px; font-size: 0.9rem; color: #ffe9c2; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border: 0; background: var(--pill); color: var(--accent-ink); border-radius: 999px; padding: 13px 24px; min-height: 48px; font: 500 1rem var(--font-head); cursor: pointer; box-shadow: 0 8px 26px var(--pink-glow); transition: transform 0.2s var(--pop), box-shadow 0.2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 32px var(--pink-glow); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: none; }
.btn.ghost:hover { border-color: var(--pink-soft); }
.btn:disabled { opacity: 0.45; cursor: default; }
.link { background: none; border: 0; padding: 8px 4px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; cursor: pointer; min-height: 40px; }
.link:hover { color: var(--ink); }
.link:disabled { opacity: 0.4; cursor: default; }

/* the nine-point figure */
.figure { width: 100%; max-width: 220px; height: auto; display: block; overflow: visible; }
.figure .ring { fill: none; stroke: rgba(214, 190, 255, 0.35); stroke-width: 1.5; }
.figure .lines { fill: none; stroke: rgba(214, 190, 255, 0.3); stroke-width: 1.2; stroke-linejoin: round; }
.figure .pt { fill: var(--night); stroke: var(--accent); stroke-width: 1.5; }
.figure .pt.on { fill: var(--gold); stroke: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 210, 122, 0.8)); }
.figure .pt.wing { stroke: var(--gold); stroke-width: 3; }
.figure text { font: 600 13px var(--font-latin); fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.figure text.on { fill: var(--gold); }
.intro-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.intro-head .figure { max-width: 120px; filter: drop-shadow(0 0 14px rgba(168, 120, 255, 0.35)); }

/* card screen */
.progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--pill); box-shadow: 0 0 10px var(--pink-glow); transition: width 0.4s var(--ease); }
.meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.meta span:last-child { white-space: nowrap; }
.meta .why { display: block; font-size: 0.78rem; opacity: 0.8; }
.journey .ms.now { text-shadow: 0 0 8px rgba(255, 60, 90, 0.9); }
.moment { font: 500 1.28rem/1.55 var(--font-head); }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-height: 56px; cursor: pointer; line-height: 1.55; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--pop); }
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt:active { transform: scale(0.985); }
.opt .mk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent); display: block; }
.opt:hover .mk { background: var(--accent-soft); box-shadow: 0 0 8px var(--glow); }
.opt:active .mk { background: var(--accent); }
.opt.none { display: block; text-align: center; background: rgba(255, 255, 255, 0.06); border-style: dashed; border-color: rgba(255, 184, 220, 0.35); color: var(--ink); opacity: 0.85; min-height: 48px; padding: 10px 16px; margin-top: 2px; }
.opt.none:hover { opacity: 1; background: var(--accent-soft); }
.hint { font-size: 0.85rem; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; }

/* portraits */
.options { display: grid; gap: 12px; }
.option { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; display: grid; gap: 8px; }
.option:hover { border-color: var(--accent); background: var(--accent-soft); }
.option .name { font-family: var(--font-head); font-weight: 500; color: var(--pink-soft); }
.option ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }

/* result */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* result: one row of codes, three dots under each; a tap opens the pop-up below, pointing at the code */
.code { position: relative; background: var(--surface); border: 1px solid rgba(255, 210, 122, 0.35); border-radius: var(--radius); padding: 10px 8px; box-shadow: 0 0 40px rgba(240, 56, 154, 0.14) inset, 0 0 24px rgba(168, 120, 255, 0.12); }
.toks { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 4px; align-items: flex-end; }
.tok { display: grid; justify-items: center; gap: 8px; min-width: 56px; min-height: 44px; padding: 8px 10px 10px; background: transparent; color: var(--ink); border: 1px solid transparent; border-radius: 14px; cursor: pointer; font: inherit; }
.tok .tk { font-family: var(--font-latin); font-weight: 700; font-size: 2rem; line-height: 1.1; letter-spacing: 0.03em; color: var(--gold); text-shadow: 0 0 18px rgba(255, 210, 122, 0.45); }
.tok .tk.long { font-size: 1.4rem; line-height: 1.6; } /* 2026-11-21: a stacked subtype (sx/so) keeps the row on one line on a 360px phone */
.tok:hover, .tok[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line); }
.tok:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pop { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 5; display: grid; gap: 8px; padding: 14px 16px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 40px rgb(0 0 0 / 0.5); transform-origin: var(--x, 50%) top; }
.pop[hidden] { display: none; }
.pop::before { content: ""; position: absolute; top: -7px; left: var(--x, 50%); width: 12px; height: 12px; margin-left: -6px; background: var(--solid); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.pop h2 { font-size: 1.1rem; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; display: block; }
.dots i.f { background: currentColor; box-shadow: 0 0 6px currentColor; }
.dots.clear { color: var(--accent); }
.dots.fair { color: var(--fair); }
.dots.unclear { color: var(--dim); }
.clarity .dots { color: inherit; gap: 3px; }
.clarity { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; border-radius: 999px; padding: 3px 12px 3px 10px; width: fit-content; }
.clarity.clear { background: var(--accent-soft); color: var(--accent); }
.clarity.fair { background: var(--fair-soft); color: var(--fair); }
.clarity.unclear { background: transparent; color: var(--dim); border: 1px solid var(--line); }
.tagline { font-size: 0.85rem; color: var(--fair); }
.portrait { display: grid; gap: 8px; margin: 0; padding-left: 1.3em; }
#overview { border-color: rgba(255, 184, 220, 0.3); background: linear-gradient(160deg, rgba(240, 56, 154, 0.1), rgba(198, 164, 255, 0.08) 45%, rgba(255, 255, 255, 0.03)); }
#overview h3 { margin-top: 4px; color: var(--pink-soft); }
/* 2026-11-21 (owner: easier to read): the overview is one portrait in short paragraphs; .nw keeps a short Thai phrase on one line */
#overview .mix { display: grid; gap: 12px; }
#overview .nw { white-space: nowrap; }
.ev { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.ev:first-of-type { border-top: 0; padding-top: 0; }
.ev .q { color: var(--muted); font-size: 0.9rem; }
.ev .a { font-weight: 500; }
.ev .link { justify-self: start; padding-left: 0; }
.lenses { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lens { display: grid; gap: 4px; }
.lens .bar2 { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.lens .bar2 > i { display: block; height: 100%; background: var(--pill); }
.lens.off .bar2 > i { background: var(--fair); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
details > summary { cursor: pointer; font-family: var(--font-head); font-weight: 500; }
details > summary::marker { color: var(--pink-soft); }
details[open] > summary { margin-bottom: 10px; }
.core { display: grid; grid-template-columns: 9rem 1fr; gap: 6px 14px; margin: 0; }
.core dt { color: var(--muted); }
.core dd { margin: 0; }
.confirm { display: grid; gap: 10px; }
.toast { font-size: 0.85rem; color: var(--accent); min-height: 1.3em; }

/* น้องมะม่วง: avatar and one-line speech bubble; the avatar is mamuang.webp when the file exists, else the heart-and-bow mark */
.say { display: flex; align-items: flex-end; gap: 10px; }
.avatar { flex: none; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #4a2559, #1a0f2b); border: 2px solid var(--accent); box-shadow: 0 0 18px var(--pink-glow); overflow: hidden; display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar svg { width: 60%; height: 60%; }
.avatar .hr { fill: var(--pink); } .avatar .bw { fill: var(--pearl); }
.who { color: var(--pink-soft); font: 500 0.8rem/1.2 var(--font-head); }
.bubble { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 14px; display: grid; gap: 2px; min-width: 0; }
.bubble p { font-size: 0.98rem; line-height: 1.45; overflow-wrap: anywhere; }

/* the nine characters */
.emblem { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 55%, #2a1450), #140b26 75%); border: 2px solid var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.charfig { display: block; width: 100%; max-width: 170px; aspect-ratio: 200 / 250; margin: 0 auto; }
.charfig svg { width: 100%; height: 100%; display: block; overflow: visible; }
.charcard { position: relative; }
.charcard .num { position: absolute; top: 8px; left: 12px; font: 700 1.1rem var(--font-latin); color: var(--gold); text-shadow: 0 0 8px rgba(255, 210, 122, 0.5); }
.charstage { border-radius: var(--radius); background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--c) 22%, transparent), transparent 75%); }
.charstage .charfig { max-width: 300px; }
.emblem .em { font-size: 1.9rem; line-height: 1; }
.emblem b { position: absolute; right: 2px; bottom: 0; font: 700 0.85rem var(--font-latin); color: var(--gold); text-shadow: 0 0 6px #000; }
.emblem.sm { width: 42px; height: 42px; } .emblem.sm .em { font-size: 1.25rem; } .emblem.sm b { font-size: 0.7rem; }
.emblem.lg { width: 96px; height: 96px; } .emblem.lg .em { font-size: 2.8rem; } .emblem.lg b { font-size: 1.1rem; right: 8px; bottom: 4px; }
.avatar .em { font-size: 1.7rem; line-height: 1; }
.chargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.charcard { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 16px 12px; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s, transform 0.2s var(--pop), background 0.2s; }
.charcard:hover { border-color: var(--c); transform: translateY(-2px); background: color-mix(in srgb, var(--c) 8%, transparent); }
.charcard .cn { font: 500 0.98rem/1.35 var(--font-head); color: var(--c); }
.charcard .small { line-height: 1.45; }
.charlink { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(255, 184, 220, 0.3); color: var(--ink); text-decoration: none; font-family: var(--font-head); }
.charlink:hover { border-color: var(--pink-soft); }
.charhead { gap: 4px; }
.charpage h1 { color: var(--c); font-size: clamp(1.6rem, 6vw, 2.2rem); text-shadow: 0 0 24px color-mix(in srgb, var(--c) 50%, transparent); }
.charpage .panel h2 { color: var(--c); }
.charpage .back { justify-self: start; padding-left: 0; }
.charnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.charnav a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--font-latin); color: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent); text-decoration: none; }
.charnav a[aria-current] { background: var(--c); color: var(--accent-ink); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

@media (max-width: 420px) {
  .chargrid { grid-template-columns: 1fr 1fr; }
  .moment { font-size: 1.16rem; }
  .core { grid-template-columns: 1fr; }
  .tok .tk { font-size: min(1.75rem, 8.4vw); }
  /* 2026-11-22: the code row (5 w4·6 Sx/So 514) stays on one line down to a 280px screen */
  .toks { flex-wrap: nowrap; gap: 2px; }
  .tok { min-width: 0; padding: 8px 6px 10px; }
  .tok .tk.long { font-size: min(1.4rem, 6.2vw); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .mk-holding .mk-hold circle { animation: none !important; stroke-dashoffset: 0; }
  html.mk-tuck .mk-dock, html.mk-tuck .mk-fab, html.mk-tuck .mk-pill { translate: none; opacity: 0.55; }
}
@media (prefers-reduced-motion: no-preference) {
  .screen { animation: rise 0.5s var(--ease); }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; filter: none; } }
  .pop { animation: pop 0.22s var(--pop); }
  @keyframes pop { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: none; } }
  body::after { animation: twinkle 4.5s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.85; } }
  .say .avatar { animation: float 4s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-3px); } }
}

/* น้องมะม่วง's corner (v0.16), drawn after the SETHKORLUS Jung page: missions pill bottom left, star-jar pill bottom right,
   her face above it with a one-line bubble, a mission card at the top, and bottom sheets */
main { padding-bottom: 150px; }
.mk-corner > * { z-index: 30; }
.mk-pill { position: fixed; left: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; max-width: min(270px, calc(100vw - 150px)); padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(30, 18, 46, 0.92); border: 1px solid rgba(255, 210, 122, 0.55); color: var(--ink); cursor: pointer; text-align: left; box-shadow: 0 6px 22px rgb(0 0 0 / 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mk-pi { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: radial-gradient(circle at 50% 35%, #5a3a2a, #2a1a14); border: 1.5px solid var(--gold); }
.mk-pi i { position: absolute; top: -4px; right: -4px; width: 17px; height: 17px; border-radius: 50%; background: #ff4d6d; color: #fff; font: 700 0.7rem/17px var(--font-head); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #1e122e; }
.mk-pt { min-width: 0; display: grid; }
.mk-pt small { color: var(--gold); font: 500 0.72rem/1.25 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-pt b { font: 500 0.88rem/1.3 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-fab { position: fixed; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ff6fb8, var(--pink) 55%, #c81f7f); color: #fff; font: 500 0.98rem var(--font-head); cursor: pointer; box-shadow: 0 8px 26px var(--pink-glow); }
.mk-fi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff3fa; font-size: 1rem; }
.mk-dock { position: fixed; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 8px; max-width: calc(100vw - 20px); pointer-events: none; transition: translate 0.5s cubic-bezier(.34, 1.56, .64, 1) 0.05s, opacity 0.25s; }
.mk-dock.mk-dl { right: auto; left: 10px; flex-direction: row-reverse; }
.mk-dock.mk-dl .mk-say { border-radius: 18px 18px 18px 4px; }
.mk-dock.mk-drag { transition: none !important; }
.mk-dock.mk-drag .mk-av { cursor: grabbing; animation: none; }
html.mk-tuck .mk-dock { translate: calc(100% + 34px) 0; opacity: 0; transition: translate 0.32s ease-in, opacity 0.25s; }
html.mk-tuck .mk-dock.mk-dl { translate: calc(-100% - 34px) 0; }
html.mk-tuck .mk-fab { translate: calc(100% + 24px) 0; opacity: 0; }
html.mk-tuck .mk-pill { translate: calc(-100% - 24px) 0; opacity: 0; }
.mk-fab, .mk-pill { transition: translate 0.5s cubic-bezier(.34, 1.56, .64, 1) 0.05s, opacity 0.25s; }
html.mk-tuck .mk-fab, html.mk-tuck .mk-pill { transition: translate 0.32s ease-in, opacity 0.25s; }
.mk-dock > * { pointer-events: auto; }
.mk-av { position: relative; flex: none; width: 60px; height: 60px; padding: 0; border-radius: 50%; overflow: visible; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; background: #d9c8f2; border: 3px solid #ff9fd0; box-shadow: 0 0 0 2px #2a1838, 0 6px 22px var(--pink-glow); }
.mk-face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.mk-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; pointer-events: none; -webkit-user-drag: none; }
/* hold her face to go home: the ring fills in 0.9 s, as on Makhuea */
.mk-hold { position: absolute; left: -12px; top: -12px; width: calc(100% + 24px); height: calc(100% + 24px); pointer-events: none; opacity: 0; transform: rotate(-90deg); transition: opacity 0.15s; }
.mk-hold circle { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 4px rgba(255, 121, 191, 0.9)); }
.mk-holding .mk-hold { opacity: 1; }
.mk-holding .mk-hold circle { animation: mkHold 0.9s linear forwards !important; }
@keyframes mkHold { to { stroke-dashoffset: 0; } }
.mk-say { max-width: 230px; margin: 0 0 8px; background: #fff; color: #2a1838; border-radius: 18px 18px 4px 18px; padding: 9px 14px; font-size: 0.92rem; line-height: 1.4; box-shadow: 0 6px 20px rgb(0 0 0 / 0.35); }
.mk-say[hidden] { display: none; }
html.mk-quiet .mk-pill, html.mk-quiet .mk-fab { display: none; }
html.mk-quiet .mk-dock { bottom: calc(12px + env(safe-area-inset-bottom)); }
.mk-toast { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; margin: 0 auto; width: min(440px, calc(100vw - 20px)); display: grid; grid-template-columns: 44px 1fr 32px; gap: 10px; align-items: start; padding: 10px 10px 10px 12px; border-radius: 18px; background: rgba(36, 22, 52, 0.97); border: 1px solid rgba(255, 210, 122, 0.55); box-shadow: 0 12px 34px rgb(0 0 0 / 0.5); }
.mk-toast[hidden] { display: none; }
.mk-tf { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: #d9c8f2; }
.mk-tf img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.mk-toast small { display: block; color: var(--gold); font: 500 0.78rem var(--font-head); }
.mk-toast b { display: block; font: 500 0.98rem/1.35 var(--font-head); }
.mk-toast em { display: block; font-style: normal; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.mk-toast button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.mk-sheet { width: min(480px, calc(100vw - 16px)); max-height: 88vh; overflow: auto; padding: 18px 16px 22px; border-radius: 26px; border: 1px solid rgba(255, 184, 220, 0.25); background: linear-gradient(180deg, #2c1a44, #170d26 70%); color: var(--ink); display: none; gap: 12px; }
.mk-sheet[open] { display: grid; }
.mk-sheet::backdrop { background: rgb(8 4 14 / 0.72); backdrop-filter: blur(3px); }
.mk-x { position: sticky; top: 0; z-index: 2; justify-self: end; margin-bottom: -40px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.12); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.mk-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.mk-pose { flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 3px solid #ff9fd0; background: #d9c8f2; }
.mk-bub { background: #fff; color: #2a1838; border-radius: 18px 18px 18px 4px; padding: 9px 14px; font-size: 0.95rem; line-height: 1.4; }
.mk-sheet h2 { font-size: 1.25rem; color: var(--pink-soft); text-align: center; }
.mk-sheet > .small { text-align: center; }
.mk-trail { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.mk-trail i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 0.9rem; background: var(--surface-2); opacity: 0.5; }
.mk-trail i.ok { opacity: 1; background: rgba(255, 210, 122, 0.25); box-shadow: 0 0 0 1.5px var(--gold); }
.mk-trail i.now { opacity: 1; box-shadow: 0 0 0 2px #ff6fb8, 0 0 12px var(--pink-glow); }
.mk-prog { text-align: center; color: var(--gold); font: 500 0.85rem var(--font-head); }
.mk-ch { display: grid; gap: 8px; padding: 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.mk-ch h3 { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 1rem; }
.mk-ch h3 small { color: var(--gold); font-family: var(--font-latin); white-space: nowrap; }
.mk-m { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); }
.mk-m.now { background: rgba(255, 111, 184, 0.12); box-shadow: 0 0 0 1.5px rgba(255, 111, 184, 0.6); }
.mk-m b { display: block; font: 500 0.95rem/1.35 var(--font-head); }
.mk-m small { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.mk-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 0.95rem; }
.mk-m.ok .mk-dot { background: var(--gold); color: var(--accent-ink); font-weight: 700; }
.mk-go { padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, #ff6fb8, var(--pink)); color: #fff; text-decoration: none; font: 500 0.85rem var(--font-head); white-space: nowrap; }
.mk-m.ok .mk-go, .mk-go.off { background: rgba(255, 255, 255, 0.1); color: var(--muted); }
.mk-jarbox { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.mk-jarbox img { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; object-position: 50% 40%; }
.mk-jarnote { color: var(--gold); font: 500 0.88rem var(--font-head); }
.mk-track { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); }
.mk-track i { font-style: normal; font-size: 1rem; filter: grayscale(1); opacity: 0.6; transform: translateY(-1px); }
.mk-track i.on { filter: none; opacity: 1; }
.mk-tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mk-tier { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--line); color: var(--ink); text-align: center; cursor: pointer; font: inherit; }
.mk-tier.sel { border-color: #ff6fb8; background: rgba(255, 111, 184, 0.12); box-shadow: 0 0 14px var(--pink-glow); }
.mk-tier strong { font: 700 1.15rem var(--font-latin); color: var(--gold); }
.mk-tier small { color: var(--muted); font-size: 0.8rem; }
.mk-tier input { width: 5.5em; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.25); color: var(--ink); padding: 4px 8px; font: 500 1rem var(--font-body); text-align: center; }
.mk-amt { text-align: center; color: var(--muted); }
.mk-amt strong { color: var(--gold); font: 700 1.5rem var(--font-latin); margin-left: 6px; }
.mk-qr { justify-self: center; width: min(230px, 70vw); padding: 12px; border-radius: 18px; background: #fff; }
.mk-qr svg { display: block; width: 100%; height: auto; }
.mk-acts { justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .mk-say:not([hidden]), .mk-toast:not([hidden]) { animation: pop 0.25s var(--pop); }
  .mk-av { animation: float 4s ease-in-out infinite; }
  .mk-av.hop { animation: hop 0.45s var(--pop); }
  @keyframes hop { 40% { transform: translateY(-8px) scale(1.05); } }
  .mk-pi i { animation: twinkle 1.2s ease-in-out infinite alternate; }
}

/* v0.18: brought over from the SETHKORLUS Jung page */
/* header menu and footer */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font: 500 0.9rem var(--font-head); padding: 8px 10px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.foot { position: relative; z-index: 1; max-width: 760px; margin: 28px auto 0; padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); text-align: center; color: var(--dim); font-size: 0.82rem; border-top: 1px solid var(--line); }
.foot p { margin: 0.35em 0; }
.foot a { color: var(--muted); }
/* the journey: five stages instead of a bare bar */
.journey { display: flex; align-items: center; }
.journey .ms { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: var(--surface-2); border: 1.5px solid var(--line); filter: grayscale(0.85); opacity: 0.6; }
.journey .ms.done { filter: none; opacity: 1; border-color: var(--accent); }
.journey .ms.now { filter: none; opacity: 1; border-color: var(--pink-soft); box-shadow: 0 0 14px var(--pink-glow); }
.journey .ml { flex: 1; height: 4px; margin: 0 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.journey .ml b { display: block; height: 100%; background: var(--pill); transition: width 0.4s var(--ease); }
.opt.sel { border-color: var(--pink-soft); background: var(--accent-soft); }
.opt.sel .mk { background: var(--accent); }
.spark { position: fixed; z-index: 60; pointer-events: none; font-style: normal; font-size: 14px; color: var(--pink-soft); text-shadow: 0 0 8px var(--pink-glow); translate: -50% -50%; animation: spark 0.6s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity: 0; } }
/* answers so far */
.hist summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.hist ol { margin: 8px 0 0; padding-left: 1.4em; display: grid; gap: 6px; }
.hist .link { display: grid; gap: 2px; text-align: left; padding: 6px 0; font-size: 0.88rem; line-height: 1.45; }
.hist .link span { color: var(--muted); }
.hist .link b { font-weight: 500; color: var(--ink); }
/* the lead-in before the result */
.gate { justify-items: center; text-align: center; padding-top: 12vh; }
.gate-fig .figure { width: 150px; }
/* result: the character up top, does it fit, the two nearest types, all nine scores */
.rhero { display: grid; justify-items: center; gap: 4px; text-decoration: none; border-radius: var(--radius); padding-top: 6px; background: radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--c) 26%, transparent), transparent 75%); }
.rhero .charfig { max-width: 210px; position: relative; display: block; width: 210px; }
.rhero .code { margin: 16px 0 0; } .rhero .sknav-holo { margin-left: 0; translate: none; justify-self: center; } .rhero .rname { margin-bottom: 4px; } /* 29 Nov: the orbit (../sk-nav.js) sits around the figure; code and name follow it */
.rhero .rname { font: 500 1rem var(--font-head); color: var(--c); }
.selfnote { border-color: rgba(255, 196, 107, 0.5); }
.fit .btn.on { border-color: var(--pink-soft); background: var(--accent-soft); }
.alt { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.alt b { color: var(--c); font-family: var(--font-head); font-weight: 500; }
.alt .portrait { margin: 0; }
.chip2 { display: inline-block; font-size: 0.78rem; color: var(--gold); border: 1px solid rgba(255, 210, 122, 0.4); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.scores { display: grid; gap: 6px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) 2fr 3.2em; gap: 10px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.srow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow span:last-child { text-align: right; }
.srow .bar2 { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.srow .bar2 > i { display: block; height: 100%; background: var(--c); }
.srow.me { color: var(--ink); font-weight: 600; }
#scores h2 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
/* the story-image pop-up */
.smodal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8, 5, 15, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.smodal-in { width: min(420px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 10px; justify-items: center; text-align: center; background: var(--solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.smodal-in img { width: min(100%, 300px); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.smodal-in .actions { justify-content: center; }
/* character pages: jump tabs, grouped by centre */
.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px; margin: 0 -2px; background: linear-gradient(var(--night) 70%, transparent); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: 500 0.85rem var(--font-head); cursor: pointer; }
.tabs button:hover { background: color-mix(in srgb, var(--c) 16%, transparent); }
.charpage .panel { scroll-margin-top: 60px; }
.path { font: 500 1.05rem var(--font-head); color: var(--c); margin: 0; }
.alike { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.alike p { margin: 0; }
.act { margin: 0; text-align: center; color: var(--muted); font-size: 0.92rem; }
.act b { color: var(--c); font-weight: 500; }
@media (max-width: 420px) { .nav a { padding: 8px 6px; font-size: 0.82rem; } }
@media (prefers-reduced-motion: no-preference) {
  .tok { animation: rise 0.5s var(--ease) both; animation-delay: calc(0.15s + var(--i, 0) * 0.12s); }
  .rhero .charfig { animation: rise 0.6s var(--ease) both; }
  .screen.leave { transition: opacity 0.2s, transform 0.2s; opacity: 0; transform: translateX(-24px); }
  .gate-fig .figure { animation: spin 6s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) { .spark { display: none; } }

/* v0.28: the front page laid out like SETHKORLUS: title, Mamuang's bubble on top, buttons left, Mamuang right; no glow */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(170px, 48vw, 300px); grid-template-areas: "head head" "bub bub" "menu stage"; align-items: start; column-gap: 0; padding: 8px 0 20px; }
.hero-head { grid-area: head; text-align: center; margin-bottom: 10px; }
.hero-latin { margin: 0; font: 400 0.78rem var(--font-latin); letter-spacing: 0.42em; color: #d9c2ff; opacity: 0.85; }
.hero-title { margin: 0; display: grid; justify-items: center; gap: 2px; font: 400 clamp(2.9rem, 14vw, 4.6rem)/1.25 var(--font-display); background: linear-gradient(180deg, #fff 8%, #e6d2ff 45%, #b48af2 72%, #ff8fc7); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(150, 96, 230, 0.45)); }
.hero-q { font: 400 clamp(1rem, 4.2vw, 1.25rem)/1.4 var(--font-display); -webkit-text-fill-color: #f3e6ff; color: #f3e6ff; }
.hero-q::before, .hero-q::after { content: "✦"; margin: 0 10px; font-size: 0.7em; color: var(--pink-soft); -webkit-text-fill-color: var(--pink-soft); vertical-align: 0.15em; }
.hero-stage { grid-area: stage; position: relative; width: 100%; aspect-ratio: 800 / 1079; pointer-events: none; }
.hero-aura { position: absolute; inset: 6% -14% 34%; z-index: 0; display: grid; place-items: center; }
.hero-aura svg { width: 100%; height: auto; overflow: visible; fill: none; stroke: rgba(217, 194, 255, 0.22); stroke-width: 1; }
.hero-aura svg .p { fill: #2a1450; stroke: rgba(255, 184, 220, 0.4); }
.hero-float { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; }
.hero-float img { width: 100%; height: 100%; object-fit: contain; }
.hero-float img.old { -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); } /* the old picture has its own sky: fade its edges */
.hero-bub { grid-area: bub; position: relative; z-index: 4; margin: 4px 0 14px; background: rgba(246, 232, 250, 0.9); color: #3a1d4e; border-radius: 20px; padding: 11px 15px; font-size: 0.92rem; line-height: 1.6; text-align: center; box-shadow: 0 10px 30px -10px rgba(8, 3, 18, 0.6); }
.hero-bub::before { content: ""; position: absolute; left: auto; right: clamp(60px, 22%, 150px); bottom: -7px; top: auto; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.hero-menu { grid-area: menu; position: relative; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-right: -30px; padding-top: 4px; width: auto; }
.hb { position: relative; display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px; border-radius: 13px; border: 1px solid rgba(255, 184, 220, 0.38); background: linear-gradient(135deg, rgba(255, 184, 220, 0.2), rgba(255, 184, 220, 0.06)), rgba(28, 11, 43, 0.55); color: #fff; text-decoration: none; text-align: left; font: 500 0.86rem/1.25 var(--font-body); cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.8); transition: transform 0.15s, border-color 0.2s; }
.hb:hover, .hb:focus-visible { transform: translateY(-1px); border-color: rgba(255, 184, 220, 0.7); }
.hb:active { transform: scale(0.97); }
.hb .e { font-size: 1.05rem; line-height: 1; flex: none; }
.hb b { display: block; font-weight: 600; }
.hb small { display: block; font-size: 0.7rem; font-weight: 400; opacity: 0.88; line-height: 1.3; color: inherit; }
.hb.big { width: 100%; min-height: 46px; border: 0; background: var(--pill); color: var(--accent-ink); font-weight: 600; box-shadow: 0 8px 22px -10px rgba(240, 56, 154, 0.7); }
.hb.big b { font-weight: 600; }
.hb.big .e { font-size: 1.25rem; }
.hb:not(.big):not(.sm) { width: calc(100% - 10px); }
.hb.sm { width: auto; min-width: calc(100% - 36px); white-space: nowrap; }
@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); grid-template-areas: "head head" "menu bub" "menu stage"; column-gap: 40px; grid-template-rows: auto auto 1fr; }
  .hero-bub { align-self: start; justify-self: center; max-width: 420px; margin: 6px 0 14px; }
  .hero-bub::before { right: auto; left: 46%; }
  .hero-menu { margin-right: 0; padding-top: 6px; }
  .hero-stage { justify-self: center; width: min(300px, 100%); }
}
@media (min-width: 1000px) {
  .hero { justify-self: start; width: min(960px, calc(100vw - 48px)); margin-left: calc((100% - min(960px, calc(100vw - 48px))) / 2); grid-template-columns: minmax(0, 400px) minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 56px; align-items: center; }
  .hero-menu { grid-row: 2 / 4; align-self: center; width: 100%; }
  .hero-bub { align-self: end; margin: 0 0 4px; }
  .hero-stage { align-self: start; justify-self: center; width: min(320px, 100%); margin-top: -10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-aura svg { animation: heroSpin 90s linear infinite; }
  @keyframes heroSpin { to { transform: rotate(360deg); } }
  .hero-float { animation: heroBob 5.5s ease-in-out infinite; }
  @keyframes heroBob { 50% { transform: translateY(-12px) rotate(0.8deg); } }
  .hero-menu { animation: rise 0.6s 0.3s both; }
}

/* header: same as the SETHKORLUS Jung page — brand left, TH/EN pill, menu button with a dropdown */
.brand { margin-right: auto; flex: 0 1 auto; }
.lang-btn { display: flex; align-items: center; gap: 2px; height: 38px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: #ffffff0d; cursor: pointer; flex: none; font: inherit; }
.lang-btn span { font-family: var(--font-latin); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.06em; height: 30px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); transition: all 0.25s; }
.lang-btn span.on { background: linear-gradient(135deg, #f6d27c, #e8a3ff); color: #1a1230; }
.menu { position: relative; flex: none; }
.menu-btn { display: flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px 0 12px; font: inherit; font-size: 0.88rem; color: var(--ink); border-radius: 999px; border: 1px solid rgba(255, 150, 210, 0.5); background: linear-gradient(135deg, rgba(255, 121, 191, 0.18), rgba(201, 170, 255, 0.14)); cursor: pointer; }
.menu-btn .mb-ico { font-size: 1rem; line-height: 1; }
.menu-btn .mb-car { font-size: 0.7rem; opacity: 0.8; transition: transform 0.25s; }
.menu.open .mb-car { transform: rotate(180deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, 92vw); max-height: 76vh; overflow: auto; padding: 12px; border-radius: 20px; background: rgba(30, 12, 52, 0.97); border: 1px solid var(--line); box-shadow: 0 30px 60px #00000080; backdrop-filter: blur(14px); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(0.98); transform-origin: top right; transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s; z-index: 20; }
.menu.open .menu-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity 0.2s, transform 0.2s; }
/* 23 Nov (owner: "จัดเรียงหมวดหมู่ … ให้คล้ายกับของ jung … หาปุ่มกดกลับไปหน้าหลักง่ายๆ"): sections like the Jung menu, each folds on a tap; SETHKORLUS home first, in gold */
.mp-sec { display: flex; width: 100%; align-items: center; justify-content: space-between; font: inherit; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--gold); margin: 10px 0 4px; padding: 6px 8px; background: none; border: 0; cursor: pointer; text-align: left; }
.mp-sec:first-child { margin-top: 2px; }
.mp-sec i { font-style: normal; font-size: .7rem; transition: transform .2s; }
.mp-sec.shut i { transform: rotate(-90deg); }
.mp-pages[hidden] { display: none; }
.mp-pages a.mp-home { background: linear-gradient(90deg, #f2c86b26, #ffffff0a); box-shadow: inset 3px 0 0 var(--gold); }
.mp-pages a.mp-home b { color: var(--gold); font-weight: 600; }
.mp-pages { display: grid; gap: 2px; }
.mp-pages a { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 8px 10px; border-radius: 12px; font-size: 0.92rem; color: var(--ink); }
.mp-pages a span { width: 22px; text-align: center; }
.mp-pages a b { font-weight: 400; }
.mp-pages a:hover, .mp-pages a:focus-visible { background: #ffffff14; }
@media (min-width: 600px) { .bar { gap: 8px; } }
.bar { background: linear-gradient(180deg, #000 0, #0c0518 38%, #120a24 100%); border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgba(255, 121, 191, 0.55), rgba(201, 170, 255, 0.55), transparent) 1; max-width: none; }
.bar > * { position: relative; }
@media (min-width: 780px) { .bar { padding-left: max(14px, calc((100% - 760px) / 2)); padding-right: max(14px, calc((100% - 760px) / 2)); } }
html, body { overflow-x: clip; }

/* the theory page (#theory, 18 Nov 2026) */
/* the compare page (18 Nov 2026) */
.tagc { font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--pink-soft); }
.cmp-pick { display: grid; gap: 6px; }
.cmp-pick > div { display: flex; gap: 6px; flex-wrap: wrap; }
.cmp-pick a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-family: var(--font-head); }
.cmp-pick a[aria-current] { border-color: var(--c); background: var(--c); color: #1c0b2b; box-shadow: 0 0 12px var(--c); }
.cmp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-head a { display: grid; justify-items: center; gap: 4px; text-align: center; color: inherit; text-decoration: none; padding: 10px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cmp-head b { color: var(--c); font-family: var(--font-head); font-weight: 500; }
.cmp-row h3 { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.cmp-row .cmp-two > div { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px; padding: 10px 12px; font-size: 0.92rem; line-height: 1.55; }
.th-go { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.th-go b { color: var(--pink-soft); font-size: 1.3rem; }
/* the type's accessory on the result page (18 Nov 2026) */
.acc { text-align: center; }
.accfig { position: relative; width: 132px; height: 132px; margin: 4px auto 12px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 2px solid var(--pink-soft); box-shadow: 0 0 18px var(--pink-glow); }
.accfig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.acc-opts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.acc-opts .chip.on { background: var(--pill); color: #1c0b2b; border-color: transparent; }
/* "two fit about equally": a quiet switch under the answers (18 Nov 2026) */
.link.two { display: block; margin: 2px auto 0; color: var(--accent); font-size: 0.92rem; }
.link.two[aria-pressed="true"] { color: var(--pink-soft); }
/* quick "a person like this" + feedback in the fit panel; keep-history tick on retake (18 Nov 2026) */
.fit .qplain { margin: 0 0 4px; }
.fit h3 { margin: 10px 0 0; }
.fb textarea { width: 100%; margin-top: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; }
.confirm .keep { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.confirm .keep input { margin-top: 4px; accent-color: var(--accent); }
/* "which type do you think you are?" before the first result (18 Nov 2026) */
.selfask { text-align: center; }
.sa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.sa-t { display: grid; gap: 2px; justify-items: center; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.sa-t b { font-size: 1.5rem; color: var(--c); line-height: 1.1; }
.sa-t small { font-size: .78rem; opacity: .85; }
.sa-t:hover, .sa-t.sel { border-color: var(--c); background: var(--accent-soft); box-shadow: 0 0 14px -4px var(--c); }
.sa-dk { margin: 6px auto 0; }

/* the question scenes (ennea-scenes.js): น้องมะม่วง lives the card's moment, as on the Jung page; the box keeps its size while the scene loads */
.qstage { aspect-ratio: 2 / 1; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #1a1233; box-shadow: 0 0 18px var(--pink-glow); }
.qscene { width: 100%; height: 100%; display: block; }
@media (max-height: 640px) { .qstage { aspect-ratio: auto; height: 24vh; } }

/* 18 Nov 2026 (owner): the scene between steps of the test (ennea.js stepScene), as on the Jung page */
.screen.stg { text-align: center; align-items: center; position: relative; }
.screen.stg::before { content: ""; position: absolute; left: -20%; right: -20%; top: -10%; height: 60%; background: radial-gradient(closest-side, rgba(255, 60, 90, 0.16), transparent); pointer-events: none; z-index: -1; }
.stg-eye { display: inline-block; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--pink-soft); padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 60, 90, 0.08); animation: stgUp 0.6s both; }
.qstage.stg-stage { width: 100%; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 36px var(--pink-glow); animation: stgIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.stg-stage .qscene { display: block; width: 100%; height: 100%; }
.journey.stg-j { width: 100%; max-width: 320px; }
.stg-j .stg-fill { animation: stgLine 1s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.stg-j .ms.now { animation: stgPop 0.7s 1.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.stg-title { font-size: clamp(1.4rem, 6vw, 1.9rem); background: linear-gradient(90deg, #ffd1e8, #ff8fb4, #d4adff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; animation: stgUp 0.7s 0.35s both; }
.stg-ic { display: inline-block; margin-right: 0.35em; -webkit-text-fill-color: #fff; color: #fff; }
.stg-sub { color: var(--muted); max-width: 30em; margin: 0; animation: stgUp 0.7s 0.5s both; }
.btn.stg-go { position: relative; overflow: hidden; animation: stgUp 0.7s 0.65s both; }
.stg-t { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: rgba(255, 255, 255, 0.55); transform-origin: 0 50%; animation: stgT linear both; }
@keyframes stgIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes stgUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes stgLine { from { width: 0; } to { width: 100%; } }
@keyframes stgPop { from { transform: scale(0.6); } to { transform: scale(1.12); } }
@keyframes stgT { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .screen.stg, .screen.stg * { animation: none !important; } .stg-j .stg-fill { width: 100% !important; } }

/* 19 Nov 2026 (owner): the same night sky down the whole page (a fixed layer: phones ignore background-attachment fixed, so the
   gradient used to scroll and the page got darker further down), and rose petals drifting down over it (pure CSS, every ennea page) */
html::before, html::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
html::before { z-index: -1; background: var(--sky), var(--night); }
html::after { z-index: 0; top: -420px; left: -300px; right: auto; bottom: auto; width: calc(100% + 300px); height: calc(100% + 420px); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='420'%3E%3Cg transform='translate(40 60) rotate(20) scale(1.6 1.36)' opacity='0.7'%3E%3Cpath d='M0 13C-8 8-9-3-6-9C-4-12-1-12 0-9C1-12 4-12 6-9C9-3 8 8 0 13Z' fill='%23e0245e'/%3E%3Cpath d='M-3-6C-5 0-3 7 0 11' stroke='%23ffd0e2' stroke-width='.9' fill='none' opacity='.55'/%3E%3Cpath d='M0 13C-3 8-4 2-3-3' stroke='%237a0d33' stroke-width='.7' fill='none' opacity='.35'/%3E%3C/g%3E%3Cg transform='translate(230 150) rotate(-35) scale(1.3 1.10)' opacity='0.6'%3E%3Cpath d='M0 13C-8 8-9-3-6-9C-4-12-1-12 0-9C1-12 4-12 6-9C9-3 8 8 0 13Z' fill='%23ff4d8a'/%3E%3Cpath d='M-3-6C-5 0-3 7 0 11' stroke='%23ffd0e2' stroke-width='.9' fill='none' opacity='.55'/%3E%3Cpath d='M0 13C-3 8-4 2-3-3' stroke='%237a0d33' stroke-width='.7' fill='none' opacity='.35'/%3E%3C/g%3E%3Cg transform='translate(110 270) rotate(60) scale(1.7 1.44)' opacity='0.65'%3E%3Cpath d='M0 13C-8 8-9-3-6-9C-4-12-1-12 0-9C1-12 4-12 6-9C9-3 8 8 0 13Z' fill='%23c2185b'/%3E%3Cpath d='M-3-6C-5 0-3 7 0 11' stroke='%23ffd0e2' stroke-width='.9' fill='none' opacity='.55'/%3E%3Cpath d='M0 13C-3 8-4 2-3-3' stroke='%237a0d33' stroke-width='.7' fill='none' opacity='.35'/%3E%3C/g%3E%3Cg transform='translate(265 370) rotate(10) scale(1.0 0.85)' opacity='0.45'%3E%3Cpath d='M0 13C-8 8-9-3-6-9C-4-12-1-12 0-9C1-12 4-12 6-9C9-3 8 8 0 13Z' fill='%23ff9fc4'/%3E%3Cpath d='M-3-6C-5 0-3 7 0 11' stroke='%23ffd0e2' stroke-width='.9' fill='none' opacity='.55'/%3E%3Cpath d='M0 13C-3 8-4 2-3-3' stroke='%237a0d33' stroke-width='.7' fill='none' opacity='.35'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 300px 420px repeat; will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  html::after { animation: petals 15s linear infinite; }
  @keyframes petals { to { transform: translate3d(300px, 420px, 0); } }
}

/* 2026-11-22 (R4): share pop-up fades and rises in, and out */
@media (prefers-reduced-motion:no-preference){
@keyframes smB{from{opacity:0}}@keyframes smP{from{opacity:0;transform:translateY(18px) scale(.95)}}
@keyframes smBo{to{opacity:0}}@keyframes smPo{to{opacity:0;transform:translateY(10px) scale(.97)}}
.smodal{animation:smB .25s ease}.smodal-in{animation:smP .4s cubic-bezier(.34,1.56,.64,1)}
.smodal.out{animation:smBo .2s ease forwards;pointer-events:none}.smodal.out .smodal-in{animation:smPo .2s ease forwards}}

/* 23 Nov 2026: SEO / screen-reader text for the test home (the page itself is drawn by script) */
.en-seo{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:normal;border:0}

/* 2026-11-26 (owner: "ทำอนิเมชั่นของหน้าแต่ละลักษณ์…"): the 3-step figures on a type page (ennea.js efFig), ported from the Jung pages' .tf2 stage */
.ef{margin:6px auto 12px;width:100%;box-sizing:border-box;max-width:460px;border-radius:18px;background:var(--surface);border:1px solid var(--line)}
.ef-h{margin:0;padding:12px 14px 4px;min-height:3.1em;display:flex;align-items:center;justify-content:center;text-align:center;font:500 1rem/1.5 var(--font-head);color:var(--ink);text-wrap:balance;transition:opacity .2s,transform .25s}
.ef-h.sw{opacity:0;transform:translateY(5px)}
.ef-st{position:relative;aspect-ratio:16/10;margin:4px 12px 6px;border-radius:16px;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,rgba(255,170,220,.13),transparent 62%),radial-gradient(ellipse at 50% 110%,rgba(150,120,255,.16),transparent 60%),rgba(12,6,28,.45);box-shadow:inset 0 0 0 1px rgba(255,214,236,.1);cursor:pointer}
.ef-st [data-s]{opacity:0;transition:opacity .55s ease}
.ef-st [data-s].on{opacity:1}
.ef-st [data-s].on.dim{opacity:.26}
.ef-b{position:absolute;left:0;right:0;background:linear-gradient(180deg,color-mix(in srgb,var(--c) 30%,transparent),color-mix(in srgb,var(--c) 12%,transparent));border-top:1px dashed color-mix(in srgb,var(--c) 70%,transparent)}
.ef-b span{position:absolute;left:8px;top:4px;font:500 .68rem/1.2 var(--font-head);color:color-mix(in srgb,var(--c) 45%,#fff)}
.ef-r{position:absolute;aspect-ratio:1;border-radius:50%;border:2px dashed var(--c);transform:translate(-50%,-50%) scale(.85);box-shadow:0 0 26px -6px var(--c),inset 0 0 26px -10px var(--c);transition:opacity .6s,transform .8s cubic-bezier(.34,1.56,.64,1)}
.ef-r.on{transform:translate(-50%,-50%) scale(1);animation:ef-spin 40s linear infinite}
@keyframes ef-spin{to{transform:translate(-50%,-50%) scale(1) rotate(360deg)}}
.ef-ln{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.ef-l{fill:none;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;transition:opacity .4s,stroke-dashoffset .9s ease .15s}
.ef-l.on{stroke-dashoffset:0}
.ef-l.dsh{stroke-dasharray:3 2.6;stroke-dashoffset:0}
.ef-l.dsh.on{animation:ef-flow 1.4s linear infinite}
@keyframes ef-flow{to{stroke-dashoffset:-11.2}}
.ef-a{position:absolute;display:flex;flex-direction:column;align-items:center;gap:3px;transform:translate(-50%,-50%) scale(calc(var(--z)*.6));transition:opacity .5s,transform .65s cubic-bezier(.34,1.56,.64,1),left .9s cubic-bezier(.65,0,.35,1),top .9s cubic-bezier(.65,0,.35,1);z-index:1}
.ef-a.on{transform:translate(-50%,-50%) scale(var(--z))}
.ef-a .e{font-size:30px;line-height:1;filter:drop-shadow(0 4px 10px rgba(0,0,0,.4));animation:ef-fl 4.6s ease-in-out infinite}
.ef-a:nth-child(2n) .e{animation-delay:-2.3s}
@keyframes ef-fl{50%{transform:translateY(-3px)}}
.ef-a .g{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--c);background:color-mix(in srgb,var(--c) 24%,rgba(20,10,40,.72));color:#fff;font:600 .95rem/1 var(--font-latin);box-shadow:0 0 18px -4px var(--c)}
.ef-a .t{font:600 1rem/1.2 var(--font-head);color:var(--c);white-space:nowrap}
.ef-a .l{font:500 .7rem/1.25 var(--font-head);color:#fff;background:rgba(16,8,34,.8);border:1px solid color-mix(in srgb,var(--c) 60%,transparent);padding:2px 8px;border-radius:999px;white-space:nowrap;max-width:46vw;overflow:hidden;text-overflow:ellipsis}
.ef-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ef-d{display:flex;justify-content:flex-end;gap:6px;padding:2px 12px 10px}
.ef-d button{width:30px;height:30px;padding:0;border-radius:50%;border:1px solid rgba(255,210,122,.35);background:transparent;color:var(--gold);font:500 .78rem/1 var(--font-head);cursor:pointer;transition:background .2s,transform .2s}
.ef-d button[aria-pressed=true]{background:rgba(255,210,122,.22);transform:scale(1.08)}
.ef.still .ef-sr{position:static;width:auto;height:auto;clip:auto;white-space:normal;margin:0 0 8px;padding:0 16px 0 34px;color:var(--muted);font-size:.9rem}
.ef.still .ef-d,.ef.still .ef-h{display:none}
@media (prefers-reduced-motion:reduce){.ef *{animation:none!important;transition:none!important}}
.fam{list-style:none;margin:8px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.fam li{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:14px;background:var(--surface);border:1px solid color-mix(in srgb,var(--c,var(--gold)) 40%,transparent)}
.fam b{font-weight:600;line-height:1.35}
.fam small{color:var(--muted);font-size:.8rem}

/* 2026-11-26 (owner): the wordless figures of the theory parts (ennea.js efQ) */
.ef.bare{max-width:420px;margin:4px auto 12px;background:none;border:0}
.ef.bare .ef-st{margin:0;cursor:default}
/* ---------- the Deep Report (#deep, 27 Nov 2026): the loop as numbered steps, gift pairs, week cards, the 28-day dots ---------- */
.deep .panel h3 { margin: 6px 0 0; font: 500 0.98rem var(--font-head, inherit); color: var(--ink); }
.deep .loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: lp; }
.deep .loop li { counter-increment: lp; display: grid; grid-template-columns: 1.7rem 1fr; gap: 10px; align-items: start; }
.deep .loop li::before { content: counter(lp); display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--c); font-size: 0.85rem; }
.deep .loop b { display: block; color: var(--c); font-size: 0.82rem; font-weight: 500; }
.deep .pair { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.deep .pair:first-of-type { border-top: 0; padding-top: 0; }
.deep .pair p { margin: 0; }
.deep .pair .ov { color: var(--muted); font-size: 0.92rem; }
.deep .wk { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 6px; }
.deep .wk h3 { margin: 0; color: var(--c); }
.deep .wk p { margin: 0; }
.deep .dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 360px; }
.deep .dots button { aspect-ratio: 1; min-height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; }
.deep .dots button.on { background: var(--c); border-color: var(--c); color: #1a1030; font-weight: 600; }
.deep .dlab { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.deep .panel .path { font-size: 1rem; }
.deepcta { border-color: rgba(255, 210, 122, 0.45); }
/* the locked Deep Report: what the full report holds and the buy box (ennea-pay.js) */
.deep .lockbox { border-color: rgba(255, 210, 122, 0.45); }
.deep .lockbox .payp { font-size: 1.15rem; margin-top: 12px; }
.deep .lockbox .payqr { background: #fff; border-radius: 14px; padding: 10px; width: min(240px, 70vw); margin: 4px auto 10px; }
.deep .lockbox .payqr svg { display: block; width: 100%; height: auto; }
/* 2026-11-28 subtype detail (everyday signs, seen as, gift) */
.core dd .portrait { margin: 6px 0 8px; gap: 4px; }
.core dd .submore { display: block; margin-top: 6px; }
/* 2026-11-28 the thank-you after buying the Deep Report (ennea-deep.js bThx) */
.deep .panel.thx { position: relative; overflow: hidden; text-align: center; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--panel, rgba(255,255,255,.04)); }
.deep .panel.thx .actions { justify-content: center; }
.deep .thx-fx { position: absolute; inset: 0; pointer-events: none; }
.deep .thx-fx i { position: absolute; left: 50%; top: 38px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0; animation: thxPop 1.4s ease-out .2s both; }
.deep .thx-fx i:nth-child(2n) { background: #f2c86b; width: 6px; height: 6px; }
.deep .thx-fx i:nth-child(1) { --x: -120px; --y: -10px; } .deep .thx-fx i:nth-child(2) { --x: 110px; --y: -18px; } .deep .thx-fx i:nth-child(3) { --x: -80px; --y: 40px; } .deep .thx-fx i:nth-child(4) { --x: 90px; --y: 46px; }
.deep .thx-fx i:nth-child(5) { --x: -150px; --y: 70px; } .deep .thx-fx i:nth-child(6) { --x: 140px; --y: 64px; } .deep .thx-fx i:nth-child(7) { --x: -30px; --y: -30px; } .deep .thx-fx i:nth-child(8) { --x: 36px; --y: 90px; }
@keyframes thxPop { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), var(--y)) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .deep .thx-fx { display: none; } }
/* 2026-11-28 Deep Report v2 (owner: tidy categories, easy to reach): contents, a sticky category bar under the top bar, category heads, levels, prompts, the 9-type folds, the locked preview */
.deep .panel, .deep .dgrp { scroll-margin-top: var(--stk, 120px); }
.deep .dtoc .tocg { display: grid; gap: 6px; }
.deep .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.deep .chips button, .deep .dcat button { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 38px; font: 500 0.88rem var(--font-head, inherit); cursor: pointer; white-space: nowrap; }
.deep .chips button:hover, .deep .dcat button:hover { border-color: var(--accent); }
.deep .dcat { position: sticky; top: 0; z-index: 12; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 2px; background: rgba(13, 8, 23, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.deep .dcat::-webkit-scrollbar { display: none; }
.deep .dcat button { flex: none; }
.deep .dcat button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.deep .dgrp { display: grid; gap: 14px; }
.deep .dcat-h { display: flex; gap: 12px; align-items: center; padding: 14px 4px 0; }
.deep .dcat-h .ic { font-size: 1.9rem; line-height: 1; }
.deep .dcat-h h2 { font-size: 1.3rem; margin: 0; }
.deep .dcat-h .kicker, .deep .dcat-h .small { margin: 0; }
.deep ol.lv { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.deep ol.lv li { border-left: 4px solid var(--line); padding: 4px 0 4px 12px; display: grid; gap: 2px; line-height: 1.55; }
.deep ol.lv b { font: 500 0.9rem var(--font-head, inherit); }
.deep ol.lv .lv0 { border-color: #8fe3b0; }
.deep ol.lv .lv1 { border-color: #f3d27a; }
.deep ol.lv .lv2 { border-color: #f39a9a; }
.deep ol.jq { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; line-height: 1.55; }
.deep details.rel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.deep details.rel summary { cursor: pointer; padding: 11px 14px; min-height: 44px; font: 500 0.95rem var(--font-head, inherit); }
.deep details.rel[open] summary { border-bottom: 1px solid var(--line); }
.deep details.rel .core { padding: 10px 14px 12px; margin: 0; }
.deep .rel .tagc, .deep .path .tagc { font-size: 0.75rem; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.deep .lockg { display: grid; gap: 4px; }
.deep .lockg h3 .muted { font: 400 0.85rem inherit; color: var(--muted); }
/* 2026-11-28 admin picker on the Deep Report */
.deep .adm { border-color: rgba(255, 210, 122, 0.45); }
.deep .adm .admrow { display: grid; gap: 8px; grid-template-columns: 1fr; }
.deep .adm label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.deep .adm select, .deep .adm textarea { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 40px; font: inherit; width: 100%; }
@media (min-width: 560px) { .deep .adm .admrow { grid-template-columns: 1fr 1fr; } }

/* 29 Nov: the character page's orbit (../sk-nav.js): figure, then the big number and name, then the facts */
.charpage .charstage .charfig { position: relative; display: block; width: 210px; margin: 0 auto; }
.charpage .charhead { text-align: center; margin-top: 14px; }
.charpage .cbig { display: block; font: 400 3rem/1 Cinzel, serif; color: var(--c); text-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); }

/* 30 Nov 2026 (owner, iPhone: on a character page the figure, name and facts sit about 145px to the right and run off the screen,
   the back link stays put). The page is a one-column grid whose column is "auto", so a wide child (the tab row, min-content about
   600px) can widen the column and the centred figure then centres in the wider column. The column is now held to the screen. */
.charpage.stack { grid-template-columns: minmax(0, 1fr); }
.charpage.stack > * { min-width: 0; max-width: 100%; }
