:root {
  color-scheme: light;
  --wall-ink: #28130e;
  --paper: #f9f0df;
  --paper-soft: #f4ead4;
  --paper-shadow: rgba(103, 60, 30, 0.18);
  --card-shadow: 0 48px 96px rgba(48, 20, 11, 0.18);
  --red-main: #b5372a;
  --red-deep: #8b201b;
  --green-main: #3e7a43;
  --green-deep: #234b2a;
  --ink: #55231a;
  --gold: #d5a24c;
  --line: rgba(138, 62, 36, 0.62);
  --soft-line: rgba(138, 62, 36, 0.24);
  --screen-bg:
    radial-gradient(circle at 18% 18%, rgba(255, 237, 198, 0.68), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(250, 219, 166, 0.4), transparent 22%),
    linear-gradient(180deg, #f7efe1 0%, #f2e7d3 100%);
  --theme-main: var(--red-main);
  --theme-deep: var(--red-deep);
  --theme-soft: rgba(181, 55, 42, 0.13);
  --theme-glow: rgba(181, 55, 42, 0.18);
  --calendar-form-image: url("./assets/form_red@2x.png?v=20260602ah");
  --calendar-form-x: -49px;
  --calendar-form-y: -71px;
  --calendar-form-width: 902px;
  --calendar-form-height: 1108px;
  --header-stripes:
    repeating-linear-gradient(
      90deg,
      rgba(255, 228, 170, 0.92) 0 12px,
      rgba(180, 43, 29, 0.9) 12px 24px
    );
  --topline-flourish-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 56'%3E%3Cpath d='M6 35c0-8 7-14 16-14 1 0 3 0 4 1 4-8 13-13 24-13 10 0 18 4 23 11 3-2 7-4 12-4 10 0 17 7 17 16 0 10-8 17-19 17H24C13 49 6 43 6 35Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 22c5 0 9 3 9 7 0 4-4 7-9 7-4 0-8-2-8-6 0-2 2-3 4-3 2 0 3 1 3 2 0 1-1 2-2 2' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M51 18c4 0 7 2 8 5 0 2-1 4-3 4-3 0-4-1-4-3 0-1 0-2 1-2' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --corner-flourish-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M38 4H4v34M14 4v10H4M24 4v20H4M38 14H28v10H18v10' fill='none' stroke='black' stroke-width='4' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  background: var(--screen-bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(6px, 1vw, 14px);
  display: grid;
  grid-template-rows: 1fr;
}

.utility-bar {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.brand-cn,
.brand-en {
  margin: 0;
}

.brand-cn {
  font-size: 24px;
  letter-spacing: 0.16em;
  color: var(--red-deep);
}

.brand-en {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(84, 38, 25, 0.58);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.action-chip {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(122, 50, 29, 0.16);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.82);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(111, 59, 36, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.action-chip:hover,
.action-chip:focus-visible,
.pager__button:hover,
.pager__button:focus-visible,
.drawer__close:hover,
.drawer__close:focus-visible,
.overlay-panel__close:hover,
.overlay-panel__close:focus-visible,
.calendar-action:hover,
.calendar-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(111, 59, 36, 0.12);
}

.action-chip--accent {
  background: linear-gradient(180deg, var(--theme-main), var(--theme-deep));
  color: #fff8ef;
  border-color: transparent;
}

.stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
}

.almanac-viewer {
  width: 100%;
  height: 100%;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.page-stack {
  position: relative;
  width: calc(820px * var(--page-scale, 1));
  height: calc(1114px * var(--page-scale, 1));
  max-width: 100%;
  perspective: 2600px;
  isolation: isolate;
}

.page-stack.is-fluid {
  width: min(100%, 560px);
  height: auto;
}

.blank-pager {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--blank-pager-top, 100vh);
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: auto;
}

.blank-pager__button {
  appearance: none;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  opacity: 0;
  cursor: pointer;
}

.blank-pager__button:focus-visible {
  outline: 0;
}

.calendar-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 820px;
  height: 1114px;
  --stack-shift-x: 18px;
  --stack-shift-y: 16px;
  --stack-edge-width: 22px;
  --stack-edge-height: 24px;
  --stack-edge-opacity: 0.46;
  --stack-secondary-opacity: 0.72;
  transform-origin: top left;
  transform-style: preserve-3d;
  transform: scale(var(--page-scale, 1)) rotateX(var(--card-tilt, 0deg));
  transition: transform 260ms ease;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.page-stack.is-fluid .calendar-card {
  width: 100%;
  height: auto;
  aspect-ratio: 0.736;
  transform: scale(var(--page-scale, 1)) rotateX(var(--card-tilt, 0deg));
}

.calendar-card::before,
.calendar-card::after {
  content: "";
  position: absolute;
  inset: 82px 18px -14px 18px;
  height: 89%;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(240, 223, 189, 0.96), rgba(228, 206, 166, 0.98)),
    repeating-linear-gradient(
      180deg,
      rgba(179, 146, 97, var(--stack-edge-opacity)) 0 1px,
      rgba(251, 245, 231, 0.92) 1px 7px
    ) right bottom / var(--stack-edge-width) calc(100% - var(--stack-edge-height)) no-repeat,
    repeating-linear-gradient(
      90deg,
      rgba(179, 146, 97, var(--stack-edge-opacity)) 0 1px,
      rgba(251, 245, 231, 0.92) 1px 8px
    ) left bottom / calc(100% - var(--stack-edge-width)) var(--stack-edge-height) no-repeat;
  box-shadow: 0 20px 42px rgba(80, 42, 21, 0.15);
  z-index: 0;
}

.calendar-card::before {
  transform: translate(var(--stack-shift-x), var(--stack-shift-y));
}

.calendar-card::after {
  inset: 88px 32px -24px 30px;
  transform: translate(
    calc(var(--stack-shift-x) * 0.56),
    calc(var(--stack-shift-y) * 0.56)
  );
  opacity: var(--stack-secondary-opacity);
}

.calendar-card.is-red {
  --theme-main: var(--red-main);
  --theme-deep: var(--red-deep);
  --theme-soft: rgba(181, 55, 42, 0.13);
  --theme-glow: rgba(181, 55, 42, 0.18);
  --calendar-form-image: url("./assets/form_red@2x.png?v=20260602ah");
}

.calendar-card.is-green {
  --theme-main: var(--green-main);
  --theme-deep: var(--green-deep);
  --theme-soft: rgba(62, 122, 67, 0.13);
  --theme-glow: rgba(62, 122, 67, 0.16);
  --calendar-form-image: url("./assets/form_green@2x.png?v=20260602ah");
}

.calendar-card.is-weekend,
.calendar-card.is-festival-day {
  --ink: var(--red-main);
  --theme-main: var(--red-main);
  --theme-deep: var(--red-deep);
  --theme-soft: rgba(181, 55, 42, 0.13);
  --theme-glow: rgba(181, 55, 42, 0.18);
}

.calendar-card.is-solar-term-day {
  --ink: var(--green-main);
  --theme-main: var(--green-main);
  --theme-deep: var(--green-deep);
  --theme-soft: rgba(62, 122, 67, 0.13);
  --theme-glow: rgba(62, 122, 67, 0.16);
}

.calendar-card.is-weekend :where(
  .calendar-paper,
  .calendar-paper *,
  .calendar-hanger__wish,
  .detail-cell__note,
  .bottom-strip,
  .bottom-strip *,
  .zodiac-mark__caption
),
.calendar-card.is-festival-day :where(
  .calendar-paper,
  .calendar-paper *,
  .calendar-hanger__wish,
  .detail-cell__note,
  .bottom-strip,
  .bottom-strip *,
  .zodiac-mark__caption
) {
  color: var(--red-main) !important;
}

.calendar-hanger {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
}

.calendar-hanger__board {
  position: relative;
  height: 112px;
  border-radius: 26px 26px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%),
    var(--header-stripes);
  border: 2px solid rgba(161, 57, 33, 0.18);
  overflow: hidden;
  box-shadow: 0 22px 36px rgba(84, 36, 24, 0.14);
}

.calendar-card.is-green .calendar-hanger__board {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%),
    repeating-linear-gradient(
      90deg,
      rgba(230, 242, 211, 0.95) 0 12px,
      rgba(73, 128, 72, 0.92) 12px 24px
    );
}

.calendar-hanger__pin {
  position: absolute;
  top: 30px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe3a2, #b77a2d 75%);
  box-shadow: inset 0 0 0 2px rgba(255, 241, 198, 0.5);
}

.calendar-hanger__pin--left {
  left: 28px;
}

.calendar-hanger__pin--right {
  right: 28px;
}

.calendar-hanger__rope {
  position: absolute;
  left: 50%;
  top: -12px;
  width: 88px;
  height: 58px;
  transform: translateX(-50%);
}

.calendar-hanger__rope::before,
.calendar-hanger__rope::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 40px 40px;
}

.calendar-hanger__rope::before {
  border: 9px solid transparent;
  border-top-color: #b83d2b;
  border-left-color: #b83d2b;
  border-right-color: #8e211c;
  border-bottom-color: transparent;
  transform: rotate(-3deg);
}

.calendar-hanger__rope::after {
  inset: 10px 12px auto;
  height: 20px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(77, 33, 24, 0.28), transparent 72%);
}

.calendar-card.is-green .calendar-hanger__rope::before {
  border-top-color: #3d7a42;
  border-left-color: #3d7a42;
  border-right-color: #234b2a;
}

.calendar-hanger__plaque {
  position: absolute;
  inset: 18px 102px 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(248, 216, 113, 0.95), rgba(228, 190, 72, 0.95));
  border-radius: 18px;
  border: 2px solid rgba(131, 64, 23, 0.22);
  box-shadow: inset 0 0 0 2px rgba(255, 239, 190, 0.4);
}

.calendar-card.is-green .calendar-hanger__plaque {
  background:
    linear-gradient(180deg, rgba(238, 225, 153, 0.94), rgba(225, 207, 117, 0.94));
}

.calendar-hanger__wish {
  font-size: 46px;
  letter-spacing: 0.18em;
  color: var(--theme-deep);
  text-shadow: 0 1px 0 rgba(255, 248, 227, 0.46);
}

.calendar-hanger__cloud {
  position: absolute;
  left: 18px;
  width: 52px;
  height: 24px;
  border: 2px solid rgba(155, 66, 36, 0.4);
  border-top-left-radius: 14px 12px;
  border-top-right-radius: 14px 12px;
  border-bottom: 0;
  opacity: 0.7;
}

.calendar-hanger__cloud::before,
.calendar-hanger__cloud::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(155, 66, 36, 0.4);
  border-radius: 999px;
}

.calendar-hanger__cloud::before {
  left: -2px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-right: 0;
  border-bottom: 0;
}

.calendar-hanger__cloud::after {
  right: -2px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-left: 0;
  border-bottom: 0;
}

.calendar-hanger__cloud--right {
  left: auto;
  right: 18px;
  transform: scaleX(-1);
}

.calendar-hanger__tear {
  position: relative;
  margin-top: -3px;
  height: 18px;
  background:
    radial-gradient(circle at 12px 0, transparent 12px, var(--paper) 13px) 0 0 / 26px 100% repeat-x;
  filter: drop-shadow(0 6px 7px rgba(98, 58, 33, 0.08));
}

.calendar-paper {
  position: absolute;
  inset: 70px 22px 0;
  padding: 58px 18px 52px;
  border-radius: 0 0 32px 32px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.55), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 18%),
    linear-gradient(180deg, var(--paper), var(--paper-soft));
  box-shadow: var(--card-shadow);
  overflow: hidden;
  backface-visibility: hidden;
}

.calendar-paper {
  z-index: 2;
}

.flip-sheet {
  position: absolute;
  inset: 0 auto auto 0;
  width: 820px;
  height: 1114px;
  z-index: 3;
  opacity: 0;
  display: none;
  pointer-events: none;
  transform: scale(var(--page-scale, 1));
  transform-origin: top left;
  transform-style: preserve-3d;
  perspective: 2600px;
  --flip-corner-x: 100%;
  --flip-edge-side: right;
  --flip-edge-offset: 0;
  --flip-shadow-x: -34px;
  --flip-shadow-angle: 90deg;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.flip-sheet.is-active {
  opacity: 1;
}

.flip-sheet.is-backward {
  --flip-corner-x: 0%;
  --flip-edge-side: left;
  --flip-edge-offset: 0;
  --flip-shadow-x: 34px;
  --flip-shadow-angle: 270deg;
}

.flip-sheet.is-red {
  --theme-main: var(--red-main);
  --theme-deep: var(--red-deep);
  --theme-soft: rgba(181, 55, 42, 0.13);
  --theme-glow: rgba(181, 55, 42, 0.18);
  --calendar-form-image: url("./assets/form_red@2x.png?v=20260602ah");
}

.flip-sheet.is-green {
  --theme-main: var(--green-main);
  --theme-deep: var(--green-deep);
  --theme-soft: rgba(62, 122, 67, 0.13);
  --theme-glow: rgba(62, 122, 67, 0.16);
  --calendar-form-image: url("./assets/form_green@2x.png?v=20260602ah");
}

.flip-sheet__leaf {
  position: absolute;
  inset: 70px 22px 0;
  border-radius: 0 0 32px 32px;
  transform-origin: var(--flip-corner-x) 0%;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter, clip-path;
  overflow: hidden;
  box-shadow:
    var(--flip-shadow-x) 38px 52px rgba(72, 36, 18, 0.2),
    0 10px 20px rgba(72, 36, 18, 0.12);
}

.flip-sheet__underlay {
  position: absolute;
  inset: 70px 22px 0;
  z-index: 0;
  border-radius: 0 0 32px 32px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.42), rgba(137, 76, 34, 0.1)),
    linear-gradient(180deg, var(--paper), var(--paper-soft));
  box-shadow:
    inset 0 16px 22px rgba(255, 255, 255, 0.28),
    0 18px 34px rgba(72, 36, 18, 0.16);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.flip-sheet__leaf::before {
  content: "";
  position: absolute;
  right: -6px;
  top: -8px;
  z-index: 4;
  width: 148px;
  height: 116px;
  border-radius: 0 0 0 68%;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.88), rgba(247, 231, 198, 0.84) 44%, transparent 46%),
    linear-gradient(45deg, transparent 0 42%, rgba(101, 54, 28, 0.18) 43%, rgba(255, 255, 255, 0.34) 55%, transparent 56%);
  opacity: 0;
  transform: translateZ(5px) rotate(0deg) scale(0.62);
  transform-origin: 100% 0;
  pointer-events: none;
}

.flip-sheet.is-backward .flip-sheet__leaf::before {
  right: auto;
  left: -6px;
  border-radius: 0 0 68% 0;
  transform-origin: 0 0;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.88), rgba(247, 231, 198, 0.84) 44%, transparent 46%),
    linear-gradient(135deg, transparent 0 42%, rgba(101, 54, 28, 0.18) 43%, rgba(255, 255, 255, 0.34) 55%, transparent 56%);
}

.flip-sheet__leaf::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -16px;
  z-index: 5;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(78, 40, 22, 0.22), rgba(78, 40, 22, 0.1) 36%, transparent 64%);
  opacity: 0;
  transform: translateZ(8px) scale(0.7);
  pointer-events: none;
}

.flip-sheet.is-backward .flip-sheet__leaf::after {
  right: auto;
  left: -18px;
}

.flip-sheet.is-corner-lift .flip-sheet__leaf::before {
  animation: tear-corner-curl 620ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-corner-lift .flip-sheet__leaf::before {
  animation-name: tear-corner-curl-backward;
}

.flip-sheet.is-corner-lift .flip-sheet__leaf::after {
  animation: tear-grip-shadow 620ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-corner-lift .flip-sheet__leaf::after {
  animation-name: tear-grip-shadow-backward;
}

.flip-sheet__tear-line {
  position: absolute;
  top: -16px;
  right: 0;
  z-index: 7;
  width: 40%;
  height: 84px;
  opacity: 0;
  transform: translateZ(12px);
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      transparent 0 24px,
      rgba(255, 255, 255, 0.76) 28px,
      rgba(92, 48, 24, 0.24) 36px,
      transparent 50px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(98, 55, 31, 0.26) 18px 20px,
      transparent 20px 36px
    );
  filter: drop-shadow(0 10px 12px rgba(72, 36, 18, 0.16));
}

.flip-sheet.is-backward .flip-sheet__tear-line {
  right: auto;
  left: 0;
  background:
    linear-gradient(
      180deg,
      transparent 0 24px,
      rgba(255, 255, 255, 0.76) 28px,
      rgba(92, 48, 24, 0.24) 36px,
      transparent 50px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(98, 55, 31, 0.26) 18px 20px,
      transparent 20px 36px
    );
  filter: drop-shadow(0 10px 12px rgba(72, 36, 18, 0.16));
}

.flip-sheet__finger-curl {
  position: absolute;
  right: -10px;
  top: -12px;
  z-index: 8;
  width: 178px;
  height: 134px;
  border-radius: 0 0 0 72%;
  opacity: 0;
  transform: translateZ(14px) scale(0.56);
  transform-origin: 100% 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.92), rgba(245, 226, 190, 0.9) 46%, transparent 48%),
    linear-gradient(45deg, transparent 0 48%, rgba(87, 47, 24, 0.2) 50%, rgba(255, 255, 255, 0.38) 57%, transparent 58%);
  box-shadow: -18px 22px 30px rgba(73, 38, 20, 0.14);
}

.flip-sheet.is-backward .flip-sheet__finger-curl {
  right: auto;
  left: -10px;
  border-radius: 0 0 72% 0;
  transform-origin: 0 0;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.92), rgba(245, 226, 190, 0.9) 46%, transparent 48%),
    linear-gradient(135deg, transparent 0 48%, rgba(87, 47, 24, 0.2) 50%, rgba(255, 255, 255, 0.38) 57%, transparent 58%);
  box-shadow: 18px 22px 30px rgba(73, 38, 20, 0.14);
}

.flip-sheet.is-horizontal-tear .flip-sheet__tear-line {
  animation: tear-line-sweep 1180ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-horizontal-tear .flip-sheet__tear-line {
  animation-name: tear-line-sweep-backward;
}

.flip-sheet.is-corner-lift .flip-sheet__finger-curl {
  animation: bottom-corner-lift 620ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-corner-lift .flip-sheet__finger-curl {
  animation-name: bottom-corner-lift-backward;
}

.flip-sheet__face {
  position: absolute;
  inset: 0;
  padding: 60px 20px 16px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.55), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 18%),
    linear-gradient(180deg, var(--paper), var(--paper-soft));
  box-shadow: var(--card-shadow);
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.flip-sheet__face--front {
  z-index: 2;
}

.flip-sheet__face--back {
  background:
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 244, 0.86), rgba(232, 211, 174, 0.98));
  transform: rotateY(180deg);
}

.flip-sheet__face--front::after,
.flip-sheet__face--back::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(135deg, transparent 0 58%, rgba(255, 255, 255, 0.34) 63%, rgba(91, 47, 25, 0.18) 70%, transparent 78%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(92, 45, 24, 0.1));
  opacity: 0.72;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.flip-sheet__face--back::after {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(139, 94, 52, 0.08) 0 1px,
      rgba(255, 255, 255, 0.08) 1px 6px
    ),
    linear-gradient(180deg, rgba(96, 52, 28, 0.08), rgba(255, 255, 255, 0.22));
  opacity: 0.8;
}

.flip-sheet__fold {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  width: 40%;
  height: 128px;
  opacity: 0;
  transform: translateZ(18px);
  transform-origin: 100% 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0, rgba(104, 55, 28, 0.18) 35%, rgba(255, 255, 255, 0.3) 74%, transparent 100%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.88), rgba(232, 211, 174, 0.84));
  mix-blend-mode: multiply;
  filter: blur(0.2px);
}

.flip-sheet.is-backward .flip-sheet__fold {
  right: auto;
  left: 0;
  transform-origin: 0 0;
}

.flip-sheet__ragged-edge {
  position: absolute;
  top: -8px;
  right: 0;
  z-index: 8;
  width: 40%;
  height: 30px;
  opacity: 0;
  transform: translateZ(28px);
  pointer-events: none;
  background:
    radial-gradient(circle at 7% 100%, transparent 0 7px, rgba(248, 235, 205, 0.96) 7.5px 12px, transparent 12.5px),
    radial-gradient(circle at 17% 0, transparent 0 5px, rgba(119, 69, 35, 0.22) 5.5px 8px, transparent 8.5px),
    radial-gradient(circle at 29% 100%, transparent 0 6px, rgba(248, 235, 205, 0.96) 6.5px 11px, transparent 11.5px),
    radial-gradient(circle at 43% 0, transparent 0 7px, rgba(119, 69, 35, 0.2) 7.5px 10px, transparent 10.5px),
    radial-gradient(circle at 58% 100%, transparent 0 5px, rgba(248, 235, 205, 0.96) 5.5px 9px, transparent 9.5px),
    radial-gradient(circle at 73% 0, transparent 0 6px, rgba(119, 69, 35, 0.2) 6.5px 10px, transparent 10.5px),
    linear-gradient(180deg, rgba(98, 55, 31, 0.22), rgba(255, 250, 236, 0.88), rgba(98, 55, 31, 0.12));
  background-size: 190px 100%, 210px 100%, 230px 100%, 205px 100%, 215px 100%, 225px 100%, 100% 100%;
  filter: drop-shadow(0 8px 8px rgba(72, 36, 18, 0.18));
}

.flip-sheet.is-backward .flip-sheet__ragged-edge {
  right: auto;
  left: 0;
}

.calendar-paper::before,
.flip-sheet__face::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    var(--calendar-form-image),
    radial-gradient(circle at 10% 12%, rgba(188, 135, 73, 0.08), transparent 18%),
    radial-gradient(circle at 82% 20%, rgba(188, 135, 73, 0.08), transparent 22%),
    radial-gradient(circle at 78% 84%, rgba(188, 135, 73, 0.08), transparent 16%),
    repeating-linear-gradient(
      180deg,
      transparent 0 24px,
      rgba(198, 145, 88, 0.015) 24px 25px
    );
  background-position:
    var(--calendar-form-x) var(--calendar-form-y),
    0 0,
    0 0,
    0 0,
    0 0;
  background-repeat:
    no-repeat,
    repeat,
    repeat,
    repeat,
    repeat;
  background-size:
    var(--calendar-form-width) var(--calendar-form-height),
    auto,
    auto,
    auto,
    auto;
  pointer-events: none;
  z-index: 0;
}

.calendar-paper::after {
  display: none;
}

.flip-sheet::after {
  content: "";
  position: absolute;
  inset: 70px 22px 0;
  border-radius: 0 0 32px 32px;
  background:
    radial-gradient(ellipse at 88% 88%, rgba(68, 32, 16, 0.24), transparent 32%),
    linear-gradient(90deg, transparent 0 58%, rgba(67, 32, 16, 0.2) 72%, rgba(67, 32, 16, 0.05) 84%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.flip-sheet.is-corner-lift::after {
  animation: corner-lift-shadow 620ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-corner-lift::after {
  animation-name: corner-lift-shadow-backward;
}

.flip-sheet.is-horizontal-tear::after {
  animation: tear-shadow-diagonal 1180ms cubic-bezier(0.18, 0.62, 0.16, 1) both;
}

.flip-sheet.is-backward.is-horizontal-tear::after {
  animation-name: tear-shadow-diagonal-backward;
}

@keyframes tear-corner-curl {
  0% {
    opacity: 0;
    transform: translateZ(5px) rotate(0deg) scale(0.58);
  }
  14% {
    opacity: 0.92;
  }
  52% {
    opacity: 0.88;
    transform: translate(-12px, 10px) translateZ(8px) rotate(-8deg) scale(0.98);
  }
  64% {
    opacity: 0.28;
    transform: translate(-26px, 18px) translateZ(8px) rotate(-13deg) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-44px, 22px) translateZ(8px) rotate(-16deg) scale(1.06);
  }
}

@keyframes tear-corner-curl-backward {
  0% {
    opacity: 0;
    transform: translateZ(5px) rotate(0deg) scale(0.58);
  }
  14% {
    opacity: 0.92;
  }
  52% {
    opacity: 0.88;
    transform: translate(12px, 10px) translateZ(8px) rotate(8deg) scale(0.98);
  }
  64% {
    opacity: 0.28;
    transform: translate(26px, 18px) translateZ(8px) rotate(13deg) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(44px, 22px) translateZ(8px) rotate(16deg) scale(1.06);
  }
}

@keyframes tear-grip-shadow {
  0% {
    opacity: 0;
    transform: translateZ(8px) scale(0.72);
  }
  18% {
    opacity: 0.52;
  }
  58% {
    opacity: 0.3;
    transform: translate(-16px, 18px) translateZ(8px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-24px, 28px) translateZ(8px) scale(1.18);
  }
}

@keyframes tear-grip-shadow-backward {
  0% {
    opacity: 0;
    transform: translateZ(8px) scale(0.72);
  }
  18% {
    opacity: 0.52;
  }
  58% {
    opacity: 0.3;
    transform: translate(16px, 18px) translateZ(8px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(24px, 28px) translateZ(8px) scale(1.18);
  }
}

@keyframes bottom-corner-lift {
  0% {
    opacity: 0;
    transform: translateZ(14px) scale(0.52) rotate(0deg);
  }
  16% {
    opacity: 0.95;
  }
  52% {
    opacity: 0.9;
    transform: translate(-12px, 14px) translateZ(14px) scale(1.04) rotate(-8deg);
  }
  64% {
    opacity: 0;
    transform: translate(-28px, 24px) translateZ(14px) scale(1.12) rotate(-14deg);
  }
  100% {
    opacity: 0;
    transform: translate(-28px, 24px) translateZ(14px) scale(1.12) rotate(-14deg);
  }
}

@keyframes bottom-corner-lift-backward {
  0% {
    opacity: 0;
    transform: translateZ(14px) scale(0.52) rotate(0deg);
  }
  16% {
    opacity: 0.95;
  }
  52% {
    opacity: 0.9;
    transform: translate(12px, 14px) translateZ(14px) scale(1.04) rotate(8deg);
  }
  64% {
    opacity: 0;
    transform: translate(28px, 24px) translateZ(14px) scale(1.12) rotate(14deg);
  }
  100% {
    opacity: 0;
    transform: translate(28px, 24px) translateZ(14px) scale(1.12) rotate(14deg);
  }
}

@keyframes tear-line-sweep {
  0% {
    opacity: 0;
    transform: translateX(8px) translateZ(12px);
  }
  12% {
    opacity: 0.88;
    transform: translateX(0) translateZ(12px);
  }
  68% {
    opacity: 0.74;
    transform: translateX(-136%) translateZ(12px);
  }
  96% {
    opacity: 0.18;
    transform: translateX(-248%) translateZ(12px);
  }
  100% {
    opacity: 0;
    transform: translateX(-260%) translateZ(12px);
  }
}

@keyframes tear-line-sweep-backward {
  0% {
    opacity: 0;
    transform: translateX(-8px) translateZ(12px);
  }
  12% {
    opacity: 0.88;
    transform: translateX(0) translateZ(12px);
  }
  68% {
    opacity: 0.74;
    transform: translateX(136%) translateZ(12px);
  }
  96% {
    opacity: 0.18;
    transform: translateX(248%) translateZ(12px);
  }
  100% {
    opacity: 0;
    transform: translateX(260%) translateZ(12px);
  }
}

@keyframes corner-lift-shadow {
  0% {
    opacity: 0;
    transform: translate(8px, 8px) scale(0.98);
  }
  30% {
    opacity: 0.46;
  }
  100% {
    opacity: 0.28;
    transform: translate(-8px, -10px) scale(0.96);
  }
}

@keyframes corner-lift-shadow-backward {
  0% {
    opacity: 0;
    transform: translate(-8px, 8px) scale(0.98);
  }
  30% {
    opacity: 0.46;
  }
  100% {
    opacity: 0.28;
    transform: translate(8px, -10px) scale(0.96);
  }
}

@keyframes tear-shadow-diagonal {
  0% {
    opacity: 0.2;
    transform: translate(0, 4px) scale(0.99);
  }
  70% {
    opacity: 0.32;
    transform: translate(0, 8px) rotate(0deg) scale(0.985);
  }
  100% {
    opacity: 0;
    transform: translate(-118px, 150px) rotate(-12deg) scale(0.88);
  }
}

@keyframes tear-shadow-diagonal-backward {
  0% {
    opacity: 0.2;
    transform: translate(0, 4px) scale(0.99);
  }
  70% {
    opacity: 0.32;
    transform: translate(0, 8px) rotate(0deg) scale(0.985);
  }
  100% {
    opacity: 0;
    transform: translate(118px, 150px) rotate(12deg) scale(0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-card,
  .action-chip,
  .pager__button,
  .drawer__close,
  .overlay-panel__close,
  .calendar-action {
    transition-duration: 1ms;
  }

  .flip-sheet.is-corner-lift::after,
  .flip-sheet.is-horizontal-tear::after,
  .flip-sheet.is-corner-lift .flip-sheet__leaf::before,
  .flip-sheet.is-corner-lift .flip-sheet__leaf::after,
  .flip-sheet.is-corner-lift .flip-sheet__finger-curl,
  .flip-sheet.is-horizontal-tear .flip-sheet__tear-line {
    animation: none;
  }
}

.topline,
.minor-labels,
.hero-area,
.detail-grid,
.bottom-strip {
  position: relative;
  z-index: 1;
}

.detail-grid {
  z-index: 7;
}

.release-notice {
  position: absolute;
  top: 22px;
  right: 44px;
  z-index: 8;
  display: none;
  align-items: center;
  min-height: 28px;
  padding: 0 12px 2px;
  border: 2px solid color-mix(in srgb, var(--theme-main) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, white);
  color: var(--theme-main);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--theme-main) 16%, transparent);
}

.release-notice.is-active {
  display: inline-flex;
}

.topline[role="button"],
.minor-labels[role="button"],
.hero-area__date[role="button"],
.detail-grid__header[role="button"],
.detail-cell[role="button"],
.yi-subcell[role="button"],
.mini-badge[role="button"] {
  cursor: pointer;
}

.topline[role="button"]:focus-visible,
.minor-labels[role="button"]:focus-visible,
.hero-area__date[role="button"]:focus-visible,
.detail-grid__header[role="button"]:focus-visible,
.detail-cell[role="button"]:focus-visible,
.yi-subcell[role="button"]:focus-visible,
.mini-badge[role="button"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-main) 28%, white);
  outline-offset: 4px;
}

.topline {
  display: grid;
  grid-template-columns: 1.26fr 0.82fr 1.26fr;
  gap: 2px;
  align-items: center;
  margin: 0 22px 6px;
  color: var(--theme-main);
}

.topline__month,
.topline__year,
.topline__lunar-month {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 4px solid transparent;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  white-space: nowrap;
}

.topline__text-offset {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  max-width: 100%;
}

.topline__text-offset > span {
  display: inline-block;
  max-width: 100%;
}

.topline__month {
  padding-inline: 14px;
  font-size: 50px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}

.topline__year {
  min-height: 80px;
  margin: -4px 0 -2px;
  z-index: 1;
  font-size: 76px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: transparent;
}

.topline__lunar-month {
  font-size: 50px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topline__month::before,
.topline__month::after,
.topline__lunar-month::before,
.topline__lunar-month::after {
  display: none;
}

.topline__month::before {
  left: -48px;
}

.topline__month::after {
  display: none;
}

.topline__lunar-month::before {
  right: -48px;
  transform: translateY(-50%) scaleX(-1);
}

.topline__lunar-month::after {
  display: none;
}

.topline__year::before {
  display: none;
}

.topline__year::after {
  display: none;
}

.minor-labels {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0 22px -14px;
  font-size: 17px;
  color: color-mix(in srgb, var(--theme-main) 76%, #5b2f20);
}

.minor-labels__left,
.minor-labels__right {
  display: grid;
  gap: 3px;
}

.minor-labels__right {
  text-align: right;
}

.hero-area {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 396px;
  margin-bottom: 2px;
}

.hero-area__poem {
  display: none;
  writing-mode: vertical-rl;
  text-orientation: upright;
  justify-self: center;
  align-self: center;
  font-size: 50px;
  line-height: 1.05;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--theme-main) 76%, #68412f);
}

.hero-area__date-wrap {
  --featured-date-left: calc(6% - 18px);
  --featured-title-center-x: calc(var(--featured-date-left) + 96px);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0 30px;
  overflow: visible;
  margin-top: -28px;
}

.hero-area__illustration {
  position: absolute;
  inset: 5% 4% 2%;
  display: grid;
  place-items: center;
  z-index: 0;
  color: color-mix(in srgb, var(--theme-main) 84%, #7c694f);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.hero-area__illustration.is-active {
  opacity: 0.34;
}

.hero-area__illustration.is-active.is-festival {
  opacity: 0.4;
}

.hero-area__illustration.is-active.is-image {
  inset: -26px 0 22px;
  opacity: 0.92;
}

.hero-area__asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: multiply;
  transform: none;
}

.hero-area__illustration.is-image.is-festival {
  background: transparent;
}

.hero-area__illustration.is-image.is-festival .hero-area__asset {
  filter: none;
  mix-blend-mode: multiply;
  opacity: 0.98;
}

.hero-area__illustration.is-image.is-solar-term .hero-area__asset {
  filter: none;
}

.hero-area__illustration[data-artwork="national-day"] {
  inset: 2% 1% 0;
}

.hero-area__illustration[data-artwork="labor-day"] {
  inset: 3% 2% 1%;
}

.hero-area__illustration svg {
  width: 100%;
  height: 100%;
}

.hero-area__event-title {
  position: absolute;
  inset: 12% 12% 14%;
  z-index: 3;
  display: grid;
  justify-items: center;
  align-content: end;
  padding: 0 18px 34px;
  margin: 0;
  color: color-mix(in srgb, var(--theme-main) 88%, #68412f);
  font-size: 88px;
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  white-space: nowrap;
  text-wrap: nowrap;
  overflow: visible;
  opacity: 0;
  transform: translateY(18px);
  text-shadow:
    0 1px 0 rgba(255, 248, 230, 0.34),
    0 8px 22px rgba(109, 63, 40, 0.08);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-area__event-title.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-area__watermark {
  position: absolute;
  inset: -1% 4% auto 4%;
  height: 96%;
  font-size: calc(520px * var(--watermark-font-scale, 1));
  line-height: 0.88;
  font-weight: 900;
  color: color-mix(in srgb, #8b7a68 18%, transparent);
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
  opacity: var(--watermark-opacity, 0.58);
  filter: blur(1.05px);
  transform:
    translate(var(--watermark-shift-x, 0), var(--watermark-shift-y, 0))
    scaleX(0.985);
  mix-blend-mode: multiply;
}

.hero-area__date {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  font-family: "Arial Black", "Helvetica Neue", "PingFang SC", sans-serif;
  font-size: calc(458px * var(--date-font-scale, 1));
  line-height: var(--date-line-height, 0.68);
  font-weight: 900;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--date-gap, 0px);
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--theme-main);
  transform: translate(calc(-50% + var(--date-shift-x, 0px)), calc(-50% + var(--date-shift-y, 18px))) scaleX(var(--date-scale-x, 1.06));
  transform-origin: center center;
  text-shadow:
    0 1px 0 rgba(255, 249, 238, 0.26),
    0 2px 3px rgba(102, 73, 54, 0.10);
  filter: drop-shadow(0 0.5px 0 rgba(255, 247, 236, 0.18));
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-area__date[role="button"]:hover {
  opacity: 0.92;
}

.hero-area__digit {
  display: block;
  line-height: inherit;
}

.hero-area__date-wrap.is-featured {
  margin-top: -18px;
}

.hero-area__date-wrap.is-featured .hero-area__illustration {
  inset: 18% 3% 0;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active {
  opacity: 0.68;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-festival {
  opacity: 0.82;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-image {
  inset: -26px 0 22px;
  opacity: 0.96;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-solar-term {
  inset: 18% 4% 2%;
  opacity: 0.72;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-image.is-solar-term {
  inset: -26px 0 22px;
  opacity: 0.9;
}

.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="labor-day"],
.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="national-day"],
.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="duanwu"] {
  inset: 18% 1% 0;
}

.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="new-year"] {
  inset: 16% 4% 0;
}

.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="solar-xiaoman"] {
  inset: 16% 0 0;
}

.hero-area__date-wrap.is-featured .hero-area__illustration[data-artwork="solar-xiaoman"].is-active {
  opacity: 0.84;
}

.hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-image {
  inset: -26px 0 22px;
}

.hero-area__date-wrap.is-featured .hero-area__watermark {
  opacity: 0;
}

.hero-area__date.is-featured {
  left: var(--featured-date-left);
  top: 8%;
  justify-content: flex-start;
  gap: 0;
  transform: none;
  transform-origin: top left;
  font-size: clamp(176px, 22vw, 224px);
  line-height: 0.88;
  text-shadow:
    0 1px 0 rgba(255, 249, 238, 0.28),
    0 5px 12px rgba(102, 73, 54, 0.09);
  filter: none;
}

.hero-area__date.is-featured.is-double {
  font-size: clamp(148px, 19vw, 188px);
}

.hero-area__date.is-featured.is-single {
  font-size: clamp(188px, 24vw, 234px);
}

.hero-area__date-wrap.is-featured.is-image .hero-area__event-title {
  inset: 60% auto auto var(--featured-title-center-x);
  width: min(58%, 340px);
  justify-items: center;
  align-content: start;
  padding: 0;
  color: color-mix(in srgb, var(--theme-main) 92%, #4b271b);
  font-size: 54px;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translate(-50%, 18px);
  transform-origin: center top;
}

.hero-area__date-wrap.is-featured.is-image .hero-area__event-title.is-active {
  transform: translate(-50%, 0);
}

.hero-area__date-wrap.is-featured.is-image .hero-area__date {
  left: var(--featured-date-left);
  top: 8%;
  color: color-mix(in srgb, var(--theme-main) 94%, #4b271b);
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-rows: 116px 306px;
  height: 422px;
  gap: 0;
  margin-top: -8px;
  border: 3px solid transparent;
  background: transparent;
}

.detail-grid__top {
  display: grid;
  grid-template-columns: 1.18fr 0.92fr 1.18fr;
  border-bottom: 3px solid transparent;
}

.detail-grid__body {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr 0.94fr 1.02fr 1.2fr;
}

.detail-grid__body::before,
.detail-grid__body::after {
  content: "";
  position: absolute;
  z-index: 20;
  background: var(--theme-main);
  pointer-events: none;
}

.detail-grid__body::before {
  top: 0;
  right: -3px;
  bottom: 0;
  width: 3px;
}

.detail-grid__body::after {
  display: none;
}

.detail-grid__top > .detail-grid__header,
.detail-grid__body > .detail-cell {
  min-width: 0;
  border-right: 3px solid transparent;
}

.detail-grid__top > .detail-grid__header:last-child,
.detail-grid__body > .detail-cell:last-child {
  border-right: 0;
}

.detail-grid::before,
.detail-grid::after {
  display: none;
}

.detail-grid::before {
  left: -20px;
}

.detail-grid::after {
  right: -20px;
  transform: scaleX(-1);
}

.detail-grid::before {
  display: none;
}

.detail-grid__header {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  min-height: 0;
  padding: 10px 10px 8px;
  overflow: hidden;
}

.detail-cell[role="button"]:hover {
  background: color-mix(in srgb, var(--theme-soft) 58%, transparent);
}

.detail-grid__header[role="button"]:hover {
  background: transparent;
}

.detail-grid__top > .detail-grid__header::before {
  content: "";
  position: absolute;
  inset: 3px 3px -2px;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

.detail-grid__top > .detail-grid__header[role="button"]:hover::before {
  background: color-mix(in srgb, var(--theme-soft) 58%, transparent);
}

.detail-grid__top > .detail-grid__header > * {
  position: relative;
  z-index: 1;
}

.detail-grid__header--lunar {
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  row-gap: 4px;
  padding: 8px 14px;
}

.detail-grid__header--solar {
  position: relative;
  text-align: center;
  align-content: center;
  padding: 8px 6px 0;
  overflow: hidden;
  z-index: 2;
}

.detail-grid__solar-art {
  position: absolute;
  inset: 9px 8px 10px;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--theme-main) 78%, #7d725e);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.detail-grid__solar-art.is-active {
  opacity: 0.24;
}

.detail-grid__solar-art svg {
  width: 100%;
  height: 100%;
}

.solar-fan {
  display: none;
}

.solar-fan__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  width: 100%;
  min-height: 100%;
  padding: 0 4px;
}

.detail-grid__headline {
  font-size: 62px;
  line-height: 0.98;
  font-weight: 800;
  color: var(--theme-main);
  white-space: nowrap;
}

.detail-grid__headline--small {
  margin-top: 0;
  max-width: 100%;
  font-size: 22px;
  line-height: 1.02;
  letter-spacing: 0;
  white-space: nowrap;
}

.detail-grid__headline--small.is-solar-term-today {
  font-size: 58px;
  line-height: 0.96;
  white-space: nowrap;
}

.detail-grid__header--lunar .detail-grid__headline {
  justify-self: center;
  margin-left: 0;
  font-size: 60px;
  line-height: 0.96;
}

.detail-grid__header--week .detail-grid__headline {
  justify-self: center;
  margin-right: 0;
  font-size: 60px;
  letter-spacing: 0.02em;
  line-height: 0.96;
}

.detail-grid__header--week .detail-grid__subline {
  justify-self: center;
  margin-right: 0;
  font-size: 26px;
}

.detail-grid__header--week {
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  row-gap: 4px;
  padding: 8px 14px;
}

.detail-grid__subline {
  max-width: 100%;
  margin-top: 0;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.06;
  white-space: nowrap;
}

.detail-grid__header--solar .detail-grid__subline {
  margin-top: 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--theme-main);
}

.detail-grid__header--solar .detail-grid__subline.is-empty {
  display: none;
}

.detail-grid__subline--latin {
  margin-top: 2px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.detail-cell {
  --cell-pad-inline: 7px;
  --divider-bleed: var(--cell-pad-inline);
  padding: 8px 7px 6px;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: hidden;
}

.detail-cell--fortune,
.detail-cell--yi,
.detail-cell--stems {
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  text-align: center;
}

.detail-cell--stems {
  gap: 2px;
  padding-top: 6px;
  padding-bottom: 4px;
}

.detail-cell--stems .triple-lines {
  gap: 2px;
}

.detail-cell--stems .stems-row,
.detail-cell--stems .constellation-block__row {
  font-size: 14px;
  line-height: 1.05;
}

.detail-cell--stems .zodiac-mark {
  min-height: 82px;
}

.detail-cell--stems .zodiac-mark__figure {
  width: auto;
  height: auto;
}

.detail-cell--stems .zodiac-mark__figures {
  width: 126px;
  height: 56px;
}

.detail-cell--stems .zodiac-mark__figure--day {
  width: 88px;
  height: 56px;
}

.detail-cell--stems .zodiac-mark__figure--chong {
  width: 44px;
  height: 36px;
}

.detail-cell--stems .zodiac-mark__caption {
  font-size: 12px;
  line-height: 1;
}

.detail-cell--stems .zodiac-mark__title {
  font-size: 12px;
}

.detail-cell--ji {
  --cell-pad-inline: 5px;
  grid-template-rows: 108px 50px 34px 34px;
  padding: 6px 5px 4px;
  align-content: start;
}

.detail-cell--ji .pill-title {
  width: 44px;
  height: 29px;
  padding: 0 4px 2px;
  font-size: 20px;
}

.detail-cell--ji .activity-list--compact {
  gap: 2px;
  align-content: start;
}

.detail-cell--ji .activity-tag {
  font-size: 16px;
  line-height: 1;
  color: var(--theme-main);
  -webkit-text-stroke: 0;
}

.detail-cell--ji .eight-words {
  gap: 1px 5px;
  align-content: start;
}

.detail-cell--ji .eight-words__item {
  font-size: 15px;
  line-height: 1;
}

.detail-cell--ji .hour-luck {
  padding: 1px 5px 0;
  display: grid;
  align-content: center;
  gap: 1px;
}

.detail-cell--ji .hour-luck__line {
  gap: 2px 4px;
}

.detail-cell--ji .hour-luck__tag {
  gap: 1px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.detail-cell--ji .mini-info-row {
  align-content: center;
  padding: 1px 5px 0;
}

.detail-cell--ji .mini-title {
  font-size: 12px;
  line-height: 1;
}

.detail-cell--ji .mini-value {
  font-size: 12px;
  line-height: 1.05;
}

.detail-cell--ji .lucky-number-row {
  padding: 1px 5px 0;
}

.detail-cell--ji .lucky-number-row .mini-title {
  font-size: 11px;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  font-size: 13px;
}

.detail-cell--ji .lucky-number__item {
  min-width: 0;
}

.detail-cell--fortune {
  justify-items: stretch;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
}

.detail-cell--yi {
  grid-template-rows: 48px 98px 48px minmax(0, 1fr);
  align-content: stretch;
}

.detail-cell--ji {
  --cell-pad-inline: 5px;
  grid-template-rows: 134px 58px 38px 43px;
  justify-items: stretch;
  text-align: center;
  gap: 1px;
  padding: 6px 5px 4px;
  align-content: start;
}

.detail-cell__title,
.mini-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--theme-main);
  line-height: 1;
  width: 100%;
  text-align: center;
}

.detail-cell__note {
  margin: 0;
  font-size: 16px;
  line-height: 1.22;
}

.fortune-list,
.triple-lines,
.eight-words,
.hour-luck,
.constellation-block {
  display: grid;
  gap: 4px;
  width: 100%;
}

.fortune-item,
.stems-row,
.hour-luck__line,
.constellation-block__row {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 16px;
  line-height: 1.14;
}

.detail-cell--fortune .fortune-item {
  grid-template-columns: 1fr auto;
  font-size: 23px;
  line-height: 1.12;
}

.detail-cell--fortune .fortune-list {
  gap: 11px;
  padding: 0 4px;
  align-content: start;
}

.detail-cell--fortune .detail-cell__title {
  text-align: center;
  font-size: 25px;
  margin-bottom: 3px;
}

.detail-cell--fortune .detail-cell__note {
  display: none;
}

.fortune-item span:last-child,
.stems-row span:last-child {
  font-weight: 700;
  color: color-mix(in srgb, var(--theme-main) 76%, #2f1f19);
}

.pill-title,
.mini-badge {
  justify-self: center;
  min-width: 38px;
  padding: 1px 10px 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid color-mix(in srgb, var(--theme-main) 44%, transparent);
  color: var(--theme-main);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 6px;
  align-content: start;
  width: 100%;
  justify-items: center;
}

.detail-cell--yi .activity-list {
  height: 98px;
  grid-auto-rows: auto;
  align-content: start;
  padding: 0 8px;
}

.detail-cell--yi .activity-list--single-state {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
}

.activity-list--compact {
  grid-template-columns: 1fr;
  gap: 6px;
}

.activity-tag {
  padding-bottom: 0;
  border-bottom: 0;
  width: 100%;
  text-align: center;
  font-size: 25px;
  line-height: 1.02;
  font-weight: 800;
  color: var(--ink);
  -webkit-text-stroke: 0.24px currentColor;
  text-shadow: 0 0 0 currentColor;
}

.detail-cell--yi .activity-tag {
  min-height: 0;
  display: grid;
  place-items: center;
  color: var(--theme-main);
  font-size: 21px;
  line-height: 1.04;
  -webkit-text-stroke: 0;
}

.detail-cell--yi .activity-list--single-state .activity-tag {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
  font-size: 26px !important;
  line-height: 1;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  word-break: keep-all;
  overflow-wrap: normal;
  justify-self: center;
}

.seal-badge {
  position: relative;
  justify-self: stretch;
  box-sizing: border-box;
  width: auto;
  height: 116px;
  display: grid;
  place-items: center;
  margin-inline: calc(var(--divider-bleed) * -1);
  margin-top: 8px;
  padding: 6px var(--divider-bleed) 0;
  color: var(--theme-main);
}

.seal-badge::before {
  display: none;
}

.bagua-chart {
  width: 100%;
  height: 100%;
  max-width: 154px;
  max-height: 108px;
  display: block;
}

.mini-badge {
  min-width: 66px;
  padding: 2px 14px 4px;
  font-size: 25px;
  letter-spacing: 0.08em;
}

.mini-badge-row {
  position: relative;
  justify-self: stretch;
  box-sizing: border-box;
  width: auto;
  height: 100%;
  margin-inline: calc(var(--divider-bleed) * -1);
  margin-top: 0;
  padding: 6px var(--divider-bleed) 0;
  display: grid;
  align-items: center;
  justify-items: center;
}

.mini-badge-row::before {
  display: none;
}

.detail-cell--yi .pill-title,
.detail-cell--yi .mini-badge {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 92px);
  height: 40px;
  margin-top: 0;
  padding: 0 8px 2px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.mini-badge[role="button"]:hover {
  background: color-mix(in srgb, var(--theme-soft) 74%, white);
}

.constellation-block {
  box-sizing: border-box;
  justify-self: stretch;
  width: auto;
  margin-inline: calc(var(--divider-bleed) * -1);
  padding: 3px var(--divider-bleed) 0;
  border-top: 3px solid transparent;
}

.zodiac-mark {
  margin-top: auto;
  min-height: 92px;
  border: 0;
  border-radius: 3px;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 20px;
  align-content: stretch;
  justify-items: center;
  justify-self: stretch;
  gap: 0;
  box-sizing: border-box;
  width: auto;
  margin-inline: calc(var(--divider-bleed) * -1);
  padding: 2px calc(var(--divider-bleed) + 2px) 3px;
  color: var(--theme-main);
  background: transparent;
}

.detail-cell--stems .triple-lines,
.detail-cell--stems .constellation-block,
.detail-cell--stems .zodiac-mark {
  border: 0;
  border-radius: 3px;
  background: transparent;
  transition: background-color 160ms ease;
}

.detail-cell--stems[role="button"]:hover {
  background: transparent;
}

.detail-cell--stems .triple-lines:hover,
.detail-cell--stems .constellation-block:hover,
.detail-cell--stems .zodiac-mark:hover {
  background-color: var(--theme-soft);
}

.zodiac-mark__title {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  padding: 0 4px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-main) !important;
  font-size: 20px;
  line-height: 1.08;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0;
}

.calendar-card .zodiac-mark__title {
  color: var(--theme-main) !important;
}

.zodiac-mark__figures {
  width: 128px;
  height: 58px;
  position: relative;
  align-self: center;
  justify-self: center;
}

.zodiac-mark__figure {
  display: block;
  background-color: var(--theme-main);
  -webkit-mask-image: var(--zodiac-mask);
  mask-image: var(--zodiac-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.zodiac-mark__figure--day {
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 92px;
  height: 58px;
}

.zodiac-mark__figure--chong {
  position: absolute;
  right: 0;
  bottom: 6px;
  width: 46px;
  height: 38px;
}

.zodiac-mark__caption {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-height: 20px;
  display: grid;
  place-items: center;
  padding: 1px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.zodiac-mark__fallback {
  color: var(--theme-main);
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
}

.zodiac-mark__fallback--day,
.zodiac-mark__fallback--chong {
  position: absolute;
  bottom: 0;
}

.zodiac-mark__fallback--day {
  left: 16px;
}

.zodiac-mark__fallback--chong {
  right: 8px;
  bottom: 4px;
  font-size: 28px;
}

.split-top {
  position: relative;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 0;
  justify-self: stretch;
}

.split-top::after {
  display: none;
}

.split-top__panel {
  display: grid;
  align-content: start;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.eight-words {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
}

.eight-words__item {
  padding-bottom: 0;
  border-bottom: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.hour-luck {
  box-sizing: border-box;
  justify-self: stretch;
  width: auto;
  margin-inline: calc(var(--divider-bleed) * -1);
  padding: 2px var(--divider-bleed);
  border-top: 3px solid transparent;
}

.hour-luck__line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.hour-luck__tag {
  display: inline-grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 3px;
  align-items: baseline;
  font-size: 14px;
}

.hour-luck__state {
  font-weight: 700;
  color: var(--theme-main);
}

.mini-info-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-self: stretch;
  box-sizing: border-box;
  width: auto;
  margin-inline: calc(var(--divider-bleed) * -1);
  gap: 0;
  padding: 1px var(--divider-bleed) 0;
  border-top: 3px solid transparent;
  text-align: center;
}

.mini-info-row::after {
  display: none;
}

.mini-info-box,
.lucky-number-row {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.mini-info-box {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  justify-items: center;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  text-align: center;
}

.mini-info-box:first-child {
  padding-right: 0;
}

.mini-value {
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 0;
  font-size: 18px !important;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.mini-value--numbers {
  font-weight: 700;
  letter-spacing: 0;
}

.lucky-number-row {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: stretch;
  align-content: center;
  justify-self: stretch;
  box-sizing: border-box;
  width: auto;
  margin-inline: calc(var(--divider-bleed) * -1);
  gap: 0;
  padding: 1px var(--divider-bleed) 0;
  border-top: 3px solid transparent;
}

.lucky-number-row .mini-title {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.lucky-number-row .mini-value--numbers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1px;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
}

.lucky-number__item {
  flex: 1 1 0;
  text-align: center;
}

.detail-grid__body > .detail-cell {
  padding-top: 14px;
  padding-bottom: 6px;
}

.detail-cell--fortune .fortune-list {
  gap: 8px;
}

.detail-cell--fortune .fortune-item {
  font-size: 21px;
  line-height: 1.06;
}

.detail-cell--fortune .detail-cell__title {
  font-size: 22px;
}

.detail-cell--fortune .seal-badge {
  height: 96px;
  margin-top: 4px;
}

.detail-cell--yi {
  grid-template-rows: 40px 84px 40px minmax(0, 1fr);
}

.detail-cell--yi .activity-list {
  height: 84px;
}

.detail-cell--yi .activity-tag {
  font-size: 20px;
}

.detail-cell--stems {
  grid-template-rows: 72px 36px 72px;
  gap: 3px;
}

.detail-cell--stems .triple-lines {
  align-content: start;
  gap: 1px;
}

.detail-cell--stems .stems-row,
.detail-cell--stems .constellation-block__row {
  font-size: 12px;
  line-height: 1;
}

.detail-cell--stems .constellation-block {
  padding-top: 2px;
}

.detail-cell--stems .zodiac-mark {
  min-height: 0;
  height: 72px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.detail-cell--stems .zodiac-mark__figure {
  width: auto;
  height: auto;
}

.detail-cell--stems .zodiac-mark__figures {
  width: 112px;
  height: 48px;
}

.detail-cell--stems .zodiac-mark__figure--day {
  width: 76px;
  height: 48px;
}

.detail-cell--stems .zodiac-mark__figure--chong {
  width: 38px;
  height: 31px;
}

.detail-cell--stems .zodiac-mark__title,
.detail-cell--stems .zodiac-mark__caption {
  font-size: 11px;
}

.detail-cell--ji {
  grid-template-rows: 102px 42px 28px 29px;
  gap: 2px;
  padding: 14px 5px 6px;
}

.detail-cell--ji .pill-title {
  width: 40px;
  height: 25px;
  font-size: 18px !important;
}

.detail-cell--ji .activity-list--compact {
  gap: 1px;
}

.detail-cell--ji .activity-tag {
  font-size: 14px;
  line-height: 1;
}

.detail-cell--ji .eight-words {
  gap: 1px 4px;
}

.detail-cell--ji .eight-words__item {
  font-size: 13px;
  line-height: 1;
}

.detail-cell--ji .hour-luck {
  padding-top: 0;
  padding-bottom: 0;
  align-content: center;
}

.detail-cell--ji .hour-luck__tag {
  font-size: 10px;
  line-height: 1;
}

.detail-cell--ji .mini-info-row,
.detail-cell--ji .lucky-number-row {
  padding-top: 0;
  padding-bottom: 0;
  align-content: center;
}

.detail-cell--ji .mini-title,
.detail-cell--ji .mini-value {
  font-size: 10px;
  line-height: 1;
}

.detail-cell--ji .lucky-number-row .mini-title {
  font-size: 10px;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  font-size: 11px;
  line-height: 1;
}

.detail-cell--ji .mini-title {
  font-size: 15px;
  line-height: 1.02;
}

.detail-cell--ji .mini-value {
  font-size: 14px;
  line-height: 1.08;
}

.detail-cell--ji .activity-tag {
  font-size: 19px;
}

.detail-cell--ji .eight-words__item {
  font-size: 17px;
}

.detail-cell--ji .activity-tag {
  font-size: 14px;
  line-height: 1;
}

.detail-cell--ji .eight-words__item {
  font-size: 13px;
  line-height: 1;
}

.detail-cell--ji .hour-luck__tag {
  font-size: 10px;
  line-height: 1;
}

.detail-cell--ji .mini-title,
.detail-cell--ji .mini-value {
  font-size: 10px;
  line-height: 1;
}

.detail-cell--ji .lucky-number-row .mini-title {
  font-size: 10px;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  font-size: 11px;
  line-height: 1;
}

.detail-grid__top > .detail-grid__header {
  padding-top: 24px;
}

.detail-grid__header--solar .solar-fan__content {
  transform: translateY(10px);
}

.detail-grid__header--lunar .detail-grid__headline,
.detail-grid__header--week .detail-grid__headline {
  transform: none;
}

.detail-grid__header--lunar .detail-grid__subline,
.detail-grid__header--week .detail-grid__subline {
  transform: none;
}

.detail-grid__header--solar .detail-grid__subline {
  margin-top: 10px;
}

.detail-grid__body > .detail-cell {
  padding-top: 22px;
}

.detail-grid__body > .detail-cell--fortune,
.detail-grid__body > .detail-cell--yi,
.detail-grid__body > .detail-cell--stems,
.detail-grid__body > .detail-cell--ji {
  padding: 0;
}

.detail-cell--fortune .detail-cell__title {
  font-size: 24px;
}

.detail-cell--fortune .fortune-list {
  gap: 12px;
  padding-top: 8px;
}

.detail-cell--fortune .fortune-item {
  font-size: 23px;
  line-height: 1.08;
}

.detail-cell--yi {
  grid-template-rows: 48px 98px 52px minmax(0, 1fr);
}

.detail-cell--yi .pill-title,
.detail-cell--yi .mini-badge {
  height: 42px;
  font-size: 25px;
}

.detail-cell--yi .activity-list {
  height: 98px;
  align-content: center;
}

.detail-cell--yi .activity-tag {
  font-size: 22px;
  line-height: 1.08;
}

.detail-cell--yi .mini-badge-row {
  align-items: center;
  padding-top: 0;
}

.detail-cell--yi .detail-cell__note {
  padding-top: 8px;
  font-size: 15px;
  line-height: 1.22;
}

.detail-cell--stems,
.detail-cell--ji {
  position: relative;
  display: block;
}

.detail-cell--ji {
  --ji-content-offset-y: -8px;
}

.detail-cell--stems {
  --stems-box-top: 10px;
  --stems-box-gap: 2px;
  --stems-triple-height: 116px;
  --stems-constellation-height: 54px;
  --stems-bottom-pad: 0px;
  --stems-constellation-top: calc(var(--stems-box-top) + var(--stems-triple-height) + var(--stems-box-gap));
  --stems-zodiac-top: calc(var(--stems-constellation-top) + var(--stems-constellation-height) + var(--stems-box-gap));
}

.detail-cell--stems .triple-lines {
  position: absolute;
  top: var(--stems-box-top);
  left: 10px;
  right: 14px;
  height: var(--stems-triple-height);
  align-content: center;
  gap: 3px;
}

.detail-cell--stems .constellation-block {
  position: absolute;
  top: var(--stems-constellation-top);
  left: 0;
  right: 0;
  height: var(--stems-constellation-height);
  display: grid;
  align-content: center;
  padding: 0 7px;
}

.detail-cell--stems .zodiac-mark {
  position: absolute;
  top: var(--stems-zodiac-top);
  left: 0;
  right: 0;
  height: calc(100% - var(--stems-zodiac-top) - var(--stems-bottom-pad));
  display: grid;
  align-content: center;
  margin: 0;
  padding: 4px 8px;
}

.detail-cell--stems .stems-row {
  grid-template-columns: max-content minmax(0, 1fr);
  justify-content: stretch;
  gap: 6px;
  color: var(--theme-main);
  font-size: 18px !important;
  line-height: 1.08;
  font-weight: 800;
}

.detail-cell--stems .constellation-block__row {
  grid-template-columns: max-content max-content;
  justify-content: center;
  gap: 10px;
  color: var(--theme-main);
  font-size: 18px !important;
  line-height: 1.08;
  font-weight: 800;
}

.detail-cell--stems .stems-row span,
.detail-cell--stems .constellation-block__row span {
  min-width: 0;
  color: inherit !important;
  white-space: nowrap;
}

.detail-cell--stems .stems-row span:first-child,
.detail-cell--stems .constellation-block__row span:first-child {
  text-align: left;
}

.detail-cell--stems .stems-row span:last-child {
  text-align: right;
}

.detail-cell--stems .constellation-block__row span:last-child {
  text-align: left;
}

.detail-cell--stems .zodiac-mark__title,
.detail-cell--stems .zodiac-mark__caption {
  font-size: 12px;
}

.detail-cell--stems .zodiac-mark__figure {
  width: auto;
  height: auto;
}

.detail-cell--stems .zodiac-mark__figures {
  width: 122px;
  height: 54px;
}

.detail-cell--stems .zodiac-mark__figure--day {
  width: 84px;
  height: 54px;
}

.detail-cell--stems .zodiac-mark__figure--chong {
  width: 42px;
  height: 34px;
}

.detail-cell--ji .split-top {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 112px;
}

.detail-cell--ji .split-top {
  transform: translateY(var(--ji-content-offset-y));
}

.detail-cell--ji .split-top__panel {
  align-content: center;
}

.detail-cell--ji .pill-title {
  width: 42px;
  height: 28px;
  font-size: 20px;
}

.detail-cell--ji .activity-list--compact {
  gap: 4px;
}

.detail-cell--ji .activity-tag {
  font-size: 18px;
  line-height: 1.04;
}

.detail-cell--ji .eight-words {
  height: 78px;
  align-content: space-evenly;
  gap: 3px 8px;
}

.detail-cell--ji .eight-words__item {
  font-size: 17px;
  line-height: 1;
}

.detail-cell--ji .hour-luck {
  position: absolute;
  top: 138px;
  left: 0;
  right: 0;
  height: 54px;
  display: grid;
  align-content: center;
  padding: 0 7px;
  gap: 4px;
}

.detail-cell--ji .hour-luck__line {
  gap: 4px 8px;
}

.detail-cell--ji .hour-luck__tag {
  font-size: 12px;
  line-height: 1.05;
}

.detail-cell--ji .mini-info-row {
  position: absolute;
  top: 196px;
  left: 0;
  right: 0;
  height: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
}

.detail-cell--ji .mini-info-box {
  padding: 2px 5px 1px;
}

.detail-cell--ji .mini-info-box:first-child {
  padding-right: 8px;
}

.detail-cell--ji .mini-info-box:last-child {
  padding-left: 8px;
}

.detail-cell--ji .mini-title,
.detail-cell--ji .mini-value {
  font-size: 12px;
  line-height: 1.05;
}

.detail-cell--ji .lucky-number-row {
  position: absolute;
  top: 238px;
  left: 0;
  right: 0;
  height: 52px;
  display: grid;
  align-content: center;
  padding: 0 8px;
}

.detail-cell--ji .lucky-number-row .mini-title {
  font-size: 12px;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1;
}

/* Final grid placement: align text to the baked border artwork. */
.minor-labels {
  margin-top: 12px;
  margin-bottom: -12px;
}

.detail-grid__top > .detail-grid__header {
  padding-top: 18px;
  padding-bottom: 8px;
}

.detail-grid__header--lunar .detail-grid__headline {
  font-size: 62px;
  transform: none;
}

.detail-grid__header--lunar .detail-grid__subline {
  justify-self: center;
  max-width: 100%;
  margin-top: 2px;
  margin-left: 0;
  color: var(--theme-main);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  transform: none;
}

.detail-grid__header--solar .detail-grid__headline--small {
  font-size: 24px;
}

.detail-grid__header--solar .detail-grid__headline--small.is-solar-term-today {
  font-size: 62px;
}

.detail-grid__header--solar .detail-grid__subline {
  margin-top: 2px;
  font-size: 20px;
}

.detail-grid__header--solar .solar-fan__content {
  position: absolute;
  inset: 18px 6px auto;
  min-height: 0;
  height: 74px;
  transform: none;
}

.detail-grid__header--week .detail-grid__headline {
  font-size: 62px;
  transform: none;
}

.detail-grid__header--week .detail-grid__subline {
  justify-self: center;
  margin-top: 2px;
  font-size: 22px;
  color: var(--theme-main);
  text-align: center;
  transform: none;
  line-height: 1;
}

.detail-cell--fortune .fortune-list {
  padding-top: 16px;
  gap: 14px;
}

.detail-cell--fortune {
  display: grid;
  grid-template-rows: 148px minmax(0, 1fr);
  gap: 0;
  align-content: stretch;
  justify-items: stretch;
  padding: 0;
  text-align: center;
  transform: none;
}

.fortune-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: stretch;
  align-content: center;
  overflow: hidden;
  cursor: pointer;
}

.fortune-panel::before {
  content: "";
  position: absolute;
  inset: 3px 3px -2px;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

.fortune-panel:hover::before {
  background: color-mix(in srgb, var(--theme-soft) 58%, transparent);
}

.fortune-panel > * {
  position: relative;
  z-index: 1;
}

.fortune-panel--directions {
  align-content: center;
  padding: 0 1px;
  transform: none;
}

.fortune-panel--directions .fortune-title {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: auto;
  min-width: 132px;
  height: 34px;
  margin-bottom: 0;
  padding: 0 4px 2px;
  color: var(--theme-main);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  transform: translateY(-5px);
}

.detail-cell--yi .pill-title,
.detail-cell--yi .mini-badge,
.detail-cell--ji .pill-title {
  font-size: 25px;
  line-height: 1;
}

.fortune-panel--directions .fortune-title {
  min-width: 0;
  width: max-content;
  height: 40px;
  padding: 0 11px 3px;
  border-radius: 999px;
  background: var(--theme-main);
  color: #fff !important;
  font-size: 31px !important;
  line-height: 1.08 !important;
  letter-spacing: 0;
  transform: none;
}

.fortune-panel--directions .fortune-list {
  padding: 8px 1px 0;
  gap: 3px;
  align-content: center;
  justify-items: center;
}

.fortune-panel--directions .fortune-item {
  width: fit-content;
  min-width: 124px;
  grid-template-columns: auto auto;
  justify-content: center;
  column-gap: 17px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.04;
}

.fortune-panel--directions .fortune-item,
.fortune-panel--directions .fortune-item span {
  color: var(--theme-main);
  font-family: inherit;
  font-weight: 800 !important;
  -webkit-text-stroke: 0;
}

.fortune-panel--directions .fortune-item > span {
  display: inline-block;
  min-width: 2em;
  text-align: center;
}

.fortune-panel--bagua {
  padding: 0 5px 12px;
}

.detail-cell--fortune .seal-badge {
  height: 124px;
  margin-top: 0;
  align-items: center;
}

.detail-cell--fortune .bagua-chart {
  max-width: 150px;
  max-height: 118px;
  transform: none;
}

.detail-cell--yi {
  --cell-pad-inline: 0px;
  display: grid;
  grid-template-rows: 154px minmax(0, 1fr);
  gap: 0;
  align-content: stretch;
  justify-items: stretch;
  padding: 0;
  text-align: center;
}

.detail-grid__body > .detail-cell--yi {
  padding: 0;
}

.yi-subcell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: center;
  overflow: hidden;
}

.yi-subcell::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

.yi-subcell[role="button"]:hover::before {
  background: color-mix(in srgb, var(--theme-soft) 58%, transparent);
}

.yi-subcell--auspicious::before {
  inset: 14px 6px 4px;
}

.yi-subcell > * {
  position: relative;
  z-index: 1;
}

.yi-subcell--activities {
  grid-template-rows: 40px minmax(0, 1fr);
  row-gap: 11px;
  align-content: start;
  padding: 22px 8px 10px;
  border-bottom: 3px solid transparent;
}

.yi-subcell--auspicious {
  grid-template-rows: 40px minmax(0, 1fr);
  row-gap: 9px;
  align-content: start;
  padding: 26px 12px 8px;
}

.detail-cell--yi .pill-title,
.detail-cell--yi .mini-badge {
  width: min(100%, 92px);
  height: 40px;
}

.yi-subcell--activities .pill-title {
  position: relative;
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0 10px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-main);
  font-size: 31px !important;
  line-height: 1.08 !important;
  letter-spacing: 0;
  overflow: visible;
  transform: none;
}

.yi-subcell--activities .pill-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 50px;
  height: 15px;
  border-bottom: 4px solid var(--theme-main);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.detail-cell--yi .activity-list {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 2px 7px 0;
  row-gap: 10.6px;
  column-gap: 6px;
  align-content: center;
}

.detail-cell--yi .mini-badge-row {
  height: auto;
  margin-inline: 0;
  padding: 0;
  transform: none;
}

.yi-subcell--auspicious .mini-badge-row {
  display: grid;
  place-items: center;
  width: 100%;
}

.yi-subcell--auspicious .mini-badge {
  position: relative;
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0 10px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-main);
  font-size: 31px !important;
  line-height: 1.08 !important;
  letter-spacing: 0;
  overflow: visible;
  transform: none;
}

.yi-subcell--auspicious .mini-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 68px;
  height: 15px;
  border-bottom: 4px solid var(--theme-main);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.detail-cell--yi .detail-cell__note {
  max-width: 100%;
  padding-top: 0;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--theme-main);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.yi-subcell--auspicious .detail-cell__note {
  align-self: start;
  color: var(--theme-main) !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.04;
  gap: 3px;
}

.auspicious-note__line {
  display: block;
  white-space: nowrap;
}

.detail-cell--stems {
  --stems-box-top: 18px;
  --stems-triple-height: 108px;
  --stems-constellation-height: 56px;
  --stems-bottom-pad: 0px;
}

.detail-cell--stems .triple-lines {
  left: 10px;
  right: 16px;
  width: auto;
}

.detail-cell--stems .constellation-block {
  margin: 0;
  width: auto;
}

.detail-cell--stems .zodiac-mark {
  align-content: stretch;
  justify-content: center;
  grid-template-rows: 28px 56px 20px;
  gap: 0;
  padding: 4px 5px;
  z-index: 6;
}

.detail-cell--stems .zodiac-mark__title {
  height: 28px;
  padding: 0 4px 1px;
  font-size: 20px;
}

.detail-cell--stems .zodiac-mark__figure {
  width: auto;
  height: auto;
}

.detail-cell--stems .zodiac-mark__figures {
  width: 166px;
  height: 56px;
}

.detail-cell--stems .zodiac-mark__figure--day {
  left: 7px;
  width: 98px;
  height: 52px;
  bottom: 2px;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.detail-cell--stems .zodiac-mark__figure--chong {
  right: 2px;
  bottom: 6px;
  width: 52px;
  height: 38px;
}

.detail-cell--stems .zodiac-mark__caption {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  align-self: center;
  width: 100%;
  min-height: 20px;
  padding: 0 4px;
  font-size: 12.4px;
}

.detail-cell--ji .split-top {
  top: 14px;
  height: 114px;
}

.detail-cell--ji .split-top__panel {
  position: relative;
  align-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 3px;
}

.detail-cell--ji .split-top__panel:first-child {
  grid-template-rows: 42px minmax(0, 1fr);
  align-content: start;
  gap: 3px;
  padding-top: 6px;
  overflow: hidden;
}

.detail-cell--ji .split-top__panel:nth-child(2) {
  grid-template-rows: 32px minmax(0, 1fr);
  align-content: stretch;
  gap: 3px;
  padding: 6px 7px 9px;
}

.detail-cell--ji[role="button"]:hover {
  background: transparent;
}

.detail-cell--ji .split-top__panel::before,
.detail-cell--ji .hour-luck::before,
.detail-cell--ji .mini-info-box::before,
.detail-cell--ji .lucky-number-row::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  background: transparent;
  pointer-events: none;
  transition: background-color 160ms ease;
}

.detail-cell--ji .split-top__panel:hover::before,
.detail-cell--ji .hour-luck:hover::before,
.detail-cell--ji .mini-info-box:hover::before,
.detail-cell--ji .lucky-number-row:hover::before {
  background: color-mix(in srgb, var(--theme-soft) 58%, transparent);
}

.detail-cell--ji .split-top__panel > *,
.detail-cell--ji .hour-luck > *,
.detail-cell--ji .mini-info-box > *,
.detail-cell--ji .lucky-number-row > * {
  position: relative;
  z-index: 1;
}

.detail-cell--ji .activity-list--compact {
  gap: 5px;
  align-content: start;
}

.detail-cell--ji .activity-tag {
  font-size: 17px;
  line-height: 1.05;
}

.detail-cell--ji .eight-words {
  width: 100%;
  height: auto;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  justify-content: stretch;
  row-gap: 4px;
  column-gap: 4px;
  padding-top: 0;
}

.detail-cell--ji .eight-words__item {
  color: var(--theme-main) !important;
  font-size: 18px !important;
  font-weight: 800;
  line-height: 1.02 !important;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .hour-luck {
  position: absolute;
  top: 150px;
  height: 56px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  row-gap: 2px;
  padding: 12px 8px 7px;
  margin: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--paper), var(--paper-soft));
  overflow: hidden;
  z-index: 2;
}

.detail-cell--ji .hour-luck::after {
  display: none;
}

.detail-cell--ji .hour-luck__line {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  width: 100%;
  min-width: 0;
  gap: 0;
  color: var(--theme-main) !important;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 0;
  transform: none;
}

.detail-cell--ji .hour-luck__cell {
  display: grid;
  place-items: center;
  min-width: 0;
  color: inherit !important;
  font-size: 19px !important;
  font-weight: 800;
  line-height: 1 !important;
  transform: scaleX(0.76);
  transform-origin: center;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .hour-luck__line--states .hour-luck__cell {
  font-size: 18px !important;
  transform: scaleX(0.8);
}

.detail-cell--ji .mini-info-row {
  top: 206px;
  height: 50px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  margin: 0;
  width: auto;
  padding: 0;
  background:
    linear-gradient(var(--theme-main), var(--theme-main)) top / 100% 3px no-repeat,
    linear-gradient(180deg, var(--paper-soft), var(--paper));
  z-index: 2;
}

.detail-cell--ji .mini-info-box {
  position: relative;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr);
  align-content: stretch;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 2px 5px 1px;
  border-radius: 0;
  overflow: hidden;
  transform: translateY(3px);
}

.detail-cell--ji .mini-info-box:first-child {
  padding-right: 5px;
}

.detail-cell--ji .mini-info-box:last-child {
  padding-left: 7px;
  border-left: 0;
}

.detail-cell--ji .mini-title,
.detail-cell--ji .mini-value {
  color: var(--theme-main) !important;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .split-top__panel:nth-child(2) > .mini-title,
.detail-cell--ji .mini-info-box > .mini-title {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  max-width: 100%;
  min-height: 18px;
  min-width: 0;
  padding: 0 5px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .mini-info-box > .mini-title {
  width: max-content;
  max-width: 100%;
  height: 18px;
  min-height: 0;
  padding: 0 6px 2px;
  border-radius: 999px;
  background: var(--theme-main);
  color: #fff !important;
  font-size: 15px !important;
  line-height: 1.05 !important;
  letter-spacing: 0;
}

.detail-cell--ji .mini-info-box > .mini-value {
  align-self: center;
  display: grid;
  place-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  font-size: 15px !important;
  font-weight: 800;
  line-height: 1 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

.detail-cell--ji .split-top__panel:nth-child(2) > .mini-title {
  width: max-content;
  max-width: 100%;
  min-height: 0;
  height: 32px;
  padding: 0 8px 2px;
  border-radius: 999px;
  background: var(--theme-main);
  color: #fff !important;
  font-size: 23px !important;
  font-weight: 900;
  line-height: 1.08 !important;
  letter-spacing: 0;
}

.detail-cell--ji .split-top__panel:first-child > .pill-title {
  position: relative;
  width: auto;
  min-width: 0;
  height: 42px;
  padding: 2px 10px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-main) !important;
  font-size: 31px !important;
  line-height: 1.08 !important;
  letter-spacing: 0;
  overflow: visible;
  transform: none;
}

.detail-cell--ji .split-top__panel:first-child > .pill-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 50px;
  height: 15px;
  border-bottom: 4px solid var(--theme-main);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.pill-title[style*="background"],
.mini-badge[style*="background"] {
  color: #fff !important;
}

.detail-cell--ji .lucky-number-row {
  position: absolute;
  top: 260px;
  height: 40px;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr);
  align-content: stretch;
  justify-items: stretch;
  gap: 1px;
  margin: 0;
  width: auto;
  padding: 0 7px 3px;
  border-radius: 3px;
  overflow: hidden;
}

.detail-cell--ji .lucky-number-row .mini-title {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  height: 16px;
  padding: 0 8px 2px;
  border-radius: 999px;
  background: var(--theme-main);
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 900;
  line-height: 1.08 !important;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  align-self: center;
  margin-top: 0;
  color: var(--theme-main) !important;
  font-size: 18px !important;
  font-weight: 900;
  line-height: 1 !important;
  -webkit-text-stroke: 0;
}

.detail-cell--ji .lucky-number-row .lucky-number__item {
  min-width: 0;
  font-size: inherit;
}

.split-top__panel:first-child {
  padding-right: 4px;
}

/* Desktop grid normalization: keep each sub-box inside its own printed cell. */
.detail-grid__top > .detail-grid__header {
  align-content: center;
  padding: 8px 12px;
}

.detail-grid__header--lunar {
  transform: translateY(-8px);
}

.detail-grid__header--week {
  transform: translate(-8px, -8px);
}

.detail-grid__header--lunar .detail-grid__headline,
.detail-grid__header--week .detail-grid__headline {
  transform: none;
}

.detail-grid__header--lunar .detail-grid__headline {
  transform: translateX(16px);
}

.detail-grid__header--lunar .detail-grid__subline {
  margin-top: 0;
  transform: none;
}

.detail-grid__header--solar .solar-fan__content {
  inset: 11px 6px auto;
  height: 82px;
}

.detail-grid__header--solar .detail-grid__subline {
  margin-top: 0;
  transform: translateY(0);
}

.detail-grid__header--week .detail-grid__subline {
  margin-top: 0;
  font-size: 28px;
  transform: none;
}

.detail-cell--fortune {
  grid-template-rows: 148px minmax(0, 1fr);
}

.fortune-panel--directions {
  padding: 9px 1px 10px;
  transform: translateY(1px);
}

.fortune-panel--directions .fortune-title {
  height: 40px;
}

.fortune-panel--directions .fortune-list {
  padding-top: 5px;
  gap: 3px;
}

.fortune-panel--bagua {
  align-content: center;
  padding: 8px 7px 14px;
}

.detail-cell--fortune .seal-badge {
  height: 136px;
  transform: translateY(-4px);
}

.detail-cell--yi {
  grid-template-rows: 142px minmax(0, 1fr);
}

.yi-subcell--activities {
  row-gap: 4px;
  padding: 13px 8px 11px;
}

.yi-subcell--activities .pill-title,
.yi-subcell--auspicious .mini-badge {
  height: 40px;
}

.detail-cell--yi .activity-list {
  padding-top: 0;
  row-gap: 8px;
}

.yi-subcell--auspicious {
  row-gap: 7px;
  padding: 17px 12px 10px;
}

.yi-subcell--auspicious .detail-cell__note {
  align-self: start;
  line-height: 1.02;
  gap: 2px;
}

.detail-cell--stems .triple-lines {
  top: -4px;
  height: 116px;
}

.detail-cell--stems {
  --stems-box-top: 10px;
  --stems-triple-height: 116px;
  --stems-constellation-height: 54px;
  --stems-bottom-pad: 0px;
}

.detail-cell--stems .constellation-block {
  top: calc(var(--stems-constellation-top) - 9px);
}

.detail-cell--stems .zodiac-mark {
  top: calc(var(--stems-zodiac-top) - 9px);
  grid-template-rows: 28px 56px 20px;
  padding: 3px 5px;
}

.detail-cell--stems .zodiac-mark__title {
  height: 28px;
}

.detail-cell--stems .zodiac-mark__figures {
  height: 56px;
}

.detail-cell--stems .zodiac-mark__figure--day {
  height: 52px;
}

.detail-cell--stems .zodiac-mark__caption {
  min-height: 20px;
}

.detail-cell--ji .split-top {
  top: 8px;
  height: 116px;
}

.detail-cell--ji .hour-luck {
  left: 0;
  right: 0;
  top: 137px;
  width: auto;
  height: 50px;
  padding: 9px 8px 7px;
  background: transparent;
}

.detail-cell--ji .mini-info-row {
  top: 191px;
  height: 46px;
  overflow: hidden;
  background: transparent;
}

.detail-cell--ji .mini-info-row::after {
  display: none;
}

.detail-cell--ji .mini-info-box {
  background: transparent;
  transform: none;
  padding-top: 4px;
  padding-bottom: 3px;
}

.detail-cell--ji .lucky-number-row {
  top: 236px;
  height: 66px;
  background: transparent;
  grid-template-rows: 20px minmax(0, 1fr);
  align-content: stretch;
  gap: 4px;
  padding: 4px 8px 8px;
}

.detail-cell--ji .lucky-number-row .mini-title {
  height: 18px;
}

.detail-cell--ji .lucky-number-row .mini-value--numbers {
  align-self: start;
}

.bottom-strip {
  position: absolute;
  --bottom-strip-line-width: 4px;
  left: 17px;
  right: 17px;
  bottom: 8px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  border: 0;
  padding: 8px 11px 6px;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  clip-path: inset(0);
  background: linear-gradient(180deg, var(--paper), var(--paper-soft));
  color: var(--theme-main);
  font-size: 17px;
  z-index: 5;
}

.bottom-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 0 var(--bottom-strip-line-width) var(--theme-main);
  pointer-events: none;
}

.bottom-strip > * {
  position: relative;
  z-index: 1;
}

.bottom-strip__center {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -8px 10px -6px;
  padding: 8px 12px 7px;
  border-left: var(--bottom-strip-line-width) solid var(--theme-main);
  border-right: var(--bottom-strip-line-width) solid var(--theme-main);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.bottom-strip__item {
  align-self: stretch;
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 4px 0;
  line-height: 1.08;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-strip__item--right {
  text-align: center;
}

.pager {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.pager__button,
.drawer__close,
.overlay-panel__close,
.calendar-action {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(120, 61, 34, 0.14);
  background: rgba(255, 252, 246, 0.88);
  color: var(--ink);
  cursor: pointer;
}

.pager__status {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.pager__status > span:first-child {
  font-size: 17px;
  font-weight: 700;
  color: var(--theme-main);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 247, 231, 0.72);
  cursor: pointer;
}

.pager__status > span:first-child:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-main) 28%, white);
  outline-offset: 6px;
  border-radius: 10px;
}

.pager__hint {
  font-size: 12px;
  color: rgba(78, 39, 24, 0.56);
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 50;
}

.drawer.is-open {
  display: grid;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 19, 13, 0.44);
  backdrop-filter: blur(7px);
}

.drawer__panel {
  position: relative;
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 26px 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(251, 246, 237, 0.98), rgba(242, 233, 215, 0.98));
  box-shadow: 0 34px 74px rgba(41, 19, 13, 0.3);
  overflow: auto;
  z-index: 1;
}

.drawer__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.drawer__eyebrow,
.drawer__title {
  margin: 0;
}

.drawer__eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(86, 43, 27, 0.56);
}

.drawer__title {
  font-size: 30px;
  line-height: 1.15;
  color: var(--ink);
}

.drawer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.task-chip {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(127, 63, 34, 0.14);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.task-chip.is-active {
  background: linear-gradient(180deg, var(--theme-main), var(--theme-deep));
  color: #fff8ef;
  border-color: transparent;
}

.drawer__result {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.task-card {
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(127, 63, 34, 0.1);
}

.task-card__date {
  font-size: 22px;
  font-weight: 700;
  color: var(--theme-main);
}

.task-card__meta {
  margin-top: 6px;
  font-size: 15px;
  color: rgba(78, 40, 26, 0.74);
}

.task-card__tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-card__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-main);
  font-size: 14px;
}

.overlay-panel {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

.overlay-panel.is-open {
  display: block;
}

.overlay-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 17, 12, 0.44);
  backdrop-filter: blur(8px);
}

.overlay-panel__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, calc(100vw - 32px));
  max-height: min(82vh, 920px);
  padding: 24px 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.98), rgba(241, 231, 214, 0.98));
  box-shadow: 0 38px 80px rgba(43, 23, 16, 0.3);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.overlay-panel__panel--date {
  width: min(520px, calc(100vw - 32px));
}

.overlay-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.overlay-panel__eyebrow,
.overlay-panel__title,
.overlay-panel__meta {
  margin: 0;
}

.overlay-panel__eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(86, 43, 27, 0.56);
}

.overlay-panel__title {
  font-size: 30px;
  line-height: 1.15;
  color: var(--ink);
}

.overlay-panel__meta {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(76, 39, 25, 0.8);
}

.calendar-field {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.calendar-field__label {
  font-size: 15px;
  font-weight: 700;
  color: rgba(76, 39, 25, 0.82);
}

.calendar-field__input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 61, 34, 0.16);
  background: rgba(255, 253, 247, 0.82);
  font: inherit;
  color: var(--ink);
}

.calendar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.calendar-action--soft {
  background: rgba(255, 255, 255, 0.68);
}

.calendar-action--strong {
  border-color: transparent;
  background: linear-gradient(180deg, var(--theme-main), var(--theme-deep));
  color: #fff8ef;
}

.calendar-presets {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.calendar-preset {
  width: 100%;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(127, 63, 34, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-preset.is-current {
  border-color: color-mix(in srgb, var(--theme-main) 48%, transparent);
  box-shadow: 0 12px 30px rgba(104, 48, 25, 0.08);
}

.calendar-preset__date {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-main);
}

.calendar-preset__meta {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(78, 39, 24, 0.74);
}

.detail-sheet {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.detail-sheet__section {
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(127, 63, 34, 0.1);
}

.detail-sheet__heading {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--theme-main);
}

.detail-sheet__copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(72, 37, 24, 0.86);
}

.detail-sheet__rows {
  display: grid;
  gap: 8px;
}

.detail-sheet__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
}

.detail-sheet__row-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(84, 43, 28, 0.52);
  text-transform: uppercase;
}

.detail-sheet__row-value {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(72, 37, 24, 0.86);
}

.detail-sheet__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-sheet__tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-main);
  font-size: 14px;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 4px;
  }

  .almanac-viewer {
    place-items: start center;
  }

  .utility-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .action-row {
    width: 100%;
    justify-content: center;
  }

  .action-chip {
    flex: 1 1 0;
    min-width: 0;
  }

  .calendar-hanger__board {
    height: 92px;
    border-radius: 20px 20px 10px 10px;
  }

  .calendar-hanger__pin {
    top: 20px;
    width: 16px;
    height: 16px;
  }

  .calendar-hanger__pin--left {
    left: 20px;
  }

  .calendar-hanger__pin--right {
    right: 20px;
  }

  .calendar-hanger__plaque {
    inset: 16px 70px 18px;
  }

  .calendar-hanger__wish {
    font-size: 34px;
  }

  .calendar-paper {
    --calendar-form-width: 930px;
    inset: 60px 12px 0;
    padding: 48px 14px 24px;
    border-radius: 0 0 24px 24px;
  }

  .flip-sheet__leaf,
  .flip-sheet::after {
    inset: 60px 12px 0;
    border-radius: 0 0 24px 24px;
  }

  .flip-sheet__face {
    padding: 50px 14px 20px;
  }

  .topline {
    margin: 0 16px 4px;
  }

  .topline__month,
  .topline__year,
  .topline__lunar-month {
    min-height: 58px;
    border-width: 3px;
  }

  .topline__text-offset {
    transform: translateY(10px);
  }

  .topline__year {
    min-height: 70px;
    font-size: 62px;
  }

  .topline__month,
  .topline__lunar-month {
    font-size: 48px;
  }

  .minor-labels {
    font-size: 14px;
    margin: 0 16px -8px;
    transform: translateY(24px);
  }

  .hero-area {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 372px;
  }

  .hero-area__date-wrap {
    --featured-date-left: calc(5% + 2px);
    --featured-title-center-x: calc(var(--featured-date-left) + 74px);
  }

  .hero-area__poem {
    font-size: 42px;
  }

  .hero-area__event-title {
    inset: 14% 8% 14%;
    padding-bottom: 26px;
    font-size: 62px;
  }

  .hero-area__date.is-featured {
    left: var(--featured-date-left);
    top: calc(12% + 20px);
    font-size: clamp(128px, 22vw, 170px);
  }

  .hero-area__date.is-featured.is-double {
    font-size: clamp(118px, 18vw, 152px);
  }

  .hero-area__date-wrap.is-featured .hero-area__illustration {
    inset: 24% 2% 2%;
  }

  .hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-image,
  .hero-area__date-wrap.is-featured .hero-area__illustration.is-active.is-image.is-solar-term {
    inset: -18px 0 -20px;
  }

  .hero-area__date-wrap.is-featured .hero-area__asset {
    height: 100%;
    transform: none;
  }

  .hero-area__date-wrap.is-featured.is-image .hero-area__event-title {
    inset: calc(60% + 20px) auto auto var(--featured-title-center-x);
  }

  .hero-area__date {
    --date-shift-y: 4px;
  }

  .detail-grid {
    width: 764px;
    height: 418px;
    grid-template-rows: 113px 305px;
    margin-top: 27px;
    margin-left: 3px;
  }

  .bottom-strip {
    left: 17px;
    right: auto;
    bottom: 8px;
    width: 764px;
  }

  .bottom-strip::before {
    border: 0;
    box-shadow: inset 0 0 0 var(--bottom-strip-line-width) var(--theme-main);
  }

  .detail-grid__body::before {
    display: none;
  }

  .detail-grid__top > .detail-grid__header {
    transform: translateY(18px);
  }

  .detail-grid__header--lunar .detail-grid__headline,
  .detail-grid__header--week .detail-grid__headline,
  .detail-grid__header--solar .detail-grid__headline--small.is-solar-term-today {
    font-size: 70px;
  }

  .detail-grid__header--solar .detail-grid__headline--small {
    font-size: 28px;
  }

  .detail-grid__header--lunar .detail-grid__subline,
  .detail-grid__header--week .detail-grid__subline,
  .detail-grid__header--solar .detail-grid__subline {
    font-size: 24px;
  }

  .detail-grid__top {
    grid-template-columns: 1.18fr 0.92fr 1.18fr;
  }

  .detail-grid__body {
    grid-template-columns: 1.04fr 0.94fr 1.02fr 1.2fr;
  }

  .detail-cell--fortune {
    grid-template-rows: 169px minmax(0, 1fr);
  }

  .detail-cell--yi {
    grid-template-rows: 169px minmax(0, 1fr);
  }

  .detail-cell--stems {
    --stems-box-top: 0px;
    --stems-triple-height: 134px;
    --stems-constellation-height: 54px;
    --stems-bottom-pad: 0px;
  }

  .detail-cell--stems .triple-lines {
    left: 8px;
    right: 10px;
    gap: 1px;
    align-content: center;
  }

  .detail-cell--stems .stems-row,
  .detail-cell--stems .constellation-block__row {
    font-size: 16px !important;
    line-height: 1.06;
  }

  .detail-cell--stems .constellation-block {
    top: var(--stems-constellation-top);
    padding: 3px 7px 0;
    transform: translateY(-5px);
  }

  .detail-cell--stems .zodiac-mark {
    top: var(--stems-zodiac-top);
  }

  .detail-cell--ji {
    --ji-content-offset-y: 0px;
    contain: paint;
    overflow: hidden;
  }

  .detail-cell--ji .split-top,
  .detail-cell--ji .split-top__panel,
  .detail-cell--ji .hour-luck,
  .detail-cell--ji .mini-info-row,
  .detail-cell--ji .lucky-number-row {
    max-width: 100%;
    overflow: hidden;
  }

  .detail-cell--ji .split-top {
    top: 0;
    height: 148px;
  }

  .detail-cell--ji .hour-luck {
    top: 148px;
    height: 60px;
  }

  .detail-cell--ji .mini-info-row {
    top: 208px;
    height: 46px;
  }

  .detail-cell--ji .lucky-number-row {
    top: 254px;
    height: 51px;
  }

  .fortune-panel--bagua {
    align-content: center;
    padding: 4px 7px 10px;
  }

  .detail-cell--fortune .seal-badge {
    height: 124px;
    transform: none;
  }

  .detail-cell--fortune .bagua-chart {
    max-width: 142px;
    max-height: 108px;
  }

  .yi-subcell--activities {
    row-gap: 3px;
    padding: 12px 8px 10px;
  }

  .detail-cell--yi .activity-list {
    row-gap: 7px;
  }

  .yi-subcell--auspicious {
    padding: 16px 12px 9px;
  }

  .detail-cell--ji .split-top__panel:first-child {
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 2px;
    padding-top: 8px;
  }

  .detail-cell--ji .split-top__panel:nth-child(2) {
    grid-template-rows: 26px minmax(0, 1fr);
    gap: 2px;
    padding: 8px 6px 8px;
  }

  .detail-cell--ji .split-top__panel:first-child > .pill-title {
    height: 34px;
    font-size: 25px !important;
  }

  .detail-cell--ji .split-top__panel:nth-child(2) > .mini-title {
    height: 24px;
    font-size: 19px !important;
  }

  .detail-cell--ji .activity-list--compact {
    gap: 3px;
  }

  .detail-cell--ji .activity-tag {
    font-size: 16px;
    line-height: 1.02;
  }

  .detail-cell--ji .eight-words {
    row-gap: 2px;
    column-gap: 3px;
  }

  .detail-cell--ji .eight-words__item {
    font-size: 16px !important;
  }

  .detail-cell--ji .hour-luck {
    padding: 7px 8px 6px;
    row-gap: 1px;
    transform: translateY(-5px);
  }

  .detail-cell--ji .hour-luck__cell {
    font-size: 16px !important;
  }

  .detail-cell--ji .hour-luck__line--states .hour-luck__cell {
    font-size: 15px !important;
  }

  .detail-cell--ji .mini-info-box {
    grid-template-rows: 15px minmax(0, 1fr);
    gap: 1px;
    padding-top: 5px;
    padding-bottom: 2px;
  }

  .detail-cell--ji .mini-info-box > .mini-title {
    height: 16px;
    min-height: 16px;
    padding: 0 5px 1px;
    border-radius: 999px;
    background: var(--theme-main);
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .detail-cell--ji .mini-info-box > .mini-value {
    font-size: 13px !important;
    line-height: 1.02 !important;
  }

  .detail-cell--ji .lucky-number-row {
    grid-template-rows: 15px minmax(0, 1fr);
    gap: 2px;
    padding: 5px 8px 5px;
  }

  .detail-cell--ji .lucky-number-row .mini-title {
    height: 14px;
    font-size: 14px !important;
  }

  .detail-cell--ji .lucky-number-row .mini-value--numbers {
    align-self: center;
    font-size: 14px !important;
  }

  .detail-grid__header--lunar {
    overflow: visible;
    transform: none;
  }

  .detail-grid__header--week {
    overflow: visible;
    transform: none;
  }

  .detail-grid__header--lunar .detail-grid__headline,
  .detail-grid__header--lunar .detail-grid__subline {
    transform: translate(24px, -16px) !important;
  }

  .detail-grid__header--week .detail-grid__headline,
  .detail-grid__header--week .detail-grid__subline {
    transform: translate(-24px, -16px) !important;
  }

  .detail-cell--stems .triple-lines {
    top: 0;
  }

  .detail-grid__subline,
  .detail-grid__subline--latin,
  .fortune-item,
  .stems-row,
  .constellation-block__row,
  .mini-value,
  .detail-cell__note {
    font-size: 18px;
  }

  .activity-tag {
    font-size: 24px;
  }

  .pill-title {
    font-size: 24px;
  }

  .detail-cell--ji .mini-info-box::before,
  .detail-cell--ji .mini-info-box:hover::before {
    display: none;
    background: transparent;
  }

  .detail-cell--stems .constellation-block {
    transform: translateY(-5px);
  }

  .detail-cell--ji .mini-info-box > .mini-title {
    height: 16px;
    min-height: 16px;
    padding: 0 5px 1px;
    border-radius: 999px;
    background: var(--theme-main);
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .detail-cell--ji .mini-info-box > .mini-value {
    font-size: 13px !important;
  }

  .pager {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .pager__status {
    grid-column: 1 / -1;
    order: -1;
  }

  .overlay-panel__panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 20px);
    padding: 22px 18px;
    border-radius: 24px;
    transform: none;
  }

  .overlay-panel__title {
    font-size: 24px;
  }

  .calendar-actions {
    grid-template-columns: 1fr;
  }

  .detail-sheet__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
