* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --ink: #eff2fb;
  --muted: #b8c5dc;
  --surface: #171e2e;
  --line: #3a465e;
  --orange: #ffaf67;
  --blue: #75c7ff;
}
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at top left, #402719 0, transparent 49%),
              radial-gradient(ellipse at top right, #15375a 0, transparent 51%), #0e1422;
  font: 16px/1.7 system-ui, sans-serif;
}
header { border-bottom: 1px solid var(--line); padding: 14px max(16px, calc((100% - 900px) / 2)); }
header a { color: var(--ink); font-weight: 800; letter-spacing: .09em; text-decoration: none; }
main { width: min(900px, calc(100% - 28px)); margin: clamp(22px, 5vw, 48px) auto; }
section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(14px, 4vw, 30px); margin-bottom: 16px; }
.hero {
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(105deg, var(--orange), #674f78, var(--blue)) border-box;
  border-color: transparent;
}
h1, h2, p { margin: 0 0 10px; }
h1 { font-size: clamp(24px, 5vw, 42px); line-height: 1.35; }
h2 { font-size: 22px; }
.formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 16px; }
.format {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--format-border);
  border-radius: 10px;
  background: var(--format-bg);
}
.format-ai, #result[data-format="ai"] { --accent: var(--orange); --format-border: #805232; --format-bg: #322318; }
.format-psd, #result[data-format="psd"] { --accent: var(--blue); --format-border: #38658d; --format-bg: #172c44; }
.format > span {
  border: 1px solid var(--format-border);
  border-radius: 5px;
  padding: 4px 6px;
  color: var(--accent);
  font: 750 15px/1.4 ui-monospace, monospace;
}
.format strong { color: var(--accent); }
.format small { display: block; }
#drop { padding: 22px 10px; border: 2px dashed #667a9c; border-radius: 12px; background: #111827; text-align: center; margin: 12px 0; }
#drop.active { background: #243a55; border-color: var(--blue); }
input[type="file"] { width: min(100%, 360px); display: block; margin: 12px auto 0; color: var(--ink); font: inherit; }
input::file-selector-button, .button { border: 0; border-radius: 8px; padding: 9px 13px; color: #101728; background: var(--accent, #e0e9fa); font: inherit; font-weight: 750; cursor: pointer; }
input::file-selector-button { margin-right: 8px; }
.button { display: inline-block; text-decoration: none; }
#result[data-format] { border-color: var(--format-border); }
#format-label { color: var(--accent, var(--ink)); }
small, #info, #status { overflow-wrap: anywhere; color: var(--muted); }
iframe, canvas { display: block; margin: 14px auto 0; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
iframe { width: 100%; height: 68vh; }
canvas { width: auto; height: auto; background: white; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 480px) { .formats { grid-template-columns: 1fr; } }

.home { text-align: center; margin: 24px 0; }
.home a { color: var(--blue); }
