@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/noto-serif-sc/noto-serif-sc-chinese-simplified-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #f8efe3;
  --bg-strong: #f2e4d3;
  --paper: #fffaf3;
  --paper-soft: #fff4e7;
  --paper-muted: rgba(255, 249, 241, 0.84);
  --line: #e7d3bf;
  --line-strong: #d9b99d;
  --ink: #3d2415;
  --ink-soft: #7f604b;
  --ink-faint: #a1826d;
  --brand: #f47b2c;
  --brand-deep: #df6520;
  --brand-soft: #ffe0c6;
  --mint: #d7efe6;
  --mint-strong: #9acdbd;
  --shadow-lg: 0 28px 70px rgba(124, 72, 32, 0.12);
  --shadow-md: 0 16px 34px rgba(124, 72, 32, 0.08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1460px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 123, 44, 0.18), transparent 22%),
    radial-gradient(circle at 100% 14%, rgba(177, 223, 210, 0.24), transparent 20%),
    linear-gradient(180deg, #f9efe2 0%, #f4e6d4 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

.theme-page {
  width: min(var(--max-width), calc(100vw - 32px));
  margin: 18px auto 36px;
  position: relative;
  z-index: 1;
}

.theme-window,
.theme-card,
.theme-panel {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(255, 245, 236, 0.92) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.theme-window {
  border-radius: 36px;
  overflow: hidden;
}

.theme-card,
.theme-panel {
  border-radius: var(--radius-lg);
}

.theme-panel {
  padding: 22px;
}

.brand-mark {
  font-family: "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.brand-copy,
.eyebrow,
.micro-kicker,
.section-kicker,
.stat-kicker,
.mono-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow,
.section-kicker {
  color: #b66c38;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(231, 211, 191, 0.7);
  background: rgba(255, 249, 241, 0.72);
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.board-nav,
.topbar-nav,
.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.nav-link,
.top-link {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.nav-link.active,
.top-link.active {
  color: var(--brand-deep);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff8ef;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary,
.btn.main {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #ff8e41 0%, #f36e24 100%);
  box-shadow: 0 16px 28px rgba(243, 110, 36, 0.22);
}

.btn-secondary,
.btn.ghost {
  background: rgba(255, 255, 255, 0.82);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  padding: 18px 24px;
  border-top: 1px solid rgba(231, 211, 191, 0.72);
  background: rgba(255, 249, 241, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer-brand,
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.site-footer-brand strong {
  color: var(--ink);
  font-weight: 900;
}

.site-footer-links a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-links a:hover {
  color: var(--brand-deep);
}

.site-footer-security-slot[hidden] {
  display: none !important;
}

.btn-soft {
  background: var(--paper-soft);
  color: var(--brand-deep);
  border-color: rgba(243, 110, 36, 0.16);
}

.chip,
.soft-chip,
.status-chip,
.type-pill,
.feature-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(231, 211, 191, 0.9);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.soft-chip {
  background: var(--brand-soft);
  color: #a34e18;
  border-color: rgba(223, 101, 32, 0.14);
}

.status-chip.mint {
  background: #e7f7f0;
  color: #447968;
  border-color: rgba(140, 198, 179, 0.28);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 14px;
}

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

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

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

.title-display,
.section-title,
.hero-title {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  color: var(--ink);
  letter-spacing: -0.05em;
}

.title-display {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
}

.section-title {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
}

.lead,
.muted,
.sub-copy,
.section-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.mono-label {
  font-family: "JetBrains Mono", monospace;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff3e3 0%, #ffe4ce 100%);
  color: var(--brand-deep);
  font-size: 24px;
}

.pet-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.pet-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(231, 211, 191, 0.9);
  background: rgba(255, 250, 243, 0.86);
  box-shadow: var(--shadow-md);
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  color: var(--brand-deep);
  font-family: "Noto Serif SC", serif;
}

.field,
label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(231, 211, 191, 0.95);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(243, 110, 36, 0.18);
  outline-offset: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  min-width: 220px;
  max-width: min(90vw, 520px);
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(61, 36, 21, 0.94);
  color: #fff8f2;
  text-align: center;
  box-shadow: 0 20px 42px rgba(38, 19, 10, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1100px) {
  .grid-4,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .theme-page {
    width: min(var(--max-width), calc(100vw - 20px));
    margin: 10px auto 24px;
  }

  .topbar {
    padding: 14px 16px;
  }

  .topbar,
  .board-nav,
  .topbar-nav {
    align-items: flex-start;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
