html[data-theme="light"] {
  --bg: #F3F6F0;
  --panel: #FFFFFF;
  --panel-2: #EAF0E5;
  --footer-bg: #E6ECE1;
  --ink: #0C150E;
  --soft: #24342A;
  --muted: #46584C;
  --muted-2: #3A4C40;
  --dim: #66786C;
  --green: #5FAE1F;
  --green-rgb: 95, 174, 31;
  --green-light: #4C9416;
  --on-green: #061000;
  --line: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] :is(.hero, .page-banner, .tourney, .join, .community, .drawer, .welcome, .site-header, .card-dark) {
  --ink: #F2F5F3; --soft: #C8D6CE; --muted: #A9B8B0; --muted-2: #B9C7C0; --dim: #6F8A7C;
  --green: #8EF03B; --green-rgb: 142, 240, 59; --green-light: #B8FF7E; --on-green: #0A1400;
  --panel: #08110D; --panel-2: #07100C; --line: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}
html[data-theme="light"] .news-card__media { background-color: #DDE6D7; }
html[data-theme="light"] .team-card__avatar { background: #DCE8D4; }
html[data-theme="light"] .link-row { border-bottom-color: rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .mlink { color: #E4ECE7; }

html[dir="ltr"] .drawer { right: auto; left: 0; border-left: none; border-right: 1px solid rgba(var(--green-rgb), 0.25); }
html[dir="ltr"] .mlink.is-current { border-right: none; border-left: 3px solid var(--green); }
html[dir="ltr"] .tag { right: auto; left: 14px; }
html[dir="ltr"] .more-link svg, html[dir="ltr"] .back-link svg { transform: scaleX(-1); }
html[dir="ltr"] .scene-toggle { left: auto; right: 20px; }
html[dir="ltr"] .tourney__img, html[dir="ltr"] .join__img { left: auto; right: 0; }
html[dir="ltr"] .tourney__fade, html[dir="ltr"] .join__fade {
  background: linear-gradient(to right, rgba(5, 10, 8, 0.94) 0%, rgba(5, 10, 8, 0.82) 38%, rgba(5, 10, 8, 0.25) 75%, rgba(5, 10, 8, 0.1) 100%);
}
html[dir="ltr"] .bell-dot { right: auto; left: 9px; }
html[dir="ltr"] .tl-item { border-right: none; border-left: 2px solid rgba(var(--green-rgb), 0.35); padding: 0 0 0 22px; }
html[dir="ltr"] .tl-item::before { right: auto; left: -7px; }

.welcome {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background:
    radial-gradient(ellipse 55% 45% at 50% 45%, rgba(var(--green-rgb), 0.16), transparent 70%),
    #030806;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.welcome.is-done { opacity: 0; visibility: hidden; }
.welcome__brand { font-family: var(--font-num); font-size: clamp(40px, 8vw, 84px); letter-spacing: 3px; line-height: 1; color: #F2F5F3; text-align: center; }
.w-word { display: inline-block; opacity: 0.12; animation: neonOn 1.5s ease-out 0.2s forwards, neonPulse 2.8s ease-in-out 1.7s infinite; }
.w-club { color: #EFFFD9; animation-delay: 0.9s, 2.4s; }
@keyframes neonOn {
  0% { opacity: 0.12; text-shadow: none; }
  10% { opacity: 1; text-shadow: 0 0 6px #fff, 0 0 18px rgba(var(--green-rgb), 0.9), 0 0 46px rgba(var(--green-rgb), 0.6); }
  14% { opacity: 0.25; text-shadow: none; }
  22% { opacity: 1; text-shadow: 0 0 6px #fff, 0 0 18px rgba(var(--green-rgb), 0.9), 0 0 46px rgba(var(--green-rgb), 0.6); }
  26% { opacity: 0.45; text-shadow: 0 0 4px rgba(var(--green-rgb), 0.4); }
  40%, 100% { opacity: 1; text-shadow: 0 0 6px #fff, 0 0 20px rgba(var(--green-rgb), 0.85), 0 0 52px rgba(var(--green-rgb), 0.55); }
}
@keyframes neonPulse {
  0%, 100% { text-shadow: 0 0 6px #fff, 0 0 20px rgba(var(--green-rgb), 0.85), 0 0 52px rgba(var(--green-rgb), 0.55); }
  50% { text-shadow: 0 0 8px #fff, 0 0 28px rgba(var(--green-rgb), 1), 0 0 80px rgba(var(--green-rgb), 0.75); }
}
@media (prefers-reduced-motion: reduce) { .w-word { opacity: 1; text-shadow: 0 0 6px #fff, 0 0 20px rgba(var(--green-rgb), 0.85); } }
.welcome__sub { font-family: var(--font-head); font-weight: 700; color: #A9B8B0; margin-top: -10px; }
.welcome__bar {
  position: relative; width: min(420px, 78vw); height: 6px;
  background: rgba(255, 255, 255, 0.08);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  overflow: hidden;
}
.welcome__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green); box-shadow: 0 0 18px var(--green); }
html[dir="rtl"] .welcome__fill { inset: 0 0 0 auto; }
.welcome__count { font-family: var(--font-num); font-size: 34px; letter-spacing: 2px; color: var(--green); min-width: 3ch; text-align: center; }
.welcome__skip { position: absolute; bottom: 26px; background: none; border: none; color: #6F8A7C; font: inherit; font-size: 13px; cursor: pointer; }

.click-fx {
  position: fixed; z-index: 99; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 2px solid var(--green); border-radius: 50%;
  animation: clickFx 0.45s ease-out forwards;
}
@keyframes clickFx { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }

.site-header { z-index: 10; }
.header-nav { display: flex; align-items: center; gap: 2px; }
.header-nav a {
  padding: 8px 12px; color: #E4ECE7;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
}
.header-nav a:hover { color: var(--green-light); }
.header-nav a.is-current { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); }
.icon-btn.is-on { color: var(--green); }
.account-btn { gap: 8px; padding: 0 12px 0 6px; font-size: 14px; font-weight: 600; }
.account-btn img, .account-btn .avatar-mini { width: 32px; height: 32px; object-fit: cover; }
.avatar-mini { display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--green-rgb), 0.18); color: var(--green); font-family: var(--font-head); font-weight: 800; }

.notif { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  width: min(340px, 86vw); max-height: 420px; overflow-y: auto;
  background: #08110D; border: 1px solid rgba(var(--green-rgb), 0.3);
  color: #F2F5F3; padding: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
html[dir="ltr"] .notif-panel { left: auto; right: 0; }
.notif-panel h3 { margin: 0 0 10px; font-family: var(--font-head); font-size: 17px; }
.notif-item { display: block; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #C8D6CE; font-size: 14px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.is-new { color: #F2F5F3; }
.notif-item small { display: block; color: #6F8A7C; font-size: 12px; }

.drawer-extra { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.drawer-extra a { padding: 8px 14px; color: #C8D6CE; font-size: 15px; font-weight: 600; }
.drawer-extra a:hover { color: var(--green-light); }
.drawer-tools { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.page-banner {
  position: relative; overflow: hidden;
  min-height: 340px; padding: 120px 20px 44px;
  display: flex; align-items: flex-end;
  background: #030806;
}
.page-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0.55; }
.page-banner__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(2, 6, 4, 0.75), rgba(3, 8, 6, 0.35) 45%, var(--bg)); }
html[data-theme="light"] .page-banner__shade { background: linear-gradient(to bottom, rgba(2, 6, 4, 0.75), rgba(3, 8, 6, 0.45) 55%, rgba(3, 8, 6, 0.85)); }
.page-banner__inner { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; }
.page-banner__num { font-family: var(--font-num); font-size: 22px; letter-spacing: 2px; color: var(--green); }
.page-banner__title { margin: 4px 0 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(34px, 5vw, 56px); line-height: 1.1; color: var(--ink); }
.page-banner__sub { margin: 10px 0 0; max-width: 640px; color: var(--soft); font-size: 17px; }
.page-banner .section-bar { width: 90px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 48px 20px 0; }
.wrap--narrow { max-width: 820px; }
.block { margin-top: 56px; }
.block:first-child { margin-top: 0; }
.h2 { margin: 0 0 18px; font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.25; }
.h3 { margin: 0 0 10px; font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.panel { padding: 1px; background: var(--line); }
.panel--accent { background: rgba(var(--green-rgb), 0.45); }
.panel__inner { height: 100%; background: var(--panel); padding: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.empty {
  padding: 34px 24px; text-align: center;
  border: 1px dashed rgba(var(--green-rgb), 0.35);
  color: var(--muted);
}
.empty__title { display: block; margin-bottom: 4px; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin-bottom: 18px;
  background: rgba(var(--green-rgb), 0.08); border: 1px solid rgba(var(--green-rgb), 0.35);
  font-size: 15px;
}
.notice--warn { background: rgba(255, 196, 61, 0.08); border-color: rgba(255, 196, 61, 0.45); }
.notice--demo { background: rgba(139, 123, 255, 0.10); border-color: rgba(139, 123, 255, 0.5); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 12px; font-size: 13px; font-weight: 700;
  transform: skewX(-12deg);
  background: rgba(var(--green-rgb), 0.14); color: var(--green);
}
.pill > span { display: inline-block; transform: skewX(12deg); }
.pill--violet { background: rgba(139, 123, 255, 0.16); color: var(--violet); }
.pill--muted  { background: rgba(127, 140, 132, 0.18); color: var(--muted); }
.pill--red    { background: rgba(255, 92, 92, 0.15); color: #FF7B7B; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(var(--green-rgb), 0.05); }
.rank { font-family: var(--font-num); font-size: 24px; letter-spacing: 1px; width: 56px; }
.rank--1 { color: #FFD45C; } .rank--2 { color: #D9E2DC; } .rank--3 { color: #E3A66B; }
.player-cell { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; }
.player-cell img, .player-cell .avatar-mini { width: 38px; height: 38px; object-fit: cover; flex: none; }
.num { font-family: var(--font-num); font-size: 22px; letter-spacing: 1px; color: var(--green); }

.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.req { color: var(--green); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); font: inherit; font-size: 16px;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.18); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #FF7B7B; }
.code-input { font-family: var(--font-num); font-size: 34px; letter-spacing: 12px; text-align: center; direction: ltr; }
.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 18px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); font-weight: 600;
}
.choice input { accent-color: var(--green); width: 18px; height: 18px; }
.choice:has(input:checked) { border-color: var(--green); background: rgba(var(--green-rgb), 0.1); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--green); width: 20px; height: 20px; margin-top: 3px; flex: none; }
.field-error { color: #FF7B7B; font-size: 13px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-primary[disabled], .btn-outline[disabled] { opacity: 0.55; cursor: wait; }
button.btn-outline, button.btn-primary { cursor: pointer; font-family: inherit; }
button.btn-primary { font-family: var(--font-head); }
html[data-theme="light"] .btn-outline:not(.tourney .btn-outline):not(.join .btn-outline) { background: var(--panel); }

.player-box { padding: 18px; border: 1px solid var(--line); background: var(--bg); }
.player-box__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps span { flex: 1; height: 4px; background: var(--line); transform: skewX(-30deg); }
.steps span.is-on { background: var(--green); }

.toast-box { position: fixed; z-index: 110; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, 92vw); }
.toast { padding: 14px 18px; background: #0D1A14; color: #F2F5F3; border: 1px solid rgba(var(--green-rgb), 0.5); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-weight: 600; animation: toastIn 0.25s ease-out; }
.toast--err { border-color: #FF7B7B; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 20px; font-family: var(--font-head); font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-num); font-size: 26px; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq .faq__a { padding: 0 20px 20px; color: var(--muted-2); }
.prose { color: var(--muted-2); font-size: 17px; white-space: pre-line; }

.t-hero { position: relative; overflow: hidden; padding: 1px; background: rgba(var(--green-rgb), 0.45); }
.t-hero__inner { position: relative; background: #07100C; padding: 34px; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.t-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.t-hero__fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 10, 8, 0.96), rgba(5, 10, 8, 0.35)); }
.t-hero__inner > :not(img):not(.t-hero__fade) { position: relative; }
.t-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #C8D6CE; font-size: 15px; }
.t-facts b { color: #F2F5F3; }

.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 26px; overflow-x: auto; padding-bottom: 8px; }
.bracket__round { display: flex; flex-direction: column; justify-content: space-around; gap: 16px; }
.bracket__title { font-family: var(--font-head); font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.match { padding: 1px; background: rgba(var(--green-rgb), 0.35); }
.match__inner { background: var(--panel); }
.match__team { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-weight: 600; }
.match__team + .match__team { border-top: 1px solid var(--line); }
.match__team.is-win { color: var(--green); }
.match__score { font-family: var(--font-num); font-size: 20px; }

.timeline { display: flex; flex-direction: column; gap: 18px; }
.tl-item { position: relative; padding: 0 22px 0 0; border-right: 2px solid rgba(var(--green-rgb), 0.35); }
.tl-item::before { content: ""; position: absolute; right: -7px; top: 8px; width: 12px; height: 12px; background: var(--green); transform: rotate(45deg); }
.tl-item.is-next::before { box-shadow: 0 0 0 5px rgba(var(--green-rgb), 0.25); }
.tl-date { font-family: var(--font-num); font-size: 18px; letter-spacing: 1px; color: var(--green); }

.media-card { padding: 1px; background: var(--line); color: var(--ink); display: block; }
.media-card:hover { color: var(--ink); }
.media-card__inner { background: var(--panel); height: 100%; display: flex; flex-direction: column; }
.media-card__img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #0D1A14; }
.media-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.media-card__title { font-family: var(--font-head); font-weight: 700; font-size: 18px; }

.stat { padding: 1px; background: rgba(var(--green-rgb), 0.45); }
.stat__inner { background: var(--panel); padding: 22px; display: flex; flex-direction: column; gap: 2px; }
.stat__value { font-family: var(--font-num); font-size: 54px; line-height: 1; color: var(--green); }
.stat__label { color: var(--muted); font-weight: 600; }

.org-tree { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-node { padding: 1px; background: rgba(var(--green-rgb), 0.45); min-width: 220px; text-align: center; }
.org-node__inner { background: var(--panel); padding: 14px 20px; }
.org-node__role { font-size: 13px; color: var(--muted); font-weight: 700; }
.org-node__name { font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.org-line { width: 2px; height: 26px; background: rgba(var(--green-rgb), 0.5); }
.org-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-top: 16px; border-top: 2px solid rgba(var(--green-rgb), 0.5); }

.profile-head { position: relative; padding: 1px; background: rgba(var(--green-rgb), 0.45); }
.profile-head__inner { position: relative; background: var(--panel); overflow: hidden; }
.profile-banner { height: 200px; width: 100%; object-fit: cover; display: block; background: linear-gradient(120deg, #0D1A14, #1B3A12); }
.profile-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 0 24px 22px; margin-top: -54px; }
.profile-avatar { width: 112px; height: 124px; object-fit: cover; background: #12241B; border: 3px solid var(--panel); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 44px; font-weight: 800; color: var(--green); }
.profile-name { font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1.2; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); }
.badge .hex { width: 40px; height: 44px; background: var(--green); color: var(--on-green); display: flex; align-items: center; justify-content: center; }

.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
#admin-body { min-width: 0; }
.admin-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--panel); border: 1px solid var(--line); }
.admin-nav button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 12px; border: none; background: none; color: var(--ink);
  font: inherit; font-weight: 600; text-align: start; cursor: pointer;
}
.admin-nav button:hover { background: rgba(var(--green-rgb), 0.08); }
.admin-nav button.is-current { background: rgba(var(--green-rgb), 0.14); color: var(--green); }
.admin-nav .count { font-family: var(--font-num); font-size: 18px; color: var(--violet); }
.admin-nav .group { margin: 10px 12px 4px; font-size: 12px; font-weight: 700; color: var(--dim); }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-tools .input, .admin-tools .select { min-height: 42px; width: auto; }
.table .actions { white-space: nowrap; display: flex; gap: 6px; }
.btn-mini {
  min-height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-mini:hover { border-color: var(--green); color: var(--green); }
.btn-mini--ok { border-color: rgba(var(--green-rgb), 0.6); color: var(--green); }
.btn-mini--no { border-color: rgba(255, 123, 123, 0.6); color: #FF7B7B; }
.cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.65); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { width: min(680px, 100%); background: var(--panel); border: 1px solid rgba(var(--green-rgb), 0.4); padding: 24px; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }

@media (max-width: 1000px) {
  .header-nav { display: none; }
}
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-nav .group { display: none; }
}
.cue-link {
  left: 0; right: 0; width: max-content; margin: 0 auto;
  padding: 6px 16px; background: rgba(3, 8, 6, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #F2F5F3; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.cue-link:hover { color: var(--green-light); }
html[data-theme="light"] .rank--1 { color: #B7791F; }
html[data-theme="light"] .rank--2 { color: #5E6B73; }
html[data-theme="light"] .rank--3 { color: #A0522D; }

.search-btn { width: 44px; }
.drawer-search {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 46px; padding: 0 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #A9B8B0; font: inherit; font-size: 14px; text-align: start;
}
.drawer-search:hover { border-color: rgba(var(--green-rgb), 0.5); color: #F2F5F3; }
.search-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search { width: min(640px, 100%); max-height: 78vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid rgba(var(--green-rgb), 0.45); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.search__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); color: var(--green); }
html[dir="rtl"] .search__bar { padding: 8px 16px 8px 10px; }
.search__input { flex: 1; min-width: 0; min-height: 48px; border: none; background: transparent; color: var(--ink); font: inherit; font-size: 17px; }
.search__input:focus { outline: none; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__results { overflow-y: auto; padding: 8px 0 12px; }
.search-group { padding: 6px 0; }
.search-group__h { display: block; padding: 4px 18px; font-size: 12px; font-weight: 700; color: var(--dim); }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--ink); }
.search-item small { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.search-item:hover, .search-item.is-active { background: rgba(var(--green-rgb), 0.12); color: var(--ink); }
.search-item.is-active { box-shadow: inset 3px 0 0 var(--green); }
html[dir="rtl"] .search-item.is-active { box-shadow: inset -3px 0 0 var(--green); }
.search-item__t { font-weight: 600; }
.search-avatar, .search-item .avatar-mini { width: 30px; height: 30px; object-fit: cover; flex: none; }
.search-hint { margin: 0; padding: 14px 18px; color: var(--muted); font-size: 14px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.file-field { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.file-preview { width: 84px; height: 84px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.file-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-empty { color: var(--dim); }
.file-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.file-field .hint { flex-basis: 100%; }

.player-link { color: inherit; font-weight: 600; border-bottom: 1px dashed rgba(var(--green-rgb), 0.5); }
.player-link:hover { color: var(--green); }
.copy-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px;
  border: 1px solid rgba(var(--green-rgb), 0.5); background: rgba(var(--green-rgb), 0.08);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.copy-chip b { font-family: var(--font-num); font-size: 19px; letter-spacing: 1px; color: var(--green); font-weight: 400; }
.copy-chip:hover { border-color: var(--green); }

@media (max-width: 700px) {
  .page-banner { min-height: 260px; padding: 96px 16px 30px; }
  .wrap { padding: 36px 16px 0; }
  .block { margin-top: 44px; }
  .h2 { font-size: 24px; }
  .t-hero__inner { padding: 22px; }
  .site-header { flex-wrap: nowrap; padding: 12px 14px; gap: 8px; }
  .header-start { gap: 10px; min-width: 0; }
  .brand-name { font-size: 20px; letter-spacing: 1px; white-space: nowrap; }
  .menu-btn { width: 42px; height: 42px; }
  .header-actions { gap: 6px; flex: none; }
  .header-actions .icon-btn { display: none; }
  .site-header .header-actions .notif .bell-btn, .site-header .header-actions .account-btn { display: inline-flex; }
  .header-actions .bell-btn { min-width: 40px; height: 40px; }
  .header-actions .btn-signup { display: none; }
  .header-actions .btn-login { height: 40px; padding: 0 12px; }
  .header-actions .account-btn span.account-name { display: none; }
  .header-actions .account-btn { padding: 0 4px; height: 40px; }
  .bracket { grid-auto-flow: row; grid-auto-columns: auto; }
  .profile-row { margin-top: -44px; padding: 0 16px 18px; }
  .profile-avatar { width: 88px; height: 98px; font-size: 34px; }
  .search-back { padding-top: 12px; }
  .search { max-height: 86vh; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 17px; }
}

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat--sm .stat__inner { padding: 16px 18px; }
.stat--sm .stat__value { font-size: 40px; }
.stat--sm .stat__label { font-size: 14px; }
button.stat { border: none; cursor: pointer; text-align: start; font: inherit; color: inherit; width: 100%; }
button.stat .stat__inner { height: 100%; }

.hof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hof-card .media-card__img { aspect-ratio: 1 / 1; }
.hof-empty { display: flex; align-items: center; justify-content: center; color: var(--green); }
.media-card__link { display: block; color: inherit; }

.members-tools { margin-bottom: 16px; }
.members-tools .input { max-width: 420px; }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.member-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-align: center; transition: border-color 0.15s ease; }
.member-card:hover { border-color: rgba(var(--green-rgb), 0.6); color: var(--ink); }
.member-card__pic, .member-card .avatar-mini { width: 64px; height: 64px; object-fit: cover; font-size: 24px; }
.member-card__name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card__id { font-family: var(--font-num); font-size: 16px; letter-spacing: 1px; color: var(--green); }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin-bottom: 20px; }
.podium__item { display: block; padding: 1px; background: rgba(var(--green-rgb), 0.45); color: var(--ink); }
.podium__item:hover { color: var(--ink); }
.podium__item--1 { background: rgba(255, 212, 92, 0.7); }
.podium__inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; background: var(--panel); text-align: center; }
.podium__item--1 .podium__inner { padding-top: 28px; padding-bottom: 26px; }
.podium__rank { font-family: var(--font-num); font-size: 34px; line-height: 1; }
.podium__pic, .podium__item .avatar-mini { width: 72px; height: 72px; object-fit: cover; font-size: 28px; }
.podium__item--1 .podium__pic, .podium__item--1 .avatar-mini { width: 92px; height: 92px; }
.podium__name { font-family: var(--font-head); font-weight: 800; font-size: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__pts { color: var(--muted); font-weight: 600; font-size: 14px; }
.table tr.is-mine { background: rgba(var(--green-rgb), 0.1); }

.inv-list { display: flex; flex-direction: column; gap: 16px; }
.inv-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.inv-players { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); }
.inv-player { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.inv-player:last-child { border-bottom: none; }
.inv-player__name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.inv-player__name svg { color: var(--green); }
.inv-player__side { display: inline-flex; align-items: center; gap: 10px; }
.inv-replace { list-style: none; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(var(--green-rgb), 0.05); }
.inv-note { margin: 0 0 12px; }
.inv-answer { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.member-add { display: flex; gap: 8px; max-width: 420px; }
.member-add .input { flex: 1; min-width: 0; text-transform: uppercase; }
.member-chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 12px; border: 1px solid rgba(var(--green-rgb), 0.5); background: rgba(var(--green-rgb), 0.08); font-size: 14px; }
html[dir="rtl"] .member-chip { padding: 2px 12px 2px 4px; }
.member-chip b { font-family: var(--font-num); font-weight: 400; font-size: 16px; letter-spacing: 1px; color: var(--green); }
.member-chip .icon-btn { height: 30px; min-width: 30px; border: none; }

.org-node { min-width: 0; text-align: start; }
.org-node__inner { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; }
html[dir="rtl"] .org-node__inner { padding: 12px 12px 12px 18px; }
.org-node__pic { width: 58px; height: 58px; flex: none; object-fit: cover; border-radius: 50%; border: 2px solid rgba(var(--green-rgb), 0.6); }
.org-node__pic--empty { display: flex; align-items: center; justify-content: center; background: rgba(var(--green-rgb), 0.15); color: var(--green); font-family: var(--font-head); font-weight: 800; font-size: 22px; }
.org-node--lead .org-node__pic { width: 72px; height: 72px; border-color: var(--green); }
.org-node__text { min-width: 0; }
.org-node__bio { font-size: 13px; color: var(--muted); max-width: 240px; }
.org-node--label .org-node__inner { justify-content: center; padding: 12px 26px; }
.org-node--label { text-align: center; }
.org-row .org-node { flex: 0 1 300px; display: flex; }
.org-row .org-node__inner { flex: 1; }

.rich { color: var(--muted-2); font-size: 17px; }
.rich > :first-child { margin-top: 0; }
.rich p { margin: 0 0 12px; }
.rich-h { margin: 28px 0 10px; font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink); scroll-margin-top: 20px; }
.rich-h3 { margin: 16px 0 6px; font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--green); }
.rich-list { margin: 0 0 12px; padding-inline-start: 22px; }
.rich-list li { margin-bottom: 6px; }
.rich-list li::marker { color: var(--green); }
.rich-note { margin: 10px 0 14px; }
.faq details { scroll-margin-top: 20px; }
.article-img { width: 100%; max-height: 420px; object-fit: cover; display: block; margin-bottom: 24px; }

.profile-row { margin-top: 0; padding: 0 24px 22px; align-items: flex-end; }
.profile-avatar { margin-top: -56px; flex: none; }
.profile-info { flex: 1; min-width: 200px; padding-top: 12px; }
.profile-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.profile-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-inline-end: 48px; }
.pw-toggle { position: absolute; top: 2px; inset-inline-end: 2px; height: 44px; min-width: 44px; border: none; color: var(--muted); }
.pw-box { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.pw-box summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--green); }

.admin-select { display: none; }
.admin-nav { gap: 4px; }
.admin-group { border-top: 1px solid var(--line); padding-top: 4px; }
.admin-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 800; color: var(--dim); }
.admin-group summary::-webkit-details-marker { display: none; }
.admin-group summary > span:first-child { flex: 1; }
.admin-group__chev { transition: transform 0.15s ease; }
.admin-group[open] .admin-group__chev { transform: rotate(180deg); }
.admin-group button { width: 100%; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.admin-warn { display: inline-block; margin-top: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: #B7791F; background: rgba(255, 196, 61, 0.14); border: 1px solid rgba(255, 196, 61, 0.45); }
.admin-players { display: flex; flex-wrap: wrap; gap: 6px; max-width: 230px; }
.admin-table .table .actions { flex-wrap: wrap; white-space: normal; min-width: 150px; }
.admin-player { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.admin-player .pill { font-size: 11px; padding: 0 8px; }
.img-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.img-slot .panel__inner { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.img-slot__frame { aspect-ratio: 16 / 7; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.img-slot__frame img { width: 100%; height: 100%; object-fit: cover; }
.img-slot__meta { display: flex; flex-direction: column; }
.slot-editor__frame { position: relative; cursor: crosshair; background: #000; --glow: #8EF03B; }
.slot-editor__frame img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.slot-editor__marks { position: absolute; inset: 0; pointer-events: none; }
.se-focus { position: absolute; width: 26px; height: 26px; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6); }
.se-focus::before, .se-focus::after { content: ""; position: absolute; background: #fff; }
.se-focus::before { left: 50%; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; }
.se-focus::after { top: 50%; left: -8px; right: -8px; height: 2px; margin-top: -1px; }
.se-point { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--glow); background: radial-gradient(closest-side, #fff, var(--glow) 45%, transparent); box-shadow: 0 0 16px var(--glow); pointer-events: auto; cursor: pointer; padding: 0; }

@media (max-width: 900px) {
  .admin-select { display: block; margin-bottom: 4px; }
  .admin-nav { display: none; }
}
@media (max-width: 700px) {
  .hof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat--sm .stat__value { font-size: 32px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-stats .stat__value { font-size: 32px; }
  .podium { gap: 8px; }
  .podium__inner { padding: 12px 6px; gap: 4px; }
  .podium__item--1 .podium__inner { padding-top: 18px; padding-bottom: 16px; }
  .podium__rank { font-size: 24px; }
  .podium__pic, .podium__item .avatar-mini { width: 52px; height: 52px; font-size: 20px; }
  .podium__item--1 .podium__pic, .podium__item--1 .avatar-mini { width: 64px; height: 64px; }
  .podium__name { font-size: 15px; }
  .podium__pts { font-size: 12px; }
  .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-node { width: 100%; }
  .org-row { flex-direction: column; align-items: stretch; }
  .org-row .org-node { flex: none; }
  .profile-row { flex-direction: column; align-items: flex-start; padding: 0 16px 18px; gap: 6px; margin-top: 0; }
  .profile-avatar { margin-top: -46px; }
  .profile-info { padding-top: 0; min-width: 0; width: 100%; }
  .profile-name { font-size: 26px; }
  .admin-table { background: transparent; border: none; overflow: visible; }
  .admin-table .table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; padding: 8px 4px; }
  .admin-table td { border: none; padding: 6px 12px; display: flex; gap: 10px; align-items: flex-start; }
  .admin-table td::before { content: attr(data-label); flex: 0 0 34%; font-size: 12px; font-weight: 700; color: var(--muted); }
  .admin-table td.td-actions::before { content: none; }
  .admin-table td.td-actions { padding-top: 10px; }
  .admin-table .cell-clip { max-width: none; white-space: normal; }
  .admin-tools { width: 100%; }
  .admin-tools .input { flex: 1; }
}

.pick-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.pick-field legend { padding: 0; margin-bottom: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px; }
.pick-grid--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick__img { display: block; width: 100%; aspect-ratio: 76 / 84; padding: 3px; background: transparent; transition: background 0.15s; }
.pick-grid--wide .pick__img { aspect-ratio: 16 / 6; }
.pick__in {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; object-fit: cover;
  background: #12241B; color: var(--green); font-family: var(--font-head); font-size: 28px; font-weight: 800;
  opacity: 0.7; transition: opacity 0.15s;
}
.pick-grid--wide .pick__in { font-size: 14px; font-weight: 700; color: var(--soft); background: linear-gradient(120deg, #0D1A14, #1B3A12); }
.pick:hover .pick__in { opacity: 1; }
.pick:has(input:checked) .pick__img { background: var(--green); }
.pick:has(input:checked) .pick__in { opacity: 1; }
.pick:has(input:checked)::after {
  content: "\2713"; position: absolute; top: -4px; inset-inline-end: -4px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--on-green); font-size: 13px; font-weight: 800;
}
.pick:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 4px; }
.cell-thumb { width: 64px; height: 40px; object-fit: cover; display: block; border: 1px solid var(--line); }
.cell-thumb--lg { width: 120px; height: 56px; }
@media (max-width: 700px) {
  .pick-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .pick-grid--wide { grid-template-columns: repeat(2, 1fr); }
}
