@font-face { font-family: Inter; font-weight: 700; src: url(fonts/Inter-Bold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 800; src: url(fonts/Inter-ExtraBold.ttf) format("truetype"); font-display: swap; }

:root {
  --bg: #070707;
  --panel: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f2f2;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.28);
  --brand: #6152df;
  --brand-light: #9f92ff;
  --dot: #f2d541;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--brand-light); }
small { color: var(--faint); font-weight: 400; }
h2, h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }

.top { max-width: 1280px; margin: 0 auto; padding: 24px 16px 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { border-radius: 7px; align-self: center; }
.tag { margin: 0; color: var(--muted); }

.layout { max-width: 1280px; margin: 0 auto; padding: 8px 16px 24px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .preview { position: sticky; top: 16px; }
}

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px 16px; }
.step { border-bottom: 1px solid var(--border); padding: 8px 0 14px; }
.step:last-child { border-bottom: 0; }
.step summary { cursor: pointer; font-weight: 600; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
.step summary::-webkit-details-marker { display: none; }
.num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); font-size: 12px; }

label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
label.inline { display: flex; align-items: center; gap: 8px; }
input, select, button {
  font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
input[type=color] { padding: 2px; height: 38px; width: 100%; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
select option { background: #111; }
button { cursor: pointer; }
button:hover { border-color: var(--brand-light); }
button.primary { background: var(--brand); border-color: var(--brand); font-weight: 600; }
button.link { background: none; border: 0; padding: 0; color: var(--brand-light); text-decoration: underline; }
button:disabled { opacity: 0.5; cursor: default; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.row > input { flex: 1 1 200px; }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.status { color: var(--muted); font-size: 13px; min-height: 1.2em; margin: 6px 0 0; }
.status.error { color: #ff8a8a; }
.status.ok { color: #7ee2b8; }

.posters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.posters.small { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); max-height: 260px; overflow-y: auto; }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: #111; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster .move { position: absolute; bottom: 4px; display: flex; gap: 4px; left: 4px; right: 4px; justify-content: space-between; }
.poster .move span { background: rgba(0, 0, 0, 0.7); border-radius: 4px; padding: 0 6px; font-size: 12px; }
.empty { color: var(--faint); font-size: 13px; grid-column: 1 / -1; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.logo-opt { background: #2a2a2e; border: 1px solid var(--border); border-radius: 8px; padding: 10px; height: 64px; display: grid; place-items: center; cursor: pointer; }
.logo-opt img { max-width: 100%; max-height: 40px; }
.logo-opt.on { border-color: var(--dot); }

.frame { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #000; line-height: 0; }
.frame canvas { width: 100%; height: auto; display: block; }
.checker { background: repeating-conic-gradient(#222 0 25%, #2c2c2c 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 12px; }
.checker canvas { width: auto; max-width: 100%; max-height: 100%; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
figure { margin: 0; }
figcaption { color: var(--faint); font-size: 12px; margin-top: 4px; }
.downloads button { flex: 1 1 auto; }

.foot { max-width: 1280px; margin: 0 auto; padding: 8px 16px 32px; color: var(--faint); font-size: 12px; }
.foot p { margin: 4px 0; }
