/* =========================================================
   Sportowa Liga McDonald's — style bazowe (mobile first)
   ========================================================= */
:root {
  --red: #DA291C;
  --red-dark: #A81E14;
  --yellow: #FFC72C;
  --yellow-dark: #E5A800;
  --ink: #27251F;
  --ink-2: #4a463d;
  --muted: #6f6a5f;
  --bg: #F7F4EE;
  --card: #FFFFFF;
  --line: #E7E1D5;
  --gold: #F2B705;
  --silver: #A9B0B8;
  --bronze: #C9773B;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(39, 37, 31, .06), 0 6px 20px rgba(39, 37, 31, .07);
  --shadow-lg: 0 12px 40px rgba(39, 37, 31, .18);
  --font-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--yellow); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 0 var(--yellow), 0 6px 18px rgba(0,0,0,.15);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand__logo { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.25); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__title { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; }
.brand__sub { font-size: .78rem; color: var(--yellow); font-weight: 600; letter-spacing: .06em; }

.nav-toggle {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px;
}
.nav-toggle span { display: block; height: 3px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: var(--red-dark);
  display: flex; flex-direction: column;
  padding: 8px 16px 16px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .2s, opacity .2s;
  box-shadow: 0 10px 20px rgba(0,0,0,.2);
}
.nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
.nav a {
  color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav a.is-active { color: var(--yellow); }
.nav__admin { margin-top: 8px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav {
    position: static; flex-direction: row; align-items: center; gap: 4px;
    background: none; padding: 0; transform: none; opacity: 1; pointer-events: auto; box-shadow: none;
  }
  .nav a { border: 0; padding: 8px 14px; border-radius: 999px; transition: background .15s; }
  .nav a:hover { background: rgba(255,255,255,.12); }
  .nav a.is-active { background: rgba(0,0,0,.18); }
  .nav__admin { margin: 0 0 0 8px; background: var(--yellow); color: var(--ink) !important; }
  .nav__admin:hover { background: #ffd65e !important; }
  .nav__admin.is-active { background: var(--yellow) !important; box-shadow: inset 0 -3px 0 var(--ink); }
}

/* ---------- Generic ---------- */
.section { padding: 40px 0; scroll-margin-top: var(--nav-h); }
.section--tight { padding: 24px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section__title {
  font-size: clamp(1.6rem, 4vw, 2.3rem); text-transform: uppercase; margin: 0;
  display: flex; align-items: center; gap: 12px;
}
.section__title::before { content: ""; width: 8px; height: 1em; background: var(--yellow); border-radius: 2px; box-shadow: 4px 0 0 var(--red); }
.section__lead { color: var(--muted); margin: 6px 0 0; }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more::after { content: " →"; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s, box-shadow .15s;
  font-size: .95rem; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #ffd65e; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: transparent; color: var(--red); border-color: #f2c4c0; }
.btn--danger:hover { background: #fdecea; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.btn--icon { width: 36px; padding: 0; min-height: 36px; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; background: var(--yellow); color: var(--ink);
}
.tag--red { background: var(--red); color: #fff; }
.tag--dark { background: var(--ink); color: var(--yellow); }

.empty { padding: 32px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* ---------- Hero / Carousel ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.carousel { position: relative; height: clamp(360px, 62vh, 620px); touch-action: pan-y; }
.carousel__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; }
.carousel__slide.is-active { opacity: 1; z-index: 1; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s ease-out; }
.carousel__slide.is-active img { transform: scale(1); }
.carousel::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.85) 100%),
    linear-gradient(90deg, rgba(218,41,28,.55) 0%, rgba(218,41,28,0) 55%);
}
.hero__content { position: absolute; inset: auto 0 0 0; z-index: 3; padding-bottom: 64px; pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }
.hero__kicker { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.hero__title {
  font-size: clamp(2.2rem, 8vw, 4.6rem); text-transform: uppercase; line-height: .95; margin: 0 0 10px;
  text-shadow: 0 3px 20px rgba(0,0,0,.35);
}
.hero__title em { font-style: normal; color: var(--yellow); display: block; }
.hero__caption { font-size: 1rem; max-width: 560px; margin: 0 0 16px; opacity: .95; min-height: 1.5em; }
.hero__caption a { color: #fff; font-weight: 600; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.carousel__arrow {
  position: absolute; top: 50%; z-index: 4; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 1.6rem; line-height: 1;
  backdrop-filter: blur(4px); display: none;
}
.carousel__arrow:hover { background: var(--yellow); color: var(--ink); }
.carousel__prev { left: 16px; }
.carousel__next { right: 16px; }
.carousel__dots { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 8px; }
.carousel__dot { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .25s, background .25s; }
.carousel__dot.is-active { width: 28px; background: var(--yellow); }
.carousel__progress { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--yellow); z-index: 4; width: 0; }
.carousel__progress.is-running { animation: progress var(--dur, 5s) linear forwards; }
@keyframes progress { to { width: 100%; } }
@media (min-width: 700px) { .carousel__arrow { display: block; } }

/* ---------- Stats strip ---------- */
.stats { background: var(--yellow); }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(39,37,31,.12); }
.stat { background: var(--yellow); padding: 16px 12px; text-align: center; }
.stat__num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--red); }
.stat__label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
@media (min-width: 700px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Ranking table ---------- */
.ranking { width: 100%; border-collapse: collapse; }
.ranking th {
  text-align: left; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em;
  font-size: .8rem; padding: 12px; background: var(--ink); color: var(--yellow); font-weight: 600;
}
.ranking th.num, .ranking td.num { text-align: right; }
.ranking td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ranking tbody tr:last-child td { border-bottom: 0; }
.ranking tbody tr:hover { background: #fffaf0; }
.ranking .pos { width: 52px; }
.pos-badge {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; background: var(--bg); color: var(--ink-2);
}
.pos-1 .pos-badge { background: var(--gold); color: var(--ink); }
.pos-2 .pos-badge { background: var(--silver); color: #fff; }
.pos-3 .pos-badge { background: var(--bronze); color: #fff; }
.team-name { font-weight: 700; }
.team-region { font-size: .82rem; color: var(--muted); }
.points { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.bar { height: 6px; border-radius: 99px; background: var(--bg); margin-top: 6px; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: 99px; }
.gap { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: table-cell; } }

/* ---------- Last tournament ---------- */
.event-banner {
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-bottom: 20px;
  background-image: repeating-linear-gradient(135deg, rgba(255,199,44,.07) 0 12px, transparent 12px 24px);
}
.event-banner h3 { margin: 0; font-size: 1.4rem; text-transform: uppercase; flex: 1 1 100%; }
.event-banner__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; color: #ddd; }

.podium { display: grid; gap: 14px; grid-template-columns: 1fr; }
.podium__item { position: relative; text-align: center; padding-bottom: 18px; border-top: 6px solid var(--line); }
.podium__item.place-1 { border-top-color: var(--gold); }
.podium__item.place-2 { border-top-color: var(--silver); }
.podium__item.place-3 { border-top-color: var(--bronze); }
.podium__photo { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--line); }
.podium__medal {
  position: absolute; top: 12px; left: 12px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.place-1 .podium__medal { background: var(--gold); color: var(--ink); }
.place-2 .podium__medal { background: var(--silver); color: #fff; }
.place-3 .podium__medal { background: var(--bronze); color: #fff; }
.podium__name { font-size: 1.25rem; margin: 14px 12px 2px; text-transform: uppercase; }
.podium__team { color: var(--muted); font-size: .9rem; margin: 0 12px; }
@media (min-width: 760px) {
  .podium { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; }
  .podium .place-1 { order: 2; }
  .podium .place-2 { order: 1; }
  .podium .place-3 { order: 3; }
  .podium .place-1 .podium__photo { aspect-ratio: 1 / 1; }
}

.mvp-head { margin: 36px 0 14px; display: flex; align-items: center; gap: 10px; }
.mvp-head h3 { margin: 0; font-size: 1.4rem; text-transform: uppercase; }
.mvp-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .mvp-grid { grid-template-columns: repeat(4, 1fr); } }
.mvp { position: relative; }
.mvp__photo { aspect-ratio: 1; width: 100%; object-fit: cover; background: var(--line); }
.mvp__badge { position: absolute; top: 10px; right: 10px; }
.mvp__body { padding: 12px; }
.mvp__name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; margin: 0; }
.mvp__team { font-size: .82rem; color: var(--muted); margin: 0; }
.mvp__note { font-size: .85rem; margin: 6px 0 0; color: var(--ink-2); }

/* ---------- Articles ---------- */
.grid-articles { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-articles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-articles { grid-template-columns: repeat(3, 1fr); } }
.article-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.article-card__img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--line); }
.article-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card__meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.article-card__title { font-size: 1.3rem; margin: 0; color: var(--ink); }
.article-card__excerpt { color: var(--ink-2); margin: 0; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__more { margin-top: auto; color: var(--red); font-weight: 700; font-size: .9rem; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font-weight: 600; font-size: .85rem; min-height: 36px;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.search { flex: 1 1 220px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; }

.article { max-width: 820px; margin: 0 auto; }
.article__hero { aspect-ratio: 16 / 8; width: 100%; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.article__meta { display: flex; gap: 12px; align-items: center; margin: 18px 0 8px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.article__title { font-size: clamp(1.8rem, 5vw, 2.8rem); text-transform: uppercase; }
.article__content p { margin: 0 0 1.1em; font-size: 1.05rem; }
.article__back { display: inline-block; margin: 0 0 16px; text-decoration: none; font-weight: 600; }
.article__back::before { content: "← "; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.gallery button { padding: 0; border: 0; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.05); }

/* ---------- Regulaminy ---------- */
.filters a.chip { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.filters a.chip.is-active { color: var(--yellow); }
.rules { display: grid; gap: 14px; }
.rule { scroll-margin-top: calc(var(--nav-h) + 12px); border-left: 6px solid var(--yellow); }
.rule[open] { border-left-color: var(--red); }
.rule summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
}
.rule summary::-webkit-details-marker { display: none; }
.rule summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center;
  font-weight: 700; font-size: 1.2rem;
}
.rule[open] summary::after { content: "−"; background: var(--red); color: #fff; }
.rule__title { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; text-transform: uppercase; }
.rule__meta { font-size: .82rem; color: var(--muted); }
.rule__body { padding: 0 18px 20px; display: grid; gap: 20px; }
@media (min-width: 900px) {
  .rule__body { grid-template-columns: 1fr 340px; align-items: start; }
  .rule__body > [data-pdf] { grid-column: 1 / -1; justify-self: start; }
}
.rich h3 { font-size: 1.1rem; text-transform: uppercase; margin: 1.2em 0 .4em; color: var(--red); }
.rich h3:first-child { margin-top: 0; }
.rich p { margin: 0 0 .9em; }
.rich ul { margin: 0 0 .9em; padding-left: 1.2em; }
.rich li { margin-bottom: .3em; }
.rich li::marker { color: var(--red); }
.rule__scoring { background: #fffaeb; border: 1px solid #f3dfa6; border-radius: var(--radius-sm); padding: 14px; }
.rule__scoring h3 { margin: 0 0 8px; font-size: 1.05rem; text-transform: uppercase; }
.score-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.score-table th { text-align: left; font-size: .75rem; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 2px solid #f3dfa6; }
.score-table td { padding: 8px 4px; border-bottom: 1px solid #f3e6c2; }
.score-table .num { text-align: right; }
.score-table .points { font-size: 1.15rem; }
.pdf-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.pdf-chip span { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list--plain li { grid-template-columns: 1fr; }
@media (min-width: 560px) { .admin-list--plain li { grid-template-columns: 1fr auto; } }
.score-edit .pts { width: 90px; }
@media (max-width: 639px) {
  .edit-table.score-edit tr { grid-template-columns: 1fr 90px auto; }
  .edit-table.score-edit td.c-name, .edit-table.score-edit td.c-pts, .edit-table.score-edit td.c-del { grid-column: auto; grid-row: auto; }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15,14,12,.94); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox__close, .lightbox__nav {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1;
}
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--yellow); color: var(--ink); }

/* ---------- Page header ---------- */
.page-head { background: var(--red); color: #fff; padding: 32px 0 28px; position: relative; overflow: hidden; }
.page-head::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 28px solid rgba(255,199,44,.35);
}
.page-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); text-transform: uppercase; margin: 0; position: relative; }
.page-head p { margin: 6px 0 0; color: #ffe7b0; position: relative; }

/* ---------- Admin ---------- */
.login { max-width: 420px; margin: 40px auto; padding: 28px; }
.login h1 { text-transform: uppercase; font-size: 1.8rem; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--yellow-dark); outline: none; box-shadow: 0 0 0 3px rgba(255,199,44,.35); }
.field textarea { min-height: 200px; resize: vertical; }
.field__hint { font-size: .8rem; color: var(--muted); }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row--3 { grid-template-columns: 2fr 1fr 1fr; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.error { color: var(--red); font-weight: 600; font-size: .9rem; min-height: 1.2em; margin: 0; }

.admin { display: grid; gap: 20px; padding-top: 24px; padding-bottom: 48px; }
.admin__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin__bar h1 { margin: 0; text-transform: uppercase; font-size: 1.8rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab {
  border: 0; background: #fff; padding: 10px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-weight: 700; box-shadow: var(--shadow); min-height: 42px;
}
.tab.is-active { background: var(--red); color: #fff; }
.panel { padding: 20px; }
.panel h2 { text-transform: uppercase; font-size: 1.35rem; }
.panel h3 { text-transform: uppercase; font-size: 1.1rem; margin-top: 8px; }
.panel + .panel { margin-top: 0; }
.admin-cols { display: grid; gap: 20px; }
@media (min-width: 1000px) { .admin-cols { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.dropzone {
  border: 2px dashed var(--yellow-dark); background: #fffaeb; border-radius: var(--radius); padding: 18px;
  text-align: center; cursor: pointer; transition: background .15s;
}
.dropzone.is-over { background: #fff1c2; }
.dropzone input { display: none; }
.dropzone strong { color: var(--red); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__del {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.65); color: #fff; font-size: 1rem; line-height: 1;
}
.thumb__del:hover { background: var(--red); }
.thumb__cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.admin-list li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.admin-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--line); }
.admin-list__title { font-weight: 700; line-height: 1.25; }
.admin-list__meta { font-size: .8rem; color: var(--muted); }
.admin-list__actions { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
@media (min-width: 560px) {
  .admin-list li { grid-template-columns: 64px 1fr auto; }
  .admin-list__actions { grid-column: auto; }
}

.edit-table { width: 100%; border-collapse: collapse; }
.edit-table th { text-align: left; font-size: .8rem; text-transform: uppercase; color: var(--muted); padding: 6px; }
.edit-table td { padding: 6px; vertical-align: middle; }
.edit-table .input { min-height: 40px; padding: 8px 10px; }
.edit-table .pts { width: 92px; text-align: right; }
.edit-table .rank-num { font-family: var(--font-head); font-weight: 700; width: 32px; text-align: center; }
.edit-table tr + tr td { border-top: 1px solid var(--line); }
.pts-ctrl { display: flex; gap: 4px; align-items: center; }
@media (max-width: 639px) {
  .edit-table thead { display: none; }
  .edit-table tr { display: grid; grid-template-columns: 32px 1fr auto; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
  .edit-table tr + tr td { border-top: 0; }
  .edit-table td { padding: 0; }
  .edit-table td.c-name { grid-column: 2 / 4; }
  .edit-table td.c-region { grid-column: 2 / 3; }
  .edit-table td.c-pts { grid-column: 2 / 3; }
  .edit-table td.c-del { grid-column: 3; grid-row: 3; }
  .edit-table td.c-kit { grid-column: 3; grid-row: 2; }
}

.person-row {
  display: grid; gap: 12px; grid-template-columns: 96px 1fr; align-items: start;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px;
}
.person-row__fields { display: grid; gap: 8px; }
.person-row__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.photo-field { display: grid; gap: 6px; }
.photo-field img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); background: var(--line); }
.photo-field label { font-size: .78rem; font-weight: 700; color: var(--red); cursor: pointer; text-align: center; }
.photo-field input[type=file] { display: none; }

.storage-meter { font-size: .82rem; color: var(--muted); }
.storage-meter .bar { margin-top: 4px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 300; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--yellow); font-weight: 600; max-width: 480px; animation: toast-in .25s ease;
}
.toast--error { border-left-color: var(--red); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfc9bb; padding: 28px 0; margin-top: 40px; border-top: 6px solid var(--yellow); }
.footer__inner { display: grid; gap: 8px; }
.footer__brand { display: flex; gap: 10px; align-items: center; color: #fff; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.footer__brand img { border-radius: 50%; }
.footer p { margin: 0; font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
