/* Rawframe: mobile-first, one column on the phone, centered card on bigger screens. */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f2630;
  --line: #2b3440;
  --text: #e8edf3;
  --muted: #8b97a6;
  --accent: #2ee6a6;
  --accent-ink: #04251a;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --radius: 14px;
  --tap: 48px;
  --nav: 64px;
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 24px);
}
body.is-guest { padding-bottom: 24px; }
a { color: var(--accent); text-decoration: none; }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; margin-top: 28px; }
h3 { font-size: 1rem; }
p { margin: 0 0 12px; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .02em; color: var(--text); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  display: grid; place-items: center; color: var(--accent-ink); font-size: 14px; font-weight: 900;
}
.topbar .account-name { color: var(--muted); font-size: .85rem; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 16px; }

/* Bottom navigation (thumb reach) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .72rem; font-weight: 600;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.is-active { color: var(--accent); }
.tabbar a.tab-new span.plus {
  width: 44px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
}
.tabbar a.tab-new.is-active span.plus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* Flash */
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-notice { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.flash-alert { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-title h2, .card-title h3 { margin: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; }

/* Forms */
label, .label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row.thirds { grid-template-columns: 2fr 1fr; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search],
select, textarea {
  width: 100%; min-height: var(--tap); padding: 12px 14px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; /* no zoom on iOS */
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 280px; white-space: pre; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=file] { width: 100%; color: var(--muted); font-size: .9rem; }
input[type=file]::file-selector-button {
  min-height: 40px; margin-right: 10px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600;
}
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--text); font-weight: 500; font-size: .95rem; margin: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.errors { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.errors h3 { color: var(--danger); font-size: .95rem; }
.errors ul { margin: 0; padding-left: 18px; }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }

/* Buttons */
.btn, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer; text-align: center;
}
.btn-primary, input[type=submit].btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.is-done { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled, input[type=submit]:disabled { opacity: .55; cursor: wait; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-button { background: none; border: 0; min-height: 0; padding: 0; color: var(--accent); font-weight: 600; }

/* Auth pages */
.auth { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.auth .brand { justify-content: center; font-size: 1.4rem; margin-bottom: 8px; }
.auth .brand-mark { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
.auth .tagline { text-align: center; color: var(--muted); margin-bottom: 24px; }
.auth .switch { text-align: center; margin-top: 18px; color: var(--muted); }

/* Video list */
.video-list { display: grid; gap: 12px; }
.video-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.video-thumb { width: 72px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-item .title { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-item .meta { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-done { color: var(--accent); }
.badge-queued, .badge-rendering { color: var(--warn); }
.badge-rendering::before { animation: pulse 1s infinite alternate; }
.badge-failed { color: var(--danger); }
@keyframes pulse { to { opacity: .2; } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* Video page */
.player { width: 100%; max-width: 360px; margin: 0 auto 16px; aspect-ratio: 9 / 16; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.player video, .player img { width: 100%; height: 100%; object-fit: contain; }
.rendering-box { aspect-ratio: 9 / 16; max-width: 360px; margin: 0 auto 16px; border-radius: var(--radius); border: 1px dashed var(--line); display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); background: var(--surface); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.cover-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.cover-row img { width: 96px; border-radius: 10px; border: 1px solid var(--line); }
.text-block { margin-bottom: 14px; }
.text-block .card-title { margin-bottom: 6px; }
.text-block pre, .text-block .text {
  margin: 0; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem;
}
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.log { font-family: ui-monospace, monospace; font-size: 12px; white-space: pre-wrap; max-height: 240px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 8px; }

/* Video form */
.clip-picker { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px 16px; text-align: center; background: var(--surface); cursor: pointer; }
.clip-picker .icon { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.clip-picker strong { display: block; color: var(--text); }
.clip-picker input[type=file] { margin-top: 12px; }
.has-clip .clip-picker { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.clip-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #000; margin-top: 12px; }
.progress { margin-top: 12px; height: 26px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 800; display: grid; place-items: center; transition: width .2s; }
.progress-bar.is-error { background: var(--danger); color: #fff; width: 100% !important; }
.goal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--surface-2); }
.goal-row .wide { grid-column: 1 / -1; }
.goal-row input, .goal-row select { background-color: var(--surface); }
.goal-row .row-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.vs .x { padding-bottom: 14px; color: var(--muted); font-weight: 800; }
.section-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 26px 0 10px; }

/* Templates */
.template-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; color: var(--text); }
.swatches { display: flex; gap: 6px; margin-top: 8px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.crests { display: flex; gap: 6px; align-items: center; }
.crests img { width: 34px; height: 34px; object-fit: contain; }
.team-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--surface-2); }
.team-row .crest-box { width: 64px; height: 64px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.team-row .crest-box img { max-width: 52px; max-height: 52px; }
.team-row .fields { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.team-row .fields .wide { grid-column: 1 / -1; }
.team-row input:not([type=file]) { background-color: var(--surface); min-height: 42px; padding: 9px 12px; }
.team-row .row-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.starter { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.overlay-preview { width: 90px; aspect-ratio: 9 / 16; border-radius: 8px; border: 1px solid var(--line); background: repeating-conic-gradient(#222 0 25%, #2c2c2c 0 50%) 0 0 / 16px 16px; }
.overlay-preview img { width: 100%; height: 100%; object-fit: contain; }

.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.members li:last-child { border-bottom: 0; }

@media (min-width: 720px) {
  main { padding-top: 32px; }
  .tabbar { max-width: 640px; margin: 0 auto; left: 0; right: 0; bottom: 16px; border: 1px solid var(--line); border-radius: 18px; height: var(--nav); padding-bottom: 0; }
}

/* Media retention */
.expires { text-align: center; font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.purged { text-align: center; padding: 28px 16px; }
.purged-icon { font-size: 34px; margin-bottom: 8px; }

/* Editable posting texts */
.texts-form .text-block { margin-bottom: 16px; }
.text-edit {
  min-height: 0; font-size: 15px; line-height: 1.45;
  field-sizing: content; /* grows with the text where supported */
}
.text-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.text-meta .hint { margin: 0; }
.counter { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter.is-near { color: var(--warn); }
.counter.is-over { color: var(--danger); font-weight: 700; }
.badge-edited { color: var(--accent); margin-left: 8px; vertical-align: middle; }
.restore-texts { margin-top: 10px; }

/* Matches */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.day-nav strong { text-transform: capitalize; }
.match-card { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; color: var(--text); padding: 12px 14px; margin-bottom: 10px; }
.match-time { display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; color: var(--muted); }
.match-time small { font-weight: 500; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-teams { display: grid; gap: 6px; }
.match-team { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.match-team .crest img, .scoreline .crest img { width: 26px; height: 26px; object-fit: contain; }
.match-team .goals { font-weight: 800; font-size: 1.05rem; min-width: 18px; text-align: right; }
.scoreboard { text-align: center; }
.scoreline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 10px; }
.scoreline .side { display: grid; justify-items: center; gap: 4px; }
.scoreline .crest img { width: 52px; height: 52px; }
.scoreline .name { font-weight: 700; font-size: .9rem; }
.scoreline .goals { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.scoreline .x { color: var(--muted); font-weight: 800; }
.goal-list { list-style: none; margin: 0; padding: 0; }
.goal-list li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal-list li:last-child { border-bottom: 0; }
.goal-minute { font-weight: 700; color: var(--muted); font-size: .85rem; }
.goal-who { display: grid; }
.remove-goal { min-height: 32px; padding: 0 10px; }
.tabbar a { font-size: .68rem; }
.match-picker select { margin-bottom: 4px; }
.match-picker .hint { margin-bottom: 0; }
.match-summary { text-align: center; }
.match-summary-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 6px; }
.match-summary-line .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-summary-line .side.home { justify-content: flex-end; }
.match-summary-line .side.away { justify-content: flex-start; }
.match-summary-line .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-summary-line .crest { width: 28px; height: 28px; object-fit: contain; flex: none; }
.match-summary-line .score { font-size: 1.3rem; white-space: nowrap; }
.score-after input { font-size: 20px; font-weight: 700; letter-spacing: .05em; max-width: 160px; }
.goal-list.compact li { grid-template-columns: 56px 1fr; padding: 8px 0; }

/* Quick flow: sentence */
textarea.sentence { min-height: 96px; font-size: 18px; }
.sentence-read .sentence-text { font-size: 1.05rem; font-weight: 600; margin: 4px 0 6px; }
.sentence-read .hint { margin: 0; }
.has-clip-uploaded { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* Kind of play: goal / chance / red card */
.kind-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.kind-option { margin: 0; }
.kind-option input { position: absolute; opacity: 0; pointer-events: none; }
.kind-option span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .9rem; cursor: pointer; }
.kind-option input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); }
.kind-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Integrations and publishing */
.center { text-align: center; }
.integ { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.integ form { margin: 0; }
.integ-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 18px; }
.integ-youtube { background: #ff0033; }
.integ-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.integ-tiktok { background: #111; border: 1px solid var(--line); }
.integ-status { font-size: .8rem; color: var(--muted); }
.integ-status.is-ok { color: var(--accent); }
.integ-status.is-warn { color: var(--warn); }
.integ.is-soon { opacity: .6; }
.link-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); }
.chevron { font-size: 1.6rem; color: var(--muted); line-height: 1; }
.channel { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 16px; }
.channel-avatar { width: 40px; height: 40px; border-radius: 50%; background: #ff0033; color: #fff; display: grid; place-items: center; font-weight: 900; flex: none; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented-option { margin: 0; }
.segmented-option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-option span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .85rem; cursor: pointer; }
.segmented-option input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); }
.segmented-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 12px; margin: 0 0 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 500; font-size: .92rem; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); }
.publish-head { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; }
.publish-head img { width: 90px; border-radius: 10px; border: 1px solid var(--line); }
.schedule { margin-top: 6px; }
.schedule input[type=datetime-local] { width: 100%; min-height: var(--tap); padding: 12px 14px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; }
.yt-mark { display: inline-grid; place-items: center; width: 26px; height: 20px; border-radius: 6px; background: #ff0033; color: #fff; font-size: 11px; vertical-align: 2px; margin-right: 4px; }

/* Matches from a screenshot */
.print-preview { width: 100%; max-height: 360px; object-fit: contain; border-radius: 10px; background: #000; margin-top: 12px; }
.import-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.import-row-head .check { min-height: 40px; }
.import-row.is-off { opacity: .6; }
.import-row:has(input[type=checkbox]:not(:checked)) { opacity: .6; }
.import-row:has(input[type=checkbox]:checked) { opacity: 1; }
.page-head-actions { display: flex; gap: 8px; }
.team-row .crest-box { color: var(--warn); font-weight: 900; font-size: 1.4rem; }

/* Teams */
.crest-badge { display: inline-grid; place-items: center; border-radius: 50%; background: var(--badge); color: #fff;
  font-weight: 800; letter-spacing: .02em; border: 2px solid #fff; flex: none; line-height: 1; }
.match-team .crest .crest-badge { width: 26px; height: 26px; font-size: 8px; border-width: 1px; }
.match-team .crest img.crest-img { width: 26px; height: 26px; object-fit: contain; }
.scoreline .crest .crest-badge { width: 52px; height: 52px; font-size: 14px; }
.scoreline .crest img.crest-img { width: 52px; height: 52px; object-fit: contain; }
.match-summary-line .crest-badge.crest { width: 28px; height: 28px; font-size: 8px; border-width: 1px; }
.team-row .crest-box .crest-badge { width: 52px; height: 52px; font-size: 14px; }
.library-nav { grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.segmented-link { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .9rem; }
.segmented-link.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); }
.team-list { display: grid; gap: 10px; }
.team-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; color: var(--text); padding: 12px 14px; margin: 0; }
.team-item img.crest { width: 44px; height: 44px; object-fit: contain; }
.team-item .crest-badge { width: 44px; height: 44px; font-size: 12px; }
.team-form-head { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: start; }
img.crest-lg { width: 88px; height: 88px; object-fit: contain; }
.crest-lg.crest-badge { width: 88px; height: 88px; font-size: 22px; border-width: 3px; }

/* Billing status and /admin */
.flash-trial { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.suspended { text-align: center; padding: 28px 18px; }
.admin-mark { background: var(--warn); }
.admin-main { max-width: 760px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: .82rem; font-weight: 700; }
.chip.is-active { border-color: var(--accent); color: var(--accent); }
.admin-list { display: grid; gap: 10px; }
.admin-account { color: var(--text); margin: 0; display: grid; gap: 4px; }
.admin-account-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.admin-account-meta { color: var(--muted); }
.danger-text { color: var(--danger); }
.billing-trial { color: var(--warn); }
.billing-active, .billing-courtesy { color: var(--accent); }
.billing-courtesy { color: #8ab4ff; }
.billing-past_due { color: var(--warn); }
.billing-blocked, .billing-canceled { color: var(--danger); }
