/* Cathay Ink — design system, second edition.
   Materials as palette: a celadon table, sheets of paper, ink in three
   dilutions, cinnabar seal paste as the one chromatic accent. Paper is cut
   square (no rounded corners); only buttons and fields are softened by 2px.
   Type: Newsreader for English, Noto Serif SC for running hanzi, Ma Shan Zheng
   (a brush hand) for display hanzi. The one page-load motion is the handscroll. */

:root {
  --celadon: #dfe8e2;
  --celadon-2: #cfdcd4;
  --celadon-3: #b9cbc1;
  --paper: #f7f6f1;
  --paper-2: #efede6;
  --paper-3: #e6e3d9;
  --ink: #1a1c1b;
  --ink-2: #454a48;
  --ink-3: #6b7370;
  --line: rgba(26, 28, 27, 0.16);
  --line-soft: rgba(26, 28, 27, 0.09);
  --cinnabar: #b8352b;
  --cinnabar-2: #8f2a22;
  --cinnabar-soft: rgba(184, 53, 43, 0.12);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --hanzi: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --brush: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --radius: 2px;
  --wrap: 1120px;
  --gutter: 24px;
  --shadow-paper: 0 1px 0 rgba(26, 28, 27, 0.05), 0 18px 40px -28px rgba(26, 28, 27, 0.35);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--celadon);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, canvas, svg, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 3px; }
.hz { font-family: var(--hanzi); }
.brush-hz { font-family: var(--brush); font-weight: 400; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { top: 12px; }

/* type scale: 17 × 1.25 */
h1, h2, h3 { font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
/* display sizes in Newsreader's light weight: the serif does the talking, the ink stays thin */
h1 { font-size: clamp(44px, 6.2vw, 80px); font-weight: 300; line-height: 1.0; letter-spacing: -0.022em; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 300; line-height: 1.06; letter-spacing: -0.018em; }
h3 { font-size: 22px; letter-spacing: -0.005em; }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 640px) { .lede { font-size: 18px; } }
.small { font-size: 14.5px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.pinyin, .py { font-style: italic; color: var(--ink-2); letter-spacing: 0.01em; }
.en { font-family: var(--serif); }

/* ---------- top bar ---------- */
.topbar { padding: 20px 0; }
.topbar .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 22px; letter-spacing: -0.01em; }
.brand .mark { width: 32px; height: 32px; background: var(--cinnabar); color: #fbefe9; display: grid; place-items: center; font-family: var(--brush); font-size: 22px; line-height: 1; border-radius: 2px; transform: rotate(-3deg); box-shadow: inset 0 0 0 1.5px rgba(251, 239, 233, 0.55); }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 16.5px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; background: linear-gradient(var(--ink), var(--ink)) no-repeat left bottom / 0 1px; transition: background-size .22s var(--ease-out), color .15s; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); background-size: 100% 1px; }
.nav .cta { border: 1px solid var(--ink); padding: 8px 14px; border-radius: var(--radius); color: var(--ink); background: none; transition: background .15s, color .15s; }
.nav .cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .topbar { padding: 16px 0; } .nav { gap: 16px; font-size: 15.5px; } .nav .cta, .nav .hide-sm { display: none; } .brand { font-size: 20px; } }

/* ---------- buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font-size: 16px; line-height: 1.2; transition: background .15s, color .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { background: transparent; color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-seal { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }
.btn-seal:hover { background: var(--cinnabar-2); border-color: var(--cinnabar-2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 240, 232, 0.35), inset 0 0 0 3px var(--cinnabar-2), 0 10px 22px -14px rgba(143, 42, 34, 0.7); }
.btn-seal:disabled:hover { background: var(--cinnabar); color: #fff; }
.btn-quiet { border-color: var(--line); color: var(--ink-2); padding: 9px 14px; font-size: 15px; }
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 18px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 15px; color: var(--ink-2); }
.input, .select, .textarea { padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); font-size: 17px; width: 100%; color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input, .select, .textarea { transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--celadon-2); }
.textarea { min-height: 76px; resize: vertical; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.segmented button { padding: 9px 14px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); border-right: 1px solid var(--line); }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.name-form { display: flex; gap: 10px; max-width: 560px; }
.name-form .input { font-size: 19px; padding: 14px 16px; }
.name-form .btn { align-self: stretch; }
@media (max-width: 560px) { .name-form { flex-direction: column; } }
.form-error { color: var(--cinnabar); font-size: 15px; min-height: 1.4em; margin-top: 8px; }
.form-error:empty { display: none; }

/* ---------- paper on the table ---------- */
.sheet { background: var(--paper); padding: 28px; box-shadow: var(--shadow-paper); }
.sheet-tight { padding: 20px; }
@media (max-width: 640px) { .sheet { padding: 20px 18px; } }

/* ---------- hero ---------- */
.hero { padding: 36px 0 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 56px; align-items: end; }
.hero h1 { max-width: 11ch; }
.hero-side { padding-bottom: 10px; }
.hero-side .lede { margin: 0 0 22px; }
.hero .name-form { max-width: none; }
.hero .after { margin-top: 12px; }
@media (max-width: 880px) { .hero { padding-top: 24px; } .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; } .hero-side { padding-bottom: 0; } }

/* the handscroll (手卷): a mounted scroll between two lacquer rolls. The paper
   slides; the rolls stay put. Silk borders (绫) above and below the paper, a
   frontispiece at the start, a colophon at the end. It unrolls when it comes
   into view, then keeps unrolling slowly until touched. */
.works { padding: 56px 0 8px; }
.works-head { margin-bottom: 22px; }
.works-head h2 { margin-bottom: 8px; }
.works-head p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.handscroll { position: relative; --roll: 36px; --knob: 22px; --silk: 26px; --paper-h: 236px; padding: var(--knob) 0; }
.handscroll .roll { position: absolute; top: var(--knob); bottom: var(--knob); width: var(--roll); z-index: 3; border-radius: calc(var(--roll) / 2);
  background: linear-gradient(90deg, #2b2f2d 0%, #4a4f4c 22%, #16181a 55%, #3a3e3b 82%, #1d201f 100%);
  box-shadow: 0 16px 30px -14px rgba(26, 28, 27, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.handscroll .roll-left { left: var(--gutter); }
.handscroll .roll-right { right: var(--gutter); }
.handscroll .roll .knob { position: absolute; left: 4px; right: 4px; height: var(--knob); border-radius: 6px;
  background: linear-gradient(90deg, #a9b7ac, #e2e8e1 40%, #b7c3b9 70%, #8f9f94); box-shadow: 0 2px 4px rgba(26, 28, 27, 0.35), inset 0 -2px 0 rgba(26, 28, 27, 0.12); }
.handscroll .roll .knob.top { top: calc(var(--knob) * -1 + 4px); }
.handscroll .roll .knob.bottom { bottom: calc(var(--knob) * -1 + 4px); }
.handscroll .roll::after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: inherit; background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(255, 255, 255, 0.03) 9px 10px); }
.handscroll .track { position: relative; margin: 0 calc(var(--gutter) + var(--roll) - 6px); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; outline: none; }
.handscroll .track::-webkit-scrollbar { display: none; }
.handscroll .track.dragging { cursor: grabbing; }
.handscroll .track:focus-visible { box-shadow: 0 0 0 2px var(--cinnabar); }
.handscroll .mount { display: inline-flex; flex-direction: column; min-width: 100%; box-shadow: 0 18px 40px -24px rgba(26, 28, 27, 0.5); }
.handscroll .silk { height: var(--silk); background-color: #6f7f90;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23dfe6ec' stroke-opacity='.35' stroke-width='.9'%3E%3Cpath d='M12 1l11 11-11 11L1 12z'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Cpath d='M0 0l3 3M24 24l-3-3M24 0l-3 3M0 24l3-3'/%3E%3C/svg%3E");
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); }
.handscroll .sheet-strip { display: flex; align-items: stretch; background: var(--paper); position: relative; height: var(--paper-h); }
.handscroll .sheet-strip::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* the paper curls into shadow under each roll */
.handscroll::before, .handscroll::after { content: ""; position: absolute; top: var(--knob); bottom: var(--knob); width: 46px; z-index: 2; pointer-events: none; }
.handscroll::before { left: calc(var(--gutter) + var(--roll) - 6px); background: linear-gradient(90deg, rgba(26, 28, 27, 0.28), rgba(26, 28, 27, 0)); }
.handscroll::after { right: calc(var(--gutter) + var(--roll) - 6px); background: linear-gradient(270deg, rgba(26, 28, 27, 0.32), rgba(26, 28, 27, 0)); }
.handscroll .piece { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; width: 290px; padding: 14px 18px 12px; position: relative; text-decoration: none; }
.handscroll .piece + .piece::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 26px; border-left: 1px dashed var(--line-soft); }
.handscroll .piece img { width: auto; height: 150px; max-width: 100%; object-fit: contain; }
.handscroll .piece.seal img { height: 130px; }
.handscroll .piece figcaption { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--ink-3); }
.handscroll .piece figcaption .hz { color: var(--ink-2); }
.handscroll .frontis { width: 250px; align-items: flex-start; justify-content: center; gap: 8px; padding-left: 30px; background: var(--paper-2); }
.handscroll .frontis .brush-hz { font-size: 62px; line-height: 1; color: var(--ink); display: block; }
.handscroll .frontis p { font-size: 14.5px; color: var(--ink-2); margin: 0; max-width: 18ch; line-height: 1.4; }
.handscroll .stamp { position: absolute; right: 16px; bottom: 16px; width: 48px; height: 48px; background: var(--cinnabar); color: #fbefe9; font-family: var(--brush); font-size: 27px; display: grid; place-items: center; transform: rotate(-5deg); box-shadow: inset 0 0 0 2px rgba(251, 239, 233, 0.5); mix-blend-mode: multiply; opacity: .92; }
.handscroll .colophon { width: 320px; align-items: flex-start; justify-content: center; gap: 8px; padding: 14px 30px; background: var(--paper-2); color: var(--ink); }
.handscroll .colophon .brush-hz { font-size: 40px; line-height: 1; color: var(--ink-3); }
.handscroll .colophon strong { font-weight: 400; font-size: 24px; }
.handscroll .colophon > span:not(.btn):not(.brush-hz) { font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.handscroll .colophon .btn { margin-top: 6px; }
/* controls: arrows on the paper edge, a hint that fades after first use */
.handscroll .arrow { position: absolute; z-index: 4; top: calc(100% + 4px); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: opacity .2s, background .15s; }
.handscroll .arrow:hover { background: var(--ink); color: var(--paper); }
.handscroll .arrow.prev { right: calc(var(--gutter) + 44px); }
.handscroll .arrow.next { right: var(--gutter); }
.handscroll .arrow[disabled] { opacity: .3; cursor: default; }
.handscroll .hint-pill { position: absolute; z-index: 4; right: calc(var(--gutter) + var(--roll) + 24px); top: calc(var(--knob) + var(--silk) + 12px); background: var(--ink); color: var(--paper); font-size: 14px; padding: 7px 12px 7px 10px; border-radius: 999px; display: flex; align-items: center; gap: 8px; pointer-events: none; opacity: 0; transition: opacity .4s; }
.handscroll .hint-pill::before { content: "☜"; font-size: 16px; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
.handscroll.unrolled .hint-pill { opacity: 1; transition-delay: 2.2s; }
.handscroll.used .hint-pill { opacity: 0; transition-delay: 0s; }
/* the thread: how far the scroll is unrolled */
.thread { position: relative; height: 1px; background: var(--line); margin-top: 20px; width: calc(100% - 100px); margin-left: var(--gutter); max-width: none; }
.thread i { position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--cinnabar); left: 0; transition: left .15s linear; }
@media (max-width: 640px) {
  .handscroll { --roll: 22px; --knob: 14px; --silk: 16px; --paper-h: 190px; }
  .handscroll .piece { width: 220px; height: auto; }
  .handscroll .piece img { height: 104px; }
  .handscroll .piece.seal img { height: 96px; }
  .handscroll .frontis { display: none; }
  .handscroll .colophon { width: 250px; padding: 12px 18px; }
  .handscroll .arrow { width: 36px; height: 36px; font-size: 22px; }
  .handscroll .hint-pill { display: none; } /* a thumb already knows to swipe; the pill would sit on the ink */
}
/* the unroll: the right roll starts beside the left one and travels across,
   the paper appearing behind it; it runs once, when the scroll comes into view */
@media (prefers-reduced-motion: no-preference) {
  .handscroll.armed .track { clip-path: inset(0 100% 0 0); }
  .handscroll.armed .roll-right { right: auto; left: calc(var(--gutter) + var(--roll) + 6px); }
  .handscroll.armed .arrow, .handscroll.armed::after { opacity: 0; }
  .handscroll.unrolled .track { animation: unrollSheet 2.4s cubic-bezier(.3, .5, .2, 1) forwards; }
  .handscroll.unrolled .roll-right { animation: rollTravel 2.4s cubic-bezier(.3, .5, .2, 1) forwards; }
  .handscroll.unrolled .arrow, .handscroll.unrolled::after { animation: fadeIn .6s 2.2s both; }
  .handscroll.unrolled .frontis .stamp { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1) 1s both; }
  @keyframes unrollSheet { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes rollTravel { from { left: calc(var(--gutter) + var(--roll) + 6px); } to { left: calc(100% - var(--gutter) - var(--roll)); } }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes stamp { from { transform: rotate(-5deg) scale(1.8); opacity: 0; } to { transform: rotate(-5deg) scale(1); opacity: .92; } }
}

/* ---------- sections ---------- */
.section { padding: 104px 0 0; }
.section:last-of-type { padding-bottom: 96px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--ink-3); font-size: 16.5px; max-width: 48ch; }
@media (max-width: 640px) { .section { padding-top: 64px; } .section:last-of-type { padding-bottom: 64px; } .section-head { margin-bottom: 24px; } }

/* real name vs transliteration: two pieces of paper, one crossed out */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.compare .sheet { position: relative; padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.compare .big { font-family: var(--brush); font-size: clamp(44px, 5.4vw, 66px); line-height: 1.1; color: var(--ink); }
.compare .verdict { font-size: 15px; color: var(--ink-3); }
.compare .no .big { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--cinnabar); text-decoration-thickness: 3px; }
.compare .yes { box-shadow: var(--shadow-paper), inset 0 0 0 1px var(--cinnabar); }
.compare .yes .verdict { color: var(--cinnabar); }
.compare .explain { color: var(--ink-2); margin: 0; }
.compare .chars { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.compare .yes .chars { flex-direction: column; gap: 4px; }
.compare .chars span { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--ink-2); }
.compare .chars .hz { font-size: 22px; color: var(--ink); }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }

/* modules as a list of characters */
.modules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.modules li { grid-column: 1 / -1; display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.modules .glyph { font-family: var(--brush); font-size: 64px; line-height: 1; color: var(--ink); transition: color .2s; }
.modules li:not(.off):hover .glyph { color: var(--cinnabar); }
.modules li.off { grid-column: auto; grid-template-columns: 44px 1fr auto; gap: 10px 16px; padding: 18px 0; align-items: start; border-bottom-color: var(--line-soft); }
.modules li.off .glyph { font-size: 36px; padding-top: 2px; }
.modules li.off h3 { font-size: 17.5px; }
.modules li.off p { font-size: 15px; line-height: 1.5; }
.modules li.off .chip { align-self: start; }
.modules h3 { margin-bottom: 4px; }
.modules p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.modules a.row-link { text-decoration: none; }
.modules a.row-link:hover { text-decoration: underline; }
.modules li.off .glyph { color: #a7b9ae; }
.modules li.off h3, .modules li.off p { color: var(--ink-3); }
.chip { display: inline-block; font-size: 13.5px; padding: 3px 9px; border-radius: 2px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip-live { border-color: var(--cinnabar); color: var(--cinnabar); }
.chip-next { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) { .modules { grid-template-columns: 1fr; } .modules li { grid-template-columns: 64px 1fr; align-items: start; } .modules .glyph { font-size: 48px; } .modules .chip { grid-column: 2; justify-self: start; } .modules li.off { grid-template-columns: 40px 1fr; } .modules li.off .chip { grid-column: 2; justify-self: start; } }

/* steps: a real sequence, numbered */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 1px solid var(--ink); }
.steps li::before { content: counter(step, cjk-ideographic); display: block; font-family: var(--brush); font-size: 30px; line-height: 1; color: var(--cinnabar); margin-bottom: 12px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* pricing */
.price-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.price-list li span:last-child { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 18px; }
.price-list s { color: var(--ink-3); margin-right: 8px; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }

/* faq */
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary { transition: color .15s; }
.faq summary:hover { color: var(--cinnabar-2); }
.faq summary::after { content: "+"; color: var(--ink-3); flex: none; display: inline-block; width: 1em; text-align: center; transition: transform .25s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .faq details[open] p { animation: inkIn .4s var(--ease-out) both; } }

/* footer */
.footer { padding: 40px 0 48px; color: var(--ink-3); font-size: 14.5px; border-top: 1px solid var(--line-soft); margin-top: 56px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: inherit; }

/* ---------- name page ---------- */
.page-head { padding: 28px 0 24px; }
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-top: 14px; }
.finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; align-items: end; }
.finder .full { grid-column: 1 / -1; }
.finder-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; grid-column: 1 / -1; }
.finder-main .input { font-size: 20px; padding: 14px 16px; }
.finder-main .btn { align-self: stretch; }
.finder .options { grid-column: 1 / -1; }
.finder .options summary { cursor: pointer; color: var(--ink-2); font-size: 15.5px; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.finder .options summary::-webkit-details-marker { display: none; }
.finder .options summary::before { content: "+"; color: var(--ink-3); }
.finder .options[open] summary::before { content: "–"; }
.finder .options .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-top: 14px; }
.finder .options .grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .finder, .finder .options .grid { grid-template-columns: 1fr; } .finder-main { grid-template-columns: 1fr; } }

/* candidates: three drafts laid on the table, each signed like an inscription */
.candidates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.candidate { background: var(--paper); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-paper); position: relative; outline: 1px solid transparent; outline-offset: 0; }
.candidate[aria-pressed="true"] { outline-color: var(--cinnabar); }
.candidate .top { display: flex; gap: 20px; align-items: flex-start; }
.candidate .inscribe { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 0; border-right: 1px solid var(--line-soft); padding-right: 16px; }
.candidate .name-hz { font-family: var(--brush); font-size: 50px; line-height: 1.06; color: var(--ink); writing-mode: vertical-rl; letter-spacing: 0.06em; }
.candidate .pinyin { font-size: 19px; }
.candidate .feel { font-size: 15.5px; color: var(--ink-3); margin-top: 4px; }
.candidate .chars { list-style: none; padding: 0; margin: 10px 0 0; }
.candidate .chars li { display: grid; grid-template-columns: 30px 56px 1fr; gap: 8px; font-size: 15px; padding: 6px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.candidate .chars .hz { font-size: 21px; line-height: 1; }
.candidate .why { font-size: 15px; color: var(--ink-2); margin: 0; }
.candidate .btn { margin-top: auto; }
.candidate .seal { width: 34px; height: 34px; background: var(--cinnabar); color: #fbefe9; font-family: var(--brush); font-size: 20px; display: grid; place-items: center; transform: rotate(-4deg); box-shadow: inset 0 0 0 1.5px rgba(251, 239, 233, 0.5); opacity: .35; transition: opacity .3s; }
.candidate.stamped .seal { opacity: .95; }
@media (prefers-reduced-motion: no-preference) {
  .candidate .seal.stamp-in { animation: stampIn .45s cubic-bezier(.3, 1.5, .5, 1) both; }
  @keyframes stampIn { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-4deg) scale(1); opacity: .95; } }
}
.ink-in { animation: inkIn .8s var(--ease-out) both; }
@keyframes inkIn { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: blur(0); transform: none; } }
@media (prefers-reduced-motion: reduce) { .ink-in { animation: none; } }
/* the slot the next name will take, with the finder's progress line */
.candidate.pending { min-height: 150px; justify-content: center; align-items: center; text-align: center; background: transparent; box-shadow: none; outline: 1px dashed var(--line); color: var(--ink-3); font-size: 15.5px; }
.candidate.pending p { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .candidate.pending p { animation: breathe 1.8s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: .4; } }
}
@media (max-width: 880px) { .candidates { grid-template-columns: 1fr; } }
.results-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* collection gallery */
.chosen-bar { display: flex; align-items: center; gap: 18px; background: var(--paper); padding: 14px 18px; margin-top: 28px; flex-wrap: wrap; box-shadow: var(--shadow-paper); }
.chosen-bar .brush-hz { font-size: 34px; line-height: 1; }
.chosen-bar .btn { margin-left: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 20px; }
.gallery button { text-align: left; background: var(--paper); border: 0; padding: 14px 14px 12px; cursor: pointer; box-shadow: var(--shadow-paper); outline: 1px solid transparent; display: flex; flex-direction: column; gap: 8px; }
.gallery button[aria-selected="true"] { outline-color: var(--cinnabar); }
.gallery button:hover { outline-color: var(--ink); }
.gallery .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gallery .thumbs img { width: 100%; height: 54px; object-fit: contain; }
.gallery b { font-weight: 400; font-size: 18px; display: flex; gap: 8px; align-items: baseline; }
.gallery b .hz { font-size: 15px; color: var(--ink-3); }
.gallery small { color: var(--ink-3); font-size: 14px; line-height: 1.35; }
.collection-detail { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.collection-detail .styles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.collection-detail .style { position: relative; background: var(--paper); padding: 14px; box-shadow: var(--shadow-paper); }
.collection-detail .sample-tag { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: rgba(255, 255, 255, 0.88); padding: 2px 7px; }
.write-sheet .options-title { font-weight: 400; font-size: 22px; line-height: 1.3; margin: 0 0 14px; }
.write-sheet .options-title .hz { font-size: 26px; }
.write-sheet .options-lede { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, 0.08); color: var(--ink-3); }
.collection-detail .style img { height: 96px; width: 100%; object-fit: contain; }
.collection-detail .style b { display: block; font-weight: 400; margin-top: 8px; }
.collection-detail .style span { font-size: 14px; color: var(--ink-3); }
.collection-detail .controls { margin: 0 0 20px; grid-template-columns: 1fr; gap: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 14.5px; }
.swatch i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 760px) { .collection-detail { grid-template-columns: 1fr; } .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery button { padding: 10px; } .gallery b { font-size: 16px; } }

/* ---------- zodiac ---------- */
.birthday { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.birthday .select { width: auto; min-width: 96px; }
.animal-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 28px; }
.animal-strip a { text-decoration: none; text-align: center; padding: 10px 4px 10px; color: var(--ink-2); font-size: 14px; border-bottom: 2px solid var(--line-soft); }
.animal-strip a:hover, .animal-strip a[aria-current="page"] { border-bottom-color: var(--cinnabar); color: var(--ink); }
.animal-strip img { height: 64px; width: auto; margin: 0 auto 6px; object-fit: contain; }
.animal-strip .hz { display: block; font-family: var(--brush); font-size: 22px; line-height: 1; margin-bottom: 4px; color: var(--ink); }
@media (max-width: 880px) { .animal-strip { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 480px) { .animal-strip { grid-template-columns: repeat(4, 1fr); } .animal-strip img { height: 52px; } }
.zodiac-result { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; margin-top: 32px; }
.animal-card { background: var(--paper); padding: 26px 22px 24px; text-align: center; box-shadow: var(--shadow-paper); }
.animal-card .glyph { font-family: var(--brush); font-size: 120px; line-height: 1; }
.animal-card .year { font-size: 24px; margin-top: 2px; }
.animal-card .lunar { color: var(--ink-3); font-size: 15px; margin-top: 6px; }
.animal-card .moon { width: 240px; height: 240px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line), inset 0 8px 20px -14px rgba(26, 28, 27, 0.4); background: #fbfaf7; overflow: hidden; }
.animal-card img { height: 200px; width: auto; object-fit: contain; transform: translateY(4%); }
.facts { list-style: none; padding: 0; margin: 0 0 20px; }
.facts li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 16px; }
.facts li span:first-child { color: var(--ink-3); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .zodiac-result { grid-template-columns: 1fr; } .facts li { grid-template-columns: 1fr; gap: 2px; } .animal-card img { height: 200px; } }

/* animal pages */
.animal-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding: 20px 0 8px; }
.animal-hero .gate { aspect-ratio: 1; max-width: 440px; width: 100%; margin: 0 auto; background: linear-gradient(160deg, #e9ebe4, #d8ddd6); position: relative; display: grid; place-items: center; box-shadow: var(--shadow-paper); }
.animal-hero .gate::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: #cfd3cb; border-top: 1px solid rgba(26, 28, 27, 0.12); }
.animal-hero .hole { width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); overflow: hidden; display: grid; place-items: center; position: relative; z-index: 1; box-shadow: 0 0 0 10px #c3c8c0, 0 0 0 11px rgba(26, 28, 27, 0.18), inset 0 10px 24px -14px rgba(26, 28, 27, 0.45); }
.animal-hero .hole img { width: 80%; height: auto; transform: translateY(3%); }
.animal-hero .glyph { font-family: var(--brush); font-size: clamp(60px, 8vw, 110px); line-height: 1; margin-bottom: 8px; }
.animal-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.crumbs { font-size: 14.5px; color: var(--ink-3); padding-top: 4px; }
.crumbs a { color: inherit; }
.years { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.years li { background: var(--paper); padding: 8px 12px; font-size: 15.5px; box-shadow: var(--shadow-paper); }
.years li span { color: var(--ink-3); margin-left: 6px; font-size: 14px; }
@media (max-width: 760px) { .animal-hero { grid-template-columns: 1fr; gap: 20px; } .animal-hero .gate { max-width: 320px; } }

/* ---------- order page ---------- */
.order-grid { display: grid; grid-template-columns: 400px 1fr; gap: 44px; align-items: start; padding: 20px 0 56px; }
.poster-frame { background: var(--paper); padding: 14px; box-shadow: var(--shadow-paper); }
.poster-frame canvas { width: 100%; height: auto; }
.poster-actions { margin-top: 14px; display: flex; gap: 10px; }
.panel h1 { font-family: var(--brush); font-size: clamp(52px, 7vw, 80px); letter-spacing: .06em; line-height: 1; }
.panel .pinyin { font-size: 21px; margin-top: 8px; }
.panel .meta { color: var(--ink-3); font-size: 15px; margin-top: 10px; }
.status { background: var(--paper); padding: 14px 16px; margin: 20px 0; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-paper); }
.status.error { border-left: 3px solid var(--cinnabar); }
.brush { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); border-top-color: var(--ink); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brush { animation-duration: 3s; } }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 8px; }
.controls label { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.style-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.style-item { background: var(--paper); padding: 16px; box-shadow: var(--shadow-paper); }
.style-item header { margin-bottom: 8px; }
.style-item h3 { font-size: 19px; }
.style-item header > span { display: block; font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.style-item .thumb { height: 130px; display: grid; place-items: center; }
.style-item .thumb img { max-height: 120px; object-fit: contain; }
.dl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.unlock { background: var(--paper); padding: 22px; margin-top: 22px; box-shadow: var(--shadow-paper); border-left: 3px solid var(--cinnabar); }
.unlock h2 { font-size: 24px; }
.checklist { padding-left: 18px; color: var(--ink-2); }
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; }
.more-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.series-more { text-align: left; background: var(--paper); border: 0; outline: 1px solid transparent; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-paper); }
.series-more:hover { outline-color: var(--ink); }
.series-more b { display: block; font-weight: 400; font-size: 18px; }
.series-more span { font-size: 14px; color: var(--ink-3); }
.section-sub { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-sub h2 { font-size: 26px; margin-bottom: 6px; }
.section-sub h2 small { font-size: 14.5px; color: var(--ink-3); margin-left: 10px; }
.tattoo-controls { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; font-size: 15px; }
.tattoo-controls label { display: flex; align-items: center; gap: 8px; }
.tattoo-controls select, .meaning-row input, .meaning-row textarea, .admin input, .admin textarea { padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.mockups { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.mockups a { display: block; overflow: hidden; background: var(--paper); text-decoration: none; box-shadow: var(--shadow-paper); }
.mockups img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mockups span { display: block; font-size: 13.5px; color: var(--ink-3); padding: 6px 8px; }
.meaning { margin-top: 14px; font-size: 15px; }
.meaning .toned { font-size: 17px; margin-bottom: 4px; }
.meaning .summary { color: var(--ink-2); font-style: italic; margin-bottom: 8px; }
.meaning table { border-collapse: collapse; width: 100%; }
.meaning td { padding: 7px 8px 7px 0; vertical-align: top; border-top: 1px solid var(--line-soft); }
.meaning td.ch { font-family: var(--hanzi); font-size: 24px; width: 40px; line-height: 1.2; }
.meaning td.py { width: 70px; }
.meaning .pending { color: var(--ink-3); }
.meaning-row { display: grid; grid-template-columns: 40px 90px 1fr; gap: 8px; margin-bottom: 8px; align-items: start; }
.meaning-row .ch { font-family: var(--hanzi); font-size: 24px; }
.meaning-row textarea { grid-column: 2 / 4; min-height: 48px; }
.admin-top { display: grid; gap: 8px; margin-bottom: 12px; }
.zodiac-panel .facts { margin-top: 18px; }
/* on a phone the name and the status come first, then the poster, then the unlock box and the rest:
   the panel dissolves into the grid so its children can be ordered around the poster */
@media (max-width: 900px) {
  .order-grid { grid-template-columns: 1fr; gap: 18px; }
  .panel { display: contents; }
  .panel > * { order: 4; }
  .panel > h1, .panel > .pinyin, .panel > .meta, .panel > .linked, .panel > .status { order: 1; }
  .panel > h1 { margin-top: 4px; }
  .panel > .status { margin: 0; }
  .poster-box { order: 2; max-width: 420px; width: 100%; margin: 0 auto; }
  .panel > .unlock { order: 3; margin-top: 0; }
  .poster-frame { max-width: 420px; }
}
@media (max-width: 600px) { .style-list, .controls, .more-list { grid-template-columns: 1fr; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 2px; font-size: 15px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* the longer copy on tool pages: prose width, tables as in the guides */
.tool-copy p, .tool-copy ul, .tool-copy ol { max-width: 70ch; }
.tool-copy ul, .tool-copy ol { padding-left: 22px; margin: 0 0 1em; }
.tool-copy li { margin: 4px 0; }
.tool-copy h3 { font-size: 21px; margin: 22px 0 6px; }
.tool-copy table { border-collapse: collapse; width: 100%; max-width: 80ch; margin: 14px 0 22px; font-size: 16px; background: var(--paper); box-shadow: var(--shadow-paper); }
.tool-copy th, .tool-copy td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tool-copy th { font-weight: 400; color: var(--ink-3); font-size: 14.5px; }
.tool-copy td.hz { font-family: var(--hanzi); font-size: 20px; white-space: nowrap; }
.tool-copy .example { background: var(--paper); box-shadow: var(--shadow-paper); border-left: 3px solid var(--cinnabar); padding: 18px 22px; margin: 14px 0 22px; max-width: 80ch; }
.tool-copy .example .hz { font-family: var(--brush); font-size: 34px; line-height: 1.2; color: var(--ink); display: block; margin-bottom: 4px; }
.tool-copy .example .pinyin { color: var(--ink-2); font-style: italic; }
.page-head .byline { margin-top: 10px; color: var(--ink-3); }
@media (max-width: 720px) {
  .tool-copy table { font-size: 14.5px; }
  .tool-copy th, .tool-copy td { padding: 7px 6px; }
  .tool-copy td.hz { font-size: 18px; }
}

/* 具: the hub of tools and guides on the home page */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 8px; }
.hub-grid h3 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-bottom: 10px; }
.hub-grid .guide-list a { font-size: 19px; }
.hub-grid .guide-list span { font-size: 15.5px; }
.hub-grid .guide-list li { padding: 12px 0; }
.maker { margin-top: 32px; max-width: 70ch; color: var(--ink-2); }
@media (max-width: 720px) { .hub-grid { grid-template-columns: 1fr; gap: 24px; } }

/* static pages */
.prose { max-width: 70ch; }
.prose h2 { font-size: 26px; margin: 32px 0 10px; }

/* 章: each movement of the home page opens with one brush character, the way a
   chapter in a Chinese book is headed. The moon gate keeps its stitched 肖. */
#works h2::before, #real-name h2::before, #modules h2::before, #how h2::before, #proof h2::before, #tools h2::before, #pricing h2::before, #faq h2::before {
  display: block; font-family: var(--brush); font-size: 26px; line-height: 1; color: var(--cinnabar); margin-bottom: 10px; letter-spacing: 0; }
#works h2::before { content: "卷"; }
#real-name h2::before { content: "名"; }
#modules h2::before { content: "作"; }
#how h2::before { content: "法"; }
#tools h2::before { content: "具"; }
#pricing h2::before { content: "价"; }
#faq h2::before { content: "问"; }

/* ---------- the painted hero: an ink landscape with the headline in its sky ---------- */
.hero-ink { position: relative; background: var(--paper); min-height: 720px; overflow: hidden; box-shadow: inset 0 -1px 0 var(--line-soft); }
.hero-ink .shanshui { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-ink .hero-inner { position: relative; padding-top: 72px; padding-bottom: 64px; min-height: 720px; display: flex; align-items: flex-start; }
.hero-text { max-width: 560px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-text h1 { animation: inkIn 1.1s var(--ease-out) both; }
  .hero-text .lede, .hero-text .name-form, .hero-text .after { animation: inkIn .9s var(--ease-out) .25s both; }
  .inscription .brush-hz { animation: inkIn 1.2s var(--ease-out) .35s both; }
  .inscription .seal { animation: stampIn .5s cubic-bezier(.3, 1.5, .5, 1) 1.3s both; }
}
.hero-text h1 { max-width: 11ch; }
.hero-text .lede { margin: 22px 0 26px; max-width: 40ch; }
.hero-text .name-form { max-width: 520px; }
.hero-text .name-form .input { background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(2px); }
.hero-text .after { margin-top: 12px; }
.inscription { position: absolute; right: 7%; top: 44px; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.inscription .brush-hz { writing-mode: vertical-rl; font-size: 54px; line-height: 1; letter-spacing: 0.08em; color: var(--ink); opacity: .88; }
.inscription .seal { width: 34px; height: 34px; background: var(--cinnabar); color: #fbefe9; font-family: var(--brush); font-size: 20px; display: grid; place-items: center; transform: rotate(-4deg); box-shadow: inset 0 0 0 1.5px rgba(251, 239, 233, 0.5); opacity: .92; mix-blend-mode: multiply; }
@media (max-width: 880px) {
  .hero-ink { min-height: 0; }
  .hero-ink .shanshui { position: relative; height: 230px; inset: auto; }
  .hero-ink .hero-inner { padding-top: 14px; padding-bottom: 40px; min-height: 0; }
  .inscription { top: 18px; right: 18px; }
  .inscription .brush-hz { font-size: 36px; }
  .inscription .seal { width: 26px; height: 26px; font-size: 16px; }
}
.works { padding-top: 44px; }
@media (max-width: 640px) { .works { padding-top: 32px; } }
.btn-seal { box-shadow: inset 0 0 0 1px rgba(255, 240, 232, 0.35), inset 0 0 0 3px var(--cinnabar); }

/* the moon gate: a round opening in a plaster wall, the ink dragon seen through it */
.moongate { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.moongate .gate { aspect-ratio: 1; max-width: 420px; width: 100%; margin: 0 auto; background: linear-gradient(160deg, #e9ebe4, #d8ddd6); position: relative; display: grid; place-items: center; box-shadow: var(--shadow-paper); }
.moongate .gate::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.moongate .gate::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: #cfd3cb; border-top: 1px solid rgba(26, 28, 27, 0.12); }
.moongate .hole { width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); overflow: hidden; display: grid; place-items: center; position: relative; z-index: 1; box-shadow: 0 0 0 10px #c3c8c0, 0 0 0 11px rgba(26, 28, 27, 0.18), inset 0 10px 24px -14px rgba(26, 28, 27, 0.45); }
.moongate .hole img { width: 78%; height: auto; transform: translateY(3%); }
.moongate h2 { margin-top: 6px; }
/* a satin-stitched character: diagonal threads, a sheen, a stitched outline */
.stitch { display: inline-block; font-family: var(--brush); font-size: 64px; line-height: 1; color: transparent; background: repeating-linear-gradient(45deg, #b8352b 0 1.2px, #d1584b 1.2px 2.2px, #9b2a21 2.2px 3px); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.5)) drop-shadow(0 1px 1px rgba(26, 28, 27, 0.25)); }
@media (max-width: 760px) { .moongate { grid-template-columns: 1fr; gap: 28px; } .moongate .gate { max-width: 320px; } }

/* 窗棂: a lattice behind the list of what we make */
.lattice { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' fill='none' stroke='%231a1c1b' stroke-opacity='.055' stroke-width='1.2'%3E%3Cpath d='M0 48h96M48 0v96M16 16h64v64H16zM0 16h16M80 16h16M0 80h16M80 80h16M16 0v16M80 0v16M16 80v16M80 80v16M32 32h32v32H32z'/%3E%3C/svg%3E"); background-position: center top; }
.modules.lattice li { background: transparent; }

/* 回纹: a fret border along the top of the pricing sheet */
.fret { position: relative; padding-top: 38px; }
.fret::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' fill='none' stroke='%23b8352b' stroke-width='1.3'%3E%3Cpath d='M0 13h26V3H6v6h14V7H10'/%3E%3C/svg%3E") repeat-x; opacity: .85; }

/* 云纹: cloud scrolls in two corners of the paper */
.ornate { position: relative; }
.ornate::before, .ornate::after { content: ""; position: absolute; width: 46px; height: 46px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 54' fill='none' stroke='%23b8352b' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M4 30c0-8 6-12 12-10 2-8 14-9 17-1 7-3 15 2 13 10-1 4-4 6-8 6H12c-5 0-8-2-8-5z'/%3E%3Cpath d='M9 28c1-3 4-4 7-3M21 20c3-2 7-1 9 2M35 24c3 0 6 2 6 5'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .8; pointer-events: none; }
.ornate::before { right: 12px; top: 10px; }
.ornate::after { right: 12px; bottom: 10px; transform: scaleY(-1); }

/* 证: the sample certificate laid on the table, the promises beside it */
.proof { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.proof-cert { display: block; background: var(--paper); padding: 10px; box-shadow: var(--shadow-paper); transform: rotate(-1.2deg); transition: transform .3s var(--ease-out), box-shadow .3s; max-width: 400px; margin: 0 auto; }
.proof-cert:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 1px 0 rgba(26, 28, 27, 0.05), 0 28px 50px -30px rgba(26, 28, 27, 0.45); }
.proof-cert img { width: 100%; height: auto; display: block; }
.proof-list { list-style: none; margin: 0; padding: 0; }
.proof-list li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink-2); max-width: 56ch; line-height: 1.55; }
.proof-list li:last-child { border-bottom: 1px solid var(--line); }
.proof-list strong { font-weight: 500; color: var(--ink); display: block; margin-bottom: 2px; font-size: 19px; }
@media (max-width: 760px) { .proof { grid-template-columns: 1fr; gap: 28px; } .proof-cert { max-width: 300px; } }
#proof h2::before { content: "证"; }
/* the certificate thumbnail inside the tattoo unlock box on the order page */
.unlock-cert { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
.cert-thumb { display: block; text-decoration: none; color: var(--ink-3); font-size: 13px; text-align: center; }
.cert-thumb img { width: 110px; height: auto; display: block; box-shadow: var(--shadow-paper); margin-bottom: 6px; }
@media (max-width: 480px) { .unlock-cert { grid-template-columns: 1fr; } .cert-thumb img { width: 140px; margin: 0 auto 6px; } }
/* the $4.90 entry offer sits above the pack: ink edge, so the cinnabar stays with the main product */
.unlock-entry { border-left-color: var(--ink); }
.pay-note { margin: 12px 0 0; max-width: 62ch; color: var(--ink-3); line-height: 1.5; }
.pay-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.unlock-entry .checklist { margin: 0 0 4px; }

/* a traditional name is set in a kai hand with the traditional glyphs (Ma Shan Zheng has none) */
html.script-trad #chosen-hz, html.script-trad .panel h1 { font-family: "LXGW WenKai TC", "Kaiti TC", "BiauKai", "DFKai-SB", var(--brush); }

/* 联: the couplet form */
.couplet-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.couplet-form .full { grid-column: 1 / -1; }
.field-label { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: 15px; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 640px) { .couplet-form { grid-template-columns: 1fr; } }

/* 联: the couplet order page */
.couplet-lines { list-style: none; margin: 18px 0 0; padding: 0; }
.couplet-lines li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.couplet-lines li:last-child { border-bottom: 1px solid var(--line); }
.couplet-lines small { color: var(--ink-3); font-size: 13.5px; letter-spacing: .04em; }
.couplet-lines .hz { font-size: 34px; line-height: 1.2; }
.couplet-lines em { color: var(--ink-2); font-size: 16px; }
.couplet-lines span:last-child { color: var(--ink-2); }
#cwhy { margin-top: 12px; font-style: italic; }
.couplet-panel .dl { margin-top: 18px; }

/* 审: the checker's verdict sheet */
.checker .input.hz { font-size: 22px; }
.check-result { margin-top: 24px; }
.check-sheet { padding: 28px 28px 26px; }
.check-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.check-hz .big { font-family: var(--brush); font-size: clamp(56px, 8vw, 96px); line-height: 1.05; display: block; color: var(--ink); }
.check-hz .trad { display: block; font-size: 14.5px; color: var(--ink-3); margin-top: 6px; }
.check-head .pinyin { font-size: 21px; margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.check-head .verdict { font-size: 26px; font-weight: 400; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.check-head .verdict.warn { color: var(--cinnabar-2); }
.check-head .verdict.ok { color: var(--ink); }
.check-head .score { font-size: 14.5px; color: var(--ink-3); border: 1px solid var(--line); padding: 2px 8px; border-radius: 2px; white-space: nowrap; }
.check-head .explain { color: var(--ink-2); margin: 10px 0 0; max-width: 60ch; }
.check-chars { border-collapse: collapse; width: 100%; margin-top: 22px; font-size: 15.5px; }
.check-chars th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 13.5px; padding: 0 10px 6px 0; border-bottom: 1px solid var(--line); }
.check-chars td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.check-chars td.ch { font-size: 30px; line-height: 1; width: 48px; }
.check-chars td.py { font-style: italic; color: var(--ink-2); white-space: nowrap; }
.check-chars td.alone { color: var(--ink-2); }
.check-risks { margin-top: 20px; padding: 14px 18px; border-left: 3px solid var(--cinnabar); background: var(--paper-2); }
.check-risks h3, .check-skin h3 { font-size: 17px; margin-bottom: 6px; }
.check-risks ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.check-risks li { margin: 3px 0; }
.check-skin { margin-top: 20px; }
.check-skin p { margin: 0; color: var(--ink-2); max-width: 64ch; }
@media (max-width: 640px) { .check-sheet { padding: 20px 18px; } .check-top { grid-template-columns: 1fr; gap: 12px; } .check-chars { font-size: 14.5px; } .check-chars td.ch { font-size: 24px; width: 34px; } .check-chars td { padding: 8px 6px 8px 0; } }

/* ---------- guides and tool pages ---------- */
.guide .guide-head { padding: 8px 0 24px; max-width: 760px; }
.guide .guide-head .lede { margin-top: 14px; }
.guide .byline { margin-top: 12px; }
.guide-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; border-left: 1px solid var(--line); padding-left: 14px; }
.toc span { color: var(--ink-3); font-size: 13.5px; margin-bottom: 4px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.guide-body { max-width: 72ch; font-size: 18px; line-height: 1.65; }
.guide-body h2 { font-size: 30px; margin: 44px 0 12px; }
.guide-body h3 { font-size: 22px; margin: 28px 0 8px; }
.guide-body p { max-width: none; }
.guide-body ul, .guide-body ol { padding-left: 22px; margin: 0 0 1em; }
.guide-body li { margin: 4px 0; }
.guide-body blockquote { margin: 18px 0; padding: 14px 20px; background: var(--paper); box-shadow: var(--shadow-paper); border-left: 3px solid var(--cinnabar); }
.guide-body blockquote p:last-child { margin-bottom: 0; }
.guide-body table { border-collapse: collapse; width: 100%; margin: 14px 0 22px; font-size: 16px; background: var(--paper); box-shadow: var(--shadow-paper); }
.guide-body th, .guide-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.guide-body th { font-weight: 400; color: var(--ink-3); font-size: 14.5px; }
.guide-body td:first-child { font-family: var(--hanzi); font-size: 20px; white-space: nowrap; }
.guide-body code { font-family: inherit; background: var(--paper-2); padding: 1px 5px; }
.guide-body .reviewed { margin-top: 28px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.guide-faq { margin-top: 36px; }
.guide-faq h2 { font-size: 30px; margin-bottom: 10px; }
.tool-card { margin: 36px 0; background: var(--paper); box-shadow: var(--shadow-paper); border-left: 3px solid var(--cinnabar); padding: 22px 24px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tool-card h3 { font-size: 22px; margin-bottom: 4px; }
.tool-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guide-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.guide-list a { font-size: 20px; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list span { color: var(--ink-2); max-width: 70ch; }
.guide-list small { color: var(--ink-3); font-size: 14px; }
.guide-list.big a { font-size: 26px; }
.related { padding-bottom: 0; }
.tool-intro { max-width: 68ch; margin-top: 14px; }
.tool-intro p { max-width: none; }
.tools-nav { display: flex; gap: 14px; flex-wrap: wrap; flex-basis: 100%; margin-bottom: 14px; }
.tools-nav span { color: var(--ink-2); }
.name-index { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: none; }
.name-index a { text-decoration: none; color: var(--ink-2); }
.name-index a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .guide-grid { grid-template-columns: 1fr; gap: 20px; } .toc { position: static; } .guide-body { font-size: 17px; } .guide-body h2 { font-size: 26px; } .tool-card { flex-direction: column; align-items: flex-start; } }

/* zodiac: compatibility pair and chart, new-year pages */
.pair { display: grid; grid-template-columns: 180px 1fr 180px; gap: 28px; align-items: start; margin: 8px 0 0; }
.pair-animal { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); background: var(--paper); padding: 16px 12px 14px; box-shadow: var(--shadow-paper); }
.pair-animal img { width: 130px; height: auto; mix-blend-mode: multiply; }
.pair-animal .brush-hz { font-size: 36px; line-height: 1; }
.pair-text p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; }
.chart-wrap { overflow-x: auto; margin: 8px 0 12px; -webkit-overflow-scrolling: touch; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 13px; background: var(--paper); box-shadow: var(--shadow-paper); }
table.cmp th, table.cmp td { border: 1px solid rgba(0,0,0,.08); text-align: center; padding: 6px 4px; }
table.cmp th { font-weight: 500; color: var(--ink-2); white-space: nowrap; }
table.cmp th a { color: inherit; text-decoration: none; }
table.cmp th .hz { font-family: var(--brush, 'Ma Shan Zheng', serif); font-size: 20px; color: var(--ink); }
table.cmp tbody th { text-align: left; padding-left: 10px; }
table.cmp td a { display: block; color: var(--cinnabar); text-decoration: none; letter-spacing: -1px; }
table.cmp td.s1 a, table.cmp td.s2 a { color: var(--ink-3); }
table.cmp td.s3 a { color: var(--ink-2); }
table.cmp td.s5 { background: rgba(197,66,47,.06); }
@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .pair-text { grid-column: 1 / -1; order: 3; }
}
.guide-grid > * { min-width: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0; }
.table-wrap table { margin: 0; min-width: 100%; }
@media (max-width: 640px) { .guide-body table { font-size: 14px; } .guide-body td, .guide-body th { padding: 7px 8px; } }
@media (max-width: 640px) { .table-wrap td, .table-wrap th { white-space: nowrap; } .table-wrap td:last-child, .table-wrap th:last-child { white-space: normal; min-width: 170px; } }

.linked { font-size: 14.5px; color: var(--ink-2); margin: 6px 0 0; }

/* "Hear it" speaker next to a pinyin reading; hidden until the server says speech is on */
button.say { display: none; vertical-align: middle; margin-left: 4px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink-2); cursor: pointer; padding: 0; align-items: center; justify-content: center; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.speech-on button.say { display: inline-flex; }
button.say:hover { color: var(--cinnabar); border-color: var(--cinnabar); }
button.say svg { display: block; }
button.say.loading { color: var(--ink-3); }
button.say.loading .w1, button.say.loading .w2 { animation: sayPulse 0.9s ease-in-out infinite; }
button.say.loading .w2 { animation-delay: 0.3s; }
button.say.playing { color: var(--paper); background: var(--cinnabar); border-color: var(--cinnabar); }
button.say.playing .w2 { animation: sayPulse 1.1s ease-in-out infinite; }
button.say.failed { color: var(--ink-3); border-style: dashed; }
@keyframes sayPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* analytics consent notice (EU/EEA, UK, Switzerland): one line, two buttons, out of the way */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; margin: 0 auto; max-width: 720px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 18px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(26, 28, 27, 0.14); font-size: 14.5px; line-height: 1.5; opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; }
.consent.show { opacity: 1; transform: none; }
.consent p { margin: 0; flex: 1 1 320px; }
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.consent .btn { padding: 8px 16px; font-size: 14.5px; }
@media (max-width: 600px) { .consent { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; } .consent-actions { width: 100%; } .consent-actions .btn { flex: 1; } }

/* Guide figures: a sample image with a caption, used by the calligraphy scripts guide. */
.guide-body .guide-figure { margin: 16px 0 26px; padding: 18px 22px 12px; background: var(--paper); box-shadow: var(--shadow-paper); }
.guide-body .guide-figure img { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; }
.guide-body .guide-figure figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-3); text-align: center; }
.guide-body .guide-figure figcaption a { color: var(--cinnabar); }

.guide-figure .figure-link { display: block; }
.guide-figure .figure-link img { transition: transform .25s ease; }
.guide-figure .figure-link:hover img { transform: translateY(-2px); }
