/* 探花 TANHUA — official site styles */
:root {
  --bg: #FFF6F4;
  --deep: #FFFFFF;
  --paper: #FFFFFF;
  --soft: #F8E8E4;
  --ink: #3A1518;
  --text: #4A2428;
  --muted: #7A4E52;
  --assist: #A0787C;
  --rose: #E35D6A;
  --blush: #F08A92;
  --gold: #C9A227;
  --peach: #F3B4B0;
  --line: rgba(227, 93, 106, 0.18);
  --shadow: 0 14px 34px rgba(58, 21, 24, 0.08);
  --grad: linear-gradient(135deg, #F08A92 0%, #E35D6A 52%, #C94A56 100%);
  --max: 1160px;
  --seal-h: 28px;
  --yard-h: 64px;
  --path-h: 44px;
  --dock-h: 50px;
  --radius: 18px;
  --radius-sm: 16px;
  --top-desk: 136px;
  --top-mob: 92px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--rose);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
}

.seal {
  height: var(--seal-h);
  background: var(--rose);
  color: #fff;
  display: flex;
  align-items: center;
}

.seal .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 32px));
}

.seal-brand {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #fff;
  font-weight: 600;
}

.seal-search {
  min-width: 44px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 0 8px;
}

.seal-search:hover,
.seal-search:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.yard {
  height: var(--yard-h);
  background: #FFF8F6;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.yard .wrap {
  display: grid;
  grid-template-columns: 72px 1fr 110px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
}

.menu-btn,
.app-link {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  padding: 0 14px;
}

.menu-btn:hover,
.app-link:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.brand-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-center a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-logo {
  height: 34px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.brand-word {
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.18em;
  font-weight: 600;
}

.pathbar {
  height: var(--path-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.pathbar nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.pathbar a {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.pathbar a.is-current,
.pathbar a:hover {
  color: var(--ink);
}

.pathbar a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--rose);
}

.site-main {
  padding-top: calc(var(--top-desk) + 28px);
  padding-bottom: 48px;
  min-height: 70vh;
}

body.is-locked {
  overflow: hidden;
  height: 100%;
}

.hero-card,
.panel,
.card,
.clause,
.faq-item,
.book-row,
.motif-cell,
.path-item,
.step,
.node,
.num-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 36px 32px 28px;
  margin-bottom: 28px;
}

.kicker {
  color: var(--rose);
  letter-spacing: 0.24em;
  font-size: 13px;
  margin: 0 0 10px;
}

h1 {
  font-size: 30px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 650;
}

h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 12px;
}

h3 {
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--text);
}

.lead {
  font-size: 16px;
  color: var(--text);
  max-width: 46em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.03);
}

.btn-ghost {
  background: #fff;
  color: var(--rose);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.slot {
  background: var(--soft);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-banner {
  max-height: 340px;
  min-height: 180px;
}

.slot img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.slot-wide {
  min-height: 200px;
  margin: 8px 0 18px;
}

.slot-wide img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.slot-square img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 32px;
}

.path-item {
  padding: 18px 16px 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.dot-rose { background: var(--rose); }
.dot-gold { background: var(--gold); }
.dot-peach { background: var(--peach); }

.path-item p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.path-item a {
  color: var(--ink);
  font-weight: 600;
  display: inline-block;
  min-height: 28px;
}

.look-grid,
.three,
.field-list,
.motif-grid,
.book-list,
.num-list,
.time-list,
.steps,
.clause-list {
  display: grid;
  gap: 16px;
}

.look-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  margin: 12px 0 32px;
}

.look-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.look-item strong {
  color: var(--rose);
  font-size: 18px;
}

.three {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 32px;
}

.card {
  padding: 18px;
}

.card h3 a {
  color: var(--ink);
}

.field-list {
  grid-template-columns: 1fr 1fr;
}

.field-item,
.book-row,
.num-block,
.node,
.step,
.clause,
.faq-item {
  padding: 20px 22px;
}

.motif-grid {
  grid-template-columns: repeat(3, 1fr);
}

.motif-cell {
  padding: 22px 18px;
  min-height: 160px;
}

.num-block {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: start;
}

.big-num {
  font-size: 36px;
  color: var(--rose);
  line-height: 1;
  font-weight: 700;
}

.time-list {
  position: relative;
  padding-left: 18px;
}

.time-list::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--peach);
}

.node {
  position: relative;
  margin-left: 18px;
}

.node::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px #fff;
}

.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.tag-done { background: var(--rose); color: #fff; }
.tag-work { background: var(--gold); color: #fff; }
.tag-wait { background: var(--muted); color: #fff; }

.section {
  margin: 0 0 36px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.more {
  color: var(--rose);
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.panel {
  padding: 28px 26px;
  margin-bottom: 24px;
}

.article p + p {
  text-indent: 0;
}

.index-block {
  margin-bottom: 36px;
}

.site-foot {
  background: var(--ink);
  color: #F8E8E4;
  padding: 36px 0 28px;
}

.site-foot a {
  color: #F8E8E4;
}

.site-foot a:hover {
  color: #F3B4B0;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.foot-brand img {
  height: 34px;
  width: auto;
  max-width: 160px;
  background: #fff;
  border-radius: 8px;
  padding: 2px 8px;
}

.foot-name {
  font-size: 18px;
  letter-spacing: 0.16em;
}

.foot-en {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #F3B4B0;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.foot-cols h3 {
  color: #F3B4B0;
  font-size: 14px;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.foot-cols a {
  display: block;
  min-height: 32px;
  font-size: 14px;
}

.foot-note,
.foot-copy {
  margin-top: 22px;
  color: #F8E8E4;
  font-size: 13px;
  line-height: 1.7;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 21, 24, 0.38);
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlay.is-on {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 88%;
  height: 100%;
  background: #fff;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(16px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.drawer.is-on {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  opacity: 1;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.drawer-head img {
  height: 28px;
  width: auto;
}

.drawer-close,
.search-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: var(--soft);
  border-radius: 999px;
  color: var(--ink);
}

.drawer-group {
  padding: 16px 18px 8px;
}

.drawer-group h3 {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--rose);
}

.drawer-link {
  display: block;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
}

.drawer-link strong {
  display: block;
  color: var(--ink);
}

.drawer-link span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.search-layer {
  position: fixed;
  left: 50%;
  top: calc(var(--seal-h) + var(--yard-h) + 12px);
  transform: translateX(-50%);
  width: min(640px, calc(100% - 32px));
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 110;
  padding: 18px;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.search-layer.is-on {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.search-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.search-box {
  display: flex;
  gap: 8px;
}

.search-box input {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
}

.search-box button {
  min-height: 44px;
  min-width: 72px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
}

.search-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.search-presets a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
}

.dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 70;
  grid-template-columns: repeat(5, 1fr);
}

.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 44px;
}

.dock a.is-current {
  color: var(--rose);
  font-weight: 700;
}

.type-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.type-index a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
}

.editor-mark {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

@media (max-width: 980px) {
  .grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
  .look-grid,
  .three,
  .field-list,
  .motif-grid,
  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .pathbar {
    display: none;
  }
  .site-main {
    padding-top: calc(var(--top-mob) + 20px);
    padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 28px);
  }
  .site-foot {
    padding-bottom: calc(28px + var(--dock-h) + env(safe-area-inset-bottom));
  }
  .dock {
    display: grid;
  }
  h1 {
    font-size: 26px;
  }
  .hero-card,
  .panel {
    padding: 22px 16px;
  }
  .grid-8,
  .look-grid,
  .three,
  .field-list,
  .motif-grid,
  .foot-cols,
  .num-block {
    grid-template-columns: 1fr;
  }
  .yard .wrap {
    grid-template-columns: 56px 1fr 88px;
    width: calc(100% - 24px);
  }
  .search-layer {
    inset: 0;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    padding: 20px 16px;
  }
  .drawer {
    width: 88%;
  }
}
