:root {
  color-scheme: light;
  --ink: #10243d;
  --muted: #65758b;
  --line: #dce6f1;
  --surface: #ffffff;
  --background: #f3f7fb;
  --blue: #2775e7;
  --blue-dark: #1559b7;
  --cyan: #1dbdd1;
  --green: #20a864;
  --amber: #d88716;
  --red: #d9485f;
  --radius: 20px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.center-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.brand-mark { width: 64px; height: 64px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 22px; color: white; font-size: 28px; font-weight: 800; background: linear-gradient(145deg, var(--blue), var(--cyan)); box-shadow: 0 16px 36px #2775e740; }
.app { width: min(760px, 100%); margin: 0 auto; padding: 0 16px 96px; }
.topbar { position: sticky; top: 0; z-index: 10; margin: 0 -16px 18px; padding: calc(14px + env(safe-area-inset-top)) 20px 12px; display: flex; align-items: center; justify-content: space-between; background: rgba(243,247,251,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(220,230,241,.85); }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { font-size: 24px; margin: 2px 0 0; letter-spacing: -.03em; }
h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.025em; }
h3 { margin: 0 0 6px; font-size: 16px; }
p { line-height: 1.45; }
.icon-button, .modal-close { width: 38px; height: 38px; border: 0; border-radius: 14px; color: var(--ink); background: white; box-shadow: 0 4px 14px #183b6514; font-weight: 800; }
.view { display: none; }
.view.active { display: block; animation: appear .18s ease; }
@keyframes appear { from { opacity: .3; transform: translateY(4px); } }
.hero { padding: 24px; border-radius: 26px; color: white; background: radial-gradient(circle at 90% 10%, #2bd2dd88, transparent 34%), linear-gradient(140deg, #07182d, #144f96); box-shadow: 0 20px 50px #153f7030; }
.hero h2 { font-size: 27px; max-width: 520px; }
.hero p { color: #dceeff; margin: 10px 0 18px; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: #114164; background: #dff9ff; font-size: 12px; font-weight: 750; }
.card { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 24px #183b650d; }
.card p { margin: 5px 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.metric { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.metric strong { display: block; margin-top: 8px; font-size: 24px; }
.metric span { color: var(--muted); font-size: 13px; }
.button { width: 100%; border: 0; border-radius: 15px; padding: 13px 16px; color: white; background: var(--blue); font-weight: 750; transition: transform .12s, background .12s; }
.button:active { transform: scale(.985); }
.button:hover { background: var(--blue-dark); }
.button.secondary { color: var(--blue); background: #e9f2ff; }
.button.success { background: var(--green); }
.button.danger { color: var(--red); background: #fff0f2; }
.button.compact { width: auto; padding: 9px 13px; font-size: 13px; }
.button + .button { margin-top: 9px; }
.progress { height: 9px; overflow: hidden; border-radius: 99px; background: #e6edf5; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.checklist { display: grid; gap: 10px; margin: 14px 0; }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.check.done { color: var(--ink); }
.check i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 9px; background: #eaf0f7; font-style: normal; }
.check.done i { color: white; background: var(--green); }
.section-title { display: flex; justify-content: space-between; align-items: end; margin: 22px 2px 8px; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.list { display: grid; gap: 10px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px #20a8641c; }
.input, .textarea, .select { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; color: var(--ink); background: white; outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: #75aaf4; box-shadow: 0 0 0 3px #2775e71a; }
.textarea { min-height: 90px; resize: vertical; }
label { display: block; margin: 13px 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.switch-line { display: flex; align-items: flex-start; gap: 10px; margin: 13px 0; color: var(--ink); }
.switch-line input { margin-top: 4px; }
.plan { position: relative; }
.plan.recommended { border: 2px solid var(--blue); }
.plan-price { font-size: 27px; font-weight: 850; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.features { margin: 13px 0 17px; padding: 0; list-style: none; }
.features li { margin: 8px 0; padding-left: 23px; position: relative; color: var(--muted); }
.features li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 850; }
.result { white-space: pre-wrap; line-height: 1.55; }
.tabbar { position: fixed; z-index: 20; left: 50%; bottom: 0; width: min(760px, 100%); transform: translateX(-50%); display: grid; grid-template-columns: repeat(6, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
.tab { border: 0; padding: 4px 2px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 650; }
.tab span { display: block; margin-bottom: 2px; font-size: 20px; line-height: 1; }
.tab.active { color: var(--blue); }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; padding: 16px; background: #07182d88; backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(640px, 100%); max-height: 88vh; overflow: auto; margin: auto; padding: 24px; border-radius: 24px; background: white; box-shadow: 0 30px 80px #07182d66; }
.modal-close { position: absolute; top: 12px; right: 12px; font-size: 22px; box-shadow: none; background: #eff4f8; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 88px; width: min(520px, calc(100% - 32px)); transform: translateX(-50%); padding: 13px 16px; border-radius: 14px; color: white; background: #10243df0; box-shadow: 0 12px 40px #10243d55; text-align: center; }
.empty { padding: 30px 18px; border: 1px dashed #bfd0e2; border-radius: 18px; color: var(--muted); text-align: center; }
.privacy { font-size: 12px; color: var(--muted); }
.link-button { border: 0; padding: 0; color: var(--blue); background: transparent; text-decoration: underline; cursor: pointer; font: inherit; }
.result summary { cursor: pointer; font-weight: 750; white-space: normal; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.media-tile { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.media-tile img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eaf0f7; }
.media-tile .media-meta { padding: 9px; }
.media-tile strong, .media-tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-tile small { margin-top: 3px; color: var(--muted); }
.media-delete { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; border: 0; border-radius: 11px; color: var(--red); background: rgba(255,255,255,.92); font-weight: 850; }
.editor-canvas-wrap { margin: 12px auto; overflow: hidden; border-radius: 18px; background: #0b1727; box-shadow: 0 12px 34px #10243d20; }
#brandCanvas { display: block; width: 100%; height: auto; max-height: 64vh; object-fit: contain; }
.color-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.color-row label { margin: 7px 0; }
.color-input { display: block; width: 100%; height: 44px; margin-top: 6px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.range-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.radar-recipe { border-color: #b7d8ff; background: linear-gradient(145deg, #f3f8ff, #fff); }
.upload-zone { padding: 18px; border: 1px dashed #9cbddd; border-radius: 17px; background: #f7fbff; }
.asset-choice { min-height: 44px; }
.design-actions { display: flex; gap: 8px; margin-top: 9px; }
.design-actions .button { margin: 0; }
@media (min-width: 660px) { .modal { align-items: center; } .app { padding-top: 0; } }
@media (max-width: 520px) { .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tab { font-size: 9px; } .tab span { font-size: 18px; } }
@media (max-width: 390px) { .hero { padding: 20px; } .hero h2 { font-size: 24px; } .grid { grid-template-columns: 1fr 1fr; } .app { padding-left: 12px; padding-right: 12px; } }
