:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --page: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f2f2f4;
  --line: rgba(0, 0, 0, .1);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --button-text: #ffffff;
  --focus: #0071e3;
  --sorbet-pink: #ff7f9f;
  --sorbet-orange: #ffb35c;
  --sorbet-mint: #65d4be;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, select, textarea, input { font: inherit; }
button, select { min-height: 44px; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 38%, transparent); outline-offset: 2px; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 72px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { position: relative; width: 38px; height: 38px; border-radius: 12px; background: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; inset: 8px; border: 3px solid var(--sorbet-pink); border-radius: 50%; }
.brand-mark::after { inset: 12px 7px 7px 12px; border-color: var(--sorbet-orange); }
.brand-mark span { inset: 7px 13px 13px 7px; border-color: var(--sorbet-mint); }
.eyebrow { margin: 0 0 1px; color: var(--muted); font-size: .68rem; letter-spacing: .12em; font-weight: 600; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.12rem; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
h2 { max-width: 780px; margin-bottom: 16px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.04; font-weight: 650; letter-spacing: -.045em; }
h3 { font-size: 1rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .84rem; line-height: 1.5; }
.progress { padding: 6px 11px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.04); }

.panel { border-radius: 34px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.03), 0 24px 70px rgba(0,0,0,.06); padding: clamp(24px, 5vw, 56px); }
.store-hero { display: grid; grid-template-columns: 270px 1fr; align-items: center; gap: clamp(28px, 6vw, 72px); min-height: 330px; }
.intro { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.5; letter-spacing: -.01em; }
.hero-watch { position: relative; width: 224px; height: 252px; margin: auto; border-radius: 58px; background: #111; box-shadow: inset 0 0 0 2px #3a3a3c, 0 28px 48px rgba(0,0,0,.2); }
.hero-crown { position: absolute; right: -9px; top: 58px; width: 8px; height: 38px; border-radius: 0 7px 7px 0; background: #5a5a5f; }
.hero-ring { position: absolute; border: 11px solid; border-radius: 50%; }
.hero-ring-one { inset: 36px; border-color: var(--sorbet-pink); }
.hero-ring-two { inset: 56px; border-color: var(--sorbet-orange); border-top-color: transparent; transform: rotate(18deg); }
.hero-ring-three { inset: 76px; border-color: var(--sorbet-mint); border-left-color: transparent; transform: rotate(-24deg); }

.status-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 11px; border-radius: 999px; background: var(--surface-soft); font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { border: 0; border-radius: 999px; background: var(--surface-soft); color: var(--ink); padding: 9px 18px; cursor: pointer; transition: transform .16s ease, background-color .16s ease; }
.btn:hover { background: color-mix(in srgb, var(--surface-soft) 82%, var(--ink)); transform: translateY(-1px); }
.btn.primary { background: var(--blue); color: var(--button-text); }
.btn.primary:hover { background: var(--blue-hover); }
.btn:disabled { opacity: .45; cursor: wait; transform: none; }
.warning { margin-top: 22px; padding: 12px 15px; border-radius: 14px; background: var(--surface-soft); color: var(--muted); font-size: .9rem; line-height: 1.5; }
.login-panel { max-width: 680px; margin: 8vh auto 0; }
.login-form { display: grid; gap: 8px; max-width: 440px; margin-top: 30px; }
.login-form .btn { justify-self: start; margin-top: 8px; }
.field input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--ink); padding: 10px 13px; }

.sample-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.sample-head h2 { max-width: 800px; font-size: clamp(1.8rem, 4vw, 3.2rem); }
.group-tag { margin-bottom: 10px; color: var(--blue); font-size: .76rem; letter-spacing: .08em; font-weight: 600; text-transform: uppercase; }
.thinking { margin: 16px 0 34px; padding: 22px 24px; border-radius: 20px; white-space: pre-wrap; line-height: 1.7; max-height: 310px; overflow: auto; background: var(--surface-soft); color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }

.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 8px 0 38px; }
.chip { min-width: 0; padding: 22px 14px 18px; border-radius: 28px; background: var(--surface-soft); text-align: center; }
.chip-code { display: block; margin-bottom: 14px; font-size: 1.2rem; font-weight: 600; }
.ring-wrap { display: grid; place-items: center; min-height: 184px; }
.watch-case { position: relative; display: grid; place-items: center; width: 164px; height: 184px; border-radius: 44px; background: #111; box-shadow: inset 0 0 0 2px #3a3a3c, 0 15px 28px rgba(0,0,0,.18); }
.watch-crown { position: absolute; right: -7px; top: 42px; width: 7px; height: 30px; border-radius: 0 6px 6px 0; background: #5a5a5f; }
.ring-svg { width: 132px; height: 132px; animation: breathe 4.2s ease-in-out infinite; }
.ring-svg.hold { color: #8e8e93; opacity: .72; }
.ring-svg.error { color: #ff453a; opacity: .82; }
.chip-state { min-height: 22px; margin: 12px 0 5px; color: var(--muted); font-size: .8rem; }
.toggle-gradient { min-height: 34px; padding: 5px 12px; background: var(--surface); color: var(--blue); font-size: .78rem; }

@keyframes breathe { 0%, 100% { transform: scale(.97); opacity: .86; } 50% { transform: scale(1.025); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ring-svg { animation: none; } .btn { transition: none; } }

.questions { display: grid; gap: 22px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 600; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: 999px; background: var(--surface-soft); cursor: pointer; }
.option input:checked + label { background: var(--ink); color: var(--surface); }
.option input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--focus) 38%, transparent); outline-offset: 2px; }
.form-error { color: #d70015; min-height: 1.4em; margin-top: 14px; }

.overall-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field label { display: block; margin-bottom: 8px; font-weight: 600; }
.field select { width: 100%; border: 0; border-radius: 14px; background: var(--surface-soft); color: var(--ink); padding: 8px 12px; }
.mapping { width: 100%; border-collapse: collapse; margin: 18px 0 34px; }
.mapping th, .mapping td { text-align: left; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.reveal-list { display: grid; gap: 28px; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.note { min-width: 0; padding: 14px; border-radius: 18px; background: var(--surface-soft); }
.swatch { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1080px); padding-top: 16px; }
  .masthead { align-items: center; margin-bottom: 18px; }
  .panel { border-radius: 28px; padding: 22px 18px 30px; }
  .store-hero { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-watch { width: 170px; height: 190px; border-radius: 45px; }
  .hero-crown { top: 44px; }
  .hero-ring-one { inset: 29px; }
  .hero-ring-two { inset: 46px; }
  .hero-ring-three { inset: 63px; }
  .status-line, .actions { justify-content: center; }
  .chips { grid-template-columns: 1fr; }
  .chip { display: grid; grid-template-columns: 42px 142px 1fr; grid-template-areas: "code watch state" "code watch toggle"; align-items: center; padding: 14px 12px; text-align: left; }
  .chip-code { grid-area: code; margin: 0; text-align: center; }
  .ring-wrap { grid-area: watch; min-height: 142px; }
  .watch-case { width: 126px; height: 138px; border-radius: 34px; }
  .watch-crown { top: 31px; }
  .ring-svg { width: 104px; height: 104px; }
  .chip-state { grid-area: state; margin: 0; }
  .toggle-gradient { grid-area: toggle; justify-self: start; }
  .overall-grid, .notes { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .chip { grid-template-columns: 34px 126px 1fr; }
  .watch-case { width: 114px; height: 126px; border-radius: 31px; }
  .ring-svg { width: 94px; height: 94px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --page: #000000;
    --surface: #1c1c1e;
    --surface-soft: #2c2c2e;
    --line: rgba(255,255,255,.12);
    --blue: #0a84ff;
    --blue-hover: #409cff;
    --button-text: #ffffff;
    --focus: #0a84ff;
  }
  .panel { box-shadow: none; }
  .option input:checked + label { background: var(--ink); color: var(--page); }
}
