  :root {
    --ink: #4a3040;
    --pink: #e75480;
    --muted: #a0718a;
    --soft: #c79aab;
    --glass: rgba(255,255,255,.72);
    --glass-strong: rgba(255,255,255,.86);
    --line: rgba(255,211,226,.65);
    --shadow: 0 18px 48px rgba(120, 60, 90, .14);
    --nav-h: 52px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { height: 100%; scroll-behavior: smooth; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(165deg, #ffe8f1 0%, #ffe3ec 40%, #e8f4ff 100%);
    background-attachment: fixed;
    transition: background .8s ease;
    position: relative;
  }
  /* Full-bleed atmosphere (weather classes) */


  /* ===== Top nav: Apple / editorial text links ===== */
  .topnav {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: center;
    gap: clamp(14px, 3.5vw, 36px);
    padding: calc(var(--safe-t) + 14px) max(18px, var(--safe-r)) 14px max(18px, var(--safe-l));
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 0;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a, .topnav button {
    flex: 0 0 auto;
    appearance: none; border: 0; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 500;
    letter-spacing: .04em;
    text-decoration: none; color: var(--ink);
    background: transparent !important;
    padding: 6px 2px; border-radius: 0;
    white-space: nowrap;
    opacity: .62;
    box-shadow: none !important;
    transition: opacity .2s ease, color .2s ease;
    position: relative;
  }
  .topnav a:hover, .topnav button:hover { opacity: 1; }
  .topnav a:active, .topnav button:active { transform: none; opacity: 1; }
  .topnav a.is-active, .topnav button.is-active,
  .topnav a.is-active.nav-book, .topnav a.is-active.nav-mood {
    opacity: 1; font-weight: 600;
    background: transparent !important;
    color: var(--ink) !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .topnav a.is-active::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 1.5px; border-radius: 2px;
    background: currentColor; opacity: .55;
  }
  .topnav .nav-book, .topnav .nav-mood {
    background: transparent !important;
  }

  .preview-tag {
    position: fixed; top: calc(var(--safe-t) + 8px); right: max(8px, var(--safe-r));
    z-index: 50; font-size: 11px; padding: 3px 8px; border-radius: 99px;
    background: rgba(60,30,40,.55); color: #fff; pointer-events: none;
  }
  /* Keep badge clear of nav scroll area on narrow phones */
  @media (max-width: 420px) {
    .preview-tag { top: auto; bottom: calc(var(--safe-b) + 12px); right: max(10px, var(--safe-r)); }
  }

  /* ===== Page shell: full-bleed, content rides atmosphere ===== */
  .page {
    position: relative; z-index: 1;
    width: 100%;
    min-height: calc(100dvh - var(--nav-h));
    padding: 18px max(16px, var(--safe-r)) calc(28px + var(--safe-b)) max(16px, var(--safe-l));
    display: flex; flex-direction: column; align-items: stretch;
  }
  .page-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }


  .card {
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
    border-radius: 28px;
    padding: 22px 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.45);
    margin-bottom: 14px;
  }
  .score-row { display: flex; align-items: center; gap: 16px; }
  .score-ring {
    width: 96px; height: 96px; border-radius: 50%;
    background: conic-gradient(#ff6b9d var(--p, 0%), #ffe0ea 0);
    display: flex; align-items: center; justify-content: center;
    flex: none; position: relative;
  }
  .score-ring::after {
    content: ''; position: absolute; inset: 8px;
    background: #fff; border-radius: 50%;
  }
  .score-inner { position: relative; z-index: 1; text-align: center; }
  .score-num { font-size: 28px; font-weight: 800; color: #e75480; line-height: 1; }
  .score-lab { font-size: 11px; color: #c07996; margin-top: 2px; }
  .meta { flex: 1; min-width: 0; }
  .meta .name { font-size: 18px; font-weight: 700; }
  .meta .zodiac { font-size: 13px; color: #e75480; margin-top: 2px; }
  .meta .bazi { font-size: 12px; color: #a0718a; margin-top: 6px; line-height: 1.5; word-break: break-all; }
  .meta .date { font-size: 12px; color: #c79aab; margin-top: 6px; }
  .section { margin-top: 14px; }
  .section h3 {
    font-size: 14px; font-weight: 700; color: #e75480;
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
  }
  .section p { font-size: 14px; line-height: 1.55; color: #5a3a4a; }
  .meter {
    height: 8px; border-radius: 99px; background: #ffe0ea;
    overflow: hidden; margin-top: 6px; margin-bottom: 2px;
  }
  .meter > i {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, #ff9ebc, #ff5e8a);
    border-radius: 99px;
    transition: width .7s cubic-bezier(.22,1,.36,1);
  }
  .lucky { display: flex; gap: 10px; margin-top: 14px; }
  .lucky .pill {
    flex: 1; background: rgba(255,240,245,.85); border: 1px solid #ffd3e2;
    border-radius: 16px; padding: 12px 10px; text-align: center;
  }
  .lucky .pill .lab { font-size: 11px; color: #c79aab; }
  .lucky .pill .val { font-size: 16px; font-weight: 700; margin-top: 4px; color: #b04a72; }
  .lucky .swatch {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%;
    vertical-align: middle; margin-right: 4px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.06);
  }
  .drink {
    margin-top: 14px;
    background: linear-gradient(135deg, rgba(255,248,239,.9), rgba(255,232,241,.9));
    border: 1px solid #ffd9c8;
    border-radius: 16px;
    padding: 12px 14px;
  }
  .drink .head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 6px;
  }
  .drink h3 { font-size: 14px; font-weight: 700; color: #e75480; }
  .drink .badge {
    font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
    background: #fff; color: #b04a72; border: 1px solid #ffd3e2;
  }
  .drink .badge.suitable { background: #e8fff3; color: #1f8a5b; border-color: #b6efd0; }
  .drink .badge.caution { background: #fff6e5; color: #c47a12; border-color: #ffe0a8; }
  .drink .badge.skip { background: #eef5ff; color: #3b6ea5; border-color: #c9ddf7; }
  .drink p { font-size: 14px; line-height: 1.55; color: #5a3a4a; }
  .drink .drink-tip { margin-top: 6px; font-size: 13px; color: #8a5a70; }
  .tip {
    margin-top: 14px; background: linear-gradient(135deg, #fff5f8, #eef6ff);
    border-radius: 14px; padding: 12px 14px; font-size: 13px; color: #7c4a60;
    line-height: 1.5;
  }


  .toast {
    position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
    background: rgba(60, 30, 40, .92); color: #fff;
    font-size: 14px; padding: 12px 18px; border-radius: 99px;
    opacity: 0; pointer-events: none; transition: .25s ease; z-index: 70;
    max-width: min(90%, 420px); text-align: center;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  .loading, .error { text-align: center; padding: 40px 12px; color: #a0718a; font-size: 14px; }
  .error { color: #c2507d; }
  .foot { text-align: center; font-size: 11px; color: var(--soft); margin-top: 16px; padding-bottom: 4px; }

  .egg { cursor: pointer; display: inline-block; user-select: none; -webkit-user-select: none; }
  .egg.wiggle { animation: eggWiggle .45s ease; }
  .egg.bounce { animation: eggBounce .6s cubic-bezier(.3,1.6,.5,1); }
  @keyframes eggWiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
  @keyframes eggBounce { 0%,100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-12px) scale(1.12); } 70% { transform: translateY(2px) scale(.96); } }
  .burst { position: fixed; z-index: 45; pointer-events: none; font-size: 22px; animation: burstFly 1.3s ease-out forwards; }
  @keyframes burstFly { 0% { transform: translate(0,0) scale(.6); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot)); opacity: 0; } }


  @media (prefers-reduced-motion: reduce) {
    .egg.wiggle, .egg.bounce, .burst { animation: none !important; }
    html { scroll-behavior: auto; }
  }

  /* Wider tablets / desktop: still full-bleed atmosphere, content centered */
  @media (min-width: 768px) {
    .page { padding-top: 28px; padding-bottom: calc(40px + var(--safe-b)); }
    .page-inner { max-width: 760px; }
    .card { padding: 26px 28px 24px; }
    .topnav { gap: clamp(22px, 4vw, 42px); }
    .topnav a, .topnav button { font-size: 14px; padding: 8px 2px; }
  }

  /* iOS landscape / short viewport: compact */
  @media (orientation: landscape) and (max-height: 500px) {
    .topnav { padding-top: calc(var(--safe-t) + 6px); padding-bottom: 8px; gap: 16px; }
    .topnav a, .topnav button { font-size: 12px; padding: 4px 2px; }
    .page { padding-top: 10px; padding-bottom: calc(14px + var(--safe-b)); }
    .score-ring { width: 80px; height: 80px; }
    .score-num { font-size: 24px; }
    .card { padding: 14px 14px 12px; border-radius: 20px; }
    .section { margin-top: 10px; }
  }



/* Self-hosted latin display face (OFL). Chinese serif uses system 宋体 for China-friendly loading. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================================
   INK POSTER THEME (preview) — ink-black shell, site-wide
   Editorial refinement: Songti display + muted enamel accents
   ===================================================================== */
:root {
  --ink-bg: #1b1a19;
  --ink-raised: #221f1c;
  --cream: #f3eee4;
  --c-y: #c9a86a;
  --c-g: #7a9e88;
  --c-k: #e0b4c2;
  --c-o: #c86a4e;
  --heiti: "PingFang SC", "Heiti SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Songti", "SimSun", serif;
  --latin: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
html { background: var(--ink-bg); }
body.ink, body.ink[class*="wx-"], body.ink[class*="slot-"] {
  background: var(--ink-bg) !important;
  font-family: var(--heiti);
  --ink: #f3eee4; --muted: #b6b0a6; --soft: #8a8478; --pink: #e0b4c2;
  --glass: rgba(255,255,255,.05); --glass-strong: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.1); --shadow: 0 18px 48px rgba(0,0,0,.35);
  color: var(--cream);
}
body.ink::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(80% 55% at 50% 32%, rgba(255, 214, 170, 0.07), transparent 72%);
  transition: background .8s ease;
}
body.ink.slot-morning::before {
  background:
    radial-gradient(100% 70% at 50% -8%, rgba(255, 224, 196, .18), transparent 58%),
    radial-gradient(80% 50% at 100% 100%, rgba(170, 196, 214, .08), transparent 55%);
}
body.ink.slot-afternoon::before {
  background:
    radial-gradient(90% 60% at 50% 28%, rgba(255, 214, 170, .11), transparent 68%);
}
body.ink.slot-evening::before {
  background:
    radial-gradient(90% 70% at 50% 18%, rgba(255, 176, 130, .13), transparent 62%),
    radial-gradient(60% 45% at 50% 100%, rgba(160, 70, 50, .10), transparent 70%);
}
body.ink.slot-night::before {
  background:
    radial-gradient(46% 42% at 50% 54%, rgba(255, 196, 110, .20), transparent 68%),
    linear-gradient(180deg, rgba(0,0,0,.28) 0%, transparent 42%, rgba(0,0,0,.45) 100%);
}
body.ink::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .11;
  background-image: url("/grain.png");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}
body.ink .atmosphere, body.ink #wxCanvas, body.ink #wxFlash { display: none !important; }

/* nav: logo left, plain small links right */
body.ink .topnav {
  justify-content: flex-end;
  gap: clamp(12px, 2.6vw, 30px);
  padding: calc(var(--safe-t) + 16px) max(20px, calc(var(--safe-r) + 14px)) 14px max(20px, calc(var(--safe-l) + 14px));
  background: transparent !important;
}
body.ink .topnav::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,238,228,.14), transparent);
  pointer-events: none;
}
body.ink .topnav .logo {
  margin-right: auto; opacity: 1 !important;
  font-family: var(--latin); font-weight: 400; font-style: italic;
  font-size: 22px; letter-spacing: .06em;
  color: var(--c-o) !important;
}
body.ink .topnav .logo::after { display: none; }
body.ink .topnav a:not(.logo) {
  color: #b6b0a6 !important; opacity: .72; font-size: 13px; font-weight: 500; letter-spacing: .04em;
}
body.ink .topnav a.is-active:not(.logo) { color: var(--cream) !important; opacity: 1; font-weight: 500; }
body.ink .topnav a.is-active::after { height: 1px; opacity: .7; bottom: 1px; }
@media (max-width: 420px) {
  body.ink .topnav { gap: 11px; padding-left: max(16px, var(--safe-l)); padding-right: max(14px, var(--safe-r)); }
  body.ink .topnav a:not(.logo) { font-size: 12px; letter-spacing: 0; }
  body.ink .topnav .logo { font-size: 18px; }
}
@media (max-width: 350px) { body.ink .topnav a:not(.logo) { font-size: 11px; } body.ink .topnav { gap: 8px; } }
body.ink .preview-tag { background: rgba(228,87,46,.85); color: #fff; }

/* other pages readable on ink */
body.ink .hero h1 { color: var(--cream); font-family: var(--serif); font-weight: 700; }
body.ink .hero .sub, body.ink .wx-line { color: #bdb6a9; }
body.ink .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: var(--cream); box-shadow: none; }
body.ink .section h3, body.ink .drink h3, body.ink .score-num { color: var(--c-y); }

/* ---------- home poster ---------- */
body.ink .poster-page {
  min-height: calc(100dvh - 56px - var(--safe-t));
  padding: 0 max(16px, calc(var(--safe-r) + 12px)) 0 max(16px, calc(var(--safe-l) + 12px));
  display: flex; flex-direction: column;
  overflow: hidden;
}
.poster-stage {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 2vh 0 calc(clamp(96px, 20vh, 190px) + var(--safe-b));
  position: relative; z-index: 2;
}
.poster-content {
  width: 100%; max-width: 1100px;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.poster-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, min(8.6vw, 11.5vh), 104px);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--cream);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
body.ink.slot-evening .poster-h {
  font-family: var(--latin);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.poster-h .ln { display: block; white-space: nowrap; }

.poster-h .k { font-style: normal; }
.poster-h .p, .poster-h .dot { font-style: normal; color: var(--cream); margin-left: .04em; }
.k-y { color: var(--c-y) !important; }
.k-g { color: var(--c-g) !important; }
.k-k { color: var(--c-k) !important; }
.k-o { color: var(--c-o) !important; }
.k-c { color: var(--cream) !important; }
.poster-h .egg { cursor: pointer; color: inherit; display: inline-block; }
.poster-content .hs-heart-quiet {
  margin-top: clamp(14px, 3vh, 30px);
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: clamp(26px, 4.5vh, 40px); line-height: 1; color: var(--c-o);
  padding: 6px 10px; box-shadow: none;
  transition: transform .2s ease;
}
.poster-content .hs-heart-quiet:active { transform: scale(.9); }
.poster-content .hs-heart-quiet.pulse { animation: heartPop .5s ease; }
@keyframes heartPop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }


body.ink .hs-loading { color: #6f6a62; font-size: 40px; }


/* ---------- fortune page: ink poster derivative ---------- */
body.ink .fortune-page {
  padding-top: 8px;
  padding-bottom: calc(36px + var(--safe-b));
}
body.ink .fortune-inner { max-width: 560px; }
body.ink .fortune-hero {
  text-align: center;
  margin: 6px 0 22px;
  padding: 0 8px;
}
body.ink .fortune-accent {
  font-size: 18px;
  line-height: 1;
  color: var(--c-o);
  opacity: .85;
  margin-bottom: 10px;
  letter-spacing: .08em;
}
body.ink .fortune-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 9vw, 64px);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--cream);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
body.ink .fortune-body {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 4px 12px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--cream);
}
body.ink .fortune-body .loading,
body.ink .fortune-body .error {
  color: #8a8478;
}
body.ink .fortune-body .error { color: var(--c-o); }
body.ink .fortune-body .score-ring {
  background: conic-gradient(var(--c-o) var(--p, 0%), #2a2725 0);
}
body.ink .fortune-body .score-ring::after {
  background: #1b1a19;
  inset: 9px;
}
body.ink .fortune-body .score-num {
  color: var(--cream);
  font-weight: 700;
}
body.ink .fortune-body .score-lab { color: #a9a296; }
body.ink .fortune-body .meta .name {
  color: var(--cream);
  font-weight: 800;
  font-size: 18px;
}
body.ink .fortune-body .meta .zodiac { color: var(--c-k); }
body.ink .fortune-body .meta .bazi,
body.ink .fortune-body .meta .date { color: #8a8478; }
body.ink .fortune-body .section { margin-top: 16px; }
body.ink .fortune-body .section h3 {
  font-family: var(--heiti);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
body.ink .fortune-body .section p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  color: #e8e1d4;
}
body.ink .fortune-body .meter-n {
  font-weight: 700;
  font-size: 12px;
  opacity: .85;
}
body.ink .fortune-body .sec-overall h3 { color: var(--c-y); }
body.ink .fortune-body .sec-love h3,
body.ink .fortune-body .sec-love .meter-n { color: var(--c-k); }
body.ink .fortune-body .sec-career h3,
body.ink .fortune-body .sec-career .meter-n { color: var(--c-y); }
body.ink .fortune-body .sec-wealth h3,
body.ink .fortune-body .sec-wealth .meter-n { color: var(--c-o); }
body.ink .fortune-body .sec-health h3,
body.ink .fortune-body .sec-health .meter-n { color: var(--c-g); }
body.ink .fortune-body .meter {
  height: 7px;
  border-radius: 99px;
  background: #2a2725;
  overflow: hidden;
  margin: 6px 0 8px;
}
body.ink .fortune-body .sec-love .meter > i {
  background: linear-gradient(90deg, #c98aa3, var(--c-k));
}
body.ink .fortune-body .sec-career .meter > i {
  background: linear-gradient(90deg, #c9a43a, var(--c-y));
}
body.ink .fortune-body .sec-wealth .meter > i {
  background: linear-gradient(90deg, #c45a38, var(--c-o));
}
body.ink .fortune-body .sec-health .meter > i {
  background: linear-gradient(90deg, #247a56, var(--c-g));
}
body.ink .fortune-body .drink {
  margin-top: 18px;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(245,239,224,.1);
  border-radius: 0;
  padding: 14px 0 4px;
}
body.ink .fortune-body .drink h3 {
  color: var(--c-o);
  font-weight: 800;
  font-size: 14px;
}
body.ink .fortune-body .drink p,
body.ink .fortune-body .drink .drink-tip {
  color: #d9d2c4;
}
body.ink .fortune-body .drink .drink-tip {
  margin-top: 6px;
  font-size: 13px;
  color: #a9a296;
}
body.ink .fortune-body .drink .badge {
  background: #2a2725;
  color: var(--cream);
  border: 1px solid rgba(245,239,224,.16);
}
body.ink .fortune-body .drink .badge.suitable {
  background: rgba(46,157,110,.18);
  color: #7fd4a8;
  border-color: rgba(46,157,110,.4);
}
body.ink .fortune-body .drink .badge.caution {
  background: rgba(242,193,78,.16);
  color: var(--c-y);
  border-color: rgba(242,193,78,.35);
}
body.ink .fortune-body .drink .badge.skip {
  background: rgba(245,239,224,.06);
  color: #bdb6a9;
  border-color: rgba(245,239,224,.14);
}
body.ink .fortune-body .lucky { margin-top: 14px; gap: 10px; }
body.ink .fortune-body .lucky .pill {
  background: transparent;
  border: 1px solid rgba(245,239,224,.10);
  border-radius: 0;
  padding: 12px 8px;
}
body.ink .fortune-body .lucky .pill .lab { color: #8a8478; }
body.ink .fortune-body .lucky .pill .val {
  color: var(--cream);
  font-weight: 800;
}
body.ink .fortune-body .lucky .swatch {
  box-shadow: 0 0 0 2px #1b1a19, 0 0 0 3px rgba(245,239,224,.25);
}
body.ink .fortune-body .tip {
  margin-top: 16px;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(245,239,224,.1);
  border-radius: 0;
  padding: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #d9d2c4;
}
body.ink .fortune-page .foot {
  color: #6f6a62;
  margin-top: 18px;
  letter-spacing: .04em;
}
body.ink .fortune-page .wx-line { display: none !important; }
@media (min-width: 768px) {
  body.ink .fortune-body { padding: 10px 6px 14px; }
  body.ink .fortune-title { font-size: 64px; }
}


/* ---------- book cool: ink poster sticker ---------- */
body.ink .book-page-shell {
  min-height: calc(100dvh - 56px - var(--safe-t));
  padding: max(24px, 6vh) max(16px, var(--safe-r)) calc(56px + var(--safe-b)) max(16px, var(--safe-l));
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
}
body.ink .book-cool {
  width: 100%; max-width: 520px;
  margin: min(8vh, 64px) auto 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
}
body.ink .book-prompt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 5.4vw, 32px);
  letter-spacing: 0.04em;
  color: var(--cream);
  margin: 0;
}
body.ink .book-hint {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  color: #8a8478;
}
body.ink .book-sticker {
  margin-top: clamp(36px, 8vh, 64px);
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px; border-radius: 8px;
  box-shadow: none;
  transition: transform .25s ease;
  -webkit-tap-highlight-color: transparent;
}
body.ink .book-sticker:hover { transform: translateY(-2px); }
body.ink .book-sticker:active { transform: scale(.97); }
body.ink .book-sticker-img {
  display: block;
  width: min(200px, 52vw);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
  user-select: none; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
body.ink .book-sticker.is-open .book-sticker-img { transform: scale(.98); opacity: .92; }
body.ink .book-sticker.flipping .book-sticker-img {
  animation: bookStickerFlip .48s ease;
}
@keyframes bookStickerFlip {
  0% { transform: rotateY(0) scale(1); }
  45% { transform: rotateY(90deg) scale(.94); opacity: .35; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
body.ink .book-answer {
  margin-top: clamp(22px, 4vh, 34px);
  min-height: 1.4em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 7vw, 42px);
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--cream);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
  max-width: 18em;
}
body.ink .book-answer.show { opacity: 1; transform: none; }
body.ink .book-again {
  margin-top: 18px;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--heiti);
  font-size: 14px; font-weight: 600;
  letter-spacing: .14em;
  color: #a9a296;
  padding: 8px 4px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  box-shadow: none;
}
body.ink .book-again:hover { color: var(--cream); }
body.ink .book-again[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  body.ink .book-sticker.is-open .book-sticker-img { transform: scale(.98); opacity: .92; }
body.ink .book-sticker.flipping .book-sticker-img { animation: none; }
  body.ink .book-answer { transition: none; }
}
/* hide any leftover old book panel chrome if present */
body.ink .book-page-shell .book-panel,
body.ink .book-page-shell .wx-line,
body.ink .book-page-shell input { display: none !important; }

/* ---------- mood cool: ink poster ---------- */
body.ink .mood-page {
  min-height: calc(100dvh - 56px - var(--safe-t));
  padding: max(24px, 6vh) max(16px, var(--safe-r)) calc(56px + var(--safe-b)) max(16px, var(--safe-l));
  display: flex; align-items: center; justify-content: center;
}
body.ink .mood-cool {
  width: 100%; max-width: 520px;
  margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
body.ink .mood-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 10vw, 72px);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--cream);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
body.ink .mood-sub {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  color: #8a8478;
}
body.ink .mood-cta {
  margin-top: clamp(36px, 7vh, 56px);
  appearance: none; cursor: pointer;
  font-family: var(--heiti);
  font-size: clamp(15px, 3.8vw, 17px);
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--cream);
  background: transparent;
  padding: 14px 36px;
  border-radius: 999px;
  border: 1px solid rgba(243,238,228,.32);
  box-shadow: none;
  transition: transform .15s ease, opacity .15s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
body.ink .mood-cta:hover { filter: none; color: var(--c-o); border-color: var(--c-o); }
body.ink .mood-cta:active { transform: scale(.97); }
body.ink .mood-cta:disabled {
  opacity: .45; cursor: default; transform: none; filter: none;
  box-shadow: none;
}
body.ink .mood-status {
  margin-top: 18px;
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #bdb6a9;
}
body.ink .mood-note {
  margin-top: 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  color: #6f6a62;
  line-height: 1.7;
}
/* kill leftover pink mood-card chrome on ink */
body.ink .mood-page .card,
body.ink .mood-page .mood-card,
body.ink .mood-page .wx-line { display: none !important; }



/* ---------- night bunny lamp (homepage night slot) ---------- */
.night-lamp {
  position: relative;
  display: block;
  margin: clamp(10px, 2.2vh, 22px) auto 0;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px; width: clamp(120px, 28vw, 180px); height: auto;
  line-height: 0; box-shadow: none; z-index: 2;
  transition: transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.night-lamp img {
  position: relative; z-index: 1;
  width: 100%; height: auto; display: block;
  border-radius: 18px;
  user-select: none; pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(255, 170, 60, .38));
  transition: filter .35s ease, opacity .35s ease, transform .35s ease;
}
.night-lamp-glow {
  position: absolute; z-index: 0;
  left: 50%; top: 58%;
  width: 78%; height: 62%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,70,.55) 0%, rgba(255,140,40,.18) 42%, transparent 70%);
  filter: blur(10px);
  opacity: .85;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.night-lamp.is-on img {
  animation: lampBreathe 2.8s ease-in-out infinite;
}
.night-lamp.is-on .night-lamp-glow {
  animation: glowPulse 2.8s ease-in-out infinite;
}
.night-lamp.is-off img {
  filter: brightness(.55) saturate(.85) drop-shadow(0 6px 14px rgba(0,0,0,.35));
  opacity: .82;
  animation: none;
}
.night-lamp.is-off .night-lamp-glow {
  opacity: 0; animation: none;
}
.night-lamp:active { transform: scale(.96); }
.night-lamp.nudge { animation: lampNudge .55s ease; }
@keyframes lampBreathe {
  0%,100% { transform: scale(1); filter: drop-shadow(0 10px 22px rgba(255,170,60,.35)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 14px 28px rgba(255,190,70,.55)); }
}
@keyframes glowPulse {
  0%,100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes lampNudge {
  0%,100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-5deg) scale(1.04); }
  55% { transform: rotate(4deg) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .night-lamp.is-on img,
  .night-lamp.is-on .night-lamp-glow,
  .night-lamp.nudge { animation: none; }
}
