:root {
  --bg: #f6efe3;
  --bg-2: #fbf7ef;
  --card: rgba(255, 255, 255, 0.88);
  --card-strong: #ffffff;
  --border: #e8dcc8;
  --text: #2a2118;
  --muted: #7a6956;
  --brand: #8a4b18;
  --brand-2: #5f2f0f;
  --brand-soft: #fff4e5;
  --ok: #0f8b62;
  --warn: #9a3d2d;
  --shadow: 0 12px 36px rgba(75, 44, 16, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(138,75,24,0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

button, input {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.watermark-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(0deg, transparent 0%, rgba(0,0,0,0.01) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='240' viewBox='0 0 360 240'%3E%3Cg transform='rotate(-18 180 120)'%3E%3Ctext x='20' y='120' fill='%236a4a29' font-size='26' font-family='Arial, sans-serif' font-weight='700' letter-spacing='6'%3EWATBBS %E7%93%A6%E7%89%B9BBS%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 360px 240px;
}

.app-root {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 92px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(232, 220, 200, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.header-card {
  overflow: hidden;
}

.header-top {
  padding: 24px;
  border-bottom: 1px solid rgba(232, 220, 200, 0.9);
  background: linear-gradient(135deg, rgba(138,75,24,0.06), rgba(146,64,14,0.14));
}

.badge-row,
.action-row,
.nav-row,
.brand-line,
.meta-row,
.mobile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.brand-mark,
.pill,
.section-extra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
}

.badge-dark {
  background: #22160e;
  border-color: #22160e;
  color: #fff;
}

.badge-soft {
  background: var(--brand-soft);
  border-color: #edc98d;
  color: #8a4b18;
}

.badge-green {
  background: #ecfbf5;
  border-color: #9ee4c5;
  color: #0b7c55;
}

.brand-mark {
  background: #fff2dc;
  border-color: #e6c48b;
  color: #8a4b18;
}

.brand-mark.compact span:last-child { display: none; }

.hero-grid,
.two-col,
.three-col,
.five-col,
.quick-grid,
.panel-grid,
.card-grid,
.month-grid {
  display: grid;
  gap: 18px;
}

.hero-grid { grid-template-columns: 1.2fr 0.8fr; margin-top: 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.five-col { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.panel-grid { grid-template-columns: 1.05fr 0.95fr; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hero-title {
  margin: 12px 0 0;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-subtitle,
.muted {
  color: var(--muted);
}

.hero-subtitle {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.7;
}

.info-box,
.info-cell,
.soft-box,
.result-card,
.topic-card,
.time-card,
.month-day,
.panel,
.empty-state,
.search-row input,
.nav-button,
.footer-gap {
  border: 1px solid rgba(232, 220, 200, 0.9);
  border-radius: var(--radius-lg);
}

.info-box,
.info-cell,
.result-card,
.topic-card,
.time-card,
.month-day,
.panel,
.search-row input,
.nav-button {
  background: rgba(255,255,255,0.84);
}

.info-box,
.info-cell,
.soft-box,
.result-card,
.topic-card,
.time-card,
.panel,
.empty-state,
.month-day {
  padding: 16px;
}

.info-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.info-value {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.quick-panel {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 18px;
  background: linear-gradient(135deg, #2e2016 0%, #412719 55%, #7a4216 100%);
  color: #f7f2eb;
  box-shadow: var(--shadow);
}

.quick-panel .muted { color: rgba(247,242,235,0.72); }

.button,
.month-day,
.result-card,
.topic-card,
.time-card,
.mobile-nav button,
.preset-button {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button,
.preset-button,
.nav-button,
.icon-button {
  cursor: pointer;
}

.button,
.preset-button,
.icon-button,
.mobile-nav button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.button,
.preset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  font-weight: 600;
}

.button-dark,
.nav-button.active,
.mobile-nav button.active,
.preset-button.active {
  background: #23160d;
  border-color: #23160d;
  color: #fff;
}

.button-soft {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
}

.button:hover,
.preset-button:hover,
.month-day:hover,
.result-card:hover,
.topic-card:hover,
.time-card:hover,
.mobile-nav button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.nav-row {
  padding: 16px 24px 22px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 600;
}

.section {
  margin-top: 22px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #23160d;
  color: #fff;
  font-size: 16px;
}

.week-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.month-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-day {
  min-height: 102px;
  text-align: left;
}

.month-day.active {
  background: #23160d;
  color: #fff;
  border-color: #23160d;
}

.month-day .day-no {
  font-size: 18px;
  font-weight: 700;
}

.month-day .day-sub,
.month-day .day-meta,
.month-day .day-brand {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.month-day .day-sub,
.month-day .day-brand {
  color: inherit;
  opacity: 0.78;
}

.result-card .title,
.topic-card .title,
.time-card .title {
  font-size: 18px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
}

.soft-box {
  background: #fff4e5;
  border: 1px solid #edc98d;
}

.soft-box.green {
  background: #effcf5;
  border-color: #9ce2c4;
}

.soft-box.red {
  background: #fff1ef;
  border-color: #eab0a6;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
}

.result-list,
.topic-list,
.time-list {
  display: grid;
  gap: 12px;
}

.time-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.time-card.good {
  background: #effcf5;
  border-color: #9ce2c4;
}

.empty-state {
  background: rgba(255,255,255,0.7);
  border-style: dashed;
  color: var(--muted);
}

.mobile-nav-shell {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px 12px 14px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(232, 220, 200, 0.9);
  display: none;
}

.mobile-nav-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.mobile-nav {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mobile-nav button {
  min-height: 54px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
}

.mobile-nav button span {
  display: block;
  margin-top: 4px;
}

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

.desktop-only { display: inline-flex; }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .hero-grid,
  .panel-grid,
  .two-col,
  .three-col,
  .five-col,
  .card-grid,
  .time-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-root { padding-bottom: 108px; }
  .hero-grid,
  .panel-grid,
  .two-col,
  .three-col,
  .five-col,
  .card-grid,
  .time-list {
    grid-template-columns: 1fr;
  }
  .month-grid { gap: 8px; }
  .month-day { min-height: 86px; padding: 10px; }
  .week-head { gap: 8px; }
  .header-top,
  .nav-row { padding-left: 16px; padding-right: 16px; }
  .mobile-nav-shell { display: block; }
  .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 15px; }
  .badge-row { gap: 8px; }
  .quick-grid { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .month-day .day-meta,
  .month-day .day-brand { display: none; }
}
