:root {
  --ink: #05070A;
  --midnight: #071B2D;
  --blue: #024E73;
  --cyan: #0AA6B8;
  --mint: #67DDD2;
  --sand: #F2D184;
  --orange: #F26A2E;
  --red: #D72638;
  --paper: #F5F1EE;
  --white: #FFFFFF;
  --muted: #68717C;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(103, 221, 210, .38), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(242, 106, 46, .35), transparent 30%),
    radial-gradient(circle at 65% 80%, rgba(215, 38, 56, .24), transparent 35%),
    linear-gradient(135deg, #f7f3f0, #eee7ea);
}

.app-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0; }
.hero { margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
h1 { margin: 0; max-width: 760px; font-size: clamp(42px, 7vw, 86px); line-height: .95; letter-spacing: -.06em; }
.intro { max-width: 720px; color: #39424e; font-size: 18px; line-height: 1.65; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card { border-radius: 28px; background: rgba(255,255,255,.78); backdrop-filter: blur(18px); box-shadow: 0 22px 70px rgba(5, 7, 10, .12); padding: 26px; border: 1px solid rgba(255,255,255,.75); }
.card h2 { margin: 0 0 22px; font-size: 28px; letter-spacing: -.04em; }
.card-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.card-header p { margin: -12px 0 0; color: var(--muted); }
label { display: block; margin-bottom: 16px; }
label span { display: block; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; font-weight: 900; color: var(--muted); }
input, textarea { width: 100%; border: 1px solid rgba(5,7,10,.14); border-radius: 18px; padding: 15px 16px; font: inherit; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(10, 166, 184, .14); }
input:disabled, textarea:disabled { opacity: .52; cursor: not-allowed; }
button, .card-header a { border: none; border-radius: 999px; background: var(--ink); color: white; padding: 14px 20px; font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:disabled { opacity: .35; cursor: not-allowed; }
.status { color: var(--muted); font-size: 14px; min-height: 20px; }
.pill { border-radius: 999px; padding: 8px 12px; background: rgba(10,166,184,.12); color: var(--blue); font-size: 12px; font-weight: 900; }
.is-disabled { opacity: .62; }
.is-hidden { display: none !important; }
.suggestion-grid { display: grid; gap: 12px; }
.output-card { margin-top: 24px; }
.palette { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.swatch { min-width: 104px; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: white; font-size: 12px; font-weight: 900; text-shadow: 0 1px 12px rgba(0,0,0,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.format-card { overflow: hidden; min-height: 260px; border-radius: 26px; background: #111; color: white; position: relative; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.format-card.story { aspect-ratio: 9 / 16; min-height: 360px; }
.format-card.square { aspect-ratio: 1 / 1; }
.format-card .brand { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 900; opacity: .85; }
.format-card h3 { margin: 22px 0 10px; font-size: clamp(26px, 4vw, 44px); line-height: .92; letter-spacing: -.06em; text-transform: uppercase; }
.format-card p { margin: 0; line-height: 1.35; font-weight: 600; }
.format-card .claim { align-self: flex-start; border-radius: 999px; padding: 10px 12px; background: rgba(255,255,255,.9); color: #111; font-size: 12px; font-weight: 900; }
.format-card .cta { align-self: flex-start; border-radius: 999px; padding: 12px 14px; background: rgba(255,255,255,.92); color: #111; font-size: 12px; font-weight: 900; }
.format-card::after { content: ""; position: absolute; inset: auto -20% -26% 30%; height: 55%; border-radius: 999px; background: rgba(255,255,255,.18); filter: blur(2px); }
.files { display: flex; gap: 12px; margin: 20px 0 12px; }
.file-tab { background: transparent; color: var(--ink); padding: 0; border-radius: 0; text-decoration: underline; }
.file-tab.active { color: var(--red); }
.code-box { min-height: 330px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.55; white-space: pre; }
@media (max-width: 860px) { .grid, .formats { grid-template-columns: 1fr; } .app-shell { width: min(100% - 24px, 1180px); padding: 24px 0; } }
