/* 饭搭子官网 · 微圆 8px 暖纸视觉体系（对齐 client/lib/app/app_theme.dart 与 ops.css） */
:root {
  color-scheme: light dark;
  --brand: #FF7A45;
  --brand-deep: #E8622C;
  --brand-soft: #FFEEE6;
  --brand-tint: #FFF4EE;
  --brand-border: #FFD6C3;

  --bg: #FFFBF6;
  --surface: #FFFFFF;
  --surface-warm: #F6EFE6;
  --surface-sub: #FBF6F0;

  --ink: #241D18;
  --ink-2: #5E534B;
  --ink-3: #8C7F74;

  --line: #F1E4D9;
  --line-strong: #E4D4C6;
  --dot: rgba(160, 112, 72, 0.085);

  --green: #16A34A;
  --green-soft: #ECFDF5;
  --green-line: #BBF7D0;
  --warn-bg: #FFF7ED;
  --warn-line: #FDBA74;
  --warn-ink: #9A3412;

  --header-bg: rgba(255, 251, 246, 0.88);
  --shadow-sm: 0 2px 8px rgba(36, 29, 24, 0.04);
  --shadow-md: 0 12px 28px rgba(36, 29, 24, 0.08);
  --shadow-phone: 0 22px 48px rgba(36, 29, 24, 0.14);

  --r-card: 8px;
  --r-ctrl: 6px;
  --r-chip: 4px;
  --r-logo: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  --brand: #FF8A5B;
  --brand-deep: #FFA077;
  --brand-soft: rgba(255, 122, 69, 0.18);
  --brand-tint: rgba(255, 122, 69, 0.10);
  --brand-border: rgba(255, 138, 91, 0.36);

  --bg: #1A1512;
  --surface: #251E19;
  --surface-warm: #2F2620;
  --surface-sub: #211B17;

  --ink: #F5ECE4;
  --ink-2: #C2B5A9;
  --ink-3: #8F8175;

  --line: #362C24;
  --line-strong: #4A3D32;
  --dot: rgba(255, 232, 208, 0.06);

  --green: #4ADE80;
  --green-soft: rgba(22, 163, 74, 0.16);
  --green-line: rgba(74, 222, 128, 0.32);
  --warn-bg: rgba(234, 88, 12, 0.16);
  --warn-line: rgba(251, 146, 60, 0.42);
  --warn-ink: #FDBA74;

  --header-bg: rgba(26, 21, 18, 0.88);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.38);
  --shadow-phone: 0 24px 54px rgba(0, 0, 0, 0.52);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #FF8A5B;
    --brand-deep: #FFA077;
    --brand-soft: rgba(255, 122, 69, 0.18);
    --brand-tint: rgba(255, 122, 69, 0.10);
    --brand-border: rgba(255, 138, 91, 0.36);
    --bg: #1A1512;
    --surface: #251E19;
    --surface-warm: #2F2620;
    --surface-sub: #211B17;
    --ink: #F5ECE4;
    --ink-2: #C2B5A9;
    --ink-3: #8F8175;
    --line: #362C24;
    --line-strong: #4A3D32;
    --dot: rgba(255, 232, 208, 0.06);
    --green: #4ADE80;
    --green-soft: rgba(22, 163, 74, 0.16);
    --green-line: rgba(74, 222, 128, 0.32);
    --warn-bg: rgba(234, 88, 12, 0.16);
    --warn-line: rgba(251, 146, 60, 0.42);
    --warn-ink: #FDBA74;
    --header-bg: rgba(26, 21, 18, 0.88);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.38);
    --shadow-phone: 0 24px 54px rgba(0, 0, 0, 0.52);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.24s ease, color 0.24s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-deep); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
main { flex: 1; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.container-narrow { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--r-logo);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.brand-ver {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-chip);
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  color: var(--brand-deep);
  font-family: var(--font-mono);
}
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-warm);
  padding: 3px;
  border-radius: var(--r-ctrl);
  border: 1px solid var(--line);
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.16s ease;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(36, 29, 24, 0.08);
}
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-ctrl);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-deep); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-ctrl);
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: all 0.16s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.24);
}
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); color: #FFFFFF; }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-tint); }
.btn-soft { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand-border); }
.btn-soft:hover { background: var(--brand-soft); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero { padding: 54px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 44px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: var(--r-chip);
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  color: var(--brand-deep);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 18px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hand-underline { position: relative; display: inline-block; z-index: 1; }
.hand-underline::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: 3px;
  height: 11px;
  background: var(--brand-soft);
  border-radius: 3px;
  z-index: -1;
  transform: rotate(-0.6deg);
}
.hero-lead { margin: 0 0 26px; font-size: 16px; color: var(--ink-2); max-width: 500px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; color: var(--ink-3); }
.trust-item { display: inline-flex; align-items: center; gap: 6px; }
.trust-check { color: var(--green); font-weight: 800; }

/* Interactive Phone */
.phone-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-switcher {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 4px; box-shadow: var(--shadow-sm);
}
.phone-tab {
  border: 0; background: transparent; padding: 5px 12px;
  border-radius: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: all 0.16s ease;
}
.phone-tab.active { background: var(--brand); color: #FFFFFF; }
.phone-frame {
  width: 100%; max-width: 344px; background: #1C1815;
  border-radius: 30px; padding: 10px; box-shadow: var(--shadow-phone);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.phone-screen {
  background: var(--bg); border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line); min-height: 506px; display: flex; flex-direction: column;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px 6px; font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.phone-appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px 10px; border-bottom: 1px solid var(--line);
}
.phone-seg { display: inline-flex; background: var(--surface-warm); border-radius: 6px; padding: 2px; gap: 2px; }
.phone-seg span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; color: var(--ink-2); }
.phone-seg span.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.phone-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.phone-panel { display: none; flex-direction: column; gap: 10px; }
.phone-panel.active { display: flex; animation: fadeIn 0.2s ease; }

.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.m-photo-wrap { position: relative; height: 124px; overflow: hidden; background: var(--surface-warm); }
.m-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.m-photo-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 14, 10, 0.72) 0%, rgba(20, 14, 10, 0.12) 52%, transparent 100%);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 11px; color: #FFF;
}
.m-photo-title { font-weight: 800; font-size: 14px; line-height: 1.25; }
.m-photo-sub { font-size: 11px; opacity: 0.88; }
.m-card-body { padding: 10px 11px; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.avatars { display: inline-flex; align-items: center; }
.av {
  width: 24px; height: 24px; border-radius: 50%; color: #FFF; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface); margin-left: -6px;
}
.av:first-child { margin-left: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
}
.chip-green { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.chip-brand { background: var(--brand-tint); color: var(--brand-deep); border: 1px solid var(--brand-border); }
.chip-muted { background: var(--surface-warm); color: var(--ink-2); border: 1px solid var(--line); }
.m-price { font-size: 15px; font-weight: 800; color: var(--brand-deep); font-family: var(--font-mono); }
.m-meta { font-size: 11.5px; color: var(--ink-3); }

.rsvp-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.rsvp-btn {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px;
  padding: 6px 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); transition: all 0.14s ease;
}
.rsvp-btn.selected { background: var(--brand); border-color: var(--brand); color: #FFF; }
.split-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); cursor: pointer; transition: border-color 0.14s ease;
}
.split-row:hover { border-color: var(--brand-border); }
.split-progress { height: 6px; background: var(--surface-warm); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.split-progress-fill { height: 100%; background: var(--green); transition: width 0.25s var(--ease); }

.mini-map {
  position: relative; height: 140px; border-radius: 6px; border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 48%, var(--line) 49%, var(--line) 50%, transparent 51%),
    linear-gradient(0deg, transparent 48%, var(--line) 49%, var(--line) 50%, transparent 51%),
    var(--surface-sub);
  background-size: 36px 36px; overflow: hidden;
}
.map-pin {
  position: absolute; background: var(--brand); color: #FFF; font-size: 10.5px; font-weight: 700;
  padding: 3px 7px; border-radius: 4px; box-shadow: 0 3px 8px rgba(232, 98, 44, 0.28); white-space: nowrap;
}
.map-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px;
  background: var(--brand); transform: translateX(-50%) rotate(45deg); z-index: -1;
}
.phone-nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 7px 4px 9px; text-align: center; font-size: 10.5px; color: var(--ink-3);
}
.phone-nav button {
  border: 0; background: transparent; display: flex; flex-direction: column;
  align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-3);
}
.phone-nav button.active { color: var(--brand-deep); }

/* Sections & Cards */
.section { padding: 48px 0; }
.section-head { margin-bottom: 26px; }
.section-kicker { font-size: 12.5px; font-weight: 700; color: var(--brand-deep); letter-spacing: 0.04em; margin-bottom: 6px; }
.section-title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.section-sub { margin: 0; color: var(--ink-2); max-width: 620px; }

.bento-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px; box-shadow: var(--shadow-sm); transition: border-color 0.18s ease;
}
.card:hover { border-color: var(--line-strong); }
.feature-icon {
  width: 38px; height: 38px; border-radius: 6px;
  background: var(--brand-tint); border: 1px solid var(--brand-border); color: var(--brand-deep);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.card p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; padding: 3px 8px; border-radius: var(--r-chip);
  background: var(--surface-sub); border: 1px solid var(--line); color: var(--ink-2);
}

.story-sheet {
  position: relative; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); padding: 30px 28px; box-shadow: var(--shadow-sm);
}
.tape {
  position: absolute; top: -10px; left: 28px; width: 72px; height: 20px;
  background: rgba(255, 168, 125, 0.42); border: 1px solid rgba(232, 98, 44, 0.16);
  transform: rotate(-2.5deg); border-radius: 2px;
}
.story-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.story-logo { width: 82px; height: 82px; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.story-quote { margin: 0 0 10px; font-size: 15.5px; color: var(--ink); line-height: 1.78; }
.story-foot { font-size: 13.5px; color: var(--ink-2); margin: 0; }

.cta-band {
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--surface) 100%);
  border: 1px solid var(--brand-border); border-radius: var(--r-card); padding: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.cta-band p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* Subpages */
.subpage-wrap { padding: 38px 0 56px; }
.sheet {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 30px 28px; box-shadow: var(--shadow-sm);
}
.sheet h1 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 31px); font-weight: 850; letter-spacing: -0.02em; }
.sheet-lead { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }

.inapp-banner {
  display: none; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  border-radius: var(--r-ctrl); padding: 13px 15px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 18px; align-items: flex-start; gap: 10px;
}
.inapp-banner.show { display: flex; }

.dl-hero-box {
  display: grid; grid-template-columns: minmax(0, 1fr) 154px; gap: 20px; align-items: center;
  background: var(--surface-sub); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; margin-bottom: 20px;
}
.dl-btn-full { width: 100%; padding: 13px 18px; font-size: 15.5px; }
.qr-box {
  background: #FFFFFF; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 10px; text-align: center; color: #241D18;
}
.qr-box img, .qr-box svg { width: 120px; height: 120px; margin: 0 auto; }
.qr-caption { font-size: 11px; color: #5E534B; margin-top: 6px; font-weight: 600; }

.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.meta-item { background: var(--surface-sub); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.meta-label { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.meta-val { font-size: 14px; font-weight: 700; color: var(--ink); word-break: break-all; }

.hash-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-sub); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 13px; margin-bottom: 22px; flex-wrap: wrap;
}
.hash-code { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); word-break: break-all; flex: 1; min-width: 220px; }

.tips-list { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.tips-list li { margin-bottom: 8px; }

.release-list { display: flex; flex-direction: column; gap: 14px; }
.release-card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; background: var(--surface-sub); }
.release-card.latest { background: var(--brand-tint); border-color: var(--brand-border); }
.release-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.release-ver { font-size: 16.5px; font-weight: 800; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 8px; }
.release-ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.release-ul li { margin-bottom: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #241D18; color: #FFFBF6; padding: 10px 16px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  opacity: 0; pointer-events: none; transition: all 0.22s var(--ease); z-index: 80;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 24px 0; font-size: 13.5px; color: var(--ink-3);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--brand-deep); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 34px 0 36px; }
  .bento-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .dl-hero-box { grid-template-columns: 1fr; }
  .qr-box { max-width: 160px; }
  .header-download-btn { display: none; }
}
@media (max-width: 620px) {
  .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav-tabs { order: 3; width: 100%; overflow-x: auto; justify-content: space-between; }
  .meta-grid { grid-template-columns: 1fr; }
  .sheet { padding: 22px 18px; }
}
