:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #121519;
  --surface-raised: #191d22;
  --surface-soft: #22272d;
  --border: #343a42;
  --border-soft: #272c32;
  --text: #ebe5da;
  --muted: #9da4aa;
  --muted-low: #747d84;
  --accent: #3d91c4;
  --accent-bright: #72bfe3;
  --gold: #bd965a;
  --gold-bright: #e0bd7b;
  --success: #85ad72;
  --danger: #cf6e5b;
  --cancelled: #9aa2a9;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.flow-body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

.flow-body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background: radial-gradient(circle at 12% -5%, rgba(43,159,233,.14), transparent 30rem), radial-gradient(circle at 95% 105%, rgba(189,150,90,.08), transparent 34rem), linear-gradient(135deg, #111419, #0b0d10 56%, #080a0c);
  content: "";
}

.flow-body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(115deg, rgba(255,255,255,.018), transparent 38%), repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,.009) 80px);
  content: "";
  pointer-events: none;
}

.flow-header {
  display: flex;
  width: min(calc(100% - 40px), 1120px);
  height: 76px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  border-bottom: 1px solid rgba(52,58,66,.68);
}

.flow-brand { display: inline-flex; align-items: center; gap: 10px; color: #dfe2e3; font-size: 15px; font-weight: 780; letter-spacing: -.035em; text-decoration: none; }
.flow-brand img { width: 41px; height: 41px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0,0,0,.42)); }
.flow-brand strong { color: var(--gold); }
.header-link, .header-context { color: #778188; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.header-link:hover { color: #cbd0d3; }

.flow-main { width: min(calc(100% - 40px), 1120px); margin: 0 auto; padding: clamp(38px, 7vh, 78px) 0 34px; }
.workspace-card { overflow: hidden; border: 1px solid #46505a; border-top-color: #626d76; border-radius: 8px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.52), 0 0 0 1px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.04); }
.workspace-bar { display: grid; height: 31px; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; border-bottom: 1px solid #242a2f; background: #080a0c; color: #69737a; font-size: 7px; letter-spacing: .12em; }
.workspace-bar > span { display: flex; gap: 5px; }
.workspace-bar i { width: 5px; height: 5px; border-radius: 50%; background: #394047; }
.workspace-bar strong { color: #79838a; font-weight: 800; }
.workspace-bar em { justify-self: end; color: #657f8c; font-style: normal; font-weight: 800; }

.gift-workspace { display: grid; grid-template-columns: minmax(0, .94fr) minmax(430px, 1.06fr); }
.gift-workspace .workspace-bar { grid-column: 1 / -1; }
.gift-story { position: relative; overflow: hidden; min-height: 620px; padding: clamp(38px, 5vw, 58px); border-right: 1px solid var(--border); background: radial-gradient(circle at 5% 0%, rgba(61,145,196,.2), transparent 24rem), radial-gradient(circle at 95% 90%, rgba(189,150,90,.1), transparent 25rem), linear-gradient(145deg, #172129, #101419 68%); }
.gift-story::after { position: absolute; right: -80px; bottom: -110px; width: 320px; height: 320px; border: 1px solid rgba(114,191,227,.08); border-radius: 50%; box-shadow: 0 0 0 45px rgba(114,191,227,.025), 0 0 0 90px rgba(114,191,227,.018); content: ""; }
.pro-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-bottom: 55px; }
.pro-lockup span { padding: 4px 7px 3px; border: 1px solid #416878; border-left: 2px solid #c9a15b; border-radius: 3px; background: #20333c; color: #e4bf77; font-size: 10px; font-weight: 850; letter-spacing: .055em; }
.pro-lockup small { color: #667179; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.flow-kicker { margin: 0 0 11px; color: var(--accent-bright); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.gift-story h1, .result-copy h1 { position: relative; z-index: 1; margin: 0; color: #f0eee8; font-size: clamp(2.7rem, 4.6vw, 4.15rem); letter-spacing: -.057em; line-height: .98; }
.gift-lead { position: relative; z-index: 1; max-width: 520px; margin: 24px 0 30px; color: #a9b1b6; font-size: 15px; line-height: 1.7; }

.recipient-card { position: relative; z-index: 1; display: grid; max-width: 410px; min-height: 76px; grid-template-columns: 54px 1fr; align-items: center; gap: 13px; padding: 10px 14px 10px 10px; border: 1px solid #40515b; border-radius: 6px; background: rgba(12,17,21,.68); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.recipient-avatar { width: 54px; height: 54px; grid-area: 1 / 1; border: 1px solid #477a92; border-radius: 4px; background: #183746; object-fit: cover; }
.recipient-avatar-fallback { display: grid; place-items: center; color: #bfe9fa; font-size: 21px; font-weight: 800; }
.recipient-card > div { display: grid; min-width: 0; }
.recipient-card small { color: #6d7880; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.recipient-card strong { overflow: hidden; color: #e8e8e4; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.recipient-card div > span { overflow: hidden; color: #7d8990; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.gift-benefits { position: relative; z-index: 1; display: grid; gap: 0; margin: 35px 0 0; padding: 0; list-style: none; }
.gift-benefits li { display: grid; grid-template-columns: 29px 1fr; gap: 9px; padding: 12px 0; border-top: 1px solid rgba(52,58,66,.72); }
.gift-benefits li > span { color: #5d7886; font: 700 8px/1.5 Consolas, monospace; }
.gift-benefits li div { display: grid; }
.gift-benefits strong { color: #cbd0d2; font-size: 11px; }
.gift-benefits small { color: #737d84; font-size: 9px; }

.gift-action { display: grid; min-height: 620px; align-items: center; padding: clamp(35px, 5vw, 58px); background: linear-gradient(145deg, rgba(25,29,34,.97), rgba(14,17,20,.98)); }
.gift-action h2, .message-state h2, .loading-state h2 { margin: 0; color: #f0eee8; font-size: clamp(2rem, 3vw, 2.65rem); letter-spacing: -.045em; line-height: 1.08; }
.action-lead, .message-state > p, .loading-state > p { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.action-lead strong { color: #dce0df; }
.order-summary { margin: 28px 0 21px; border-block: 1px solid var(--border); }
.order-summary div { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border-soft); }
.order-summary div:last-child { border-bottom: 0; }
.order-summary dt { color: #7d878e; font-size: 10px; }
.order-summary dd { overflow: hidden; margin: 0; color: #d4d7d6; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
form { display: grid; }
label { display: flex; justify-content: space-between; margin: 13px 0 6px; color: #c2c8cb; font-size: 10px; font-weight: 750; }
label span { color: #687279; font-size: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
input, textarea { width: 100%; border: 1px solid #3a434b; border-radius: 5px; outline: none; background: #0c1013; color: var(--text); transition: border-color .15s, box-shadow .15s; }
input { height: 43px; padding: 0 12px; }
textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #545d63; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,145,196,.12); }
.primary-button, .secondary-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 12px; padding: 9px 15px; border: 1px solid #5593b8; border-radius: 5px; background: linear-gradient(180deg, #2f7da9, #215773); color: #f7f4ed; font-size: 11px; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.13), 0 8px 22px rgba(33,87,115,.2); }
.primary-button { width: 100%; margin-top: 21px; justify-content: space-between; padding-inline: 16px; }
.primary-button:hover { border-color: #78bddf; background: linear-gradient(180deg, #3b8fbb, #276984); }
.primary-button:disabled { cursor: wait; opacity: .62; }
.secondary-button { width: fit-content; margin-top: 22px; border-color: #3b424a; background: linear-gradient(180deg, #24292f, #191d22); color: #d9dde0; box-shadow: inset 0 1px rgba(255,255,255,.05); }
.secondary-button:hover { border-color: #59636e; background: linear-gradient(180deg, #2c3239, #1e2328); color: #fff; }
.privacy-note { display: flex; align-items: flex-start; gap: 7px; margin: 15px 0 0; color: #677178; font-size: 9px; }
.privacy-note > span { color: #927544; font-size: 7px; }
.privacy-note strong { color: #8c969c; }
.flow-footnote { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 15px 0 0; color: #606970; font-size: 9px; text-align: center; }
.flow-footnote span { color: #788c98; font-size: 8px; font-weight: 850; letter-spacing: .1em; }

.loading-state, .message-state { max-width: 430px; }
.loading-mark { display: block; width: 33px; height: 33px; margin-bottom: 30px; border: 2px solid #29333a; border-top-color: var(--accent-bright); border-radius: 50%; animation: spin .9s linear infinite; }
.skeleton-lines { display: grid; gap: 10px; margin-top: 32px; }
.skeleton-lines i { display: block; width: 100%; height: 42px; border: 1px solid #2d343a; border-radius: 4px; background: linear-gradient(90deg, #111519, #1b2025, #111519); background-size: 220% 100%; animation: shimmer 1.7s ease-in-out infinite; }
.skeleton-lines i:nth-child(2) { width: 82%; }
.skeleton-lines i:nth-child(3) { width: 56%; }
.state-symbol { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 30px; border: 1px solid #4b555d; border-radius: 50%; background: #1b2025; color: #9ca5ab; font-size: 18px; font-weight: 700; }
.state-symbol.error { border-color: #75483f; background: #261816; color: #e18a78; }
.inline-note { margin-top: 24px; padding: 12px 13px; border-left: 2px solid #6a8390; background: rgba(61,145,196,.065); color: #8f9ba2; font-size: 10px; }

.result-main { display: grid; width: min(calc(100% - 40px), 860px); min-height: calc(100vh - 76px); place-items: center; margin: 0 auto; padding: 42px 0 80px; }
.result-workspace { display: grid; width: 100%; grid-template-columns: 270px 1fr; }
.result-workspace .workspace-bar { grid-column: 1 / -1; }
.result-visual { position: relative; display: grid; min-height: 390px; place-content: center; justify-items: center; overflow: hidden; border-right: 1px solid var(--border); background: radial-gradient(circle at 50% 42%, rgba(61,145,196,.17), transparent 12rem), linear-gradient(145deg, #172129, #0f1418); }
.result-orbit { position: absolute; width: 210px; height: 210px; border: 1px solid rgba(114,191,227,.12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(114,191,227,.035), 0 0 0 68px rgba(114,191,227,.02); }
.result-symbol { position: relative; display: grid; width: 74px; height: 74px; place-items: center; border: 1px solid #497c94; border-radius: 50%; background: #173444; color: #9cd9f4; font-size: 31px; font-weight: 700; box-shadow: 0 0 28px rgba(61,145,196,.2), inset 0 1px rgba(255,255,255,.06); }
.result-visual small { position: relative; margin-top: 19px; color: #7fa9bc; font-size: 8px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.result-copy { display: flex; min-height: 390px; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 64px); background: linear-gradient(145deg, rgba(25,29,34,.98), rgba(14,17,20,.98)); }
.result-copy h1 { font-size: clamp(2.45rem, 5vw, 4rem); }
.result-message { max-width: 510px; margin: 21px 0 0; color: #a8b0b5; font-size: 14px; line-height: 1.68; }
.result-next { display: grid; grid-template-columns: 45px 1fr; gap: 13px; margin-top: 30px; padding: 15px 0; border-block: 1px solid var(--border-soft); }
.result-next > span { color: #607988; font-size: 8px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.result-next p { margin: 0; color: #818b91; font-size: 10px; }
.result-workspace[data-state="success"] .result-symbol { border-color: #55784c; background: #1c2d1b; color: #9fca8f; box-shadow: 0 0 28px rgba(133,173,114,.17); }
.result-workspace[data-state="success"] .result-visual { background: radial-gradient(circle at 50% 42%, rgba(133,173,114,.14), transparent 12rem), linear-gradient(145deg, #18251c, #101516); }
.result-workspace[data-state="success"] .result-visual small { color: #8fae84; }
.result-workspace[data-state="error"] .result-symbol { border-color: #75483f; background: #2a1917; color: #e18a78; box-shadow: 0 0 28px rgba(207,110,91,.16); }
.result-workspace[data-state="error"] .result-visual { background: radial-gradient(circle at 50% 42%, rgba(207,110,91,.13), transparent 12rem), linear-gradient(145deg, #281b1a, #121416); }
.result-workspace[data-state="error"] .result-visual small { color: #c67b6d; }
.result-workspace[data-state="cancelled"] .result-symbol { border-color: #525a61; background: #20252a; color: #a9b0b5; box-shadow: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 50% { background-position: 100% 0; } }

@media (max-width: 820px) {
  .gift-workspace { grid-template-columns: 1fr; }
  .gift-story { min-height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .gift-action { min-height: 530px; }
  .result-workspace { grid-template-columns: 190px 1fr; }
}

@media (max-width: 600px) {
  .flow-header, .flow-main, .result-main { width: min(calc(100% - 20px), 1120px); }
  .header-link { display: none; }
  .workspace-bar { grid-template-columns: 1fr auto; }
  .workspace-bar > strong { display: none; }
  .gift-story, .gift-action { padding: 30px 22px; }
  .gift-story h1 { font-size: 2.75rem; }
  .gift-action { min-height: 500px; }
  .pro-lockup { margin-bottom: 42px; }
  .result-workspace { grid-template-columns: 1fr; }
  .result-visual { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--border); }
  .result-orbit { width: 155px; height: 155px; }
  .result-copy { min-height: 360px; padding: 34px 25px; }
  .result-copy h1 { font-size: 2.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .loading-mark, .skeleton-lines i { animation: none; }
}
