/* FunnyHub 外壳层：深底 #101018、荧光绿 #d8ff62、16px 圆角。
   只覆盖配色 token 与页头 / 页脚 / 主按钮 / 面板外观，不改卡片本体：
   #card-canvas 的纸张、花纹、邮戳与 canvas 内写死的字体全部保持原样。
   加载顺序必须排在 life-list.css 之后。 */

:root {
  --bg: #101018;
  --bg-soft: #0b0b10;
  --panel: #171722;
  --panel-2: #1d1d29;
  --ink: #f6f5fb;
  --muted: #b4b3c1;
  --faint: #9a99a9;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold: #d8ff62;
  --gold-deep: #b9dd45;
  --warn: #ff9bb2;
  --ok: #d8ff62;
  --radius: 16px;

  --fh-bar: #0b0b10;
  --fh-line: rgba(216, 255, 98, 0.16);
  --fh-ink: #15151b;
  --fh-dim: #b4b3c1;

  --sans: 'DM Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
}

body {
  background: var(--bg);
  font-family: var(--sans);
}

.container {
  width: min(calc(100% - 32px), 1120px);
  margin-inline: auto;
}

.skip-link {
  background: var(--gold);
  color: var(--fh-ink);
  border-radius: 10px;
}

/* ---------- 页头 ---------- */

.site-header {
  background: var(--fh-bar);
  border-bottom: 1px solid var(--fh-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--gold);
  color: var(--fh-ink);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 0.9rem;
}

.brand-home,
.brand-sub {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
}

.brand-home {
  color: #fff;
}

.brand-accent {
  color: var(--gold);
}

.brand-sep {
  color: #4a4a58;
  font-weight: 400;
}

.brand-sub {
  color: var(--fh-dim);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-home:hover,
.brand-sub:hover {
  color: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--fh-dim);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-fh {
  margin-left: 6px;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--fh-ink);
  font-weight: 700;
}

.nav-fh::after {
  content: "\2192";
  margin-left: 6px;
}

/* ---------- 编辑区外壳 ---------- */

.panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.panel-title,
.preview-head h2 {
  font-weight: 600;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.eyebrow {
  color: var(--gold);
}

.field input,
.field textarea {
  border-color: rgba(255, 255, 255, 0.14);
  background: #0d0d14;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7f7e8d;
}

.field input:focus,
.field textarea:focus,
.item-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 255, 98, 0.16);
}

.mini-btn {
  border-color: rgba(216, 255, 98, 0.35);
  color: var(--gold);
}

.mini-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(216, 255, 98, 0.08);
}

/* ---------- 主按钮 ---------- */

.btn {
  border-radius: 12px;
}

.btn-primary {
  background: var(--gold);
  color: var(--fh-ink);
}

.btn-primary:hover:not(:disabled) {
  background: #c9f04f;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: clamp(48px, 7vw, 76px);
  border-top: 1px solid var(--fh-line);
  background: var(--fh-bar);
  color: var(--fh-dim);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  padding-bottom: 28px;
  font-size: 0.78rem;
}

.footer-brand {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
}

.footer-text {
  margin: 6px 0 0;
  max-width: 34ch;
  color: #8f8f9e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fh-dim);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-meta {
  margin: 0;
  flex-basis: 100%;
  color: #6f6f7e;
  font-size: 0.7rem;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (hover: hover) {
  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .nav-fh:hover {
    background: var(--gold);
    color: var(--fh-ink);
    filter: brightness(0.94);
  }
}

@media (max-width: 480px) {
  .site-nav .nav-tools {
    display: none;
  }

  .nav-fh {
    margin-left: 0;
    padding: 8px 12px;
  }

  .brand {
    gap: 8px;
  }
}
