@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@500;700;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --ink: #17324d;
  --gold: #d99520;
  --sun: #f8c648;
  --jade: #27a681;
  --coral: #e8644f;
  --paper: #fffdf6;
  --mute: #48677f;
  --body: #34556f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,250,232,0.92) 34%, rgba(229,248,242,0.88) 67%, rgba(255,255,255,0.98)),
    repeating-linear-gradient(112deg, rgba(248,198,72,0.12) 0 1px, transparent 1px 44px);
  min-height: 100vh;
}

.serif { font-family: 'Noto Serif SC', serif; }
.seal { font-family: 'Ma Shan Zheng', cursive; }

.sun-title {
  background: linear-gradient(90deg, #d99520, #e8644f 42%, #27a681 78%, #17324d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel {
  background: rgba(255, 253, 246, 0.84);
  border: 1px solid rgba(217, 149, 32, 0.22);
  box-shadow: 0 22px 60px rgba(23, 50, 77, 0.10);
  backdrop-filter: blur(14px);
  border-radius: 8px;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,149,32,0.58), rgba(39,166,129,0.5), transparent);
}

.emotion-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 8px;
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}
.emotion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.16));
  pointer-events: none;
}
.emotion-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5px;
  background: var(--accent);
}
.emotion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(23, 50, 77, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 246, 0.88);
  border-bottom: 1px solid rgba(217, 149, 32, 0.22);
  backdrop-filter: blur(16px);
}

.nav-scroll {
  scrollbar-width: none;
}
.nav-scroll::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  color: #34556f;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.1rem;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: #d99520; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  background: linear-gradient(90deg, #d99520, #27a681);
}

.drawer {
  transform: translateX(100%);
  transition: transform 0.32s ease;
}
.drawer.open { transform: translateX(0); }
.overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.quote {
  font-style: italic;
  color: var(--mute);
  line-height: 1.9;
}

.chip {
  border: 1px solid rgba(217,149,32,0.28);
  background: rgba(255,255,255,0.72);
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}

.tab-btn.active {
  background: #17324d;
  color: #fffdf6;
  border-color: #17324d;
}

.test-option.selected {
  background: #fff7dc;
  border-color: #d99520 !important;
}

.danger { color: #c23f30; }

table.canon {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.canon th, table.canon td {
  border: 1px solid rgba(217,149,32,0.22);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
table.canon th {
  background: rgba(255,247,220,0.7);
  font-weight: 700;
}

.mantra-box {
  background: rgba(255,247,220,0.55);
  border: 1px solid rgba(217,149,32,0.28);
  border-radius: 8px;
  text-align: center;
  padding: 1.4rem 1rem;
  line-height: 1.9;
}

.count-digit {
  font-size: 4.6rem;
  line-height: 1;
  font-weight: 800;
  color: #17324d;
}

.lock-panel {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.2rem;
  background: rgba(255,253,246,0.9);
  border: 1px dashed rgba(217,149,32,0.45);
  border-radius: 8px;
}
.lock-panel input {
  width: 100%;
  max-width: 280px;
  border: 1px solid rgba(217,149,32,0.35);
  background: #fff;
  padding: 0.65rem 0.9rem;
  text-align: center;
  letter-spacing: 0.12em;
}
.prose-card p + p { margin-top: 0.7rem; }
.toc a { color: #34556f; }
.toc a:hover { color: #d99520; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .emotion-card { transition: none; }
}
