@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700;1,800;1,900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg:#101113;
  --surface:#151619;
  --raised:#1a1b1e;
  --field:#16171a;
  --line:#34353a;
  --line-light:#505158;
  --text:#f6f6f7;
  --muted:#b6b6bd;
  --red:#df2349;
  --red-dark:#a31432;
  --green:#a2e69d;
  --amber:#ffd083;
  --display:"Barlow Condensed","Arial Narrow",Impact,sans-serif;
  --sans:Inter,"Segoe UI",Arial,sans-serif;
  --gutter:clamp(16px,3.1vw,50px);
}
* { box-sizing:border-box; }
html { scroll-padding-top:12px; }
body { margin:0; background:var(--bg); color:var(--text); font:1rem/1.55 var(--sans); }
button,input,textarea,select { font:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
button { color:inherit; }
a { color:inherit; text-decoration:none; }
h1,h2,h3,p { margin:0; }
img { max-width:100%; vertical-align:middle; }
:focus-visible { outline:2px solid #ff6682; outline-offset:4px; }
::selection { color:#fff; background:#a31635; }
[hidden] { display:none !important; }
small { font-size:.85rem; }
.icon { width:1.19em; height:1.19em; flex:none; vertical-align:-.17em; }
.frame { width:min(calc(100% - var(--gutter) * 2),1500px); margin-inline:auto; }
.skip { position:absolute; top:8px; left:12px; transform:translateY(-150%); padding:9px 14px; background:var(--red); z-index:10; }
.skip:focus { transform:none; }
.topbar { border-bottom:1px solid #4b4b50; background:#121315; }
.public-header,.admin-header { display:flex; min-height:74px; align-items:center; justify-content:space-between; gap:22px; }
.public-header {
  --header-pad:clamp(0px,2vw,25px);
  --account-edge:calc(max(var(--gutter),(100vw - 1500px) / 2) + var(--header-pad));
  padding-inline:var(--header-pad);
}
.brand { display:inline-flex; align-items:center; gap:16px; min-width:0; }
.brand img { width:60px; height:60px; object-fit:contain; aspect-ratio:1; flex:none; }
.brand[data-logo-only] img { width:auto; max-width:min(25vw,220px); aspect-ratio:auto; }
[data-header-preview] { display:block; width:auto; height:60px; max-width:220px; object-fit:contain; object-position:left center; }
[data-header-form] [hidden] { display:none; }
.brand span { border-left:1px solid #747478; padding-left:16px; color:#f1f1f3; font:italic 800 clamp(1.18rem,2.4vw,2.12rem)/1 var(--display); letter-spacing:.02em; overflow-wrap:anywhere; }
.brand em { color:var(--red); font-style:inherit; }
.public-nav { display:flex; align-self:stretch; align-items:stretch; justify-content:center; gap:clamp(14px,4vw,65px); }
.public-nav a { font-size:.99rem; position:relative; display:grid; place-items:center; white-space:nowrap; padding-inline:6px; font-weight:700; color:#f3f3f4; }
.public-nav a:hover,.public-nav a[aria-current="page"] { color:#fff; }
.public-nav a[aria-current="page"]::after { content:""; position:absolute; bottom:13px; height:2px; left:0; right:0; background:var(--red); }
.public-nav a:hover:not([aria-current]) { color:#ff8ca0; }
.button { display:inline-flex; justify-content:center; align-items:center; gap:9px; min-height:43px; max-width:100%; padding:8px 17px; border:1px solid transparent; border-radius:6px; line-height:1.21; font-weight:700; font-size:.935rem; cursor:pointer; color:var(--text); background:#222326; white-space:nowrap; transition:background .16s,border-color .16s,color .16s; }
.button.primary { background:linear-gradient(180deg,#d82245,#aa1636); border-color:#e03355; color:#fff; }
.button.primary:hover { background:linear-gradient(180deg,#ec3658,#b92442); }
.button.secondary { background:#1b1c1e; border-color:#6d6d74; color:#f3f3f5; }
.button.secondary:hover,.button.secondary.selected { background:#292329; border-color:#d7546e; }
.button.positive { background:#18291d; border-color:#487753; color:#b0edab; }
.button.positive:hover { background:#233d2b; }
.button.negative { background:#251a1e; border-color:#78404f; color:#ffabb9; }
.button.negative:hover { background:#472630; }
.button.compact { min-height:34px; font-size:.82rem; padding:6px 10px; }
.button.angled { border-radius:0; clip-path:polygon(7% 0,100% 0,93% 100%,0 100%); padding-inline:27px; }
.button.angled:focus-visible { outline-offset:-4px; outline-color:white; }
.button.loading { cursor:progress; opacity:.72; }
.button.loading::after { content:""; width:.9em; height:.9em; border:2px solid currentColor; border-inline-start-color:transparent; border-radius:50%; animation:spin .65s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.header-login { min-width:108px; }
.header-tools .guest-login { background:transparent; padding-inline:9px; }
.header-tools .guest-login:hover { color:#ff9caf; }
.header-tools .header-signup { padding-inline:16px; }
.header-tools,.admin-account { --panel-width:clamp(180px,17vw,218px); }
.player-menu {
  --panel-gap:14px;
  position:relative; flex:none;
}
.player-menu > summary { display:block; border-radius:50%; cursor:pointer; list-style:none; }
.player-menu > summary::-webkit-details-marker { display:none; }
.player-avatar {
  position:relative; display:grid; place-items:center; overflow:hidden;
  width:44px; height:44px; border:1px solid #646067; border-radius:50%;
  background:#30212a; color:#ffe8ed; font:700 1rem/1 var(--sans);
}
.player-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.player-avatar:has(> img:not([hidden])) > :is(bdi,.icon) { visibility:hidden; }
.player-menu[open] .player-avatar,.player-menu > summary:hover .player-avatar { border-color:#ef647f; }
.topbar:has(.player-menu) { position:relative; z-index:20; }
.player-menu[open]::after {
  content:""; position:absolute; left:calc(50% - var(--panel-width) / 2); top:100%;
  width:var(--panel-width); height:var(--panel-gap);
  clip-path:polygon(calc(50% - 22px) 0,calc(50% + 22px) 0,100% 100%,0 100%);
}
.player-menu-panel {
  position:absolute; z-index:40; left:calc(50% - var(--panel-width) / 2);
  top:calc(100% + var(--panel-gap)); width:var(--panel-width);
  padding:5px; border:1px solid #444147; border-radius:9px; background:#1a191d;
  box-shadow:0 10px 28px #0008; text-align:start; transform-origin:50% 0;
}
.player-menu-panel::before {
  content:""; position:absolute; left:50%; top:0; width:9px; height:9px;
  background:inherit; border-top:1px solid #444147; border-left:1px solid #444147;
  transform:translate(-50%,-55%) rotate(45deg);
}
.player-menu:not([open]) .player-menu-panel { pointer-events:none; }
.player-menu-name {
  display:block; overflow-wrap:anywhere; margin:0 5px 3px; padding:8px 6px 9px;
  border-bottom:1px solid var(--line); font-size:.9rem;
}
.player-menu-panel a,.player-menu-panel button {
  display:flex; align-items:center; gap:11px; width:100%; padding:10px;
  min-height:42px; border:0; border-radius:5px; background:transparent; color:var(--text);
  font:600 .88rem/1.3 var(--sans); text-align:start; cursor:pointer;
}
.player-menu-panel .icon { width:17px; height:17px; color:#bcb7bf; }
.player-menu-panel :is(a,button):is(:hover,:focus-visible) { background:#302c32; }
.player-menu-panel :is(a,button):focus-visible { outline-offset:-2px; }
.player-menu-panel form { margin:3px 0 0; padding-top:4px; border-top:1px solid var(--line); }
.player-menu-panel form :is(button,.icon) { color:#ff9bb0; }
[dir="rtl"] :is(.public-header,.admin-header) { direction:ltr; }
[dir="rtl"] .topbar :is(.public-nav,.player-menu-panel,.language-menu form) { direction:rtl; }
@media (prefers-reduced-motion:no-preference) {
  .player-menu:not([open])::details-content { transition:content-visibility 180ms allow-discrete; }
  .player-menu-panel {
    opacity:0; transform:translateY(-7px) scale(.975);
    transition:opacity 150ms ease,transform 180ms cubic-bezier(.2,.75,.25,1);
  }
  .player-menu[open] .player-menu-panel { opacity:1; transform:none; }
  @starting-style {
    .player-menu[open] .player-menu-panel { opacity:0; transform:translateY(-7px) scale(.975); }
  }
  .player-avatar { transition:border-color 180ms,box-shadow 180ms; }
  .player-menu[open] .player-avatar { box-shadow:0 0 0 3px #df234921; }
  .player-menu-panel :is(a,button) { transition:background-color 140ms ease; }
  .player-menu-panel .icon { transition:transform 160ms ease,color 160ms ease; }
  .player-menu-panel :is(a,button):is(:hover,:focus-visible) .icon { transform:translateX(2px); color:#ffb4c1; }
  [dir="rtl"] .player-menu-panel :is(a,button):is(:hover,:focus-visible) .icon { transform:translateX(-2px); }
  .player-menu[open] .player-menu-panel > :is(a,form) {
    animation:account-item-in 150ms ease-out backwards; animation-delay:var(--item-delay,0ms);
  }
  .player-menu-panel > a:nth-of-type(2) { --item-delay:20ms; }
  .player-menu-panel > a:nth-of-type(3) { --item-delay:40ms; }
  .player-menu-panel > a:nth-of-type(4) { --item-delay:55ms; }
  .player-menu-panel > form { --item-delay:65ms; }
  @keyframes account-item-in { from { opacity:.15; translate:0 -3px; } to { opacity:1; translate:0 0; } }
}
.text-link { color:#ff8da4; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.site-footer { border-top:1px solid var(--line); background:#111214; color:var(--muted); }
.footer-inner { display:flex; align-items:center; justify-content:space-between; min-height:78px; gap:14px; padding-block:14px; }
.footer-inner strong { display:block; color:#e6e6e8; font-size:.82rem; }
.footer-inner small { display:block; font-size:.8rem; }
.footer-inner nav { display:flex; gap:clamp(12px,2.8vw,42px); font-size:.91rem; }
.footer-inner nav a:hover { color:#fff; }

.hero { isolation:isolate; position:relative; overflow:hidden; background:linear-gradient(110deg,#141518 19%,#282332 75%,#121315); }
.hero-character { position:absolute; z-index:-1; inset:0 0 0 23%; background:
 linear-gradient(90deg,#131416 0%,#131416a0 18%,#18141e05 38%,#11121528 64%,#10111380 100%),
 linear-gradient(0deg,#14121872,transparent 34%),
 url('/art/duelist.jpg') 54% 26% / cover no-repeat; }
.hero-inner { position:relative; min-height:clamp(420px,29.6vw,540px); display:flex; align-items:center; justify-content:space-between; gap:18px; }
.hero-copy { margin:30px 0 30px 1%; padding-left:31px; position:relative; z-index:1; }
.hero-copy::before { content:""; position:absolute; left:4px; width:7px; height:69%; top:3%; transform:skewX(-15deg); background:linear-gradient(var(--red),#9d1331); }
.hero h1 { font:italic 900 clamp(4.55rem,7.25vw,8.15rem)/.81 var(--display); color:#fff; letter-spacing:-.028em; text-transform:uppercase; text-shadow:0 5px 20px #0009; }
.hero h1 span { display:block; }
.hero h1 span:nth-child(2) { font-size:.63em; letter-spacing:.008em; margin-top:10px; }
.hero h1 .custom-hero { font-size:.73em; line-height:.96; overflow-wrap:anywhere; max-width:19ch; }
.hero-kicker { display:flex; gap:12px; align-items:center; margin:17px 0 23px; color:#dddce2; font:italic 800 clamp(1rem,2vw,1.5rem)/1.15 var(--display); letter-spacing:.22em; }
.hero-kicker::before,.hero-kicker::after { content:""; height:1px; flex:0 1 41px; background:#b6b5bc; }
.hero-actions { display:flex; gap:13px; }
.hero-actions .button { font-size:clamp(1rem,1.6vw,1.28rem); min-height:51px; }
.hero-actions .secondary { background:#151619cf; }
.hero-logo { width:clamp(208px,25.2vw,380px); height:auto; aspect-ratio:1; object-fit:contain; margin-right:1%; z-index:1; filter:drop-shadow(0 8px 17px #0006); }
.feature-strip { background:#17181b; border-block:1px solid #3a3a41; }
.feature-inner { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:13px 0; }
.feature-inner > * { display:flex; align-items:center; min-height:47px; gap:clamp(8px,1.5vw,22px); padding:0 clamp(9px,2vw,30px); }
.feature-inner > * + * { border-left:1px solid #4b4b51; }
.feature-inner .icon { color:var(--red); width:34px; height:34px; }
.feature-inner strong { display:block; color:#f5f5f6; text-transform:uppercase; font:800 clamp(1.08rem,2vw,1.53rem)/1.06 var(--display); letter-spacing:.04em; }
.feature-inner small { display:block; margin-top:4px; font-size:.79rem; color:#cbcad1; }
.feature-inner a:hover strong { color:#ff8ca0; }
.home-events { display:grid; grid-template-columns:1fr 1fr 1.14fr; gap:18px; padding-block:19px 22px; }
.event-card { position:relative; min-width:0; overflow:hidden; min-height:213px; isolation:isolate; padding:17px 20px 20px; background:#191a1d; border-block:1px solid var(--line); }
.event-card.open::before,.event-card.girls::before { content:""; position:absolute; inset:0; z-index:-1; background:
 linear-gradient(90deg,#151618 7%,#151618cc 46%,#14151832 100%),
 url('/art/arena.jpg') right 43% / cover no-repeat; opacity:.94; }
.event-card.girls::before { background:
 linear-gradient(90deg,#141518 9%,#141518b8 49%,#1415182b 100%),
 url('/art/girls.jpg') right 25% / cover no-repeat; }
.event-icon { color:#ef3657; width:27px; height:27px; }
.event-card h2,.event-card h3 { font:800 clamp(1.55rem,2.7vw,2.08rem)/1.04 var(--display); margin:6px 0 5px; text-transform:uppercase; letter-spacing:.03em; }
.event-card > p { color:#dfdee1; max-width:38ch; font-size:.91rem; margin-bottom:13px; }
.event-meta { display:flex; gap:6px 11px; align-items:center; flex-wrap:wrap; font-size:.82rem; color:#dfdee2; }
.event-meta > span:last-child { display:inline-flex; gap:5px; align-items:center; }
.event-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:14px; }
.event-actions .button.angled { min-height:39px; font-size:.87rem; }
.preview-panel { padding:13px 15px 12px; background:#16171a; border-block:1px solid var(--line); }
.preview-panel h2 { display:flex; gap:9px; align-items:center; padding-bottom:7px; border-bottom:1px solid #32343a; text-transform:uppercase; font:800 1.26rem/1.07 var(--display); letter-spacing:.045em; }
.preview-panel h2 .icon { color:var(--red); }
.preview-label { display:flex; justify-content:space-between; gap:8px; margin:7px 0; color:var(--muted); font-size:.78rem; }
.preview-label b { color:var(--text); }
.mini-bracket { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.8fr) minmax(0,.78fr); align-items:center; gap:17px; min-height:95px; }
.mini-bracket > div { position:relative; min-width:0; }
.mini-start,.mini-second { display:grid; gap:4px; }
.mini-start span,.mini-second span { border:1px solid #47464e; background:#202124; border-radius:3px; padding:0 4px; min-height:19px; font-size:.71rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mini-start span:nth-child(3) { margin-top:5px; }
.mini-start span b { color:#ed3356; }
.mini-start::after,.mini-second::after { position:absolute; content:""; left:100%; top:50%; width:17px; border-top:1px solid #6b6a73; }
.mini-second { gap:19px; }
.mini-final { display:grid; justify-items:center; color:#f4f3f5; gap:4px; padding:6px 3px; background:#26171d; border:1px solid #743244; border-radius:4px; text-transform:uppercase; font:800 .85rem/1 var(--display); overflow-wrap:anywhere; text-align:center; }
.mini-final .icon { color:var(--red); width:28px; height:28px; }
.preview-link { display:flex; justify-content:flex-end; align-items:center; gap:5px; margin-top:6px; font-size:.76rem; }
.join-banner { border-top:1px solid #44454a; padding:13px 0 16px; background:#17181a; }
.steps { display:grid; grid-template-columns:.94fr repeat(3,minmax(0,1fr)); gap:13px; align-items:center; }
.steps h2 { display:flex; align-items:center; gap:10px; font:italic 800 1.37rem/1.05 var(--display); text-transform:uppercase; }
.steps h2 i { color:var(--red); font-size:1.7em; }
.step { display:flex; align-items:center; gap:9px; min-width:0; }
.step:hover strong { color:#ff99ad; }
.step-number { padding:3px 6px; border:1px solid #7d2b3c; color:#ff6581; font:800 1.35rem/1 var(--display); border-radius:4px; }
.step strong,.step small { display:block; }
.step strong { font-size:.95rem; }
.step small { color:var(--muted); font-size:.76rem; }
.step > .icon { width:23px; height:23px; }

.content-page { min-height:calc(100vh - 160px); padding-block:clamp(26px,4vw,56px); }
.narrow { max-width:850px; }
.page-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 20px; margin:0 0 23px; }
.page-head h1 { font:800 clamp(2.3rem,3.8vw,3.1rem)/.98 var(--display); letter-spacing:.008em; margin:0 0 5px; }
.page-head p { color:#d2d1d6; }
.panel { padding:clamp(14px,2vw,25px); background:#17181a; border-top:1px solid #45464c; border-bottom:1px solid #2d2e32; min-width:0; }
.panel + .panel { margin-top:15px; }
.slash-heading { display:flex; align-items:center; gap:9px; font:800 clamp(1.42rem,2vw,1.76rem)/1.06 var(--display); letter-spacing:.013em; margin:0 0 13px; }
.slash-heading::before { content:""; background:var(--red); width:5px; height:1.13em; transform:skewX(-14deg); flex:none; }
.empty { background:#1b1c1f; border-left:2px solid #5f5f66; padding:15px 16px; color:#eeedf1; }
.empty p { color:var(--muted); font-size:.9rem; margin-top:3px; }
.empty a { margin-top:10px; }
.hint { color:var(--muted); font-size:.92rem; margin:8px 0; }
.muted { color:var(--muted); }
.event-grid,.tournament-overview,.account-grid,.review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; align-items:start; margin-bottom:16px; }
.event-grid .event-card,.tournament-overview .event-card { min-height:245px; }
.account-grid .panel + .panel { margin-top:0; }
.account-grid + .panel { margin-top:0; }
.event-info,.info-list { margin:11px 0; padding:0; }
.event-info div,.info-list div { display:flex; justify-content:space-between; align-items:baseline; gap:9px; border-bottom:1px solid #37383d; padding:6px 0; }
.event-info dt,.info-list dt { color:var(--muted); font-size:.89rem; }
.event-info dd,.info-list dd { color:var(--text); text-align:right; margin:0; font-weight:600; }
.info-list dd small { display:block; color:var(--muted); font-weight:400; }
.breadcrumb { color:var(--muted); font-size:.9rem; margin-bottom:15px; }
.breadcrumb a { color:var(--text); text-decoration:underline; text-underline-offset:3px; }
.multiline { white-space:pre-line; margin:5px 0 13px; color:#dedee2; }
.rules-list { padding-left:20px; color:#dedee2; }
.rules-list li + li { margin-top:7px; }
.form-stack { display:grid; gap:12px; align-items:start; text-align:left; }
.form-stack > .button { justify-self:start; }
.settings-fields { display:grid; gap:12px; min-width:0; margin:0; padding:0 0 16px; border:0; border-bottom:1px solid var(--line); }
.settings-fields > legend { padding:0 0 10px; font-weight:750; font-size:1.08rem; }
.settings-fields .info-list { margin:0; }
.field { display:grid; font-size:.91rem; font-weight:600; gap:5px; min-width:0; }
.field > small { color:var(--muted); font-weight:400; }
.input { color:#f5f5f6; background:var(--field); border:1px solid #575960; border-radius:5px; width:100%; min-width:0; min-height:43px; padding:8px 11px; }
.input::placeholder { color:#92939b; }
.input:focus { outline:2px solid #ec607a; outline-offset:1px; }
.input:read-only { color:#c1c1c6; }
.input:disabled { opacity:.65; }
textarea.input { resize:vertical; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 15px; }
.form-actions,.table-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px 9px; }
.check { display:flex; align-items:center; gap:7px; font-size:.91rem; color:#e3e2e7; }
.check input { width:17px; height:17px; margin:0; accent-color:var(--red); }
.filter-bar { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin-bottom:14px; }
.filter-bar .field { min-width:min(175px,100%); }
.notice { display:flex; align-items:center; gap:10px; padding:9px 12px; border-left:2px solid #bd8bf0; background:#211b2a; font-size:.88rem; color:#e9dafa; }
.notice > span { flex:1; }
.flash { display:flex; align-items:center; gap:8px; width:min(calc(100% - var(--gutter) * 2),1500px); margin:12px auto 0; padding:9px 13px; font-size:.91rem; border-left:3px solid #7acc84; color:#cdf2cb; background:#1b3021; }
.flash.error { border-color:#f57990; color:#ffced7; background:#351d27; }
.flash + .content-page { padding-top:25px; }

.auth-layout { display:grid; grid-template-columns:minmax(0,1.31fr) minmax(0,.89fr); min-height:calc(100svh - 154px); }
.auth-art { position:relative; overflow:hidden; min-height:540px; background:#19171e; }
.auth-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:51% 32%; }
#account-art img { max-width:100%; height:auto; }

.auth-section { display:grid; place-items:center; padding:clamp(18px,3.4vw,58px) clamp(18px,4vw,75px); background:linear-gradient(145deg,#17181a,#111214 85%); }
.auth-form-wrap { width:min(100%,490px); text-align:center; }
.auth-logo { width:126px; height:126px; object-fit:contain; }
.auth-form-wrap h1 { font:italic 800 clamp(2.05rem,3.5vw,3rem)/1.03 var(--display); margin:3px 0 7px; }
.auth-intro { color:#d5d5da; margin-bottom:16px; }
.auth-intro bdi { overflow-wrap:anywhere; font-weight:600; }
.signup-code-form { gap:7px; }
.signup-code-form .input { min-height:52px; font-size:1.5rem; font-variant-numeric:tabular-nums; letter-spacing:.24em; }
.signup-code-form .hint { margin:0 0 6px; }
.signup-resend-form { margin-top:14px; }
.signup-resend-form .button { width:100%; min-height:44px; }
.auth-form .button,.oauth-form .button { width:100%; min-height:44px; font-size:1.03rem; }
.auth-options { display:flex; justify-content:space-between; gap:10px; text-align:left; }
.auth-options a,.auth-switch a { color:#ff6482; font-size:.91rem; font-weight:700; }
.auth-options a:hover,.auth-switch a:hover { text-decoration:underline; }
.auth-switch { color:var(--muted); margin-top:14px; font-size:.94rem; }
.auth-divider { display:flex; align-items:center; margin:13px 0; gap:12px; color:var(--muted); font-size:.86rem; }
.auth-divider::before,.auth-divider::after { content:""; flex:1; height:1px; background:#4e4e55; }
.password-field,.input-icon { position:relative; }
.password-field > .icon,.input-icon > .icon { position:absolute; top:13px; left:11px; color:#cbcad0; pointer-events:none; }
.password-field .input,.input-icon .input { padding-left:39px; }
.password-field .input { padding-right:43px; }
.password-toggle { position:absolute; right:4px; top:4px; width:36px; height:35px; border:0; border-radius:4px; background:transparent; color:#dddde2; cursor:pointer; }
.password-toggle:hover { background:#292a2d; }

.admin-header { --account-edge:clamp(16px,2.7vw,42px); padding-inline:var(--account-edge); min-height:67px; }
.admin-account,.account-link,.view-site { display:flex; align-items:center; gap:10px; }
.admin-account { gap:22px; }
.view-site { color:#f0eff2; font-weight:600; }
.account-link { border-left:1px solid #525359; padding-left:19px; font-weight:700; }
.account-link > .icon { width:30px; height:30px; border:1px solid #75767d; border-radius:50%; padding:4px; }
.account-link small { display:block; font-weight:400; color:var(--muted); line-height:1.1; }
.admin-layout { display:grid; grid-template-columns:minmax(180px,232px) minmax(0,1fr); min-height:calc(100svh - 145px); }
.admin-side { background:linear-gradient(145deg,#151618,#101113); padding:22px 9px 14px; border-right:1px solid #36373c; display:flex; flex-direction:column; justify-content:space-between; gap:19px; }
.admin-side nav { display:grid; gap:5px; }
.admin-side a,.side-logout { display:flex; align-items:center; gap:11px; padding:11px 12px; min-height:44px; font-weight:600; font-size:.94rem; border-left:3px solid transparent; border-radius:5px; white-space:nowrap; }
.admin-side a:hover { background:#252329; }
.admin-side a[aria-current="page"] { border-color:var(--red); background:#481a28; }
.admin-side a .icon { width:21px; height:21px; }
.admin-side .count { margin-left:auto; padding:0 6px; background:var(--red-dark); border-radius:15px; font-size:.76rem; }
.admin-side form { border-top:1px solid var(--line); }
.side-logout { background:transparent; border:0; cursor:pointer; width:100%; }
.side-logout .icon { color:var(--red); }
.admin-main { min-width:0; padding:clamp(15px,2vw,31px); }
.admin-main .flash { margin:0 0 13px; width:100%; }
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin:0 0 16px; }
.stat { min-width:0; position:relative; display:flex; gap:11px; align-items:center; padding:12px 9px 12px 13px; border-block:1px solid #47484d; background:linear-gradient(126deg,#212123,#17181a 74%); overflow:hidden; min-height:84px; }
.stat::after { content:""; width:6px; height:28px; background:#c82546; position:absolute; right:8px; bottom:-3px; transform:skew(-21deg); }
.stat-icon { display:grid; place-items:center; width:43px; height:43px; color:#f7eaf0; background:#322026; border-radius:6px; flex:none; }
.stat-icon .icon { width:25px; height:25px; }
.stat div { padding-left:9px; border-left:1px solid #626067; min-width:0; }
.stat small,.stat b { display:block; }
.stat small { font-size:clamp(.74rem,1.05vw,.9rem); font-weight:700; }
.stat b { font:800 2.4rem/1 var(--display); letter-spacing:.02em; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.62fr) minmax(0,1fr); gap:15px; align-items:stretch; }
.dashboard-grid .panel { margin:0; }
.table-wrap { max-width:100%; overflow:auto; scrollbar-color:#57575f #222326; }
table { width:100%; border-collapse:collapse; white-space:nowrap; text-align:left; font-size:.875rem; }
th,td { padding:8px 9px; border-bottom:1px solid #3d3e43; }
th { color:#e4e4e8; background:#252629; font-size:.8rem; font-weight:700; }
td { color:#ecebf0; }
td small { color:var(--muted); }
td:nth-child(1) { min-width:66px; }
tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:#202124; }
.cell-name { display:flex; align-items:center; gap:6px; font-weight:700; }
.badge { display:inline-flex; justify-content:center; align-items:center; gap:5px; max-width:100%; padding:3px 7px; color:#e1e1e4; border:1px solid #57585e; background:#222326; border-radius:5px; font-size:.76rem; font-weight:700; line-height:1.28; white-space:nowrap; }
.badge.green { border-color:#3f7345; background:#192c1e; color:var(--green); }
.badge.amber { border-color:#795a27; background:#33281a; color:var(--amber); }
.badge.red { border-color:#75414e; background:#35202b; color:#ff9bad; }
.badge.muted { color:var(--muted); }
.badge .icon { width:1.1em; height:1.1em; }
.color-green { color:var(--green); }
.tournament-control { display:grid; gap:8px; }
.tournament-row { display:grid; grid-template-columns:67px minmax(0,1fr) auto; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid #3a3b40; }
.tournament-row:last-child { border-bottom:0; }
.tournament-row h3 { font:800 1.36rem/1 var(--display); }
.tournament-row p { display:flex; align-items:center; gap:6px; color:#e5e4e9; margin:2px 0; font-size:.85rem; }
.tournament-row small { font-size:.79rem; }
.tournament-thumb { width:67px; height:60px; background:#211a2c url('/art/duelist.jpg') 59% 12% / 173% auto no-repeat; }
.tournament-thumb.girls { background-image:url('/art/girls.jpg'); background-position:92% 18%; }
.tournament-thumb img { display:block; width:100%; height:100%; object-fit:cover; object-position:72% center; }
.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick-actions .button { min-height:46px; white-space:normal; }
.role-form { min-width:220px; padding:7px 0; }
.permission-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
fieldset { min-width:0; border:1px solid #45464b; color:var(--muted); padding:8px; margin:0; }
legend { padding-inline:6px; }
details > summary { cursor:pointer; color:#f7e0e8; }
.match-schedule { border-top:1px solid var(--line); padding-top:12px; margin-top:13px; }
#edit-match > .inline-form { margin-top:12px; }

.tabs { display:flex; gap:7px; flex-wrap:wrap; margin:0 0 14px; }
.bracket-side { margin:15px 0; }
.bracket-scroll { overflow:auto; min-width:0; background:radial-gradient(#4848567a 0.7px,transparent 0.7px) 0 0/17px 17px,#151619; scrollbar-color:#686873 #25262a; border-top:1px solid var(--line); }
.bracket-columns { display:flex; gap:22px; width:max-content; min-width:100%; padding:11px 12px 14px; }
.bracket-column { display:flex; flex-direction:column; flex:1 0 180px; width:clamp(180px,18vw,225px); }
.bracket-column h3 { margin-bottom:8px; color:#e4e3e8; font:700 1.18rem/1.05 var(--display); border-bottom:1px solid #4b4c53; padding:4px 0 7px; }
.bracket-track { height:100%; display:flex; flex-direction:column; justify-content:space-around; gap:10px; }
.match-card { position:relative; background:#202125; border:1px solid #505057; border-radius:4px; margin:0; min-width:0; }
.upper .bracket-column:not(:last-child) .match-card::after { position:absolute; content:""; border-top:1px solid #777780; left:100%; width:12px; top:50%; }
.upper .bracket-column:not(:first-child) .match-card::before { position:absolute; content:""; border-top:1px solid #777780; right:100%; width:11px; top:50%; }
.match-top,.match-slot,.match-time { display:flex; align-items:center; justify-content:space-between; padding:4px 7px; gap:6px; font-size:.82rem; }
.match-top { color:var(--muted); }
.match-slot { border-top:1px solid #46454b; font-weight:600; }
.match-slot bdi { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.match-slot > span { min-width:0; display:flex; align-items:center; gap:4px; }
.match-slot small { min-width:16px; text-align:center; border-radius:3px; background:#35353a; font-size:.7rem; color:#c7c6ce; }
.match-slot.winner { background:#1d3427; color:#b8edc0; }
.match-slot b { font-variant-numeric:tabular-nums; }
.match-time { font-size:.73rem; color:var(--muted); border-top:1px solid #474750; flex-wrap:wrap; }
.match-edit { display:flex; justify-content:space-between; color:#ff8da4; padding:4px 7px; font-size:.75rem; border-top:1px solid #474750; }
.champion { display:flex; align-items:center; gap:13px; background:#2b2222; padding:12px 13px; color:#ffdfad; border-left:3px solid #cba570; }
.champion .icon { width:28px; height:28px; }
.champion strong,.champion small { display:block; }
.champion strong { font:800 1.65rem/1.1 var(--display); }

@media (max-width:1120px) {
  .public-header { gap:13px; --header-pad:0px; }
  .public-nav { gap:clamp(12px,2.8vw,33px); }
  .hero-inner { min-height:400px; }
  .home-events { gap:11px; }
  .event-card { padding-inline:13px; }
  .admin-layout { grid-template-columns:minmax(165px,193px) minmax(0,1fr); }
  .admin-side a { padding-inline:8px; font-size:.87rem; gap:8px; }
  .dashboard-grid { grid-template-columns:minmax(0,1.38fr) minmax(0,1fr); gap:11px; }
  .dashboard-grid .panel { padding:11px; }
  .topbar .public-header { display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:0; column-gap:15px; row-gap:0; }
  .public-header .brand { grid-column:1; grid-row:1; }
  .public-header .header-login { grid-column:2; grid-row:1; }
  .public-nav { grid-column:span 2; grid-row:2; justify-content:space-between; min-height:40px; gap:5px; border-top:1px solid #33343a; }
  .public-nav a[aria-current="page"]::after { bottom:1px; }
}
@media (max-width:900px) {
  .hero-copy { margin-left:0; padding-left:22px; }
  .hero-copy::before { width:5px; left:1px; }
  .hero-logo { margin-right:0; width:clamp(146px,24vw,215px); }
  .feature-inner { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; }
  .feature-inner > * { min-height:61px; }
  .feature-inner > :nth-child(3) { border-left:0; }
  .feature-inner > :nth-child(n+3) { border-top:1px solid var(--line); }
  .home-events { grid-template-columns:1fr 1fr; }
  .preview-panel { grid-column:span 2; }
  .steps { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .steps h2 { grid-column:span 3; }
  .auth-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .auth-art { padding-left:18px; }
  .auth-section { padding-inline:18px; }
  .admin-layout { display:block; }
  .admin-side { padding:0 var(--gutter); flex-direction:row; gap:7px; align-items:center; border-bottom:1px solid var(--line); }
  .admin-side nav { display:flex; overflow:auto; margin-right:auto; scrollbar-width:thin; }
  .admin-side a { border-left:0; border-bottom:2px solid transparent; min-height:43px; border-radius:0; }
  .admin-side form { border:none; }
  .side-logout { font-size:.8rem; padding-inline:6px; }
  .admin-main { padding:20px var(--gutter); }
}
@media (max-width:650px) {
  .header-tools .guest-login,.header-tools .header-signup { min-height:40px; font-size:.82rem; padding-inline:7px; }
  .topbar .public-header { column-gap:7px; }
  .brand img { width:47px; height:47px; }
  .brand { gap:7px; }
  .brand span { padding-left:7px; font-size:1.14rem; }
  .header-login { min-width:0; min-height:33px; padding:5px 9px; font-size:.8rem; }
  .public-nav a { font-size:.86rem; }
  .hero-inner { min-height:385px; align-items:end; }
  .hero-character { left:0; background-position:center, center, 56% 18%; background-image:
    linear-gradient(90deg,#121315ed 0%,#12131569 52%,#11121530 100%),
    linear-gradient(0deg,#111214 0%,#13141569 44%,transparent 72%),url('/art/duelist.jpg'); }
  .hero-copy { margin:0 0 21px; padding-left:12px; }
  .hero-copy::before { left:-1px; width:3px; height:56%; }
  .hero h1 { font-size:clamp(3.6rem,11.9vw,5.05rem); }
  .hero h1 span:nth-child(2) { margin-top:5px; }
  .hero-kicker { font-size:1rem; letter-spacing:.10em; margin:12px 0 15px; gap:6px; }
  .hero-kicker::before,.hero-kicker::after { flex-basis:16px; }
  .hero-logo { position:absolute; top:12px; right:0; width:126px; z-index:0; }
  .hero-actions { gap:6px; }
  .hero-actions .button { min-height:41px; font-size:.89rem; padding-inline:13px; }
  .feature-inner > * { padding:5px 6px; min-height:57px; }
  .feature-inner .icon { width:23px; height:23px; }
  .feature-inner strong { font-size:1.06rem; }
  .feature-inner small { font-size:.715rem; }
  .home-events,.event-grid,.tournament-overview,.account-grid,.review-grid,.dashboard-grid { grid-template-columns:minmax(0,1fr); }
  .preview-panel { grid-column:auto; }
  .steps { grid-template-columns:1fr; gap:10px; }
  .steps h2 { grid-column:auto; }
  .footer-inner { flex-wrap:wrap; min-height:75px; }
  .auth-layout { grid-template-columns:1fr; }
  .auth-art { min-height:180px; padding-block:12px 22px; background-position:center, center 24%; }
  .auth-art h1 { font-size:2.5rem; }
  .auth-art p { font-size:1.2rem; }
  .auth-art small { margin-top:7px; font-size:.79rem; }
  .auth-section { padding:15px 17px 27px; }
  .auth-logo { width:91px; height:91px; }
  .auth-form-wrap h1 { font-size:1.9rem; }
  .form-grid { grid-template-columns:1fr; }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .stat { min-height:73px; }
  .stat-icon { width:32px; height:32px; }
  .stat-icon .icon { width:20px; height:20px; }
  .stat b { font-size:1.95rem; }
  .admin-header { gap:7px; --account-edge:var(--gutter); min-height:60px; }
  .admin-account { gap:9px; }
  .account-link { padding-left:0; border:0; }
  .account-link span,.view-site { display:none; }
  .admin-side a .icon { width:16px; height:16px; }
  .tournament-row { grid-template-columns:58px minmax(0,1fr) auto; }
  .tournament-thumb { width:58px; }
}
@media (max-width:345px) {
  .hero-logo { width:107px; }
  .feature-inner strong { font-size:.98rem; }
  .public-nav a { padding-inline:2px; }
  .quick-actions { grid-template-columns:1fr; }
}
@media (max-width:375px) {
  .public-header:has(.guest-login) .brand span { display:none; }
  .public-header:has(.guest-login) .language-menu summary .icon { display:none; }
  html[lang="fr"] .header-tools :is(.guest-login,.header-signup) { padding-inline:4px; }
}
@media (max-width:460px) {
  html:is([lang="fr"],[lang="ar"]) .public-header:has(.guest-login) .brand span { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01s !important; transition-duration:.01s !important; }
}
