:root {
  color-scheme: light;
  --navy: #111c3d;
  --navy-2: #1d2f64;
  --coral: #ff725e;
  --coral-dark: #e95744;
  --paper: #f6f5f1;
  --white: #ffffff;
  --ink: #172038;
  --muted: #687086;
  --line: #dde0e8;
  --soft-blue: #edf1ff;
  --success: #187b61;
  --danger: #b33737;
  --shadow: 0 24px 80px rgba(20, 29, 57, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font: 500 16px/1.5 "Manrope", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 32, 56, 0.12);
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  gap: 11px;
  align-items: center;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-family: "Unbounded", sans-serif;
  font-size: 14px;
  transform: rotate(-4deg);
}

.topbar-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2bb789; box-shadow: 0 0 0 4px rgba(43, 183, 137, 0.12); }

.screen { display: none; padding: 44px clamp(20px, 4vw, 64px) 80px; }
.screen-active { display: block; animation: reveal 420ms ease both; }

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

.profile-layout {
  max-width: 760px;
  margin: 0 auto;
  display: block;
}

.editorial-panel { padding-top: 20px; }
.step-label { display: flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; color: var(--coral-dark); }
.step-label span { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; }

h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; margin: 28px 0 20px; color: var(--navy); font-family: "Unbounded", sans-serif; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: 10px; color: var(--navy); font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -.035em; }
.lead { max-width: 620px; margin-bottom: 32px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }

.hero-visual { margin: 0; position: relative; border-radius: 28px; overflow: hidden; background: var(--navy); box-shadow: var(--shadow); }
.hero-visual img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 18, 42, .82)); pointer-events: none; }
.hero-visual figcaption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: flex; justify-content: space-between; gap: 16px; color: #fff; font-size: 13px; }
.hero-visual figcaption span { padding-left: 18px; position: relative; }
.hero-visual figcaption span::before { content: ""; position: absolute; width: 8px; height: 8px; left: 0; top: 6px; border-radius: 50%; background: var(--coral); }

.profile-form {
  padding: clamp(26px, 4vw, 44px);
  background: var(--white);
  border: 1px solid rgba(23, 32, 56, .08);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.form-heading { padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.form-heading h1 { margin: 10px 0 14px; font-size: clamp(34px, 6vw, 54px); }
.form-heading p:last-child { max-width: 580px; margin-bottom: 0; color: var(--muted); }
.eyebrow { margin-bottom: 8px; color: var(--coral-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compact-row { grid-template-columns: .8fr .55fr 1fr 1fr; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span, .field legend { color: var(--navy); font-size: 14px; font-weight: 800; }
.no-border { border: 0; padding: 0; margin-inline: 0; }

.gender-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gender-options label { position: relative; }
.gender-options input { position: absolute; opacity: 0; pointer-events: none; }
.gender-options span {
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfbfd;
  color: var(--muted);
  font-weight: 800;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.gender-options span:hover { border-color: var(--navy-2); transform: translateY(-1px); }
.gender-options input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.gender-options input:focus-visible + span { outline: 3px solid rgba(255, 114, 94, .4); outline-offset: 2px; }
.age-field { max-width: 240px; margin: 26px 0 28px; }
.age-field input { min-height: 54px; font-size: 18px; font-weight: 800; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(29, 47, 100, .1); }

.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chips span { display: block; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; transition: .2s; }
.choice-chips input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.choice-chips input:focus-visible + span { outline: 3px solid rgba(255, 114, 94, .35); }

.budget-field { margin: 8px 0 22px; padding: 18px; background: var(--soft-blue); border-radius: 16px; }
.budget-field > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--navy); font-size: 14px; font-weight: 700; }
.budget-field strong { font-size: 22px; }
input[type="range"] { padding: 0; margin: 16px 0 4px; accent-color: var(--coral); border: 0; background: transparent; box-shadow: none; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

.primary-button, .secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-weight: 800;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.primary-button { width: 100%; background: var(--coral); color: #271714; box-shadow: 0 10px 28px rgba(255, 114, 94, .28); }
.primary-button:hover { background: #ff806e; transform: translateY(-1px); box-shadow: 0 14px 34px rgba(255, 114, 94, .34); }
.primary-button:active { transform: translateY(1px); }
.primary-button:focus-visible, .secondary-button:focus-visible, .back-button:focus-visible, .item-action:focus-visible, .concept-card:focus-visible { outline: 3px solid rgba(255, 114, 94, .45); outline-offset: 3px; }
.primary-button[disabled] { background: #cfd2da; color: #72798a; box-shadow: none; cursor: not-allowed; }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--navy); justify-content: center; }
.full-width { width: 100%; }
.form-note, .demo-caption { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

.workspace-header { max-width: 1320px; margin: 0 auto 32px; }
.workspace-header h1 { max-width: 900px; margin-bottom: 14px; font-size: clamp(34px, 4.5vw, 60px); }
.workspace-header > p { color: var(--muted); }
.workspace-header.compact { margin-bottom: 28px; }
.workspace-header.compact h1 { font-size: clamp(34px, 4vw, 52px); }
.back-button { margin-bottom: 24px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.back-button:hover { color: var(--navy); }
.profile-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.profile-summary span { padding: 7px 11px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }

.concept-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.concept-card { min-height: 390px; padding: 24px; display: flex; flex-direction: column; border: 1px solid rgba(23, 32, 56, .1); border-radius: 24px; background: #fff; color: inherit; text-align: left; box-shadow: 0 16px 50px rgba(20, 29, 57, .07); transition: transform .25s, box-shadow .25s, border-color .25s; }
.concept-card:hover { transform: translateY(-6px); border-color: rgba(29, 47, 100, .35); box-shadow: var(--shadow); }
.concept-visual { height: 150px; margin-bottom: 26px; border-radius: 18px; padding: 18px; display: flex; align-items: flex-end; justify-content: space-between; overflow: hidden; }
.concept-visual span:first-child { font: 700 52px/1 "Unbounded", sans-serif; color: rgba(255, 255, 255, .92); }
.concept-visual span:last-child { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--navy); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.concept-care { background: linear-gradient(135deg, #1a2f66, #4c6fa7); }
.concept-office { background: linear-gradient(135deg, #243d4c, #4e8291); }
.concept-toys { background: linear-gradient(135deg, #175b88, #53a8be); }
.concept-food { background: linear-gradient(135deg, #6a351d, #dd8a48); }
.concept-entertainment { background: linear-gradient(135deg, #52266f, #9b5fc0); }
.concept-coffee { background: linear-gradient(135deg, #5e321f, #d98155); }
.concept-cozy { background: linear-gradient(135deg, #32463f, #789479); }
.concept-reading { background: linear-gradient(135deg, #402c61, #8a69aa); }
.concept-desk { background: linear-gradient(135deg, #243d4c, #4e8291); }
.concept-active { background: linear-gradient(135deg, #31513a, #70a866); }
.concept-reason { width: fit-content; margin: -8px 0 14px; padding: 6px 9px; border-radius: 8px; background: var(--soft-blue); color: var(--navy-2); font-size: 12px; font-weight: 800; }
.concept-reason.secondary-reason { background: var(--paper); color: var(--muted); }
.concept-card h2 { font-size: 28px; }
.concept-card p { color: var(--muted); }
.concept-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.concept-tags span { padding: 6px 9px; border-radius: 8px; background: var(--paper); color: var(--muted); font-size: 12px; }
.concept-bottom { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.concept-bottom strong { color: var(--navy); font-size: 20px; }
.concept-bottom span { color: var(--coral-dark); font-weight: 800; }

.bundle-layout { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.bundle-cover { height: 260px; position: relative; margin-bottom: 38px; overflow: hidden; border-radius: 24px; background: var(--navy); }
.bundle-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bundle-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,18,43,.82), rgba(9,18,43,.08)); }
.cover-copy { position: absolute; z-index: 1; left: 28px; bottom: 26px; display: grid; gap: 6px; color: #fff; }
.cover-copy span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .75; }
.cover-copy strong { font: 700 clamp(24px, 3vw, 38px)/1.1 "Unbounded", sans-serif; }

.items-heading { margin-bottom: 16px; display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.items-heading h2 { margin-bottom: 0; }
.item-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.item-list { display: grid; gap: 10px; }
.gift-item { min-height: 104px; padding: 15px 16px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: opacity .2s, border-color .2s; }
.gift-item.item-removed { opacity: .48; }
.item-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--soft-blue); color: var(--navy); font-size: 25px; }
.item-image { width: 56px; height: 56px; display: block; border: 1px solid var(--line); border-radius: 14px; background: #fff; object-fit: contain; }
.item-details { min-width: 0; }
.item-category { margin-bottom: 3px; color: var(--coral-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.item-name { margin-bottom: 7px; display: block; color: var(--ink); font-weight: 800; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.item-name:hover { color: var(--coral-dark); }
.item-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.market-pill { color: var(--navy); font-weight: 700; }
.item-side { min-width: 210px; display: grid; justify-items: end; gap: 10px; }
.item-price { color: var(--navy); font-size: 17px; font-weight: 800; }
.item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.item-action { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.item-action:hover { color: var(--coral-dark); }

.order-card { position: sticky; top: 96px; padding: 26px; border-radius: 22px; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.order-card .eyebrow { color: #ff9b8e; }
.total-line { padding: 12px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid rgba(255,255,255,.13); }
.total-line strong { font-size: 28px; }
.total-line.muted { color: rgba(255,255,255,.62); font-size: 14px; }
.budget-status { margin: 16px 0; padding: 11px 12px; border-radius: 10px; background: rgba(43,183,137,.15); color: #9aebd2; font-size: 13px; }
.budget-status.over { background: rgba(255,114,94,.16); color: #ffc0b8; }
.order-features { margin: 22px 0; }
.order-features p { margin-bottom: 9px; color: rgba(255,255,255,.78); font-size: 13px; }
.order-features span { color: #7ee2c2; padding-right: 5px; }
.order-card .demo-caption { color: rgba(255,255,255,.5); }

.links-dialog { width: min(620px, calc(100vw - 32px)); max-height: 86vh; padding: 28px; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 30px 100px rgba(11,20,49,.35); }
.links-dialog::backdrop { background: rgba(9, 18, 43, .68); backdrop-filter: blur(4px); }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; }
.dialog-header h2 { margin-bottom: 8px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); font-size: 24px; line-height: 1; }
.dialog-note { padding: 13px 14px; border-radius: 12px; background: var(--soft-blue); color: var(--muted); font-size: 13px; }
.link-list { max-height: 48vh; margin: 18px 0; display: grid; gap: 8px; overflow: auto; }
.product-link { padding: 13px 14px; display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.product-link:hover { border-color: var(--coral); }
.product-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-link strong { color: var(--coral-dark); font-size: 13px; white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 40; padding: 11px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1020px) {
  .profile-layout { max-width: 760px; }
  .editorial-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: end; }
  .editorial-panel .step-label, .editorial-panel h1, .editorial-panel .lead { grid-column: 1; }
  .editorial-panel h1 { font-size: clamp(36px, 7vw, 58px); }
  .hero-visual { grid-column: 2; grid-row: 1 / span 3; }
  .hero-visual img { height: 100%; aspect-ratio: auto; }
  .hero-visual figcaption { display: none; }
  .concept-grid { grid-template-columns: 1fr 1fr; }
  .bundle-layout { grid-template-columns: 1fr; }
  .order-card { position: static; }
}

@media (max-width: 700px) {
  .topbar { height: 62px; }
  .topbar-meta { font-size: 0; }
  .screen { padding-top: 26px; }
  .editorial-panel { display: block; padding-top: 0; }
  .editorial-panel h1 { margin-top: 22px; font-size: 38px; }
  .hero-visual { margin-top: 26px; }
  .hero-visual img { aspect-ratio: 3 / 2; height: auto; }
  .profile-form { padding: 22px 18px; border-radius: 20px; }
  .form-heading h1 { font-size: 34px; }
  .gender-options { grid-template-columns: 1fr; }
  .age-field { max-width: none; }
  .field-row, .compact-row { grid-template-columns: 1fr; gap: 0; }
  .concept-grid { grid-template-columns: 1fr; }
  .concept-card { min-height: 360px; }
  .bundle-cover { height: 220px; }
  .gift-item { grid-template-columns: 48px minmax(0, 1fr); }
  .item-icon, .item-image { width: 48px; height: 48px; }
  .item-side { grid-column: 2; min-width: 0; display: flex; justify-content: space-between; width: 100%; }
  .items-heading { align-items: start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
