/* Level Ten website. Plain CSS, no build step. */

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel.woff2") format("woff2"), url("/fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("/fonts/Alegreya.woff2") format("woff2"), url("/fonts/Alegreya.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink-0: #0d0806;
  --ink-1: #150e0a;
  --ink-2: #1e150e;
  --ink-3: #2a1d13;
  --ink-4: #3a2818;
  --line: #4d3721;
  --line-soft: rgba(201, 162, 74, 0.28);
  --gold: #c9a24a;
  --gold-hi: #ffd54f;
  --gold-lo: #8a6a2c;
  --ember: #ff8a3d;
  --ember-deep: #b8420f;
  --text: #e8d9b8;
  --text-dim: #c2b08e;
  --text-faint: #a8956f;
  --danger: #ff8f7f;
  --danger-bg: #3a130d;
  --ok: #a9d47a;
  --ok-bg: #1b2a12;
  --radius: 6px;
  --gutter: 16px;
  --maxw: 1160px;
  --head-h: 64px;
  --font-title: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Alegreya", Georgia, "Times New Roman", serif;
  --corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M0 0h10L0 10z' fill='%23c9a24a'/%3E%3Cpath d='M2.5 15V2.5H15' fill='none' stroke='%23ffd54f' stroke-opacity='.7'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.6' fill='%23ffd54f'/%3E%3C/svg%3E");
  --corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cg transform='rotate(90 9 9)'%3E%3Cpath d='M0 0h10L0 10z' fill='%23c9a24a'/%3E%3Cpath d='M2.5 15V2.5H15' fill='none' stroke='%23ffd54f' stroke-opacity='.7'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.6' fill='%23ffd54f'/%3E%3C/g%3E%3C/svg%3E");
  --corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cg transform='rotate(180 9 9)'%3E%3Cpath d='M0 0h10L0 10z' fill='%23c9a24a'/%3E%3Cpath d='M2.5 15V2.5H15' fill='none' stroke='%23ffd54f' stroke-opacity='.7'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.6' fill='%23ffd54f'/%3E%3C/g%3E%3C/svg%3E");
  --corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cg transform='rotate(270 9 9)'%3E%3Cpath d='M0 0h10L0 10z' fill='%23c9a24a'/%3E%3Cpath d='M2.5 15V2.5H15' fill='none' stroke='%23ffd54f' stroke-opacity='.7'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.6' fill='%23ffd54f'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink-0);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255, 110, 30, 0.08), transparent 60%),
    linear-gradient(180deg, var(--ink-1), var(--ink-0) 600px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffe58a; }

:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: #f3e6c8;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.06em; }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--gold-hi);
  color: #1a0f05;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: var(--radius);
}
.skip-link:focus { top: 10px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: calc(560px + var(--gutter) * 2); }
.wrap-mid { max-width: calc(820px + var(--gutter) * 2); }

.eyebrow {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6em;
}

.lede { font-size: 1.25rem; color: var(--text-dim); max-width: 38em; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 0.95rem; }
.center { text-align: center; }

/* Ornamental divider: line, diamond, line */
.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  margin: 0 auto 18px;
  max-width: 280px;
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule span {
  width: 9px; height: 9px;
  transform: rotate(45deg);
  background: var(--gold-hi);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.6);
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 8, 6, 0.9);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.35);
}
@supports (backdrop-filter: blur(6px)) {
  .site-header { background: rgba(13, 8, 6, 0.78); backdrop-filter: blur(8px); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--head-h);
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--gold-hi);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--gold-hi); background: rgba(255, 213, 79, 0.06); }
.nav-link[aria-current="page"] { color: var(--gold-hi); border-color: var(--line-soft); }

.nav-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-hi);
  text-decoration: none;
  font-weight: 700;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  min-height: 40px;
  max-width: 220px;
}
.nav-user img { width: 30px; height: 30px; }
.nav-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user:hover { background: rgba(255, 213, 79, 0.08); }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px var(--gutter) 20px;
    background: rgba(17, 11, 8, 0.98);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    max-height: calc(100vh - var(--head-h));
    overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .nav-link { width: 100%; min-height: 46px; font-size: 0.95rem; }
  .nav-auth {
    margin-left: 0;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }
  .nav-auth .btn { flex: 1 1 140px; }
  .nav-user { max-width: none; flex: 1 1 100%; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  --btn-pad-y: 0.7em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: var(--btn-pad-y) 1.3em;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  cursor: pointer;
  color: var(--gold-hi);
  background: linear-gradient(180deg, #2e2014, #1c130c);
  box-shadow: inset 0 1px 0 rgba(255, 220, 140, 0.15), 0 2px 0 rgba(0, 0, 0, 0.6);
  transition: transform 0.08s, filter 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #ffe58a; filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }
.btn img { width: 22px; height: 22px; }

.btn-ember {
  color: #fff4dc;
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, #d8722a 0%, #ac4314 45%, #7f290a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    0 0 0 2px #1f0d04,
    0 8px 24px rgba(255, 106, 20, 0.28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}
.btn-ember:hover { color: #fff; }

.btn-gold {
  color: #2a1606;
  border-color: #ffe7a0;
  background: linear-gradient(180deg, #ffe39a 0%, #e5b443 50%, #b0821f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2px #1f1206, 0 6px 16px rgba(0, 0, 0, 0.45);
}
.btn-gold:hover { color: #1a0d03; }

.btn-ghost { background: rgba(13, 8, 6, 0.55); }

.btn-danger {
  color: #ffd9d2;
  border-color: #b5452f;
  background: linear-gradient(180deg, #5b1d12, #3a100a);
}
.btn-danger:hover { color: #fff; }

.btn-lg { font-size: 1.02rem; min-height: 54px; padding-inline: 1.7em; }
.btn-sm { font-size: 0.74rem; min-height: 36px; padding: 0.45em 0.9em; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ------------------------------------------------------------ frames and panels */

.frame {
  position: relative;
  background: linear-gradient(180deg, rgba(40, 28, 18, 0.96), rgba(24, 16, 11, 0.97));
  border: 1px solid var(--gold-lo);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 14px 34px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(0, 0, 0, 0.35);
  padding: 22px;
}
.frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  pointer-events: none;
}
.frame::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    var(--corner-tl) top left / 18px 18px no-repeat,
    var(--corner-tr) top right / 18px 18px no-repeat,
    var(--corner-br) bottom right / 18px 18px no-repeat,
    var(--corner-bl) bottom left / 18px 18px no-repeat;
}
.frame > * { position: relative; z-index: 1; }
@media (min-width: 720px) { .frame { padding: 28px; } }

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-title h2, .panel-title h3 { margin: 0; font-size: 1.05rem; letter-spacing: 0.1em; color: var(--gold-hi); }

/* ------------------------------------------------------------ page heads */

.page-head {
  position: relative;
  padding: 56px 0 40px;
  background:
    linear-gradient(180deg, rgba(13, 8, 6, 0.35), rgba(13, 8, 6, 0.85) 75%, var(--ink-0)),
    url("/img/bg_board.webp") center 30% / cover no-repeat;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.page-head h1 { margin-bottom: 0.25em; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.page-head p { margin: 0 auto; max-width: 36em; color: var(--text-dim); }

.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }
@media (min-width: 720px) { .section { padding: 72px 0; } }

/* ------------------------------------------------------------ forms */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.field .hint { font-size: 0.92rem; color: var(--text-faint); margin: 0; }
.input, .field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: #100a07;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.62em 0.8em;
  min-height: 46px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-hi);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 213, 79, 0.28);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #e0533d; }
.field-error { color: var(--danger); font-size: 0.95rem; margin: 0; min-height: 0; }
.field-error:empty { display: none; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--text-dim);
  cursor: pointer;
}
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--gold); flex-shrink: 0; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 180px; min-width: 0; }

.alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid;
  font-size: 1rem;
}
.alert:empty { display: none; }
.alert-error { color: #ffd2ca; background: var(--danger-bg); border-color: #8a2f20; }
.alert-ok { color: #dff3c7; background: var(--ok-bg); border-color: #4c6b2e; }
.alert-info { color: var(--text); background: rgba(255, 213, 79, 0.06); border-color: var(--line-soft); }
.alert p:last-child { margin: 0; }

.auth-card { margin: 40px auto 64px; }
.auth-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); text-align: center; }
.auth-card .switch { text-align: center; margin: 18px 0 0; color: var(--text-dim); }

/* ------------------------------------------------------------ tiers, chips, stats */

.tier {
  --tier: #a39278;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tier);
  border: 1px solid color-mix(in srgb, var(--tier) 55%, transparent);
  background: color-mix(in srgb, var(--tier) 12%, #0d0806);
}
.tier::before {
  content: "";
  width: 8px; height: 8px;
  transform: rotate(45deg);
  background: var(--tier);
  box-shadow: 0 0 6px var(--tier);
}
.tier[data-tier="Peasant"] { --tier: #b5a283; }
.tier[data-tier="Squire"] { --tier: #d99a5b; }
.tier[data-tier="Knight"] { --tier: #b9cde0; }
.tier[data-tier="Champion"] { --tier: #ffd54f; }
.tier[data-tier="Warlord"] { --tier: #ff7a52; }
.tier[data-tier="Legend"] { --tier: #d6a2ff; }
.tier-lg { font-size: 0.85rem; padding: 5px 14px 5px 11px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.chip-gold { color: var(--gold-hi); border-color: var(--gold-lo); }
.chip-danger { color: var(--danger); border-color: #8a2f20; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-dim); white-space: nowrap; }
.status-dot::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6d5c45;
  flex-shrink: 0;
}
.status-dot[data-status="online"]::before { background: #8fd16a; box-shadow: 0 0 8px #8fd16a; }
.status-dot[data-status="in_queue"]::before { background: var(--gold-hi); box-shadow: 0 0 8px var(--gold-hi); }
.status-dot[data-status="in_match"]::before { background: var(--ember); box-shadow: 0 0 8px var(--ember); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}
.stat {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}
.stat dt {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.stat dd {
  margin: 4px 0 0;
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 700;
  color: #f7ebcf;
  line-height: 1.1;
}
.stat dd small { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--text-faint); }

.delta-up { color: var(--ok); font-weight: 700; }
.delta-down { color: var(--danger); font-weight: 700; }

/* placement medallion */
.place {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  background: radial-gradient(circle at 35% 30%, #4a3622, #1f150e);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.place[data-place="1"] { color: #2a1606; background: radial-gradient(circle at 35% 30%, #fff0b0, #e0aa2e 60%, #9a6c12); border-color: #ffe7a0; box-shadow: 0 0 12px rgba(255, 213, 79, 0.45); }
.place[data-place="2"] { color: #1b1f24; background: radial-gradient(circle at 35% 30%, #ffffff, #b8c3cf 60%, #6f7b88); border-color: #e3ebf3; }
.place[data-place="3"] { color: #24130a; background: radial-gradient(circle at 35% 30%, #ffd2a6, #c27a3e 60%, #7a4419); border-color: #f0b98a; }

.portrait {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a1d13;
  flex-shrink: 0;
}

/* ------------------------------------------------------------ tables */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.table th {
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--gold-lo);
  white-space: nowrap;
}
.table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(77, 55, 33, 0.6);
  vertical-align: middle;
}
.table tbody tr:hover { background: rgba(255, 213, 79, 0.04); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-me { background: rgba(255, 138, 61, 0.1); }
.table tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--ember); }
.cell-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-player a { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .table th, .table td { padding: 9px 6px; }
}
@media (max-width: 900px) { .hide-md { display: none; } }
@media (min-width: 641px) { .show-sm { display: none; } }
.cell-player { flex-wrap: wrap; }

/* ------------------------------------------------------------ lists */

.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid rgba(77, 55, 33, 0.6);
}
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.list .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 22px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}
.empty img { width: 72px; height: 72px; margin: 0 auto 8px; opacity: 0.9; }
.empty p { margin: 0 0 0.4em; }

.loading { color: var(--text-faint); font-style: italic; }
.loading::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ------------------------------------------------------------ dialog */

dialog.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow-y: auto;
}
dialog.modal::backdrop { background: rgba(5, 3, 2, 0.75); backdrop-filter: blur(2px); }
dialog.modal .frame { margin: 2px; }
dialog.modal h2 { font-size: 1.3rem; }

/* ------------------------------------------------------------ tabs */

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gold-lo);
  margin-bottom: 20px;
}
.tab {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--gold-hi); }
.tab[aria-selected="true"] {
  color: var(--gold-hi);
  background: linear-gradient(180deg, #2c1f14, var(--ink-0));
  border-color: var(--gold-lo);
  border-bottom: 1px solid var(--ink-0);
}

/* ------------------------------------------------------------ footer */

.site-footer {
  margin-top: 40px;
}
main:has(> .cta-band:last-child) + .site-footer { margin-top: 0; }
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #120b07, #080504);
  padding: 40px 0 28px;
  font-size: 1rem;
  color: var(--text-dim);
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand img { width: 170px; margin-bottom: 10px; }
.footer-brand p { max-width: 26em; }
.site-footer h2 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { color: var(--text); text-decoration: none; display: inline-block; padding: 3px 0; }
.site-footer ul a:hover { color: var(--gold-hi); text-decoration: underline; }
.footer-base {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(77, 55, 33, 0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-faint);
}
.footer-base a { color: var(--text-dim); }

/* ------------------------------------------------------------ landing */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 860px);
  display: grid;
  align-items: end;
  padding: 72px 0 56px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/img/bg_hero.webp") center 35% / cover no-repeat;
  transform: scale(1.04);
}
@media (max-width: 720px) { .hero-bg { background-image: url("/img/bg_hero_sm.webp"); } }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 120, 40, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 45% at 50% 62%, rgba(13, 8, 6, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(13, 8, 6, 0.1) 0%, rgba(13, 8, 6, 0.05) 35%, rgba(13, 8, 6, 0.8) 85%, var(--ink-0) 100%);
}
.embers {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 80%, #ffb45c, transparent),
    radial-gradient(1.5px 1.5px at 28% 60%, #ff8a3d, transparent),
    radial-gradient(2px 2px at 46% 90%, #ffd54f, transparent),
    radial-gradient(1.5px 1.5px at 63% 70%, #ff8a3d, transparent),
    radial-gradient(2px 2px at 78% 85%, #ffb45c, transparent),
    radial-gradient(1.5px 1.5px at 90% 65%, #ffd54f, transparent);
  animation: rise 9s linear infinite;
  opacity: 0.8;
}
@keyframes rise {
  from { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.85; }
  to { transform: translateY(-45%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .embers { animation: none; opacity: 0.5; }
  .hero-bg { transform: none; }
}
.hero-logo {
  width: min(640px, 92%);
  margin: 0 auto 10px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 40px rgba(255, 120, 30, 0.25));
}
.hero-title { margin: 0; }
.hero .tagline {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
  text-wrap: balance;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  letter-spacing: 0.14em;
  color: #f6e8c6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  margin: 0 auto 12px;
  max-width: 30em;
}
.hero .lede {
  margin: 0 auto 26px;
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
  max-width: 34em;
}
.hero .btn-row { justify-content: center; }
.hero-note { margin: 16px 0 0; font-size: 0.98rem; color: var(--text-dim); text-shadow: 0 1px 6px #000; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 8, 6, 0.72);
  font-size: 0.98rem;
  color: var(--text);
}
.live-pill .pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #8fd16a;
  box-shadow: 0 0 0 0 rgba(143, 209, 106, 0.6);
  animation: pulse 2s infinite;
}
.live-pill[data-state="down"] .pulse { background: #7a6a55; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 209, 106, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(143, 209, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 209, 106, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-pill .pulse { animation: none; } }

.pitch {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) { .pitch { grid-template-columns: 1fr 1.25fr; gap: 48px; } }
.pitch-steps {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.pitch-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
.pitch-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 700;
  color: #2a1606;
  background: radial-gradient(circle at 35% 30%, #fff0b0, #e0aa2e 60%, #9a6c12);
  border: 1px solid #ffe7a0;
}
.pitch-steps strong { color: #f6e8c6; }

.shot {
  padding: 8px;
}
.shot img { width: 100%; border-radius: 2px; }
.shot figcaption { padding: 10px 6px 2px; font-size: 0.95rem; color: var(--text-dim); }

.features {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { display: flex; flex-direction: column; padding: 18px 18px 22px; }
.feature-art {
  height: 150px;
  position: relative;
  margin: 0 0 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 3px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 120, 40, 0.28), transparent 70%),
    linear-gradient(180deg, #120c08, #24170e);
  border: 1px solid var(--line);
}
.feature-art img { position: relative; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6); border: 2px solid var(--gold-lo); margin-bottom: 14px; }
.feature-art img:nth-child(1) { transform: rotate(-10deg) translate(22px, 6px); }
.feature-art img:nth-child(2) { z-index: 2; transform: translateY(-8px); border-color: var(--gold); }
.feature-art img:nth-child(3) { transform: rotate(10deg) translate(-22px, 6px); }
.feature-art.doors img { width: 74px; height: 116px; border-radius: 40px 40px 4px 4px; }
.feature h3 { color: var(--gold-hi); margin-bottom: 8px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 1.05rem; }

.roster-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; }
.roster-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
}
.roster-tab {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 92px;
  color: var(--text-dim);
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.roster-tab img {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  filter: saturate(0.6) brightness(0.8);
  transition: transform 0.15s, filter 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.roster-tab:hover img { filter: none; transform: translateY(-2px); }
.roster-tab[aria-selected="true"] { color: var(--gold-hi); }
.roster-tab[aria-selected="true"] img {
  filter: none;
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 3px #1f1206, 0 0 22px rgba(255, 213, 79, 0.45);
  transform: translateY(-3px);
}
.roster-tab:focus-visible { outline-offset: 2px; border-radius: 12px; }
@media (max-width: 480px) {
  .roster-tab { width: 62px; font-size: 0.6rem; }
  .roster-tab img { width: 56px; height: 56px; }
  .roster-tabs { gap: 8px 6px; }
}
.hero-card {
  display: grid;
  gap: 20px;
  align-items: center;
  grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 700px) {
  .hero-card { grid-template-columns: 220px 1fr; text-align: left; gap: 32px; }
}
.hero-card img {
  width: 200px; height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #1f1206, 0 0 0 5px var(--gold), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.hero-card h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 4px; color: #f6e8c6; }
.hero-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 699px) { .hero-card .meta { justify-content: center; } }
.hero-card .power-name { font-family: var(--font-title); font-weight: 700; color: var(--gold-hi); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 4px; }
.hero-card .power-desc { font-size: 1.15rem; margin: 0; }

.gallery { display: grid; gap: 18px; }
@media (min-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } }

.status-band { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.status-band .stat { text-align: center; padding: 18px 12px; }
.status-band .stat dd { font-size: 2.2rem; color: var(--gold-hi); }

.cta-band {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 80px 0;
  overflow: hidden;
  border-block: 1px solid var(--line-soft);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 8, 6, 0.75), rgba(13, 8, 6, 0.55) 50%, rgba(13, 8, 6, 0.85)),
    url("/img/bg_boss.webp") center 35% / cover no-repeat;
}
.cta-band h2 { text-shadow: 0 2px 10px #000; }
.cta-band p { text-shadow: 0 1px 6px #000; }
.cta-band .btn-row { justify-content: center; }

/* ------------------------------------------------------------ download */

.dl-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
.dl-card { display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; }
.dl-card .os-icon { width: 56px; height: 56px; color: var(--gold-hi); }
.dl-card h2 { font-size: 1.15rem; margin: 0; }
.dl-card .btn { margin-top: auto; width: 100%; }
.dl-card details { width: 100%; text-align: left; font-size: 0.92rem; color: var(--text-dim); }
.dl-card summary { cursor: pointer; color: var(--text-dim); }
.dl-card code { display: block; word-break: break-all; font-size: 0.8rem; background: rgba(0, 0, 0, 0.35); padding: 8px; border-radius: 4px; margin-top: 6px; color: var(--text); }
.dl-card.featured { border-color: var(--gold); }
.notes { white-space: pre-line; }

.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: 6px; }
kbd {
  font-family: var(--font-body);
  font-size: 0.95em;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #100a07;
  color: var(--text);
  white-space: nowrap;
}

/* ------------------------------------------------------------ account / profile */

.profile-head {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.profile-head .crest {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #4a3622, #160f0a);
  box-shadow: 0 0 0 2px #1f1206, 0 0 0 3px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}
.profile-head .crest img { width: 46px; height: 46px; }
.profile-head .who { flex: 1 1 220px; min-width: 0; }
.profile-head h1, .profile-head h2 { margin: 0 0 6px; overflow-wrap: anywhere; font-size: clamp(1.5rem, 4vw, 2.3rem); }
.profile-head .meta { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; color: var(--text-dim); font-size: 0.98rem; }

.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .cols-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.stack { display: grid; gap: 20px; align-content: start; }

.match-list .hero-mini { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-list .hero-mini img { width: 32px; height: 32px; }

.danger-zone { border-color: #8a2f20; }
.danger-zone .panel-title h2 { color: var(--danger); }

/* ------------------------------------------------------------ match */

.match-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.standings { display: grid; gap: 10px; }
.standing {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
}
.standing.winner { border-color: var(--gold); background: linear-gradient(90deg, rgba(255, 213, 79, 0.12), rgba(0, 0, 0, 0.25) 60%); }
.standing .portrait { width: 56px; height: 56px; box-shadow: 0 0 0 2px var(--gold-lo); }
.standing .name { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.standing .sub { color: var(--text-dim); font-size: 0.95rem; }
.standing .mmr { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 520px) {
  .standing { grid-template-columns: auto auto 1fr; }
  .standing .mmr { grid-column: 2 / -1; text-align: left; }
  .standing .portrait { width: 44px; height: 44px; }
}

/* ------------------------------------------------------------ admin */

.report {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.report-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.report-head .who { font-weight: 700; font-size: 1.1rem; }
.quote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--ember);
  background: rgba(255, 138, 61, 0.07);
  border-radius: 0 4px 4px 0;
  overflow-wrap: anywhere;
}
.quote .label { display: block; margin-bottom: 2px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-actions .hours { width: 92px; min-height: 36px; padding: 4px 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.toolbar .field { flex: 0 1 auto; }
.toolbar .grow { flex: 1 1 220px; }
.chat-log { font-size: 0.98rem; }
.chat-log td.msg { overflow-wrap: anywhere; min-width: 180px; }

/* ------------------------------------------------------------ prose (legal) */

.prose { max-width: 46em; }
.prose h2 { font-size: 1.2rem; margin-top: 1.8em; color: var(--gold-hi); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }

/* ------------------------------------------------------------ 404 */

.lost { text-align: center; padding: 56px 0 24px; }
.lost img { width: 200px; height: 200px; margin: 0 auto 14px; border-radius: 50%; box-shadow: 0 0 0 3px #1f1206, 0 0 0 5px var(--gold-lo), 0 16px 40px rgba(0, 0, 0, 0.6); }
.lost .code { font-family: var(--font-title); font-size: clamp(3.5rem, 12vw, 6rem); color: var(--gold-hi); line-height: 1; margin: 0 0 6px; text-shadow: 0 0 30px rgba(255, 120, 30, 0.4); }
.lost .btn-row { justify-content: center; }

.pager { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap; }

[hidden] { display: none !important; }

.roster-panel { max-width: 860px; margin-inline: auto; }

figure { margin: 0; }
@media (max-width: 560px) {
  .hero { min-height: 0; padding: 48px 0 40px; }
  .hero .btn-row .btn, .cta-band .btn-row .btn { flex: 1 1 100%; }
  .status-band { grid-template-columns: 1fr; gap: 10px; }
  .status-band .stat { display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 14px 18px; }
  .status-band .stat dd { margin: 0; font-size: 1.7rem; }
}

.page-head-left { text-align: left; }
.page-head-left p { margin: 0; }
.field label.check {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}

.field input[type="checkbox"], .field input[type="radio"], .check input {
  width: 20px; height: 20px; min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
fieldset.field { gap: 8px; }
