:root {
  color-scheme: light;
  --ink: #10243e;
  --muted: #607086;
  --paper: #ffffff;
  --canvas: #f4f7fb;
  --line: #dce4ee;
  --accent: #d88a18;
  --good: #1f7a56;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); min-height: 100vh; }
button, input, select { font: inherit; }
.site-header { min-height: 64px; padding: max(12px, env(safe-area-inset-top)) 20px 12px; display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: #f7b84b; }
.page-shell { width: min(720px, 100%); margin: 0 auto; padding: 40px 20px calc(40px + env(safe-area-inset-bottom)); }
.feed-header { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1; letter-spacing: -0.04em; }
h2 { margin-bottom: 10px; font-size: 1.35rem; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lede { color: var(--muted); line-height: 1.55; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; white-space: nowrap; border: 1px solid #b8dfce; border-radius: 999px; background: #edf9f4; color: var(--good); font-size: .78rem; font-weight: 700; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.empty-state, .auth-card, .notification-card, .event-card { padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 45px rgba(16, 36, 62, .08); }
.empty-state { text-align: center; }
.empty-state p { max-width: 470px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 18px; background: #edf9f4; color: var(--good); font-size: 1.5rem; font-weight: 900; }
.notification-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 22px 24px; }
.notification-card h2, .notification-card p { margin-bottom: 0; }
.muted { color: var(--muted); line-height: 1.5; }
.compact { margin: 0; white-space: nowrap; }
.primary-button:disabled { cursor: wait; opacity: .62; }
.event-list { display: grid; gap: 14px; }
.event-card { padding: 22px 24px; scroll-margin-top: 18px; }
.event-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(216, 138, 24, .16), 0 18px 45px rgba(16, 36, 62, .08); }
.event-card h2 { margin: 10px 0 6px; }
.event-card p { margin-bottom: 0; color: var(--muted); }
.event-topline { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .78rem; }
.platform { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.auth-card { width: min(440px, 100%); margin: 5vh auto 0; }
.form-stack { display: grid; gap: 10px; }
.form-stack label { margin-top: 7px; font-size: .86rem; font-weight: 700; }
.form-stack input, .form-stack select { width: 100%; padding: 13px 14px; border: 1px solid #bfcbd9; border-radius: 12px; background: #fff; color: var(--ink); }
.form-stack input:focus, .form-stack select:focus { outline: 3px solid rgba(216, 138, 24, .2); border-color: var(--accent); }
.primary-button { margin-top: 12px; padding: 13px 18px; border: 0; border-radius: 12px; background: var(--ink); color: white; font-weight: 760; cursor: pointer; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.form-error { padding: 11px 13px; border-radius: 10px; background: #fff0f0; color: #9b2c2c; }
.header-nav { display: flex; gap: 16px; margin-left: auto; margin-right: 20px; }
.header-nav a { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 700; }
.setup-section { margin-bottom: 24px; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.step-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.step-heading h2 { margin: 0; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #edf9f4; color: var(--good); font-weight: 800; }
.connected-stores { list-style: none; padding: 0; margin: 0 0 20px; }
.connected-stores li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.connected-stores p { margin: 4px 0 0; font-size: .85rem; }
.connection-state { font-size: .8rem; color: var(--good); text-align: right; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.platform-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.platform-card h3 { margin: 0 0 8px; }
.platform-card p { line-height: 1.5; font-size: 1rem; color: var(--muted); }
.platform-card button { width: 100%; }
.availability { font-weight: 650; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.secondary-button { padding: 13px 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font-weight: 700; cursor: pointer; }
.secondary-button:disabled { opacity: .55; cursor: not-allowed; }
.button-link { display: inline-block; text-decoration: none; margin: 0; }
.setup-success { padding: 14px 18px; background: #edf9f4; border-radius: 12px; color: var(--good); }
details summary { cursor: pointer; color: var(--ink); font-weight: 700; }
details p { margin: 12px 0 0; color: var(--muted); line-height: 1.55; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .page-shell { padding-top: 28px; }
  .feed-header { display: block; }
  .status-pill { margin-top: 8px; }
  .empty-state, .auth-card, .event-card { padding: 26px 20px; border-radius: 20px; }
  .notification-card { display: block; padding: 22px 20px; border-radius: 20px; }
  .notification-card form { margin-top: 16px; }
  .compact { width: 100%; }
  .header-nav { gap: 10px; margin-right: 10px; }
  .brand { gap: 6px; font-size: .85rem; }
  .site-header { padding-left: 12px; padding-right: 12px; }
  .setup-section { padding: 20px; }
  .platform-grid { grid-template-columns: 1fr; }
}
