[hidden] { display: none !important; }
:root {
  --blue: #14287f; --dark: #0c0f17; --orange: #ff6b1f; --ink: #121726;
  --panel: #171d2e; --panel2: #1e2539; --line: #2b3450; --text: #eef1f8; --sub: #9aa3bd;
  --bad: #e53935; --good: #3fae49;
  --display: 'Big Shoulders Display', Impact, sans-serif;
  --body: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--dark); color: var(--text); font: 600 15px/1.4 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: var(--blue); border-bottom: 3px solid var(--ink); }
.brand { display: flex; align-items: baseline; gap: 6px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: .02em; white-space: nowrap; }
.brand span { color: var(--orange); font-size: 20px; }
.spacer { flex: 1; }
.hbtn, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hbtn:hover, .btn:hover:not(:disabled) { filter: brightness(.93); }
.orange { background: var(--orange) !important; }
.btn.dark { background: var(--panel2); color: var(--text); border-color: #000; }
.btn.bad { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }

main { width: min(1180px, 100%); margin: 0 auto; padding: 28px 16px 64px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
h1 { margin: 0; font: 900 52px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.sub { margin: 6px 0 0; color: var(--sub); }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.empty { color: var(--sub); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--panel); overflow: hidden; text-align: left; cursor: pointer; }
.card:hover { border-color: var(--orange); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(160deg, #8fd0ff 0 55%, #6f7d68 55%); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .none { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(18, 23, 38, .65); font: 900 22px/1 var(--display); text-transform: uppercase; }
.card .info { padding: 10px 12px 12px; }
.card b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { color: var(--sub); }
.card .chip { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--sub); font-size: 12px; font-weight: 800; }
.card.new { align-items: center; justify-content: center; min-height: 200px; border: 2px dashed var(--line); background: none; color: var(--sub); font: 900 22px/1 var(--display); text-transform: uppercase; }
.card.new:hover { color: var(--orange); }

/* edit panel */
.drawer { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(5, 8, 20, .6); }
.drawer .panel { width: min(560px, 100%); height: 100%; overflow: auto; padding: 20px; background: var(--panel); border-left: 3px solid var(--ink); }
.dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dhead h2 { flex: 1; margin: 0; font: 900 30px/1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { width: 38px; height: 38px; border: 0; border-radius: 4px; background: var(--panel2); font-size: 22px; cursor: pointer; }
.big { border-radius: 6px; overflow: hidden; }
.sec { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.sec h3 { margin: 0 0 8px; font: 900 18px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--sub); }
label.f { display: block; margin: 10px 0 0; }
label.f span { display: block; margin-bottom: 4px; font-weight: 800; }
label.f small { color: var(--sub); font-weight: 600; }
input[type=text], input[type=number], select, textarea { width: 100%; padding: 9px 10px; border: 2px solid var(--line); border-radius: 4px; background: var(--dark); }
textarea { min-height: 80px; resize: vertical; }
input[type=color] { width: 60px; height: 38px; padding: 2px; border: 2px solid var(--line); border-radius: 4px; background: var(--dark); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--sub); font-size: 13px; }
.msg { min-height: 1.4em; margin: 8px 0 0; color: var(--good); font-weight: 800; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%); max-width: 80vw; padding: 10px 16px; background: var(--orange); color: var(--ink); border: 2px solid #000; border-radius: 4px; font-weight: 800; }
@media (max-width: 560px) { .brand span { display: none; } .two { grid-template-columns: 1fr; } h1 { font-size: 40px; } }
