:root {
  --bg: #f3efe6;
  --ink: #1a1714;
  --muted: #6f675e;
  --line: #e4dccf;
  --card: #fffdf8;
  --accent: #d94a2b;
  --accent-dark: #b3381d;
  --accent-soft: #fff1ea;
  --green: #1f7a5c;
  --green-bg: #e7f5ef;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --danger: #a32626;
  --danger-bg: #fde8e8;
  --shadow: 0 16px 40px rgba(48, 32, 16, 0.08);
  --radius: 18px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }

.btn {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff8f3;
  font-weight: 700;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: white; }
.btn.small { height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.btn.good { background: var(--green); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #f0c8c8; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span, .label { font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: white;
}
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; padding: 0; }
textarea { height: 88px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(217, 74, 43, 0.35); border-color: var(--accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 20;
  max-width: min(90vw, 420px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  color: #5c3318;
}
.callout.green { background: var(--green-bg); border-color: var(--green); color: #145443; }
.muted { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; }
.badge.active, .badge.paid { background: var(--green-bg); color: var(--green); }
.badge.rejected, .badge.disabled { background: var(--danger-bg); color: var(--danger); }

.page-land {
  background:
    radial-gradient(900px 420px at 0% -10%, #ffd7c8 0%, transparent 60%),
    radial-gradient(700px 380px at 100% 0%, #d9f3e8 0%, transparent 55%),
    var(--bg);
}
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; }
.seal {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: white; font-weight: 800;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; padding: 28px 0 64px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.04em; }
.hero .lead { margin-top: 18px; font-size: 18px; color: #3d3832; max-width: 40rem; }
.actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; }
.step + .step { border-top: 1px solid var(--line); }
.num { width: 36px; height: 36px; border-radius: 12px; background: var(--ink); color: white; display: grid; place-items: center; font-weight: 800; }
.steps-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; padding-bottom: 72px; }
.foot { padding: 18px 0 32px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.foot a { color: var(--muted); }

.page-hall { background: #ebe4d6; }
.phone { width: min(480px, 100%); margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 14px 14px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; position: sticky; top: 0; background: rgba(243, 239, 230, 0.92); backdrop-filter: blur(10px); padding: 8px 0 12px; z-index: 3; }
.eyebrow { color: var(--muted); font-size: 12px; }
.topbar h1 { font-size: 28px; letter-spacing: -0.04em; }
.textlink { color: var(--accent); text-decoration: none; font-weight: 700; }
.search { margin: 4px 0 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: white; white-space: nowrap; }
.chip.on { background: var(--ink); color: white; border-color: var(--ink); }
.count { color: var(--muted); font-size: 13px; margin: 8px 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gcard { background: var(--card); border-radius: 18px; overflow: hidden; border: 1px solid rgba(228, 220, 207, 0.9); box-shadow: 0 8px 20px rgba(48, 32, 16, 0.04); }
.cover { aspect-ratio: 1; background: #efe6d8; display: grid; place-items: center; color: var(--accent); font-size: 32px; font-weight: 800; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.gcard .meta, .pcard .meta { padding: 10px; }
.gcard h3, .pcard h3 { font-size: 15px; line-height: 1.35; min-height: 40px; }
.gcard .btn, .pcard .play { width: 100%; margin-top: 8px; }
.feature-row { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.feature-row .gcard h3 { min-height: 0; }
.more { width: 100%; margin-top: 14px; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }
.detail { position: fixed; inset: 0; background: var(--bg); z-index: 5; overflow: auto; }
.detail-inner { width: min(480px, 100%); margin: 0 auto; padding: 14px 14px 28px; }
.shot-row { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; }
.shot-row img { width: 180px; height: 320px; object-fit: cover; border-radius: 16px; background: #efe6d8; }
.playbar { position: sticky; bottom: 0; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 28%); }
.desc { margin-top: 10px; color: #3f3933; white-space: pre-wrap; }

.auth-card, .promo-app { width: min(560px, calc(100% - 28px)); margin: 32px auto; }
.auth-card, .section-card, .statgrid article, .panel { background: var(--card); }
.auth-card { border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.stack { display: grid; gap: 12px; }
.promo-app { width: min(960px, calc(100% - 28px)); }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.statgrid article { border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.statgrid strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.sharebox { background: var(--ink); color: white; border-radius: 22px; padding: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.sharebox p { color: rgba(255,255,255,0.72); font-size: 13px; word-break: break-all; }
.subnav { display: flex; gap: 8px; margin: 14px 0; overflow-x: auto; }
.subnav button.on { background: var(--ink); color: white; border-color: var(--ink); }
.pcard { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: white; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rate { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }

.page-admin { background: #efeae1; }
.boot { padding: 24px; color: var(--muted); }
.admin-shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.admin-shell aside { padding: 18px 12px; background: #1a1714; color: white; }
.admin-shell aside .brand { padding: 6px 8px 16px; }
.admin-shell nav { display: grid; gap: 4px; }
.admin-shell nav button { text-align: left; background: transparent; color: rgba(255,255,255,0.78); border: 0; border-radius: 10px; height: 40px; padding: 0 10px; }
.admin-shell nav button.on, .admin-shell nav button:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-main { padding: 18px 22px 40px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #faf7f2; }
.thumb { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: #efe6d8; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { display: block; width: 100%; max-width: 26px; background: var(--accent); border-radius: 8px 8px 3px 3px; }
.bar em { font-style: normal; font-size: 11px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kpis article { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.kpis strong { display: block; font-size: 26px; letter-spacing: -0.04em; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); }

@media (max-width: 860px) {
  .hero, .steps-grid, .filters, .kpis { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-shell aside { position: sticky; top: 0; z-index: 4; }
  .admin-shell nav { display: flex; overflow-x: auto; }
  .admin-shell nav button { white-space: nowrap; }
  .statgrid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
