/* nutournament — dark tournament portal. One sheet for the public site and the back office. */

:root {
  /* NU Esports club palette, shared with the club shop: black ground, NU pink. */
  --bg: #000;
  --bg-2: #0a0a0c;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .075);
  --panel-3: rgba(255, 255, 255, .11);
  --solid: #111114;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .17);
  --text: #f4f4f6;
  --muted: #b1b1bb;
  --dim: #8b8b96;
  --brand: #d81b60;
  --brand-hi: #e91e63;
  --brand-hot: #ff007f;
  --brand-text: #f472b6;
  --brand-soft: rgba(233, 30, 99, .16);
  --live: #ff4d4d;
  --open: #f5b700;
  --win: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .9), 0 2px 8px rgba(0, 0, 0, .5);
  --glow: 0 10px 30px -10px rgba(233, 30, 99, .55);
  --wrap: 1200px;
  --font: 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; color: var(--text);
  background: radial-gradient(80% 50% at 15% -10%, rgba(233, 30, 99, .22), transparent), radial-gradient(60% 40% at 95% 5%, rgba(255, 0, 127, .16), transparent), radial-gradient(50% 35% at 50% 100%, rgba(233, 30, 99, .1), transparent), var(--bg);
  background-attachment: fixed;
  font: 400 16px/1.65 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
::selection { background: rgba(233, 30, 99, .5); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 24px; height: 24px; }
.ic.fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(0, 0, 0, .72); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.logo-mark { width: 44px; height: 44px; border-radius: 10px; background: #fff; padding: 2px; box-shadow: var(--glow); flex: none; transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: scale(1.05) rotate(-2deg); }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.logo span small { display: block; font-size: 12px; font-weight: 500; color: var(--dim); letter-spacing: 0; margin-top: -2px; }
.logo b { color: var(--brand-text); font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- buttons, pills, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--brand-hi); }
.btn-ghost { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--panel-3); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--panel-2); }
.btn-danger { background: transparent; border-color: rgba(248, 113, 113, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .1); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { background: rgba(255, 77, 77, .16); color: #ff8a8a; }
.pill.live::before { animation: blink 1.4s infinite; }
.pill.open { background: rgba(245, 183, 0, .14); color: #ffd04d; }
.pill.done { background: rgba(52, 211, 153, .12); color: var(--win); }
.pill.muted::before { opacity: .7; }
.pill.plain::before { display: none; }
@keyframes blink { 50% { opacity: .25; } }

.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--game, var(--brand)); flex: none; }

/* ---------- sections ---------- */
main { min-height: 60vh; }
.section { padding-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.section-head h2 .ic { color: var(--brand-text); }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.more:hover { color: #f9a8d4; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- hero carousel ---------- */
.hero { padding-top: 24px; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; position: relative; min-height: 400px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.slide-art { position: absolute; inset: 0; z-index: -1; }
.slide-art img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, .1) 100%), linear-gradient(0deg, rgba(0, 0, 0, .8), transparent 50%); }
.slide-body { padding: 40px 44px; max-width: 640px; display: grid; gap: 14px; }
.slide-body h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -.02em; line-height: 1.2; }
.slide-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #d3d7e2; font-size: 15px; }
.slide-meta span { display: inline-flex; align-items: center; gap: 7px; }
.slide-meta .ic { color: var(--brand-text); }
.slide-tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.slide-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: var(--line-2); padding: 0; cursor: pointer; transition: width .35s var(--ease), background .35s; }
.dots button.on { width: 26px; background: var(--brand); }

/* Fallback art when an organizer has not uploaded a banner: the game's own colour field. */
.art { position: absolute; inset: 0; background: radial-gradient(120% 90% at 85% 20%, color-mix(in srgb, var(--game) 70%, #000) 0%, color-mix(in srgb, var(--game) 30%, #000) 45%, #050506 100%); overflow: hidden; }
.art::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 22px); mask-image: linear-gradient(90deg, transparent 20%, #000 80%); }
.art span { position: absolute; right: -2%; bottom: -14%; font-weight: 800; font-size: clamp(120px, 22vw, 300px); line-height: 1; letter-spacing: -.05em; color: rgba(255, 255, 255, .08); white-space: nowrap; }

/* ---------- game tiles ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.game-tile { position: relative; height: 112px; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; isolation: isolate; border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.game-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--game) 60%, var(--line)); }
.game-tile .art span { font-size: 92px; bottom: -22%; right: -6%; }
.game-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.game-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1) 70%); }
.game-tile .art { z-index: -2; }
.game-tile b { font-size: 17px; }
.game-tile small { color: #c9cdd8; font-size: 13px; }

/* ---------- match rows (live / results) ---------- */
.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.match-list { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s; }
.mrow:hover { border-color: var(--line-2); }
.mrow-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); margin-bottom: 2px; }
.side { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.side.r { flex-direction: row-reverse; text-align: right; }
.side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.lost { color: var(--dim); font-weight: 500; }
.vs { font-weight: 700; font-size: 20px; min-width: 66px; text-align: center; letter-spacing: .02em; }
.vs small { display: block; font-size: 12px; font-weight: 600; color: var(--dim); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: hsl(var(--h, 260) 45% 32%); border: 1px solid hsl(var(--h, 260) 50% 45% / .5); }
.avatar.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 17px; }

/* ---------- news list ---------- */
.news { display: grid; }
.news a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.news a:first-child { border-top: 0; }
.news a:hover h3 { color: var(--brand-text); }
.news h3 { font-size: 16px; font-weight: 600; transition: color .2s; }
.news p { grid-column: 1 / -1; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news time { color: var(--dim); font-size: 13px; white-space: nowrap; }
.pin { color: var(--open); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- tournament cards ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.tcard-art { position: relative; aspect-ratio: 16 / 7; overflow: hidden; }
.tcard-art img { width: 100%; height: 100%; object-fit: cover; }
.tcard-art .art span { font-size: 120px; bottom: -26%; }
.tcard-art .pill { position: absolute; left: 12px; top: 12px; backdrop-filter: blur(6px); background: rgba(0, 0, 0, .72); }
.tcard-body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; }
.tcard h3 { font-size: 18px; line-height: 1.35; }
.facts { display: grid; gap: 7px; margin: 0; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts dd.hi { color: #ffd04d; }
.meter { height: 5px; border-radius: 9px; background: var(--panel-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.tcard-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; font-size: 13px; color: var(--dim); margin-top: auto; }

/* ---------- article and video rails ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.rail > * { scroll-snap-align: start; }
.acard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.acard:hover { border-color: var(--line-2); transform: translateY(-3px); }
.acard-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.acard-art img { width: 100%; height: 100%; object-fit: cover; }
.acard-art .art span { font-size: 110px; }
.acard-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; }
.acard h3 { font-size: 16px; line-height: 1.45; }
.acard p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard-foot { display: flex; justify-content: space-between; color: var(--dim); font-size: 13px; margin-top: auto; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); transition: transform .3s var(--ease), background .3s; }
.acard:hover .play span { transform: scale(1.08); background: var(--brand); }
.platform { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 600; background: rgba(0, 0, 0, .75); padding: 2px 9px; border-radius: 6px; }

/* ---------- empty states ---------- */
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .ic { width: 30px; height: 30px; color: var(--dim); }
.empty b { color: var(--text); font-size: 16px; }

/* ---------- filters ---------- */
.page-head { padding: 36px 0 22px; display: grid; gap: 6px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.015em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.field-icon { position: relative; flex: 1 1 260px; }
.field-icon .ic { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--dim); }
.field-icon input { padding-left: 40px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; overflow-x: auto; max-width: 100%; }
.seg a { padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--panel-3); color: var(--text); }
.seg a:hover:not(.on) { color: var(--text); }

/* ---------- forms ---------- */
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.select option { background: var(--solid); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b1b1bb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input::placeholder, .textarea::placeholder { color: #7a8397; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-hi); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.err, .select.err, .textarea.err { border-color: var(--danger); }
input[type=file].input { padding: 9px 12px; height: auto; }
input[type=date].input, input[type=datetime-local].input { color-scheme: dark; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.label small { font-weight: 400; color: var(--dim); }
.hint { font-size: 13px; color: var(--dim); margin-top: 6px; }
.error { font-size: 13.5px; color: var(--danger); margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand); flex: none; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; font-size: 15px; border: 1px solid; }
.alert.ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.alert.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.alert.info { background: var(--brand-soft); border-color: rgba(233, 30, 99, .4); color: #fbcfe8; }

/* ---------- tournament page ---------- */
.t-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.t-hero .slide-art { z-index: -2; }
.t-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .82) 45%, rgba(0, 0, 0, .45) 100%); }
.t-hero .wrap { padding-top: 64px; padding-bottom: 0; }
.t-title { display: grid; gap: 12px; max-width: 820px; }
.t-title h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; }
.t-tags { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.t-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tabs { display: flex; gap: 2px; margin-top: 30px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 14px 16px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.tabs .count { font-size: 12px; background: var(--panel-3); padding: 0 7px; border-radius: 99px; color: var(--muted); }
.t-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 28px; align-items: start; }
.t-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.sheet { padding: 18px 20px; display: grid; gap: 14px; }
.sheet h2 { font-size: 16px; }
.sheet .facts { font-size: 14.5px; gap: 10px; }
.prize { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.prize .ic { width: 34px; height: 34px; color: #ffd04d; stroke-width: 1.5; }
.prize b { display: block; font-size: 20px; color: #ffd04d; line-height: 1.3; }
.prize small { color: var(--muted); font-size: 13px; }
.champion { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: linear-gradient(100deg, rgba(245, 183, 0, .14), transparent 70%), var(--panel); border-color: rgba(245, 183, 0, .35); }
.champion .ic { width: 30px; height: 30px; color: #ffd04d; }
.champion small { color: #ffd04d; font-weight: 600; font-size: 13px; }
.champion b { display: block; font-size: 20px; }
.block { padding: 22px 24px; }
.block + .block { margin-top: 16px; }
.block h2 { font-size: 18px; margin-bottom: 12px; }
.prose { color: #d3d7e2; font-size: 16px; line-height: 1.8; max-width: 72ch; }
.prose > * + * { margin-top: .9em; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.5em; font-size: 19px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose img { border-radius: 10px; }

/* ---------- bracket ---------- */
.bk-scroll { overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.bk-heads, .bk { display: flex; gap: 36px; width: max-content; }
.bk-heads { position: sticky; top: 0; margin-bottom: 12px; }
.bk-head { width: 232px; flex: none; scroll-snap-align: start; display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-weight: 700; }
.bk-head small { font-weight: 500; color: var(--dim); font-size: 12.5px; }
.bk-round { width: 232px; flex: none; display: flex; flex-direction: column; }
.bk-slot { flex: 1; display: flex; align-items: center; position: relative; padding: 7px 0; }
.bk-round:not(:last-child) .bk-slot::after { content: ''; position: absolute; right: -18px; width: 18px; top: 50%; border-top: 1px solid var(--line-2); }
.bk-round:not(:last-child) .bk-slot::before { content: ''; position: absolute; right: -18px; border-right: 1px solid var(--line-2); }
.bk-round:not(:last-child) .bk-slot:nth-child(odd)::before { top: 50%; bottom: 0; }
.bk-round:not(:last-child) .bk-slot:nth-child(even)::before { top: 0; bottom: 50%; }
.bk-round + .bk-round .bk-match::before { content: ''; position: absolute; left: -19px; width: 18px; top: 50%; border-top: 1px solid var(--line-2); }
.bk-match { position: relative; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s; }
.bk-match.live { border-color: rgba(255, 77, 77, .6); }
.bk-meta { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line); }
.bk-meta .live-tag { color: #ff8a8a; font-weight: 700; }
.bk-team { display: flex; align-items: center; gap: 9px; padding: 7px 12px; font-size: 14.5px; font-weight: 600; transition: background .2s, color .2s; }
.bk-team + .bk-team { border-top: 1px solid var(--line); }
.bk-team .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-team .sc { min-width: 22px; text-align: right; font-weight: 700; color: var(--muted); }
.bk-team.win .sc { color: var(--text); }
.bk-team.win .name::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--win); margin-left: 8px; vertical-align: middle; }
.bk-team.lose { color: var(--dim); font-weight: 500; }
.bk-team.lose .avatar { opacity: .55; }
.bk-team.tbd { color: var(--dim); font-weight: 400; font-style: normal; }
.bk-team.tbd .avatar { background: var(--panel-3); border-color: var(--line-2); color: var(--dim); }
.bk-team.hl { background: var(--brand-soft); color: #fff; }
.bk-match.bye { opacity: .55; }
.bk-champ { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #ffd04d; font-weight: 700; }

/* ---------- standings table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--panel); }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 11px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table .total { font-weight: 700; font-size: 16px; color: var(--text); }
.rank { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--panel-3); color: var(--muted); font-size: 14px; }
.rank.r1 { background: rgba(245, 183, 0, .2); color: #ffd04d; }
.rank.r2 { background: rgba(203, 213, 225, .16); color: #e2e8f0; }
.rank.r3 { background: rgba(217, 119, 6, .2); color: #f5a65b; }
.team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 160px; }

/* ---------- teams page ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.team-card { padding: 16px 18px; display: grid; gap: 12px; }
.team-card header { display: flex; align-items: center; gap: 12px; }
.team-card h3 { font-size: 16.5px; }
.team-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.team-card li { display: flex; justify-content: space-between; gap: 10px; }
.team-card li span:last-child { color: var(--muted); }
.team-card li.sub { color: var(--dim); }

/* ---------- registration ---------- */
.reg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 40px; }
.reg-form { padding: 26px 28px; display: grid; gap: 26px; }
.reg-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.reg-form legend { font-size: 17px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 10px; align-items: center; padding: 0; }
.step-no { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); display: inline-grid; place-items: center; font-size: 14px; }
.players { display: grid; gap: 10px; }
.player-row { display: grid; grid-template-columns: 88px 1fr 1fr; gap: 10px; align-items: center; }
.player-row.with-id { grid-template-columns: 88px 1fr 1fr 130px; }
.player-row .tag { font-size: 13px; color: var(--muted); font-weight: 600; }
.player-row.sub .tag { color: var(--dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done-card { max-width: 640px; margin: 40px auto; padding: 34px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.done-card .tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .14); color: var(--win); }
.done-card .tick .ic { width: 32px; height: 32px; stroke-width: 2.2; }
.done-card h1 { font-size: 26px; }

/* ---------- post page ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 36px 20px 20px; }
.article-cover { border-radius: 16px; overflow: hidden; margin: 22px 0 26px; aspect-ratio: 16 / 8; position: relative; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.015em; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--dim); font-size: 14px; margin-top: 10px; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }

/* ---------- pagination ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.pager .on { background: var(--brand); border-color: var(--brand); }
.pager .off { opacity: .4; }

/* ---------- footer ---------- */
.footer { margin-top: 72px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .6); }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; color: var(--dim); font-size: 14px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a:hover { color: var(--text); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s var(--ease) both; }
  .rise:nth-child(2) { animation-delay: .06s; }
  .rise:nth-child(3) { animation-delay: .12s; }
  .rise:nth-child(4) { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  .slide.on .slide-body > * { animation: rise .8s var(--ease) both; }
  .slide.on .slide-body > :nth-child(2) { animation-delay: .05s; }
  .slide.on .slide-body > :nth-child(3) { animation-delay: .1s; }
  .slide.on .slide-body > :nth-child(4) { animation-delay: .15s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .t-layout, .reg { grid-template-columns: 1fr; }
  .t-side { position: static; }
  .t-layout.side-first .t-side { order: -1; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; }
  .topbar .cta { display: none; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 2px; padding: 12px 16px 18px; background: var(--solid); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav .btn { margin-top: 8px; }
}
@media (min-width: 1081px) { .nav .btn { display: none; } .topbar .cta + .cta { margin-left: -16px; } }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 34px; }
  .slide { min-height: 440px; }
  .slide::after { background: linear-gradient(0deg, rgba(0, 0, 0, .96) 30%, rgba(0, 0, 0, .4) 75%, rgba(0, 0, 0, .15)); }
  .slide-body { padding: 24px 20px; }
  .slides { border-radius: 14px; }
  .tgrid { grid-template-columns: 1fr; }
  .games { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-tile { height: 96px; }
  .form-grid { grid-template-columns: 1fr; }
  .player-row, .player-row.with-id { grid-template-columns: 1fr 1fr; }
  .player-row .tag { grid-column: 1 / -1; margin-bottom: -4px; }
  .reg-form { padding: 20px 18px; }
  .block { padding: 18px; }
  .mrow { padding: 12px; gap: 8px; }
  .vs { min-width: 52px; font-size: 18px; }
  .side { gap: 8px; font-size: 14.5px; }
  .avatar { width: 30px; height: 30px; }
  .bk-head, .bk-round { width: 228px; }
  .bk-heads, .bk { gap: 36px; }
  .t-hero .wrap { padding-top: 40px; }
  .rail { grid-auto-columns: 82%; }
  .table .hide-sm { display: none; }
}

/* ==================== back office ==================== */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: rgba(0, 0, 0, .6); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.a-side .logo { padding: 0 8px; font-size: 17px; }
.a-nav { display: grid; gap: 2px; }
.a-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 15px; }
.a-nav a:hover { background: var(--panel); color: var(--text); }
.a-nav a.on { background: var(--panel-2); color: var(--text); }
.a-nav a.on .ic { color: var(--brand-text); }
.a-nav .badge { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--open); color: #1a1300; border-radius: 99px; padding: 0 8px; }
.a-side .foot { margin-top: auto; display: grid; gap: 4px; }
.a-main { padding: 26px 32px 60px; min-width: 0; }
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.a-top h1 { font-size: 24px; }
.a-top .crumbs { margin-bottom: 4px; }
.a-mobile { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 16px 18px; display: grid; gap: 2px; }
.stat small { color: var(--muted); font-size: 13.5px; }
.stat b { font-size: 26px; }
.stat a { font-size: 13px; color: var(--brand-text); font-weight: 600; margin-top: 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; }
.card-body { padding: 18px; }
.a-form { display: grid; gap: 20px; max-width: 920px; }
.a-form .card-body { display: grid; gap: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--panel-3); }
.icon-btn.danger:hover { color: var(--danger); }
.score-form { display: flex; align-items: center; gap: 8px; }
.score-form .input { width: 64px; height: 36px; text-align: center; padding: 0 6px; font-weight: 700; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); display: flex; gap: 10px; }
details.more-opts { border: 1px solid var(--line); border-radius: 10px; }
details.more-opts summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--muted); list-style: none; display: flex; gap: 8px; align-items: center; }
details.more-opts summary::-webkit-details-marker { display: none; }
details.more-opts[open] summary { border-bottom: 1px solid var(--line); color: var(--text); }
details.more-opts[open] summary .ic { rotate: 180deg; }
details.more-opts > div { padding: 16px; display: grid; gap: 16px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; padding: 30px; display: grid; gap: 18px; }
.br-table .input { height: 36px; text-align: center; }
.thumb { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--panel-3); }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .a-side { display: none; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; box-shadow: var(--shadow); background: var(--solid); }
  .a-side.open { display: flex; }
  .a-mobile { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--solid); position: sticky; top: 0; z-index: 30; }
  .a-main { padding: 20px 16px 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== club ==================== */
.foot-grid { display: grid !important; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px !important; padding-bottom: 28px !important; }
.foot-grid nav { display: grid; gap: 9px; align-content: start; font-size: 14.5px; }
.foot-grid nav b { color: var(--text); font-size: 14px; margin-bottom: 4px; }
.foot-grid nav a:hover { color: var(--text); }
.foot-brand { display: grid; gap: 14px; align-content: start; }
.foot-brand p { font-size: 14px; line-height: 1.7; }
.foot-legal { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 26px; font-size: 13px; color: var(--dim); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); }
.socials a:hover { color: #fff; border-color: var(--brand-hi); background: var(--brand-soft); }

.club-hero { position: relative; padding: 56px 0 8px; }
.club-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.club-id { display: grid; gap: 20px; justify-items: start; }
.club-crest { width: 128px; height: 128px; border-radius: 26px; background: #fff; padding: 6px; box-shadow: 0 24px 60px -20px rgba(233, 30, 99, .75), 0 0 0 1px rgba(255, 255, 255, .2); rotate: -3deg; }
.club-crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 20px; }
.club-id h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.club-id h1 em { font-style: normal; color: var(--brand-hi); }
.club-id p { font-size: 18px; color: #d5d5dc; max-width: 46ch; line-height: 1.7; }
.club-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.club-place { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; }
.club-place .ic { color: var(--brand-text); }
.feature-card { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); min-height: 380px; display: flex; align-items: flex-end; isolation: isolate; box-shadow: var(--shadow); }
.feature-card .slide-art { position: absolute; inset: 0; z-index: -2; }
.feature-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .95) 25%, rgba(0, 0, 0, .35) 70%, rgba(0, 0, 0, .1)); }
.feature-card .body { padding: 24px; display: grid; gap: 12px; width: 100%; }
.feature-card h2 { font-size: clamp(22px, 2.4vw, 28px); }
.feature-card .slide-meta { font-size: 14px; }

.band { margin-top: 56px; border-radius: 22px; padding: 34px 36px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, rgba(233, 30, 99, .35), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(255, 0, 127, .22), transparent 60%), rgba(255, 255, 255, .04); border: 1px solid rgba(233, 30, 99, .35); }
.band h2 { font-size: clamp(22px, 3vw, 30px); }
.band p { color: #e2d3da; margin-top: 6px; }
.band .actions { justify-content: flex-end; }

.squad { margin-bottom: 34px; }
.squad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.squad-head h2 { font-size: 20px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .3s var(--ease), border-color .3s; }
.person:hover { transform: translateY(-3px); border-color: rgba(233, 30, 99, .45); }
.person-photo { aspect-ratio: 4 / 5; background: linear-gradient(160deg, hsl(var(--h) 40% 22%), #050506 75%); display: grid; place-items: center; position: relative; overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo span { font-size: 54px; font-weight: 800; color: rgba(255, 255, 255, .16); letter-spacing: -.04em; }
.person-body { padding: 12px 14px 14px; display: grid; gap: 2px; }
.person-body b { font-size: 16px; }
.person-body small { color: var(--brand-text); font-weight: 600; font-size: 13px; }
.person-body span { color: var(--dim); font-size: 13px; }

.medals { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.medal-count { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.medal-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1a1200; flex: none; }
.medal-dot.gold { background: linear-gradient(145deg, #ffe58a, #e3a400); }
.medal-dot.silver { background: linear-gradient(145deg, #f2f4f7, #a5acb8); }
.medal-dot.bronze { background: linear-gradient(145deg, #ffc58f, #b7621b); }
.medal-dot.other { background: var(--panel-3); color: var(--brand-text); }
.awards { display: grid; gap: 10px; }
.award { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.award h3 { font-size: 16px; }
.award p { color: var(--muted); font-size: 14px; }
.award time { color: var(--dim); font-size: 13.5px; white-space: nowrap; }
.award .medal-dot { width: 40px; height: 40px; font-size: 15px; }
.year-head { font-size: 15px; color: var(--muted); font-weight: 700; margin: 26px 0 10px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.room { padding: 22px; display: grid; gap: 14px; }
.room h2 { font-size: 18px; display: flex; gap: 10px; align-items: center; }
.room h2 .ic { color: var(--brand-text); }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.counts div { background: var(--solid); padding: 14px 16px; display: grid; }
.counts b { font-size: 24px; }
.counts span { color: var(--muted); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--muted); transition: all .2s; }
.chips span i { width: 8px; height: 8px; border-radius: 3px; background: var(--game); }
.chips input:checked + span { color: #fff; border-color: var(--brand-hi); background: var(--brand-soft); }
.chips input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }

.a-nav .group { font-size: 12px; font-weight: 700; color: var(--dim); padding: 14px 12px 4px; }
.a-nav .ext { margin-left: auto; color: var(--dim); }

@media (max-width: 1000px) {
  .club-hero .wrap, .about-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .band { grid-template-columns: 1fr; }
  .band .actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .club-hero { padding-top: 32px; }
  .club-crest { width: 96px; height: 96px; border-radius: 20px; }
  .club-id p { font-size: 16px; }
  .feature-card { min-height: 320px; }
  .people { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .award { grid-template-columns: auto 1fr; }
  .award time { grid-column: 2; }
  .band { padding: 24px 20px; }
  .counts b { font-size: 20px; }
}

/* ==================== shop ==================== */
.marquee { overflow: hidden; border-bottom: 1px solid rgba(233, 30, 99, .25); background: rgba(233, 30, 99, .09); }
.marquee-track { display: flex; width: max-content; gap: 44px; padding: 9px 0; white-space: nowrap; font-size: 14px; font-weight: 500; color: #fbcfe8; animation: marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; }
.marquee-track span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--brand-text); rotate: 45deg; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 20px; }
.shop-intro { display: grid; gap: 18px; }
.shop-intro h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
.shop-intro h1 em { font-style: normal; color: var(--brand-hi); }
.shop-intro > p { color: #cfcfd6; font-size: 17px; max-width: 46ch; }
.shop-photo { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -24px rgba(233, 30, 99, .6); }
.shop-photo img { width: 100%; }
.promo { padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(245, 183, 0, .35); background: rgba(245, 183, 0, .06); display: grid; gap: 6px; }
.promo b { color: #ffd04d; display: flex; align-items: center; gap: 8px; }
.promo p { font-size: 14.5px; color: #e4e4ea; }
.promo p strong { color: var(--brand-text); }
.promo small { color: var(--dim); font-size: 13px; }
.price-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-pair > div { padding: 16px 18px; display: grid; gap: 2px; }
.price-pair small { color: var(--muted); font-size: 13.5px; }
.price-pair b { font-size: 28px; color: var(--brand-text); }
.price-pair span { color: var(--dim); font-size: 13px; }
.order-card { padding: 26px; position: sticky; top: 90px; display: grid; gap: 20px; }
.order-card h2 { font-size: 20px; }
.order-card.closed form { opacity: .55; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn { min-width: 52px; height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .2s; }
.size-btn:hover { background: var(--panel-3); }
.size-btn[aria-pressed="true"] { border-color: var(--brand-hi); background: var(--brand-soft); color: #fbcfe8; }
.qty-list { display: grid; gap: 8px; margin-top: 12px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.qty-row b { color: var(--brand-text); font-size: 15px; min-width: 44px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 36px; border-radius: 9px; border: 0; background: var(--panel-3); font-size: 18px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: rgba(255, 255, 255, .18); }
.stepper input { width: 56px; height: 36px; text-align: center; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .45); font-weight: 700; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { cursor: pointer; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px 10px; min-height: 108px; align-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); transition: all .2s; }
.choice span b { font-size: 16px; }
.choice span em { font-style: normal; font-weight: 700; color: var(--brand-text); }
.choice span em.free { color: var(--win); }
.choice span small { font-size: 12.5px; color: var(--dim); }
.choice input:checked + span { border-color: var(--brand-hi); background: var(--brand-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.totals { padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .strike { text-decoration: line-through; color: var(--dim); }
.totals .save { color: var(--win); }
.totals .note { color: #ffd04d; font-size: 13px; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; align-items: baseline; }
.totals .grand dd { font-size: 26px; font-weight: 800; color: var(--brand-text); }
[hidden] { display: none !important; }

.notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--brand-soft); border: 1px solid rgba(233, 30, 99, .35); font-size: 14.5px; }
.notice b { color: #fbcfe8; display: flex; gap: 8px; align-items: center; }
.notice p { color: #e9dbe1; }
.countdown { text-align: center; padding: 8px 16px; border-radius: 12px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(233, 30, 99, .4); min-width: 150px; }
.countdown small { display: block; font-size: 12px; color: var(--muted); }
.countdown b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.countdown.closed b { color: #ffd04d; font-size: 16px; }

.pay { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; padding-bottom: 20px; }
.pay-head { text-align: center; display: grid; gap: 6px; padding-top: 30px; }
.pay-head h1 { font-size: 30px; }
.order-no { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--brand-text); letter-spacing: .03em; }
.screenshot-tip { text-align: center; font-size: 14px; color: #ffd04d; padding: 10px 14px; border-radius: 12px; border: 1px dashed rgba(245, 183, 0, .45); }
.qr-box { display: grid; justify-items: center; gap: 12px; padding: 22px; text-align: center; }
.qr-frame { background: #fff; color: #1a1a1a; border-radius: 18px; padding: 10px; display: grid; grid-template-columns: auto auto auto; grid-template-rows: auto auto auto; align-items: center; justify-items: center; box-shadow: var(--shadow); max-width: 100%; }
.qr-frame .wm { font-size: 9px; line-height: 1.2; color: #c2185b; font-weight: 600; grid-column: 2; }
.qr-frame .wm.side { grid-column: auto; grid-row: 2; writing-mode: vertical-rl; }
.qr-frame .wm.side.l { rotate: 180deg; }
.qr-frame img { width: 248px; height: 248px; grid-column: 2; grid-row: 2; }
.pp-id { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pp-id b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.drop { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; cursor: pointer; text-align: center; color: var(--muted); transition: border-color .2s, background .2s; }
.drop:hover { border-color: var(--brand-hi); background: var(--brand-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop img { max-height: 320px; border-radius: 10px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.items-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.items-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.items-table tfoot td { border-bottom: 0; color: var(--muted); }
.items-table tfoot tr:last-child td { color: var(--text); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line-2); }
.items-table .r { text-align: right; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; font-size: 14.5px; }
.sum-grid div small { display: block; color: var(--dim); font-size: 12.5px; }
.sum-grid .full { grid-column: 1 / -1; }
.sum-grid .total b { font-size: 24px; color: var(--brand-text); }
.track-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; isolation: isolate; }
.track-steps li { list-style: none; display: grid; justify-items: center; gap: 8px; text-align: center; position: relative; font-size: 13px; color: var(--dim); }
.track-steps li::before { content: ""; position: absolute; top: 18px; left: 50%; right: -50%; height: 2px; background: var(--line-2); z-index: -1; }
.track-steps li:last-child::before { display: none; }
.track-steps li.done::before { background: var(--brand-hi); }
.track-steps .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line-2); background: var(--solid); }
.track-steps li.done .dot, .track-steps li.now .dot { background: var(--brand); border-color: var(--brand-hi); color: #fff; }
.track-steps li.now { color: var(--text); font-weight: 600; }
.track-steps ol { margin: 0; padding: 0; display: contents; }
.contact-box { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 18px; }
.contact-box p { color: var(--muted); font-size: 14px; }

dialog.sheet-modal { border: 1px solid var(--line-2); border-radius: 20px; padding: 0; background: var(--solid); color: var(--text); max-width: min(520px, calc(100vw - 32px)); width: 100%; box-shadow: var(--shadow); }
dialog.sheet-modal::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
dialog.sheet-modal[open] { animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.sheet-modal .modal-body { padding: 18px; display: grid; gap: 14px; }
.sheet-modal .modal-body img { width: 100%; border-radius: 12px; }
.sheet-modal .close-x { position: absolute; right: 10px; top: 10px; }

.pill.s-amber { background: rgba(245, 183, 0, .14); color: #ffd04d; }
.pill.s-orange { background: rgba(251, 146, 60, .15); color: #fdba74; }
.pill.s-blue { background: rgba(96, 165, 250, .15); color: #93c5fd; }
.pill.s-violet { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.pill.s-emerald { background: rgba(52, 211, 153, .13); color: #6ee7b7; }
.pill.s-red { background: rgba(248, 113, 113, .14); color: #fca5a5; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.bars span { flex: 1; background: linear-gradient(0deg, var(--brand), var(--brand-hot)); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars span:hover { filter: brightness(1.25); }
.bars-x { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; font-size: 14px; }
.hbar i { display: block; height: 10px; border-radius: 6px; background: var(--brand-hi); }
.hbar + .hbar { margin-top: 8px; }

@media (max-width: 1000px) {
  .shop { grid-template-columns: 1fr; }
  .order-card { position: static; }
}
@media (max-width: 640px) {
  .order-card { padding: 20px 16px; }
  .price-pair b { font-size: 24px; }
  .qr-frame img { width: 210px; height: 210px; }
  .sum-grid { grid-template-columns: 1fr; }
  .track-steps li { font-size: 11.5px; }
  .track-steps .dot { width: 32px; height: 32px; }
  .track-steps li::before { top: 15px; }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; white-space: normal; padding: 9px 16px; gap: 6px 24px; } }

/* ==================== team accounts ==================== */
.auth-card { max-width: 460px; margin: 40px auto 0; padding: 28px; display: grid; gap: 18px; }
.auth-card h1 { font-size: 26px; }
.steps-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.steps-line li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); padding: 8px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.steps-line li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--panel-3); color: var(--muted); flex: none; }
.steps-line li.now { color: var(--text); border-color: rgba(233, 30, 99, .45); background: var(--brand-soft); }
.steps-line li.now b { background: var(--brand); color: #fff; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.team-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.team-strip div { display: grid; }
.team-strip b { font-size: 17px; }
.team-strip span.muted { font-size: 13.5px; }
@media (max-width: 640px) {
  .auth-card { margin-top: 20px; padding: 22px 18px; }
  .steps-line { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry .actions { justify-content: flex-start !important; }
}
