:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #64748b;
  --line: #dce2ea;
  --paper: #f5f2ea;
  --card: #ffffff;
  --navy: #0d1220;
  --accent: #ff5a36;
  --accent-dark: #d83d20;
  --mint: #b8f3d1;
  --focus: #2563eb;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, select, input[type="color"], input[type="range"] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus), transparent 45%); outline-offset: 2px; }
.site-header { min-height: 68px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--navy); color: white; border-bottom: 1px solid #263044; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 25px; height: 25px; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 2px; }
.brand-mark i { background: var(--accent); border-radius: 1px; }
.brand-mark i:nth-child(1) { grid-area: 1 / 1 / 3 / 3; border: 3px solid var(--accent); background: transparent; }
.brand-mark i:nth-child(2) { grid-area: 1 / 3; }
.brand-mark i:nth-child(3) { grid-area: 2 / 3; }
.brand-mark i:nth-child(4) { grid-area: 3 / 1; }
.brand-mark i:nth-child(5) { grid-area: 3 / 2 / 4 / 4; }
.trust-strip { display: flex; align-items: center; gap: 22px; font-size: 12px; color: #cbd5e1; }
.trust-strip span { display: inline-flex; align-items: center; gap: 7px; }
.trust-strip b { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.12); }
main { max-width: 1280px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px) 80px; }
.intro { padding: clamp(54px, 7vw, 92px) 0 40px; max-width: 760px; }
.eyebrow { margin: 0 0 15px; color: var(--accent-dark); font: 800 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.intro h1 { margin: 0; font-size: clamp(42px, 7vw, 76px); line-height: .98; letter-spacing: -.062em; max-width: 720px; }
.intro > p:last-child { max-width: 650px; margin: 24px 0 0; color: #536174; font-size: clamp(16px, 2vw, 20px); line-height: 1.6; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr); gap: 22px; align-items: start; }
.builder, .preview-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.builder { padding: clamp(22px, 4vw, 40px); }
.step-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.step-heading > span { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: white; font: 700 11px ui-monospace, monospace; }
.step-heading h2 { margin: 0 0 3px; font-size: 21px; letter-spacing: -.025em; }
.step-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.type-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.type-tab { min-width: 70px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; color: #475569; padding: 10px 10px; display: grid; gap: 5px; place-items: center; font-size: 11px; font-weight: 700; }
.type-tab > span { font-size: 18px; line-height: 1; font-weight: 500; }
.type-tab:hover { border-color: #9aa7b8; }
.type-tab.active { background: var(--navy); color: white; border-color: var(--navy); }
.content-panels { min-height: 106px; margin-top: 13px; }
.content-panel { animation: reveal .18s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(3px); } }
.field-grid, .design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 7px; color: #334155; font-size: 12px; font-weight: 700; }
input:not([type="checkbox"]):not([type="range"]):not([type="color"]), textarea, select { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #cfd7e2; border-radius: 9px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.45; }
input:hover, textarea:hover, select:hover { border-color: #9aa7b8; }
.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; min-height: 28px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.content-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); padding: 4px 0; font-weight: 800; }
hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.design-grid { gap: 15px; }
.color-field span { display: flex; align-items: center; min-height: 45px; padding: 5px 10px 5px 6px; border: 1px solid #cfd7e2; border-radius: 9px; gap: 10px; }
.color-field input { width: 34px; height: 32px; border: 0; padding: 0; background: transparent; }
.color-field output { font: 600 12px ui-monospace, monospace; color: #475569; }
.design-grid input[type="range"], .range-field input { width: 100%; accent-color: var(--accent); }
.design-grid label > span, .range-field > span { float: right; color: var(--muted); font-weight: 600; }
.design-grid label > small { color: var(--muted); font-size: 11px; font-weight: 500; }
.frame-picker { min-width: 0; margin: 3px 0 1px; padding: 0; border: 0; }
.frame-picker legend { margin-bottom: 8px; color: #334155; font-size: 12px; font-weight: 700; }
.frame-options { display: grid; grid-template-columns: repeat(4, minmax(88px, 1fr)); gap: 8px; }
.frame-option { position: relative; min-width: 0; padding: 7px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.frame-option:hover { border-color: #9aa7b8; transform: translateY(-1px); }
.frame-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 78%); background: #fff8f5; }
.frame-option:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--focus), transparent 45%); outline-offset: 2px; }
.frame-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.frame-name { overflow: hidden; max-width: 100%; color: #475569; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.frame-preview { --frame: #ff5a36; position: relative; display: block; width: 68px; height: 68px; overflow: visible; border: 2px solid var(--frame); border-radius: 8px; background: white; }
.frame-preview i { position: absolute; left: 50%; top: 8px; width: 40px; height: 40px; transform: translateX(-50%); background: repeating-conic-gradient(#111827 0 25%, #fff 0 50%) 0 0 / 8px 8px; box-shadow: inset 0 0 0 3px white; }
.frame-preview i::before, .frame-preview i::after { content: ""; position: absolute; top: 3px; width: 11px; height: 11px; border: 3px solid #111827; background: white; }
.frame-preview i::before { left: 3px; }
.frame-preview i::after { right: 3px; }
.frame-preview b { position: absolute; right: 5px; bottom: 4px; left: 5px; overflow: hidden; padding: 2px 3px; border-radius: 999px; background: var(--frame); color: #111827; font: 800 7px/1 ui-sans-serif, sans-serif; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.frame-preview em { display: none; }
.frame-preview.none { border-color: transparent; }
.frame-preview.none i { top: 14px; width: 42px; height: 42px; }
.frame-preview.none b { display: none; }
.frame-preview.gift { margin-top: 3px; }
.frame-preview.gift em { position: absolute; top: -8px; left: calc(50% - 4px); display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--frame); box-shadow: -6px -1px 0 1px var(--frame), 6px -1px 0 1px var(--frame); }
.frame-preview.bottom { border-radius: 3px; }
.frame-preview.bottom b { right: 0; bottom: 0; left: 0; padding-block: 4px; border-radius: 0; }
.frame-preview.top { border-radius: 3px; }
.frame-preview.top i { top: 22px; }
.frame-preview.top b { top: 0; right: 0; bottom: auto; left: 0; padding-block: 4px; border-radius: 0; }
.frame-preview.speech { border-radius: 16px; }
.frame-preview.speech b { overflow: visible; }
.frame-preview.speech b::after { content: ""; position: absolute; bottom: -4px; left: calc(50% - 4px); border: 4px solid transparent; border-top-color: var(--frame); border-bottom: 0; }
.frame-preview.ticket { border-style: dashed; clip-path: polygon(0 0, 100% 0, 100% 39%, 94% 50%, 100% 61%, 100% 100%, 0 100%, 0 61%, 6% 50%, 0 39%); }
.frame-preview.polaroid { border: 6px solid white; border-bottom-width: 13px; border-radius: 2px; box-shadow: 0 3px 9px rgba(15,23,42,.22); }
.frame-preview.polaroid i { top: 4px; }
.frame-preview.polaroid b { bottom: -11px; padding: 0; background: transparent; color: var(--frame); }
.frame-preview.brackets { border: 0; border-radius: 0; background: linear-gradient(var(--frame),var(--frame)) left top/18px 3px no-repeat, linear-gradient(var(--frame),var(--frame)) left top/3px 18px no-repeat, linear-gradient(var(--frame),var(--frame)) right top/18px 3px no-repeat, linear-gradient(var(--frame),var(--frame)) right top/3px 18px no-repeat, linear-gradient(var(--frame),var(--frame)) left bottom/18px 3px no-repeat, linear-gradient(var(--frame),var(--frame)) left bottom/3px 18px no-repeat, linear-gradient(var(--frame),var(--frame)) right bottom/18px 3px no-repeat, linear-gradient(var(--frame),var(--frame)) right bottom/3px 18px no-repeat, white; }
.frame-preview.ribbon b { right: 0; left: 0; border-radius: 0; clip-path: polygon(0 0,100% 0,92% 50%,100% 100%,0 100%,8% 50%); }
.frame-preview.badge { border-width: 3px; border-radius: 22px; }
.frame-preview.heart { margin-top: 3px; border-radius: 17px; }
.frame-preview.heart em { position: absolute; top: -7px; left: calc(50% - 5px); display: block; width: 10px; height: 10px; transform: rotate(45deg); background: var(--frame); }
.frame-preview.heart em::before, .frame-preview.heart em::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--frame); }
.frame-preview.heart em::before { left: -5px; }
.frame-preview.heart em::after { top: -5px; }
.frame-preview.flower { margin-top: 3px; border-radius: 13px; }
.frame-preview.flower em { position: absolute; top: -7px; left: calc(50% - 4px); display: block; width: 8px; height: 8px; border-radius: 50%; background: #fff7a8; box-shadow: -5px 0 0 var(--frame), 5px 0 0 var(--frame), 0 -5px 0 var(--frame), 0 5px 0 var(--frame); }
.frame-preview.cat { margin-top: 3px; border-radius: 13px; }
.frame-preview.cat::before, .frame-preview.cat::after { content: ""; position: absolute; top: -8px; border-right: 8px solid transparent; border-bottom: 11px solid var(--frame); border-left: 8px solid transparent; }
.frame-preview.cat::before { left: 7px; transform: rotate(-13deg); }
.frame-preview.cat::after { right: 7px; transform: rotate(13deg); }
.frame-preview.sparkle { border-radius: 14px; }
.frame-preview.sparkle em { position: absolute; top: -6px; right: -5px; display: block; width: 14px; height: 14px; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); background: var(--frame); }
.frame-preview.cloud { margin-top: 3px; border-radius: 22px; }
.frame-preview.cloud em { position: absolute; top: -7px; left: calc(50% - 7px); display: block; width: 14px; height: 10px; border: 2px solid var(--frame); border-radius: 50%; background: white; box-shadow: -8px 3px 0 -1px white, -8px 3px 0 1px var(--frame), 8px 3px 0 -1px white, 8px 3px 0 1px var(--frame); }
.logo-control { margin-top: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px dashed #b7c0cc; background: #fafbfc; border-radius: 10px; }
.logo-control > div { display: grid; gap: 3px; margin-right: auto; font-size: 13px; }
.logo-control small { color: var(--muted); font-weight: 400; }
.upload-button { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 12px; border-radius: 8px; background: var(--navy); color: white; white-space: nowrap; cursor: pointer; }
.upload-button input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.range-field { margin-top: 12px; }
.notice { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 14px; background: #edfff4; border: 1px solid #bce8cd; border-radius: 10px; color: #166534; }
.notice > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; background: #d2f7df; border-radius: 50%; font-weight: 900; }
.notice p { margin: 0; font-size: 12px; line-height: 1.35; }
.notice.warning { background: #fff8e7; border-color: #f6d78b; color: #92400e; }
.preview-card { position: sticky; top: 20px; overflow: hidden; background: var(--navy); color: white; }
.preview-topline { display: flex; justify-content: space-between; gap: 12px; padding: 17px 20px; border-bottom: 1px solid #263044; color: #94a3b8; font: 700 10px ui-monospace, monospace; letter-spacing: .12em; }
.preview-topline span:last-child { color: #73e6a4; }
.qr-stage { width: min(82%, 380px); margin: 34px auto 25px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.qr-stage svg { display: block; width: 100%; height: 100%; }
.qr-meta { margin: 0 24px 22px; padding: 14px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #263044; border-bottom: 1px solid #263044; }
.qr-meta div { display: grid; gap: 4px; text-align: center; border-right: 1px solid #263044; }
.qr-meta div:last-child { border: 0; }
.qr-meta span { color: #7f8da3; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.qr-meta strong { font-size: 12px; }
.export-section { padding: 0 24px 22px; }
.export-section > p { color: #94a3b8; font: 700 10px ui-monospace, monospace; letter-spacing: .12em; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export-grid button { min-height: 58px; padding: 10px; text-align: left; display: grid; gap: 3px; border: 1px solid #303b50; border-radius: 9px; background: #171e2d; color: white; }
.export-grid button:hover { border-color: var(--accent); transform: translateY(-1px); }
.export-grid small { color: #8996aa; font-size: 10px; }
.secondary-button { width: 100%; margin-top: 8px; min-height: 40px; border: 1px solid #303b50; border-radius: 9px; background: transparent; color: #cbd5e1; font-size: 12px; font-weight: 700; }
.secondary-button:hover { color: white; border-color: #64748b; }
.expiry-note { margin: 0; padding: 17px 24px; background: #151c2a; border-top: 1px solid #263044; color: #93a0b5; font-size: 11px; line-height: 1.5; }
.expiry-note > span { float: left; margin-right: 10px; color: var(--accent); font-size: 25px; line-height: 1.2; }
.expiry-note strong { color: #e2e8f0; }
.explainer { padding: 100px 0 35px; }
.explainer > h2 { max-width: 640px; margin: 0 0 42px; font-size: clamp(32px, 5vw, 52px); line-height: 1.02; letter-spacing: -.045em; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #cbd2dc; }
.feature-grid article { padding: 22px 24px 10px 0; }
.feature-grid article + article { padding-left: 24px; border-left: 1px solid #cbd2dc; }
.feature-grid span { color: var(--accent-dark); font: 700 10px ui-monospace, monospace; }
.feature-grid h3 { margin: 28px 0 8px; font-size: 17px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
footer { min-height: 100px; padding: 0 clamp(20px, 4vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--navy); color: #94a3b8; font-size: 12px; }
footer > span { color: white; font-weight: 800; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 999px; background: #111827; color: white; box-shadow: 0 12px 32px rgba(0,0,0,.24); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .preview-card { position: relative; top: 0; }
  .qr-stage { width: min(70%, 420px); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .frame-options { grid-template-columns: repeat(3, minmax(82px, 1fr)); }
  .feature-grid article:nth-child(3) { border-left: 0; }
}
@media (max-width: 620px) {
  .trust-strip span:last-child { display: none; }
  main { padding-inline: 12px; }
  .intro { padding-inline: 8px; }
  .intro h1 { font-size: 44px; }
  .builder { padding: 20px 16px; }
  .field-grid, .design-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .frame-picker.wide { grid-column: 1 / -1; }
  .frame-options { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .logo-control { align-items: flex-start; flex-wrap: wrap; }
  .logo-control > div { flex: 1 1 100%; }
  .qr-stage { width: 82%; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article + article { padding-left: 0; border-left: 0; border-top: 1px solid #cbd2dc; }
  footer { padding-block: 25px; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media print {
  body * { visibility: hidden; }
  .qr-stage, .qr-stage * { visibility: visible; }
  .qr-stage { position: fixed; inset: 0; width: 70vmin; margin: auto; box-shadow: none; }
}
