:root {
  color-scheme: light;
  --bg: #f3f7ff;
  --surface: #ffffff;
  --ink: #0b1733;
  --muted: #64748b;
  --line: #d8e2f3;
  --accent: #176bff;
  --accent-dark: #0b4fcd;
  --acid: #7dd3fc;
  --success: #15845f;
  --radius: 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  min-width: 320px;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(11, 23, 51, .08);
}
.brand { display: flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 850; letter-spacing: -.06em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--accent); color: #fff; border-radius: 50%; font-size: 12px; letter-spacing: -.07em; }
.desktop-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link, .mobile-link, .text-button { border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.nav-link { padding: 10px 15px; border-radius: 12px; color: var(--muted); }
.nav-link.is-active { color: var(--ink); background: #fff; }
.header-action { display: inline-flex; align-items: center; gap: 18px; padding: 12px 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 13px; font-weight: 750; }

main { padding-bottom: 40px; }
.hero {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 590px;
  padding: 72px 6vw;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  border-radius: 0 0 36px 36px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 42%, rgba(23,107,255,.65), transparent 30%),
    linear-gradient(135deg, #071226 10%, #10244a 58%, #173a75);
  overflow: hidden;
}
.eyebrow, .step-label { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { color: #9dc4ff; }
.hero-content { position: relative; z-index: 2; }
.hero h1, .orders-view h1 { margin: 0; font-size: clamp(55px, 7.2vw, 104px); line-height: .91; letter-spacing: -.07em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy { max-width: 520px; margin: 34px 0; color: #dbe7ff; font-size: clamp(17px, 2vw, 22px); line-height: 1.45; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.primary-link { display: inline-flex; gap: 36px; align-items: center; padding: 17px 22px; border-radius: 999px; color: #fff; background: var(--accent); text-decoration: none; font-weight: 800; }
.secondary-link { padding: 12px 2px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.55); text-decoration: none; font-weight: 700; }
.hero-art { position: relative; height: 430px; display: grid; place-items: center; }
.hero-shirt { position: relative; z-index: 2; width: 260px; height: 320px; display: grid; place-items: center; background: #f6f9ff; color: var(--ink); clip-path: polygon(23% 0, 38% 8%, 62% 8%, 77% 0, 100% 18%, 84% 39%, 75% 31%, 78% 100%, 22% 100%, 25% 31%, 16% 39%, 0 18%); filter: drop-shadow(0 25px 26px rgba(0,0,0,.35)); transform: rotate(4deg); }
.hero-shirt span { font-size: 35px; font-weight: 950; line-height: .79; letter-spacing: -.09em; text-align: center; transform: rotate(-4deg); }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; }
.hero-orbit-one { width: 390px; height: 390px; }
.hero-orbit-two { width: 295px; height: 295px; border-color: rgba(125,211,252,.58); }
.hero-sticker { position: absolute; z-index: 3; right: 6%; top: 10%; width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-weight: 900; transform: rotate(10deg); }

.fact-strip { width: min(1240px, calc(100% - 48px)); margin: 14px auto 0; padding: 24px 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-radius: 20px; background: var(--ink); color: #fff; }
.fact-strip div { display: flex; flex-direction: column; gap: 4px; }
.fact-strip strong { font-size: 22px; letter-spacing: -.04em; }
.fact-strip span { color: #b7c8e6; font-size: 12px; }

.section-shell { width: min(1240px, calc(100% - 48px)); margin: 26px auto 0; padding: 40px; border-radius: var(--radius); background: var(--surface); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
.step-label { color: var(--accent-dark); }
.section-kicker { margin-bottom: 32px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.category-heading { display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; gap: 28px; margin-bottom: 34px; }
.category-heading h2, .manager-section h2, .process h2 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: .95; letter-spacing: -.065em; }
.category-heading p { max-width: 400px; margin: 0; color: var(--muted); line-height: 1.6; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.category-card { min-height: 230px; padding: 18px; display: flex; flex-direction: column; border-radius: 18px; background: #eaf1ff; color: var(--ink); text-decoration: none; }
.category-card > span { color: var(--muted); font-size: 12px; }
.category-card strong { margin: auto 0; font-size: 27px; line-height: 1; letter-spacing: -.05em; }
.category-card small { color: var(--muted); }
.category-card.is-ready { background: var(--accent); color: #fff; transform: rotate(-1deg); }
.category-card.is-ready > span, .category-card.is-ready small { color: rgba(255,255,255,.8); }
.text-button { padding: 8px 0; font-weight: 700; border-bottom: 1px solid currentColor; }
.catalog-state { padding: 42px 0; color: var(--muted); }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; min-height: 280px; padding: 20px; border: 1px solid transparent; border-radius: 18px; text-align: left; background: #eef4ff; cursor: pointer; overflow: hidden; transition: transform .18s, border-color .18s; }
.product-card:hover { transform: translateY(-3px); }
.product-card.is-selected { border: 2px solid var(--accent); padding: 19px; }
.product-card-visual { height: 170px; display: grid; place-items: center; }
.mini-garment { width: 96px; height: 114px; background: #dbe7f8; clip-path: polygon(24% 0, 39% 8%, 61% 8%, 76% 0, 100% 18%, 83% 38%, 74% 31%, 78% 100%, 22% 100%, 26% 31%, 17% 38%, 0 18%); filter: drop-shadow(0 12px 12px rgba(0,0,0,.12)); }
.mini-garment.color-black { background: #111827; }
.mini-garment.color-white { background: #fff; border: 1px solid #ddd; }
.product-card strong { display: block; font-size: 17px; }
.product-card small { display: block; margin-top: 5px; color: var(--muted); }
.product-card-price { position: absolute; top: 16px; right: 16px; padding: 8px 11px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; }

.constructor.is-disabled { opacity: .58; }
.constructor { background: var(--ink); color: #fff; }
.constructor .step-label { color: #8fbaff; }
.constructor-grid { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(430px, 1.05fr); gap: 38px; }
.sku-badge { padding: 9px 12px; border-radius: 999px; background: #17233d; color: #b7c8e6; font-size: 12px; }
.preview-column { min-width: 0; }
.product-canvas { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 22px; background: #edf4ff; overflow: hidden; touch-action: none; }
.garment-shape { width: 72%; height: 78%; background: #dbe7f8; clip-path: polygon(22% 0, 38% 7%, 62% 7%, 78% 0, 100% 18%, 84% 39%, 75% 31%, 78% 100%, 22% 100%, 25% 31%, 16% 39%, 0 18%); filter: drop-shadow(0 20px 22px rgba(0,0,0,.18)); }
.color-black .garment-shape { background: #111827; }
.color-white .garment-shape { background: #fff; }
.print-zone { position: absolute; width: 36%; height: 42%; top: 23%; left: 32%; border: 1px dashed rgba(23,107,255,.7); border-radius: 8px; }
.print-preview { display: none; position: absolute; left: 50%; top: 36%; width: 25%; max-height: 32%; object-fit: contain; transform: translate(-50%, -50%); cursor: grab; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.print-preview.is-visible { display: block; }
.preview-hint { position: absolute; inset: auto 0 11%; margin: 0; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.5; }
.drag-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.order-form { display: flex; flex-direction: column; gap: 18px; padding: 6px; }
.upload-box { position: relative; }
.upload-box input { position: absolute; opacity: 0; pointer-events: none; }
.upload-box label { min-height: 96px; padding: 16px; display: flex; align-items: center; gap: 14px; border: 1px dashed #466184; border-radius: 16px; background: #14213b; cursor: pointer; }
.upload-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 26px; }
.upload-box strong, .upload-box small { display: block; }
.upload-box small { margin-top: 4px; color: var(--muted); }
.file-name { position: absolute; right: 14px; bottom: 10px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--success); font-size: 12px; }
.control-row, .order-summary, .checkout-row { display: flex; align-items: center; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .quantity span, .total span { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea, .quantity input { width: 100%; border: 1px solid #405a7d; border-radius: 12px; background: #14213b; color: #fff; padding: 13px 14px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .quantity input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,255,.2); }
.compact-field { width: 150px; flex: 0 0 auto; }
.range-field { flex: 1; }
.range-field input { padding: 0; accent-color: var(--accent); box-shadow: none; border: 0; }
.order-summary { justify-content: space-between; padding: 17px; background: #14213b; border-radius: 16px; }
.order-summary strong, .order-summary span { display: block; }
.order-summary span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.quantity { display: flex; align-items: center; gap: 8px; }
.quantity input { width: 72px; }
.form-divider { height: 1px; background: #28405f; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full-field { grid-column: 1 / -1; }
.field textarea { resize: vertical; }
.manual-price { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid #405a7d; border-radius: 14px; cursor: pointer; }
.manual-price input { margin-top: 4px; accent-color: var(--accent); }
.manual-price strong, .manual-price small { display: block; }
.manual-price small { margin-top: 4px; color: var(--muted); }
.checkout-row { justify-content: space-between; margin-top: 4px; }
.total strong { display: block; margin-top: 4px; font-size: 28px; letter-spacing: -.04em; }
.primary-button { border: 0; padding: 16px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; transition: background .18s, transform .18s; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { background: #bebbb3; cursor: not-allowed; transform: none; }
.small-button { padding: 12px 16px; }
.form-note, .orders-note { margin: -6px 0 0; color: var(--muted); font-size: 12px; }

.manager-section { display: grid; grid-template-columns: 1.25fr .75fr; gap: 50px; align-items: end; background: var(--accent); color: #fff; }
.manager-section .eyebrow { color: rgba(255,255,255,.75); }
.manager-copy p { color: rgba(255,255,255,.8); line-height: 1.55; }
.manager-copy a { display: inline-flex; gap: 40px; margin-top: 16px; padding: 15px 20px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; }
.process > h2 { margin-bottom: 36px; }
.process ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border-top: 1px solid var(--line); }
.process li { padding: 20px 20px 0 0; }
.process li > span { display: block; margin-bottom: 38px; color: var(--accent); font-size: 12px; font-weight: 800; }
.process li strong { display: block; font-size: 18px; }
.process li p { color: var(--muted); font-size: 13px; }

.orders-view { min-height: calc(100vh - 130px); }
.orders-view h1 { font-size: clamp(54px, 8vw, 100px); }
.orders-note { margin-bottom: 24px; font-size: 14px; }
.orders-list { display: grid; gap: 12px; }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; }
.order-card h3 { margin: 0 0 7px; font-size: 20px; }
.order-card p { margin: 0; color: var(--muted); font-size: 13px; }
.order-status { align-self: start; padding: 7px 9px; border-radius: 999px; background: #e3f4ed; color: #0e684a; font-size: 12px; font-weight: 800; }
.empty-orders { padding: 50px 0; color: var(--muted); text-align: center; }

.success-dialog { width: min(430px, calc(100% - 32px)); padding: 34px; border: 0; border-radius: 24px; text-align: center; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.success-dialog::backdrop { background: rgba(11,23,51,.6); backdrop-filter: blur(5px); }
.success-dialog h2 { margin: 4px 0 10px; font-size: 34px; }
.success-dialog p:not(.step-label) { color: var(--muted); line-height: 1.5; }
.success-icon { width: 60px; height: 60px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: #e3f4ed; color: var(--success); font-size: 30px; }
.dialog-actions { display: grid; gap: 10px; margin-top: 22px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 26px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: #0b1733; color: #fff; opacity: 0; pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr .7fr; padding-left: 42px; padding-right: 28px; }
  .hero-art { height: 380px; transform: scale(.82); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .constructor-grid { grid-template-columns: 1fr; }
  .product-canvas { max-height: 620px; }
  .process ol { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}

@media (max-width: 620px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar { height: 62px; padding: 0 16px; }
  .desktop-nav { display: none; }
  .header-action { margin-left: auto; padding: 10px 14px; font-size: 12px; }
  .header-action span { display: none; }
  .hero, .section-shell { width: calc(100% - 20px); }
  .hero { min-height: 650px; padding: 52px 22px 28px; grid-template-columns: 1fr; align-items: start; border-radius: 0 0 26px 26px; }
  .hero h1 { font-size: clamp(50px, 15vw, 70px); }
  .hero-copy { margin: 24px 0; font-size: 16px; }
  .hero-actions { gap: 14px; }
  .primary-link { gap: 20px; }
  .hero-art { height: 255px; transform: none; }
  .hero-shirt { width: 155px; height: 195px; }
  .hero-shirt span { font-size: 23px; }
  .hero-orbit-one { width: 245px; height: 245px; }
  .hero-orbit-two { width: 190px; height: 190px; }
  .hero-sticker { right: 9%; top: 2%; width: 64px; height: 64px; font-size: 12px; }
  .fact-strip { width: calc(100% - 20px); margin-top: 10px; padding: 18px; grid-template-columns: 1fr 1fr; gap: 18px; border-radius: 18px; }
  .fact-strip strong { font-size: 18px; }
  .section-shell { margin-top: 10px; padding: 22px 16px; border-radius: 20px; }
  .section-heading { align-items: flex-start; margin-bottom: 22px; }
  .section-heading h2 { font-size: 32px; }
  .category-heading { grid-template-columns: 1fr; gap: 18px; }
  .category-heading h2, .manager-section h2, .process h2 { font-size: 40px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .category-card { min-height: 155px; padding: 14px; }
  .category-card strong { font-size: 20px; }
  .catalog-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card { min-height: 220px; padding: 13px; border-radius: 14px; }
  .product-card.is-selected { padding: 12px; }
  .product-card-visual { height: 132px; }
  .product-card-price { top: 9px; right: 9px; font-size: 11px; }
  .product-card strong { font-size: 14px; }
  .constructor-grid { gap: 20px; }
  .product-canvas { border-radius: 16px; }
  .control-row { align-items: stretch; flex-direction: column; }
  .compact-field { width: 100%; }
  .fields-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .checkout-row { align-items: stretch; flex-direction: column; }
  .checkout-row .primary-button { width: 100%; }
  .order-summary { align-items: flex-start; }
  .quantity { flex-direction: column; align-items: flex-start; }
  .mobile-nav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 62px; padding: 6px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(7,18,38,.94); backdrop-filter: blur(18px); }
  .mobile-link { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 13px; color: #aaa; font-size: 12px; font-weight: 700; }
  .mobile-link.is-active { color: #fff; background: #163565; }
  .mobile-link span { font-size: 17px; }
  .orders-view h1 { font-size: 54px; }
  .orders-view .section-heading { flex-direction: column; }
  .order-card { grid-template-columns: 1fr; }
  .manager-section { grid-template-columns: 1fr; gap: 24px; }
  .process ol { grid-template-columns: 1fr 1fr; gap: 22px 10px; }
  .process li { padding-right: 5px; }
  .process li > span { margin-bottom: 20px; }
}
