/* ==========================================================================
   TKI design system
   Type:   Inter (interface + reading), Satoshi (headings),
           Barlow Condensed (rare oversized statements only).
   Shape:  10px controls, 16px panels, pills for status.
   Space separates content — borders only where they do a job.
   ========================================================================== */
:root {
  --accent: #1a88f8;
  --accent-strong: #1675d5;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 15%, transparent);

  --bg: #0a0c11;
  --bg-deep: #07080c;
  --surface: #11141b;
  --surface-2: #181c25;
  --surface-3: #232835;
  --line: rgba(255, 255, 255, .07);
  --text: #f1f3f7;
  --text-2: #b6bcc8;
  --muted: #868d9a;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --head: 'Satoshi', 'Inter', system-ui, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --nav-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Very light static grain, so flat darks don't band */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main { flex: 1; padding: var(--nav-h) 0 80px; }
.page-home main { padding: 0; }

a { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
::selection { background: var(--accent-strong); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4, h5 { font-family: var(--head); font-weight: 700; margin: 0 0 .45em; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -.03em; }
h2 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
img, video { max-width: 100%; }
code { font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: .86; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 72px; }
.h-sm { font: 700 20px/1.3 var(--head); letter-spacing: -.01em; margin-bottom: 14px; }
.h-xs, .mono-label { font: 600 15px/1.4 var(--head); color: var(--text); margin: 0 0 12px; }
.eyebrow { font: 500 15px/1.4 var(--font); color: var(--accent); margin: 0 0 10px; }
.link-arrow { font: 500 15px/1.4 var(--font); color: var(--text); text-decoration: none; white-space: nowrap; }
.link-arrow:hover { color: var(--accent); }

/* ==========================================================================
   Buttons — one shape language: 10px radius, solid fills, no outlines
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 18px;
  border: 0; border-radius: var(--r);
  background: var(--surface-3); color: var(--text);
  font: 600 15px/1 var(--font); letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: #2d3238; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-strong) 86%, #fff); color: var(--accent-ink); }
.btn-outline, .btn-soft, .btn-glass { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-outline:hover, .btn-soft:hover, .btn-glass:hover { background: rgba(255, 255, 255, .14); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6b77f5; color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn-xs { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn-lg, .btn-xl { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-danger-text { background: transparent; color: var(--red); }
.btn-danger-text:hover { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.icon-btn { width: 40px; padding: 0; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: var(--nav-h);
  background: rgba(10, 12, 17, .86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .4s var(--ease), transform .55s var(--ease-io), box-shadow .4s;
  view-transition-name: site-nav;
}
.nav.is-solid { box-shadow: 0 1px 0 var(--line); }
.page-home .nav:not(.is-solid) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.is-hidden { transform: translateY(-101%); }
.nav-inner { display: flex; align-items: center; gap: 36px; height: 100%; max-width: 1360px; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-logo { width: 34px; height: 34px; object-fit: cover; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-name { font: 400 17px/1 var(--font); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.brand-name b { font-weight: 800; letter-spacing: .01em; }
.brand-mark { display: none; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links > a {
  color: var(--text-2); font: 500 15px/1 var(--font); padding: 9px 13px; border-radius: var(--r-sm);
  text-decoration: none; transition: color .2s, background .2s;
}
.nav-links > a:hover { color: var(--text); }
.nav-links > a.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-login { color: var(--text-2); font: 500 15px/1 var(--font); padding: 10px 12px; text-decoration: none; }
.nav-login:hover { color: var(--text); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; border-radius: var(--r-sm); }
.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  background: var(--accent-strong); color: var(--accent-ink); border-radius: 999px; font: 600 12px/1 var(--font);
}
.tab .count { background: rgba(255, 255, 255, .1); color: var(--text-2); }
.tab.on .count { background: var(--accent-strong); color: var(--accent-ink); }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; transition: background .2s; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: rgba(255, 255, 255, .07); }
.user-menu-name { font: 500 15px/1 var(--font); }
.user-menu-list {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px;
  background: var(--surface-2); border-radius: 14px; padding: 6px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}
.user-menu-list a, .user-menu-list button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text); font: 500 15px var(--font); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.user-menu-list a:hover, .user-menu-list button:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.user-menu-list form { margin: 4px 0 0; }

/* ==========================================================================
   Avatars, tags, roles, statuses — sentence case, pills
   ========================================================================== */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 600 14px/1 var(--font); }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; }

.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 500 13px/1 var(--font); background: rgba(255, 255, 255, .08); color: var(--text-2); vertical-align: middle; }
.tag-pin { background: var(--accent-soft); color: var(--accent); }
.tag-lock { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.role { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 500 12.5px/1 var(--font); vertical-align: middle; }
.role-admin { background: color-mix(in srgb, var(--red) 15%, transparent); color: #fca5a5; }
.role-staff { background: var(--accent-soft); color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font: 500 13px/1 var(--font); white-space: nowrap; border: 0; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: color-mix(in srgb, var(--yellow) 13%, transparent); color: var(--yellow); }
.status-accepted, .status-open { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.status-denied { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
.status-closed { background: rgba(255, 255, 255, .07); color: var(--muted); }
.status-btn { cursor: pointer; }
.status-btn:hover { filter: brightness(1.2); }
.dot-color { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: middle; }

/* ==========================================================================
   Flash
   ========================================================================== */
.flash { margin: 24px 0 0; padding: 14px 18px; border-radius: 12px; font-weight: 500; }
.form .flash { margin: 0 0 20px; }
.flash-success { background: color-mix(in srgb, var(--green) 12%, var(--surface)); color: #c9f7da; }
.flash-error { background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: #fed2d2; }

/* ==========================================================================
   Page headers — a slice of the city behind every inner page
   ========================================================================== */
.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  margin: calc(-1 * var(--nav-h)) 0 48px;
  padding: calc(var(--nav-h) + 72px) 0 52px;
  background: var(--bg-deep);
}
.page-head-sm { padding: calc(var(--nav-h) + 52px) 0 40px; }
.page-head .skyline {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .7;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 50%, transparent 92%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 50%, transparent 92%);
}
.page-head::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 9, 10, .95) 0%, rgba(8, 9, 10, .72) 45%, rgba(8, 9, 10, .25) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.page-head h1 { margin-bottom: 14px; }
.page-head p:last-child { margin-bottom: 0; }
.page-head .muted { color: var(--text-2); max-width: 600px; font-size: 17px; }
.page-head-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head-inner > div { max-width: 700px; }
.crumbs { margin: 0 0 14px; font: 500 14px/1.4 var(--font); color: var(--muted); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.thread-h1 { font-size: clamp(30px, 3.6vw, 46px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mod-bar { display: flex; gap: 8px; margin-top: 18px; }
.mod-bar form { margin: 0; }

/* ==========================================================================
   Panels & lists
   ========================================================================== */
.card { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 28px; }
.card-flush { padding: 8px; overflow: hidden; }
.card-link { display: block; color: var(--text); text-decoration: none; transition: background .25s var(--ease); }
.card-link:hover { background: var(--surface-2); color: var(--text); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r-lg); }
.empty-flush { background: none; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.announce-top { display: flex; align-items: center; gap: 10px; font: 500 14px/1 var(--font); color: var(--muted); }
.announce-full { padding: 36px 40px; }
.announce-full h2 { margin: 14px 0 16px; }
.announce-full h2 a { color: var(--text); text-decoration: none; }
.announce-full h2 a:hover { color: var(--accent); }
.announce-foot { margin-top: 24px; }

/* Forums: rows separated by space and hover, not rules */
.cat-row, .thread-row, .sub-row {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 12px;
  color: var(--text); text-decoration: none; transition: background .2s var(--ease);
}
.cat-row:hover, .thread-row:hover, .sub-row:hover { background: var(--surface-2); color: var(--text); }
.cat-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.cat-icon-staff { background: var(--accent-soft); color: var(--accent); }
.cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-name { font: 700 18px/1.3 var(--head); letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-name .tag { height: 22px; font-size: 12px; }
.cat-count { display: flex; flex-direction: column; align-items: flex-end; width: 76px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.cat-count strong { font: 700 18px/1.2 var(--head); color: var(--text); }
.cat-count .small { font-size: 13px; }
.cat-latest { width: 230px; flex-shrink: 0; display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.cat-latest-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

.thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.thread-title { font: 600 16.5px/1.35 var(--font); overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-meta { font-size: 14px; color: var(--muted); }
.thread-stats { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; text-align: right; gap: 2px; }
.thread-replies { font-size: 14px; color: var(--text-2); }
.thread-replies strong { color: var(--text); }
.thread-last { font-size: 13px; }

/* Thread posts: author line on top, content below */
.post { padding: 28px 32px; scroll-margin-top: 100px; }
.post:target { box-shadow: 0 0 0 2px var(--accent); }
.post-author { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 18px; }
.post-author .avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.post-name { font: 600 16px/1.2 var(--font); color: var(--text); text-decoration: none; }
a.post-name:hover { color: var(--accent); }
.post-author-meta { font-size: 13px !important; color: var(--muted); }
.post-body { min-width: 0; }
.post-meta { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 13px !important; color: var(--muted); }
.post-actions { display: flex; gap: 6px; margin-top: 18px; }
.post-actions form { margin: 0; }
.reply-box p { margin: 0; }

.prose { overflow-wrap: anywhere; color: var(--text); line-height: 1.7; font-size: 16.5px; }
.prose > :last-child { margin-bottom: 0; }
.prose h3, .prose h4, .prose h5 { margin: 1.5em 0 .5em; font-family: var(--head); }
.prose h3 { font-size: 22px; letter-spacing: -.015em; }
.prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 0 0 1em; padding: 14px 18px; background: var(--surface-2); border-radius: 12px; color: var(--text-2); }
.rules { padding: 44px 48px; counter-reset: rule; }
.rules h3 { font-size: 24px; counter-increment: rule; margin-top: 1.8em; }
.rules h3::before { content: counter(rule) '. '; color: var(--accent); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form h2 { font-size: 24px; margin-bottom: 18px; }
.label { display: block; margin: 20px 0 8px; font: 500 15px/1.4 var(--font); color: var(--text); }
.label .muted { font-weight: 400; }
.form > .label:first-of-type, .form > input[type=hidden] + .label { margin-top: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--r);
  background: var(--bg-deep); color: var(--text); border: 1px solid rgba(255, 255, 255, .09);
  font: 15.5px/1.45 var(--font); transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #63666b; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
textarea.mono { font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
select {
  appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23bdbab4' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 58px; height: 44px; padding: 4px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .09); background: var(--bg-deep); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; }
.hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.check, .radio { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; margin-top: 18px; }
.radio-row { display: flex; gap: 10px; }
.radio-row .radio { margin: 0; padding: 11px 20px; border-radius: var(--r); background: var(--bg-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.radio-row .radio:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.form-foot .btn:last-child { margin-left: auto; }
.req { color: var(--accent); }
.q { padding: 4px 0 14px; }
.q-n { color: var(--muted); font-weight: 500; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check-cell { display: flex; align-items: flex-end; padding-bottom: 12px; }
.color-field { display: flex; align-items: center; gap: 12px; }
.inline-form { display: inline; margin: 0; }
.inline-form select { width: auto; min-width: 220px; }

.auth-wrap { display: grid; place-items: center; padding-top: 72px; }
.auth-card { width: 100%; max-width: 440px; padding: 40px; }
.auth-card h1 { font-size: 34px; margin-bottom: 6px; }
.auth-logo { display: block; width: 64px; height: 64px; border-radius: 16px; margin: 0 0 22px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 16px 40px -12px color-mix(in srgb, var(--accent) 45%, transparent); }
.auth-card .btn-block { margin-top: 26px; height: 48px; }
.auth-card .center { margin: 20px 0 0; }
.center-page { padding-top: 96px; }

/* Applications */
.app-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.app-group-head h2 { margin: 0; }
.app-group-head p { margin: 0; }
.app-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); text-decoration: none; transition: background .25s var(--ease); }
.app-card:hover { background: var(--surface-2); color: var(--text); }
.app-cover { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: color-mix(in srgb, var(--dept, var(--accent)) 22%, var(--surface-2)); }
.app-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.app-card:hover .app-cover img { transform: scale(1.04); }
.app-cover.is-blank { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--dept, var(--accent)) 38%, transparent), transparent 60%), var(--surface-2); }
.app-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 22px 24px 24px; }
.app-card h3 { margin: 10px 0 2px; font-size: 21px; }
.app-card p { flex: 1; font-size: 15px; margin: 0 0 14px; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-card-cta { font: 600 15px/1 var(--font); display: inline-flex; gap: 8px; }
.app-card-cta .arr { transition: transform .3s var(--ease); }
.app-card:hover .app-card-cta .arr { transform: translateX(4px); }
.app-closed { opacity: .6; }
.dept-chip { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font); color: var(--text-2); }
.dept-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dept, var(--accent)); }

.sub-main { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.sub-main strong { font: 700 18px/1.3 var(--head); letter-spacing: -.01em; }
.sub-note { color: var(--text-2); font-style: italic; margin-top: 4px; }
.sub-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.answers { margin: 0; }
.answer + .answer { margin-top: 26px; }
.answer dt { font-weight: 600; margin-bottom: 6px; }
.answer dd { margin: 0; white-space: pre-wrap; color: var(--text-2); overflow-wrap: anywhere; }
.answer dd.dd-files { white-space: normal; }
.applicant { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.decision { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.decision-opt { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 6px; border-radius: var(--r); background: var(--bg-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); cursor: pointer; font-weight: 600; font-size: 14px; }
.decision-opt:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.decision-accept:has(input:checked) { box-shadow: inset 0 0 0 1px var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.decision-deny:has(input:checked) { box-shadow: inset 0 0 0 1px var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--r-sm); color: var(--text); font-size: 14px; text-decoration: none; }
.mini-row:hover { background: var(--surface-2); color: var(--text); }

/* Tabs as a segmented control; tables keep faint row rules (they help scanning) */
.tabs { display: inline-flex; gap: 4px; margin: -8px 0 24px; padding: 4px; background: var(--surface); border-radius: 12px; overflow-x: auto; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-sm); color: var(--text-2); font: 500 14.5px/1 var(--font); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--surface-3); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 500 13.5px/1 var(--font); color: var(--muted); padding: 14px 18px; }
.table td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table select { width: auto; padding: 7px 34px 7px 10px; font-size: 14px; }
.row-banned td { opacity: .5; }
.cell-user { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; text-decoration: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toolbar p { margin: 0; }
.search-bar { display: flex; gap: 8px; max-width: 440px; margin-bottom: 14px; }

/* Admin edit rows */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.form-section-wide { grid-column: 1 / -1; }
.form-section { padding-bottom: 16px; }
.form-section + .form-section-wide, .form-section-wide + .form-section-wide { margin-top: 28px; }
.edit-row { box-shadow: inset 4px 0 0 var(--dept, transparent); }
.edit-row .label { margin-top: 14px; }
.edit-row-grid { display: grid; grid-template-columns: 2fr 1fr 80px 90px; gap: 12px; }
.edit-row-grid .label { margin-top: 0; }
.edit-row-grid .check-cell .check { margin: 0; }
.edit-row .form-foot { margin-top: 18px; }
.edit-row-new { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }

.q-heading { margin-top: 34px !important; }
.q-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.q-item { padding: 18px; background: var(--bg-deep); }
.q-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.q-num { font: 600 14px/1 var(--font); color: var(--text-2); }
.q-move { display: flex; gap: 4px; }
.q-opts-row { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.q-opts-row select { width: auto; min-width: 210px; }
.q-opts-row .check { margin: 0; }
.q-options { margin-top: 10px; }

.profile-head { display: flex; align-items: center; gap: 28px; }
.profile-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.profile-head p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Footer — compact
   ========================================================================== */
.footer { background: var(--bg-deep); padding: 56px 0 36px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-about { max-width: 340px; color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.footer-links { display: flex; gap: 10px 28px; flex-wrap: wrap; padding-top: 6px; }
.footer-links a { color: var(--text-2); font: 500 15px/1 var(--font); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; font-size: 14px; color: var(--muted); }
.footer-word { display: none; }

/* ==========================================================================
   Page transitions
   ========================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .nav-inner { gap: 24px; padding: 0 24px; }
  .nav-links > a { padding: 9px 10px; }
  .hide-mid { display: none; }
  .user-menu-name { display: none; }
  .user-menu summary { padding: 4px; }
}
@media (max-width: 1000px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-latest { display: none; }
  .sub-layout { grid-template-columns: 1fr; }
}
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 2px; padding: 20px 24px 32px; overflow-y: auto;
    background: var(--bg);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .55s var(--ease-io), visibility 0s .55s;
  }
  .nav-open .nav-links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--ease-io), visibility 0s; }
  .nav-links > a { padding: 14px 4px; font: 700 28px/1.1 var(--head); letter-spacing: -.02em; color: var(--text-2); background: none !important; }
  .nav-links > a.on { color: var(--text); }
  .nav-right { margin: 28px 0 0; flex-wrap: wrap; gap: 10px; }
  .nav-right .hide-mid, .nav-right .user-menu-name { display: inline; }
  .user-menu-list { left: 0; right: auto; }
  .nav-open { overflow: hidden; }
}
@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .wrap, .nav-inner { padding: 0 20px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .post { padding: 22px; }
  .cat-count, .thread-stats { display: none; }
  .cat-row, .thread-row, .sub-row { padding: 16px 12px; }
  .row-2, .form-grid { grid-template-columns: 1fr; }
  .edit-row-grid { grid-template-columns: 1fr 1fr; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 18px; border-top: 1px solid var(--line); }
  .table td { padding: 4px 0; border: 0; text-align: left; }
  .profile-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .q-opts-row { flex-wrap: wrap; }
  .q-opts-row select { width: 100%; }
  .announce-full, .rules { padding: 26px 22px; }
  .card { padding: 22px; }
  .card-flush { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}


/* ==========================================================================
   Chips (filters, quick links)
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-2); font: 500 14.5px/1 var(--font); text-decoration: none; transition: background .2s, color .2s; }
.chip:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.chip.is-on { background: var(--text); color: var(--bg); }
.filter-chips { margin: -8px 0 28px; }
.filter-chips .chip[style]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dept); }

/* ==========================================================================
   Announcements
   ========================================================================== */
.ann-list { display: flex; flex-direction: column; gap: 56px; }
.ann-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--accent); font-weight: 500; font-size: 15px; }
.ann-h { font-size: clamp(26px, 2.6vw, 34px); margin: 0 0 12px; }
.ann-h a { color: var(--text); text-decoration: none; }
.ann-h a:hover { color: var(--accent); }
.ann-ex { color: var(--text-2); font-size: 17px; line-height: 1.6; margin: 0 0 14px; }
.announcement-body { padding: 40px 44px; }
.announcement-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }

/* Apply page cover */
.page-head.has-cover { min-height: 340px; display: flex; align-items: flex-end; }
.page-head.has-cover > .wrap { width: 100%; }
.page-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.page-head.has-cover .skyline { display: none; }
.page-head.has-cover::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(8, 9, 10, .55) 55%, rgba(8, 9, 10, .35) 100%); }
.head-edit { margin-left: 8px; vertical-align: middle; }

/* Applicant photo uploads */
.q-help-text { margin: -2px 0 10px; }
.upload-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 28px 20px; border-radius: 14px; cursor: pointer; background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: box-shadow .2s, background .2s;
}
.upload-drop:hover, .upload-drop:focus-within { box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg-deep)); }
.upload-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-title { font: 600 16px/1.2 var(--font); }
.upload-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.upload-thumb { margin: 0; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-note { width: 100%; margin: 2px 0 0; }

/* Submission photos */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 4px; }
.thumb { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.thumb:hover img { transform: scale(1.05); }

/* ==========================================================================
   Staff dashboard
   ========================================================================== */
.tabs-inline { margin: 0; }
.admin-note { margin: -10px 0 24px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dash-stat { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: background .2s; }
.dash-stat:hover { background: var(--surface-2); color: var(--text); }
.dash-stat.is-hot { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.dash-n { font: 700 40px/1 var(--head); letter-spacing: -.03em; }
.dash-of { color: var(--muted); font-size: 22px; margin-left: 2px; }
.dash-l { color: var(--text-2); font-size: 15px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plain-strong { font-weight: 600; }
.quick { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; transition: background .2s; }
.quick:hover { background: var(--surface-2); color: var(--text); }
.quick-title { font: 600 16px/1.3 var(--font); }

.form-list { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); }
.form-row.is-closed .form-thumb, .form-row.is-closed .form-title { opacity: .55; }
.form-thumb { flex-shrink: 0; width: 120px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--dept) 25%, var(--surface-2)); text-decoration: none; }
.form-thumb img { width: 100%; height: 100%; object-fit: cover; }
.form-thumb-blank { font: 700 22px/1 var(--head); color: color-mix(in srgb, var(--dept) 60%, #fff); }
.form-main { flex: 1; min-width: 0; }
.form-title { font-size: 18px; margin: 0 0 4px; }
.form-title a { color: var(--text); text-decoration: none; }
.form-title a:hover { color: var(--accent); }
.form-main p { margin: 0; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; letter-spacing: .1em; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--surface-2); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--line); }
.more-list a, .more-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); border: 0; background: none; color: var(--text); font: 500 14.5px var(--font); text-decoration: none; cursor: pointer; }
.more-list a:hover, .more-list button:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.more-list .danger { color: var(--red); }
.more-list form { margin: 0; }

.cover-field { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.cover-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); display: grid; place-items: center; }
.cover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-preview.has-image .cover-empty { display: none; }
.cover-empty { color: var(--muted); font-size: 14px; }
.cover-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cover-controls .hint { margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.small-check { margin: 0; font-size: 14px; }
.cover-field-sm { grid-template-columns: 1fr; gap: 10px; }

.q-hint { margin: -6px 0 16px; }
.q-help { margin-top: 8px; font-size: 14.5px !important; }
.q-max-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.q-max-wrap select { width: auto; min-width: 0; padding-top: 8px; padding-bottom: 8px; }

.cat-edit { box-shadow: inset 4px 0 0 var(--dept, transparent); }
.cat-new { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); background: transparent; }
.cat-edit-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.cat-fields { display: grid; grid-template-columns: 1fr 80px 90px; gap: 12px; }
.cat-fields .label, .cat-edit-grid > div > .label:first-child { margin-top: 0; }

.ann-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; }
.ann-row:hover { background: var(--surface-2); }
.ann-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ann-title { font: 600 16.5px/1.35 var(--font); color: var(--text); text-decoration: none; }
.ann-title:hover { color: var(--accent); }
.ann-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tag-btn { border: 0; cursor: pointer; }
.tag-btn:hover { filter: brightness(1.25); }

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .cat-edit-grid, .cover-field { grid-template-columns: 1fr; }
  .cover-field-sm .cover-preview { max-width: 280px; }
}
@media (max-width: 640px) {
  .form-row { flex-wrap: wrap; }
  .form-thumb { width: 96px; }
  .form-actions { width: 100%; justify-content: flex-end; }
  .ann-row { flex-wrap: wrap; }
  .ann-actions { width: 100%; justify-content: flex-end; }
  .cat-fields { grid-template-columns: 1fr 1fr; }
  .cat-fields > div:first-child { grid-column: 1 / -1; }
  .announcement-body { padding: 26px 22px; }
  .toolbar .tabs-inline { max-width: 100%; }
}


/* ==========================================================================
   Games page
   ========================================================================== */
.head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.live-total { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); font-size: 15px; color: var(--text-2); }
.live-total strong { color: var(--text); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.group-block + .group-block { margin-top: 80px; }
.group-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.group-icon { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); font: 700 22px/1 var(--head); color: var(--text-2); }
.group-icon img { width: 100%; height: 100%; object-fit: cover; }
.group-meta { flex: 1; min-width: 200px; }
.group-meta h2 { margin: 0 0 4px; }
.group-meta p { margin: 0; }
.group-desc { color: var(--text-2); max-width: 720px; margin: 0 0 26px; font-size: 16.5px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.game-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); transition: background .25s var(--ease), transform .3s var(--ease); }
.game-card:hover { background: var(--surface-2); }
.game-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.game-card:hover .game-thumb img { transform: scale(1.04); }
.game-thumb.is-blank { display: grid; place-items: center; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), var(--surface-2); font: 700 40px/1 var(--head); color: rgba(255, 255, 255, .35); }
.game-thumb .status { position: absolute; left: 12px; top: 12px; background: rgba(7, 8, 12, .78); }
.game-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 20px 22px 22px; }
.game-body h3 { margin: 0; font-size: 20px; }
.game-body p { margin: 0 0 8px; font-size: 15px; flex: 1; }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.game-stats { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.game-playing { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.game-playing.is-zero .live-dot { background: var(--muted); }
.status-live { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.status-beta { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 70%, #fff); }
.status-development { background: color-mix(in srgb, var(--yellow) 14%, transparent); color: var(--yellow); }
.status-paused { background: rgba(255, 255, 255, .08); color: var(--muted); }

/* ==========================================================================
   Team page
   ========================================================================== */
.team-section + .team-section { margin-top: 64px; }
.team-section-title { font: 700 22px/1.2 var(--head); letter-spacing: -.015em; margin: 0 0 20px; color: var(--text-2); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.member { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border-radius: var(--r-lg); background: var(--surface); }
.member-photo { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin-bottom: 16px; background: linear-gradient(160deg, var(--surface-3), var(--surface-2)); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-initials { display: grid; place-items: center; width: 100%; height: 100%; font: 700 28px/1 var(--head); color: #fff; }
.member-name { margin: 0 0 2px; font-size: 18px; }
.member-title { margin: 0 0 10px; color: var(--accent); font-weight: 500; font-size: 15px; }
.member-bio { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.member-links { display: flex; flex-direction: column; gap: 2px; margin: auto 0 0; font-size: 14px; color: var(--muted); }
.member-links a { color: var(--text-2); text-decoration: none; }
.member-links a:hover { color: var(--accent); }
.team-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 72px; padding: 28px 32px; border-radius: var(--r-xl); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.team-cta .h-sm { margin: 0 0 4px; }
.team-cta p { margin: 0; }

/* ==========================================================================
   Staff: groups, games, team
   ========================================================================== */
.sg-group-form .cat-fields { grid-template-columns: 1fr 1.3fr; }
.cover-square { aspect-ratio: 1 / 1; max-width: 160px; }
.cover-field-person { grid-template-columns: 140px 1fr; }
.order-input { width: 64px !important; padding: 5px 8px !important; margin-left: 6px; font-size: 14px !important; display: inline-block; }
.input-short { max-width: 140px; }
.sg-games { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-left: 12px; }
.sg-game { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background .2s; }
.sg-game:hover { background: var(--surface); color: var(--text); }
.sg-game-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); font: 700 15px/1 var(--head); color: var(--muted); }
.sg-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-game-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-game-main strong { font-weight: 600; }
.sg-add { display: inline-block; padding: 10px 12px; color: var(--accent); font-weight: 500; text-decoration: none; }
.sg-add:hover { color: var(--text); }
.tm-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.tm-avatar img, .tm-avatar span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: #fff; font: 600 14px/1 var(--font); }

@media (max-width: 640px) {
  .sg-group-form .cat-fields { grid-template-columns: 1fr; }
  .cover-field-person { grid-template-columns: 1fr; }
  .sg-games { padding-left: 0; }
  .sg-game { flex-wrap: wrap; }
  .game-grid, .team-grid { grid-template-columns: 1fr; }
  .group-icon { width: 52px; height: 52px; }
}


/* ==========================================================================
   Legal pages, sign-up agreement, account data
   ========================================================================== */
.legal { padding: 40px 48px; line-height: 1.7; }
.legal-lede { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 12px; letter-spacing: -.015em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin: 8px 0; color: var(--text-2); }
.legal li strong { color: var(--text); }
.legal p { color: var(--text-2); }
.legal p strong { color: var(--text); }
.legal-table { overflow-x: auto; margin: 4px 0 16px; border-radius: 12px; background: var(--bg-deep); }
.legal-table .table { font-size: 14.5px; }
.legal-table td { color: var(--text-2); vertical-align: top; }
.legal-admin-note { margin: 0 0 20px; }
.legal-foot { margin: 20px 0 0; }
.agree-check { align-items: flex-start; margin-top: 22px; font-weight: 400; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.agree-check input { margin-top: 3px; flex-shrink: 0; }
.footer-legal { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-2); text-decoration: none; }
.footer-legal a:hover { color: var(--text); }
.data-actions { margin: 6px 0 28px; }
.data-actions .h-sm, .danger-zone .h-sm { margin-bottom: 4px; }
.data-actions .muted { margin-bottom: 12px; }
.danger-zone { padding: 22px; border-radius: 14px; background: color-mix(in srgb, var(--red) 6%, var(--bg-deep)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 25%, transparent); }
.danger-zone .label { margin-top: 14px; }
.btn-danger-solid { background: #c93636; color: #fff; }
.btn-danger-solid:hover { background: #d94444; color: #fff; }
@media (max-width: 640px) { .legal { padding: 26px 22px; } }


/* ==========================================================================
   Announcement covers, update badges
   ========================================================================== */
.ann-item.has-cover { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.ann-cover { display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.ann-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ann-item:hover .ann-cover img { transform: scale(1.04); }
.update-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); margin-left: -16px; margin-top: -18px; flex-shrink: 0; }
.tag-new { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .ann-item.has-cover { grid-template-columns: 1fr; gap: 16px; } }

/* The menu button carries the update dot on small screens, where the account menu is tucked away */
.nav-toggle { position: relative; }
.toggle-dot { position: absolute; top: 6px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
body.nav-open .toggle-dot { display: none; }

/* ==========================================================================
   Staff notes, review search, activity log, reset links, closing dates, drafts
   ========================================================================== */
.h-xs .count { vertical-align: 1px; }
.notes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.note { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.note-del { margin: 0 0 0 auto; }
.note-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; color: var(--text-2); }
.avatar-xs { width: 22px; height: 22px; font-size: 9px; }
.note-form textarea { margin-bottom: 6px; }
.note-form .hint { margin: 0 0 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--text); }
.note-count { margin-right: 10px; text-decoration: none; white-space: nowrap; }
.note-count:hover { color: var(--text); }
.review-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review-filters input[type=search] { width: 200px; }

.toolbar-note { max-width: 60ch; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); }
.activity-item:first-child { border-top: 0; }
.activity-main { min-width: 0; }
.activity-main p { margin: 0 0 2px; overflow-wrap: anywhere; }
.activity-main a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.activity-main a:hover { color: var(--text); text-decoration-color: currentColor; }
.row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.row-actions form { margin: 0; }

.reset-card p { margin: 6px 0 0; }
.copy-field { display: flex; gap: 8px; margin: 18px 0; }
.copy-field input { flex: 1; min-width: 0; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.reset-facts { padding-left: 18px; margin: 0 0 18px; display: grid; gap: 4px; }
.forgot { margin-top: 10px; text-align: center; }
.forgot summary { cursor: pointer; list-style: none; display: inline; }
.forgot summary::-webkit-details-marker { display: none; }
.forgot summary:hover { color: var(--text); }
.forgot p { margin: 8px 0 0; }

.closes { color: var(--yellow); font-weight: 500; }
.app-card .closes { margin: -2px 0 6px; }
.input-date { max-width: 220px; color-scheme: dark; }
.draft-note { background: var(--accent-soft); color: var(--text); border-radius: var(--r); padding: 10px 14px; font-size: 14px; margin: 0 0 18px; }
.draft-note .link-btn { color: var(--accent); }
@media (max-width: 760px) {
  .review-filters input[type=search] { width: 100%; }
  .review-filters, .review-filters select { width: 100%; min-width: 0; }
}

/* ==========================================================================
   Partners page
   ========================================================================== */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.partner { display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-lg); background: var(--surface); scroll-margin-top: calc(var(--nav-h) + 24px); }
.partner:target { box-shadow: 0 0 0 2px var(--accent); }
.partner-top { display: flex; align-items: center; gap: 16px; }
.partner-logo { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.partner-logo img, .partner-logo span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: #fff; font: 700 20px/1 var(--head); }
.partner-id { min-width: 0; }
.partner-name { font: 700 19px/1.25 var(--head); letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
.partner-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.partner-desc { margin: 16px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.partner-links { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding-top: 18px; }
.tm-square { border-radius: 10px; }
@media (max-width: 640px) { .partner-grid { grid-template-columns: 1fr; } }

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--accent-strong); color: var(--accent-ink); font: 600 15px/1 var(--font); text-decoration: none;
  transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; color: var(--accent-ink); }

/* ==========================================================================
   Events
   ========================================================================== */
.event-section + .event-section { margin-top: 64px; }
.event-section .team-section-title { display: flex; align-items: center; gap: 10px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); transition: background .25s var(--ease); }
.event-card:hover { background: var(--surface-2); }
.event-card.is-live { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent); }
.event-past .event-card { opacity: .7; }
.event-media { position: relative; display: block; aspect-ratio: 16 / 7; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2)); overflow: hidden; }
.event-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.event-card:hover .event-media img { transform: scale(1.03); }
.event-date { position: absolute; left: 14px; bottom: 14px; display: grid; justify-items: center; min-width: 56px; padding: 8px 10px; border-radius: 12px; background: rgba(7, 8, 12, .82); backdrop-filter: blur(6px); }
.event-date-m { font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.event-date-d { font: 700 24px/1.1 var(--head); color: var(--text); }
.event-body { padding: 18px 20px 20px; display: grid; gap: 4px; }
.event-title { font: 700 19px/1.25 var(--head); letter-spacing: -.01em; margin: 2px 0; }
.event-title a { color: var(--text); text-decoration: none; }
.event-title a:hover { color: var(--accent); }
.event-when, .event-where { margin: 0; color: var(--text-2); font-size: 14.5px; }
.event-where { color: var(--muted); }
.event-status { margin: 0; font: 600 13px/1.3 var(--font); color: var(--accent); }
.event-status.st-live { color: var(--green); }
.event-status.st-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: 1px; }
.event-status.st-past { color: var(--muted); }
.event-status-lg { font-size: 15px; margin-top: 10px; }
.event-facts dl { margin: 0 0 18px; display: grid; gap: 12px; }
.event-facts dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.event-facts dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.event-facts dd { margin: 0; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.list-heading { margin: 28px 0 12px; }
.list-heading:first-child { margin-top: 0; }
.is-dim { opacity: .75; }
.tz-hint:has(> [data-tz-name]:empty) { display: none; }
@media (max-width: 640px) {
  .event-grid { grid-template-columns: 1fr; }
  .event-facts dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Reviewing: Save & next; applicants: withdraw */
.decision-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.decision-actions .btn { flex: 1 1 auto; }
.next-count { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 4px; }
.withdraw-form { margin: 12px 0 0; }

/* ==========================================================================
   Discord login, account connection
   ========================================================================== */
.btn-discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; color: #fff; }
.btn-discord svg { flex-shrink: 0; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.or-line span { white-space: nowrap; }
.discord-linked { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.discord-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #5865f2; color: #fff; }
.inline-check { margin: 14px 0 4px; }
.verified { color: var(--green); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.setup-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.auth-card .center.hint { margin-top: 8px; }

/* Messages ("Saved", "The bot works"…) pop up at the bottom of the screen, so they're seen wherever the page is scrolled */
.flash-wrap { position: fixed; z-index: 95; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); padding: 0; animation: flash-in .45s var(--ease) both; }
.flash-wrap .flash { margin: 0; display: flex; align-items: flex-start; gap: 14px; box-shadow: 0 20px 60px -12px rgba(0, 0, 0, .75), 0 0 0 1px var(--line); }
.flash-wrap .flash-success { background: color-mix(in srgb, var(--green) 14%, var(--surface-2)); }
.flash-wrap .flash-error { background: color-mix(in srgb, var(--red) 16%, var(--surface-2)); }
.flash-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.flash-close { flex: 0 0 auto; margin: -4px -6px 0 0; padding: 2px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: 400 22px/1 var(--font); cursor: pointer; opacity: .7; }
.flash-close:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.flash-wrap.is-leaving { transition: opacity .4s, transform .4s; opacity: 0; transform: translate(-50%, 12px); }
/* Slide only: the message is fully visible even if animations are paused or never run */
@keyframes flash-in { from { transform: translate(-50%, 16px); } to { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .flash-wrap { animation: none; } }
