:root {
  --orange: #c2410c;
  --orange-bright: #ea580c;
  --orange-deep: #9a3412;
  --cream: #fff6ee;
  --cream-2: #ffe8d6;
  --ink: #431407;
  --muted: #7c5a48;
  --line: #f3d7c4;
  --card: #ffffff;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --off: #9a3412;
  --off-bg: #ffedd5;
  --danger: #9f1239;
  --shadow: 0 16px 40px rgba(154, 52, 18, 0.14);
  font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  color: var(--ink);
  background: #fff4ec;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
}

body.public {
  background:
    radial-gradient(900px 420px at 50% -80px, #ffd7b5, transparent 70%),
    linear-gradient(180deg, #fff8f3 0%, #ffe4cc 100%);
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 5;
}

.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sheet {
  width: min(440px, calc(100% - 28px));
  margin: 24px auto 40px;
  padding-bottom: env(safe-area-inset-bottom);
}

.hero { text-align: center; padding: 8px 8px 4px; }

.logo {
  display: block;
  max-width: 180px;
  max-height: 72px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.stars {
  margin: 0;
  letter-spacing: 0.28em;
  color: var(--orange-bright);
  font-size: 1.15rem;
}

h1 {
  margin: 8px 0 10px;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead, .muted, .thanks, .hint {
  color: var(--muted);
  line-height: 1.5;
}

.lead { margin: 0 auto; max-width: 34ch; font-size: 1.05rem; }

.products { display: grid; gap: 16px; margin-top: 22px; }

.product {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-2);
}

.product-body { padding: 16px 16px 18px; }

.product h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.28);
}

.cta { width: 100%; }

.cta:hover, .button:hover { background: var(--orange-deep); }

.cta:focus-visible, .button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #fdba74;
  outline-offset: 2px;
}

.thanks { text-align: center; margin: 22px 8px 0; }

.empty {
  background: white;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.card-form, .stack { display: grid; gap: 8px; }

.card-form {
  margin-top: 18px;
  background: white;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

label { font-weight: 650; font-size: 0.95rem; }

input, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea { min-height: 120px; resize: vertical; }

.field-error, .validation { color: var(--danger); font-size: 0.92rem; }

.validation:empty { display: none; }

.hint { margin: 0; font-size: 0.9rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; text-decoration: none; color: var(--orange-deep); }

.who { display: flex; align-items: center; gap: 10px; color: var(--muted); }

.who form { margin: 0; }

.text-button, .ghost, button.danger, .manage-actions button {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
}

.text-button { border: 0; background: transparent; color: var(--orange-deep); padding: 0; min-height: 0; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: #fff7f2;
}

.tabs a {
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.tabs a.active { background: var(--orange); color: white; }

.panel {
  width: min(880px, calc(100% - 24px));
  margin: 16px auto 40px;
  display: grid;
  gap: 16px;
}

.block {
  background: white;
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.block h1, .block h2 { margin-top: 0; }

.block-head, .form-actions, .inline-form, .manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.block-head { justify-content: space-between; align-items: flex-start; }

.inline-form input { width: 96px; }

.flash {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ok-bg);
  color: var(--ok);
}

.flash.error { background: #ffe4e6; color: var(--danger); }

.manage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.manage-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.manage-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--cream);
}

.manage-item:not(:has(img)) { grid-template-columns: 1fr; }

.manage-copy { display: grid; gap: 6px; justify-items: start; }

.manage-actions { grid-column: 1 / -1; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge.on { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: var(--off-bg); color: var(--off); }

.hidden-item { opacity: 0.72; }

.preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--cream);
}

.logo-preview { object-fit: contain; background: transparent; }

.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.check input { width: 20px; min-height: 20px; }

.url-line input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92rem; }

.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 8px 0 16px;
  background: white;
  border-radius: 12px;
}

button:disabled { opacity: 0.45; cursor: not-allowed; }

button.danger { color: var(--danger); }

.button.ghost { background: white; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }

@media (min-width: 720px) {
  .manage-item { grid-template-columns: 72px 1fr auto; }
  .manage-item:not(:has(img)) { grid-template-columns: 1fr auto; }
  .manage-actions { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

body.public {
  color: #1d1d1f;
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.public h1 {
  margin: 0;
  color: #1d1d1f;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.07;
}

body.public .lead {
  max-width: 28rem;
  margin: 12px auto 0;
  color: #6e6e73;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.47;
}

body.public .stars { color: #1d1d1f; font-size: 0.8rem; letter-spacing: 0.22em; }

body.public .cta {
  background: #1d1d1f;
  border-radius: 980px;
  box-shadow: none;
  font-size: 1.0625rem;
  font-weight: 400;
  min-height: 44px;
}

body.public .cta:hover { background: #333; }

body.public .card-form {
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

body.public .stage {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 calc(56px + env(safe-area-inset-bottom));
}

body.public .intro { text-align: center; padding: 12px 8px 0; }

body.public .kicker {
  margin: 0 0 10px;
  color: #6e6e73;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.public .path {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

body.public .path li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px 4px 4px;
  border-radius: 980px;
  background: #fff;
  color: #1d1d1f;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.public .path span,
body.public .step {
  display: inline-grid;
  place-items: center;
}

body.public .path span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 0.75rem;
}

body.public .step {
  margin: 0 0 12px;
  color: #6e6e73;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.public .gift {
  margin: 56px auto 0;
  max-width: 36rem;
  padding: 28px 22px;
  border-radius: 24px;
  background: #1d1d1f;
  color: #f5f5f7;
  text-align: center;
}

body.public .gift .kicker { color: #a1a1a6; }

body.public .gift-line {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

body.public .intro .logo { margin-bottom: 18px; }

body.public .lineup {
  display: grid;
  gap: 48px;
  margin-top: 48px;
}

body.public .scent { text-align: center; }

body.public .portrait {
  background: transparent;
}

body.public .portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  background: #f5f5f7;
}

body.public .scent h2 {
  margin: 22px 0 14px;
  color: #1d1d1f;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

body.public .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 980px;
  background: #1d1d1f;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.012em;
  text-decoration: none;
}

body.public .pill:hover { background: #333; }

body.public .pill:focus-visible,
body.public .cta:focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 3px;
}

body.public .colophon {
  margin: 56px 0 0;
  color: #86868b;
  font-size: 0.875rem;
  text-align: center;
}

body.public .empty {
  margin-top: 40px;
  background: #fff;
  color: #6e6e73;
  border-radius: 18px;
  box-shadow: none;
}

@media (min-width: 900px) {
  body.public .stage { padding-top: 72px; }
  body.public .lineup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
    margin-top: 64px;
  }
  body.public .portrait img { border-radius: 22px; }
}

body.public .campaign {
  width: min(460px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(128px + env(safe-area-inset-bottom));
}

body.public .campaign .intro { padding: 0 4px; }

body.public .campaign h1 {
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.05;
}

body.public .campaign .lead { margin-top: 12px; font-size: 1.0625rem; }

body.public .notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: #1d1d1f;
  font-size: 0.9375rem;
  line-height: 1.45;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

body.public .howto {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
  text-align: left;
}

body.public .howto li {
  counter-increment: how;
  position: relative;
  margin: 0 0 10px;
  padding-left: 2rem;
  color: #6e6e73;
  font-size: 0.9375rem;
  line-height: 1.4;
}

body.public .howto li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35rem;
  text-align: center;
}

body.public .step-hint {
  margin: 0 0 8px;
  color: #6e6e73;
  font-size: 0.875rem;
  line-height: 1.35;
}

body.public .step-hint strong { color: #1d1d1f; font-weight: 600; }

body.public .intro-action {
  margin: 20px 0 0;
}

body.public .intro-action .pill {
  display: inline-flex;
  min-width: min(100%, 280px);
  justify-content: center;
}

body.public .catalog {
  margin-top: 28px;
}

body.public .catalog-title {
  margin: 0 0 12px;
  padding: 0 4px;
  color: #1d1d1f;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: left;
}

body.public .steps {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

body.public .step-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
}

body.public .step-photo img {
  display: block;
  width: 104px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  background: #f5f5f7;
}

body.public .step-body { min-width: 0; }

body.public .step-label {
  margin: 0;
  color: #6e6e73;
  font-size: 0.8125rem;
  font-weight: 600;
}

body.public .step-card h2 {
  margin: 2px 0 4px;
  color: #1d1d1f;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

body.public .reward {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  background: #1d1d1f;
  color: #f5f5f7;
}

body.public .reward .kicker { margin-bottom: 4px; color: #a1a1a6; }

body.public .reward-photo {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

body.public .reward-line {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

body.public .dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  padding: 10px 10px 10px 18px;
  border-radius: 980px;
  background: rgba(29, 29, 31, 0.88);
  color: #fff;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

body.public .dock-copy { min-width: 0; }

body.public .dock-next {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

body.public .dock-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 980px;
  background: #fff;
  color: #1d1d1f;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

body.public .dock-button:focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; }

@media (min-width: 900px) {
  body.public .campaign { width: min(560px, calc(100% - 48px)); padding-top: 64px; }
  body.public .step-card { grid-template-columns: 140px 1fr; }
  body.public .step-photo img { width: 140px; height: 176px; }
}

@media (max-width: 899px) {
  body.public .stage { width: min(430px, calc(100% - 32px)); padding-top: 28px; }
  body.public .lineup { gap: 40px; margin-top: 36px; }
  body.public .portrait img {
    width: min(100%, 300px);
    margin-inline: auto;
  }
  body.public .scent h2 { margin-top: 16px; font-size: 1.375rem; }
}
