:root {
  --bottom-nav-height: 64px;
  --sh-lacquer: #8e1b1b;
  --sh-lacquer-rgb: 142, 27, 27;
  --sh-lacquer-deep: #4a0b0d;
  --sh-ink: #0e0a09;
  --sh-ink-rgb: 14, 10, 9;
  --sh-cinnabar: #c8312a;
  --sh-cinnabar-rgb: 200, 49, 42;
  --sh-leaf: #d8a93b;
  --sh-leaf-rgb: 216, 169, 59;
  --sh-leaf-deep: #8a6a22;
  --sh-paper: #f3e2c0;
  --sh-paper-rgb: 243, 226, 192;
  --sh-lacquer-fill: linear-gradient(180deg, var(--sh-lacquer), var(--sh-lacquer-deep));
  --sh-brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7C20 3 48 2 80 3.5S150 4 176 3.2C188 2.8 196 4 198 6C196 9 182 9.5 160 9.2S90 10 52 10.4C28 10.6 10 10.5 3 9.5C1 9 1 8 2 7Z' fill='black'/%3E%3C/svg%3E");
  --sh-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 12H18V0M30 0V12H48M0 36H18V48M30 48V36H48M18 12V36M30 12V36M18 24H30'/%3E%3C/g%3E%3C/svg%3E");
  --sh-corners:
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) left 8px top 8px / 16px 1px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) left 8px top 8px / 1px 16px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) right 8px top 8px / 16px 1px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) right 8px top 8px / 1px 16px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) left 8px bottom 8px / 16px 1px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) left 8px bottom 8px / 1px 16px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) right 8px bottom 8px / 16px 1px no-repeat,
    linear-gradient(var(--sh-leaf), var(--sh-leaf)) right 8px bottom 8px / 1px 16px no-repeat;
}

.sh-stage {
  --gold: var(--sh-leaf);
  --gold-rgb: var(--sh-leaf-rgb);
  --cream: var(--sh-paper);
  --cream-rgb: var(--sh-paper-rgb);
  --amber: var(--sh-cinnabar);
  --amber-rgb: var(--sh-cinnabar-rgb);
  --on-gold: var(--sh-paper);
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-pill: 4px;
}

.sh-backdrop {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(var(--sh-lacquer-rgb), 0.55), transparent 70%),
    linear-gradient(180deg, var(--sh-lacquer-deep), var(--sh-ink) 45%, var(--sh-ink));
}

.sh-backdrop::before,
.sh-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
}

.sh-backdrop::before {
  background: var(--sh-leaf);
  opacity: 0.08;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M30 38a4 4 0 1 1 8 0a8 8 0 1 1 -16 0a12 12 0 1 1 24 0c8 0 12 8 24 8h30'/%3E%3Cpath d='M59 26a3 3 0 1 1 6 0a6 6 0 1 1 -12 0a9 9 0 1 1 18 0c5 0 8 5 16 5h12'/%3E%3Cpath d='M104.8 89.2a3.2 3.2 0 1 1 6.4 0a6.4 6.4 0 1 1 -12.8 0a9.6 9.6 0 1 1 19.2 0c6.4 0 9.6 6.4 19.2 6.4h24.0'/%3E%3Cpath d='M128.0 79.6a2.4 2.4 0 1 1 4.8 0a4.8 4.8 0 1 1 -9.6 0a7.2 7.2 0 1 1 14.4 0c4.0 0 6.4 4.0 12.8 4.0h9.6'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M30 38a4 4 0 1 1 8 0a8 8 0 1 1 -16 0a12 12 0 1 1 24 0c8 0 12 8 24 8h30'/%3E%3Cpath d='M59 26a3 3 0 1 1 6 0a6 6 0 1 1 -12 0a9 9 0 1 1 18 0c5 0 8 5 16 5h12'/%3E%3Cpath d='M104.8 89.2a3.2 3.2 0 1 1 6.4 0a6.4 6.4 0 1 1 -12.8 0a9.6 9.6 0 1 1 19.2 0c6.4 0 9.6 6.4 19.2 6.4h24.0'/%3E%3Cpath d='M128.0 79.6a2.4 2.4 0 1 1 4.8 0a4.8 4.8 0 1 1 -9.6 0a7.2 7.2 0 1 1 14.4 0c4.0 0 6.4 4.0 12.8 4.0h9.6'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 160px 120px;
  mask-size: 160px 120px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}

.sh-backdrop::after {
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(5, 1, 1, 0.85) 100%);
}

.sh-stage {
  min-height: 100vh;
  position: relative;
  color: var(--cream);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.sh-app {
  position: relative;
  z-index: 10;
}

.sh-layout[hidden],
.sh-stage [hidden] {
  display: none !important;
}

.sh-eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--sh-cinnabar);
  box-shadow: inset 0 0 0 1px rgba(var(--sh-paper-rgb), 0.45);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sh-paper);
  transform: rotate(-2deg);
}

.sh-card {
  background:
    var(--sh-corners),
    linear-gradient(180deg, rgba(var(--sh-lacquer-rgb), 0.18), transparent 45%),
    rgba(var(--sh-ink-rgb), 0.94);
  border: 1px solid rgba(var(--gold-rgb), 0.55);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: inset 0 0 0 3px rgba(var(--sh-ink-rgb), 0.9), inset 0 0 0 4px rgba(var(--sh-lacquer-rgb), 0.85),
    0 16px 36px rgba(0, 0, 0, 0.55);
}

.sh-card-title {
  margin: 0 0 16px;
  padding-bottom: 8px;
  background: linear-gradient(90deg, var(--sh-cinnabar), rgba(var(--sh-cinnabar-rgb), 0)) left bottom / 96px 2px no-repeat;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  color: var(--gold);
}

.sh-card-title-center {
  text-align: center;
  background: linear-gradient(90deg, rgba(var(--sh-cinnabar-rgb), 0), var(--sh-cinnabar), rgba(var(--sh-cinnabar-rgb), 0)) center bottom / 160px 2px no-repeat;
}

.sh-field {
  display: block;
  margin-bottom: 16px;
}

.sh-label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(var(--cream-rgb), 0.8);
}

.sh-optional {
  margin-left: 4px;
  font-style: normal;
  font-weight: 500;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.55);
}

.sh-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  border-bottom-color: var(--gold);
  background: rgba(var(--sh-ink-rgb), 0.8);
  color: var(--cream);
  font: inherit;
  font-size: var(--fs-base);
  color-scheme: dark;
}

.sh-input::placeholder {
  color: rgba(var(--cream-rgb), 0.5);
}

.sh-time {
  position: relative;
  display: block;
}

.sh-time-clear {
  position: absolute;
  top: 50%;
  right: 44px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(var(--cream-rgb), 0.5);
  font-size: var(--fs-sm);
  cursor: pointer;
  transform: translateY(-50%);
}

.sh-time-clear:hover,
.sh-time-clear:focus-visible {
  color: var(--cream);
  background: rgba(var(--cream-rgb), 0.12);
}

.sh-time-clear:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.sh-time-clear[hidden] {
  display: none;
}

.sh-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.25);
}

.sh-input:disabled {
  opacity: 0.5;
}

select.sh-input option {
  background: rgb(26, 6, 6);
  color: var(--cream);
}

.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.sh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sh-btn[hidden] {
  display: none;
}

.sh-btn-primary {
  background: var(--sh-lacquer-fill);
  border-color: var(--gold);
  color: var(--on-gold);
  box-shadow: inset 0 0 0 3px rgba(var(--sh-ink-rgb), 0.35), inset 0 0 0 4px rgba(var(--gold-rgb), 0.45),
    0 8px 18px rgba(0, 0, 0, 0.5);
}

.sh-btn-ghost {
  background: rgba(var(--sh-ink-rgb), 0.6);
  border-color: rgba(var(--gold-rgb), 0.6);
  color: var(--gold);
}

.sh-btn-block {
  width: 100%;
}

.sh-error {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(var(--danger-rgb), 0.12);
  border: 1px solid rgba(var(--danger-rgb), 0.4);
  color: var(--danger);
  font-size: var(--fs-sm);
}

.sh-error[hidden] {
  display: none;
}

.sh-hint {
  margin: 4px 0 16px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.6);
}

.sh-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.72);
}

.sh-empty i {
  font-size: var(--fs-xl);
  color: var(--gold);
}

.sh-empty p {
  margin: 0;
}

.sh-empty[hidden],
.sh-result[hidden],
[data-view][hidden] {
  display: none;
}

.sh-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
}

.sh-loading i {
  display: block;
  margin-bottom: 12px;
  font-size: var(--fs-xl);
}

.sh-shio-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sh-shio-picker .shio-item {
  min-height: 80px;
  justify-content: center;
  padding: 8px 4px;
  gap: 4px;
}

.sh-shio-picker .shio-item .icon.hanzi {
  font-size: var(--fs-xl);
}

.sh-shio-picker .shio-item .name {
  font-size: var(--fs-xs);
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes counter-spin {
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

.bagua-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px auto;
  animation: spin 30s linear infinite;
  border-radius: 50%;
  border: 2px dashed rgba(var(--gold-rgb), 0.4);
  box-shadow: 0 0 30px rgba(var(--gold-rgb), 0.1), inset 0 0 20px rgba(var(--gold-rgb), 0.1);
}

.bagua-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--fs-2xl);
  color: var(--gold);
  text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.8);
  animation: counter-spin 30s linear infinite;
}

.trigram {
  position: absolute;
  font-size: var(--fs-lg);
  color: var(--gold);
  font-weight: bold;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 50%;
  top: 50%;
  margin-left: -16px;
  margin-top: -16px;
  text-shadow: 0 0 10px rgba(var(--gold-rgb), 0.5);
}

.t1 {
  transform: rotate(0deg) translate(48px) rotate(90deg);
}

.t2 {
  transform: rotate(45deg) translate(48px) rotate(90deg);
}

.t3 {
  transform: rotate(90deg) translate(48px) rotate(90deg);
}

.t4 {
  transform: rotate(135deg) translate(48px) rotate(90deg);
}

.t5 {
  transform: rotate(180deg) translate(48px) rotate(90deg);
}

.t6 {
  transform: rotate(225deg) translate(48px) rotate(90deg);
}

.t7 {
  transform: rotate(270deg) translate(48px) rotate(90deg);
}

.t8 {
  transform: rotate(315deg) translate(48px) rotate(90deg);
}

.shio-item {
  background: rgba(20, 5, 5, 0.8);
  border: 1px solid var(--maroon);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  color: var(--cream);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.shio-item:hover {
  border-color: var(--gold);
  background: rgba(80, 10, 10, 0.8);
}

.shio-item.selected {
  border-color: var(--gold);
  background: rgba(80, 10, 10, 0.8);
  box-shadow: 0 0 15px rgba(var(--gold-rgb), 0.4);
  transform: scale(1.05);
}

.shio-item .icon {
  font-size: var(--fs-2xl);
  line-height: 1;
}

.shio-item .icon.hanzi,
.icon-hanzi {
  font-family: "Noto Serif TC", "Cinzel", serif;
  font-size: var(--fs-2xl);
  background: linear-gradient(135deg, var(--gold), var(--flame));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.3);
  font-weight: bold;
}

.shio-item .name {
  font-family: "Noto Serif TC", serif;
  font-weight: bold;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.daily-card {
  background: rgba(20, 5, 25, 0.8);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-card:hover {
  transform: translateY(-5px);
}

.daily-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.daily-card-icon {
  font-size: var(--fs-xl);
}

.daily-card-name {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
}

.daily-card-status {
  font-weight: bold;
  font-size: var(--fs-md);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.daily-card-message {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  opacity: 0.9;
}

.daily-card-tip {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  font-size: var(--fs-sm);
  font-style: italic;
  color: #e0e0e0;
}

.daily-card-tip i {
  color: var(--gold);
  margin-right: 4px;
}

.status-good {
  border-color: rgba(76, 175, 80, 0.5);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.1);
}

.status-good .daily-card-name {
  color: var(--success);
}

.status-good .daily-card-status {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success);
}

.status-bad {
  border-color: rgba(244, 67, 54, 0.5);
  box-shadow: 0 5px 15px rgba(244, 67, 54, 0.1);
}

.status-bad .daily-card-name {
  color: var(--danger);
}

.status-bad .daily-card-status {
  background: rgba(244, 67, 54, 0.2);
  color: var(--danger);
}

.status-neutral {
  border-color: rgba(100, 149, 237, 0.5);
  box-shadow: 0 5px 15px rgba(100, 149, 237, 0.1);
}

.status-neutral .daily-card-name {
  color: #6495ed;
}

.status-neutral .daily-card-status {
  background: rgba(100, 149, 237, 0.2);
  color: #90caf9;
}

.fortune-card {
  background: linear-gradient(
    145deg,
    rgba(60, 10, 10, 0.9),
    rgba(20, 0, 0, 0.9)
  );
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(var(--gold-rgb), 0.1);
  animation: cardFadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.res-title {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-xl);
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.3);
  padding-bottom: 8px;
  text-shadow: 0 0 10px rgba(var(--gold-rgb), 0.5);
}

.res-fortune {
  font-size: var(--fs-md);
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--cream);
}

.res-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
}

.meta-box {
  text-align: center;
  font-weight: bold;
  color: var(--gold);
  animation: cardFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 0.14s;
}

.fortune-highlights {
  margin-bottom: 24px;
  background: linear-gradient(
    90deg,
    rgba(var(--gold-rgb), 0.1) 0%,
    rgba(20, 5, 5, 0.5) 100%
  );
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.highlight-item {
  margin: 0 0 12px 0;
  font-size: var(--fs-base);
  line-height: 1.5;
}

.highlight-item:last-child {
  margin-bottom: 0;
}

.highlight-item i {
  color: var(--gold);
  margin-right: 4px;
}

.fortune-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
  text-align: left;
}

.category-box {
  background: linear-gradient(145deg, rgba(40, 5, 5, 0.7), rgba(20, 2, 2, 0.9));
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  animation: cardFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.category-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(var(--gold-rgb), 0.2);
  border-color: rgba(var(--gold-rgb), 0.8);
  background: linear-gradient(
    145deg,
    rgba(60, 10, 10, 0.8),
    rgba(30, 5, 5, 0.9)
  );
}

.category-box h3 {
  margin: 0 0 8px 0;
  color: var(--gold);
  font-size: var(--fs-md);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed rgba(var(--gold-rgb), 0.2);
  padding-bottom: 4px;
}

.category-box p {
  margin: 0;
  font-size: var(--fs-base);
  opacity: 0.9;
  line-height: 1.5;
}

::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.flatpickr-calendar {
  background: rgba(15, 5, 25, 0.95) !important;
  border: 1px solid rgba(var(--gold-rgb), 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--amber) !important;
  border-color: var(--gold) !important;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--gold) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--gold) !important;
}

.flatpickr-day:hover {
  background: rgba(var(--gold-rgb), 0.2) !important;
  border-color: transparent !important;
}

.flatpickr-calendar.hasTime.noCalendar {
  width: auto !important;
  padding: 8px !important;
  background: rgba(20, 5, 25, 0.95) !important;
  border: 1px solid rgba(var(--gold-rgb), 0.5) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(var(--gold-rgb), 0.2) !important;
  border-radius: var(--radius-md);
}

.flatpickr-time {
  background: transparent !important;
  border-top: none !important;
  height: 60px !important;
  line-height: 60px !important;
  max-height: 60px !important;
  display: flex !important;
  align-items: center !important;
}

.flatpickr-time .numInputWrapper {
  height: 100% !important;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
  color: var(--gold) !important;
  font-size: var(--fs-lg) !important;
  font-family: "Noto Serif TC", serif !important;
  font-weight: bold !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.3s;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:hover {
  background: rgba(var(--gold-rgb), 0.1) !important;
  color: var(--amber) !important;
}

.flatpickr-time .flatpickr-time-separator {
  color: var(--gold) !important;
  font-size: var(--fs-lg) !important;
  font-weight: bold !important;
}

.flatpickr-time .numInputWrapper span {
  border: 1px solid rgba(var(--gold-rgb), 0.2) !important;
  border-radius: var(--radius-sm);
}

.flatpickr-time .numInputWrapper span:hover {
  background: rgba(var(--gold-rgb), 0.3) !important;
}

.flatpickr-time .numInputWrapper span.arrowUp:after {
  border-bottom-color: var(--gold) !important;
}

.flatpickr-time .numInputWrapper span.arrowDown:after {
  border-top-color: var(--gold) !important;
}

@keyframes cardFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.daily-card.animate-in {
  animation: cardFadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

.daily-error {
  color: var(--danger);
  text-align: center;
}

.daily-pillar {
  background: linear-gradient(145deg, rgba(20, 10, 4, 0.7), rgba(0, 0, 0, 0.8));
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius-md);
  padding: 24px 24px;
  margin: 0 auto 28px;
  max-width: 900px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.pillar-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pillar-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 3px solid rgba(var(--gold-rgb), 0.5);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  text-align: center;
}

.pillar-box.officer-good {
  border-top-color: var(--success);
  background: linear-gradient(180deg, rgba(var(--success-rgb), 0.12), rgba(255, 255, 255, 0.02));
}

.pillar-box.officer-bad {
  border-top-color: var(--danger);
  background: linear-gradient(180deg, rgba(var(--danger-rgb), 0.12), rgba(255, 255, 255, 0.02));
}

.pillar-label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.pillar-hanzi {
  display: block;
  font-size: var(--fs-xl);
  color: var(--gold);
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.35);
}

.pillar-value {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

.pillar-meaning {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-sm);
  font-style: italic;
  line-height: 1.6;
  text-align: center;
  margin: 16px 0;
}

.yiji-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.yiji-col {
  border-radius: var(--radius-md);
  padding: 16px 16px;
}

.yiji-yi {
  background: rgba(var(--success-rgb), 0.08);
  border: 1px solid rgba(var(--success-rgb), 0.25);
}

.yiji-ji {
  background: rgba(var(--danger-rgb), 0.08);
  border: 1px solid rgba(var(--danger-rgb), 0.25);
}

.yiji-col h4 {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 8px;
}

.yiji-yi h4 {
  color: var(--success);
}

.yiji-ji h4 {
  color: var(--danger);
}

.yiji-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yiji-col li {
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding: 4px 0 4px 16px;
  position: relative;
}

.yiji-col li::before {
  content: "\2022";
  position: absolute;
  left: 3px;
  opacity: 0.6;
}

.daily-card-element {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-card-element.element-good {
  background: rgba(var(--success-rgb), 0.1);
  border-color: rgba(var(--success-rgb), 0.3);
}

.daily-card-element.element-bad {
  background: rgba(var(--danger-rgb), 0.1);
  border-color: rgba(var(--danger-rgb), 0.3);
}

.element-badge {
  color: var(--gold);
  font-weight: 600;
}

.element-arrow {
  color: rgba(255, 255, 255, 0.55);
}

.element-rel {
  color: rgba(255, 255, 255, 0.8);
}

.daily-pillar.animate-in .pillar-box,
.daily-pillar.animate-in .pillar-meaning,
.daily-pillar.animate-in .yiji-col {
  animation: cardFadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

.daily-pillar.animate-in .pillar-box:nth-child(1) {
  animation-delay: 0s;
}

.daily-pillar.animate-in .pillar-box:nth-child(2) {
  animation-delay: 0.06s;
}

.daily-pillar.animate-in .pillar-box:nth-child(3) {
  animation-delay: 0.12s;
}

.daily-pillar.animate-in .pillar-box:nth-child(4) {
  animation-delay: 0.18s;
}

.daily-pillar.animate-in .pillar-meaning {
  animation-delay: 0.24s;
}

.daily-pillar.animate-in .yiji-col:nth-child(1) {
  animation-delay: 0.3s;
}

.daily-pillar.animate-in .yiji-col:nth-child(2) {
  animation-delay: 0.36s;
}

@media (prefers-reduced-motion: reduce) {
  .daily-card.animate-in,
  .daily-pillar.animate-in .pillar-box,
  .daily-pillar.animate-in .pillar-meaning,
  .daily-pillar.animate-in .yiji-col {
    animation: none;
    opacity: 1;
  }
}

.board-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(3, 1, 0, 0.78);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.board-overlay.board-open {
  opacity: 1;
}

.board-overlay.board-closing {
  opacity: 0;
  transition: opacity 0.34s ease 0.08s;
}

.board-modal {
  position: relative;
  width: 100%;
  max-width: 900px;
  transform-origin: center center;
}

.board-overlay.board-open .board-modal {
  animation: boardUnfurl 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.board-overlay.board-closing .board-modal {
  animation: boardFurl 0.42s cubic-bezier(0.55, 0, 0.85, 0.35) both;
}

.board-modal::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: 2px;
  margin-top: -1px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--gold-rgb), 0.95),
    rgba(255, 248, 220, 1),
    rgba(var(--gold-rgb), 0.95),
    transparent
  );
  box-shadow: 0 0 22px rgba(var(--gold-rgb), 0.8);
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
  pointer-events: none;
}

.board-overlay.board-open .board-modal::before {
  animation: boardSeam 0.7s ease-out both;
}

.board-overlay.board-closing .board-modal::before {
  animation: boardSeamOut 0.42s ease-in both;
}

.board-close {
  position: absolute;
  top: -14px;
  right: -8px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  background: rgba(12, 6, 2, 0.95);
  color: var(--gold);
  font-size: var(--fs-base);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.board-close::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
}

.board-close:hover {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(var(--gold-rgb), 0.45);
}

.board-countdown {
  height: 3px;
  margin: 8px auto 0;
  max-width: 220px;
  border-radius: var(--radius-pill);
  background: rgba(var(--gold-rgb), 0.12);
  overflow: hidden;
}

.board-countdown-bar {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.9), rgba(var(--danger-rgb), 0.9));
  transform-origin: left center;
  transform: scaleX(0);
}

.board-countdown-bar.counting {
  animation: boardCountdown linear forwards;
}

@keyframes boardCountdown {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

body.board-locked {
  overflow: hidden;
}

.daily-board {
  margin: 0;
  padding: 20px 24px;
  box-sizing: border-box;
  background: linear-gradient(145deg, rgba(20, 10, 4, 0.7), rgba(0, 0, 0, 0.8));
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.board-open .board-title,
.board-open .podium-card,
.board-open .board-row,
.board-open .board-note {
  animation: boardItemRise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.board-open .board-title {
  animation-delay: 0.3s;
}

.board-open .podium-card {
  animation-name: boardPodiumRise;
  animation-delay: 0.38s;
}

.board-open .podium-card.place-2 {
  animation-delay: 0.34s;
}

.board-open .podium-card.place-3 {
  animation-delay: 0.46s;
}

.board-open .board-row {
  animation-delay: calc(0.5s + var(--row-index, 0) * 0.04s);
}

.board-open .board-note {
  animation-delay: 0.92s;
}

@keyframes boardItemRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes boardPodiumRise {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.9);
  }
  65% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.board-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: var(--gold);
  text-align: center;
  margin: 0 0 16px;
}

.board-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.podium-card.place-1 {
  border-color: rgba(var(--gold-rgb), 0.6);
  background: rgba(var(--gold-rgb), 0.08);
}

.podium-medal,
.star-icon {
  font-size: var(--fs-md);
  line-height: 1;
}

.podium-hanzi {
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--gold);
}

.podium-name {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: var(--cream);
}

.podium-status {
  font-size: var(--fs-2xs);
  line-height: 1.35;
  color: rgba(var(--cream-rgb), 0.6);
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.board-row {
  display: grid;
  grid-template-columns: 16px 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid rgba(var(--cream-rgb), 0.2);
}

.board-row.tier-dasar {
  border-left-color: rgba(var(--danger-rgb), 0.5);
}

.board-rank {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.5);
  text-align: right;
}

.board-hanzi {
  font-size: var(--fs-base);
  color: var(--gold);
  text-align: center;
}

.board-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.board-name {
  font-size: var(--fs-xs);
  color: var(--cream);
}

.board-name,
.board-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-status {
  font-size: var(--fs-2xs);
  color: rgba(var(--cream-rgb), 0.5);
}

.board-note {
  font-size: var(--fs-2xs);
  line-height: 1.55;
  color: rgba(var(--cream-rgb), 0.42);
  margin: 12px 0 0;
  text-align: center;
}

.daily-icon-tappable {
  cursor: pointer;
  display: inline-block;
  user-select: none;
  -webkit-user-select: none;
  transition: text-shadow 0.3s ease;
}

.daily-icon-tappable:hover {
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.55);
}

.daily-icon-tappable.tap-pulse {
  animation: iconTapPulse 0.35s cubic-bezier(0.34, 1.4, 0.5, 1);
}

@keyframes iconTapPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
    text-shadow: 0 0 26px rgba(var(--gold-rgb), 0.8);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes boardUnfurl {
  0% {
    opacity: 0;
    transform: scaleX(0.55) scaleY(0.02);
    filter: blur(3px);
  }
  28% {
    opacity: 1;
    transform: scaleX(1) scaleY(0.03);
    filter: blur(0);
  }
  62% {
    transform: scaleX(1) scaleY(1.05);
  }
  82% {
    transform: scaleX(0.995) scaleY(0.98);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}

@keyframes boardFurl {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
  35% {
    transform: scaleX(1.02) scaleY(1.03);
  }
  100% {
    opacity: 0;
    transform: scaleX(0.6) scaleY(0.02);
    filter: blur(3px);
  }
}

@keyframes boardSeam {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }
  22% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  55% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes boardSeamOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(1);
  }
  55% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-overlay,
  .board-overlay.board-closing {
    transition: opacity 0.2s ease;
  }

  .board-overlay.board-open .board-modal,
  .board-overlay.board-closing .board-modal,
  .board-overlay.board-open .board-modal::before,
  .board-overlay.board-closing .board-modal::before,
  .board-open .board-title,
  .board-open .podium-card,
  .board-open .board-row,
  .board-open .board-note {
    animation: none;
  }
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  background: rgba(var(--sh-ink-rgb), 0.6);
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  border-radius: var(--radius-pill);
  color: var(--cream);
  font-family: inherit;
  font-size: var(--fs-sm);
  padding: 8px 16px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.choice-chip:hover {
  border-color: var(--gold);
}

.choice-chip.active {
  background: var(--sh-lacquer-fill);
  border-color: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
}

.destiny-gender {
  display: flex;
  gap: 12px;
}

.destiny-gender-btn {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius-md);
  color: var(--cream);
  padding: 12px;
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all 0.3s;
  box-sizing: border-box;
}

.destiny-gender-btn:hover {
  border-color: rgba(var(--gold-rgb), 0.5);
}

.destiny-gender-btn.selected {
  background: rgba(var(--gold-rgb), 0.12);
  border-color: var(--gold);
  color: var(--gold);
}

.destiny-notices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  text-align: left;
}

.destiny-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 16px 16px;
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  background: rgba(0, 0, 0, 0.45);
}

.destiny-notice-warn {
  border-color: rgba(var(--amber-rgb), 0.35);
  background: rgba(40, 18, 0, 0.5);
}

.destiny-notice-icon {
  font-size: var(--fs-md);
  line-height: 1.2;
}

.destiny-notice strong {
  display: block;
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  margin-bottom: 4px;
}

.destiny-notice-text {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.85);
  margin: 4px 0 0;
}

.destiny-notice-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.destiny-notice-columns h4 {
  color: rgba(var(--gold-rgb), 0.8);
  font-size: var(--fs-xs);
  margin: 0 0 8px;
}

.destiny-block {
  text-align: left;
  margin-bottom: 40px;
  animation: cardFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.destiny-heading {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-md);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}

.destiny-heading i {
  margin-right: 8px;
  opacity: 0.8;
}

.destiny-note,
.compat-dynamic-note {
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.6);
  line-height: 1.6;
  margin: 0 0 16px;
}

.destiny-card {
  background: linear-gradient(145deg, rgba(28, 10, 10, 0.72), rgba(0, 0, 0, 0.82));
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}

.destiny-text {
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: rgba(var(--cream-rgb), 0.9);
  margin: 0 0 12px;
}

.destiny-text-small {
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.destiny-text-accent {
  color: var(--gold);
}

.destiny-text-warn {
  color: var(--apricot);
}

.destiny-text-muted {
  color: rgba(var(--cream-rgb), 0.5);
  font-style: italic;
}

.destiny-list {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: rgba(var(--cream-rgb), 0.85);
}

.destiny-list-ok li::marker {
  color: var(--success);
}

.destiny-list-off li::marker {
  color: var(--danger);
}

.destiny-list-plain li::marker {
  color: rgba(var(--gold-rgb), 0.6);
}

.destiny-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.destiny-two-col h4 {
  font-family: "Noto Serif TC", serif;
  color: rgba(var(--gold-rgb), 0.85);
  font-size: var(--fs-sm);
  margin: 0 0 8px;
}

.destiny-kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--fs-xs);
  padding: 8px 0;
  border-bottom: 1px dashed rgba(var(--gold-rgb), 0.12);
  margin: 0;
}

.destiny-kv-label {
  color: rgba(var(--cream-rgb), 0.6);
  white-space: nowrap;
}

.destiny-kv-value {
  color: var(--cream);
  text-align: right;
}

.destiny-chart-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
}

.destiny-chart {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-sizing: border-box;
}

.destiny-chart th,
.destiny-chart td {
  border: 1px solid rgba(var(--gold-rgb), 0.12);
  padding: 12px 8px;
  text-align: center;
  vertical-align: middle;
}

.destiny-chart thead th {
  background: rgba(var(--gold-rgb), 0.07);
}

.destiny-chart-corner {
  background: transparent !important;
  border: none !important;
}

.destiny-chart-rowhead {
  font-family: "Noto Serif TC", serif;
  color: rgba(var(--gold-rgb), 0.7);
  font-size: var(--fs-sm);
  width: 104px;
}

.destiny-chart-rowhead-hanzi {
  display: block;
  line-height: 1.2;
}

.destiny-chart-rowhead-label {
  display: block;
  font-family: inherit;
  font-size: var(--fs-2xs);
  letter-spacing: 0.2px;
  color: rgba(var(--cream-rgb), 0.6);
}

.destiny-chart-hanzi {
  display: block;
  font-size: var(--fs-xl);
  line-height: 1.1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.3);
}

.destiny-chart-hanzi-small {
  display: block;
  font-size: var(--fs-md);
  color: var(--gold);
}

.destiny-chart-label {
  display: block;
  font-size: var(--fs-2xs);
  color: rgba(var(--cream-rgb), 0.7);
  margin-top: 2px;
}

.destiny-chart-sub {
  display: block;
  font-size: var(--fs-2xs);
  color: rgba(var(--cream-rgb), 0.6);
  margin-top: 4px;
}

.destiny-chart-god {
  display: block;
  font-size: var(--fs-2xs);
  color: rgba(var(--gold-rgb), 0.75);
  margin-top: 4px;
}

.destiny-hidden {
  display: block;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.8);
  padding: 2px 0;
}

.destiny-hidden-hanzi {
  color: var(--cream);
  margin-right: 8px;
}

.destiny-hidden-god {
  color: rgba(var(--gold-rgb), 0.6);
}

.destiny-positions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.destiny-position {
  margin-bottom: 0;
  padding: 16px;
}

.destiny-position-off {
  opacity: 0.45;
}

.destiny-position-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-sm);
  margin: 0 0 8px;
}

.destiny-position-hanzi {
  font-size: var(--fs-md);
}

.destiny-position-age {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.55);
}

.destiny-dm-head,
.destiny-strength-head,
.destiny-star-head,
.destiny-luck-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.destiny-dm-hanzi,
.destiny-strength-hanzi,
.destiny-luck-hanzi {
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(var(--gold-rgb), 0.35);
  flex-shrink: 0;
}

.destiny-luck-hanzi {
  font-size: var(--fs-xl);
}

.destiny-dm-title,
.destiny-star-title,
.destiny-luck-title,
.destiny-relation-title {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
  margin: 0;
}

.destiny-dm-sub {
  display: block;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.6);
  margin-top: 4px;
}

.destiny-element {
  padding: 16px 16px;
  margin-bottom: 8px;
}

.destiny-element-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.destiny-element-name {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
}

.destiny-element-score,
.quiz-leader-points {
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.65);
}

.destiny-bar {
  height: 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-bottom: 8px;
}

.destiny-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--blood), var(--gold));
  transition: width 0.6s ease;
}

.destiny-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.destiny-tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: rgba(var(--cream-rgb), 0.8);
}

.destiny-tag-dominan {
  border-color: rgba(var(--amber-rgb), 0.6);
  color: var(--apricot);
}

.destiny-tag-kosong {
  border-color: rgba(var(--danger-rgb), 0.6);
  color: var(--danger);
}

.destiny-tag-role-menguntungkan {
  border-color: rgba(var(--success-rgb), 0.6);
  color: var(--success);
}

.destiny-tag-role-merugikan {
  border-color: rgba(var(--danger-rgb), 0.5);
  color: var(--danger);
}

.destiny-role-menguntungkan {
  border-left: 3px solid rgba(var(--success-rgb), 0.6);
}

.destiny-role-merugikan {
  border-left: 3px solid rgba(var(--danger-rgb), 0.5);
}

.destiny-destiny-grid,
.destiny-remedy-grid,
.destiny-star-grid,
.destiny-relation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.destiny-destiny-card,
.destiny-remedy-card,
.destiny-star {
  margin-bottom: 0;
}

.destiny-destiny-title {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
  margin: 0 0 12px;
}

.destiny-organ {
  border-top: 1px dashed rgba(var(--gold-rgb), 0.15);
  padding-top: 8px;
  margin-top: 8px;
}

.destiny-organ strong {
  display: block;
  color: var(--apricot);
  font-size: var(--fs-xs);
  margin-bottom: 8px;
}

.destiny-star-icon {
  font-size: var(--fs-xl);
  line-height: 1;
  flex-shrink: 0;
}
.destiny-star-auspicious {
  border-left: 3px solid rgba(var(--gold-rgb), 0.6);
}

.destiny-star-neutral {
  border-left: 3px solid rgba(var(--cream-rgb), 0.35);
}

.destiny-star-inauspicious {
  border-left: 3px solid rgba(var(--danger-rgb), 0.5);
}

.destiny-luck-item {
  padding: 16px;
}
.destiny-alter {
  border: 1px dashed rgba(var(--gold-rgb), 0.2);
  border-radius: var(--radius-md);
  padding: 16px 16px;
  margin: 16px 0;
}

.destiny-alter h4 {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-sm);
  margin: 0 0 8px;
}

.destiny-facts {
  margin-top: 16px;
}

.destiny-disclaimer {
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.5);
  font-style: italic;
  text-align: center;
  border-top: 1px solid rgba(var(--gold-rgb), 0.15);
  padding-top: 16px;
  margin-top: 8px;
}

.destiny-block:nth-child(1) {
  animation-delay: 0.05s;
}

.destiny-block:nth-child(2) {
  animation-delay: 0.12s;
}

.destiny-block:nth-child(3) {
  animation-delay: 0.19s;
}

.destiny-block:nth-child(4) {
  animation-delay: 0.26s;
}

.destiny-block:nth-child(n + 5) {
  animation-delay: 0.33s;
}
.destiny-relation {
  margin-bottom: 0;
}

.destiny-relation-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.destiny-relation-hanzi {
  font-family: "Noto Serif TC", "Cinzel", serif;
  font-size: var(--fs-lg);
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}
.destiny-relation-good {
  border-left: 3px solid rgba(var(--success-rgb), 0.6);
}

.destiny-relation-bad {
  border-left: 3px solid rgba(var(--danger-rgb), 0.6);
}

.destiny-relation-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: var(--cream);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.destiny-relation-tag.destiny-relation-adjacent {
  border-color: rgba(var(--gold-rgb), 0.6);
  color: var(--gold);
}

.destiny-chart-viewport {
  position: relative;
  margin-bottom: 20px;
}

.destiny-chart-viewport .destiny-chart-scroll {
  margin-bottom: 0;
}

.destiny-chart-viewport::before,
.destiny-chart-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.destiny-chart-viewport::before {
  left: 0;
  background: linear-gradient(to right, rgba(var(--gold-rgb), 0.18), transparent);
}

.destiny-chart-viewport::after {
  right: 0;
  background: linear-gradient(to left, rgba(var(--gold-rgb), 0.18), transparent);
}

.destiny-chart-frame.more-left .destiny-chart-viewport::before,
.destiny-chart-frame.more-right .destiny-chart-viewport::after {
  opacity: 1;
}

.destiny-scroll-hint {
  display: none;
  margin: 0 0 8px;
  color: var(--gold);
  font-size: var(--fs-xs);
  text-align: right;
}

.destiny-chart-frame.more-right .destiny-scroll-hint {
  display: block;
}

.year-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 4px 0;
}

.year-nav {
  background: rgba(var(--gold-rgb), 0.15);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: var(--gold);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: var(--fs-base);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.year-nav:hover {
  background: rgba(var(--gold-rgb), 0.3);
  transform: scale(1.1);
}

.year-display {
  text-align: center;
  min-width: 140px;
}

.year-number {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.3);
}

.year-shio {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-xs);
  margin-top: 4px;
}

.yearly-card {
  background: linear-gradient(145deg, rgba(20, 5, 5, 0.7), rgba(0, 0, 0, 0.8));
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(var(--gold-rgb), 0.05);
  border-radius: var(--radius-md);
  padding: 32px;
  animation: yFadeIn 0.5s ease-out;
}

.yearly-header,
.yearly-relation,
.guardian-image-container {
  text-align: center;
  margin-bottom: 20px;
}

.yearly-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.yearly-shio-box {
  background: linear-gradient(to bottom, rgba(40, 10, 10, 0.6), rgba(10, 0, 0, 0.8));
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(var(--gold-rgb), 0.1);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yearly-shio-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(var(--gold-rgb), 0.2);
}

.yearly-shio-box.year-box {
  background: linear-gradient(to bottom, rgba(40, 20, 0, 0.6), rgba(10, 5, 0, 0.8));
  border-color: rgba(var(--amber-rgb), 0.6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(var(--amber-rgb), 0.1);
}

.yearly-shio-box.year-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(var(--amber-rgb), 0.2);
}

.yearly-hanzi {
  font-size: var(--fs-xl);
  display: block;
  text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.3);
}

.yearly-shio-name {
  display: block;
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  margin-top: 4px;
}

.yearly-year-num {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs);
  margin-top: 4px;
}

.yearly-arrow {
  color: rgba(var(--gold-rgb), 0.6);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  font-style: italic;
}

.yearly-advice {
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.15), rgba(var(--amber-rgb), 0.05));
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  box-shadow: inset 0 0 20px rgba(var(--gold-rgb), 0.05);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.yearly-advice .advice-icon {
  color: var(--gold);
  font-size: var(--fs-md);
  flex-shrink: 0;
  margin-top: 2px;
}

.yearly-advice p {
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--fs-base);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.yearly-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.yearly-cat {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid transparent;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: yFadeIn 0.4s ease-out forwards;
  transition: all 0.3s ease;
}

.yearly-cat:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.yearly-cat:nth-child(1) { animation-delay: 0.1s; border-top-color: var(--teal); background: linear-gradient(135deg, rgba(var(--teal-rgb), 0.1), rgba(10, 10, 10, 0.8)); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 20px 40px rgba(var(--teal-rgb), 0.05); }

.yearly-cat:nth-child(2) { animation-delay: 0.2s; border-top-color: var(--gold); background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.1), rgba(10, 10, 10, 0.8)); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 20px 40px rgba(var(--gold-rgb), 0.05); }

.yearly-cat:nth-child(3) { animation-delay: 0.3s; border-top-color: var(--pink); background: linear-gradient(135deg, rgba(var(--pink-rgb), 0.1), rgba(10, 10, 10, 0.8)); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 20px 40px rgba(var(--pink-rgb), 0.05); }

.yearly-cat:nth-child(4) { animation-delay: 0.4s; border-top-color: var(--success); background: linear-gradient(135deg, rgba(var(--success-rgb), 0.1), rgba(10, 10, 10, 0.8)); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 20px 40px rgba(var(--success-rgb), 0.05); }

.yearly-cat .cat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: var(--fs-lg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.yearly-cat:nth-child(1) .cat-icon { background: rgba(var(--teal-rgb), 0.15); color: var(--teal); border: 1px solid rgba(var(--teal-rgb), 0.3); }

.yearly-cat:nth-child(2) .cat-icon { background: rgba(var(--gold-rgb), 0.15); color: var(--gold); border: 1px solid rgba(var(--gold-rgb), 0.3); }

.yearly-cat:nth-child(3) .cat-icon { background: rgba(var(--pink-rgb), 0.15); color: var(--pink); border: 1px solid rgba(var(--pink-rgb), 0.3); }

.yearly-cat:nth-child(4) .cat-icon { background: rgba(var(--success-rgb), 0.15); color: var(--success); border: 1px solid rgba(var(--success-rgb), 0.3); }

.yearly-cat h3 {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  margin: 0 0 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  width: 80%;
}

.yearly-cat:nth-child(1) h3 { color: var(--teal); }

.yearly-cat:nth-child(2) h3 { color: var(--gold); }

.yearly-cat:nth-child(3) h3 { color: var(--pink); }

.yearly-cat:nth-child(4) h3 { color: var(--success); }

.yearly-cat p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0;
}

@keyframes yFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.yearly-lichun {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.55);
  text-align: center;
  margin: -8px 0 16px;
}
.yearly-badge {
  display: inline-block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  color: var(--gold);
}

.yearly-badge.code-good {
  border-color: rgba(var(--success-rgb), 0.65);
  color: var(--success);
}

.yearly-badge.code-bad {
  border-color: rgba(var(--danger-rgb), 0.65);
  color: var(--danger);
}

.yearly-badge.code-neutral {
  border-color: rgba(var(--cream-rgb), 0.4);
  color: rgba(var(--cream-rgb), 0.85);
}

.yearly-taisui {
  display: inline-block;
  margin-left: 8px;
  font-size: var(--fs-xs);
  letter-spacing: 0.3px;
  padding: 4px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--danger-rgb), 0.35);
  color: rgba(var(--danger-rgb), 0.9);
}

.yearly-relation-note {
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.75);
  max-width: 620px;
  margin: 8px auto 0;
}

.yearly-stem {
  background: linear-gradient(145deg, rgba(28, 10, 10, 0.72), rgba(0, 0, 0, 0.82));
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: left;
  box-sizing: border-box;
}

.yearly-stem.role-menerima {
  border-left: 3px solid rgba(var(--success-rgb), 0.6);
}

.yearly-stem.role-memberi,
.yearly-stem.role-ditekan {
  border-left: 3px solid rgba(255, 171, 112, 0.6);
}

.yearly-stem.role-menekan {
  border-left: 3px solid rgba(var(--gold-rgb), 0.55);
}

.yearly-stem.role-setara {
  border-left: 3px solid rgba(var(--cream-rgb), 0.35);
}

.yearly-stem-title,
.compat-dynamic-title {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
  margin: 0 0 8px;
}

.yearly-stem-title i {
  margin-right: 8px;
  opacity: 0.8;
}

.yearly-stem-pillar {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.6);
  margin-left: 8px;
}

.yearly-stem-summary,
.yearly-stem-advice {
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: rgba(var(--cream-rgb), 0.88);
  margin: 0 0 8px;
}

.yearly-stem-advice {
  color: rgba(var(--gold-rgb), 0.8);
  margin-bottom: 0;
}

.compat-result {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-top: 20px;
}

.compat-header {
  text-align: center;
  margin-bottom: 24px;
}

.compat-pair {
  margin-bottom: 4px;
}

.compat-rel-type {
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
}

.score-bar-wrapper {
  max-width: 400px;
  margin: 20px auto;
  text-align: center;
}

.score-label {
  text-align: center;
  color: var(--gold);
  font-size: var(--fs-md);
  margin-bottom: 16px;
  font-family: "Noto Serif TC", serif;
}

.score-label-sub {
  display: block;
  margin-top: 4px;
  font-family: inherit;
  font-size: var(--fs-2xs);
  letter-spacing: 0.2px;
  color: rgba(var(--cream-rgb), 0.55);
}

.circular-chart-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 6;
}

.circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 1.5s ease-out, stroke 0.5s ease-out;
  filter: drop-shadow(0 0 8px currentColor);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.circular-chart-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.percentage {
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-2xl);
  font-weight: 700;
  text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.5);
}

.circle.high {
  stroke: var(--success);
}

.circle.mid {
  stroke: #ffca28;
}

.circle.low {
  stroke: var(--danger);
}

.compat-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.compat-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
}

.compat-box h4 {
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  margin: 0 0 8px;
  font-size: var(--fs-base);
}

.compat-box h4 i {
  margin-right: 8px;
}

.compat-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0;
}

.compat-box.drama {
  grid-column: 1 / -1;
  border-left: 3px solid var(--danger);
}

.compat-box.tips {
  grid-column: 1 / -1;
  border-left: 3px solid var(--gold);
}

.compat-pair {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xl);
  font-weight: bold;
}

.compat-pair-hanzi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-size: var(--fs-lg);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.5), inset 0 0 8px rgba(var(--gold-rgb), 0.3);
  font-family: "Noto Serif TC", serif;
  background: rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 5px rgba(var(--gold-rgb), 0.8);
}

.compat-pair-names {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.compat-dynamic,
.compat-year,
.compat-bazi {
  margin: 32px auto 8px;
  max-width: 760px;
  text-align: left;
}
.compat-dynamic-title i {
  margin-right: 8px;
  opacity: 0.8;
}
.compat-dynamic-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.compat-dynamic-card,
.compat-year-card,
.star-card {
  background: linear-gradient(145deg, rgba(28, 10, 10, 0.72), rgba(0, 0, 0, 0.82));
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: var(--radius-md);
  padding: 16px;
  box-sizing: border-box;
}

.compat-dynamic-card.role-memberi,
.compat-dynamic-card.role-menekan {
  border-left: 3px solid rgba(var(--gold-rgb), 0.55);
}

.compat-dynamic-card.role-menerima,
.compat-dynamic-card.role-ditekan {
  border-left: 3px solid rgba(var(--success-rgb), 0.5);
}

.compat-dynamic-card.role-setara {
  border-left: 3px solid rgba(var(--cream-rgb), 0.35);
}

.compat-dynamic-arrow {
  font-size: var(--fs-lg);
  color: rgba(var(--gold-rgb), 0.75);
  text-align: center;
  line-height: 1;
}

.compat-dynamic-arrow.symmetric {
  color: rgba(var(--cream-rgb), 0.45);
}

.dyn-head,
.useful-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.dyn-icon {
  font-size: var(--fs-lg);
  line-height: 1;
  flex-shrink: 0;
}

.dyn-name {
  display: block;
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
}

.dyn-element {
  display: block;
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.6);
  margin-top: 2px;
}

.dyn-badge {
  display: inline-block;
  font-size: var(--fs-2xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: rgba(var(--cream-rgb), 0.85);
  margin-bottom: 8px;
}

.dyn-summary,
.dyn-advice {
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.88);
  margin: 0 0 8px;
}

.dyn-advice {
  color: rgba(var(--gold-rgb), 0.8);
  margin-bottom: 0;
}
.compat-year-stem,
.compat-day-pillar,
.compat-useful {
  background: linear-gradient(145deg, rgba(28, 10, 10, 0.72), rgba(0, 0, 0, 0.82));
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.compat-year-stem.kind-he {
  border-left: 3px solid rgba(var(--gold-rgb), 0.6);
}

.compat-year-stem.kind-chong {
  border-left: 3px solid rgba(var(--danger-rgb), 0.55);
}

.compat-year-stem.kind-netral {
  border-left: 3px solid rgba(var(--cream-rgb), 0.3);
}

.compat-year-pair,
.compat-stars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.year-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.year-pillar {
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.3);
  flex-shrink: 0;
}

.compat-relation-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 620px;
  margin: 16px auto 4px;
  padding: 16px 16px;
  text-align: left;
  border: 1px solid rgba(var(--gold-rgb), 0.22);
  border-left: 3px solid rgba(var(--cream-rgb), 0.35);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(28, 10, 10, 0.72), rgba(0, 0, 0, 0.82));
  box-sizing: border-box;
}

.compat-relation-badge.code-good {
  border-left-color: rgba(var(--gold-rgb), 0.7);
}

.compat-relation-badge.code-bad {
  border-left-color: rgba(var(--danger-rgb), 0.6);
}

.relation-hanzi {
  flex-shrink: 0;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.3);
}

.compat-relation-badge.code-bad .relation-hanzi {
  color: var(--danger);
  text-shadow: 0 0 18px rgba(var(--danger-rgb), 0.25);
}

.relation-title {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: rgba(var(--cream-rgb), 0.95);
  margin-bottom: 4px;
}

.relation-note {
  font-size: var(--fs-xs);
  line-height: 1.65;
  color: rgba(var(--cream-rgb), 0.72);
  margin: 0;
}

.compat-day-pillar.code-good,
.compat-useful.code-good {
  border-left: 3px solid rgba(var(--gold-rgb), 0.6);
}

.compat-day-pillar.code-bad,
.compat-useful.code-bad {
  border-left: 3px solid rgba(var(--danger-rgb), 0.55);
}

.compat-day-pillar.code-neutral,
.compat-useful.code-neutral {
  border-left: 3px solid rgba(var(--cream-rgb), 0.3);
}

.bazi-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bazi-pillar {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.3);
}

.bazi-link {
  font-size: var(--fs-base);
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: rgba(var(--cream-rgb), 0.9);
}

.bazi-stem {
  font-size: var(--fs-xs);
  line-height: 1.7;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(var(--gold-rgb), 0.16);
  color: rgba(var(--cream-rgb), 0.75);
}

.bazi-stem.kind-he {
  color: rgba(var(--gold-rgb), 0.85);
}

.bazi-stem.kind-chong {
  color: rgba(255, 171, 112, 0.9);
}
.useful-glyph {
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(var(--gold-rgb), 0.3);
}

.useful-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: rgba(var(--cream-rgb), 0.95);
}

.useful-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.useful-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(var(--gold-rgb), 0.14);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.useful-side-name,
.star-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: var(--gold);
}

.useful-side-element,
.useful-side-needs {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.7);
}

.useful-flag {
  align-self: flex-start;
  margin-top: 4px;
  font-size: var(--fs-2xs);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--cream-rgb), 0.25);
  color: rgba(var(--cream-rgb), 0.8);
}

.useful-flag.give {
  border-color: rgba(var(--gold-rgb), 0.5);
  color: var(--gold);
}

.useful-flag.drain {
  border-color: rgba(var(--danger-rgb), 0.5);
  color: var(--danger);
}

.star-card.code-good {
  border-left: 3px solid rgba(var(--gold-rgb), 0.6);
}

.star-card.code-bad {
  border-left: 3px solid rgba(var(--danger-rgb), 0.55);
}

.star-card.code-neutral {
  border-left: 3px solid rgba(var(--cream-rgb), 0.3);
}

.star-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.star-who {
  font-size: var(--fs-2xs);
  letter-spacing: 0.3px;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  color: rgba(var(--cream-rgb), 0.8);
}

.compat-result.animate-in > * {
  animation: cardFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.compat-result.animate-in > *:nth-child(1) {
  animation-delay: 0.05s;
}

.compat-result.animate-in > *:nth-child(2) {
  animation-delay: 0.12s;
}

.compat-result.animate-in > *:nth-child(3) {
  animation-delay: 0.19s;
}

.compat-result.animate-in > *:nth-child(4) {
  animation-delay: 0.26s;
}

.compat-result.animate-in > *:nth-child(5) {
  animation-delay: 0.33s;
}

.compat-result.animate-in > *:nth-child(n + 6) {
  animation-delay: 0.4s;
}

.compat-result.animate-in .compat-sections .compat-box {
  animation: cardFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.compat-result.animate-in .compat-sections .compat-box:nth-child(2) {
  animation-delay: 0.47s;
}

.compat-result.animate-in .compat-sections .compat-box:nth-child(3) {
  animation-delay: 0.54s;
}

.compat-result.animate-in .compat-sections .compat-box:nth-child(4) {
  animation-delay: 0.61s;
}

.compat-box.narrative {
  grid-column: 1 / -1;
  border-left: 3px solid var(--pink);
}

.quiz-card {
  max-width: 760px;
  margin: 16px auto 0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(var(--gold-rgb), 0.16);
  border-radius: var(--radius-md);
  padding: 20px;
  box-sizing: border-box;
  text-align: left;
}

.quiz-card-title,
.quiz-section-title,
.quiz-room-mode {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-md);
  margin: 0 0 12px;
}

.quiz-section-title {
  font-size: var(--fs-base);
}

.quiz-section-title i {
  margin-right: 8px;
  opacity: 0.8;
}

.quiz-hint {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.65);
  margin: 8px 0 0;
}

.quiz-code-input {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-family: ui-monospace, "Cascadia Mono", monospace;
}

.quiz-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 16px auto 0;
}

.quiz-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: rgba(40, 5, 5, 0.7);
  border: 2px solid var(--blood);
  border-radius: var(--radius-md);
  color: var(--cream);
  font-family: "Noto Serif TC", serif;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.quiz-mode i {
  font-size: var(--fs-xl);
  color: var(--gold);
}

.quiz-mode:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.quiz-mode.active {
  border-color: var(--gold);
  background: rgba(var(--blood-rgb), 0.55);
  box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.2);
}

.quiz-mode-title {
  font-size: var(--fs-base);
  font-weight: 700;
}

.quiz-mode-size {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
}

.quiz-mode small {
  font-size: var(--fs-xs);
  line-height: 1.45;
  opacity: 0.75;
}

.quiz-option-group {
  margin-top: 16px;
}
.quiz-room-code {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding: 12px 16px;
  border: 1px dashed rgba(var(--gold-rgb), 0.45);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
}

.quiz-code-label {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(var(--cream-rgb), 0.6);
}

.quiz-code {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--cream);
}

.quiz-share {
  display: flex;
  gap: 8px;
}

.quiz-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold);
  cursor: pointer;
  font-size: var(--fs-base);
}

.quiz-icon-btn:hover {
  border-color: var(--gold);
}

.quiz-room-meta {
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.55);
  margin: 8px 0 0;
}

.quiz-notice p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--peach);
  line-height: 1.5;
}

.quiz-count {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: rgba(var(--cream-rgb), 0.6);
}

.quiz-people,
.quiz-roles,
.quiz-pairs,
.quiz-compare,
.quiz-targets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quiz-person,
.quiz-role-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-person {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid transparent;
}

.quiz-person.is-me {
  border-color: rgba(var(--gold-rgb), 0.35);
}

.quiz-person-hanzi {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
}

.quiz-person-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.quiz-person-name,
.quiz-pair-names {
  font-weight: 700;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.quiz-person-tags {
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.6);
}

.quiz-person-state {
  font-size: var(--fs-2xs);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--cream-rgb), 0.25);
  color: rgba(var(--cream-rgb), 0.7);
  white-space: nowrap;
}

.quiz-person-state.done {
  border-color: rgba(var(--success-rgb), 0.5);
  color: var(--success);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.quiz-questions {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: question;
  display: grid;
  gap: 16px;
}

.quiz-question-set {
  border: 1px solid rgba(var(--gold-rgb), 0.14);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0;
}

.quiz-question-text {
  counter-increment: question;
  color: var(--cream);
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding: 0 4px;
}

.quiz-question-text::before {
  content: counter(question) ". ";
  color: var(--gold);
}

.quiz-answer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 8px;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: rgba(var(--cream-rgb), 0.85);
}

.quiz-answer:hover {
  background: rgba(var(--gold-rgb), 0.06);
}

.quiz-answer input {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.quiz-answer:has(input:checked) {
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--cream);
}

.quiz-turn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.quiz-points {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-weight: 700;
}

.quiz-hints {
  margin: 12px 0 0;
  padding-left: 24px;
  display: grid;
  gap: 8px;
}

.quiz-hint-item {
  color: var(--cream);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.quiz-option {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: var(--cream);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(var(--gold-rgb), 0.1);
}

.quiz-option:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.quiz-option.wrong {
  border-color: rgba(var(--danger-rgb), 0.5);
  color: var(--danger);
  text-decoration: line-through;
}

.quiz-verdict {
  text-align: center;
  border-color: rgba(var(--gold-rgb), 0.35);
}

.quiz-verdict-kicker {
  margin: 0;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(var(--cream-rgb), 0.6);
}

.quiz-score {
  font-family: "Noto Serif TC", serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  margin: 8px 0 0;
}

.quiz-verdict-title {
  font-family: "Noto Serif TC", serif;
  color: var(--cream);
  font-size: var(--fs-lg);
  margin: 8px 0;
}

.quiz-verdict-note {
  margin: 0 auto;
  max-width: 560px;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.85);
}

.quiz-breakdown {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 16px auto 0;
}

.quiz-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
  padding: 8px 0;
  border-top: 1px solid rgba(var(--gold-rgb), 0.12);
}

.quiz-breakdown-label {
  color: rgba(var(--cream-rgb), 0.7);
}

.quiz-breakdown-value {
  color: var(--cream);
  font-weight: 700;
}

.quiz-compare-item,
.quiz-pair,
.quiz-role,
.quiz-target {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid rgba(var(--cream-rgb), 0.25);
}

.quiz-compare-question {
  margin: 0 0 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--cream);
}

.quiz-compare-answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.quiz-compare-answer {
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.8);
}

.quiz-compare-answer strong {
  color: var(--gold);
}

.quiz-compare-badge,
.quiz-pair-label {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--fs-2xs);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(var(--cream-rgb), 0.08);
  color: rgba(var(--cream-rgb), 0.8);
}

.quiz-compare-item.distance-0,
.quiz-pair.code-good,
.quiz-role.role-perekat,
.quiz-target.verdict-terbaca {
  border-left-color: var(--success);
}

.quiz-compare-item.distance-1,
.quiz-role.role-jembatan,
.quiz-target.verdict-sebagian {
  border-left-color: var(--gold);
}

.quiz-compare-item.distance-2,
.quiz-role.role-penyeimbang {
  border-left-color: var(--teal);
}

.quiz-compare-item.distance-3,
.quiz-pair.code-bad,
.quiz-role.role-pemicu,
.quiz-target.verdict-misterius {
  border-left-color: var(--danger);
}

.quiz-pair-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.quiz-pair-hanzi {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
}

.quiz-pair-note,
.quiz-role-note {
  margin: 8px 0 0;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.8);
}

.quiz-role-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: var(--gold);
  text-align: right;
}

.quiz-role-tally {
  margin: 8px 0 0;
  font-size: var(--fs-2xs);
  color: rgba(var(--cream-rgb), 0.55);
}

.quiz-details summary,
.quiz-target-hints summary {
  cursor: pointer;
  color: var(--gold);
  font-size: var(--fs-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.quiz-details[open] summary {
  margin-bottom: 8px;
}

.quiz-target-hints {
  margin-top: 8px;
}

.quiz-target-hints summary {
  font-size: var(--fs-xs);
}

.quiz-leaderboard {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 8px;
}

.quiz-leader {
  color: var(--cream);
}

.quiz-leader-name {
  font-weight: 700;
  margin-right: 8px;
}
.quiz-empty {
  font-size: var(--fs-xs);
  color: rgba(var(--cream-rgb), 0.55);
}

.quiz-disclaimer {
  max-width: 760px;
  margin: 16px auto 0;
  text-align: left;
}

.roast-card {
  background: linear-gradient(145deg, rgba(30, 8, 4, 0.75), rgba(0, 0, 0, 0.85));
  border: 1px solid rgba(var(--flame-rgb), 0.35);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6),
    inset 0 0 25px rgba(var(--flame-rgb), 0.06);
  border-radius: var(--radius-md);
  padding: 32px;
  animation: rFadeIn 0.5s ease-out;
}

.roast-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.roast-hanzi {
  font-size: 3.2rem;
  line-height: 1;
  color: var(--ember);
  text-shadow: 0 0 25px rgba(var(--flame-rgb), 0.5);
  animation: rFlicker 3s ease-in-out infinite;
}

.roast-shio-name {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-lg);
  color: var(--gold);
  margin: 8px 0 12px;
  letter-spacing: 1px;
}

.roast-stamp {
  display: inline-block;
  background: linear-gradient(135deg, rgba(var(--flame-rgb), 0.2), rgba(255, 0, 0, 0.1));
  border: 1px dashed rgba(var(--flame-rgb), 0.6);
  color: var(--ember);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 2px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  transform: rotate(-3deg);
}

.roast-stamp i {
  margin-right: 4px;
}

.roast-headline {
  background: linear-gradient(135deg, rgba(var(--flame-rgb), 0.16), rgba(var(--amber-rgb), 0.04));
  border: 1px solid rgba(var(--flame-rgb), 0.4);
  box-shadow: inset 0 0 20px rgba(var(--flame-rgb), 0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.roast-quote-mark {
  color: var(--ember);
  font-size: var(--fs-lg);
  flex-shrink: 0;
  margin-top: 2px;
}

.roast-headline p {
  color: #fff;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  line-height: 1.5;
  margin: 0;
}

.roast-section {
  margin-bottom: 24px;
}

.roast-section-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(var(--flame-rgb), 0.2);
}

.roast-section-title i {
  margin-right: 8px;
}

.roast-traits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.roast-traits li {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(var(--flame-rgb), 0.6);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 40px;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  line-height: 1.55;
  position: relative;
  opacity: 0;
  animation: rFadeIn 0.4s ease-out forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.roast-traits li:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.roast-traits li::before {
  content: "\f06d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: rgba(var(--ember-rgb), 0.8);
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: var(--fs-sm);
}

.roast-traits li:nth-child(1) { animation-delay: 0.05s; }

.roast-traits li:nth-child(2) { animation-delay: 0.1s; }

.roast-traits li:nth-child(3) { animation-delay: 0.15s; }

.roast-traits li:nth-child(4) { animation-delay: 0.2s; }

.roast-traits li:nth-child(5) { animation-delay: 0.25s; }

.roast-traits li:nth-child(6) { animation-delay: 0.3s; }

.roast-traits li:nth-child(7) { animation-delay: 0.35s; }

.roast-traits li:nth-child(8) { animation-delay: 0.4s; }

.roast-sins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.roast-sin-box {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid transparent;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.roast-sin-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.roast-sin-box.sin-money {
  border-top-color: var(--gold);
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.1), rgba(10, 10, 10, 0.8));
}

.roast-sin-box.sin-love {
  border-top-color: var(--pink);
  background: linear-gradient(135deg, rgba(var(--pink-rgb), 0.1), rgba(10, 10, 10, 0.8));
}

.roast-sin-box .sin-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: var(--fs-lg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sin-money .sin-icon {
  background: rgba(var(--gold-rgb), 0.15);
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
}

.sin-love .sin-icon {
  background: rgba(var(--pink-rgb), 0.15);
  color: var(--pink);
  border: 1px solid rgba(var(--pink-rgb), 0.3);
}

.roast-sin-box h3 {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  margin: 0 0 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  width: 80%;
}

.sin-money h3 { color: var(--gold); }

.sin-love h3 { color: var(--pink); }

.roast-sin-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0;
}

.roast-catchphrase {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(30, 10, 5, 0.4));
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius-md);
  padding: 24px 24px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
}

.roast-catchphrase > i {
  color: rgba(var(--gold-rgb), 0.4);
  font-size: var(--fs-md);
  margin-bottom: 8px;
  display: block;
}

.roast-catchphrase p {
  color: var(--gold);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

.roast-weakness,
.roast-tip {
  border-radius: var(--radius-md);
  border-top: 3px solid transparent;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.roast-weakness:hover,
.roast-tip:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.roast-weakness {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(10, 10, 10, 0.8));
  border-color: #ba68ff;
}

.roast-tip {
  background: linear-gradient(135deg, rgba(var(--teal-rgb), 0.1), rgba(10, 10, 10, 0.8));
  border-color: var(--teal);
}

.weakness-icon,
.tip-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--fs-md);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.weakness-icon {
  background: rgba(186, 104, 255, 0.15);
  color: #ba68ff;
  border: 1px solid rgba(186, 104, 255, 0.3);
}

.tip-icon {
  background: rgba(var(--teal-rgb), 0.15);
  color: var(--teal);
  border: 1px solid rgba(var(--teal-rgb), 0.3);
}

.weakness-body,
.tip-body {
  flex: 1;
  min-width: 0;
}

.weakness-body h3,
.tip-body h3 {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.weakness-body h3 { color: #ba68ff; }

.tip-body h3 { color: var(--teal); }

.weakness-body p,
.tip-body p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0;
}

.roast-disclaimer {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--fs-xs);
  font-style: italic;
  text-align: center;
  margin: 24px 0 0;
}

@keyframes rFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rFlicker {
  0%, 100% { text-shadow: 0 0 25px rgba(var(--flame-rgb), 0.5); }
  50% { text-shadow: 0 0 40px rgba(var(--flame-rgb), 0.8), 0 0 60px rgba(var(--amber-rgb), 0.3); }
}

.roast-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.roast-toolbar > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-sm);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.roast-toolbar > button:hover {
  transform: translateY(-2px);
}

.roast-toolbar > button i {
  font-size: var(--fs-sm);
}

.roast-reroll {
  background: linear-gradient(135deg, rgba(var(--blood-rgb), 0.85), rgba(var(--ember-rgb), 0.55));
  border: 1px solid rgba(var(--ember-rgb), 0.55);
  color: var(--peach);
  box-shadow: 0 4px 16px rgba(var(--flame-rgb), 0.12);
}

.roast-reroll:hover {
  border-color: var(--ember);
  box-shadow: 0 6px 20px rgba(var(--flame-rgb), 0.28);
}

.roast-reroll-count {
  font-size: var(--fs-2xs);
  letter-spacing: 0.3px;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(var(--peach-rgb), 0.78);
}

.roast-flash {
  animation: roastFlash 0.45s ease-out;
}

@keyframes roastFlash {
  from {
    opacity: 0.35;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.roast-pair {
  margin: 24px 0 0;
  padding-top: 24px;
  border-top: 1px dashed rgba(var(--flame-rgb), 0.22);
  text-align: center;
}

.roast-pair-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: rgba(20, 5, 3, 0.75);
  border: 1px dashed rgba(var(--ember-rgb), 0.45);
  color: rgba(var(--peach-rgb), 0.85);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.roast-pair-cta:hover {
  border-color: var(--ember);
  color: var(--peach);
}

.roast-pair-cta.open {
  border-style: solid;
  border-color: var(--ember);
  background: rgba(var(--blood-rgb), 0.45);
  color: var(--peach);
}

.roast-pair-cta i {
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.roast-pair-cta.open i {
  transform: scale(1.15);
}

.roast-pair-body {
  margin-top: 16px;
  padding: 16px;
  box-sizing: border-box;
  text-align: left;
  background: linear-gradient(145deg, rgba(30, 8, 4, 0.7), rgba(0, 0, 0, 0.8));
  border: 1px solid rgba(var(--flame-rgb), 0.25);
  border-radius: var(--radius-md);
}

.roast-pair-note {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--peach-rgb), 0.55);
  margin: 0 0 16px;
}

.roast-pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.pair-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(20, 5, 3, 0.8);
  border: 1px solid rgba(var(--flame-rgb), 0.28);
  border-radius: var(--radius-md);
  color: rgba(var(--peach-rgb), 0.85);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.pair-pick:hover {
  border-color: var(--ember);
  transform: translateY(-3px);
}

.pair-pick.selected {
  background: rgba(var(--blood-rgb), 0.55);
  border-color: var(--ember);
  box-shadow: 0 0 16px rgba(var(--flame-rgb), 0.3);
}

.pair-pick-hanzi {
  font-size: var(--fs-md);
  line-height: 1;
  color: var(--tangerine);
}

.pair-pick-name {
  font-size: var(--fs-2xs);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.roast-pair-card {
  padding: 16px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid rgba(var(--ember-rgb), 0.5);
}

.roast-pair-card.code-good {
  border-left-color: rgba(255, 196, 0, 0.7);
}

.roast-pair-card.code-bad {
  border-left-color: rgba(var(--flame-rgb), 0.8);
}

.roast-pair-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pair-hanzi {
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--tangerine);
}

.pair-rel {
  font-size: var(--fs-2xs);
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--ember-rgb), 0.4);
  color: rgba(var(--peach-rgb), 0.9);
}

.pair-verdict {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: var(--tangerine);
  margin: 0 0 8px;
}

.pair-roast,
.dm-roast {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(var(--peach-rgb), 0.9);
  margin: 0 0 8px;
}

.pair-tip,
.dm-tip {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(255, 196, 0, 0.75);
  margin: 0;
}

.roast-dm-card {
  margin: 0 0 24px;
  padding: 16px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.42);
  border-left: 3px solid rgba(255, 196, 0, 0.6);
}

.roast-dm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dm-hanzi {
  font-size: var(--fs-xl);
  line-height: 1;
  color: #ffc400;
  text-shadow: 0 0 18px rgba(255, 196, 0, 0.3);
}

.dm-label {
  display: block;
  font-size: var(--fs-2xs);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(var(--peach-rgb), 0.45);
}

.dm-title {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  color: var(--tangerine);
}

.dm-headline {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: #ffc400;
  margin: 0 0 8px;
}

.roast-gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.roast-gender-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  box-sizing: border-box;
  background: rgba(20, 5, 3, 0.8);
  border: 1px solid rgba(var(--flame-rgb), 0.3);
  border-radius: var(--radius-md);
  color: rgba(var(--peach-rgb), 0.85);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.roast-gender-btn:hover {
  border-color: rgba(var(--ember-rgb), 0.65);
}

.roast-gender-btn.selected {
  background: rgba(var(--blood-rgb), 0.5);
  border-color: var(--ember);
  color: var(--peach);
  box-shadow: 0 0 16px rgba(var(--flame-rgb), 0.25);
}

.roast-chart {
  margin-bottom: 24px;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.chart-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(var(--flame-rgb), 0.2);
  border-radius: var(--radius-md);
  text-align: center;
}

.chart-value {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: #ffc400;
}

.chart-label {
  font-size: var(--fs-2xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(var(--peach-rgb), 0.45);
}

.sh-roast-pair-loading {
  padding: 16px 0;
}

.roast-chart .roast-dm-card + .roast-dm-card {
  margin-top: 12px;
}

.guardian-hero {
  text-align: center;
}
.guardian-icon-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.3);
  object-fit: cover;
  border: 2px solid var(--gold);
}

.guardian-category-full {
  grid-column: 1 / -1;
}

.guardian-feng-shui-list {
  margin: 0;
  padding-left: 20px;
  font-size: var(--fs-base);
  opacity: 0.9;
  line-height: 1.5;
}

.guardian-tradition {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.55);
  font-style: italic;
  text-align: center;
  margin: -8px 0 16px;
}

.guardian-side-note {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(var(--cream-rgb), 0.5);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(var(--gold-rgb), 0.15);
}

.guardian-meta-note {
  display: block;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.45);
  margin-top: 4px;
}

.category-box:nth-child(1) {
  animation-delay: 0.22s;
}

.category-box:nth-child(2) {
  animation-delay: 0.3s;
}

.category-box:nth-child(3) {
  animation-delay: 0.38s;
}

.category-box:nth-child(n + 4) {
  animation-delay: 0.46s;
}

.shio-item:hover {
  transform: translateY(-4px);
}

.cookie-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0 8px;
  min-height: 300px;
}

.cookie-stage.is-open {
  min-height: 0;
  padding-bottom: 0;
}

.cookie-stage.is-open .cookie,
.cookie-stage.is-open .cookie-hint {
  display: none;
}

.cookie-shio {
  text-align: center;
  margin-bottom: 8px;
  animation: cFadeIn 0.5s ease-out;
}

.cookie-shio-hanzi {
  display: block;
  font-size: var(--fs-xl);
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 20px rgba(var(--gold-rgb), 0.4);
}

.cookie-shio-name {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
  margin-top: 8px;
}

.cookie {
  position: relative;
  width: 220px;
  height: 200px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.cookie-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--gold-rgb), 0.28) 0%,
    rgba(var(--amber-rgb), 0.1) 45%,
    transparent 70%
  );
  animation: cPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

.cookie-half {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.7s ease;
}

.cookie-half-left {
  clip-path: inset(0 50% 0 0);
}

.cookie-half-right {
  clip-path: inset(0 0 0 50%);
}

.cookie:not(.cracked):hover .cookie-half {
  animation: cWiggle 0.5s ease-in-out infinite;
}

.cookie:not(.cracked):active .cookie-half {
  transform: scale(0.94);
}

.cookie.shaking .cookie-half,
.cookie.shaking:not(.cracked):hover .cookie-half {
  animation: cShake 0.45s ease-in-out;
}

.cookie.cracked {
  cursor: default;
}

.cookie.cracked .cookie-glow {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cookie.cracked .cookie-half-left {
  transform: translateX(-110px) rotate(-38deg);
  opacity: 0;
}

.cookie.cracked .cookie-half-right {
  transform: translateX(110px) rotate(38deg);
  opacity: 0;
}

.cookie-hint {
  color: rgba(var(--gold-rgb), 0.75);
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-sm);
  letter-spacing: 0.5px;
  margin: 8px 0 0;
  animation: cFloat 2s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.cookie-hint i {
  margin-right: 8px;
}

.cookie-hint.faded {
  opacity: 0;
}

.cookie-slip {
  background: linear-gradient(160deg, #fdf6e3 0%, #f3e6c8 55%, #e8d7ae 100%);
  border-radius: var(--radius-sm);
  padding: 0;
  margin: 0 auto;
  max-width: 520px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(var(--gold-rgb), 0.12);
  position: relative;
  overflow: hidden;
  transform-origin: top center;
  animation: cSlipOut 0.65s cubic-bezier(0.22, 1.2, 0.5, 1);
}

.cookie.sh-instant .cookie-half,
.cookie.sh-instant .cookie-glow {
  transition: none;
}

.cookie-slip.sh-instant {
  animation: none;
}

.slip-tear {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(180, 150, 90, 0.35) 0 6px,
    transparent 6px 12px
  );
  border-bottom: 1px dashed rgba(150, 120, 70, 0.45);
}

.slip-body {
  padding: 28px 32px 16px;
  text-align: center;
}

.slip-seal {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  color: var(--gold-deep);
  background: rgba(184, 134, 11, 0.12);
  border: 1px dashed rgba(184, 134, 11, 0.5);
}

.slip-message {
  color: #3b2f1c;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  line-height: 1.65;
  margin: 0 0 24px;
}

.slip-lucky {
  border-top: 1px dashed rgba(150, 120, 70, 0.45);
  border-bottom: 1px dashed rgba(150, 120, 70, 0.45);
  padding: 16px 8px;
  margin-bottom: 16px;
}

.slip-lucky-label {
  display: block;
  color: #8b6914;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.slip-lucky-text {
  color: #5c4a2a;
  font-size: var(--fs-base);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}

.slip-note {
  color: rgba(92, 74, 42, 0.7);
  font-size: var(--fs-xs);
  margin: 16px 0 0;
}

.slip-note i {
  margin-right: 4px;
}

@keyframes cFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cSlipOut {
  from { opacity: 0; transform: translateY(-30px) scaleY(0.75); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes cPulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes cFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes cWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

@keyframes cShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-7px) rotate(-5deg); }
  40% { transform: translateX(7px) rotate(5deg); }
  60% { transform: translateX(-5px) rotate(-3deg); }
  80% { transform: translateX(5px) rotate(3deg); }
}

.slip-energy {
  border-top: 1px dashed rgba(139, 105, 20, 0.35);
  margin-top: 16px;
  padding-top: 16px;
  text-align: left;
}

.slip-energy-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.slip-energy-pillar {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  color: #8b6914;
  letter-spacing: 1px;
}

.slip-energy-badge {
  font-size: var(--fs-2xs);
  letter-spacing: 0.3px;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 105, 20, 0.4);
  background: rgba(255, 252, 240, 0.55);
  color: #5c4a2a;
}

.slip-energy-badge.code-good {
  border-color: rgba(45, 106, 58, 0.45);
  background: rgba(45, 106, 58, 0.1);
  color: #2d6a3a;
}

.slip-energy-badge.code-bad {
  border-color: rgba(163, 51, 38, 0.45);
  background: rgba(163, 51, 38, 0.1);
  color: #a33326;
}

.slip-energy-desc {
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: rgba(59, 47, 28, 0.88);
  margin: 0 0 8px;
}

.slip-energy-pick {
  font-size: var(--fs-2xs);
  line-height: 1.6;
  color: #755810;
  font-style: italic;
  margin: 0 0 16px;
}

.slip-hoki {
  background: rgba(139, 105, 20, 0.07);
  border: 1px solid rgba(139, 105, 20, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.slip-hoki-reason {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(92, 74, 42, 0.85);
  margin: 8px 0 12px;
}

.slip-hoki-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 16px;
}

.slip-hoki-list li {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-xs);
}

.slip-hoki-list strong {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #755810;
  margin-bottom: 4px;
}

.slip-hoki-list span {
  color: #3b2f1c;
  line-height: 1.5;
}

.sh-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--cream);
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sh-hub-hanzi {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--sh-cinnabar);
}

.sh-hub-title {
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.3;
}

.sh-hub-text {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.7);
}

.sh-hub-card-wide {
  border-color: var(--gold);
  background:
    var(--sh-corners),
    linear-gradient(180deg, rgba(var(--sh-lacquer-rgb), 0.95), rgba(var(--sh-lacquer-rgb), 0.65) 70%, rgba(var(--sh-ink-rgb), 0.95));
}

.sh-hub-card-wide .sh-hub-hanzi {
  color: var(--sh-leaf);
}

.sh-almanac-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.sh-almanac-name {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: var(--fs-md);
  color: var(--gold);
}

.sh-daily-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  background: rgba(0, 0, 0, 0.4);
  font-size: var(--fs-2xl);
  cursor: pointer;
}

.board-overlay[hidden] {
  display: none;
}

.sh-result-target:focus {
  outline: none;
}

.destiny-oracle .destiny-text:last-child,
.destiny-oracle .destiny-note:last-child {
  margin-bottom: 0;
}

.quiz-review-title {
  font-family: "Noto Serif TC", serif;
  color: var(--gold);
  font-size: var(--fs-base);
  margin: 0 0 12px;
}

.quiz-review-text {
  margin: 0 0 12px;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.88);
}

.quiz-review-text:last-child {
  margin-bottom: 0;
}

.quiz-review-note {
  margin: 0;
  font-size: var(--fs-xs);
  font-style: italic;
  color: rgba(var(--cream-rgb), 0.65);
}
