:root {
  --floor: #0F2A43; --line: #D7263D; --board: #F4F7FA; --maple: #E8B04B; --ink: #14202B; --slate: #5B6B7A;
  --ok: #1D7A4B; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--board); color: var(--ink); font: 18px/1.5 "Avenir Next", "Segoe UI", system-ui, sans-serif; }
.top { background: var(--floor); border-bottom: 6px solid var(--line); padding: 14px 18px; }
.top h1 { margin: 0; font-size: 1.15rem; color: #fff; font-weight: 700; }
main { max-width: 760px; margin: 0 auto; padding: 18px; }
h2 { font-size: 1.4rem; margin: 1.2em 0 .4em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }
a { color: var(--floor); }
:focus-visible { outline: 3px solid var(--maple); outline-offset: 2px; }

.btn { font: inherit; font-weight: 700; min-height: 52px; padding: 0 20px; border-radius: var(--radius); border: 2px solid var(--floor);
  background: #fff; color: var(--floor); cursor: pointer; }
.btn.primary { background: var(--line); border-color: var(--line); color: #fff; }
.btn.ghost { border-color: #b8c4cf; color: var(--slate); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .95rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea { font: inherit; width: 100%; min-height: 52px; padding: 8px 12px; border: 2px solid #b8c4cf; border-radius: var(--radius); background: #fff; color: var(--ink); }
textarea { min-height: 110px; }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scores input { font-size: 2rem; text-align: center; font-weight: 700; }
.panel { background: #fff; border: 2px solid #dbe3ea; border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; background: #fff;
  border-left: 8px solid var(--floor); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; }
.card.posted { border-left-color: var(--ok); }
.card.failed { border-left-color: var(--line); }
.meta { color: var(--slate); font-size: .95rem; }
.chip { font-weight: 700; font-size: .95rem; }
.chip.ok { color: var(--ok); } .chip.bad { color: var(--line); }
.preview { display: block; width: 100%; max-width: 420px; height: auto; margin: 12px auto; border: 1px solid #c5d0da; border-radius: 6px; background: #fff; }
.error { color: var(--line); font-weight: 600; }
.banner { background: var(--maple); color: var(--ink); padding: 12px 18px; font-weight: 600; }

#toasts { position: fixed; left: 0; right: 0; bottom: 16px; display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toast { background: var(--floor); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 600; max-width: 520px; }
.toast.error { background: var(--line); }
dialog.dlg { border: none; border-radius: 14px; padding: 22px; max-width: 460px; width: calc(100% - 32px); }
dialog.dlg::backdrop { background: rgba(15, 42, 67, .6); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
