/* Theme layer, loaded after style.css: the modern product look (Geist type,
   zinc neutrals, violet-to-blue accent, soft cards, glass header). */
:root {
  --paper: #fafafa;
  --surface: #ffffff;
  --margin: #f4f4f5;
  --ink: #09090b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #6d28d9;
  --accent-2: #2563eb;
  --accent-soft: #f3efff;
  --pen: #dc2626;
  --pen-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --focus: #7c3aed;
  --glow: rgba(124, 58, 237, 0.18);
  --glow-2: rgba(37, 99, 235, 0.14);
  --shadow: 0 1px 2px rgba(9, 9, 11, 0.04), 0 4px 16px rgba(9, 9, 11, 0.04);
  --shadow-lg: 0 2px 4px rgba(9, 9, 11, 0.04), 0 24px 48px -12px rgba(9, 9, 11, 0.12);
  --header: rgba(250, 250, 250, 0.72);
  --grad: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #2563eb 100%);

  --display: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif;
  --body: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  --r-lg: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #09090b; --surface: #111114; --margin: #18181b; --ink: #fafafa; --muted: #a1a1aa; --line: #27272a;
    --accent: #a78bfa; --accent-2: #60a5fa; --accent-soft: rgba(167, 139, 250, 0.12); --pen: #f87171; --pen-soft: rgba(248, 113, 113, 0.12);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, 0.12); --ok: #34d399; --ok-soft: rgba(52, 211, 153, 0.12); --focus: #a78bfa;
    --glow: rgba(139, 92, 246, 0.28); --glow-2: rgba(59, 130, 246, 0.2);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6); --header: rgba(9, 9, 11, 0.7);
    --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #09090b; --surface: #111114; --margin: #18181b; --ink: #fafafa; --muted: #a1a1aa; --line: #27272a;
  --accent: #a78bfa; --accent-2: #60a5fa; --accent-soft: rgba(167, 139, 250, 0.12); --pen: #f87171; --pen-soft: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, 0.12); --ok: #34d399; --ok-soft: rgba(52, 211, 153, 0.12); --focus: #a78bfa;
  --glow: rgba(139, 92, 246, 0.28); --glow-2: rgba(59, 130, 246, 0.2);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6); --header: rgba(9, 9, 11, 0.7);
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%); color-scheme: dark;
}

body { font: 400 0.9375rem/1.6 var(--body); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
::selection { background: var(--accent-soft); }

/* header */
.top { background: var(--header); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
body::before { background: var(--paper); }
.top-inner { padding-block: 12px; }
.brand { align-items: center; gap: 10px; }
.brand::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); box-shadow: 0 4px 14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.brand-mark { font: 650 1.125rem/1 var(--display); letter-spacing: -0.03em; }
.top-nav a { border-radius: 999px; padding: 6px 12px; font-weight: 500; font-size: 0.875rem; }
.top-nav a.active { background: var(--margin); color: var(--ink); }
.redline-chip { border: 1px solid var(--line); color: var(--muted); background: var(--surface); padding: 4px 10px; font-size: 0.75rem; font-weight: 500; }
.redline-chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px var(--ok-soft); }

/* buttons and fields */
.btn { border-radius: var(--r); font-weight: 500; font-size: 0.875rem; padding: 9px 16px; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--ink) 50%, transparent); }
.btn.grad { background: var(--grad); border: 0; color: #fff; box-shadow: 0 8px 24px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.grad:hover { box-shadow: 0 12px 32px -8px var(--glow); }
.btn.danger { background: var(--pen); border-color: var(--pen); color: #fff; }
textarea, input:not([type=checkbox]), select { border-radius: var(--r); border-color: var(--line); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
textarea:focus, input:focus, select:focus { border-color: var(--focus); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=checkbox] { accent-color: var(--accent); }
.link-btn, a { text-underline-offset: 3px; }
.pill { border-radius: 999px; font-weight: 500; }

/* ===== home ===== */
.home { position: relative; overflow: hidden; }
.home::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 720px; pointer-events: none; z-index: 0;
  background: radial-gradient(40% 50% at 30% 30%, var(--glow), transparent 70%), radial-gradient(35% 45% at 72% 25%, var(--glow-2), transparent 70%);
  filter: blur(10px);
}
.home::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 760px; pointer-events: none; z-index: 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(60% 60% at 50% 20%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(60% 60% at 50% 20%, #000 20%, transparent 75%);
}
.home > * { position: relative; z-index: 1; }
.hero { padding-block: 88px 40px; text-align: center; justify-items: center; gap: 22px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 0.8125rem; color: var(--muted); box-shadow: var(--shadow); text-decoration: none; }
.hero-badge b { background: var(--grad); color: #fff; font-weight: 600; font-size: 0.6875rem; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.02em; }
.hero-badge span:last-child { padding-right: 8px; }
.hero h1 { font: 650 clamp(2.5rem, 6vw + 0.5rem, 4.75rem)/1.02 var(--display); letter-spacing: -0.045em; max-width: 14ch; }
.hero h1 .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1rem, 0.6vw + 0.9rem, 1.1875rem); color: var(--muted); max-width: 40em; margin-inline: auto; }
.hero-actions { justify-content: center; }
.hero-actions .btn { padding: 12px 20px; font-size: 0.9375rem; border-radius: 12px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.8125rem; color: var(--muted); }
.trust span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }

/* product preview */
.preview { margin: 16px auto 0; max-width: 1040px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 8px color-mix(in srgb, var(--surface) 60%, transparent); overflow: hidden; text-align: left; }
.pv-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--margin); }
.pv-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pv-bar span { margin-left: 10px; font: 0.75rem var(--mono); color: var(--muted); }
.pv-body { display: grid; grid-template-columns: 170px minmax(0, 1fr) 280px; min-height: 340px; }
.pv-side { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 2px; align-content: start; }
.pv-side span { font-size: 0.8125rem; color: var(--muted); padding: 6px 10px; border-radius: 8px; display: flex; gap: 8px; align-items: center; }
.pv-side span.on { background: var(--margin); color: var(--ink); font-weight: 500; }
.pv-main { padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.pv-main h4 { font-size: 1rem; }
.pv-field { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 0.8125rem; line-height: 1.55; }
.pv-field mark { background: color-mix(in srgb, var(--pen) 14%, transparent); color: inherit; border-bottom: 1.5px solid var(--pen); padding: 0 1px; border-radius: 2px; }
.pv-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.pv-notes { border-left: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--margin); }
.pv-note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; font-size: 0.75rem; color: var(--muted); box-shadow: var(--shadow); }
.pv-note b { color: var(--ink); font-size: 0.8125rem; }
.pv-note .tag { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* sections */
.section { padding-block: 72px 24px; display: grid; gap: 28px; }
.section-head { display: grid; gap: 10px; text-align: center; justify-items: center; }
.kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head h2 { font: 650 clamp(1.75rem, 2.5vw + 1rem, 2.75rem)/1.1 var(--display); letter-spacing: -0.035em; max-width: 20ch; }
.section-head p { color: var(--muted); max-width: 38em; }

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tile { grid-column: span 2; position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 22px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; text-decoration: none; color: var(--ink); overflow: hidden; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tile.wide { grid-column: span 3; }
.tile.wide::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); pointer-events: none; }
.tile-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile-ico svg { width: 20px; height: 20px; }
.tile h3 { font: 600 1.0625rem/1.3 var(--display); }
.tile p { color: var(--muted); font-size: 0.875rem; }
.tile .pain { font-size: 0.75rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.tile .pain::before { content: "Solves · "; color: var(--accent); font-weight: 600; }

.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.step3 { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: var(--surface); display: grid; gap: 8px; box-shadow: var(--shadow); }
.step3::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 600 0.8125rem var(--mono); color: var(--accent); }
.step3 h3 { font-size: 1.0625rem; }
.step3 p { color: var(--muted); font-size: 0.875rem; }

.redline-grid { gap: 14px; }
.redline-grid > div { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: var(--surface); box-shadow: var(--shadow); }
.redline-grid h3 { font-size: 0.875rem; letter-spacing: 0; }
.redline-grid ul { list-style: none; padding: 0; gap: 10px; }
.redline-grid li { padding-left: 26px; position: relative; font-size: 0.9375rem; }
.redline-grid li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 0.6875rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); }
.redline-grid .no li { text-decoration: none; color: var(--muted); }
.redline-grid .no li::before { content: "✕"; color: var(--pen); background: var(--pen-soft); }

.cta-band { margin-block: 72px 40px; border-radius: 24px; padding: 48px 28px; text-align: center; display: grid; gap: 16px; justify-items: center; background: var(--grad); color: #fff; position: relative; overflow: hidden; box-shadow: 0 30px 60px -20px var(--glow); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 80% 0%, rgba(255, 255, 255, 0.25), transparent 60%); pointer-events: none; }
.cta-band h2 { font: 650 clamp(1.5rem, 2vw + 1rem, 2.25rem)/1.15 var(--display); letter-spacing: -0.03em; position: relative; }
.cta-band p { opacity: 0.85; position: relative; }
.cta-band .btn { position: relative; background: #fff; color: #18181b; border: 0; }
.roadmap { text-align: center; justify-items: center; padding-bottom: 24px; }

/* ===== workspace ===== */
.workspace { gap: 28px; padding-block: 24px 64px; }
.side { gap: 2px; }
.side a { gap: 10px; justify-content: flex-start; padding: 7px 10px; border-radius: 8px; font-size: 0.875rem; font-weight: 450; }
.side a span { flex: 1; }
.side a svg { width: 16px; height: 16px; flex: none; opacity: 0.75; }
.side a[aria-current] { background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-weight: 550; }
.side a[aria-current] svg { color: var(--accent); opacity: 1; }
.side b { font-family: var(--mono); }
.side-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; }
.module-head { align-items: center; }
.module-head h1 { font: 650 1.625rem/1.2 var(--display); letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.module-head h1 .tile-ico { width: 34px; height: 34px; }
.module-head h1 .tile-ico svg { width: 18px; height: 18px; }
.module-head p { font-size: 0.8125rem; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.module-body { gap: 24px; }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; }
.notes-head h3 { font: 600 1rem/1.3 var(--display); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.notes-head h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--accent-soft); }
.count { font-family: var(--mono); font-size: 0.75rem; }
.ai-box { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1px solid transparent; border-radius: 14px; box-shadow: 0 8px 24px -14px var(--glow); }
.ai-head h4 { display: flex; align-items: center; gap: 6px; }
.ai-head h4::before { content: "✦"; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.note { border-top-color: var(--line); }
.note-tag { font-size: 0.625rem; }
.note-field { border-radius: 999px; }
.note-example p, .pattern p { border-radius: 10px; border: 1px solid var(--line); }

.status-card, .ref, .task, .paper, .checks, .acct-form, .table-wrap, .guide, .proj-list li { border-radius: 14px; box-shadow: var(--shadow); }
.status-card { transition: transform 0.15s, box-shadow 0.15s; padding: 18px; }
.status-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.status-name { font-size: 0.9375rem; }
.next-card { border-radius: 16px; border: 1px solid transparent; background: linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box, var(--grad) border-box; }
.next-card b { font-family: var(--display); letter-spacing: -0.02em; }
.journal-chip, .readonly, .confirm { border-radius: 12px; }
.matrix th { background: var(--margin); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.node::before { background: var(--grad); box-shadow: 0 0 0 4px var(--accent-soft); }
.tabs { border-bottom: 0; background: var(--margin); padding: 4px; border-radius: 12px; gap: 2px; }
.tab { border: 0; border-radius: 9px; padding: 7px 12px; }
.tab.on { background: var(--surface); box-shadow: var(--shadow); border-bottom: 0; }
.tab.on .tab-n { background: var(--grad); }
.legal, .account { font-size: 0.9375rem; }
.legal h1, .account h1 { font-family: var(--display); letter-spacing: -0.03em; }
.foot .wrap { justify-content: center; }

/* entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .preview { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero > *:nth-child(2) { animation-delay: 0.05s; }
  .hero > *:nth-child(3) { animation-delay: 0.1s; }
  .hero > *:nth-child(4) { animation-delay: 0.15s; }
  .hero > *:nth-child(5) { animation-delay: 0.2s; }
  .preview { animation-delay: 0.25s; }
}
@keyframes rise { from { opacity: 0.001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile.wide { grid-column: span 1; }
  .pv-body { grid-template-columns: minmax(0, 1fr) 240px; }
  .pv-side { display: none; }
}
@media (max-width: 760px) {
  .hero { padding-block: 56px 24px; }
  .bento, .steps3 { grid-template-columns: minmax(0, 1fr); }
  .pv-body { grid-template-columns: minmax(0, 1fr); }
  .pv-notes { border-left: 0; border-top: 1px solid var(--line); }
  .side-label { display: none; }
  .side a svg { display: none; }
  .module-head p { display: none; }
}

.pv-side svg { width: 14px; height: 14px; flex: none; }
.tile.full { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 18px; }
.tile.full h3, .tile.full p { grid-column: 2; }
.tile.full .tile-ico { grid-row: 1 / span 2; }
.tile.full .pain { grid-column: 3; grid-row: 1 / span 2; border: 0; padding: 0; margin: 0; }
.ai-head { flex-wrap: wrap; }
.ai-head .btn { white-space: nowrap; }
@media (max-width: 760px) {
  .tile.full { grid-template-columns: minmax(0, 1fr); }
  .tile.full h3, .tile.full p, .tile.full .pain, .tile.full .tile-ico { grid-column: 1; grid-row: auto; }
  .tile.full .pain { border-top: 1px dashed var(--line); padding-top: 10px; }
}
.search-bar .btn { white-space: nowrap; flex: none; }
.paper-open { text-decoration: none; color: var(--ink); font-weight: 550; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.paper-open:hover { color: var(--accent); }
.paper-open::after { content: " ↗"; color: var(--accent); }
.matrix td { padding: 6px; }

/* quota, feedback */
.ai-quota { font-size: 0.75rem; color: var(--accent); font-weight: 500; }
.fb-btn { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 15; font: 500 0.8125rem var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; box-shadow: var(--shadow-lg); cursor: pointer; }
.fb-btn::before { content: "✦ "; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fb-panel { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 15; width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; display: grid; gap: 10px; }
.fb-head { display: flex; justify-content: space-between; align-items: center; }
.fb-form { display: grid; gap: 8px; font-size: 0.875rem; }
.fb-form .btn { justify-self: start; }
.fb-q { font-weight: 500; }
.fb-rate { display: flex; gap: 6px; }
.fb-rate button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 0.875rem var(--body); cursor: pointer; }
.fb-rate button.on { background: var(--grad); color: #fff; border-color: transparent; }
.fb-thanks { color: var(--ok); font-size: 0.875rem; }
/* free tool pages */
.tool-hero { padding-block: 64px 24px; }
.tool-hero h1 { max-width: 18ch; }
.tool-body { position: relative; z-index: 1; }
.tool-card { max-width: 860px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 24px; display: grid; gap: 16px; }
.tool-form { display: grid; gap: 8px; }
.tool-form label { font-weight: 500; }
.tool-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; width: 100%; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px; }
.faq summary { font-weight: 550; cursor: pointer; }
.faq p { color: var(--muted); margin-top: 8px; }
.tool-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; width: 100%; }
.tool-others .tile { grid-column: auto; }

/* guided tour */
.side-tour { margin-top: 14px; font: 500 0.8125rem var(--body); color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 8px; padding: 8px 10px; text-align: left; cursor: pointer; }
.tour-card { position: fixed; z-index: 30; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; background: var(--surface); border: 1px solid transparent; background-image: linear-gradient(var(--surface), var(--surface)), var(--grad); background-origin: border-box; background-clip: padding-box, border-box; border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 6px var(--accent-soft); padding: 18px; display: grid; gap: 8px; font-size: 0.875rem; }
.tour-card h3 { font: 650 1.125rem/1.3 var(--display); letter-spacing: -0.02em; }
.tour-card ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--muted); }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-step { font: 600 0.6875rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.tour-bar { height: 4px; border-radius: 4px; background: var(--margin); overflow: hidden; }
.tour-bar i { display: block; height: 100%; background: var(--grad); transition: width 0.3s; }
.tour-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-top: 4px; }
.tour-try { padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.tour-try.ok { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.tour-target { outline: 3px solid var(--accent) !important; outline-offset: 4px; border-radius: 10px; box-shadow: 0 0 0 10px var(--accent-soft) !important; transition: outline-color 0.2s; }
@media (prefers-reduced-motion: no-preference) { .tour-target { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { outline-color: color-mix(in srgb, var(--accent) 40%, transparent); } }
body.touring .fb-btn { display: none; }
@media (max-width: 760px) { .tour-card { left: 16px; right: 16px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-height: 55vh; } }

.tour-top span { display: flex; gap: 4px; }
.tour-pill { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 0.8125rem var(--body); color: #fff; background: var(--grad); border: 0; border-radius: 999px; padding: 10px 16px; box-shadow: var(--shadow-lg); cursor: pointer; }
.tour-pill.ok { background: var(--ok); }
@media (max-width: 760px) { .tour-card { max-height: 44vh; } }
@media (max-width: 760px) {
  .top-inner { gap: 10px; }
  .top-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; gap: 0; }
  .top-nav a { padding: 6px 8px; white-space: nowrap; font-size: 0.8125rem; }
  .brand-mark { font-size: 1rem; }
}
