/* Layout: rice-paper page over faint ink-wash buildings; raised, framed panels like lacquered almanac boards.
   Chart left, luck right, interactions/elements/card below; readings and the stem index follow. */
:root {
  color-scheme: light;
  --paper: #ece6da;
  --paper-deep: #e1d9c8;
  --panel: #f6f2ea;
  --panel-2: #f2ede3;
  --ink: #2b2722;
  --qing: #3e7a6c;
  --dai: #2c3e5c;
  --ink-soft: #5d554b;
  --ink-faint: #8a8174;
  --line: #cfc5b3;
  --line-soft: #e2dbcd;
  --gold: #8c6f45;
  --gold-hi: #c9a24f;
  --gold-soft: #f1e6cc;
  --seal: #a8402e;
  --seal-hi: #cc4a3c;
  --seal-deep: #852419;
  --seal-soft: #f6e3dc;

  --wood: #2e7a4b;
  --fire: #c0392b;
  --earth: #8a5a2b;
  --metal: #b07a12;
  --water: #2a5c8f;

  --shadow-1: 0 1px 2px rgba(70, 48, 22, .07), 0 6px 16px -6px rgba(70, 48, 22, .16);
  --shadow-2: 0 1px 2px rgba(70, 48, 22, .08), 0 10px 26px -10px rgba(70, 48, 22, .26), 0 30px 60px -30px rgba(70, 48, 22, .3);
  --shadow-3: 0 2px 4px rgba(70, 48, 22, .1), 0 18px 40px -12px rgba(70, 48, 22, .34);

  --f-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --f-body: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --f-brush: "Ma Shan Zheng", "Noto Serif SC", "STKaiti", "KaiTi", serif;

  --r: 6px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Rice paper with a faint fibre texture; ink text; cinnabar, qing-green, dai-blue and old gold as accents. */
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(62, 122, 108, .07), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 45%, rgba(44, 62, 92, .05), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .26 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 16px/1.7 var(--f-body);
}
.panel, .pkg, .lb-inner, .combo-list {
  --ink: #2b2722; --ink-soft: #5d554b; --ink-faint: #8a8174;
  --line: #cfc5b3; --line-soft: #e2dbcd;
  --paper: #ece6da; --paper-deep: #e1d9c8; --gold: #8c6f45; --gold-soft: #f1e6cc;
  --wood: #2e7a4b; --fire: #c0392b; --earth: #8a5a2b; --metal: #b07a12; --water: #2a5c8f;
  color: var(--ink);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--seal); }
.panel a:not(.btn-primary):not(.btn-gold), .pkg a:not(.btn-primary) { color: var(--seal); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Ink-wash silhouettes of a hall, gate, pavilion and pagoda, fixed behind the page */
.bg-arch {
  position: fixed; left: 0; right: 0; bottom: 0; height: min(46vh, 460px); z-index: -1;
  color: #2c3e5c; opacity: .06; pointer-events: none; will-change: transform;
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent);
  mask-image: linear-gradient(to top, #000 55%, transparent);
}
.bg-arch svg { width: 100%; height: 100%; display: block; }
main, .site-foot { position: relative; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.zh-sm { font-size: .78em; color: var(--ink-faint); font-weight: 400; letter-spacing: .05em; }
.opt { font-size: .8em; color: var(--ink-faint); font-weight: 400; }
.sub { display: block; font-size: 12px; color: var(--ink-faint); letter-spacing: .03em; }

/* ---------- Header ---------- */
.site-head {
  border-bottom: 1px solid rgba(168, 132, 63, .45);
  background: linear-gradient(180deg, rgba(252, 249, 242, .96), rgba(246, 240, 228, .96));
  box-shadow: 0 6px 18px -12px rgba(60, 45, 20, .35);
  position: relative; z-index: 5; color: var(--ink);
}
.site-head::after { /* 回纹 meander band */
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 7.5h7.5V1.5h-5v3h2' fill='none' stroke='%23a07a2c' stroke-width='1' opacity='.55'/%3E%3Cpath d='M8 0.5v7h7.5' fill='none' stroke='%23a07a2c' stroke-width='1' opacity='.25'/%3E%3C/svg%3E");
  background-repeat: repeat-x; pointer-events: none;
}
.site-head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-seal {
  width: 46px; height: 46px; display: block; flex: none; border-radius: 4px;
  filter: drop-shadow(0 3px 6px rgba(133, 36, 25, .22)) drop-shadow(0 1px 1px rgba(60, 30, 20, .2));
  transition: transform .25s ease;
}
.brand:hover .brand-seal { transform: rotate(-4deg); }
.brand-seal .seal-mark { width: 100%; height: 100%; display: block; }
.brand-seal-sm { width: 30px; height: 30px; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 27px/1 var(--f-display); letter-spacing: .04em; font-variant-numeric: lining-nums; }
.brand-sub { font-size: 12.5px; color: var(--seal); letter-spacing: .38em; margin-top: 5px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-link {
  background: none; border: 0; padding: 7px 11px; cursor: pointer; text-decoration: none;
  color: var(--ink-soft); font-size: 14px; border-radius: var(--r);
}
.nav-link:hover { color: var(--ink); background: rgba(168, 132, 63, .1); }
.nav-link[aria-current] { color: var(--seal); font-weight: 600; }
.lang-btn {
  margin-left: 6px; border: 1px solid var(--gold); border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--seal); border-color: var(--seal);
}
.lang-btn:hover { background: var(--seal); color: #fff8ee; }

/* ---------- Panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, #fdfbf6 0%, var(--panel) 40%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), var(--shadow-2);
  padding: 24px;
  min-width: 0;
}
.panel::before { /* inner frame line */
  content: ""; position: absolute; inset: 5px; border: 1px solid var(--line-soft); border-radius: 3px; pointer-events: none;
}
.panel::after { /* gold corner brackets */
  content: ""; position: absolute; inset: 3px; pointer-events: none; opacity: .7;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 16px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1.5px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 16px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 1.5px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 16px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1.5px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 16px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1.5px 16px no-repeat;
}
.panel > * { position: relative; }
.panel-title, .sec-head h2 { font: 600 26px/1.15 var(--f-display); margin: 0; text-wrap-style: balance; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { font-size: 24px; }
.seal-sm {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 3px;
  background: linear-gradient(145deg, var(--seal-hi), var(--seal) 60%, var(--seal-deep)); color: #fbf3e8; font: 17px/1 var(--f-brush);
  box-shadow: inset 0 0 0 1.5px rgba(251, 243, 232, .45), 0 2px 4px -1px rgba(124, 34, 25, .5);
}
.seal-lg { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 6px; font: 36px/1 var(--f-brush); color: #fbf3e8;
  background: linear-gradient(145deg, var(--seal-hi), var(--seal) 60%, var(--seal-deep)); box-shadow: inset 0 0 0 2px rgba(251, 243, 232, .5), 0 6px 14px -4px rgba(124, 34, 25, .55); }
.sec-note { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; }


/* ---------- Landing hero: ink-wash hills on rice paper, a moon gate with the solar-term dial, cards stepping out of it ---------- */
.hero { position: relative; overflow: hidden; color: var(--ink); isolation: isolate; padding-block: 56px 120px; }
.hero-sky { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 64%; z-index: -1; }
.hero::after { /* gold meander under the landscape */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 7.5h7.5V1.5h-5v3h2' fill='none' stroke='%23a8843f' stroke-width='1' opacity='.7'/%3E%3Cpath d='M8 0.5v7h7.5' fill='none' stroke='%23a8843f' stroke-width='1' opacity='.35'/%3E%3C/svg%3E") repeat-x center;
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; min-height: 520px; }
.hero-copy { position: relative; padding-left: 64px; max-width: 580px; }
.tiqian { /* vertical title slip */
  position: absolute; left: 0; top: 6px; writing-mode: vertical-rl; letter-spacing: .5em;
  padding: 16px 9px; font: 600 15px/1 var(--f-body); color: #f4efe4;
  background: linear-gradient(180deg, #34496b, var(--dai)); border: 1px solid #1d2b42; border-radius: 2px;
  box-shadow: inset 0 0 0 3px var(--dai), inset 0 0 0 4px rgba(244, 239, 228, .45), 0 8px 16px -8px rgba(30, 40, 60, .6);
}
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.hero-title {
  margin: 0 0 22px; font: 400 clamp(48px, 5.6vw, 86px)/1.05 var(--f-brush); letter-spacing: .04em; color: var(--ink); white-space: nowrap;
  text-shadow: 0 1px 0 #fff, 0 6px 18px rgba(30, 25, 15, .12);
  text-wrap-style: balance;
}
.hero-title em { display: block; font-style: normal; font-size: .4em; letter-spacing: .14em; margin-top: 14px; color: var(--seal); }
:is(:lang(en), :lang(fr)) .hero-title { font: 600 clamp(40px, 4.6vw, 66px)/1.04 var(--f-display); letter-spacing: .01em; white-space: normal; }
:is(:lang(en), :lang(fr)) .hero-title em { font-style: italic; font-size: .6em; letter-spacing: 0; margin-top: 8px; }
:is(:lang(en), :lang(fr)) .btn-gold, :is(:lang(en), :lang(fr)) .btn-line { letter-spacing: .03em; }
:is(:lang(en), :lang(fr)) .hero-now strong { letter-spacing: .02em; }
.hero-lede { margin: 0 0 30px; max-width: 30em; padding-top: 20px; border-top: 1px solid rgba(168, 132, 63, .45); color: var(--ink-soft); font-size: 16px; line-height: 1.85; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; border: 0;
  padding: 14px 30px; border-radius: 4px; font-weight: 700; font-size: 16px; letter-spacing: .12em; color: #fff8ee;
  background: linear-gradient(180deg, var(--seal-hi), var(--seal) 55%, #9a2c21);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 220, .25), inset 0 0 0 4px var(--seal), inset 0 0 0 5px rgba(255, 240, 220, .45), 0 3px 0 var(--seal-deep), 0 14px 26px -10px rgba(133, 36, 25, .55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-gold:active { transform: translateY(2px); box-shadow: inset 0 0 0 4px var(--seal), inset 0 0 0 5px rgba(255, 240, 220, .45), 0 1px 0 var(--seal-deep); }
.btn-line {
  display: inline-flex; align-items: center; padding: 13px 24px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 15px;
  color: var(--dai); border: 1px solid var(--dai); background: rgba(252, 249, 242, .7); transition: background .15s, color .15s; letter-spacing: .06em;
}
.btn-line:hover { background: var(--dai); color: #f4efe4; }
.hero-nums {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 14px 0; max-width: 30em;
  background: rgba(252, 249, 242, .88); border: 1px solid rgba(168, 132, 63, .45); border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgba(252, 249, 242, .9), inset 0 0 0 4px rgba(168, 132, 63, .25), 0 10px 24px -14px rgba(30, 35, 50, .45);
}
.hero-nums div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-nums div + div { border-left: 1px solid rgba(168, 132, 63, .35); }
.hero-nums dt { font: 600 36px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--dai); }
.hero-nums dd { margin: 0; font-size: 12.5px; color: var(--gold); letter-spacing: .1em; }
.hero-now { margin: 14px 0 0; max-width: 30em; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.hero-now:empty { display: none; }
.hero-now strong { color: var(--seal); letter-spacing: .1em; margin-right: 4px; }
.now-sep { color: var(--gold); margin: 0 6px; }
.now-sub { display: block; padding-left: 17px; } /* lunar date and solar term on their own line, under the pillars */
.live-dot { display: inline-block; vertical-align: middle; margin: -2px 8px 0 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--seal); box-shadow: 0 0 0 3px rgba(184, 58, 46, .18); animation: now-pulse 2.4s ease-in-out infinite; }
@keyframes now-pulse { 50% { box-shadow: 0 0 0 6px rgba(184, 58, 46, 0); } }
.gate .dial-hl { fill: rgba(184, 58, 46, .14); stroke: rgba(184, 58, 46, .45); stroke-width: .8; }
.gate text.dial-on { fill: #b83a2e; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* The dial is the top half of a moon gate; the cards sit just under its base, overlapping it a little */
.hero-fan { position: relative; height: calc(var(--gate) * .516 + var(--card-w) * 1.62 - 34px); perspective: 1400px; --spread: 82px; --card-w: 168px; --gate: 470px; }
.gate {
  position: absolute; left: 50%; top: 0; width: var(--gate); height: calc(var(--gate) * .516); transform: translateX(-50%);
  filter: drop-shadow(0 18px 30px rgba(40, 50, 70, .25)) drop-shadow(0 2px 3px rgba(40, 50, 70, .15));
}
.fan-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(6deg); animation: fan-drift 7s ease-in-out infinite; }
@keyframes fan-drift { 0%, 100% { transform: rotateX(6deg) translateY(0); } 50% { transform: rotateX(4deg) translateY(-8px); } }
.fan-card {
  position: absolute; left: 50%; bottom: 0; width: var(--card-w); margin-left: calc(var(--card-w) / -2);
  padding: 0; border: 0; background: none; cursor: zoom-in; z-index: var(--z);
  transform-origin: 50% 130%;
  transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 14px)) rotate(calc(var(--i) * 9deg)) translateZ(calc(var(--z) * 4px));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s;
  filter: drop-shadow(0 18px 22px rgba(30, 35, 50, .35)) drop-shadow(0 3px 4px rgba(30, 35, 50, .25));
}
.fan-card img { display: block; width: 100%; height: auto; border-radius: 12px; }
.fan-card:hover, .fan-card:focus-visible {
  z-index: 20; filter: drop-shadow(0 26px 30px rgba(30, 35, 50, .4));
  transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 14px - 34px)) rotate(calc(var(--i) * 5deg)) translateZ(80px) scale(1.06);
}

/* ---------- Intro + form ---------- */
/* Left column follows the long form: double-hour reference and what the chart contains */
.intro { position: sticky; top: 20px; align-self: start; }
.intro-extra { display: grid; gap: 28px; margin-top: 32px; }
.sc-title { margin: 0 0 4px; font: 600 20px/1.2 var(--f-display); }
:lang(zh) .sc-title { font: 600 18px/1.3 var(--f-body); letter-spacing: .08em; }
:lang(zh) .sc-title .zh-sm { display: none; }
.shichen { padding: 24px 26px; }
.shichen .help { margin: 0 0 12px; }
.sc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sc-cell {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px 7px; border-radius: 4px;
  background: linear-gradient(180deg, #fffefa, #f6f0e3); border: 1px solid var(--line-soft); font-variant-numeric: tabular-nums;
  transition: background .2s, border-color .2s, transform .2s;
}
.sc-cell .sc-b { font: 700 24px/1.15 var(--f-body); }
.sc-cell .sc-a { font-size: 12.5px; color: var(--ink-soft); }
.sc-cell .sc-t { font-size: 11.5px; color: var(--ink-faint); }
.sc-cell.on { border-color: var(--seal); background: linear-gradient(180deg, #fbebe5, var(--seal-soft)); box-shadow: inset 0 0 0 1px var(--seal), 0 6px 14px -8px rgba(133, 36, 25, .5); transform: translateY(-2px); }
.gets-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gets-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 4px; background: rgba(255, 253, 247, .75); box-shadow: 0 6px 16px -12px rgba(30, 35, 50, .35); }
.gets-list .seal-sm { margin-top: 2px; }
.gets-list strong { display: block; font-size: 15px; margin-bottom: 2px; }
.gets-list div > span { font-size: 13px; color: var(--ink-soft); line-height: 1.55; display: block; }

.view { padding-block: 40px 24px; }
.view-form { padding-top: 0; }
.view-form > .form-layout { padding-top: 48px; }
.intro-title { font: 600 clamp(32px, 3.6vw, 46px)/1.1 var(--f-display); margin: 0 0 18px; }
.intro-hint { margin: 0; font-size: 14px; color: var(--ink-faint); }
:lang(zh) .intro-title { font: 400 clamp(34px, 4vw, 48px)/1.1 var(--f-brush); letter-spacing: .04em; }
.intro-title, .readings > .wrap > .sec-head h2, .stems .sec-head h2, .play .sec-head h2, .teamsec .sec-head h2 { color: var(--ink); }
.readings > .wrap > .sec-head h2, .stems .sec-head h2, .play .sec-head h2, .teamsec .sec-head h2 { font-size: clamp(28px, 3.2vw, 38px); }
:lang(zh) .readings > .wrap > .sec-head h2, :lang(zh) .stems .sec-head h2, :lang(zh) .play .sec-head h2 { font-family: var(--f-brush); font-weight: 400; letter-spacing: .06em; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 56px; align-items: start; }
.intro { padding-top: 16px; position: relative; }
.eyebrow { font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--seal); margin: 0 0 14px; font-weight: 600; }
h1 { font: 600 clamp(34px, 4.6vw, 56px)/1.06 var(--f-display); margin: 0 0 18px; text-wrap-style: balance; text-shadow: 0 1px 0 #fff, 0 2px 6px rgba(70, 48, 22, .12); }
.lede { color: var(--ink-soft); max-width: 46ch; margin: 0 0 10px; font-size: 16.5px; line-height: 1.8; }
.lede.narrow { max-width: 66ch; margin-bottom: 20px; }
.lede.wide { max-width: none; margin-bottom: 22px; } /* one long line across the section */
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }

.form-panel { display: flex; flex-direction: column; gap: 22px; padding: 30px 32px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; letter-spacing: .02em; }
label.sub { margin-bottom: 4px; }
.help { font-size: 13.5px; color: var(--ink-soft); margin: 7px 0 0; line-height: 1.6; }
.solar-help { margin-top: -12px; }
input[type=text], input[type=number], input[type=email], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fffdf8; min-height: 46px; font-size: 15px;
  box-shadow: inset 0 2px 3px rgba(70, 48, 22, .07), 0 1px 0 rgba(255, 255, 255, .9);
}
/* our own dropdown arrow, set in from the edge, instead of the browser's */
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a8843f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
}
select:disabled { opacity: .55; cursor: not-allowed; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: inset 0 2px 3px rgba(70, 48, 22, .06), 0 0 0 3px var(--gold-soft); }
input:disabled, select:disabled { opacity: .55; }
.row3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.time-row { grid-template-columns: 1fr 1fr 1.3fr; align-items: end; }

.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #f4ede0; box-shadow: inset 0 2px 4px rgba(70, 48, 22, .1); padding: 3px; gap: 3px; }
.seg label { flex: 1; position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 8px; font-size: 14px; border-radius: 4px; transition: background .15s, box-shadow .15s; }
.seg input:checked + span {
  background: linear-gradient(180deg, #3a322b, var(--ink)); color: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 5px -1px rgba(0, 0, 0, .35);
}
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -3px; }

.check, .radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input, .radio input { margin-top: 4px; accent-color: var(--seal); width: 16px; height: 16px; flex: none; }
.time-row .check { padding-bottom: 11px; }
.radio { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }
.radio b { color: var(--ink); font-weight: 600; }

.settings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 10px; }
.settings summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.settings[open] summary { margin-bottom: 10px; }
.settings .field { margin-top: 12px; }

.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: #fffdf8; border: 1px solid var(--line); border-radius: var(--r); max-height: 280px; overflow-y: auto; box-shadow: var(--shadow-3);
}
.combo-list li { padding: 8px 10px; border-radius: 4px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.combo-list li small { color: var(--ink-faint); }
.combo-list li[aria-selected=true], .combo-list li:hover { background: var(--gold-soft); }
.combo-list li.manual { border-top: 1px solid var(--line-soft); color: var(--seal); }

.errors { background: var(--seal-soft); border: 1px solid #e3b9ad; color: #7d2419; border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; margin: 0; }
.errors ul { margin: 0; padding-left: 18px; }

/* Lacquered buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: linear-gradient(180deg, var(--seal-hi), var(--seal) 55%, #93291f); color: #fff8ee; border: 0; border-radius: var(--r);
  padding: 13px 20px; font-weight: 600; font-size: 16px; cursor: pointer; letter-spacing: .03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .12), 0 3px 0 var(--seal-deep), 0 10px 18px -6px rgba(124, 34, 25, .5);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 var(--seal-deep), 0 4px 8px -4px rgba(124, 34, 25, .5); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-ghost {
  background: linear-gradient(180deg, #fffcf5, #f5ecda); border: 1px solid var(--gold); color: var(--ink); border-radius: 999px;
  padding: 8px 18px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(160, 122, 44, .35), 0 6px 12px -6px rgba(160, 122, 44, .5);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-ghost:hover { transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(160, 122, 44, .35); }

/* ---------- Summary ---------- */
.summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: start; margin-bottom: 22px; }
.sum-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sum-title h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: var(--ink-soft); box-shadow: 0 1px 2px rgba(70, 48, 22, .08); }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 6px 28px; margin: 14px 0 0; grid-column: 1 / -1; }
.sum-grid div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; font-size: 13.5px; padding-block: 5px; border-bottom: 1px dotted var(--line); }
.sum-grid dt { color: var(--ink-faint); font-size: 12px; letter-spacing: .04em; padding-top: 2px; }
.sum-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.warn { grid-column: 1 / -1; background: var(--gold-soft); border: 1px solid #dcc79a; border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; }
.warn p { margin: 0; } .warn p + p { margin-top: 6px; }

/* ---------- Result page night band ---------- */
#view-result { position: relative; padding-top: 96px; }
.result-sky {
  position: absolute; left: 0; right: 0; top: 0; height: 460px; z-index: -1; overflow: hidden; pointer-events: none;
  opacity: .8;
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent);
}
.result-sky .hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Result grid ---------- */
.result-grid {
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas: "today today" "table card" "book book" "luck luck" "rel rel" "el el";
}
.area-today { grid-area: today; }
.today-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.today-date { margin-left: auto; font-size: 14px; color: var(--ink-soft); }
.today-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: start; }
.today-score { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.today-score svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.ts-track { fill: none; stroke: var(--line-soft); stroke-width: 7; }
.ts-bar { fill: none; stroke: var(--seal); stroke-width: 7; stroke-linecap: round; }
.ts-n { position: absolute; top: 40px; left: 0; right: 0; text-align: center; font: 700 44px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--seal); }
.ts-cap { font-size: 13px; color: var(--ink-soft); letter-spacing: .06em; }
.today-god { margin: 0; font-size: 15px; color: var(--ink-soft); }
.today-god strong { color: var(--seal); font-size: 18px; }
.sub-inline { color: var(--ink-faint); font-size: 13px; }
.today-theme { margin: 6px 0 16px; font: 600 20px/1.5 var(--f-body); }
.today-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.today-lists h3 { margin: 0 0 8px; font: 700 15px/1 var(--f-body); letter-spacing: .1em; display: inline-block; padding: 5px 12px; border-radius: 3px; color: #fff8ee; }
.today-yi { background: var(--wood); }
.today-ji { background: var(--seal); }
.today-lists ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; }
.today-lists li { padding-left: 18px; position: relative; }
.today-lists li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.today-notes { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--gold-soft); border: 1px solid #dcc79a; }
.today-notes h3 { margin: 0 0 6px; font: 700 14px/1.3 var(--f-body); color: #6d521b; }
.today-notes p { margin: 0; font-size: 14px; }
.today-notes p + p { margin-top: 6px; }
@media (max-width: 700px) {
  .today-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .today-date { margin-left: 0; width: 100%; }
  .today-lists { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.area-table { grid-area: table; }
.area-luck { grid-area: luck; }
.area-card { align-self: stretch; }
.area-card > .dm-panel { height: 100%; }
.area-rel { grid-area: rel; }
.area-el { grid-area: el; }
.area-card { grid-area: card; min-width: 0; }

/* ---------- Pillar table ---------- */
.table-scroll { overflow-x: auto; position: relative; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); }
.scroll-hint { display: none; font-size: 12px; color: var(--ink-faint); margin: 0 0 6px; }
table.pillars { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-variant-numeric: tabular-nums; }
.pillars th, .pillars td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.pillars thead th { font-weight: 600; font-size: 13px; padding-block: 10px; background: var(--panel); }
.pillars thead th .zh-sm { display: block; font-size: 12px; }
.pillars thead th.flow { color: var(--ink-soft); font-weight: 500; }
.pillars th[scope=row] {
  position: sticky; left: 0; z-index: 2; background: var(--panel); text-align: left; font-weight: 500;
  font-size: 12.5px; color: var(--ink-soft); width: 118px; min-width: 118px; line-height: 1.25; box-shadow: 1px 0 0 var(--line-soft);
}
.pillars th[scope=row] .zh-sm { display: block; font-size: 11.5px; }
.pillars thead th:first-child { position: sticky; left: 0; z-index: 3; }
.pillars tr.zebra td, .pillars tr.zebra th[scope=row] { background: #f7f2e7; }
.pillars td.flow { background: rgba(160, 122, 44, .06); }
.pillars td.sep, .pillars th.sep { border-left: 2px solid var(--line); }
.pillars td.daycol { background: rgba(168, 54, 42, .04); }
.big { font: 700 36px/1.1 var(--f-body); display: block; text-shadow: 0 1px 0 #fff, 0 3px 5px rgba(70, 48, 22, .18); }
.polel { display: block; font-size: 11px; color: var(--ink-faint); letter-spacing: .06em; margin-top: 2px; }
.stack { display: grid; grid-template-rows: repeat(3, 22px); gap: 2px; justify-items: center; align-items: center; font-size: 13.5px; }
.stack .qi { font-size: 10px; color: var(--ink-faint); margin-left: 3px; }
.ss-list { display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 12.5px; color: var(--gold); }
.void-slot { display: flex; justify-content: center; align-items: center; height: 24px; margin-top: 4px; }
.void-mark { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 5px; border: 1px solid var(--seal); color: var(--seal); background: var(--seal-soft); border-radius: 3px; letter-spacing: .08em; }
.term-pop p.tp-note { color: #f3b8a4; font-weight: 600; }
.unknown { color: var(--ink-faint); font-size: 13px; }
.unknown .big { color: var(--line); text-shadow: none; }
.dash { color: var(--line); }
.table-notes { font-size: 12px; color: var(--ink-soft); margin: 12px 0 0; padding-left: 18px; }
.table-notes li + li { margin-top: 3px; }

.el-wood { color: var(--wood); } .el-fire { color: var(--fire); } .el-earth { color: var(--earth); } .el-metal { color: var(--metal); } .el-water { color: var(--water); }
.bg-wood { background: linear-gradient(90deg, #3f9562, var(--wood)); } .bg-fire { background: linear-gradient(90deg, #d9584a, var(--fire)); }
.bg-earth { background: linear-gradient(90deg, #a87443, var(--earth)); } .bg-metal { background: linear-gradient(90deg, #d39c2c, var(--metal)); }
.bg-water { background: linear-gradient(90deg, #3d78b0, var(--water)); }

/* term buttons + tooltip */
.term {
  background: none; border: 0; padding: 0; margin: 0; cursor: help; color: inherit; font: inherit; line-height: inherit;
  text-decoration: underline dotted rgba(98, 87, 75, .35); text-underline-offset: 3px;
}
.term .big { text-decoration: none; }
.term:hover { text-decoration-color: var(--gold); }
.term-pop {
  position: fixed; z-index: 50; max-width: 290px; color: #f6efe2; border-radius: 8px; padding: 11px 13px; font-size: 13px; line-height: 1.5;
  background: linear-gradient(180deg, #3a312a, #26201b); border: 1px solid #574a3c;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .2), 0 16px 32px -8px rgba(0, 0, 0, .45);
}
.term-pop .tp-zh { font-size: 18px; font-weight: 700; margin-right: 8px; }
.term-pop .tp-en { font: 600 16px/1.2 var(--f-display); color: #e8cf96; }
.term-pop p { margin: 6px 0 0; color: #ddd3c2; }

/* ---------- Luck panel ---------- */
.luck-facts { display: grid; gap: 4px; font-size: 13px; margin: 0 0 14px; }
.luck-facts div { display: flex; gap: 8px; flex-wrap: wrap; }
.luck-facts dt { color: var(--ink-faint); min-width: 92px; }
.luck-facts dd { margin: 0; min-width: 0; flex: 1; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 18px 0 6px; flex-wrap: wrap; }
.strip-head h3 { font: 600 19px/1.2 var(--f-display); margin: 0; }
.strip-head .hint { font-size: 12px; color: var(--ink-faint); }
.strip { position: relative; display: flex; gap: 7px; overflow-x: auto; padding: 6px 4px 12px; scroll-snap-type: x proximity; }
.lk {
  flex: 1 0 68px; scroll-snap-align: start; min-width: 68px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: linear-gradient(180deg, #fffefb, #f5eee0); border: 1px solid var(--line); border-radius: 7px; padding: 6px 6px 8px; cursor: pointer;
  font-variant-numeric: tabular-nums; position: relative;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #e0d3bb, 0 5px 10px -6px rgba(70, 48, 22, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.lk:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #e0d3bb, 0 10px 16px -8px rgba(70, 48, 22, .4); }
.lk[aria-pressed=true] {
  border-color: var(--seal); background: linear-gradient(180deg, #fbe9e3, var(--seal-soft)); transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(124, 34, 25, .18), inset 0 0 0 1px var(--seal), 0 1px 0 #e3c1b6;
}
.lk .yr { font-size: 12.5px; font-weight: 600; }
.lk .age { font-size: 11px; color: var(--ink-faint); }
.lk .gz { display: flex; flex-direction: column; align-items: center; line-height: 1.2; margin-top: 2px; }
.lk .gz span { font-size: 20px; font-weight: 700; }
.lk .gz small { font-size: 11px; font-weight: 500; margin-left: 2px; color: var(--ink-soft); }
.lk .jq { font-size: 12.5px; font-weight: 600; }
.lk .pre-label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.now-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 2px rgba(201, 162, 79, .25); }
.month-detail { font-size: 13px; background: #f7f2e7; border: 1px solid var(--line-soft); border-radius: var(--r); padding: 8px 10px; margin-top: 4px; box-shadow: inset 0 1px 3px rgba(70, 48, 22, .06); }
.abbr-legend { font-size: 13px; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink-soft); }
.abbr-legend .term { font-weight: 700; color: var(--ink); }
.legend-now { display: inline-flex; align-items: center; gap: 5px; }
.legend-now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); }

/* ---------- Relations ---------- */
.rel-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; align-items: start; }
.rel-group h3 { font: 600 18px/1.2 var(--f-display); margin: 14px 0 6px; }
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rel-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: var(--r); background: linear-gradient(180deg, #fffefb, #faf5ea); font-size: 13px; box-shadow: 0 1px 0 #fff inset, 0 3px 8px -6px rgba(70, 48, 22, .3); }
.rel-text { font-size: 17px; font-weight: 700; }
.rel-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rel-type { font-weight: 600; }
.ptag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.ptag.new { background: var(--gold-soft); color: #6d521b; }
.rel-note { color: var(--ink-soft); font-size: 12.5px; }
.empty { font-size: 13px; color: var(--ink-faint); margin: 0; }

/* ---------- Elements ---------- */
.el-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; align-items: start; }
.el-cols .el-block + .el-block { margin-top: 0; }
.el-block h3 { font: 600 17px/1.2 var(--f-display); margin: 0 0 2px; }
.el-block .basis { font-size: 12px; color: var(--ink-faint); margin: 0 0 8px; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 74px minmax(0, 1fr) 24px; gap: 8px; align-items: center; font-size: 13px; }
.bar-track { height: 11px; background: var(--paper-deep); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(70, 48, 22, .2); }
.bar-fill { display: block; height: 100%; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .15); }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.season { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--gold); border-radius: var(--r); overflow: hidden; box-shadow: 0 4px 10px -6px rgba(160, 122, 44, .5); }
.season div { text-align: center; padding: 8px 4px; font-size: 14px; font-weight: 600; background: linear-gradient(180deg, #fbf3df, var(--gold-soft)); }
.season div + div { border-left: 1px solid #dcc79a; }
.season small { display: block; font-size: 10.5px; font-weight: 400; color: var(--ink-soft); }
.el-caveat { margin-top: 14px; }

/* ---------- Day Master card ---------- */
.dm-panel { padding: 0; }
.dm-panel > summary {
  list-style: none; cursor: pointer; padding: 16px 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
}
.dm-panel > summary::-webkit-details-marker { display: none; }
.dm-panel > summary .chev { margin-left: auto; color: var(--ink-faint); transition: transform .2s; }
.dm-panel[open] > summary .chev { transform: rotate(180deg); }
.dm-sum-title { font: 600 22px/1.1 var(--f-display); }
.dm-glyph { font: 42px/1 var(--f-brush); text-shadow: 0 2px 4px rgba(70, 48, 22, .2); }
.dm-body { padding: 22px 24px 24px; display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); grid-template-areas: "card text" "facts facts" "foot foot"; gap: 20px 24px; align-items: start; }
.dm-body > .tilt-wrap { grid-area: card; }
.dm-text { grid-area: text; min-width: 0; }
.dm-foot { grid-area: foot; }
.area-book { grid-area: book; }
.area-book:empty { display: none; }
.bk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bk-head .panel-title { font-size: 24px; }
.bk-src { margin-left: auto; font-size: 13px; color: var(--gold); letter-spacing: .06em; }
.bk-body { display: grid; grid-template-columns: 110px minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 900px) { .bk-body { grid-template-columns: 96px minmax(0, 1fr); } .bk-side { grid-column: 1 / -1; } }
.bk-score { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bk-score svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.bk-n { position: absolute; top: 26px; left: 0; right: 0; text-align: center; font: 700 32px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--seal); }
.bk-cap { font-size: 12px; color: var(--ink-soft); text-align: center; }
.bk-quote { margin: 0 0 10px; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--r) var(--r) 0; font: 500 15px/1.75 var(--f-body); }
.bk-plain { margin: 0 0 6px; font-size: 14px; }
.bk-list { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.bk-list li { display: flex; gap: 6px; align-items: baseline; }
.bk-list li > span:first-child { font-weight: 700; font-size: 17px; }
.bk-list li::after { margin-left: auto; font-size: 12px; font-weight: 600; }
.bk-top::after { content: "✓"; color: var(--wood); }
.bk-hid::after { content: "½"; color: var(--gold); }
.bk-none::after { content: "—"; color: var(--ink-faint); }
.bk-match { margin: 0 0 10px; font-size: 14px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--r); }
.bk-match span { color: var(--seal); font-weight: 600; }
.bk-more summary { cursor: pointer; font-size: 13.5px; color: var(--seal); }
.bk-more p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.area-book .help { margin-top: 10px; font-size: 12.5px; }
.dm-card-btn { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.dm-name { font-size: 15px; margin: 0 0 8px; }
.dm-name strong { font: 700 32px/1 var(--f-body); margin-right: 8px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #f4ede0; padding: 2px; box-shadow: inset 0 1px 3px rgba(70, 48, 22, .12); }
.lang-toggle button { border: 0; background: none; padding: 4px 12px; font-size: 13px; cursor: pointer; border-radius: 999px; }
.lang-toggle button[aria-pressed=true] { background: linear-gradient(180deg, #3a322b, var(--ink)); color: var(--panel); box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .35); }
.dm-tag { margin: 14px 0 6px; padding-left: 12px; border-left: 2px solid var(--gold); font: italic 500 19px/1.3 var(--f-display); color: var(--ink); }
.dm-about { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 60ch; }
.dm-facts { grid-area: facts; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 253, 248, .7); overflow: hidden; }
.dm-facts div { padding: 10px 14px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); min-width: 0; }
.dm-facts div:nth-child(3n) { border-right: 0; }
.dm-facts div:nth-child(2) { grid-column: span 2; }
.dm-facts div:nth-child(2) { border-right: 0; }
.dm-facts div:nth-child(n+3) { border-bottom: 0; }
.dm-facts dt { color: var(--ink-faint); font-size: 12.5px; margin-bottom: 3px; }
.dm-facts dt .term { text-align: left; }
.dm-facts dd { margin: 0; font-size: 15px; }
.dm-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dm-note { font-size: 12.5px; color: var(--ink-soft); margin: 12px 0 0; }
.zoom-link { background: none; border: 0; padding: 0; color: var(--seal); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* 3D card tilt with a moving sheen */
.tilt-wrap { perspective: 900px; }
.tilt { position: relative; transition: transform .25s ease; transform-style: preserve-3d; border-radius: 14px; --gx: 50%; --gy: 30%; }
.tilt img { display: block; width: 100%; height: auto; border-radius: 14px; filter: drop-shadow(0 12px 18px rgba(30, 35, 50, .28)) drop-shadow(0 2px 3px rgba(30, 35, 50, .2)); }
.tilt::after {
  content: ""; position: absolute; inset: 1.5% 2%; border-radius: 12px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .45), transparent 45%); mix-blend-mode: soft-light;
}
.tilt:hover::after { opacity: 1; }

.img-missing {
  aspect-ratio: 2496 / 4028; display: grid; place-items: center; text-align: center; padding: 12px;
  border: 2px dashed var(--line); border-radius: 12px; color: var(--ink-faint); font-size: 12px; background: var(--paper-deep);
}

/* ---------- Readings ---------- */
.readings {
  padding-block: 56px 48px; position: relative;
  background: linear-gradient(180deg, rgba(62, 122, 108, .07), rgba(62, 122, 108, 0) 70%);
  border-top: 1px solid var(--line);
}
.readings::before { /* meander band above the section */
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 8px; opacity: .8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 7.5h7.5V1.5h-5v3h2' fill='none' stroke='%23a07a2c' stroke-width='1' opacity='.45'/%3E%3C/svg%3E");
}
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); }
.step-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--f-display); color: var(--seal);
  background: linear-gradient(180deg, #fbe7b4, #d8a957); border: 1px solid #f0d48f; color: #3a1d10; box-shadow: 0 2px 8px -1px rgba(0, 0, 0, .5);
}
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; align-items: stretch; }
.pkg {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 22px 22px; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffefb, var(--panel) 50%, var(--panel-2));
  box-shadow: inset 0 1px 0 #fff, var(--shadow-2); transition: transform .2s ease, box-shadow .2s ease;
}
.pkg:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, var(--shadow-3); }
.pkg.featured { border-color: var(--gold); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--gold-hi), var(--shadow-3); }
.pkg.chosen { border-color: var(--seal); box-shadow: inset 0 1px 0 #fff, 0 0 0 2px var(--seal), var(--shadow-3); }
.pkg-badge {
  position: absolute; top: -11px; left: 22px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 3px 11px; border-radius: 999px; color: #fff8ee;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 3px 8px -2px rgba(160, 122, 44, .6);
}
.pkg h3 { margin: 0; font: 600 23px/1.2 var(--f-display); }
.pkg-price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pkg-price span { font: 700 34px/1 var(--f-display); color: var(--seal); text-shadow: 0 1px 0 #fff; }
.pkg-price small { font-size: 12.5px; color: var(--ink-faint); }
.pkg-sum { margin: 0; font-size: 14px; color: var(--ink-soft); }
.pkg-list { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 7px; align-content: start; font-size: 13.5px; flex: 1; }
.pkg-list li { padding-left: 18px; position: relative; }
.pkg-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.pkg-choose { align-self: stretch; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: stretch; } /* both boxes end at the same line */
.order-why { margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line); }
.order-why h4 { margin: 0 0 10px; font: 600 16px/1.2 var(--f-display); letter-spacing: .06em; }
.order-why ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; font-size: 13.5px; color: var(--ink-soft); }
.order-why li { padding-left: 18px; position: relative; line-height: 1.65; }
.order-why li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--seal); }
@media (max-width: 600px) { .order-why ul { grid-template-columns: minmax(0, 1fr); } }
.order-panel { display: flex; flex-direction: column; gap: 14px; }
.order-panel form { display: flex; flex-direction: column; gap: 14px; }
.order-panel .row2 { margin-top: 0; }
.order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: #f7f2e7; border: 1px solid var(--line-soft); box-shadow: inset 0 1px 3px rgba(70, 48, 22, .07); }
.order-meta strong { font-size: 15px; }
.order-chart { font-size: 18px; letter-spacing: .08em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-done { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.order-done h3 { margin: 4px 0 0; font: 600 26px/1.2 var(--f-display); }
.done-ref { margin: 0; display: flex; flex-direction: column; }
.done-ref span { font-size: 12px; color: var(--ink-faint); }
.done-ref strong { font: 700 28px/1.2 var(--f-display); letter-spacing: .08em; color: var(--seal); }
.order-done p { margin: 0; }
.track-panel { display: flex; flex-direction: column; }
.track-head { margin: 0; display: flex; gap: 10px; align-items: center; font: 600 20px/1.2 var(--f-display); }
.track-help { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); }
.track-form { display: grid; gap: 12px; margin-top: 14px; }
.track-form .btn-ghost { justify-self: start; }
.track-result:empty { display: none; }
.track-result { margin-top: 14px; }
.track-card { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: #fffdf8; border: 1px solid var(--line-soft); }
.track-card p { margin: 0; }
.track-card h4 { margin: 6px 0 0; font: 600 18px/1.2 var(--f-display); }
.report-text { white-space: pre-wrap; font-size: 14px; line-height: 1.7; max-height: 480px; overflow-y: auto; padding: 10px 12px; background: var(--panel); border-radius: var(--r); border: 1px solid var(--line-soft); }
.status-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.status-pill.st-awaiting_payment { background: var(--gold-soft); color: #6d521b; }
.status-pill.st-paid, .status-pill.st-in_progress { background: #e3eef6; color: #23507c; }
.status-pill.st-delivered { background: #e2f0e6; color: #24653d; }
.status-pill.st-cancelled { background: #eee; color: #777; }
.disclaimer { font-size: 12.5px; color: var(--ink-faint); margin: 22px 0 0; text-align: center; }

/* ---------- Stem index ---------- */
.stems { padding-block: 52px 60px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(44, 62, 92, .06), transparent 40%); }
.stems-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 40px; align-items: center; margin-bottom: 24px; }
.stems-intro .lede { max-width: 60ch; margin: 0; }
.cycle { margin: 0; padding: 16px 18px 14px; background: rgba(252, 249, 242, .85); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: inset 0 0 0 3px rgba(252, 249, 242, .9), inset 0 0 0 4px rgba(168, 132, 63, .22); display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: center; }
.cycle-svg { width: 100%; height: auto; display: block; }
.cycle figcaption { display: grid; gap: 16px; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.cycle figcaption b { color: var(--ink); font-size: 15px; }
@media (min-width: 901px) { .cycle figcaption span { white-space: nowrap; } }
.cycle figcaption span { padding-left: 26px; position: relative; }
.cycle figcaption span::before { content: ""; position: absolute; left: 0; top: .85em; width: 18px; border-top: 2px solid var(--gold); }
.cycle figcaption .cy-ke::before { border-top: 2px dashed var(--seal); }
@media (max-width: 900px) { .stems-intro { grid-template-columns: minmax(0, 1fr); gap: 18px; } .cycle { max-width: 460px; } }
@media (max-width: 480px) { .cycle { grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 12px; } .cycle figcaption { font-size: 12.5px; } }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.el-col { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 18px; min-width: 0; } /* subgrid keeps cards level across columns */
.el-intro {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 18px 14px 20px; background: rgba(252, 249, 242, .85); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgba(252, 249, 242, .9), inset 0 0 0 4px rgba(168, 132, 63, .22);
}
.el-glyph { font: 58px/1 var(--f-brush); text-shadow: 0 3px 8px rgba(30, 25, 15, .16); }
.el-name { margin: 2px 0 0; font: 600 19px/1.2 var(--f-display); letter-spacing: .08em; }
.el-tags { margin: 0; font-size: 12px; color: var(--gold); letter-spacing: .06em; }
.el-desc { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-soft); text-align: left; }
.el-next { /* generating-cycle chip on the column boundary */
  position: absolute; right: -9px; top: 50%; transform: translate(50%, -50%); z-index: 1; writing-mode: vertical-rl;
  font-size: 11.5px; letter-spacing: .2em; color: var(--ink-soft); padding: 8px 2px;
  background: linear-gradient(90deg, #fffcf4, var(--paper)); border: 1px solid var(--line); border-radius: 999px;
}
.el-col:last-child .el-next { display: none; }
:is(:lang(en), :lang(fr)) .el-next { writing-mode: horizontal-tb; font-size: 0; padding: 0; width: 18px; height: 18px; }
:is(:lang(en), :lang(fr)) .el-next::before { content: "→"; font-size: 12px; line-height: 16px; display: block; text-align: center; }
.el-cards { display: grid; gap: 18px; }
.stem-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.stem-card .tilt-wrap { width: 100%; max-width: 180px; margin-bottom: 4px; }
.stem-thumb { background: none; border: 0; padding: 0; cursor: zoom-in; display: block; width: 100%; }
.stem-card h4 { margin: 0; font: 600 16px/1.2 var(--f-body); display: flex; align-items: baseline; gap: 6px; }
.stem-char { font: 700 24px/1 var(--f-body); }
.stem-tag { margin: 0; font-size: 13px; line-height: 1.5; text-wrap-style: balance; color: var(--dai); }
@media (min-width: 1081px) { .stem-tag { min-height: 3em; } } /* five columns: two lines each, so the links line up */
.g-badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; color: #fff8ee; white-space: nowrap;
  background: linear-gradient(180deg, var(--seal-hi), var(--seal)); box-shadow: 0 2px 6px -2px rgba(124, 34, 25, .55); }
.stem-card.mine .tilt img { outline: 2px solid var(--seal); outline-offset: 4px; }
@media (max-width: 1080px) {
  /* each element becomes a row: explanation, then its two cards */
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .el-col { grid-row: auto; grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 20px; align-items: center; }
  .el-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .el-next { display: none; }
}
@media (max-width: 600px) {
  .el-col { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .el-intro { padding: 14px 14px 16px; }
  .el-glyph { font-size: 46px; }
  .stem-card .tilt-wrap { max-width: 150px; }
}

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 560px); width: 100%; max-height: 94vh; }
.lightbox::backdrop { background: rgba(30, 25, 20, .74); backdrop-filter: blur(2px); }
.lb-inner { background: var(--panel); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 94vh; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.lb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-head h3 { margin: 0; font: 600 20px/1.2 var(--f-display); flex: 1; min-width: 0; }
.lb-close { border: 0; background: var(--paper-deep); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.lb-about { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.lb-img-wrap { overflow: auto; min-height: 0; display: flex; justify-content: center; }
.lb-img-wrap img { max-height: calc(94vh - 160px); width: auto; max-width: 100%; height: auto; display: block; }

/* ---------- Install bar (PWA) ---------- */
.install-bar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom, 0px)); width: min(560px, calc(100% - 24px));
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 2px 0 #fff inset, 0 18px 36px -14px rgba(70, 48, 22, .45);
}
.install-bar[hidden] { display: none; }
.install-icon img { width: 44px; height: 44px; border-radius: 10px; display: block; }
.install-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.install-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 4px 6px; }
@media (display-mode: standalone) { .site-head { padding-top: env(safe-area-inset-top, 0px); } }

/* ---------- Fun section on the home page ---------- */
.play { padding-block: 52px 56px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(184, 58, 46, .05), transparent 45%); }
.play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.play-card {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; padding: 20px 24px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #fffefb, var(--panel) 50%, var(--panel-2)); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, var(--shadow-2); transition: transform .2s ease, box-shadow .2s ease;
}
.play-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, var(--shadow-3); }
.play-art { position: relative; height: 150px; border-radius: 8px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  background: linear-gradient(180deg, #1c2d4a, #3f5c86); box-shadow: inset 0 0 0 3px #6b4226, inset 0 0 0 4px #c9a24f; }
.play-art-theater img { height: 128px; width: auto; margin-bottom: 4px; }
.play-art-today { background: linear-gradient(180deg, #fbf3df, var(--gold-soft)); box-shadow: inset 0 0 0 1px var(--line); align-items: center; gap: 10px; }
.pa-ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font: 700 30px/1 var(--f-display); color: var(--seal);
  background: radial-gradient(closest-side, #fffdf7 78%, transparent 80% 100%), conic-gradient(var(--seal) 0 82%, var(--line-soft) 82% 100%); }
.pa-chips { display: flex; gap: 6px; }
.pa-yi, .pa-ji { font: 700 15px/1 var(--f-body); color: #fff8ee; padding: 6px 9px; border-radius: 3px; }
.pa-yi { background: var(--wood); } .pa-ji { background: var(--seal); }
.play-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.play-text strong { font: 600 22px/1.2 var(--f-display); }
:lang(zh) .play-text strong { font: 400 26px/1.2 var(--f-brush); letter-spacing: .04em; }
.play-text > span { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.play-text em { font-style: normal; font-weight: 600; font-size: 14px; color: var(--seal); margin-top: 4px; }
.play-text em::after { content: " →"; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; letter-spacing: .08em; color: var(--ink-faint); margin: 0 0 14px; }
.crumbs a { color: var(--seal); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
@media (max-width: 900px) { .play-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .play-card { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px; } .play-art { height: 120px; } .play-art-theater img { height: 100px; } .pa-ring { width: 58px; height: 58px; font-size: 24px; } .play-art-today { flex-direction: column; gap: 8px; } .pa-yi, .pa-ji { font-size: 13px; padding: 5px 7px; } }

/* ---------- Day Master Theatre (theater.html) ---------- */
.theater { padding-block: 40px 56px; }
.th-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: start; }
.th-title { margin: 0 0 14px; }
:lang(zh) .th-title { font: 400 clamp(38px, 4.4vw, 56px)/1.1 var(--f-brush); letter-spacing: .04em; }
.th-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 22px; margin-top: 22px; }
.th-person { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.th-who { margin: 0; font: 600 20px/1.2 var(--f-display); letter-spacing: .06em; }
.th-note, .th-pair, .th-actions, .th-msg { grid-column: 1 / -1; margin: 0; }
.th-pair { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; font: 600 22px/1.3 var(--f-body); }
.th-pair:empty { display: none; }
.th-rel { font-size: 13px; font-weight: 600; color: var(--seal); padding: 2px 12px; border: 1px solid var(--seal); border-radius: 999px; letter-spacing: .06em; }
.th-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.th-actions button { flex: 1; min-width: 140px; }
.th-sample-box { margin-top: 26px; }
.th-samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-btn {
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink); border-radius: 999px; padding: 7px 15px; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 6px -4px rgba(70, 48, 22, .4); transition: border-color .15s, background .15s;
}
.chip-btn:hover { border-color: var(--seal); background: var(--seal-soft); }
.th-stage { position: sticky; top: 20px; width: min(100%, calc((100vh - 140px) * 9 / 16)); justify-self: center; } /* whole video fits on screen under the header */
.th-screen { position: relative; border-radius: 18px; overflow: hidden; background: #1f1d1a; box-shadow: var(--shadow-3), 0 0 0 1px rgba(168, 132, 63, .5); }
.th-screen canvas { display: block; width: 100%; height: auto; } /* the canvas keeps its own 9:16 shape; the stage width sets its size */
.th-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.th-bar span { display: block; height: 100%; width: 0; background: var(--seal); }
@media (max-width: 900px) {
  .th-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .th-stage { position: static; order: -1; width: min(100%, 420px); margin: 0 auto; }
}
@media (max-width: 560px) { .th-form { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .nav-link { padding: 7px 8px; font-size: 13.5px; } .lang-btn { margin-left: 2px; } }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 22px 34px; font-size: 12.5px; color: #c9cfd9; background: linear-gradient(180deg, #2f4262, var(--dai)); border-top: 0; }
.site-foot a { color: #e6c98a; }
.site-foot p { margin: 0 0 6px; max-width: 90ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) and (min-width: 901px) {
  /* scale with the window so the dial fills its column and the labels stay readable */
  .hero-fan { --spread: 5.6vw; --card-w: 14.6vw; --gate: 43vw; }
}
@media (max-width: 1080px) {
  .result-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "today" "card" "table" "book" "luck" "rel" "el"; }
  .packages { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .order-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .intro { position: static; }
  .hero { padding-block: 40px 90px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; }
  .hero-fan { --spread: 62px; --card-w: 136px; --gate: 380px; }
  .hero-copy { padding-left: 52px; }
  .form-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .rel-cols, .el-cols { grid-template-columns: minmax(0, 1fr); }
  .el-cols { gap: 16px; }
}
@media (max-width: 700px) {
  .gets-list { grid-template-columns: minmax(0, 1fr); }
  .form-panel { padding: 22px 20px; }
  .hero-fan { --spread: 48px; --card-w: 112px; --gate: 320px; }
  .sc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiqian { font-size: 13px; padding: 12px 7px; }
  .hero-copy { padding-left: 44px; }
  .hero-nums { gap: 8px; padding-top: 14px; }
  .hero-nums dt { font-size: 28px; }
  .hero-cta { margin-bottom: 24px; }
  .scroll-hint { display: block; }
  .summary { grid-template-columns: minmax(0, 1fr); }
  .dm-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "text" "facts" "foot"; }
  .dm-facts { grid-template-columns: minmax(0, 1fr); }
  .dm-facts div, .dm-facts div:nth-child(n) { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: baseline; border-right: 0; border-bottom: 1px solid var(--line-soft); grid-column: auto; }
  .dm-facts div:last-child { border-bottom: 0; }
  .dm-facts dt { margin: 0; }
  .dm-card-btn { max-width: 260px; margin: 0 auto; }
  .panel { padding: 18px; }
  .row3 { grid-template-columns: 1fr 1fr 1fr; }
  .row2, .order-meta { grid-template-columns: minmax(0, 1fr); }
  .time-row { grid-template-columns: 1fr 1fr; }
  .time-row .check { grid-column: 1 / -1; padding-bottom: 0; }
  .sum-grid div { grid-template-columns: 104px minmax(0, 1fr); }
  .rel-list li { grid-template-columns: minmax(0, 1fr); }
  .big { font-size: 28px; }
  .pillars th[scope=row] { width: 88px; min-width: 88px; font-size: 11.5px; }
  table.pillars { min-width: 560px; }
  .site-nav { width: 100%; justify-content: flex-start; }
}
@media (max-width: 420px) {
  .hero-fan { --spread: 32px; --card-w: 96px; --gate: 290px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .fan-inner { animation: none; }
}

/* Cormorant draws old-style figures by default; prices, counts and references use lining figures */
.pkg-price span, .done-ref strong, .order-meta strong, .lk, .bar-n, .stat .n, .orow, .detail h2, .step-n { font-variant-numeric: lining-nums tabular-nums; }
:lang(zh) .stems .sec-head h2 .zh-sm { display: none; }
:is(:lang(en), :lang(fr)) .hero-nums dd { font-size: 12px; letter-spacing: .02em; text-align: center; }


/* ---------- Chinese and English set separately ----------
   Chinese characters are dense: they need a size or two more than Latin text to read comfortably, a slightly looser
   line height, shorter lines measured in characters, and justified paragraphs. English keeps the base sizes and wraps
   by width in ch. Everything below only touches text size, spacing and line length, never layout. */
:lang(zh) body { letter-spacing: .02em; }
:lang(zh) .lede { font-size: 17px; line-height: 1.9; max-width: 36em; }
:lang(zh) .lede.wide { max-width: none; }
:lang(zh) .stems-intro .lede { max-width: 30em; }
:lang(zh) .hero-lede { font-size: 17px; max-width: 28em; text-align: left; }
:lang(zh) .help, :lang(zh) .privacy, :lang(zh) .warn, :lang(zh) .errors { font-size: 14.5px; line-height: 1.75; }
:lang(zh) .sub, :lang(zh) .sum-grid dt, :lang(zh) .dm-facts dt { font-size: 13.5px; }
:lang(zh) .hero-nums dd { font-size: 14px; letter-spacing: .2em; }
:lang(zh) .hero-now { font-size: 15px; }
:lang(zh) .eyebrow { font-size: 14px; }
:lang(zh) .sc-cell .sc-a { font-size: 13.5px; } :lang(zh) .sc-cell .sc-t { font-size: 12.5px; }
:lang(zh) .gets-list strong { font-size: 16px; } :lang(zh) .gets-list div > span { font-size: 14.5px; line-height: 1.7; }
:lang(zh) .field > label, :lang(zh) .field > legend { font-size: 16px; }
:lang(zh) .seg span, :lang(zh) .check, :lang(zh) .radio, :lang(zh) .settings summary { font-size: 15px; }
:lang(zh) .chip { font-size: 13.5px; }
:lang(zh) .sum-grid div { font-size: 14.5px; }
:lang(zh) .today-date, :lang(zh) .today-god { font-size: 15.5px; }
:lang(zh) .today-theme { font-size: 21px; }
:lang(zh) .today-lists ul { font-size: 15.5px; gap: 8px; }
:lang(zh) .today-notes p { font-size: 15px; }
:lang(zh) .ts-cap, :lang(zh) .bk-cap { font-size: 13.5px; }
:lang(zh) .table-notes { font-size: 13.5px; line-height: 1.8; }
:lang(zh) .ss-list { font-size: 13.5px; }
:lang(zh) .luck-facts, :lang(zh) .month-detail, :lang(zh) .abbr-legend { font-size: 14px; }
:lang(zh) .strip-head .hint { font-size: 13px; }
:lang(zh) .rel-list li { font-size: 14px; } :lang(zh) .rel-note { font-size: 13.5px; }
:lang(zh) .el-block .basis { font-size: 13.5px; } :lang(zh) .bar { font-size: 14px; }
:lang(zh) .bk-src { font-size: 14px; }
:lang(zh) .bk-quote { font-size: 17px; line-height: 1.9; }
:lang(zh) .bk-plain, :lang(zh) .bk-list, :lang(zh) .bk-match { font-size: 15.5px; line-height: 1.8; }
:lang(zh) .bk-more summary, :lang(zh) .bk-more p { font-size: 14.5px; }
:lang(zh) .area-book .help { font-size: 13.5px; }
:lang(zh) .dm-about { font-size: 15px; line-height: 1.85; } :lang(zh) .dm-note { font-size: 13.5px; }
:lang(zh) .zoom-link { font-size: 14px; }
:lang(zh) .steps li { font-size: 15px; line-height: 1.7; }
:lang(zh) .pkg h3 { font-size: 24px; } :lang(zh) .pkg-sum { font-size: 15px; } :lang(zh) .pkg-list { font-size: 15px; gap: 8px; }
:lang(zh) .pkg-price small { font-size: 13.5px; }
:lang(zh) .order-why ul { font-size: 15px; }
:lang(zh) .disclaimer { font-size: 13.5px; }
:lang(zh) .el-desc { font-size: 14.5px; line-height: 1.8; } :lang(zh) .el-tags { font-size: 13.5px; }
:lang(zh) .stem-tag { font-size: 14.5px; } :lang(zh) .stem-card h4 { font-size: 17px; }
:lang(zh) .play-text > span { font-size: 15px; line-height: 1.75; } :lang(zh) .play-text em { font-size: 15px; }
:lang(zh) .cycle figcaption { font-size: 14px; } :lang(zh) .cycle figcaption b { font-size: 16px; }
:lang(zh) .site-foot { font-size: 13.5px; line-height: 1.8; }
:lang(zh) .install-text { font-size: 14.5px; }
:lang(zh) .nav-link { font-size: 15px; letter-spacing: .06em; }
:is(:lang(en), :lang(fr)) .lede { max-width: 64ch; }
:is(:lang(en), :lang(fr)) .lede.wide { max-width: none; }
:is(:lang(en), :lang(fr)) .nav-link { letter-spacing: .02em; }
@media (max-width: 480px) { :is(:lang(en), :lang(fr)) .hero-nums dd { font-size: 11.5px; letter-spacing: .02em; text-align: center; } }
@media (max-width: 700px) { .hero-lede br { display: none; } }


/* ======================================================================
   Old-temple style: quiet and restrained. Aged paper, sumi ink, weathered wood, moss and one vermilion accent;
   hairlines instead of frames and shadows, square corners, a light serif instead of the brush font for headings.
   Pages opt in with class="temple" on <html>.
   ====================================================================== */

.temple {
  --tp-paper: #ece6da;
  --tp-paper-2: #e4dccc;
  --tp-ink: #2b2722;
  --tp-ink-soft: #5d554b;
  --tp-wood: #4a3426;
  --tp-wood-2: #6b4c37;
  --tp-moss: #66704f;
  --tp-red: #a8402e;
  --tp-line: rgba(43, 39, 34, .22);
}
.temple body {
  background-color: var(--tp-paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.temple .bg-arch { opacity: .035; color: var(--tp-wood); }

/* header: a dark timber beam with a thin vermilion line underneath, like an eave */
.temple .site-head { background: linear-gradient(180deg, var(--tp-wood-2), var(--tp-wood)); border-bottom: 0; box-shadow: 0 2px 0 var(--tp-red), 0 10px 24px -14px rgba(40, 25, 15, .6); }
.temple .site-head::after { display: none; }
.temple .brand-name { color: #efe6d6; font-weight: 500; letter-spacing: .08em; }
.temple .brand-sub { color: #d9c3a0; letter-spacing: .5em; }
.temple .nav-link { color: #d8ccb9; letter-spacing: .14em; }
.temple .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.temple .lang-btn { color: #efe6d6; border-color: rgba(239, 230, 214, .5); }
.temple .lang-btn:hover { background: #efe6d6; color: var(--tp-wood); }

/* hero: plain paper, no painted hills; the gate becomes a thin ink wheel */
.temple .hero { padding-block: 72px 96px; background: none; }
.temple .hero::after { display: none; }
.temple .hero-sky { display: none; }
.temple .hero-in { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; }
.temple .hero-copy { padding-left: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 44px; align-items: start; }
.temple .tiqian { display: none; }

/* Chinese title set vertically, read right to left, with a vertical hairline beside it */
.temple:lang(zh) .hero-title, .temple .hero-title:lang(zh) {
  grid-row: 1 / span 5; writing-mode: vertical-rl; margin: 0; padding-left: 26px; border-left: 1px solid var(--tp-line);
  font: 500 64px/1.25 var(--f-body); letter-spacing: .32em; color: var(--tp-ink); text-shadow: none; white-space: nowrap;
}
.temple .hero-title em { color: var(--tp-red); font: 400 22px/1.4 var(--f-body); letter-spacing: .5em; margin: 0 18px 0 0; }
.temple:is(:lang(en), :lang(fr)) .hero-title, .temple .hero-title:is(:lang(en), :lang(fr)) { grid-column: 1 / -1; font: 500 clamp(40px, 4.4vw, 62px)/1.08 var(--f-display); text-shadow: none; color: var(--tp-ink); }
.temple:is(:lang(en), :lang(fr)) .hero-title em, .temple .hero-title:is(:lang(en), :lang(fr)) em { margin: 10px 0 0; font: italic 400 .52em/1.2 var(--f-display); letter-spacing: .02em; }
.temple .hero-lede { text-wrap-style: var(--tw-pretty, pretty); border-top: 0; padding-top: 6px; color: var(--tp-ink-soft); font-size: 16.5px; line-height: 2; max-width: 24em; }
.temple:is(:lang(en), :lang(fr)) .hero-lede { max-width: 32em; }

/* buttons: a vermilion block and an ink outline, square corners, no gloss */
.temple .btn-gold { background: var(--tp-red); box-shadow: none; border-radius: 0; letter-spacing: .3em; padding: 14px 34px; font-weight: 600; }
.temple .btn-gold:hover { transform: none; background: #923624; }
.temple .btn-line { border-radius: 0; color: var(--tp-ink); border-color: var(--tp-ink); background: transparent; letter-spacing: .24em; }
.temple .btn-line:hover { background: var(--tp-ink); color: var(--tp-paper); }

/* numbers: no panel, just hairlines */
.temple .hero-nums { background: none; border: 0; box-shadow: none; border-top: 1px solid var(--tp-line); border-bottom: 1px solid var(--tp-line); border-radius: 0; padding: 16px 0; }
.temple .hero-nums div + div { border-left-color: var(--tp-line); }
.temple .hero-nums dt { font: 400 34px/1 var(--f-display); color: var(--tp-ink); }
.temple .hero-nums dd { color: var(--tp-moss); letter-spacing: .3em; }
.temple .hero-now { color: var(--tp-ink-soft); }
.temple .hero-now strong { color: var(--tp-red); }
.temple .live-dot { background: var(--tp-red); box-shadow: none; animation: none; }

/* the dial in ink: no fills, thin rings, muted labels; the gate opening becomes paper with a full moon outline */
.temple .gate { filter: none; }
.temple .gate > circle:nth-of-type(1) { fill: none; stroke: var(--tp-ink); stroke-width: 1; }
.temple .gate > circle:nth-of-type(2) { stroke: var(--tp-line); }
.temple .gate line { stroke: var(--tp-ink); opacity: .5; }
.temple .gate text { fill: var(--tp-ink-soft) !important; font-weight: 400 !important; }
.temple .gate text.dial-on { fill: var(--tp-red) !important; filter: none; }
.temple .gate .dial-hl { fill: rgba(168, 64, 46, .08); stroke: rgba(168, 64, 46, .4); }
.temple .gate circle[r="200"], .temple .gate circle[r="166"] { stroke: var(--tp-ink); opacity: .35; }
.temple .gate circle[r="160"] { fill: #f3eee3; stroke: var(--tp-line); }
.temple .gate circle[r="80"] { display: none; }
.temple .gate circle[r="30"] { fill: none; stroke: var(--tp-red); stroke-width: 1.4; opacity: 1; }
.temple .gate g[stroke] { display: none; }
.temple .fan-card { filter: drop-shadow(0 16px 18px rgba(40, 30, 20, .28)); }
.temple .fan-inner { animation: none; transform: rotateX(4deg); }

@media (max-width: 900px) {
  .temple .hero-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .temple .hero-copy { column-gap: 26px; }
  .temple:lang(zh) .hero-title, .temple .hero-title:lang(zh) { font-size: 46px; padding-left: 18px; }
}
.temple .hero-copy > :not(.hero-title) { grid-column: 2; }
.temple .hero-copy:is(:lang(en), :lang(fr)) { display: block; }
.temple .btn-gold:is(:lang(en), :lang(fr)), .temple .btn-line:is(:lang(en), :lang(fr)) { letter-spacing: .08em; }
.temple .hero-nums dd:is(:lang(en), :lang(fr)) { letter-spacing: .08em; }
.temple .hero-nums dt { font-variant-numeric: lining-nums; }
.temple .gate circle[r="30"] { fill: rgba(168, 64, 46, .06); }
.temple .hero-lede br { display: none; }
.temple .hero-cta { gap: 12px; }
.temple .hero-cta .btn-gold, .temple .hero-cta .btn-line { padding: 13px 24px; }
.temple .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }

/* panels and cards: flat paper with a single hairline, no gold corners or deep shadows */
.temple .panel, .temple .pkg, .temple .el-intro, .temple .play-card, .temple .cycle, .temple .gets-list li, .temple .lb-inner, .temple .install-bar {
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 22px -18px rgba(40, 30, 20, .45);
}
.temple .panel::before { inset: 6px; border-color: var(--line-soft); border-radius: 0; }
.temple .panel::after { display: none; }
.temple .pkg:hover, .temple .play-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(40, 30, 20, .55); }
.temple .pkg.featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 8px 22px -18px rgba(40, 30, 20, .45); }
.temple .pkg.chosen { border-color: var(--seal); box-shadow: 0 0 0 1px var(--seal), 0 8px 22px -18px rgba(40, 30, 20, .45); }
.temple .pkg-badge { background: var(--ink); border-radius: 0; box-shadow: none; letter-spacing: .14em; }
.temple .pkg-price span { color: var(--seal); text-shadow: none; font-weight: 500; }
.temple .pkg-list li::before, .temple .order-why li::before, .temple .today-lists li::before { width: 5px; height: 5px; background: var(--ink-soft); }

/* buttons */
.temple .btn-primary { background: var(--seal); box-shadow: none; border-radius: 0; text-shadow: none; letter-spacing: .12em; font-weight: 600; }
.temple .btn-primary:hover { transform: none; filter: none; background: #923624; }
.temple .btn-primary:active { transform: none; box-shadow: none; }
.temple .btn-ghost { background: transparent; border: 1px solid var(--ink); border-radius: 0; box-shadow: none; letter-spacing: .08em; }
.temple .btn-ghost:hover { transform: none; background: var(--ink); color: var(--paper); }
.temple .btn-ghost:active { box-shadow: none; transform: none; }
.temple .chip-btn { border-radius: 0; border-color: var(--line); background: transparent; box-shadow: none; }
.temple .chip-btn:hover { border-color: var(--ink); background: transparent; }
.temple .zoom-link, .temple .crumbs a, .temple .play-text em { color: var(--seal); }

/* small seals stay as red stamps, flatter */
.temple .seal-sm, .temple .seal-lg { background: var(--seal); box-shadow: inset 0 0 0 1.5px rgba(251, 243, 232, .5); border-radius: 2px; }
.temple .step-n { background: none; border: 1px solid var(--ink); color: var(--ink); box-shadow: none; font-weight: 500; }

/* headings: a quiet serif, the brush font kept for the big element glyphs only */
.temple .sec-head h2, .temple .readings > .wrap > .sec-head h2, .temple .stems .sec-head h2, .temple .play .sec-head h2, .temple .intro-title, .temple .th-title {
  font-family: var(--f-body); font-weight: 500; letter-spacing: .14em; text-shadow: none;
}
.temple:is(:lang(en), :lang(fr)) .sec-head h2, .temple:is(:lang(en), :lang(fr)) .intro-title, .temple:is(:lang(en), :lang(fr)) .th-title,
.temple .sec-head h2:is(:lang(en), :lang(fr)), .temple .intro-title:is(:lang(en), :lang(fr)), .temple .th-title:is(:lang(en), :lang(fr)) { font-family: var(--f-display); font-weight: 500; letter-spacing: .01em; }
.temple .panel-title { font-weight: 500; letter-spacing: .06em; }
.temple h1 { text-shadow: none; font-weight: 500; }
.temple .play-text strong, .temple:lang(zh) .play-text strong { font: 500 22px/1.3 var(--f-body); letter-spacing: .1em; }
.temple .eyebrow { color: var(--seal); letter-spacing: .3em; }

/* sections: no colour washes, one hairline between them */
.temple .readings, .temple .stems, .temple .play { background: none; border-top: 1px solid var(--line); }
.temple .readings::before { display: none; }
.temple .view-form > .form-layout { padding-top: 56px; }

/* form controls */
.temple input[type=text], .temple input[type=number], .temple input[type=email], .temple input[type=date], .temple input[type=time], .temple select, .temple textarea {
  border-radius: 0; background-color: #faf7f1; box-shadow: none; border-color: var(--line);
}
.temple .seg, .temple .lang-toggle { border-radius: 0; background: transparent; box-shadow: none; }
.temple .seg span, .temple .lang-toggle button { border-radius: 0; }
.temple .seg input:checked + span, .temple .lang-toggle button[aria-pressed=true] { background: var(--ink); color: var(--paper); box-shadow: none; }
.temple .sc-cell { background: transparent; border-radius: 0; }
.temple .sc-cell.on { background: rgba(168, 64, 46, .07); box-shadow: inset 0 0 0 1px var(--seal); transform: none; }

/* chart details */
.temple .pillars tr.zebra td, .temple .pillars tr.zebra th[scope=row] { background: rgba(43, 39, 34, .03); }
.temple .lk { border-radius: 0; background: transparent; box-shadow: none; }
.temple .lk[aria-pressed=true], .temple .lk.on { background: rgba(168, 64, 46, .06); }
.temple .rel-list li { border-radius: 0; background: transparent; box-shadow: none; }
.temple .today-lists h3 { border-radius: 0; }
.temple .today-yi { background: var(--moss, #66704f); }
.temple .bk-quote, .temple .today-notes { border-radius: 0; background: rgba(140, 111, 69, .08); }
.temple .order-meta, .temple .track-card, .temple .month-detail { border-radius: 0; background: rgba(43, 39, 34, .025); box-shadow: none; }
.temple .el-intro { box-shadow: none; }
.temple .el-next { background: var(--paper); }
.temple .play-art { border-radius: 0; box-shadow: inset 0 0 0 3px #4a3426; }
.temple .play-art-today { box-shadow: inset 0 0 0 1px var(--line); background: rgba(140, 111, 69, .08); }

/* footer: the same timber as the header */
.temple .site-foot { background: linear-gradient(180deg, #4a3426, #3a281d); color: #d8ccb9; border-top: 2px solid var(--seal); }
.temple .site-foot a { color: #efd9a8; }

/* theatre page frame */
.temple .th-screen { border-radius: 2px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -20px rgba(40, 30, 20, .6); }
.temple .th-bar span { background: var(--seal); }
@media (max-width: 700px) {
  /* phones: vertical title on its own row, everything else full width below it */
  .temple .hero-copy { display: block; }
  .temple:lang(zh) .hero-title, .temple .hero-title:lang(zh) { height: 200px; font-size: 52px; margin: 0 auto 26px 0; }
  .temple .hero-title em { font-size: 19px; }
  .temple .hero-lede { max-width: none; }
}
@media (max-width: 900px) { .temple .hero-in { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 480px) { .temple .nav-link { letter-spacing: .04em; padding-inline: 7px; } }

/* "remember my chart" option and the welcome-back bar on the home page */
.remember { align-items: flex-start; }
.remember > span { display: flex; flex-direction: column; gap: 2px; }
.remember small.help { margin: 0; font-size: 13px; }
.welcome { margin-top: 18px; max-width: 30em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(246, 242, 234, .8); }
.welcome-dm { font: 400 38px/1 var(--f-brush); }
.welcome-text { flex: 1; min-width: 12em; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.welcome-text strong { color: var(--ink); font-weight: 600; }
.welcome .zoom-link { font-size: 13px; }
.temple .welcome { border-radius: 0; }
/* keep the card fan clear of the buttons and numbers: give the fan column a little more room and fan the cards a bit tighter */
@media (min-width: 1241px) { .temple .hero-fan { --spread: 72px; --card-w: 172px; --gate: 540px; } }
/* hero dial, temple style: a soft full moon instead of the empty red ring, finer ticks, and a gentler hover */
.temple .gate circle[r="30"] { fill: #eadcb8; stroke: none; opacity: 1; }
.temple .gate circle[r="80"] { display: block; fill: rgba(234, 220, 184, .35); }
.temple .gate circle[r="160"] { fill: #f2ede2; }
.temple .gate line { opacity: .3; }
.temple .gate text { opacity: .9; }
.temple .gate text.dial-on { opacity: 1; }
.temple .fan-card:hover, .temple .fan-card:focus-visible {
  filter: drop-shadow(0 18px 20px rgba(40, 30, 20, .3));
  transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 14px - 18px)) rotate(calc(var(--i) * 9deg)) translateZ(calc(var(--z) * 4px)) scale(1.03);
  z-index: var(--z);
}
.temple .gate circle[r="30"], .temple .gate circle[r="80"] { cx: 250px; cy: 165px; } /* moon centred in the arch */
.temple .hero-now { white-space: normal; }
.temple .hero-now > .now-sub { white-space: nowrap; }
.temple .hero-lede { max-width: 26em; }
.now-gz { white-space: nowrap; }

/* a turning taiji (the two fish) takes the place of the moon in the dial */
.gate circle[r="30"], .gate circle[r="80"] { display: none !important; }
/* soft ink and paper tones so it sits in the dial like the moon did, rather than a hard black-and-white badge */
.taiji .tj-halo { display: none; }
.taiji .tj-yang { fill: #f3ecde; }
.taiji .tj-yin { fill: rgba(74, 64, 54, .5); }
.taiji .tj-edge { display: none; } /* no ring: the soft fish edges sit straight on the paper */
.gate .taiji { transform-box: view-box; transform-origin: 250px 165px; animation: taiji-turn 40s linear infinite; }
@keyframes taiji-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gate .taiji { animation: none; } }

/* ---------- pages: every screen size shows one section at a time (home, chart, stems, fun, readings) ---------- */
body[data-tab]:not([data-tab="stems"]) #stems,
body[data-tab]:not([data-tab="play"]) #play,
body[data-tab]:not([data-tab="readings"]) #readings,
body[data-tab]:not([data-tab="home"]) #dailysec,
body[data-tab]:not([data-tab="readings"]) #rpsec,
body[data-tab="stems"] main > .view, body[data-tab="play"] main > .view, body[data-tab="readings"] main > .view { display: none; }
body[data-tab="home"] #view-form > .form-layout { display: none; }
body[data-tab="chart"] #view-form > .hero { display: none; }
body[data-tab="chart"] .view-form > .form-layout { padding-top: 40px; }
body[data-tab] .stems, body[data-tab] .play, body[data-tab] .readings { border-top: 0; padding-top: 44px; }
body[data-tab] main { min-height: calc(100vh - 220px); }
.site-nav .nav-link[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--tp-red, var(--seal)); }
@media (max-width: 760px) {
  body[data-tab="chart"] .view-form > .form-layout { padding-top: 24px; }
  body[data-tab] .stems, body[data-tab] .play, body[data-tab] .readings { padding-top: 28px; }
}

/* ---------- phones: bottom tab bar, one section at a time ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(246, 242, 234, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 20px -16px rgba(40, 30, 20, .5); backdrop-filter: blur(8px);
  }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: 12px; color: var(--ink-faint); cursor: pointer; letter-spacing: .04em; }
  .tabbar .tb-ic { width: 26px; height: 26px; display: grid; place-items: center; font: 400 16px/1 var(--f-body); border: 1px solid var(--line); border-radius: 2px; color: var(--ink-soft); background: var(--panel); }
  .tabbar button[aria-current="page"] { color: var(--seal); font-weight: 600; }
  .tabbar button[aria-current="page"] .tb-ic { background: var(--seal); border-color: var(--seal); color: #fbf3e6; }
  body[data-tab] { padding-bottom: calc(var(--tabbar-h, 70px) + 16px); }
  body[data-tab] .site-nav .nav-link { display: none; }
  body[data-tab] .install-bar { bottom: calc(var(--tabbar-h, 70px) + 8px); }
  body[data-tab="home"] .hero { padding-bottom: 40px; }
}
/* the card fan without 3D depth: iPhone Safari could hide the middle card behind the dial */
.temple .fan-inner { transform-style: flat; transform: none; animation: none; }
.temple .fan-card { transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 14px)) rotate(calc(var(--i) * 9deg)); }
.temple .fan-card:hover, .temple .fan-card:focus-visible { transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 14px - 18px)) rotate(calc(var(--i) * 9deg)) scale(1.03); }
@media (max-width: 760px) { body[data-tab] .site-nav { width: auto; } body[data-tab] .site-head-in { flex-wrap: nowrap; } }

/* ---------- phone app polish ----------
   Calmer and lighter: a slim header, a plain tab bar with no boxed icons, the home page in reading order
   (title, intro, actions, cards, then today's pillars), and no bars floating over the content. */
@media (max-width: 760px) {
  body[data-tab] .site-head-in { padding-block: 8px; }
  body[data-tab] .brand-seal { width: 34px; height: 34px; }
  body[data-tab] .brand-name { font-size: 22px; }
  body[data-tab] .brand-sub { font-size: 10.5px; margin-top: 3px; }
  body[data-tab] .lang-btn { padding: 3px 12px; font-size: 12.5px; }

  .tabbar { padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); background: rgba(242, 237, 227, .97); }
  .tabbar button { position: relative; gap: 1px; padding: 7px 0 5px; font-size: 11.5px; letter-spacing: .06em; }
  .tabbar .tb-ic { width: auto; height: auto; border: 0; background: none; font: 400 19px/1.1 var(--f-body); color: var(--ink-faint); }
  .tabbar button[aria-current="page"] .tb-ic { background: none; color: var(--seal); }
  .tabbar button[aria-current="page"]::before { content: ""; position: absolute; top: -4px; left: 30%; right: 30%; height: 2px; background: var(--seal); }

  /* home in reading order */
  body[data-tab="home"] .hero { padding: 28px 0 32px; }
  .temple body[data-tab="home"] .hero-in { display: flex; flex-direction: column; gap: 0; }
  .temple body[data-tab="home"] .hero-copy { display: contents; }
  .temple body[data-tab="home"] .hero-title { order: 1; height: auto; margin: 0 0 18px; }
  .temple body[data-tab="home"] .hero-title:lang(zh) { height: 150px; font-size: 44px; }
  .temple body[data-tab="home"] .hero-lede { order: 2; font-size: 15.5px; line-height: 1.85; margin: 0 0 20px; }
  .temple body[data-tab="home"] .hero-cta { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 8px; }
  .temple body[data-tab="home"] .hero-cta a { justify-content: center; padding: 12px 8px; letter-spacing: .12em; }
  .temple body[data-tab="home"] .hero-fan { order: 4; margin: 4px 0 6px; }
  .temple body[data-tab="home"] .hero-now { order: 5; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--tp-line); }
  /* the 10/12/60/24 strip is decoration; on a phone it only adds a stray block after the cards */
  .temple body[data-tab="home"] .hero-nums { display: none; }
  .temple body[data-tab="home"] .hero-nums dt { font-size: 24px; }
  .temple body[data-tab="home"] .welcome { order: 7; }
  .temple body[data-tab="home"] .daily { order: 5; flex: 0 0 auto; margin: 0 0 18px; }
  /* Chinese: the vertical title leaves room on its right, so a compact score sits beside it */
  .temple:lang(zh) body[data-tab="home"] .hero-in { flex-flow: row wrap; column-gap: 22px; }
  .temple:lang(zh) body[data-tab="home"] .hero-in > *, .temple:lang(zh) body[data-tab="home"] .hero-copy > * { flex: 0 0 100%; min-width: 0; }
  .temple:lang(zh) body[data-tab="home"] .hero-copy > .hero-title { flex: none; }
  .temple:lang(zh) body[data-tab="home"] .hero-copy > .daily { order: 1; flex: 1 1 0; align-self: center; margin: 0 0 18px; }
  .temple:lang(zh) body[data-tab="home"] .dy-s, .temple:lang(zh) body[data-tab="home"] .dy-yj, .temple:lang(zh) body[data-tab="home"] .dy-add, .temple:lang(zh) body[data-tab="home"] .dy-long { display: none; }
  .temple:lang(zh) body[data-tab="home"] .dy-short { display: inline; }
  .temple:lang(zh) body[data-tab="home"] .dy-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .temple:lang(zh) body[data-tab="home"] .dy-k { font-size: 12px; letter-spacing: .06em; margin-bottom: 8px; }
  .temple:lang(zh) body[data-tab="home"] .dy-acts { margin-top: 10px; }
  .temple:lang(zh) body[data-tab="home"] .dy-acts .btn-gold { width: 100%; justify-content: center; }
  body[data-tab="home"] .dy-stems { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  body[data-tab="home"] .dy-stem { font-size: 17px; }
  .temple:lang(zh) body[data-tab="home"] .dy-ask { font-size: 16px; margin-bottom: 10px; }
  body[data-tab="home"] .install-bar {
    order: 8; position: static; transform: none; width: auto; margin: 22px 0 0; box-shadow: none; grid-template-columns: 36px minmax(0, 1fr) auto auto;
    padding: 10px 12px; background: transparent; border: 1px dashed var(--line);
  }
  body[data-tab="home"] .install-icon img { width: 36px; height: 36px; }
  body[data-tab="home"] .install-text { font-size: 13px; }
  body[data-tab]:not([data-tab="home"]) .install-bar { display: none; }

  /* section pages: a little less padding, titles a size smaller */
  body[data-tab] .stems, body[data-tab] .play, body[data-tab] .readings { padding-top: 22px; }
  body[data-tab] .sec-head h2 { font-size: 26px !important; }
}
@media (max-width: 760px) {
  .temple body[data-tab="home"] .hero-fan { margin-bottom: 34px; }
  .temple body[data-tab="home"] .hero-cta { width: 100%; }
  .temple body[data-tab="home"] .hero-cta a { width: 100%; }
}
@media (max-width: 760px) {
  .tabbar .tb-ic { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-current="page"] .tb-ic { color: var(--seal); }
  .temple body[data-tab="home"] .hero-fan { margin-bottom: 52px; }
  .temple body[data-tab="home"] .hero-cta a:is(:lang(en), :lang(fr)) { letter-spacing: .02em; font-size: 15px; white-space: nowrap; }
}
@media (max-width: 760px) {
  /* phones: the dial sits whole above the cards, so the taiji is not half hidden behind them */
  .temple body[data-tab="home"] .hero-fan { --gate: 260px; --card-w: 96px; --spread: 40px; height: calc(var(--gate) * .516 + var(--card-w) * 1.62 + 6px); }
}
/* the dial's flat bottom edge (base line and cut rings) fades into the paper instead of ending in a hard line */
.gate line[y1="250"][y2="250"] { display: none; }
.temple .gate { -webkit-mask-image: linear-gradient(#000 62%, transparent 98%); mask-image: linear-gradient(#000 62%, transparent 98%); }

/* ---------- Classics Class (lesson.html) and the play grid with three cards ---------- */
.play-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.play-art-lesson { background: linear-gradient(180deg, #dfe6ee, #f1e3c4); box-shadow: inset 0 0 0 1px var(--line); }
.play-art-lesson img { height: 118px; width: auto; margin-bottom: 4px; }
.ls-list { display: grid; gap: 10px; margin: 22px 0; }
.ls-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; text-align: left; padding: 14px 16px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px; color: var(--ink); }
.ls-item:hover { border-color: var(--ink); }
.ls-item[aria-pressed="true"] { border-color: var(--seal); box-shadow: inset 3px 0 0 var(--seal); }
.ls-n { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--ink); font: 500 20px/1 var(--f-display); }
.ls-item[aria-pressed="true"] .ls-n { background: var(--seal); border-color: var(--seal); color: #fbf3e6; }
.ls-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ls-t strong { font: 500 17px/1.35 var(--f-body); letter-spacing: .04em; }
.ls-t span { font-size: 13px; color: var(--ink-faint); }
/* ten stems: each card fills its column, so its edges line up with the element box above it */
@media (min-width: 1081px) { .stem-card .tilt-wrap { max-width: none; width: 100%; } }
/* ---------- tighter spacing on wide screens: less empty paper between and inside sections ---------- */
@media (min-width: 761px) {
  .temple .hero { padding-block: 44px 28px; }
  .temple .view-form > .form-layout { padding-top: 28px; }
  .temple .intro { position: sticky; top: 16px; align-self: start; } /* the left column follows the long form */
  .temple .stems, .temple .play, .temple .readings { padding-block: 40px 44px; }
  .temple .stems-intro { align-items: start; margin-bottom: 22px; }
  .temple .stems-intro .lede { padding-top: 6px; }
  .temple .sec-head { margin-bottom: 10px; }
  .temple .steps { margin-bottom: 18px; }
  .temple .packages { margin-bottom: 20px; }
}

/* ---------- Climate Master (game.html) ---------- */
.game { padding-block: 28px 56px; }
.gm-wrap { max-width: 760px; }
.gm-intro { padding: 30px 32px; }
.gm-rules { margin: 6px 0 24px; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-soft); }
.gm-intro .btn-primary, .gm-end .btn-primary { min-width: 180px; }
.gm-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); letter-spacing: .06em; margin-bottom: 10px; }
.gm-top span:last-child { color: var(--seal); font-weight: 600; }
.gm-scene { position: relative; border: 1px solid var(--line); background: linear-gradient(180deg, #e9eef3, #f3eee3); padding: 18px 20px 0; overflow: hidden; transition: background .6s; }
.gm-scene[data-season="summer"] { background: linear-gradient(180deg, #f6e2c2, #f4ecdc); }
.gm-scene[data-season="spring"] { background: linear-gradient(180deg, #e6efe2, #f3eee3); }
.gm-scene[data-season="autumn"] { background: linear-gradient(180deg, #f1e4cf, #f3eee3); }
.gm-scene[data-season="winter"]::before { content: "❄ ❄ ❄ ❄ ❄ ❄ ❄ ❄"; position: absolute; inset: 6px 0 auto; text-align: center; letter-spacing: 3em; color: rgba(110, 140, 175, .35); font-size: 18px; animation: gm-snow 6s linear infinite; }
@keyframes gm-snow { from { transform: translateY(-10px); } to { transform: translateY(260px); opacity: 0; } }
.gm-when { margin: 0; font-size: 15px; color: var(--ink-soft); }
.gm-when strong { font: 500 24px/1.2 var(--f-body); color: var(--ink); letter-spacing: .06em; }
.gm-gauge { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }
.gm-gauge i { position: relative; flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #6f8fb5, #e6dcc5 50%, #d1663f); }
.gm-gauge b { position: absolute; top: -7px; width: 0; height: 0; border: 7px solid transparent; border-top: 10px solid var(--ink); transform: translateX(-50%); transition: left .9s cubic-bezier(.2, .8, .2, 1); }
.gm-stage { display: flex; align-items: flex-end; gap: 16px; min-height: 260px; padding-top: 10px; }
.gm-char { height: 240px; width: auto; flex: none; transition: transform .5s, filter .5s; transform-origin: 50% 100%; }
.gm-char.is-happy { animation: gm-hop .6s ease 2; filter: drop-shadow(0 0 14px rgba(240, 200, 105, .8)); }
.gm-char.is-ok { animation: gm-hop .6s ease 1; }
.gm-char.is-sad { animation: gm-shake .5s ease 1; filter: saturate(.6); }
@keyframes gm-hop { 50% { transform: translateY(-14px); } }
@keyframes gm-shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.gm-bubble { margin-bottom: 120px; background: #fffdf7; border: 1px solid var(--line); padding: 12px 16px; font-size: 16px; line-height: 1.6; max-width: 300px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.gm-bubble::after { content: ""; position: absolute; left: -9px; bottom: 16px; border: 8px solid transparent; border-right-color: #fffdf7; border-left: 0; }
.gm-who { font-size: 13px; font-weight: 600; }
.gm-ask { margin: 20px 0 12px; font: 500 18px/1.4 var(--f-body); letter-spacing: .04em; }
.gm-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gm-opt { border: 1px solid var(--line); background: var(--panel); padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: transform .15s, border-color .15s, opacity .3s; font-size: 14px; font-weight: 600; }
.gm-opt img { width: 100%; height: auto; display: block; border-radius: 6px; }
.gm-opt:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--ink); }
.gm-opt:disabled { cursor: default; }
.gm-opt.is-best { border-color: var(--wood); box-shadow: 0 0 0 2px var(--wood); }
.gm-opt.is-ok { border-color: var(--metal); box-shadow: 0 0 0 2px var(--metal); }
.gm-opt.is-wrong { border-color: var(--seal); box-shadow: 0 0 0 2px var(--seal); opacity: .75; }
.gm-opt.is-off { opacity: .45; }
.gm-result { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); background: var(--panel); }
.gm-res-title { margin: 0 0 6px; font: 600 20px/1.3 var(--f-body); }
.gm-res-title.good { color: var(--wood); } .gm-res-title.mid { color: var(--metal); } .gm-res-title.bad { color: var(--seal); }
.gm-res-body { margin: 0 0 6px; font-size: 16px; line-height: 1.7; }
.gm-res-book { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-faint); }
.gm-end { text-align: center; padding: 34px 28px; }
.gm-end-label { margin: 0; color: var(--ink-faint); letter-spacing: .2em; font-size: 13px; }
.gm-end-score { margin: 4px 0 6px; font: 600 72px/1 var(--f-display); color: var(--seal); font-variant-numeric: lining-nums; }
.gm-end-score small { display: block; font: 400 14px var(--f-body); color: var(--ink-faint); margin-top: 6px; }
.gm-end-title { margin: 8px 0 6px; font: 500 28px/1.3 var(--f-body); letter-spacing: .1em; }
.gm-end-note { margin: 0 auto 8px; max-width: 30em; color: var(--ink-soft); }
.gm-end-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.play-art-game { background: linear-gradient(90deg, #dfe6ee, #f6e2c2); box-shadow: inset 0 0 0 1px var(--line); align-items: center; gap: 6px; font-size: 22px; }
.play-art-game img { height: 110px; width: auto; }
.pa-snow { color: #6f8fb5; } .pa-arrow { color: var(--ink-faint); font-size: 16px; } .pa-sun { color: #d1663f; }
@media (max-width: 600px) {
  .gm-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-stage { min-height: 200px; } .gm-char { height: 180px; } .gm-bubble { margin-bottom: 80px; font-size: 15px; }
  .gm-intro { padding: 22px 18px; }
}

/* lesson units */
.ls-list { gap: 12px; }
.ls-unit { border: 1px solid var(--line); background: rgba(246, 242, 234, .6); }
.ls-unit > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.ls-unit > summary::-webkit-details-marker { display: none; }
.ls-unit > summary::after { content: "＋"; position: absolute; right: 16px; color: var(--ink-faint); }
.ls-unit { position: relative; }
.ls-unit[open] > summary::after { content: "－"; }
.ls-u-name { font: 500 19px/1.3 var(--f-body); letter-spacing: .08em; }
.ls-u-note { font-size: 13.5px; color: var(--ink-faint); }
.ls-u-items { display: grid; gap: 8px; padding: 0 12px 12px; }
.ls-item { padding: 10px 12px; }
.ls-n { width: 34px; height: 34px; font-size: 17px; }
.ls-item { grid-template-columns: 34px minmax(0, 1fr); }

/* ---------- Climate Master card version ---------- */
.gm-top { gap: 12px; } .gm-top span:nth-child(2) { color: var(--ink-faint); }
.gm-scene { --cold: 0; --hot: 0; background: linear-gradient(180deg, rgba(150, 175, 205, calc(var(--cold) * .55)), rgba(232, 160, 110, calc(var(--hot) * .45))), linear-gradient(180deg, #eef1f2, #f3eee3) !important; transition: background .8s; }
.gm-scene[data-season]::before { content: none; }
.gm-scene::after { content: "❄ ❄ ❄ ❄ ❄ ❄ ❄ ❄ ❄"; position: absolute; inset: 0 0 auto; text-align: center; letter-spacing: 2.6em; color: rgba(110, 140, 175, .5); font-size: 18px; opacity: var(--cold); animation: gm-snow 5s linear infinite; pointer-events: none; transition: opacity .8s; }
.gm-meters { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) max-content; align-items: center; gap: 12px 10px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.gm-meter { display: contents; }
.gm-m-label { font-weight: 600; color: var(--ink); white-space: nowrap; }
.gm-m-side { white-space: nowrap; }
.gm-meter > i { position: relative; height: 10px; border-radius: 5px; }
.gm-meter > .gm-bar { grid-column: 2 / -1; }
.gm-gauge { background: linear-gradient(90deg, #6f8fb5, #e6dcc5 50%, #d1663f); }
.gm-zone { position: absolute; left: 40%; width: 20%; top: -3px; bottom: -3px; border: 2px solid rgba(46, 122, 75, .8); border-radius: 4px; background: rgba(46, 122, 75, .15); }
.gm-meter #gm-needle { position: absolute; top: -9px; width: 0; height: 0; border: 7px solid transparent; border-top: 10px solid var(--ink); transform: translateX(-50%); transition: left .9s cubic-bezier(.2, .8, .2, 1); }
.gm-bar { background: var(--line-soft); overflow: hidden; }
.gm-bar b { display: block; height: 100%; width: 0; background: var(--wood); transition: width .8s ease; }
.gm-char.is-cold { animation: gm-shiver .25s linear infinite; filter: saturate(.7) hue-rotate(10deg); }
.gm-char.is-hot { filter: saturate(1.2) sepia(.25); animation: gm-wilt 2s ease-in-out infinite; }
@keyframes gm-shiver { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
@keyframes gm-wilt { 50% { transform: rotate(-3deg) translateY(4px); } }
.gm-hand { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.gm-card { border: 1px solid var(--line); background: var(--panel); padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: transform .2s, opacity .3s, border-color .2s; }
.gm-card img { width: 100%; height: auto; border-radius: 6px; display: block; }
.gm-card:hover:not(:disabled) { transform: translateY(-6px); border-color: var(--ink); }
.gm-card-name { font-size: 14px; font-weight: 600; }
.gm-card-fx { font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.35; }
.gm-card.is-used { opacity: .25; transform: translateY(-14px) scale(.9); }
.gm-card:disabled { cursor: default; }
.gm-res-stars { margin: 0 0 6px; font-size: 26px; letter-spacing: .1em; color: var(--line); }
.gm-res-stars .on { color: #d9a43a; }
.gm-seal { display: inline-block; vertical-align: middle; margin-left: 12px; font: 600 13px var(--f-body); letter-spacing: .1em; color: #fbf3e6; background: var(--seal); padding: 4px 8px; transform: rotate(-4deg); }
.gm-res-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .gm-hand { gap: 5px; }
  .gm-card { padding: 3px 3px 6px; gap: 3px; }
  .gm-card img { border-radius: 4px; }
  .gm-card-name { font-size: 12px; line-height: 1.25; text-align: center; }
  .gm-card-fx { font-size: 10.5px; line-height: 1.3; }
  .gm-card.is-used { transform: translateY(-6px) scale(.92); }
  .gm-top { font-size: 13px; }
}

/* Today's score on the home hero: the saved chart's reading for today, or a question that leads to the birth form */
.daily { margin-top: 18px; }
.dy-k { margin: 0 0 10px; font-size: 12.5px; letter-spacing: .12em; color: var(--ink-faint); }
.dy-k:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.dy-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.dy-person { padding: 3px 10px; border: 1px solid var(--line); background: transparent; font: inherit; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.dy-person.is-on { border-color: var(--ink); color: var(--ink); background: rgba(255, 255, 255, .5); }
.dy-row { display: flex; align-items: center; gap: 14px; }
.dy-ring { position: relative; flex: none; width: 64px; height: 64px; }
.dy-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dy-ring .ts-track, .dy-ring .ts-bar { stroke-width: 5; }
.dy-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 24px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--seal); }
.dy-ring.is-empty .ts-track { stroke-dasharray: 3 4; }
.dy-ring.is-empty b { color: var(--ink-faint); font-weight: 400; }
.dy-head { min-width: 0; }
.dy-t { margin: 0; font: 600 17px/1.35 var(--f-body); letter-spacing: .08em; color: var(--ink); }
.dy-t:is(:lang(en), :lang(fr)) { letter-spacing: 0; }
.dy-god { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.dy-s { margin: 12px 0 0; font-size: 14px; line-height: 1.75; color: var(--ink-soft); text-wrap-style: var(--tw-pretty, pretty); }
.dy-yj { display: grid; gap: 4px; margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.dy-yj b { display: inline-block; margin-right: 8px; font-weight: 600; }
.dy-yi { color: var(--tp-moss, #4f6b3a); }
.dy-ji { color: var(--tp-red, var(--seal)); }
.dy-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; }
.temple .dy-acts .btn-gold { padding: 10px 18px; font-size: 14px; letter-spacing: .14em; }
.temple .dy-acts .btn-gold:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.dy-add { font-size: 13px; }
.dy-short { display: none; }
.dy-ask { margin-bottom: 12px; font-size: 19px; }
.dy-def { display: grid; gap: 6px; }
.dy-def div { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dy-def div:is(:lang(en), :lang(fr)) { grid-template-columns: 6.6em minmax(0, 1fr); }
.dy-def dt { font-weight: 600; color: var(--ink); font-size: 13px; letter-spacing: .1em; }
.dy-def dt:is(:lang(en), :lang(fr)) { letter-spacing: 0; }
.dy-def dd { margin: 0; }
/* the ten Day Masters as a row of tiles; each opens its card */
.dy-stems { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 290px; }
.dy-stem { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); font: 500 20px/1 var(--f-body); cursor: pointer; transition: border-color .15s, background .15s; }
.dy-stem:hover, .dy-stem:focus-visible { border-color: var(--ink); background: rgba(255, 255, 255, .7); }
.temple .dy-stem { border-color: var(--tp-line); }
.temple .dy-stem:hover, .temple .dy-stem:focus-visible { border-color: var(--tp-ink); }
.dy-god span { font-weight: 600; }
.temple .dy-ring b { color: var(--tp-red); }
.temple .dy-ring .ts-bar { stroke: var(--tp-red); }
.temple .dy-ring .ts-track { stroke: var(--tp-line); }
.temple .dy-ring.is-empty b { color: var(--tp-ink-soft); }
/* Chinese on wide screens: it fills the space under the vertical title */
@media (min-width: 701px) {
  .temple:lang(zh) .hero-title, .temple .hero-title:lang(zh) { grid-row: 1 / span 2; }
  /* below the title and the lede, every row spans both columns so nothing is left half empty */
  .temple:lang(zh) .hero-copy > .hero-nums, .temple:lang(zh) .hero-copy > .hero-now, .temple:lang(zh) .hero-copy > .daily { grid-column: 1 / -1; max-width: none; }
  .temple:lang(zh) .hero-copy > .hero-nums { margin-top: 28px; }
  /* today as one quiet card: words and button on the left, the ten Day Masters on the right */
  .temple:lang(zh) .hero-copy > .daily { margin-top: 22px; padding: 20px 22px; border: 1px solid var(--tp-line); background: rgba(255, 255, 255, .28); }
  .temple:lang(zh) .daily.is-ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 212px); grid-template-areas: "k stems" "ask stems" "s stems" "acts stems"; grid-template-rows: auto auto 1fr auto; column-gap: 28px; }
  .temple:lang(zh) .daily.is-ask .dy-k { grid-area: k; }
  .temple:lang(zh) .daily.is-ask .dy-ask { grid-area: ask; margin-bottom: 0; }
  .temple:lang(zh) .daily.is-ask .dy-s { grid-area: s; margin-top: 8px; }
  .temple:lang(zh) .daily.is-ask .dy-acts { grid-area: acts; }
  .temple:lang(zh) .daily.is-ask .dy-stems { grid-area: stems; align-self: center; }
}
.temple:is(:lang(en), :lang(fr)) .daily { max-width: 30em; padding-top: 16px; border-top: 1px solid var(--tp-line); }

/* the Save button in the result header */
.sum-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; }
.save-box { display: flex; align-items: center; gap: 10px; }
.save-box:empty { display: none; }
.temple .btn-save { padding: 10px 20px; font-size: 14px; letter-spacing: .14em; }
.temple .btn-save:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.save-done { font-size: 14px; color: var(--tp-moss, var(--ink-soft)); letter-spacing: .06em; }
.save-box .zoom-link { font-size: 13px; }

/* ---------- Fun: Chart Match and the stem quiz ---------- */
.play-art-match { background: linear-gradient(90deg, #e3ece2, #f3e6c8); box-shadow: inset 0 0 0 1px var(--line); align-items: flex-end; gap: 0; }
.play-art-match img { height: 116px; width: auto; margin-bottom: 4px; }
.pa-he { align-self: center; margin: 0 -2px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--seal); color: #fbf3e6; font: 600 18px/1 var(--f-body); position: relative; z-index: 1; }
.play-art-quiz { background: linear-gradient(180deg, #f6e6d6, #eedcc0); box-shadow: inset 0 0 0 1px var(--line); gap: 14px; }
.play-art-quiz img { height: 122px; width: auto; margin-bottom: 4px; }
.pa-q { align-self: center; font: 500 64px/1 var(--f-display); color: var(--seal); }
.temple .play-art-match, .temple .play-art-quiz { box-shadow: inset 0 0 0 3px #4a3426; }
@media (max-width: 480px) { .play-art-match img { height: 92px; } .pa-he { width: 26px; height: 26px; font-size: 14px; } .play-art-quiz img { height: 96px; } .pa-q { font-size: 44px; } }

.fun-page { padding: 34px 0 64px; }
.fun-page .lede { max-width: 34em; }
.mt-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.mt-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 22px; margin-top: 22px; }
.mt-person { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mt-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-faint); }
.mt-saved .chip-btn { padding: 3px 10px; font-size: 12.5px; }
.mt-go-row { grid-column: 1 / -1; }
.mt-go-row .btn-primary { width: 100%; justify-content: center; }
.mt-result { min-width: 0; }
.mt-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 8px; }
.mt-who { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mt-who img { height: 130px; width: auto; }
.mt-who figcaption { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.mt-who figcaption b { display: block; font-size: 15px; color: var(--ink); }
.mt-score { position: relative; width: 112px; height: 112px; align-self: center; }
.mt-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mt-score b { position: absolute; inset: 0 0 14px; display: grid; place-items: center; font: 600 38px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--seal); }
.mt-score span { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 11.5px; letter-spacing: .2em; color: var(--ink-faint); }
.mt-verdict { margin: 14px 0 6px; text-align: center; font: 600 24px/1.3 var(--f-body); letter-spacing: .12em; color: var(--ink); }
.mt-verdict:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: .01em; }
.mt-rows { margin: 18px 0 0; display: grid; }
.mt-row { padding: 14px 0; border-top: 1px solid var(--line); }
.mt-row dt { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mt-k { font-weight: 600; letter-spacing: .1em; }
.mt-k:is(:lang(en), :lang(fr)) { letter-spacing: .02em; }
.mt-chars { font-size: 13px; color: var(--ink-faint); }
.mt-tag { margin-left: auto; padding: 2px 8px; font-size: 12px; letter-spacing: .08em; border: 1px solid currentColor; }
.mt-tag.is-good { color: var(--tp-moss, #4f6b3a); }
.mt-tag.is-hard { color: var(--tp-red, var(--seal)); }
.mt-tag.is-flat { color: var(--ink-faint); }
.mt-row dd { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.mt-acts, .qz-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.mt-note { margin: 14px 0 0; }
.temple .mt-score .ts-bar { stroke: var(--tp-red); }
.temple .mt-score .ts-track { stroke: var(--tp-line); }
@media (max-width: 900px) { .mt-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 560px) {
  .mt-form { grid-template-columns: minmax(0, 1fr); }
  .mt-who img { height: 100px; }
  .mt-score { width: 92px; height: 92px; }
  .mt-score b { font-size: 30px; }
  .mt-score span { bottom: 20px; }
  .mt-acts > * { flex: 1 1 100%; justify-content: center; }
}

.qz-wrap { max-width: 760px; }
.qz-box { margin-top: 22px; min-height: 340px; }
.qz-intro { display: grid; justify-items: center; gap: 26px; padding: 24px 0; }
.qz-faces { display: grid; grid-template-columns: repeat(5, 52px); gap: 8px; }
.qz-faces span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); font: 500 24px/1 var(--f-body); background: rgba(255, 255, 255, .35); }
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-faint); letter-spacing: .08em; }
.qz-dots { display: flex; gap: 5px; }
.qz-dots i { width: 18px; height: 3px; background: var(--line); }
.qz-dots i.is-done { background: var(--ink-soft); }
.qz-dots i.is-on { background: var(--seal); }
.qz-q { margin: 18px 0 16px; font: 600 22px/1.45 var(--f-body); letter-spacing: .04em; }
.qz-q:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: 0; }
.qz-opts { display: grid; gap: 8px; }
.qz-opt { text-align: left; padding: 13px 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .4); font-size: 15.5px; line-height: 1.5; cursor: pointer; transition: border-color .15s, background .15s; }
.qz-opt:hover, .qz-opt:focus-visible { border-color: var(--ink); background: rgba(255, 255, 255, .75); }
.qz-opt.is-on { border-color: var(--seal); }
.qz-back { margin-top: 14px; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
.qz-result { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
.qz-art { margin: 0; display: grid; place-items: end center; height: 220px; background: linear-gradient(180deg, #f6ecda, #ead8b8); box-shadow: inset 0 0 0 3px #4a3426; }
.qz-art img { height: 196px; width: auto; }
.qz-k { margin: 0 0 6px; font-size: 13px; letter-spacing: .16em; color: var(--ink-faint); }
.qz-k:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.qz-name { margin: 0; display: flex; align-items: baseline; gap: 12px; font: 600 40px/1.15 var(--f-body); letter-spacing: .06em; }
.qz-name:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: 0; }
.qz-name small { font-size: 15px; font-weight: 400; color: var(--ink-soft); letter-spacing: .1em; }
.qz-tag { margin: 8px 0 0; font-size: 16px; color: var(--seal); }
.qz-about { margin: 10px 0 18px; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }
.qz-mix { display: grid; gap: 6px; max-width: 320px; }
.qz-bar { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13px; }
.qz-bar b { font-weight: 600; }
.qz-bar i { height: 6px; background: var(--line-soft, rgba(0, 0, 0, .06)); }
.qz-bar s { display: block; height: 100%; background: currentColor; text-decoration: none; }
.qz-real { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.75; color: var(--ink-soft); }
.qz-acts .zoom-link { background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
@media (max-width: 560px) {
  .qz-result { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .qz-art { height: 180px; }
  .qz-art img { height: 160px; }
  .qz-name { font-size: 32px; }
  .qz-faces { grid-template-columns: repeat(5, 44px); }
  .qz-acts > a { flex: 1 1 100%; justify-content: center; }
}
/* match: relationship scenes and the two sets of pillars */
.mt-scene { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; min-width: 0; }
.mt-scene legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 15px; }
.mt-scenes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mt-sc { padding: 9px 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); font-size: 14px; letter-spacing: .06em; cursor: pointer; white-space: nowrap; }
.mt-sc:is(:lang(en), :lang(fr)) { letter-spacing: 0; font-size: 13px; }
.mt-sc:hover { border-color: var(--ink); }
.mt-sc.is-on { border-color: var(--seal); color: var(--seal); background: rgba(168, 64, 46, .06); font-weight: 600; }
.mt-scene-k { margin: 0 0 12px; text-align: center; font-size: 12.5px; letter-spacing: .3em; color: var(--seal); }
.mt-scene-k:is(:lang(en), :lang(fr)) { letter-spacing: .1em; text-transform: uppercase; }
.mt-pillars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-bottom: 18px; border: 1px solid var(--line); }
.mt-pcard { padding: 12px 14px; min-width: 0; }
.mt-pcard + .mt-pcard { border-left: 1px dashed var(--line); }
.mt-pname { margin: 0 0 8px; font-weight: 600; font-size: 14.5px; display: flex; align-items: baseline; gap: 8px; }
.mt-pname small { font-weight: 400; font-size: 12px; color: var(--ink-faint); }
.mt-pcols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
.mt-pc { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; font: 600 20px/1 var(--f-body); }
.mt-pc.is-day { background: rgba(168, 64, 46, .07); }
.mt-pc i { font-style: normal; font-weight: 400; color: var(--ink-faint); }
.mt-tip { margin: 0 auto; max-width: 26em; text-align: center; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
@media (max-width: 560px) { .mt-scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mt-pc { font-size: 17px; } .mt-pcard { padding: 10px 8px; } }

/* ---------- Team BaZi: home section ---------- */
.teamsec { padding: 24px 0 56px; }
.teamsec .sec-head { flex-wrap: wrap; }
.teamsec-tag { align-self: center; padding: 3px 10px; border: 1px solid var(--tp-red, var(--seal)); color: var(--tp-red, var(--seal)); font-size: 12.5px; letter-spacing: .2em; }
.teamsec-tag:is(:lang(en), :lang(fr)) { letter-spacing: .06em; }
.tm-kicker { margin: 0; font-size: 12.5px; letter-spacing: .3em; color: var(--tp-red, var(--seal)); }
.tm-kicker:is(:lang(en), :lang(fr)) { letter-spacing: .12em; text-transform: uppercase; }
.teamsec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.teamsec-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; background: #f6f1e7; border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.teamsec-item:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(40, 30, 20, .55); }
.teamsec-item strong { margin-top: 8px; font: 500 21px/1.3 var(--f-body); letter-spacing: .1em; }
.teamsec-item strong:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: .01em; }
.ts-note { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); flex: 1; }
.teamsec-item em { font-style: normal; font-weight: 600; font-size: 14.5px; color: var(--seal); }
.teamsec-item em::after { content: " →"; }
.ts-art { position: relative; height: 132px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; overflow: hidden; box-shadow: inset 0 0 0 3px #4a3426; }
.ts-art img { height: 112px; width: auto; margin-bottom: 4px; }
.ts-art-company { background: linear-gradient(180deg, #efe2c8, #e2cda6); }
.ts-art-fit { background: linear-gradient(90deg, #e3ece2, #efe2c8); gap: 10px; }
.ts-art-pair { background: linear-gradient(90deg, #e3ece2, #f3e6c8); }
.ts-art-team { background: linear-gradient(180deg, #e4e8ee, #efe2c8); }
.ts-art-team img { height: 92px; margin: 0 -10px 4px; }
.ts-art-team img:nth-child(2), .ts-art-team img:nth-child(3) { height: 104px; position: relative; z-index: 1; }
.ts-seal { align-self: center; width: 34px; height: 34px; display: grid; place-items: center; background: var(--seal); color: #fbf3e6; font: 600 18px/1 var(--f-body); position: relative; z-index: 2; }
.ts-art-company .ts-seal { position: absolute; top: 12px; right: 12px; }
.ts-art-pair .ts-seal { margin: 0 -4px; }
.ts-x { align-self: center; font: 400 26px/1 var(--f-display); color: var(--ink-faint); }
.teamsec-consent { margin: 16px 0 0; font-size: 13px; color: var(--ink-faint); }
@media (max-width: 1000px) { .teamsec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  body[data-tab="home"] .teamsec { padding: 8px 0 24px; }
  .teamsec-grid { gap: 10px; margin-top: 16px; }
  .teamsec-item { padding: 10px 10px 12px; gap: 4px; }
  .ts-art { height: 96px; } .ts-art img { height: 82px; } .ts-art-team img { height: 66px; } .ts-art-team img:nth-child(2), .ts-art-team img:nth-child(3) { height: 74px; }
  .ts-seal { width: 26px; height: 26px; font-size: 14px; } .ts-art-company .ts-seal { top: 8px; right: 8px; }
  .teamsec-item strong { font-size: 17px; margin-top: 4px; }
  .ts-note { font-size: 13px; line-height: 1.6; }
  .teamsec-item em { font-size: 13.5px; }
}

/* ---------- Team BaZi page ---------- */
.team .lede { max-width: 38em; }
.tm-consent { margin: 4px 0 0; max-width: 46em; padding: 10px 14px; border-left: 2px solid var(--tp-red, var(--seal)); background: rgba(168, 64, 46, .05); font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.tm-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0 18px; border: 1px solid var(--ink); }
.tm-tabs button { padding: 13px 8px; border: 0; background: transparent; font-size: 15px; letter-spacing: .1em; cursor: pointer; color: var(--ink); }
.tm-tabs button:is(:lang(en), :lang(fr)) { letter-spacing: 0; font-size: 14px; }
.tm-tabs button + button { border-left: 1px solid var(--ink); }
.tm-tabs button:hover { background: rgba(255, 255, 255, .5); }
.tm-tabs button.is-on { background: var(--ink); color: var(--tp-paper, #f4efe4); font-weight: 600; }
.tm-layout { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 28px; }
.tm-form { display: grid; gap: 18px; min-width: 0; }
.tm-tabnote { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.tm-block { display: grid; gap: 12px; min-width: 0; }
.tm-block + .tm-block { padding-top: 16px; border-top: 1px solid var(--line); }
.tm-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tm-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-faint); }
.tm-saved .chip-btn { padding: 3px 10px; font-size: 12.5px; }
.tm-sex legend { margin-bottom: 8px; }
.tm-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.tm-seg label { position: relative; cursor: pointer; }
.tm-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tm-seg span { display: block; padding: 10px 0; text-align: center; font-size: 14.5px; }
.tm-seg label + label span { border-left: 1px solid var(--line); }
.tm-seg input:checked + span { background: var(--ink); color: var(--tp-paper, #f4efe4); }
.tm-seg input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: -2px; }
.tm-members { display: grid; gap: 8px; }
.tm-member { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(128px, 1.2fr) 100px 24px; gap: 6px; align-items: center; }
.tm-member input { min-width: 0; padding: 9px 6px; font-size: 14px; }
.tm-mn { font-size: 12px; color: var(--ink-faint); text-align: center; }
.tm-x { width: 24px; height: 28px; padding: 0; border: 0; background: none; color: var(--ink-faint); font-size: 18px; cursor: pointer; }
.tm-x:hover { color: var(--seal); }
.tm-add { justify-self: start; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
.tm-form .mt-scenes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tm-result { min-width: 0; }
.tm-result.is-empty { display: grid; place-items: center; min-height: 420px; background: rgba(255, 255, 255, .2); }
.tm-empty { text-align: center; color: var(--ink-faint); font-size: 14.5px; }
.tm-empty-art { display: flex; justify-content: center; align-items: flex-end; gap: 0; margin-bottom: 14px; opacity: .55; filter: grayscale(.5); }
.tm-empty-art img { height: 110px; width: auto; margin: 0 -8px; }
.tm-empty-art img:nth-child(2) { height: 128px; position: relative; z-index: 1; }
.mt-pillars.is-one { grid-template-columns: minmax(0, 1fr); }
.mt-pc em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--ink-faint); letter-spacing: .1em; margin-bottom: 2px; }
.tm-co { margin: 6px 0 18px; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; }
.tm-co .qz-art { height: 180px; }
.tm-co .qz-art img { height: 160px; }
.tm-co .qz-name { font-size: 32px; }
.tm-co .qz-about { margin-bottom: 0; }
.tm-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); margin-bottom: 18px; }
.tm-fact { padding: 14px 16px; min-width: 0; }
.tm-fact + .tm-fact { border-left: 1px solid var(--line); }
.tm-fk { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .16em; color: var(--ink-faint); }
.tm-fk:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.tm-fv { margin: 0 0 4px; font: 600 24px/1.2 var(--f-body); letter-spacing: .06em; }
.tm-fn { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.tm-sub { margin: 18px 0 10px; font-weight: 600; font-size: 15px; letter-spacing: .1em; }
.tm-sub:is(:lang(en), :lang(fr)) { letter-spacing: .02em; }
.tm-mix { max-width: none; }
.tm-mix .qz-bar { grid-template-columns: 3.2em minmax(0, 1fr) 1.6em; }
.tm-mix small { font-size: 12px; color: var(--ink-faint); text-align: right; }
.tm-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tm-years li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.tm-years li b { font-weight: 600; color: var(--ink); }
.tm-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.tm-notes b { margin-right: 8px; }
.tm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tm-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .3); }
.tm-card img { height: 46px; width: auto; justify-self: center; }
.tm-cn { margin: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-cs { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.tm-star { color: var(--tp-red, var(--seal)); }
.tm-grid-wrap { overflow-x: auto; }
.tm-grid { border-collapse: collapse; font-size: 12.5px; }
.tm-grid th { font-weight: 500; color: var(--ink-soft); padding: 4px 6px; white-space: nowrap; }
.tm-grid thead th { vertical-align: bottom; height: 64px; }
.tm-grid thead th span { display: inline-block; writing-mode: vertical-rl; max-height: 60px; overflow: hidden; }
.tm-grid tbody th { text-align: right; max-width: 6em; overflow: hidden; text-overflow: ellipsis; }
.tm-grid td { padding: 1px; }
.tm-grid td button { width: 40px; height: 40px; border: 0; cursor: pointer; font-size: 11.5px; font-variant-numeric: lining-nums;
  background: rgba(168, 64, 46, calc(.08 + var(--a) * .82)); color: #fff; }
.tm-grid td button.is-on { outline: 2px solid var(--ink); outline-offset: 1px; }
.tm-grid td.is-self { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 5px); }
.tm-cell { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.tm-cell:empty { display: none; }
.tm-cell p { margin: 0 0 4px; }
.tm-cell-h { display: flex; gap: 12px; align-items: baseline; }
.tm-cell-h b { color: var(--ink); }
.tm-cell-h span { color: var(--seal); font-weight: 600; }
.tm-pairs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.tm-pairs ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tm-pairs li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); font-size: 14px; }
.tm-pairs li b { color: var(--tp-moss, #4f6b3a); }
.tm-pairs .is-tense li b { color: var(--tp-red, var(--seal)); }
@media (max-width: 1000px) { .tm-layout { grid-template-columns: minmax(0, 1fr); } .tm-result.is-empty { min-height: 0; padding: 28px; } }
@media (max-width: 560px) {
  .tm-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-tabs button:nth-child(3) { border-left: 0; }
  .tm-tabs button:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .tm-co { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .tm-co .qz-art { height: 140px; } .tm-co .qz-art img { height: 124px; } .tm-co .qz-name { font-size: 26px; }
  .tm-facts, .tm-pairs { grid-template-columns: minmax(0, 1fr); }
  .tm-fact + .tm-fact { border-left: 0; border-top: 1px solid var(--line); }
  .tm-years li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tm-member { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) 24px; }
  .tm-member input[type=time] { grid-column: 2 / 4; grid-row: 2; }
  .tm-member .tm-x { grid-column: 4; grid-row: 1; }
  .tm-member { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
  .tm-form .mt-scenes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mt-sc { font-size: 13px; letter-spacing: 0; }
}
/* mid-width desktops: the hero column is narrow, so the ten stems go under the question instead of beside it */
@media (min-width: 901px) and (max-width: 1240px) {
  .temple:lang(zh) .daily.is-ask { grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "ask" "stems" "s" "acts"; grid-template-rows: none; }
  .temple:lang(zh) .daily.is-ask .dy-stems { margin-top: 12px; max-width: 320px; }
}

/* the turnable wheel: a label over the pointer, room above the gate for it */
.hero-fan { padding-top: 46px; height: calc(var(--gate) * .516 + var(--card-w) * 1.62 + 12px); }
.gate { top: 46px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gate:active { cursor: grabbing; }
#dial-ring { transform-box: view-box; transform-origin: 250px 250px; }
.gate text { cursor: pointer; }
.dial-label { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 6px; border: 1px solid var(--tp-line, var(--line)); background: rgba(250, 246, 238, .92); font-size: 14px; color: var(--ink-soft); }
.dl-text { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 2px; }
.dl-text b { font-weight: 600; color: var(--ink); }
.dl-k { font-size: 12px; letter-spacing: .1em; color: var(--ink-faint); }
.dl-k:is(:lang(en), :lang(fr)) { letter-spacing: .02em; }
.dl-sep { color: var(--ink-faint); margin: 0 2px; }
.dl-step { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.dl-step:hover { color: var(--seal); }
.dl-back { padding: 4px 10px; border: 0; background: var(--tp-red, var(--seal)); color: #fbf3e6; font-size: 12.5px; letter-spacing: .1em; cursor: pointer; }
.dl-back:is(:lang(en), :lang(fr)) { letter-spacing: .02em; }
.dial-label.is-away { border-color: var(--tp-red, var(--seal)); }
@media (max-width: 760px) {
  .hero-fan { padding-top: 40px; }
  .gate { top: 40px; }
  .temple body[data-tab="home"] .hero-fan { height: calc(var(--gate) * .516 + var(--card-w) * 1.62 + 46px); }
  .dial-label { font-size: 12.5px; gap: 2px; padding: 2px 4px; }
  .dl-k { font-size: 11px; }
  .dl-step { width: 22px; height: 22px; font-size: 18px; }
  .dl-back { padding: 3px 8px; font-size: 11.5px; }
}

/* ---------- Just for Fun: one card shape for all six, art on top, the characters say a line ---------- */
.play-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.play-card { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 16px 18px; }
.play-art, .temple .play-art { position: relative; width: 100%; box-sizing: border-box; height: 178px; padding-top: 34px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; border-radius: 0; box-shadow: inset 0 0 0 3px #4a3426; }
.play-art img, .play-art-theater img, .play-art-lesson img, .play-art-game img, .play-art-match img, .play-art-quiz img { height: 124px; width: auto; margin-bottom: 4px; }
.play-art-theater { background: linear-gradient(180deg, #2c3f5c, #1f2c42); }
.play-art-today, .temple .play-art-today { background: linear-gradient(180deg, #f6ecda, #ead8b8); box-shadow: inset 0 0 0 3px #4a3426; align-items: flex-end; }
.play-art-quiz { background: linear-gradient(180deg, #f6e6d6, #eedcc0); }
.play-art-game { align-items: flex-end; }
.play-art-game .pa-snow, .play-art-game .pa-arrow, .play-art-game .pa-sun { align-self: center; margin-top: 30px; }
.play-art-match .pa-he { align-self: center; margin: 30px -4px 0; }
.pa-say { position: absolute; top: 10px; z-index: 3; max-width: calc(100% - 24px); padding: 4px 10px; background: #fffdf7; border: 1.5px solid #4a3426; border-radius: 12px; font-size: 13px; line-height: 1.4; color: #2b2722; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-say::after { content: ""; position: absolute; bottom: -6px; width: 9px; height: 9px; background: #fffdf7; border-right: 1.5px solid #4a3426; border-bottom: 1.5px solid #4a3426; transform: rotate(45deg); }
.pa-say-l { left: 14%; } .pa-say-l::after { left: 22px; }
.pa-say-r { right: 14%; } .pa-say-r::after { right: 22px; }
.pa-say-c { left: 50%; transform: translateX(-50%); } .pa-say-c::after { left: calc(50% - 5px); }
.pa-say-2 { display: flex; flex-direction: column; align-items: center; top: 6px; padding: 3px 12px; }
.pa-say-2 span:first-child { font-weight: 700; color: var(--tp-red, var(--seal)); font-size: 14px; }
.play-art-today img { height: 116px; }
.play-text { gap: 6px; }
.play-text strong, .temple .play-text strong, .temple:lang(zh) .play-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-text > span { flex: 1; }
.play-card .play-text { flex: 1; }
@media (max-width: 1000px) { .play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .play-grid { gap: 10px; }
  .play-card { padding: 10px 10px 12px; gap: 10px; grid-template-columns: none; }
  .play-art, .temple .play-art { height: 136px; padding-top: 30px; }
  .play-art img, .play-art-theater img, .play-art-lesson img, .play-art-game img, .play-art-match img, .play-art-quiz img, .play-art-today img { height: 90px; }
  .pa-say { font-size: 11.5px; padding: 3px 7px; top: 7px; }
  .pa-say-l { left: 8%; } .pa-say-r { right: 8%; }
  .pa-say-2 span:first-child { font-size: 12px; }
  .play-art-game { font-size: 16px; }
  .play-art-match .pa-he { width: 24px; height: 24px; font-size: 13px; }
  .play-text strong, .temple .play-text strong, .temple:lang(zh) .play-text strong { font-size: 17px; letter-spacing: .04em; }
  .play-text > span, :lang(zh) .play-text > span { font-size: 13px; line-height: 1.6; }
  .play-text em, :lang(zh) .play-text em { font-size: 13.5px; }
}

/* today's reading spoken by the person's own Day Master */
.dy-talk { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: end; margin-top: 12px; }
.dy-char { width: 58px; height: auto; }
.dy-bubble { position: relative; padding: 10px 12px; background: #fffdf7; border: 1.5px solid #4a3426; border-radius: 12px; margin-bottom: 18px; }
.dy-bubble::after { content: ""; position: absolute; left: -6px; bottom: 14px; width: 9px; height: 9px; background: #fffdf7; border-left: 1.5px solid #4a3426; border-bottom: 1.5px solid #4a3426; transform: rotate(45deg); }
.dy-bubble .dy-s { margin: 0; color: var(--ink); }
.dy-bubble .dy-yj { margin-top: 6px; }
@media (max-width: 760px) { .temple:lang(zh) body[data-tab="home"] .dy-talk { display: none; } }

/* empty state: today's stem says hello */
.dy-host { margin-top: 10px; }
.dy-host .dy-bubble { margin-bottom: 14px; }
.dy-host .dy-bubble p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink); }

/* mood by the double-hour: twelve bars on the home card, a full table on the result page */
.dy-hours { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dy-hk { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .14em; color: var(--ink-faint); }
.dy-hk:is(:lang(en), :lang(fr)) { letter-spacing: .04em; }
.hr-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; align-items: end; height: 64px; }
.hr-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; }
.hr-bar i { display: block; height: calc((var(--s) - 35) * 1.6%); min-height: 6px; background: rgba(168, 64, 46, calc(.18 + (var(--s) - 30) / 100)); }
.hr-bar span { font-size: 11.5px; color: var(--ink-faint); text-align: center; line-height: 1; }
.hr-bar.is-now span { color: var(--tp-red, var(--seal)); font-weight: 700; }
.hr-bar.is-on i { outline: 2px solid var(--ink); outline-offset: 1px; }
.hr-detail { margin-top: 8px; }
.hr-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; color: var(--ink-soft); }
.hr-line > b { color: var(--ink); }
.hr-score { font-weight: 700; color: var(--tp-red, var(--seal)); }
.hr-span { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.hr-yj b { margin: 0 4px 0 0; }
.hr-yj b.dy-ji { margin-left: 6px; }
.hr-best { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.today-hours { margin-top: 18px; }
.today-hours h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 15px; }
.today-hours h3 small { font-weight: 400; font-size: 13px; color: var(--ink-faint); }
.hr-table { display: grid; border-top: 1px solid var(--line); }
.hr-row { display: grid; grid-template-columns: 6.2em 5.2em 3em minmax(80px, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.hr-row.is-now { background: rgba(168, 64, 46, .06); }
.hr-name { font-weight: 600; color: var(--ink); }
.hr-name em { margin-left: 4px; padding: 0 4px; font-style: normal; font-size: 11px; font-weight: 400; color: #fbf3e6; background: var(--tp-red, var(--seal)); }
.hr-meter { position: relative; height: 16px; background: var(--line-soft, rgba(0, 0, 0, .05)); }
.hr-meter i { position: absolute; inset: 0 auto 0 0; background: rgba(168, 64, 46, .55); }
.hr-meter b { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--ink); }
.hr-row .hr-yj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .hr-row { grid-template-columns: 4.4em 4.8em minmax(0, 1fr); row-gap: 4px; }
  .hr-row .hr-gz { display: none; }
  .hr-row .hr-yj { grid-column: 1 / -1; white-space: normal; }
  .hr-row .hr-yj + .hr-yj { margin-top: -4px; }
}
@media (max-width: 760px) { .temple:lang(zh) body[data-tab="home"] .dy-hours { display: none; } }

/* Team BaZi tiles: one composition for all four — characters the same height, centred, one seal in the top-right corner */
.teamsec-lede { max-width: none; }
.ts-art, .ts-art-fit, .ts-art-pair, .ts-art-team { gap: 0; padding: 0; }
.ts-art img, .ts-art-team img, .ts-art-team img:nth-child(2), .ts-art-team img:nth-child(3) { height: 112px; margin: 0 -6px 6px; position: static; }
.ts-art-team img { margin: 0 -14px 6px; }
.ts-art .ts-seal, .ts-art-company .ts-seal, .ts-art-pair .ts-seal { position: absolute; top: 12px; right: 12px; margin: 0; width: 30px; height: 30px; font-size: 16px; }
.ts-art-company { background: linear-gradient(180deg, #f2e7d2, #e6d3b0); }
.ts-art-fit { background: linear-gradient(180deg, #e6eee4, #e9dcc0); }
.ts-art-pair { background: linear-gradient(180deg, #eef0e2, #eedfc0); }
.ts-art-team { background: linear-gradient(180deg, #e6e9ee, #ecdfc4); }
@media (max-width: 760px) {
  .ts-art img, .ts-art-team img, .ts-art-team img:nth-child(2), .ts-art-team img:nth-child(3) { height: 80px; margin: 0 -5px 4px; }
  .ts-art-team img { margin: 0 -11px 4px; }
  .ts-art .ts-seal, .ts-art-company .ts-seal, .ts-art-pair .ts-seal { top: 7px; right: 7px; width: 22px; height: 22px; font-size: 12px; }
}

/* No single-character seal badges anywhere: headings get a thin vermilion rule instead */
.seal-sm { display: none !important; }
.sec-head h2 { position: relative; padding-left: 18px; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: .78em; transform: translateY(-50%); background: var(--tp-red, var(--seal)); }
.gets-list li { padding-left: 16px; border-left: 2px solid var(--tp-red, var(--seal)); }
.track-head { gap: 0; }

/* ---------- Almanac (万年历) ---------- */
.almanac .sec-head { margin-bottom: 8px; }
.almanac .th-title { margin: 0; }
.cal-lede { max-width: 46em; margin-bottom: 22px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cal-cal { padding: 18px; position: sticky; top: 16px; } /* stays in view beside the long day detail */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-month { flex: 1; margin: 0; text-align: center; font: 500 22px/1.2 var(--f-body); letter-spacing: .08em; }
.cal-month small { display: block; margin-top: 4px; font-size: 13px; letter-spacing: .12em; color: var(--ink-faint); }
.cal-nav { width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.cal-nav:hover { border-color: var(--ink); color: var(--ink); }
.cal-today { padding: 7px 12px; border: 0; background: var(--tp-red, var(--seal)); color: #fbf3e6; font-size: 13px; letter-spacing: .08em; cursor: pointer; }
.cal-head, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { padding: 6px 0; text-align: center; font-size: 12.5px; letter-spacing: .1em; color: var(--ink-faint); }
.cal-wd.is-wkend { color: var(--tp-red, var(--seal)); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; padding: 7px 2px 6px; border: 1px solid transparent; background: rgba(255, 255, 255, .35); cursor: pointer; font: inherit; color: var(--ink); }
.cal-day:hover { border-color: var(--line); background: rgba(255, 255, 255, .7); }
.cal-day.is-out { opacity: .38; }
.cal-day.is-today { background: rgba(168, 64, 46, .08); }
.cal-day.is-today .cd-n { color: var(--tp-red, var(--seal)); }
.cal-day.is-sel { border-color: var(--ink); background: #fffdf7; }
.cd-n { font: 600 19px/1 var(--f-display); font-variant-numeric: lining-nums; }
.cal-day.is-wkend .cd-n { color: var(--tp-red, var(--seal)); }
.cd-l { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.cd-l.is-term, .cd-l.is-fest { color: var(--tp-red, var(--seal)); font-weight: 600; }
.cd-l.is-month { font-weight: 600; }
.cd-gz { font-size: 11px; opacity: .75; }
.cd-s { position: absolute; top: 4px; right: 4px; min-width: 20px; padding: 1px 3px; font-size: 10.5px; font-weight: 700; line-height: 1.3; color: #fff; text-align: center; }
.is-high { --tone: #5d7a3c; } .is-mid { --tone: #b07a2a; } .is-low { --tone: #a8402e; }
.cd-s, .ch-me { background: var(--tone); }
.cal-detail { padding: 20px 22px; min-width: 0; }
.cal-date { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cal-big { margin: 0; font: 500 60px/1 var(--f-display); font-variant-numeric: lining-nums; color: var(--tp-red, var(--seal)); }
.cal-ymd { margin: 0; font-weight: 600; font-size: 15.5px; }
.cal-lunar { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.cal-lunar b { color: var(--tp-red, var(--seal)); }
.cal-pillars { margin: 4px 0 0; font-size: 15px; letter-spacing: .06em; }
.cal-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.cal-me { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .4); border: 1px solid var(--line); }
.cal-me .dy-ring { width: 64px; height: 64px; }
.cal-me-s { margin: 4px 0 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.cal-cta { display: block; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--tp-red, var(--seal)); color: var(--tp-red, var(--seal)); font-size: 14px; text-decoration: none; }
.cal-almanac { margin-top: 16px; display: grid; gap: 10px; }
.cal-yj { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.cal-yj > b { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; font-weight: 600; }
.cal-yj > div { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 4px; font-size: 14px; color: var(--ink); }
b.cal-yi { background: #5d7a3c; } b.cal-ji { background: #a8402e; }
.ch-yj b.cal-yi, .ch-yj b.cal-ji { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; font-size: 11.5px; color: #fff; }
.cal-chong { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-faint); }
.cal-h3 { margin: 18px 0 8px; font-size: 15px; letter-spacing: .1em; }
.cal-hours { display: grid; border-top: 1px solid var(--line); }
.ch-row { display: grid; grid-template-columns: 5.6em 3em 2.4em minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.cal-hours.has-me .ch-row { grid-template-columns: 5.6em 3em 2.4em 2.2em minmax(0, 1fr) minmax(0, 1fr); }
.ch-row.is-now { background: rgba(168, 64, 46, .06); }
.ch-name { font-weight: 600; color: var(--ink); }
.ch-name small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ch-name em { margin-left: 4px; padding: 0 4px; font-style: normal; font-size: 10.5px; font-weight: 400; color: #fbf3e6; background: var(--tp-red, var(--seal)); }
.ch-luck { text-align: center; font-weight: 600; }
.ch-luck.is-ji { color: #5d7a3c; } .ch-luck.is-xiong { color: #a8402e; }
.ch-me { text-align: center; font-weight: 700; font-size: 12px; color: #fff; padding: 2px 0; }
.ch-yj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-note { margin: 10px 0 0; }
@media (max-width: 1000px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } .cal-cal { position: static; } }
@media (max-width: 560px) {
  .cal-cal { padding: 10px; }
  .cal-day { min-height: 62px; padding: 5px 1px 4px; }
  .cd-n { font-size: 16px; }
  .cd-gz { display: none; }
  .cd-s { top: 2px; right: 2px; font-size: 9.5px; min-width: 16px; }
  .cal-detail { padding: 16px 14px; }
  .cal-big { font-size: 46px; }
  .ch-row, .cal-hours.has-me .ch-row { grid-template-columns: 5.4em 3em 2.4em minmax(0, 1fr); row-gap: 4px; }
  .cal-hours.has-me .ch-row { grid-template-columns: 5.4em 3em 2.4em 2.2em; }
  .ch-yj { grid-column: 1 / -1; white-space: normal; }
}

/* phones: score sits under the lunar date instead of over the day number */
@media (max-width: 560px) {
  .cd-s { position: static; margin-top: 2px; padding: 0 4px; font-size: 10px; }
  .cal-day { min-height: 70px; }
}
/* phones on the sub-pages (no tab bar there): the header links stay on one line and scroll sideways if needed */
@media (max-width: 760px) {
  body:not([data-tab]) .site-head-in { flex-wrap: wrap; row-gap: 6px; }
  body:not([data-tab]) .site-nav { flex: 1 1 100%; width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  body:not([data-tab]) .site-nav .nav-link { flex: none; padding: 6px 2px; font-size: 13.5px; letter-spacing: 0; }
  body:not([data-tab]) .site-nav .lang-btn { flex: none; padding: 3px 10px; font-size: 12.5px; }
}

/* ---------- result page: header with the four pillars, then four tabs ---------- */
.summary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.sum-id { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sum-id h1 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); }
.sum-pillars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; margin-top: 6px; border: 1px solid var(--line); }
.sp-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 14px; }
.sp-col + .sp-col { border-left: 1px solid var(--line); }
.sp-col.is-day { background: rgba(168, 64, 46, .06); }
.sp-k { font-size: 12.5px; letter-spacing: .14em; color: var(--ink-faint); margin-bottom: 4px; }
.sp-col b { font: 500 36px/1.15 var(--f-body); }
.sp-col b.sp-q { color: var(--ink-faint); font-weight: 400; }
.sp-dm { position: absolute; top: -1px; right: -1px; padding: 1px 6px; font-size: 11px; color: #fbf3e6; background: var(--tp-red, var(--seal)); }
.sum-line { grid-column: 1 / -1; margin: 4px 0 0; font-size: 16px; color: var(--ink); }
.sum-sep { margin: 0 8px; color: var(--ink-faint); }
.sum-more { grid-column: 1 / -1; }
.sum-more summary { cursor: pointer; font-size: 13.5px; color: var(--ink-faint); }
.sum-more .sum-grid { margin-top: 8px; }
.rtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; border: 1px solid var(--ink); }
.rtabs button { padding: 12px 6px; border: 0; background: transparent; font-size: 15px; letter-spacing: .12em; color: var(--ink); cursor: pointer; }
.rtabs button:is(:lang(en), :lang(fr)) { letter-spacing: 0; font-size: 14px; }
.rtabs button + button { border-left: 1px solid var(--ink); }
.rtabs button:hover { background: rgba(255, 255, 255, .5); }
.rtabs button[aria-selected="true"] { background: var(--ink); color: var(--tp-paper, #f4efe4); font-weight: 600; }
/* which blocks each tab shows */
#view-result[data-rtab] .result-grid > * { display: none; }
#view-result[data-rtab="overview"] .area-card, #view-result[data-rtab="overview"] .area-book, #view-result[data-rtab="overview"] .area-el,
#view-result[data-rtab="table"] .area-table, #view-result[data-rtab="table"] .area-rel,
#view-result[data-rtab="luck"] .area-luck, #view-result[data-rtab="today"] .area-today { display: block; }
#view-result[data-rtab="overview"] .result-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "card book" "card el"; align-items: start; }
#view-result[data-rtab="table"] .result-grid, #view-result[data-rtab="luck"] .result-grid, #view-result[data-rtab="today"] .result-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "table" "rel"; }
#view-result[data-rtab="luck"] .result-grid { grid-template-areas: "luck"; }
#view-result[data-rtab="today"] .result-grid { grid-template-areas: "today"; }
/* fewer words: the long notes and the second element chart are gone; the book's notes stay behind "show the passage" */
.bk-side > .help, .dm-note, .el-caveat, .el-block .basis { display: none; }
.area-el .el-cols { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 1000px) { #view-result[data-rtab="overview"] .result-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "book" "el"; } }
@media (max-width: 560px) {
  .sp-col b { font-size: 28px; }
  .rtabs button { font-size: 13.5px; letter-spacing: .04em; padding: 11px 2px; }
  .sum-line { font-size: 14.5px; }
  .area-el .el-cols { grid-template-columns: minmax(0, 1fr); }
}

.summary { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); }
.sum-pillars { grid-column: 1; }
.sum-facts { grid-column: 2; margin: 6px 0 0; display: grid; align-content: stretch; border: 1px solid var(--line); }
.sum-facts div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 18px; }
.sum-facts div + div { border-top: 1px solid var(--line); }
.sum-facts dt { font-size: 13px; letter-spacing: .14em; color: var(--ink-faint); }
.sum-facts dt:is(:lang(en), :lang(fr)) { letter-spacing: .02em; }
.sum-facts dd { margin: 0; font: 500 21px/1.3 var(--f-body); }
.sum-facts small { margin-left: 10px; font-size: 13px; color: var(--ink-faint); }
@media (max-width: 900px) { .summary { grid-template-columns: minmax(0, 1fr); } .sum-facts, .sum-pillars { grid-column: 1; max-width: none; } .sum-acts { justify-content: flex-start; } }
/* overview: the three panel titles share one size and weight; the right column's bottom lines up with the card */
#view-result[data-rtab="overview"] .result-grid { grid-template-rows: auto 1fr; }
#view-result[data-rtab="overview"] .area-card, #view-result[data-rtab="overview"] .area-el { align-self: stretch; }
.area-el .sec-head { margin-bottom: 16px; }
.area-el .sec-head h2, .bk-head .panel-title, .dm-sum-title, .temple .area-el .sec-head h2 { font: 500 22px/1.2 var(--f-body); letter-spacing: .08em; padding-left: 0; }
.area-el .sec-head h2::before { display: none; }
.area-el .sec-head h2:is(:lang(en), :lang(fr)), .bk-head .panel-title:is(:lang(en), :lang(fr)), .dm-sum-title:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: 0; }

/* overview: the season row sits under the bars so the right column fills down to the card */
#view-result[data-rtab="overview"] .area-el .el-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
/* home: the dial's label already names the term and the hour, so the number strip and the "right now" line go */
.temple .hero-nums, .temple .hero-now { display: none; }
/* Team BaZi page: title, one line, tabs, then the work — no breadcrumb, kicker or boxed notice */
.team .crumbs, .team > .wrap > .tm-kicker, .tm-tabnote { display: none; }
.team .th-title { margin-bottom: 8px; }
.tm-consent { margin: 0; padding: 0; border: 0; background: none; font-size: 12.5px; color: var(--ink-faint); }
.tm-tabs { margin-top: 20px; }
.tm-result.is-empty { min-height: 0; padding: 34px 20px; align-self: stretch; }
.tm-consent-top { margin: -4px 0 16px; }

/* the five-element wheel turns slowly; the characters turn back the other way so they always stay upright */
/* the turning itself is done in app.js with SVG transform attributes: Safari mishandles transform-box on <text> */
.cy-spin line { animation: cy-flow 1.6s linear infinite; } /* the control lines' dashes drift along their direction */
.cycle:hover .cy-spin line { animation-play-state: paused; }
@keyframes cy-turn { to { transform: rotate(360deg); } }
@keyframes cy-flow { to { stroke-dashoffset: -8; } }
@media (prefers-reduced-motion: reduce) { .cy-spin line { animation: none; } }

/* ---------- one scene for every illustrated card: paper sky, two ranges of ink-wash hills, a small vermilion sun.
   Only the characters and their line change from card to card. Every pair is one man and one woman, man on the left. ---------- */
.scene, .temple .scene, .play-art.scene, .temple .play-art.scene, .ts-art.scene {
  background:
    radial-gradient(circle at 87% 26%, #c4573f 0 13px, rgba(196, 87, 63, .18) 14px, transparent 34px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 62 Q50 30 95 55 T190 50 Q240 22 290 52 T400 46 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.14'/%3E%3C/svg%3E") bottom / 100% 42% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 70 L40 48 L70 58 L110 30 L150 55 L190 40 L230 60 L270 26 L310 52 L350 38 L400 56 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.09'/%3E%3C/svg%3E") bottom / 100% 62% no-repeat,
    linear-gradient(180deg, #f4ecdc 0%, #ece0c8 100%);
  box-shadow: inset 0 0 0 3px #4a3426;
}
.scene img { position: relative; z-index: 1; }
.play-art.scene, .ts-art.scene { justify-content: center; align-items: flex-end; gap: 0; }
.play-art.scene img, .ts-art.scene img { height: 124px; margin: 0 -4px 6px; }
.ts-art.scene img { height: 112px; }
.ts-art-team.scene img { margin: 0 -12px 6px; }
.play-art-game.scene .pa-snow, .play-art-game.scene .pa-arrow, .play-art-game.scene .pa-sun { align-self: center; margin: 30px 2px 0; z-index: 1; }
@media (max-width: 760px) {
  .scene, .temple .scene, .play-art.scene, .temple .play-art.scene, .ts-art.scene { background-size: auto, 100% 42%, 100% 62%, auto; background-image:
    radial-gradient(circle at 87% 24%, #c4573f 0 9px, rgba(196, 87, 63, .18) 10px, transparent 24px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 62 Q50 30 95 55 T190 50 Q240 22 290 52 T400 46 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.14'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 70 L40 48 L70 58 L110 30 L150 55 L190 40 L230 60 L270 26 L310 52 L350 38 L400 56 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.09'/%3E%3C/svg%3E"), linear-gradient(180deg, #f4ecdc 0%, #ece0c8 100%); }
  .play-art.scene img { height: 88px; }
  .ts-art.scene img { height: 78px; }
}
/* the tilted outer cards reach below the fan's box; leave room for them so the hero never clips their feet */
@media (min-width: 761px) { .hero-fan { margin-bottom: calc(var(--card-w) * .42); } }

/* the scene, second pass: no sun. The pair stands in a pale moon gate (the same motif as the home dial), its lower half
   sunk behind the hills; every card shows exactly two people. */
.scene, .temple .scene, .play-art.scene, .temple .play-art.scene, .ts-art.scene {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 62 Q50 30 95 55 T190 50 Q240 22 290 52 T400 46 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.14'/%3E%3C/svg%3E") bottom / 100% 40% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 70 L40 48 L70 58 L110 30 L150 55 L190 40 L230 60 L270 26 L310 52 L350 38 L400 56 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.09'/%3E%3C/svg%3E") bottom / 100% 58% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='%23faf5ea' stroke='%234a3426' stroke-opacity='.32' stroke-width='1.6'/%3E%3Ccircle cx='50' cy='50' r='41.5' fill='none' stroke='%234a3426' stroke-opacity='.18' stroke-width='.8'/%3E%3C/svg%3E") center 38% / auto 142% no-repeat, linear-gradient(180deg, #f1e8d6 0%, #e9dcc3 100%);
}
@media (max-width: 760px) {
  .scene, .temple .scene, .play-art.scene, .temple .play-art.scene, .ts-art.scene {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 62 Q50 30 95 55 T190 50 Q240 22 290 52 T400 46 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.14'/%3E%3C/svg%3E") bottom / 100% 40% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 70 L40 48 L70 58 L110 30 L150 55 L190 40 L230 60 L270 26 L310 52 L350 38 L400 56 L400 100 L0 100Z' fill='%234a3426' fill-opacity='.09'/%3E%3C/svg%3E") bottom / 100% 58% no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='%23faf5ea' stroke='%234a3426' stroke-opacity='.32' stroke-width='1.6'/%3E%3Ccircle cx='50' cy='50' r='41.5' fill='none' stroke='%234a3426' stroke-opacity='.18' stroke-width='.8'/%3E%3C/svg%3E") center 38% / auto 142% no-repeat, linear-gradient(180deg, #f1e8d6 0%, #e9dcc3 100%);
  }
}
.ts-art-team.scene img { margin: 0 -4px 6px; }

/* searchable time zone */
.tz-pick { position: relative; }
.tz-pick input { width: 100%; }
.tz-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tz-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; max-height: 300px; overflow-y: auto;
  background: #fffdf7; border: 1px solid var(--ink); box-shadow: 0 14px 30px -18px rgba(40, 30, 20, .6); }
.tz-list li { padding: 9px 12px; font-size: 14.5px; cursor: pointer; }
.tz-list li:hover, .tz-list li.is-on { background: rgba(168, 64, 46, .08); color: var(--seal); }
.tz-list .tz-none { color: var(--ink-faint); cursor: default; }

/* fun cards, third pass: the pair fills the frame, one centred one-line bubble above them */
.play-art.scene, .temple .play-art.scene { height: 200px; padding-top: 40px; }
.play-art.scene img { height: 150px; margin: 0 -6px 6px; }
.pa-say, .pa-say-c { left: 50%; right: auto; transform: translateX(-50%); top: 10px; font-size: 13.5px; }
.pa-say::after, .pa-say-c::after { left: calc(50% - 5px); right: auto; }
@media (max-width: 760px) {
  .play-art.scene, .temple .play-art.scene { height: 150px; padding-top: 32px; }
  .play-art.scene img { height: 104px; margin: 0 -5px 4px; }
  .pa-say, .pa-say-c { font-size: 11.5px; top: 7px; }
}

/* theatre: pick a Day Master by portrait */
.th-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.th-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.th-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border: 1px solid var(--line); background: rgba(255, 255, 255, .45); cursor: pointer; font: inherit; color: inherit; }
.th-pick img { height: 58px; width: auto; }
.th-pick span { font-size: 12.5px; white-space: nowrap; }
.th-pick:hover { border-color: var(--ink); background: #fffdf7; }
.th-pick.is-on { border-color: var(--tp-red, var(--seal)); background: #fffdf7; box-shadow: inset 0 0 0 1px var(--tp-red, var(--seal)); }
.th-pick.is-on span { font-weight: 700; }
@media (max-width: 560px) { .th-pick img { height: 46px; } .th-pick span { font-size: 11.5px; } }

/* theatre: the hand-written scenes as portrait cards */
.th-samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.th-sample { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--line); background: #f6f1e7; cursor: pointer; font: inherit; color: inherit; text-align: center; transition: transform .15s, box-shadow .15s; }
.th-sample:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(40, 30, 20, .6); }
.th-sample-art { display: flex; justify-content: center; align-items: flex-end; height: 96px; padding-top: 8px; box-shadow: inset 0 0 0 2px #4a3426;
  background: linear-gradient(180deg, #f1e8d6, #e9dcc3); }
.th-sample-art img { height: 82px; width: auto; margin: 0 -4px 4px; }
.th-sample-text b { display: block; font-size: 14.5px; letter-spacing: .04em; }
.th-sample-text small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-faint); }
@media (max-width: 760px) { .th-samples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- overview, tidy pass: one rhythm for both panels ---------- */
/* both panel heads: same height, padding, title size and a hairline under them */
.dm-panel > summary, .area-book .bk-head { min-height: 64px; padding: 14px 24px; margin: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.area-book.panel { padding: 0; }
.area-book .bk-src { font-size: 13px; }
/* the Day Master's name is already in the head, so the body does not repeat it */
.dm-text .dm-name { display: none; }
.dm-body { padding: 22px 24px 24px; }
.dm-text .lang-toggle { margin-top: 0; }
.dm-tag { margin: 14px 0 10px; }
.dm-about { margin: 0; font-size: 14.5px; line-height: 1.85; }
/* the classics read top to bottom: score and verdict, the two key stems side by side, the quote, then the book's line */
.bk-body { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "score plain" "list list" "quote quote" "match match" "more more";
  gap: 16px 20px; align-items: center; padding: 20px 24px 22px; }
.bk-main, .bk-side { display: contents; }
.bk-score { grid-area: score; }
.bk-plain { grid-area: plain; margin: 0; font-size: 15px; line-height: 1.8; }
.bk-list { grid-area: list; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.bk-list li { padding: 10px 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .45); font-size: 14px; }
.bk-quote { grid-area: quote; margin: 0; font-size: 15px; line-height: 1.85; }
.bk-match { grid-area: match; margin: 0; font-size: 14px; line-height: 1.75; }
.bk-more { grid-area: more; }
@media (max-width: 560px) { .bk-body { grid-template-columns: 80px minmax(0, 1fr); padding: 16px; gap: 12px 14px; } .dm-panel > summary, .area-book .bk-head { padding: 12px 16px; } }

/* the book's passage, once opened: full width, two columns, each line a short paragraph */
.bk-orig { margin-top: 12px; padding: 14px 18px; columns: 2; column-gap: 32px; column-rule: 1px solid var(--line); background: rgba(255, 255, 255, .4); border: 1px solid var(--line); }
.bk-orig p { margin: 0 0 8px; break-inside: avoid; font-size: 14px; line-height: 1.75; color: var(--ink-soft); }
@media (max-width: 560px) { .bk-orig { columns: 1; } }
/* the five Day Master facts in one even row */
.dm-facts { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.dm-facts > div { min-width: 0; border-right: 1px solid var(--line); border-bottom: 0 !important; grid-column: auto !important; }
.dm-facts > div:last-child { border-right: 0; }
@media (max-width: 560px) { .dm-facts { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .dm-facts > div:nth-child(3) { border-right: 0; } .dm-facts > div:nth-child(-n+3) { border-bottom: 1px solid var(--line) !important; } }
@media (min-width: 561px) { .dm-facts > div:nth-child(2), .dm-facts > div:nth-child(3n) { border-right: 1px solid var(--line); } .dm-facts > div:last-child { border-right: 0; } }

/* overview: the season row sits beside the bars; its five cells wrap to fit the narrower column */
#view-result[data-rtab="overview"] .area-el .season { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* the week strip over the day's reading */
.wk-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto; gap: 6px; align-items: stretch; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid var(--line); background: rgba(255, 255, 255, .4); cursor: pointer; font: inherit; color: inherit; }
.wk-day:hover { border-color: var(--ink); }
.wk-day.is-on { border-color: var(--ink); background: #fffdf7; box-shadow: inset 0 -3px 0 var(--tone); }
.wk-l { font-size: 13px; font-weight: 600; }
.wk-d { font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.wk-day b { margin-top: 2px; padding: 0 6px; font-size: 13px; color: #fff; background: var(--tone); }
.wk-month { align-self: center; padding: 0 6px 0 10px; font-size: 13.5px; color: var(--seal); white-space: nowrap; }
@media (max-width: 560px) { .wk-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; } .wk-month { grid-column: 1 / -1; justify-self: end; padding-top: 6px; } .wk-l { font-size: 11.5px; } .wk-d { font-size: 10px; } .wk-day b { font-size: 11.5px; padding: 0 3px; } }

/* Team BaZi: preview on the result side before anything is entered */
.tm-result.is-empty { display: block; min-height: 0; padding: 22px 24px; background: rgba(255, 255, 255, .25); }
.pv-head { margin: 0 0 14px; font: 500 18px/1.4 var(--f-body); letter-spacing: .06em; color: var(--ink); }
.pv-head:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: 0; }
.pv-grid { display: grid; gap: 8px; }
.pv-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pv-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pv-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 10px; border: 1px solid var(--line); background: #f6f1e7; text-align: center; min-width: 0; }
.pv-tile img { height: 64px; width: auto; }
.pv-duo span { display: flex; justify-content: center; }
.pv-duo img { height: 72px; margin: 0 -6px; }
.pv-tile b { font-size: 14px; font-weight: 600; }
.pv-tile small { font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.pv-foot { margin: 14px 0 0; font-size: 13px; color: var(--ink-faint); }
@media (max-width: 560px) { .pv-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; } .pv-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pv-tile img { height: 46px; } .pv-duo img { height: 52px; } .pv-tile b { font-size: 12.5px; } .pv-tile small { font-size: 11px; } }

/* home hour strip, lighter: short bars coloured by score like the week strip and the almanac */
.hr-bars { height: 46px; gap: 4px; }
.hr-bar i { height: calc((var(--s) - 30) * 1.25%); min-height: 5px; background: var(--tone); opacity: .75; border-radius: 2px 2px 0 0; }
.hr-bar.is-on i { outline: 0; opacity: 1; box-shadow: 0 0 0 1.5px #fffdf7, 0 0 0 3px var(--tp-red, var(--seal)); }
.hr-bar span { font-size: 11px; }
.hr-detail { margin-top: 10px; display: grid; gap: 4px; }
.hr-line-yj { gap: 4px 18px; }
.hr-line-yj b { margin-right: 6px; }
.tm-result.is-empty .pv { width: 100%; } .tm-result.is-empty { place-items: stretch; text-align: left; }

/* ---------- wide screens: hero = title + dial only; the today card is a full-width band beneath ---------- */
@media (min-width: 761px) {
  .temple .hero-in { align-items: center; }
  .daily-band { position: relative; z-index: 2; margin-top: 8px; }
  .daily-band:empty { display: none; }
  .daily-band .daily, .temple:is(:lang(en), :lang(fr)) .daily-band .daily { max-width: none; width: auto; margin: 0; padding: 22px 28px; border: 1px solid var(--tp-line, var(--line)); background: rgba(255, 253, 247, .62); }
  .daily-band .daily.has-chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 44px;
    grid-template-areas: "k hours" "people hours" "row hours" "talk hours" "acts hours"; align-items: start; }
  .daily-band .daily.has-chart .dy-k { grid-area: k; }
  .daily-band .daily.has-chart .dy-people { grid-area: people; }
  .daily-band .daily.has-chart .dy-row { grid-area: row; }
  .daily-band .daily.has-chart .dy-talk { grid-area: talk; }
  .daily-band .daily.has-chart .dy-acts { grid-area: acts; }
  .daily-band .daily.has-chart .dy-hours { grid-area: hours; margin: 0; padding: 0 0 0 44px; border-top: 0; border-left: 1px dashed var(--line); align-self: stretch; }
  .daily-band .hr-bars { height: 72px; }
  .temple:lang(zh) .daily-band .daily.is-ask, .daily-band .daily.is-ask { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 44px;
    grid-template-areas: "k stems" "ask stems" "s stems" "acts stems"; grid-template-rows: auto auto 1fr auto; }
  .daily-band .daily.is-ask .dy-k { grid-area: k; } .daily-band .daily.is-ask .dy-ask { grid-area: ask; }
  .daily-band .daily.is-ask .dy-s { grid-area: s; } .daily-band .daily.is-ask .dy-acts { grid-area: acts; }
  .temple:lang(zh) .daily-band .daily.is-ask .dy-stems, .daily-band .daily.is-ask .dy-stems { grid-area: stems; align-self: center; max-width: 360px; width: 100%; justify-self: end; margin: 0; }
}

/* stems on phones: each element shows its two cards first, then a compact line about the element */
@media (max-width: 760px) {
  .el-col { display: flex; flex-direction: column; gap: 10px; }
  .el-col .el-cards { order: 1; }
  .el-col .el-intro { order: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: baseline;
    padding: 12px 14px; text-align: left; min-height: 0; }
  .el-col .el-glyph, .el-col .el-next { display: none; }
  .el-col .el-name { grid-column: 1; margin: 0; font-size: 17px; }
  .el-col .el-tags { grid-column: 2; margin: 0; font-size: 13px; }
  .el-col .el-desc { grid-column: 1 / -1; margin: 4px 0 0; font-size: 14px; line-height: 1.7; }
  .el-col + .el-col { margin-top: 18px; }
}

/* element roles as five rows: the two stems, the role in one line, the element on the right */
.pv-rows { display: grid; gap: 8px; }
.pv-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 8px 16px 8px 8px; border: 1px solid var(--line); background: #f6f1e7; }
.pv-pair { display: flex; justify-content: center; align-items: flex-end; height: 62px; background: linear-gradient(180deg, #f1e8d6, #e9dcc3); box-shadow: inset 0 0 0 2px #4a3426; }
.pv-pair img { height: 54px; width: auto; margin: 0 -5px 3px; }
.pv-text b { display: block; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.pv-el { display: flex; flex-direction: column; align-items: flex-end; font: 600 26px/1 var(--f-body); }
.pv-el small { margin-top: 4px; font-size: 11.5px; font-weight: 400; color: var(--ink-faint); white-space: nowrap; }
@media (max-width: 560px) { .pv-row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; } .pv-pair { height: 50px; } .pv-pair img { height: 44px; } .pv-el small { display: none; } .pv-text b { font-size: 14px; white-space: normal; } }

.pv-text b em { margin-left: 10px; padding: 1px 8px; font-style: normal; font-size: 12.5px; font-weight: 500; color: var(--tp-red, var(--seal)); border: 1px solid currentColor; vertical-align: 1px; }
.pv-text small { line-height: 1.6; }

/* the four relation kinds in the two-person preview */
.pv-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--ink); }
.pv-kinds button { padding: 9px 4px; border: 0; background: transparent; font: inherit; font-size: 14px; letter-spacing: .06em; cursor: pointer; color: var(--ink); }
.pv-kinds button + button { border-left: 1px solid var(--ink); }
.pv-kinds button.is-on { background: var(--ink); color: var(--tp-paper, #f4efe4); font-weight: 600; }
.pv-glyphs { display: flex; justify-content: center; align-items: center; gap: 6px; height: 62px; background: linear-gradient(180deg, #f1e8d6, #e9dcc3); box-shadow: inset 0 0 0 2px #4a3426; }
.pv-glyphs b { font: 500 26px/1 var(--f-body); }
.pv-clash { color: var(--tp-red, var(--seal)); }
@media (max-width: 560px) { .pv-glyphs { height: 50px; gap: 3px; } .pv-glyphs b { font-size: 20px; } .pv-kinds button { font-size: 12.5px; letter-spacing: 0; } }

/* paid readings closed for now: no request form or tracking, one notice beside the packages */
.pkg-soon { display: block; margin-top: auto; padding: 11px 0; text-align: center; border: 1px dashed var(--line); color: var(--ink-faint); font-size: 14px; letter-spacing: .12em; }
.orders-closed .track-panel { display: none; }
.orders-closed .order-layout { grid-template-columns: minmax(0, 1fr); }
.orders-closed .order-panel { text-align: center; padding: 26px 24px; }
.orders-closed .order-panel p { max-width: 36em; margin: 8px auto 0; color: var(--ink-soft); line-height: 1.8; }

/* stems: the two learning games as quiet links at the end */
.stems-more { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; font-size: 14.5px; color: var(--ink-faint); }
.stems-more a { color: var(--seal); }

/* the account button in the header */
.acct-btn, .member-btn { margin-right: 8px; padding: 4px 12px; border: 1px solid rgba(239, 230, 214, .45); background: transparent; color: #efe6d6; font: inherit; font-size: 13px; cursor: pointer; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn:hover { background: rgba(255, 255, 255, .08); }
.acct-btn.is-in { border-color: rgba(239, 230, 214, .25); color: #d9c3a0; }
@media (max-width: 760px) { .acct-btn { padding: 3px 9px; font-size: 12px; margin-right: 6px; } }

/* privacy policy */
.legal-wrap { max-width: 760px; }
.legal .panel { padding: 30px 34px; }
.legal h1 { margin: 0 0 6px; font: 500 34px/1.2 var(--f-body); letter-spacing: .06em; }
.legal-en h1 { font-family: var(--f-display); letter-spacing: 0; }
.legal-date { margin: 0 0 18px; font-size: 13px; color: var(--ink-faint); }
.legal h2 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.legal p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink-soft); }
.legal a { color: var(--seal); }
.foot-links { margin-top: 8px; font-size: 12.5px; }
.foot-links a { color: #e6c98a; }
@media (max-width: 560px) { .legal .panel { padding: 22px 18px; } }

/* branch glyphs shrink with their count so three or four always fit inside the framed box */
.pv-glyphs { gap: 4px; padding: 0 6px; overflow: hidden; }
.pv-glyphs.pv-n3 { gap: 2px; } .pv-glyphs.pv-n3 b { font-size: 21px; }
.pv-glyphs.pv-n4 { gap: 1px; } .pv-glyphs.pv-n4 b { font-size: 16px; }
@media (max-width: 560px) {
  .pv-glyphs { padding: 0 4px; gap: 2px; }
  .pv-glyphs.pv-n3 b { font-size: 16px; } .pv-glyphs.pv-n4 b { font-size: 12.5px; }
  .pv-kinds button { font-size: 12px; padding: 9px 2px; }
}

/* ---------- daily rituals and games: cards with their own pictures ---------- */
.dailysec { padding: 28px 0 52px; }
body[data-tab="home"] .dailysec { padding: 8px 0 28px; }
.play-grid.play-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.play-grid.play-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1040px) { .play-grid.play-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.play-art.pa-svg, .temple .play-art.pa-svg { padding: 0; display: block; overflow: hidden; box-shadow: none; outline: 3px solid #4a3426; outline-offset: -3px; }
.pa-svg svg { display: block; width: 100%; height: 100%; }
.play-art.pa-quiz, .temple .play-art.pa-quiz { background: linear-gradient(180deg, #dde6ef, #c3d1e1); }
.play-tag { align-self: flex-start; font-weight: 400; margin-bottom: 2px; padding: 1px 8px; font-size: 12px; letter-spacing: .08em; color: var(--seal); border: 1px solid currentColor; }
.play-more { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 14.5px; color: var(--ink-soft); }
.play-more a { color: var(--seal); text-decoration: none; border-bottom: 1px solid rgba(184, 58, 46, .35); }
@media (max-width: 760px) {
  .play-grid.play-grid-2, .play-grid.play-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .play-grid-2 .play-card, .play-grid-4 .play-card { padding: 10px 10px 14px; gap: 10px; }
  .play-grid-2 .play-art, .play-grid-4 .play-art { height: 118px; }
  .play-grid-4 .pa-quiz img { height: 84px; }
  .play-grid-4 .pa-quiz .pa-say { font-size: 11px; padding: 2px 8px; top: 6px; }
  .play-grid-2 .play-text strong, .play-grid-4 .play-text strong { font-size: 17px; letter-spacing: .04em; }
  .play-grid-2 .play-text > span, .play-grid-4 .play-text > span { font-size: 13px; line-height: 1.6; }
  .play-grid-2 .play-text em, .play-grid-4 .play-text em { font-size: 13.5px; }
}

/* shared page shell for the daily pages */
.daily-wrap { max-width: 720px; }
.daily-box { padding: 26px 28px 30px; text-align: center; }
@media (max-width: 560px) { .daily-box { padding: 20px 14px 24px; } }
.dr-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* 今日一签 */
.dr-ask { display: grid; justify-items: center; gap: 12px; max-width: 360px; margin: 0 auto; }
.dr-ask h2 { margin: 0; font-size: 22px; }
.dr-ask p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.dr-ask .field { width: 100%; text-align: left; }
.dr-stage { display: grid; justify-items: center; gap: 8px; padding: 6px 0; }
.dr-tap { padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dr-pot { display: block; width: 190px; height: auto; transform-origin: 50% 90%; }
.dr-stick { fill: #efd59a; stroke: #a87a3a; stroke-width: .8; }
.dr-lucky { transform: translateY(22px); transition: transform .7s cubic-bezier(.2, .8, .2, 1.2); }
.dr-tap:hover .dr-pot { transform: rotate(-3deg); transition: transform .2s; }
.dr-stage.is-shaking .dr-pot { animation: dr-shake .22s ease-in-out infinite alternate; }
.dr-stage.is-out .dr-lucky { transform: translateY(-14px); }
@keyframes dr-shake { from { transform: rotate(-9deg) translateY(-2px); } to { transform: rotate(9deg) translateY(2px); } }
.dr-hint { margin: 0; font-size: 16px; color: var(--seal); letter-spacing: .06em; }
.dr-change { font-size: 13px; color: var(--ink-faint); }
.dr-slip { max-width: 420px; margin: 0 auto; padding: 26px 22px 22px; background: #f8f1e2; border: 3px double #a8402e; }
.dr-slip.is-fresh { animation: dr-open .7s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 0; }
@keyframes dr-open { from { opacity: 0; transform: translateY(24px) scaleY(.6); } to { opacity: 1; transform: none; } }
.dr-slip-head { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.dr-no { font-size: 15px; color: var(--ink-soft); letter-spacing: .1em; }
.dr-level { padding: 2px 12px; font-size: 18px; font-weight: 700; color: #fff; background: #a8402e; letter-spacing: .12em; }
.dr-verse p { margin: 0; font-size: 23px; line-height: 1.85; letter-spacing: .16em; font-weight: 500; }
.dr-plain { margin: 16px 0 0; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.dr-yiji { display: flex; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.dr-yiji span { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; font-size: 15px; border: 1px solid var(--line); background: #fbf7ee; }
.dr-yiji b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; font-size: 13px; color: #fff; }
.dr-yi b { background: #2e7a4b; } .dr-ji b { background: #a8402e; }
.dr-why { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.7; color: var(--ink-faint); }
.dr-done { margin: 16px 0 4px; font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 560px) { .dr-verse p { font-size: 19px; letter-spacing: .1em; } .dr-slip { padding: 20px 14px 18px; } }

/* 敲木鱼 */
.mr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mr-stats div { display: grid; gap: 2px; padding: 10px 4px; border: 1px solid var(--line); background: #fbf7ee; }
.mr-stats b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.mr-stats b small { font-size: 13px; font-weight: 400; color: var(--ink-faint); }
.mr-stats span { font-size: 12.5px; color: var(--ink-soft); }
.mr-bar { height: 6px; margin: 12px 0 4px; background: rgba(74, 52, 38, .12); }
.mr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d9a441, #a8402e); transition: width .2s; }
.mr-tap { position: relative; display: block; width: min(300px, 82vw); margin: 10px auto 0; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.mr-fish { display: block; width: 100%; height: auto; overflow: visible; }
.mr-body { transform-origin: 50% 80%; transform-box: fill-box; }
.mr-mallet > g { transform-origin: 20% 90%; transform-box: fill-box; }
.mr-tap.is-hit .mr-body { animation: mr-squash .16s ease-out; }
.mr-tap.is-hit .mr-mallet > g { animation: mr-hit .16s ease-out; }
@keyframes mr-squash { 40% { transform: scale(1.04, .94); } }
@keyframes mr-hit { 0% { transform: rotate(-14deg); } 40% { transform: rotate(4deg); } }
.mr-float { position: absolute; top: 18%; transform: translateX(-50%); font-size: 18px; font-weight: 600; color: #a8402e; white-space: nowrap; pointer-events: none; animation: mr-rise 1s ease-out forwards; }
.mr-float.is-bless { color: #b07a12; font-size: 20px; }
@keyframes mr-rise { from { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -70px); } }
.mr-hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-faint); }
.mr-toggles { display: flex; justify-content: center; gap: 20px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.mr-toggles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mr-full { margin-top: 18px; padding: 18px 14px; border: 1px solid #d9a441; background: #fbf3df; }
.mr-full h2 { margin: 0 0 6px; font-size: 22px; color: #a8402e; letter-spacing: .12em; }
.mr-full p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* 五行合成 */
.mg-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mg-chips { display: flex; gap: 8px; }
.mg-chips span { display: grid; min-width: 76px; padding: 4px 10px; background: #4a3426; color: #f6e3b4; }
.mg-chips small { font-size: 11.5px; opacity: .8; } .mg-chips b { font-size: 20px; line-height: 1.2; }
.mg-ladder { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 14px 0 12px; }
.mg-ladder span { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 3px; font-size: 13.5px; border: 1px solid var(--line); color: var(--ink-faint); opacity: .55; }
.mg-ladder span.is-reached { opacity: 1; }
.mg-board { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; padding: 8px; box-sizing: border-box; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 8px; background: #b9a68a; touch-action: none; user-select: none; -webkit-user-select: none; }
.mg-board > i { background: rgba(246, 240, 228, .45); }
.mg-tiles { position: absolute; inset: 8px; }
.mg-tile { position: absolute; top: 0; left: 0; width: calc((100% - 24px) / 4); aspect-ratio: 1; display: grid; place-content: center; justify-items: center; transform: translate(calc(var(--c) * (100% + 8px)), calc(var(--r) * (100% + 8px))); transition: transform .12s ease-out; }
.mg-tile b { font-size: clamp(24px, 8vw, 38px); font-weight: 700; line-height: 1; }
.mg-tile small { margin-top: 4px; font-size: 11px; opacity: .8; }
.mg-tile.is-taiji b { font-size: clamp(16px, 5vw, 24px); letter-spacing: .08em; }
.mg-tile.is-born { animation: mg-born .18s ease-out .1s both; }
.mg-tile.is-merged { animation: mg-pop .18s ease-out; }
@keyframes mg-born { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes mg-pop { 50% { scale: 1.14; } }
.mg-l0 { background: #e3efe0; color: #2e7a4b; } .mg-l1 { background: #2e7a4b; color: #f4efe4; }
.mg-l2 { background: #f7dcd4; color: #b83a2e; } .mg-l3 { background: #b83a2e; color: #fff6ee; }
.mg-l4 { background: #efe0c8; color: #8a5a2b; } .mg-l5 { background: #8a5a2b; color: #fff6e6; }
.mg-l6 { background: #f4e6bf; color: #9a6c0e; } .mg-l7 { background: #b8860b; color: #fff8e6; }
.mg-l8 { background: #dbe6f2; color: #2a5c8f; } .mg-l9 { background: #2a5c8f; color: #f2f6fb; }
.mg-l10 { background: #2b2722; color: #f6e3b4; }
.mg-ladder .mg-l0, .mg-ladder .mg-l2, .mg-ladder .mg-l4, .mg-ladder .mg-l6, .mg-ladder .mg-l8 { border-color: transparent; }
.mg-over { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; background: rgba(246, 240, 228, .92); }
.mg-over[hidden] { display: none; }
.mg-over h2 { margin: 0; font-size: 26px; color: #a8402e; }
.mg-over p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.mg-toast { min-height: 26px; margin: 10px 0 0; font-size: 17px; font-weight: 600; color: #a8402e; opacity: 0; }
.mg-toast.is-on { animation: mg-toast 1.3s ease-out; }
@keyframes mg-toast { 0% { opacity: 0; transform: translateY(6px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mg-howto { margin: 2px 0 0; font-size: 13px; color: var(--ink-faint); }
.play-text > span { text-wrap-style: var(--tw-pretty, pretty); }
.site-foot p, .fun-page .lede { text-wrap-style: var(--tw-pretty, pretty); }
.dr-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; margin-inline: auto; }
.dr-acts > :first-child:not(:nth-last-child(2)) { grid-column: 1 / -1; }
.dr-acts > * { display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; padding: 8px 10px; box-sizing: border-box; text-align: center; text-decoration: none; }
@media (max-width: 560px) { .mg-ladder { gap: 3px; flex-wrap: nowrap; } .mg-ladder span { min-width: 0; flex: 1 1 0; height: 24px; padding: 0; font-size: 12.5px; } .mg-ladder span.mg-l10 { flex: 1.6 1 0; } }
/* card pictures keep a 4:3 frame so nothing is cropped */
.play-grid-2 .play-art, .play-grid-4 .play-art, .temple .play-grid-2 .play-art, .temple .play-grid-4 .play-art { height: auto; aspect-ratio: 4 / 3; }
.play-art.pa-svg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play-grid-4 .pa-quiz { padding-top: 0; align-items: flex-end; }
.play-grid-4 .pa-quiz img { height: 76%; }
/* home, wide screens: picture on the left, words on the right */
@media (min-width: 761px) {
  .play-grid-2 .play-card { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); align-items: center; gap: 26px; padding: 16px 26px 16px 16px; }
  .play-grid-2 .play-text strong { font-size: 26px; }
  .play-grid-2 .play-text > span { font-size: 15.5px; line-height: 1.8; }
}
@media (min-width: 1041px) { .play-grid-2 .play-card { grid-template-columns: 300px minmax(0, 1fr); } }
.dr-pot { width: 230px; }
.dr-lucky { transform: translateY(26px); }
.dr-stage.is-out .dr-lucky { transform: translateY(-10px); }
.mr-mallet > g { transform-origin: 95% 5%; }
@keyframes mr-hit { 0% { transform: rotate(-10deg); } 40% { transform: rotate(3deg); } }

/* temple courtyard stage for the daily pages */
.tp-stage { position: relative; width: 100%; max-width: 620px; margin: 0 auto; aspect-ratio: 4 / 3; overflow: hidden; background: #f3dcb2 url(../assets/art/temple.svg?v=397) center bottom / cover no-repeat; outline: 3px solid #4a3426; outline-offset: -3px; }
.tp-char { position: absolute; left: 5%; bottom: 5%; height: 64%; width: auto; z-index: 1; filter: drop-shadow(0 6px 6px rgba(60, 30, 10, .25)); }
.tp-say { position: absolute; left: 4%; top: 5%; z-index: 3; max-width: 58%; margin: 0; padding: 7px 12px; text-align: left; font-size: 14.5px; line-height: 1.55; color: #2b2722; background: #fffdf7; border: 1.5px solid #4a3426; border-radius: 14px; box-shadow: 0 4px 10px -6px rgba(40, 30, 20, .5); }
.tp-say::after { content: ""; position: absolute; left: 34px; bottom: -8px; width: 12px; height: 12px; background: #fffdf7; border-right: 1.5px solid #4a3426; border-bottom: 1.5px solid #4a3426; transform: rotate(45deg); }
.tp-stage .dr-tap { position: absolute; left: 46%; bottom: 3%; width: 36%; z-index: 2; }
.tp-stage .dr-pot { width: 100%; }
.tp-stage .mr-tap { position: absolute; left: 40%; bottom: 3%; width: 54%; margin: 0; z-index: 2; }
.dr-result .tp-stage { margin-bottom: 18px; }
@media (max-width: 560px) { .tp-say { font-size: 12.5px; padding: 5px 9px; max-width: 62%; } .tp-say::after { left: 26px; } }
/* card pictures for the two daily rituals: the temple courtyard, a character and the prop */
.play-art.pa-temple, .temple .play-art.pa-temple { position: relative; display: block; padding: 0; overflow: hidden; background: #f3dcb2 url(../assets/art/temple.svg?v=397) center bottom / cover no-repeat; box-shadow: none; outline: 3px solid #4a3426; outline-offset: -3px; }
.pa-temple .pt-char { position: absolute; left: 6%; bottom: 5%; height: 66%; width: auto; margin: 0; filter: drop-shadow(0 5px 5px rgba(60, 30, 10, .25)); }
.pa-temple .pt-prop { position: absolute; bottom: 4%; height: auto; margin: 0; }
.pa-draw .pt-prop { left: 50%; width: 30%; }
.pa-merit .pt-prop { left: 42%; width: 50%; }
.pa-temple .pt-say { left: 6%; top: 7%; right: auto; transform: none; }

/* the characters come alive: a gentle idle sway, a hop when tapped, a nod on each knock */
.tp-char, .pa-temple .pt-char { transform-origin: 50% 100%; animation: tp-idle 3.4s ease-in-out infinite; }
.tp-char { cursor: pointer; transition: filter .2s; }
.tp-char:hover { filter: drop-shadow(0 6px 6px rgba(60, 30, 10, .25)) brightness(1.05); }
@keyframes tp-idle { 0%, 100% { transform: translateY(0) rotate(-1deg) scaleY(1); } 50% { transform: translateY(-4px) rotate(1.4deg) scaleY(1.012); } }
.tp-char.is-hop { animation: tp-hop .55s cubic-bezier(.3, .7, .4, 1), tp-idle 3.4s ease-in-out .55s infinite; }
@keyframes tp-hop { 0% { transform: none; } 18% { transform: scale(1.04, .94); } 45% { transform: translateY(-22px) scale(.97, 1.04) rotate(-3deg); } 75% { transform: translateY(0) scale(1.03, .97); } 100% { transform: none; } }
.tp-char.is-nod { animation: tp-nod .22s ease-out, tp-idle 3.4s ease-in-out .22s infinite; }
@keyframes tp-nod { 40% { transform: rotate(4deg) translateY(2px); } }
.dr-stage.is-shaking .tp-char { animation: tp-cheer .26s ease-in-out infinite alternate; }
@keyframes tp-cheer { from { transform: rotate(-4deg) translateY(-2px); } to { transform: rotate(4deg) translateY(-6px); } }
.dr-stage.is-fresh .tp-char { animation: tp-hop .6s cubic-bezier(.3, .7, .4, 1) .15s 2, tp-idle 3.4s ease-in-out 1.4s infinite; }
.tp-say { transform-origin: 30px 100%; }
.tp-say.is-pop, .dr-stage.is-fresh .tp-say { animation: tp-pop .38s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tp-pop { from { opacity: 0; transform: scale(.6) translateY(8px); } to { opacity: 1; transform: none; } }
/* gold sparks bursting from the pot when the stick comes out */
.tp-sparks { position: absolute; left: 50%; top: 20%; width: 0; height: 0; pointer-events: none; }
.tp-sparks i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; background: #f2c14e; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: tp-spark .9s ease-out .2s both; }
.tp-sparks i:nth-child(1) { --dx: -60px; --dy: -40px; } .tp-sparks i:nth-child(2) { --dx: -30px; --dy: -70px; }
.tp-sparks i:nth-child(3) { --dx: 0px; --dy: -80px; } .tp-sparks i:nth-child(4) { --dx: 32px; --dy: -68px; }
.tp-sparks i:nth-child(5) { --dx: 62px; --dy: -36px; } .tp-sparks i:nth-child(6) { --dx: 70px; --dy: 0px; }
.tp-sparks i:nth-child(7) { --dx: -70px; --dy: 4px; } .tp-sparks i:nth-child(8) { --dx: -46px; --dy: -62px; width: 12px; height: 12px; }
.tp-sparks i:nth-child(9) { --dx: 48px; --dy: -58px; width: 12px; height: 12px; } .tp-sparks i:nth-child(10) { --dx: 12px; --dy: -50px; }
@keyframes tp-spark { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(90deg); } }
/* on the home cards the pot gives a little shake now and then */
.pa-draw .pt-prop { transform-origin: 50% 95%; animation: pt-wobble 4s ease-in-out infinite; }
@keyframes pt-wobble { 0%, 80%, 100% { transform: none; } 84% { transform: rotate(-6deg); } 88% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
.pa-merit .pt-prop { transform-origin: 50% 90%; animation: pt-knock 1.6s ease-out infinite; }
@keyframes pt-knock { 0%, 100% { transform: none; } 6% { transform: scale(1.03, .95); } 14% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tp-char, .pa-temple .pt-char, .pa-temple .pt-prop, .tp-sparks i { animation: none !important; } }

/* the stem character as a round portrait that talks from the top-left corner of the courtyard */
.tp-guide { position: absolute; left: 3.5%; top: 4.5%; right: 3.5%; z-index: 3; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; }
.tp-avatar { flex: none; width: 56px; height: 56px; padding: 0; border: 2.5px solid #4a3426; border-radius: 50%; background: #f6ecd8 no-repeat 50% 7% / 230% auto; box-shadow: 0 4px 10px -4px rgba(40, 30, 20, .55); cursor: pointer; pointer-events: auto; animation: tp-breathe 3.4s ease-in-out infinite; }
.tp-guide .tp-say { position: relative; left: auto; top: auto; max-width: none; margin-top: 6px; pointer-events: none; }
.tp-guide .tp-say::after { left: -7px; top: 14px; bottom: auto; border: 0; border-left: 1.5px solid #4a3426; border-bottom: 1.5px solid #4a3426; }
@keyframes tp-breathe { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-2px) rotate(2deg); } }
.tp-avatar.is-hop { animation: tp-hop .55s cubic-bezier(.3, .7, .4, 1), tp-breathe 3.4s ease-in-out .55s infinite; }
.tp-avatar.is-nod { animation: tp-nod .22s ease-out, tp-breathe 3.4s ease-in-out .22s infinite; }
.dr-stage.is-shaking .tp-avatar { animation: tp-cheer .26s ease-in-out infinite alternate; }
.dr-stage.is-fresh .tp-avatar { animation: tp-hop .6s cubic-bezier(.3, .7, .4, 1) .15s 2, tp-breathe 3.4s ease-in-out 1.4s infinite; }
.tp-stage .dr-tap { left: 50%; width: 34%; }
.tp-stage .mr-tap { left: 40%; width: 56%; }
@media (max-width: 560px) { .tp-avatar { width: 44px; height: 44px; } .tp-guide { gap: 8px; } .tp-guide .tp-say { margin-top: 3px; } .tp-guide .tp-say::after { top: 11px; } }
.tp-avatar, .pt-avatar { background-size: 200% auto; background-position: 50% 15%; }
.pa-temple .pt-avatar { position: absolute; left: 5%; top: 7%; z-index: 2; width: 34px; height: 34px; border: 2px solid #4a3426; border-radius: 50%; background-color: #f6ecd8; background-repeat: no-repeat; animation: tp-breathe 3.4s ease-in-out infinite; }
.pa-temple .pt-say { left: calc(5% + 42px); top: calc(7% + 4px); }
.pa-draw .pt-prop { left: 50%; width: 30%; }
.pa-merit .pt-prop { left: 38%; width: 56%; }
/* home ritual cards: titles never cut off, English without the wide Chinese letter-spacing, balanced props */
.play-grid-2 .play-text strong, .play-grid-4 .play-text strong { white-space: normal; overflow: visible; text-overflow: clip; }
:is(:lang(en), :lang(fr)) .play-grid-2 .play-text strong, :is(:lang(en), :lang(fr)) .play-grid-4 .play-text strong { letter-spacing: 0; font-family: var(--f-display); font-weight: 600; }
.lede { text-wrap-style: var(--tw-pretty, pretty); }
.pa-draw .pt-prop { left: 48%; width: 34%; }
.pa-merit .pt-prop { left: 44%; width: 46%; }
@media (min-width: 761px) { .play-grid-2 .play-card { align-items: center; } .play-grid-2 .play-text { justify-content: center; } }
/* props sit in front of the pond, centred-right; the prompt line sits under the scene */
.tp-stage .dr-tap { left: 52%; width: 26%; bottom: 4%; }
.tp-stage .mr-tap { left: 44%; width: 50%; bottom: 3%; }
.pa-draw .pt-prop { left: 54%; width: 24%; }
.pa-merit .pt-prop { left: 44%; width: 48%; }
.dr-stage .dr-hint, .mr-hint { margin-top: 10px; font-size: 15px; color: var(--ink-soft); letter-spacing: .04em; }

/* two places: the fortune stick in the temple courtyard, the wooden fish in a meditation room */
.merit-page .tp-stage, .play-art.pa-merit, .temple .play-art.pa-merit { background-image: url(../assets/art/zen.svg?v=397); background-color: #ebdfc4; }
/* a low mist along the ground so the props sit in the picture instead of on top of it */
.tp-stage::after, .pa-temple::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; z-index: 3; pointer-events: none; background: linear-gradient(180deg, rgba(236, 224, 200, 0), rgba(236, 224, 200, .5)); }
.tp-stage .dr-tap { left: 50%; width: 34%; bottom: 2%; }
.tp-stage .mr-tap { left: 31%; width: 38%; bottom: 5%; }
.pa-draw .pt-prop { left: 52%; width: 32%; bottom: 3%; }
.pa-merit .pt-prop { left: 32%; width: 36%; bottom: 6%; }
/* the whole picture stays put; only the pot shakes (by script) and the monk bows */
.dr-stage.is-shaking .dr-pot, .dr-tap:hover .dr-pot { animation: none; transform: none; }
.tp-stage .dr-tap { left: 36%; width: 50%; bottom: 2%; }
.tp-stage .mr-tap { left: 20%; width: 56%; bottom: 5%; }
.pa-draw .pt-prop { left: 38%; width: 46%; bottom: 3%; animation: none; }
.pa-merit .pt-prop { left: 22%; width: 52%; bottom: 6%; animation: none; }
.mr-tap.is-hit .mr-body { animation: mr-squash .16s ease-out .08s; }
.tp-stage::after, .pa-temple::after { left: 3px; right: 3px; bottom: 3px; }

/* ---------- the daily pages: the scene is the hero, centred and wide ---------- */
.daily-wrap { max-width: 1000px; }
.daily .th-title, .daily .lede { text-align: center; margin-left: auto; margin-right: auto; }
.daily .crumbs { justify-content: center; }
.daily-box, .temple .daily-box { padding: 0; background: none; border: 0; box-shadow: none; outline: 0; }
.daily-box::before, .daily-box::after { display: none; }
.tp-stage { max-width: none; }
@media (min-width: 761px) {
  .tp-stage { aspect-ratio: 16 / 10; }
  .tp-stage .dr-tap { left: 30%; width: 40%; bottom: 0; }
  .tp-stage .mr-tap { left: 23%; width: 54%; bottom: 4%; }
}
@media (max-width: 760px) { .tp-stage .dr-tap { left: 20%; width: 60%; bottom: 0; } }
.tp-stage .dr-tap { cursor: pointer; }
.dr-lucky { transform: translateY(26px); }
.dr-stage.is-out .dr-lucky { transform: translateY(-14px); }
/* stats as one quiet line instead of three boxes */
.mr-stats { max-width: 560px; margin: 0 auto; gap: 0; }
.mr-stats div { padding: 4px 6px; border: 0; background: none; }
.mr-stats div + div { border-left: 1px solid var(--line); }
.mr-stats b { font-size: 26px; }
.mr-bar { max-width: 560px; margin: 10px auto 14px; height: 4px; }
/* the birthday form sits on the scene */
.tp-overlay { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); width: min(380px, 86%); padding: 22px 22px 20px; box-sizing: border-box; background: rgba(250, 245, 234, .94); border: 1px solid #4a3426; box-shadow: 0 18px 40px -20px rgba(40, 30, 20, .6); text-align: center; }
.tp-overlay h2 { font-size: 21px; }
.tp-overlay p { font-size: 13.5px; }
@media (max-width: 560px) { .tp-overlay { padding: 14px 14px 14px; gap: 8px; } .tp-overlay h2 { font-size: 17px; } .tp-overlay p { display: none; } }
.dr-result .dr-slip { margin-top: 6px; }
.pa-draw .pt-prop { left: 20%; width: 60%; bottom: 0; }
@media (min-width: 761px) { .tp-stage .dr-tap { bottom: 2.5%; } }
@media (max-width: 760px) { .tp-stage .dr-tap { bottom: 2.5%; } }
.pa-draw .pt-prop { bottom: 2.5%; }
/* the kneeling figure sits to the right of the courtyard burner, facing the hall */
@media (min-width: 761px) { .tp-stage .dr-tap { left: 50%; width: 38%; } }
@media (max-width: 760px) { .tp-stage .dr-tap { left: 46%; width: 54%; } }
.pa-draw .pt-prop { left: 46%; width: 54%; }
/* the kneeling figure is centred on the hall's axis, in front of the burner */
@media (min-width: 761px) { .tp-stage .dr-tap { left: 31%; width: 38%; } }
@media (max-width: 760px) { .tp-stage .dr-tap { left: 23%; width: 54%; } }
.pa-draw .pt-prop { left: 23%; width: 54%; }
/* the same little monk is the same height in both scenes */
.dr-lucky { transform: translateY(34px); }
.dr-stage.is-out .dr-lucky { transform: translateY(-16px); }
@media (min-width: 761px) { .tp-stage .dr-tap { left: 31%; width: 38%; } .tp-stage .mr-tap { left: 30.5%; width: 39%; bottom: 4%; } }
@media (max-width: 760px) { .tp-stage .dr-tap { left: 23%; width: 54%; } .tp-stage .mr-tap { left: 22.5%; width: 55%; bottom: 4%; } }
.pa-draw .pt-prop { left: 23%; width: 54%; bottom: 2.5%; }
.pa-merit .pt-prop { left: 22.5%; width: 55%; bottom: 4%; }
/* account button at the far right, its menu, and the name dialog */
.site-nav .acct-btn { margin: 0 0 0 10px; }
.acct-menu { position: absolute; z-index: 60; min-width: 180px; padding: 6px; background: #fbf7ee; border: 1px solid #4a3426; box-shadow: 0 14px 30px -14px rgba(40, 30, 20, .55); }
.acct-menu .acct-who { margin: 4px 8px 6px; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: 14px; text-align: left; color: var(--ink); cursor: pointer; }
.acct-menu button:hover { background: rgba(184, 58, 46, .08); color: var(--seal); }
.name-dlg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(43, 39, 34, .45); }
.name-card { width: min(380px, 100%); padding: 24px 22px 20px; box-sizing: border-box; background: #fbf7ee; border: 1px solid #4a3426; box-shadow: 0 24px 50px -20px rgba(20, 14, 8, .6); text-align: center; }
.name-card h2 { margin: 0 0 6px; font-size: 21px; }
.name-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-soft); }
.name-card input { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 16px; border: 1px solid var(--line); background: #fff; text-align: center; }
.name-acts { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

/* ===================== 2026-10 redesign: home hero =====================
   Left: what the site does and the one next step. Right: today's duty stem as a large character card with its two
   neighbours, the solar-term dial faint behind them. The title is set horizontally so it reads at every width. */
.temple .hero { padding-block: 40px 24px; }
.temple .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; min-height: 0; }
.temple .hero-copy, .temple .hero-copy:is(:lang(en), :lang(fr)) { display: block; padding-left: 0; max-width: 580px; }
.temple .hero-copy > * { grid-column: auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14px; letter-spacing: .12em; color: var(--tp-red, var(--seal)); }
.hero-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.temple:lang(zh) .hero-title, .temple .hero-title:lang(zh), .temple:is(:lang(en), :lang(fr)) .hero-title, .temple .hero-title:is(:lang(en), :lang(fr)) {
  writing-mode: horizontal-tb; grid-row: auto; grid-column: auto; margin: 0 0 18px; padding-left: 0; border-left: 0; white-space: normal;
  font: 500 clamp(34px, 3.9vw, 52px)/1.28 var(--f-body); letter-spacing: .04em; color: var(--tp-ink); text-wrap-style: balance;
}
.temple:is(:lang(en), :lang(fr)) .hero-title, .temple .hero-title:is(:lang(en), :lang(fr)) { font-family: var(--f-display); letter-spacing: 0; line-height: 1.12; }
.temple .hero-lede, .temple:lang(zh) .hero-lede { max-width: 30em; margin: 0 0 26px; padding-top: 0; font-size: 17px; line-height: 1.9; color: var(--tp-ink-soft); }
.temple .hero-cta { gap: 12px; margin-bottom: 14px; }
.temple .hero-cta > * { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 16px; cursor: pointer; }
.temple .hero-cta .btn-line { padding: 12px 22px; border: 1px solid var(--tp-ink); }
.hero-trust { margin: 0; font-size: 14px; color: var(--tp-ink-soft); }
.hero-trust::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; background: var(--tp-moss, #5d7a5a); border-radius: 50%; }
.temple .hero-now { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--tp-line); font-size: 14px; }

.temple .hero-fan { --card-w: 214px; --spread: 150px; --gate: 470px; height: calc(var(--gate) * .516 + var(--card-w) * 1.32 + 46px); }
.temple .hero-fan .gate { opacity: .55; }
.temple .fan-inner { inset: 0 0 46px; }
.temple .fan-card { width: calc(var(--card-w) * (1 - var(--a) * .2)); margin-left: calc(var(--card-w) * (1 - var(--a) * .2) / -2);
  transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 10px)) rotate(calc(var(--i) * 7deg)); }
.temple .fan-card:hover, .temple .fan-card:focus-visible { transform: translateX(calc(var(--i) * var(--spread))) translateY(calc(var(--a) * 10px - 16px)) rotate(calc(var(--i) * 4deg)) scale(1.04); }
.temple .fan-card.is-today { filter: drop-shadow(0 22px 26px rgba(40, 30, 20, .38)); }
.fan-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; color: var(--tp-ink-soft); }
.fan-cap .fc-today { color: var(--tp-ink); font-weight: 600; }
.fan-cap .fc-img { font-style: italic; }
.fan-cap .fc-more { color: var(--tp-red, var(--seal)); text-decoration: none; border-bottom: 1px solid currentColor; }

@media (max-width: 900px) {
  .temple .hero-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .temple .hero-copy, .temple .hero-copy:is(:lang(en), :lang(fr)) { max-width: none; }
  .temple .hero-fan { --card-w: 190px; --spread: 132px; --gate: 420px; }
}
@media (max-width: 760px) {
  .temple .hero { padding-block: 22px 8px; }
  .temple:lang(zh) .hero-title, .temple .hero-title:lang(zh), .temple:is(:lang(en), :lang(fr)) .hero-title, .temple .hero-title:is(:lang(en), :lang(fr)) { font-size: clamp(28px, 7.4vw, 38px); margin-bottom: 12px; }
  .temple .hero-lede, .temple:lang(zh) .hero-lede { font-size: 16px; line-height: 1.8; margin-bottom: 18px; }
  .temple .hero-cta { display: grid; grid-template-columns: 1fr 1fr; }
  .temple .hero-cta > * { padding: 10px 8px; letter-spacing: .06em; font-size: 15px; }
  .temple .hero-now { display: none; }
  .temple .hero-fan { --card-w: 160px; --spread: 108px; --gate: 340px; }
  .fan-cap { font-size: 14px; }
}
@media (max-width: 400px) { .temple .hero-fan { --card-w: 140px; --spread: 92px; --gate: 300px; } }
@media (max-width: 760px) { .temple .hero-eyebrow { order: 0; } .temple .hero-trust { order: 3; margin-top: -2px; } }
/* phones: the today card sits in its own band under the hero, so it can show the character and the hours again */
@media (max-width: 760px) {
  .daily-band { margin-top: 18px; }
  .daily-band .daily, .temple:is(:lang(en), :lang(fr)) .daily-band .daily, .temple:lang(zh) .daily-band .daily { max-width: none; width: auto; margin: 0; padding: 16px 16px 18px; border: 1px solid var(--tp-line, var(--line)); background: rgba(255, 253, 247, .7); }
  .temple:lang(zh) body[data-tab="home"] .daily-band .dy-talk, .daily-band .dy-talk { display: grid; }
  .temple:lang(zh) body[data-tab="home"] .daily-band .dy-hours, .daily-band .dy-hours { display: block; }
  .daily-band .dy-acts { margin-top: 14px; }
}
@media (max-width: 760px) {
  .temple:lang(zh) body[data-tab="home"] .daily-band .dy-bubble .dy-s, .daily-band .dy-bubble .dy-s { display: block; margin: 0; }
  .temple:lang(zh) body[data-tab="home"] .daily-band .dy-bubble .dy-yj, .daily-band .dy-bubble .dy-yj { display: flex; flex-wrap: wrap; gap: 4px 14px; }
}
.score-how { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }
.score-how summary { cursor: pointer; color: var(--tp-red, var(--seal)); width: max-content; }
.score-how p { margin: 6px 0 0; line-height: 1.75; }

/* readings: an honest "not open yet" state, planned prices, a sample excerpt and what will be published before opening */
.rd-status { display: grid; gap: 4px; margin: 0 0 26px; padding: 14px 18px; border-left: 3px solid var(--tp-red, var(--seal)); background: rgba(184, 58, 46, .06); }
.rd-status b { font-size: 17px; color: var(--tp-red, var(--seal)); }
.rd-status span { font-size: 15px; color: var(--ink-soft); line-height: 1.75; }
.rd-sub { margin: 30px 0 10px; font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.rd-note { margin: -4px 0 14px; font-size: 14px; color: var(--ink-soft); }
.rd-more { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 26px; }
.rd-more .panel { padding: 22px 24px; }
.rd-more h3 { margin: 0 0 8px; font-size: 18px; }
.rd-sample blockquote { margin: 8px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--tp-line, var(--line)); }
.rd-sample blockquote p { margin: 0 0 10px; font-size: 15px; line-height: 1.85; }
.rd-before ul { margin: 8px 0 0; padding-left: 1.2em; }
.rd-before li { margin: 0 0 8px; font-size: 15px; line-height: 1.7; }
.pkg-soon { display: block; margin-top: 14px; padding: 8px; text-align: center; font-size: 14px; color: var(--ink-soft); border: 1px dashed var(--line); }
@media (max-width: 760px) { .rd-more { grid-template-columns: minmax(0, 1fr); } }
#tz-info.is-warn { color: #8a4a1e; background: rgba(217, 164, 65, .14); padding: 8px 10px; border-left: 3px solid #d9a441; }

/* phones: the birth form comes first; the double-hour table and "what you get" move under it */
@media (max-width: 760px) {
  .form-layout { display: flex; flex-direction: column; }
  .form-layout .intro { display: contents; }
  .form-layout .intro > * { order: 0; }
  .form-layout .form-panel { order: 1; }
  .form-layout .intro-extra { order: 2; margin-top: 24px; }
  .form-layout .intro-hint { display: none; }
}
.sum-basis { margin: 10px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.sum-basis b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.sum-basis .sb-sep { margin: 0 6px; color: var(--tp-line, var(--line)); }
.sum-sample { margin: 0 0 12px; padding: 10px 14px; font-size: 15px; background: rgba(217, 164, 65, .14); border-left: 3px solid #d9a441; }
.sum-sample a { color: var(--tp-red, var(--seal)); font-weight: 600; }
/* sub-pages: the same bottom bar on phones; header links give way to it */
@media (max-width: 760px) {
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 5px; font-size: 11.5px; letter-spacing: .06em; color: var(--ink-faint); text-decoration: none; position: relative; }
  .tabbar a[aria-current="page"] { color: var(--seal); font-weight: 600; }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -4px; left: 30%; right: 30%; height: 2px; background: var(--seal); }
  .tabbar a .tb-ic { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] .tb-ic { color: var(--seal); }
  body.has-subbar { padding-bottom: 76px; }
  body.has-subbar .site-nav .nav-link { display: none; }
  body.has-subbar .site-head-in { flex-wrap: nowrap; }
}

/* 每日: grouped by why you came */
.play-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.play-gh { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: .06em; color: var(--tp-ink, var(--ink)); }
.play-group .play-grid.play-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.play-group .play-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 16px; }
.play-group .play-art { height: auto; aspect-ratio: 4 / 3; }
.play-meta { display: block; font-size: 13px; color: var(--ink-faint); }
.play-text em::after { content: " →"; }
.play-friends { margin-top: 30px; }
.pf-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pf-list a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--tp-line, var(--line)); background: rgba(255, 253, 247, .6); color: inherit; text-decoration: none; }
.pf-list a:hover { border-color: var(--tp-red, var(--seal)); }
.pf-list b { font-size: 16px; color: var(--tp-red, var(--seal)); }
.pf-list span { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 1040px) { .play-groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .pf-list { grid-template-columns: minmax(0, 1fr); } .play-group .play-card { padding: 10px 10px 14px; gap: 8px; } }
.dr-whose { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.pkg-planned { margin-left: 8px; padding: 1px 6px; font: 400 12.5px/1.4 var(--f-body); font-style: normal; vertical-align: middle; color: var(--ink-soft); border: 1px solid var(--line); }
@media (max-width: 760px) {
  body.has-subbar .site-nav { width: auto; margin-left: auto; flex-wrap: nowrap; }
  body.has-subbar .site-head-in { padding-block: 8px; flex-wrap: nowrap; }
  body.has-subbar .brand { flex: none; }
  body.has-subbar .brand-text { white-space: nowrap; }
  body.has-subbar .brand-seal { width: 34px; height: 34px; }
  body.has-subbar .brand-name { font-size: 22px; }
  body.has-subbar .brand-sub { font-size: 10.5px; margin-top: 3px; }
  body.has-subbar .lang-btn { padding: 3px 12px; font-size: 12.5px; }
}
@media (max-width: 760px) {
  .temple:lang(zh) .hero-title, .temple .hero-title:lang(zh) { font-size: min(34px, 7.6vw); letter-spacing: 0; min-height: 0; height: auto; }
  .temple .hero-copy .hero-lede { margin-top: 0; }
}
@media (max-width: 760px) {
  .temple body[data-tab="home"] .hero-title:lang(zh), .temple body[data-tab="home"] .hero-title { height: auto; font-size: min(34px, 7.6vw); letter-spacing: 0; margin-bottom: 12px; }
  .temple body[data-tab="home"] .hero-title:is(:lang(en), :lang(fr)) { font-size: min(34px, 8.4vw); }
}
/* keep the taiji in the middle of the dial visible above the cards */
.temple .hero-fan { height: calc(var(--gate) * .516 + var(--card-w) * 1.32 + 46px + var(--taiji-gap, 96px)); }
.temple .hero-fan .gate { opacity: 1; }
@media (max-width: 900px) { .temple .hero-fan { --taiji-gap: 84px; } }
@media (max-width: 760px) { .temple .hero-fan { --taiji-gap: 70px; } }
@media (max-width: 400px) { .temple .hero-fan { --taiji-gap: 62px; } }
@media (max-width: 760px) { .temple .hero-fan { --taiji-gap: 96px; } }
@media (max-width: 400px) { .temple .hero-fan { --taiji-gap: 88px; } }
/* 每日: all four cards the same height, with time and button pinned to the bottom so they line up */
.play-groups { align-items: stretch; }
.play-group { display: flex; flex-direction: column; }
.play-group .play-grid.play-grid-2 { flex: 1; align-items: stretch; }
.play-group .play-card { height: 100%; box-sizing: border-box; }
.play-group .play-text { flex: 1; display: flex; flex-direction: column; }
.play-group .play-text .play-meta { margin-top: auto; padding-top: 10px; }
.play-group .play-text em { margin-top: 8px; }
.acct-pts { display: flex; justify-content: space-between; align-items: baseline; margin: 0 8px; padding: 8px 0 4px; border-top: 1px solid var(--line); }
.acct-pts span { font-size: 13px; color: var(--ink-soft); }
.acct-pts b { font-size: 20px; color: var(--seal); }
.acct-earn { margin: 0 8px 8px; font-size: 12px; line-height: 1.6; color: var(--ink-faint); max-width: 220px; }

/* points: locked days and the unlock panel */
.lk-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.wk-day.is-locked { color: var(--ink-faint); background: rgba(74, 52, 38, .04); }
.wk-day.is-locked .wk-lk { display: grid; place-items: center; }
.lock-box { margin: 14px 0 6px; padding: 26px 22px; text-align: center; border: 1px dashed var(--tp-line, var(--line)); background: rgba(255, 253, 247, .6); }
.lock-box > .lk-ic { width: 34px; height: 34px; color: var(--tp-red, var(--seal)); }
.lock-box h3 { margin: 8px 0 6px; font-size: 19px; }
.lock-box p { margin: 0 auto 12px; max-width: 30em; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.lock-box .lock-short { color: #8a4a1e; }
.lock-box .lock-note { margin: 12px auto 0; font-size: 13px; color: var(--ink-faint); }
.lock-box .btn-primary, .lock-box .btn-ghost { min-height: 46px; padding: 10px 24px; }
.pts-toast { position: fixed; left: 50%; bottom: 96px; z-index: 90; transform: translateX(-50%); padding: 10px 18px; background: #2b2722; color: #f6e3b4; font-size: 14.5px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); animation: pts-in .25s ease-out; }
@keyframes pts-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.cd-s.is-locked { color: var(--ink-faint); background: none; }
.cd-s.is-locked .lk-ic { width: 13px; height: 13px; }
.mt-q { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 2px dashed var(--tp-line, var(--line)); color: var(--tp-red, var(--seal)); }
.mt-q .lk-ic { width: 30px; height: 30px; }

/* sub-pages: the content column always fills the row and centres, whatever the browser's default sizing */
body > main.fun-page { display: block; width: 100%; }
main.fun-page > .wrap { box-sizing: border-box; width: 100%; margin-left: auto; margin-right: auto; }
.acct-menu .acct-link { display: block; padding: 8px 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.acct-menu .acct-link:hover { background: rgba(184, 58, 46, .08); color: var(--seal); }

/* my account */
.acc-wrap { max-width: 860px; }
.acc-box { padding: 26px 28px 28px; }
.acc-out { text-align: center; padding: 10px 0 20px; }
.acc-out p { max-width: 32em; margin: 8px auto 16px; color: var(--ink-soft); line-height: 1.8; }
.acc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.acc-head h2 { margin: 2px 0 2px; font-size: 26px; }
.acc-k { margin: 0; font-size: 13px; color: var(--ink-faint); letter-spacing: .06em; }
.acc-mail { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); }
.acc-bal { text-align: right; }
.acc-bal b { display: block; font: 600 44px/1.1 var(--f-display); color: var(--tp-red, var(--seal)); }
.acc-mem { display: inline-block; margin-top: 4px; padding: 1px 8px; font-size: 12.5px; color: #fff; background: #b07a12; }
.acc-warn { margin: 14px 0 0; padding: 10px 12px; background: rgba(217, 164, 65, .14); border-left: 3px solid #d9a441; font-size: 14.5px; }
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.account h3 { margin: 0 0 10px; font-size: 17px; }
.acc-rules { list-style: none; margin: 0; padding: 0; }
.acc-rules li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.acc-rules b { color: var(--tp-red, var(--seal)); white-space: nowrap; }
.acc-rules .acc-date { color: var(--ink-soft); font-weight: 500; }
.acc-note { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-faint); line-height: 1.7; }
.acc-log { margin-top: 26px; }
.acc-hist { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.acc-hist li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft, var(--line)); font-size: 14.5px; }
.ah-w { color: var(--ink-faint); font-size: 13.5px; }
.acc-hist .is-plus { color: #2e7a4b; } .acc-hist .is-minus { color: var(--tp-red, var(--seal)); }
.acc-plans { margin-top: 28px; padding: 20px 22px; border: 1px dashed var(--tp-line, var(--line)); background: rgba(255, 253, 247, .5); }
.acc-plan-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.acc-plan { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); background: #fbf7ee; }
.acc-plan b { font-size: 16px; } .acc-plan span { font-size: 20px; color: var(--tp-red, var(--seal)); }
.acc-perks { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.9; }
.acc-soon { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-faint); }
.acc-foot { display: flex; align-items: center; gap: 16px; margin: 26px 0 0; }
@media (max-width: 640px) {
  .acc-box { padding: 18px 16px 20px; }
  .acc-head { flex-direction: column; } .acc-bal { text-align: left; }
  .acc-grid, .acc-plan-row { grid-template-columns: minmax(0, 1fr); }
  .acc-hist li { grid-template-columns: minmax(0, 1fr) auto; } .ah-w { grid-column: 1 / -1; }
}
/* back button on sub-pages */
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: 0 0 6px; padding: 0 12px 0 8px; font-size: 15px; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--tp-line, var(--line)); background: rgba(255, 253, 247, .6); }
.back-link span { font-size: 22px; line-height: 1; margin-top: -2px; }
.back-link:hover { color: var(--tp-red, var(--seal)); border-color: currentColor; }
.daily .back-link { position: relative; }

/* ten stems on phones: every pair of cards the same width, every element box the same width, clear gaps between groups */
@media (max-width: 760px) {
  .el-col { align-items: stretch; }
  .el-col .el-cards { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; justify-items: stretch; }
  .el-col .stem-card { width: 100%; }
  .el-col .stem-card .tilt-wrap, .el-col .stem-thumb { width: 100%; }
  .el-col .stem-thumb img { width: 100%; height: auto; }
  .el-col .el-intro { width: 100%; box-sizing: border-box; margin-top: 6px; }
  .el-col + .el-col { margin-top: 34px; }
}
/* Day Master facts on phones: one fact per row, label on the left, value on the right */
@media (max-width: 760px) {
  .dm-facts { grid-template-columns: minmax(0, 1fr); }
  .dm-facts div, .dm-facts div:nth-child(n) { grid-column: auto; display: grid; grid-template-columns: 5.5em minmax(0, 1fr); align-items: baseline; gap: 10px; border-right: 0; padding: 10px 14px; }
  .dm-facts dt, .dm-facts dd { margin: 0; writing-mode: horizontal-tb; position: static; }
  .dm-facts div:last-child { border-bottom: 0; }
}
/* card lightbox header on phones: title and close on one row, the card-language switch on its own row */
@media (max-width: 760px) {
  .lb-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title close" "lang lang"; row-gap: 10px; align-items: center; }
  .lb-head h3 { grid-area: title; font-size: 19px; }
  .lb-head .lb-close { grid-area: close; flex: none; }
  .lb-head .lang-toggle { grid-area: lang; justify-self: start; display: inline-grid; grid-template-columns: auto auto; }
  .lb-head .lang-toggle .lb-lang { min-width: 84px; padding: 6px 14px; }
}
.temple .lang-toggle { align-items: stretch; }
.temple .lang-toggle button { margin: 0; line-height: 1.5; -webkit-appearance: none; appearance: none; }

/* iPhone Safari gives date and time fields a fixed native width, which pushed them out of their boxes; make them fill their cell */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 46px; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
.tm-row2 > *, .tm-member > *, .field { min-width: 0; }
.dr-ask-card { max-width: 420px; margin: 18px auto 0; padding: 20px 20px 22px; border: 1px solid var(--tp-line, var(--line)); background: rgba(255, 253, 247, .85); text-align: center; }
.dr-ask-card .field { text-align: left; }
.dr-ask-card .btn-primary { min-height: 48px; padding: 10px 30px; }
/* 解签 */
.dr-verse-en { margin: 8px auto 0; max-width: 26em; }
.dr-verse-en p { margin: 0; font-style: italic; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.dr-jie { margin: 16px 0 0; padding: 14px 4px 0; border-top: 1px dashed rgba(168, 64, 46, .35); text-align: left; }
.dr-jie h3 { margin: 0 0 6px; text-align: center; font-size: 16px; letter-spacing: .2em; color: var(--tp-red, var(--seal)); }
.dr-jie > p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink); }
.dr-asp { margin: 12px 0 0; display: grid; gap: 6px; }
.dr-asp div { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 8px; font-size: 14.5px; line-height: 1.7; }
.dr-asp dt { font-weight: 700; color: var(--tp-red, var(--seal)); }
.dr-asp dd { margin: 0; color: var(--ink-soft); }
.dr-slip .dr-plain { display: none; }
@media (max-width: 760px) { .temple .dm-facts, .dm-body .dm-facts, .dm-facts { grid-template-columns: minmax(0, 1fr) !important; } }

/* language switch: iPhone Safari sized the grid columns before the web font loaded, so "English" spilled under the dark "中文" half; plain flex with unbreakable labels sizes from the real text */
.lang-toggle, .lb-head .lang-toggle { display: inline-flex !important; flex-wrap: nowrap; width: auto; max-width: 100%; }
.lang-toggle button, .lb-head .lang-toggle .lb-lang { flex: 0 0 auto; white-space: nowrap; min-width: 0; padding: 6px 16px; }
@media (max-width: 760px) { .lb-head .lang-toggle { justify-self: start; } }


/* sub-pages (merge, merit, draw…): keep the column centred whatever the parent layout */
body > main.fun-page { display: block !important; width: 100% !important; float: none; }
main.fun-page > .wrap, main.fun-page > .daily-wrap { margin-left: auto !important; margin-right: auto !important; width: 100%; }


/* game pages (js/scene.js): a jade pond with koi along the bottom of the window, and seasonal petals, rain,
   leaves or snow drifting down the page; fixed behind everything and never in the way of a tap */
.bg-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-pond { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(260px, 52vh, 520px); display: block; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%); mask-image: linear-gradient(180deg, transparent 0, #000 30%); }
.bg-fall { position: absolute; inset: 0; }
.bg-fall i { position: absolute; top: -6%; display: block; will-change: transform; animation: bg-drift 16s linear infinite; }
@keyframes bg-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0) rotateY(0); }
  25% { transform: translate3d(calc(var(--drift) * .6), 28vh, 0) rotate(90deg) rotateY(160deg); }
  50% { transform: translate3d(calc(var(--drift) * -.2), 56vh, 0) rotate(170deg) rotateY(320deg); }
  75% { transform: translate3d(var(--drift), 84vh, 0) rotate(260deg) rotateY(480deg); }
  100% { transform: translate3d(calc(var(--drift) * .3), 112vh, 0) rotate(340deg) rotateY(640deg); }
}
/* plum and peach petals: a notched teardrop, pink fading to white */
.bg-fall.is-petal i { width: calc(11px * var(--sz)); height: calc(9px * var(--sz)); background: radial-gradient(circle at 30% 70%, #fff4f6, #f2b6c5 60%, #e693a9); border-radius: 0 80% 30% 80%; clip-path: polygon(0 100%, 0 30%, 30% 0, 60% 0, 72% 14%, 86% 4%, 100% 24%, 100% 60%, 60% 100%); opacity: .9; }
/* maple leaves in reds and ambers */
.bg-fall.is-leaf i { width: calc(15px * var(--sz)); height: calc(15px * var(--sz)); background: linear-gradient(140deg, #e2662f, #b8352a); clip-path: polygon(50% 0, 60% 30%, 92% 18%, 72% 48%, 100% 62%, 64% 64%, 56% 100%, 50% 72%, 44% 100%, 36% 64%, 0 62%, 28% 48%, 8% 18%, 40% 30%); opacity: .88; }
.bg-fall.is-leaf i:nth-child(3n) { background: linear-gradient(140deg, #f0b34a, #d9762e); }
.bg-fall.is-leaf i:nth-child(4n) { background: linear-gradient(140deg, #c7432c, #8f2a22); }
/* snow: soft round flakes, the larger ones a little blurred as if nearer */
.bg-fall.is-snow i { width: calc(7px * var(--sz)); height: calc(7px * var(--sz)); border-radius: 50%; background: radial-gradient(circle, #fff 40%, rgba(255, 255, 255, .6) 70%, rgba(255, 255, 255, 0)); box-shadow: 0 0 3px rgba(150, 160, 170, .35); animation-name: bg-snow; }
.bg-fall.is-snow i:nth-child(5n) { filter: blur(1px); width: calc(11px * var(--sz)); height: calc(11px * var(--sz)); }
@keyframes bg-snow { 0% { transform: translate3d(0, 0, 0); } 30% { transform: translate3d(calc(var(--drift) * .5), 33vh, 0); } 60% { transform: translate3d(calc(var(--drift) * -.3), 66vh, 0); } 100% { transform: translate3d(var(--drift), 112vh, 0); } }
/* a light summer shower */
.bg-fall.is-rain i { top: -14%; width: 1.3px; height: calc(64px * var(--sz)); background: linear-gradient(180deg, rgba(90, 120, 130, 0), rgba(90, 120, 130, .38)); animation-name: bg-rain; animation-timing-function: linear; }
@keyframes bg-rain { from { transform: translate(0, 0) rotate(10deg); } to { transform: translate(-20vh, 118vh) rotate(10deg); } }
/* summer night: fireflies hovering over the pond */
.bg-fall.is-firefly i { top: auto; bottom: calc(8vh + 40px); width: 5px; height: 5px; border-radius: 50%; background: #f7e38a; box-shadow: 0 0 10px 4px rgba(247, 227, 138, .55); animation-name: bg-fly; animation-timing-function: ease-in-out; }
@keyframes bg-fly { 0%, 100% { transform: translate(0, 0); opacity: .1; } 30% { opacity: 1; } 50% { transform: translate(var(--drift), -70px); opacity: .9; } 80% { transform: translate(calc(var(--drift) * -.5), -24px); opacity: .2; } }
/* phones: a shallower pond sitting just above the bottom tabs */
@media (max-width: 760px) { .bg-pond { bottom: 60px; height: 190px; } }
@media (prefers-reduced-motion: reduce) { .bg-fall { display: none; } }
/* game pages carry the class "daily" on <main>; the English home-page rule `.temple:is(:lang(en), :lang(fr)) .daily` (a 30em card)
   was catching it and squeezing the whole page into a left-hand column. Undo that for the pages themselves. */
main.fun-page.daily { max-width: none !important; width: 100% !important; margin: 0 !important; border-top: 0 !important; padding: 34px 0 64px !important; }

/* the stick explanation video (js/draw-video.js): a pop-up with the 9:16 canvas, a progress line and three buttons */
.dv-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(24, 18, 12, .72); }
.dv-box { display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 100%; }
.dv-box { --dv-h: min(calc(100vh - 150px), calc((100vw - 32px) * 16 / 9), 900px); }
@supports (height: 100dvh) { .dv-box { --dv-h: min(calc(100dvh - 150px), calc((100vw - 32px) * 16 / 9), 900px); } }
/* sized by whichever runs out first, the visible height or the width, so the whole frame always shows */
.dv-box canvas { display: block; height: var(--dv-h); width: calc(var(--dv-h) * 9 / 16); border-radius: 8px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7); background: #f6efe0; }
.dv-progress { width: calc(var(--dv-h) * 9 / 16); height: 3px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.dv-progress span { display: block; height: 100%; width: 0; background: #e2b56a; }
.dv-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dv-acts .btn-ghost { color: #f3e9d6; border-color: rgba(243, 233, 214, .55); background: transparent; }
.dv-msg { margin: 0; max-width: 30em; text-align: center; font-size: 13.5px; color: #f3e9d6; }
@media (max-width: 760px) { .dv-acts .btn-primary, .dv-acts .btn-ghost { padding: 10px 16px; } }

/* the drawn stick hangs in the temple scene: a paper slip on a cord above the visitor, verse in columns right to left */
.tp-stage .dr-hang { position: absolute; left: 50%; top: 3%; z-index: 3; width: 52%; transform: translateX(-50%); transform-origin: 50% 0; pointer-events: none; }
.dr-hang::before { content: ""; position: absolute; left: 50%; top: -12%; width: 2px; height: 14%; background: #8a5a3a; transform: translateX(-50%); }
.dr-hang-paper { position: relative; padding: 4% 6% 5%; background: linear-gradient(180deg, #fbf5e8, #f1e4c8); border: 2px solid #a8402e; box-shadow: 0 0 0 4px rgba(251, 245, 232, .9), 0 0 0 5px rgba(168, 64, 46, .5), 0 14px 26px -12px rgba(60, 30, 15, .55); text-align: center; }
.dr-hang-head { display: flex; justify-content: center; align-items: baseline; gap: .5em; margin: 0 0 4%; padding-bottom: 3%; border-bottom: 1px solid rgba(168, 64, 46, .35); font-size: clamp(12px, 2.6vw, 17px); color: #2b2722; letter-spacing: .06em; }
.dr-hang-head b { font-weight: 700; }
.dr-hang-head span { padding: 0 .4em; background: #a8402e; color: #fbf3e6; font-weight: 600; }
.dr-hang-verse { display: flex; flex-direction: row-reverse; justify-content: center; gap: 0; }
.dr-hang-verse span { width: 2.1em; display: flex; justify-content: center; writing-mode: vertical-rl; font: 600 clamp(12px, 2.5vw, 17px)/1.15 "Noto Serif SC", "Songti SC", serif; letter-spacing: .14em; color: #2b2722; }
/* drop in and swing to rest when the stick has just been drawn */
.dr-stage.is-fresh .dr-hang { animation: dr-hang-in 1.6s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes dr-hang-in {
  0% { transform: translate(-50%, -120%) rotate(0); opacity: 0; }
  35% { transform: translate(-50%, 0) rotate(6deg); opacity: 1; }
  55% { transform: translate(-50%, 0) rotate(-4deg); }
  72% { transform: translate(-50%, 0) rotate(2deg); }
  86% { transform: translate(-50%, 0) rotate(-1deg); }
  100% { transform: translate(-50%, 0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .dr-stage.is-fresh .dr-hang { animation: none; } }

/* 穷通宝鉴 in plain words: each original line keeps its weight, with the plain reading under it in a softer voice */
.bk-bai { display: block; margin-top: 6px; padding-left: 10px; border-left: 2px solid rgba(168, 64, 46, .35); font-size: 14.5px; line-height: 1.75; color: var(--ink-soft, #5d554b); font-style: normal; letter-spacing: .02em; }
.bk-match .bk-bai { margin-top: 8px; }
.bk-orig.has-bai p { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px dashed rgba(168, 64, 46, .18); }
.bk-orig.has-bai p:last-child { border-bottom: 0; }
/* inside the quote, the plain reading follows the original after a light rule */
.bk-quote .bk-bai { margin-top: 10px; padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(140, 111, 69, .3); font-size: 15px; }

/* the original text reads top to bottom in one column: two newspaper columns broke the order and left ragged gaps */
.bk-orig { columns: 1 !important; column-rule: none; }
.bk-orig p { max-width: 46em; }
/* Day Master facts: as many even columns as fit (three, then two), never five squeezed ones */
@media (min-width: 761px) {
  .dm-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
  .dm-facts > div { border-right: 0 !important; border-bottom: 1px solid var(--line-soft) !important; }
  .dm-facts dd { word-break: normal; overflow-wrap: anywhere; }
}
/* phones: the slip would hang over the visitor's head, so the verse runs in four short lines and the slip stays shallow */
@media (max-width: 560px) {
  .tp-stage .dr-hang { width: 62%; top: 2.5%; }
  .dr-hang-paper { padding: 3% 5% 3.5%; }
  .dr-hang-head { font-size: 11.5px; margin-bottom: 3%; }
  .dr-hang-verse { flex-direction: column; align-items: center; gap: 1px; }
  .dr-hang-verse span { width: auto; display: block; writing-mode: horizontal-tb; font-size: 11.5px; line-height: 1.4; letter-spacing: .1em; }
}

/* the temple and zen-room scenes as a misty, half-see-through picture: the painting fades at its edges into the page
   and lets the pond behind show faintly, instead of a solid block with a dark frame */
.tp-stage { isolation: isolate; background: none !important; outline: 0 !important; box-shadow: none !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 90%, transparent 100%); mask-composite: intersect; }
.tp-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .78;
  background: url(../assets/art/temple.svg?v=397) center bottom / cover no-repeat; }
.merit-page .tp-stage::before { background-image: url(../assets/art/zen.svg?v=397); opacity: .7; }
.tp-stage::after { display: none; }

/* the drawn slip hangs lower and smaller, in front of the hall's doors, leaving the roof in view */
.tp-stage .dr-hang { top: 17%; width: 44%; }
.dr-hang::before { top: -40%; height: 42%; }
.dr-hang-head { font-size: clamp(11px, 2.1vw, 15px); }
.dr-hang-verse span { font-size: clamp(11px, 2vw, 15px); }
@media (max-width: 560px) {
  .tp-stage .dr-hang { top: 13%; width: 56%; }
  .dr-hang-head { font-size: 10.5px; }
  .dr-hang-verse span { font-size: 10.5px; line-height: 1.35; }
}
/* keep a paper wash under the painting so the pond only shows faintly at the faded edges */
.tp-stage::before { background: url(../assets/art/temple.svg?v=397) center bottom / cover no-repeat, #efe6d2; opacity: .93; }
.merit-page .tp-stage::before { background: url(../assets/art/zen.svg?v=397) center bottom / cover no-repeat, #efe6d2; opacity: .9; }
/* only a whisper of fade at the foot, so the figures keep their feet */
.tp-stage { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 97%, transparent 100%); }
.dv-acts .dv-sound { min-width: 46px; padding-left: 12px; padding-right: 12px; font-size: 18px; }
.dv-acts .dv-sound.is-off { opacity: .5; text-decoration: line-through; }
@media (max-width: 560px) { .tp-stage .dr-hang { top: 5%; width: 54%; } }
/* iPhone Safari can stop taps reaching buttons inside a masked element, so the fade moves onto the painting alone;
   the figures, the pot and the slip sit unmasked on top and stay tappable */
.tp-stage { -webkit-mask-image: none !important; mask-image: none !important; }
.tp-stage::before {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 97%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 7%, #000 97%, transparent 100%);
  mask-composite: intersect; }

/* the footer is a quiet line, not a block: sources and the privacy link on the home page, the privacy link alone elsewhere */
.site-foot, .temple .site-foot { background: none !important; border-top: 0 !important; padding: 18px 0 26px !important; color: var(--ink-faint, #8a8174) !important; text-align: center; font-size: 12px !important; line-height: 1.7 !important; opacity: .75; }
.site-foot a, .temple .site-foot a { color: inherit !important; text-decoration: underline; text-decoration-color: rgba(138, 129, 116, .45); text-underline-offset: 2px; }
.site-foot p { margin: 0 auto !important; max-width: none !important; }
.site-foot .foot-links { margin-top: 0; }
body.has-subbar .site-foot { padding-bottom: 12px !important; }
/* "Which Day Master are you?": on phones the ten stems fill the card's width in five even columns */
@media (max-width: 760px) {
  .dy-stems, .daily-band .daily.is-ask .dy-stems, .temple:lang(zh) .daily-band .daily.is-ask .dy-stems, .temple:lang(zh) .daily.is-ask .dy-stems { max-width: none !important; width: 100% !important; justify-self: stretch !important; margin-left: 0; margin-right: 0; }
}
/* the caption under the hero cards always spans the full width (an English rule was collapsing it to nothing) */
.hero-fan .fan-cap { left: 0 !important; right: 0 !important; width: auto !important; transform: none !important; padding: 0 8px; text-align: center; }
/* the hero card fan holds only absolutely placed cards, so in a flex column it shrank to zero width in English */
.hero-in > .hero-fan, .hero-fan { width: 100%; align-self: stretch; box-sizing: border-box; }
/* card thumbnails of the temple and zen scenes: no heavy dark frame, just a soft edge like the scenes themselves */
.play-art.pa-temple, .temple .play-art.pa-temple, .play-art.pa-merit, .temple .play-art.pa-merit { outline: 0 !important; box-shadow: inset 0 0 0 1px rgba(74, 52, 38, .18), 0 6px 16px -10px rgba(60, 35, 20, .35) !important; border-radius: 6px; }

/* ---------- English layout: English words are longer, so the chart heads get their own spacing ---------- */
/* pillar heads on one line, with room above for the Day Master tag */
:is(:lang(en), :lang(fr)) .sp-k { letter-spacing: .03em; white-space: nowrap; font-size: 11.5px; }
:is(:lang(en), :lang(fr)) .sp-col { padding-top: 22px; }
:is(:lang(en), :lang(fr)) .sp-dm { font-size: 10px; padding: 1px 5px; letter-spacing: .02em; }
/* summary rows: a label column wide enough for "Day Master" */
:is(:lang(en), :lang(fr)) .sum-facts div { grid-template-columns: 7.2em minmax(0, 1fr); }
/* the classics' key stems: one per row in English, so each reads as a sentence */
@media (max-width: 760px) { :is(:lang(en), :lang(fr)) .bk-list { grid-template-columns: minmax(0, 1fr) !important; } }
:is(:lang(en), :lang(fr)) .bk-list li { display: flex; align-items: baseline; gap: 8px; }
/* five elements: in English the seasonal-states table takes its own full row so the words are not cut */
@media (max-width: 760px) {
  :is(:lang(en), :lang(fr)) .el-cols { grid-template-columns: minmax(0, 1fr) !important; display: grid !important; }
  :is(:lang(en), :lang(fr)) .el-cols > .el-block { width: 100% !important; max-width: none !important; }
  :is(:lang(en), :lang(fr)) .season small { white-space: nowrap; font-size: 11px; }
}
/* hour rows: "Do" and "Avoid" start on the same line edge */
.hr-row .hr-yj .dy-ji, .hr-row .hr-yj .dy-yi { margin-left: 0 !important; }
/* speech bubbles on the play cards may wrap rather than be cut off */
.pa-say { white-space: normal !important; text-overflow: clip !important; overflow: visible !important; max-width: 88%; text-align: center; }
/* phones: a shallower pond, and room at the end of game pages so the last lines scroll clear of it */
@media (max-width: 760px) {
  .bg-pond { height: 240px !important; }
  .has-scene main.fun-page { padding-bottom: 250px !important; }
}
@media (min-width: 761px) { .has-scene main.fun-page { padding-bottom: 30vh !important; } }
/* game pages end on the pond: no footer line there (the privacy link lives on the home page) */
.has-scene .site-foot { display: none; }
/* theatre and classics class: the back button stays first, above the video, at every width */
.th-layout > .back-link { order: -2; grid-column: 1 / -1; justify-self: start; }

/* home "today" card with a chart: the character stands at the right of the score row; the reading sits below, full width and centred */
.dy-row.has-char { display: flex !important; flex-direction: row !important; align-items: flex-end !important; gap: 14px; }
.dy-row.has-char .dy-char-top { margin-left: auto; width: clamp(70px, 22%, 104px); height: auto; flex: none; }
.dy-talk.is-solo { display: block !important; margin-top: 6px; }
.dy-talk.is-solo .dy-bubble { margin: 0 0 4px; padding: 14px 18px; text-align: center; }
.dy-talk.is-solo .dy-bubble::after { left: auto; right: clamp(34px, 11%, 52px); top: -6px; bottom: auto; border-left: 1.5px solid #4a3426; border-top: 1.5px solid #4a3426; border-bottom: 0; transform: rotate(45deg); }
.dy-talk.is-solo .dy-yj { justify-content: center; }
@media (max-width: 760px) { .temple:lang(zh) body[data-tab="home"] .dy-talk.is-solo, .dy-talk.is-solo { display: block !important; } }

/* draw page buttons: a last button left on its own takes the whole row */
.dr-acts > :last-child:nth-child(even):not(:first-child) { grid-column: auto; }
.dr-acts > :first-child:not(:nth-last-child(2)) ~ :last-child:nth-child(even) { grid-column: 1 / -1; }
