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

:root, [data-theme="day"] {
  --paper: #f8f7f3;
  --ink: #171818;
  --muted: #75766f;
  --line: #d5d5cd;
  --accent: #66664c;
  --elevated: #ffffff;
  --theme-color: #f7f6f2;
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
}

[data-theme="night"] {
  --paper: #121312;
  --ink: #eeeee7;
  --muted: #a4a69c;
  --line: #2a2b28;
  --accent: #c4c4a8;
  --elevated: #1a1b19;
  --theme-color: #121312;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

.bh-shell { min-height: 100vh; display: flex; flex-direction: column; }
.bh-top {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px);
}
.bh-brand { display: flex; align-items: baseline; gap: 12px; cursor: pointer; }
.bh-brand-mark {
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -0.03em;
}
.bh-brand-sub {
  font-size: 11px; color: var(--muted); letter-spacing: 0.22em; text-transform: uppercase;
}
.bh-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bh-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--elevated);
}
.bh-chip b { color: var(--ink); font-weight: 600; }
.bh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 13px; transition: .18s;
}
.bh-btn:hover { border-color: var(--accent); color: var(--accent); }
.bh-btn-solid {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.bh-btn-solid:hover { opacity: .88; color: var(--paper); }
.bh-btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }

.bh-main { flex: 1; width: min(1080px, 100%); margin: 0 auto; padding: 48px 24px 80px; }
.bh-footer {
  border-top: 1px solid var(--line); padding: 28px 24px 40px;
  text-align: center; color: var(--muted); font-size: 13px;
}
.bh-footer .partners { margin-top: 8px; letter-spacing: 0.08em; color: var(--ink); }
.bh-footer .partners span { margin: 0 8px; }

.bh-wordmark {
  font-family: var(--sans); font-weight: 600; letter-spacing: -0.06em;
  font-size: clamp(48px, 12vw, 104px); line-height: 0.95; margin: 24px 0 12px;
}
.bh-lede {
  color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 42em; margin-bottom: 40px;
}
.bh-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 840px) { .bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bh-grid { grid-template-columns: 1fr; } }

.bh-card {
  display: block; padding: 22px 20px 20px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--elevated); transition: border-color .18s, transform .18s;
  min-height: 128px;
}
.bh-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.bh-card .kicker {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.bh-card .title {
  font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: 0.02em;
}
.bh-card .desc { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.55; }

.bh-section-title {
  font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 56px 0 16px;
}
.bh-panel {
  border: 1px solid var(--line); border-radius: 14px; background: var(--elevated); padding: 18px;
}
.bh-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.bh-field label { font-size: 12px; color: var(--muted); }
.bh-field input {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; outline: none;
}
.bh-field input:focus, .bh-field textarea:focus, .bh-field select:focus { border-color: var(--accent); }
.bh-field textarea, .bh-field select {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; outline: none; resize: vertical; min-height: 96px;
}
.bh-field select { min-height: auto; }
.bh-toggle {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; user-select: none;
}
.bh-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.bh-seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--paper);
}
.bh-seg button {
  border: 0; background: transparent; border-radius: 999px; height: 30px; padding: 0 14px;
  font-size: 12px; cursor: pointer; color: var(--muted);
}
.bh-seg button.on { background: var(--ink); color: var(--paper); }
.bh-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--elevated); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; display: none; max-width: min(360px, calc(100vw - 32px));
  box-shadow: 0 12px 40px color-mix(in srgb, var(--ink) 14%, transparent);
}
.bh-toast.show { display: block; }

.bh-muted { color: var(--muted); }
.bh-serif { font-family: var(--serif); }

/* WuShi */
.wushi-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--accent); background: var(--elevated); color: var(--ink);
  font-family: var(--serif); font-size: 15px; cursor: pointer;
  box-shadow: 0 12px 36px color-mix(in srgb, var(--ink) 12%, transparent);
}
.wushi-card {
  position: fixed; right: 20px; bottom: 88px; z-index: 40;
  width: min(360px, calc(100vw - 32px));
  background: var(--elevated); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: 0 20px 60px color-mix(in srgb, var(--ink) 14%, transparent);
}
.wushi-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.wushi-title { font-family: var(--serif); font-size: 18px; }
.wushi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.wushi-levels { display: flex; gap: 6px; height: 6px; margin-bottom: 10px; }
.wushi-levels span { flex: 1; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); position: relative; overflow: hidden; }
.wushi-levels span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--lvl, 0%); background: var(--accent); transition: width .08s linear; }
.wushi-log {
  height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; font-size: 12px; line-height: 1.55; background: var(--paper); margin-bottom: 10px;
}
.wushi-log .you { color: var(--ink); }
.wushi-log .bot { color: var(--accent); }
.wushi-log .sys { color: var(--muted); }
.wushi-actions, .wushi-ask { display: flex; gap: 8px; margin-bottom: 8px; }
.wushi-ask input {
  flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px;
}
.wushi-hint { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* nickname gate / auth modal */
.bh-modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 35%, transparent);
  display: grid; place-items: center; padding: 20px;
}
.bh-modal {
  width: min(420px, 100%); background: var(--elevated); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px;
}
.bh-modal h2 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.bh-modal p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.bh-modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.bh-timeline { display: flex; flex-direction: column; gap: 0; }
.bh-timeline-item {
  display: grid; grid-template-columns: 16px 1fr; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.bh-timeline-item:last-child { border-bottom: 0; }
.bh-dot {
  width: 10px; height: 10px; margin-top: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bh-timeline-item .when { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.bh-timeline-item .what { font-size: 14px; margin-top: 4px; }
.bh-timeline-item .detail { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

.site-hero { padding: 64px 0 24px; }
.site-hero h1 { font-family: var(--serif); font-size: clamp(32px, 6vw, 52px); font-weight: 500; letter-spacing: 0.01em; }
.site-hero p { margin-top: 14px; color: var(--muted); max-width: 36em; line-height: 1.7; }

.bh-card.bh-card-focus {
  outline: 2px solid var(--gold, #c4a35a);
  box-shadow: 0 0 0 6px rgba(196,163,90,.18);
  transform: translateY(-2px);
  transition: .25s ease;
}
