/* ==========================================================================
   osu?rimu！ website stylesheet
   Hand-written, no framework, no CDN.  ppy.sh inspired dark theme.
   ========================================================================== */

:root {
  --bg: #1b1418;
  --bg-deep: #130e11;
  --bg-soft: #221920;
  --panel: #271d23;
  --panel-2: #30242b;
  --panel-3: #3b2c34;
  --border: #3b2d35;
  --border-soft: #31252c;
  --text: #f4eef1;
  --text-soft: #d9cdd3;
  --muted: #b3a3ad;
  --faint: #8b7a84;
  --accent: #ff66aa;
  --accent-strong: #ff8ec2;
  --accent-dark: #2a111c;
  --purple: #8866ff;
  --purple-soft: #b18cff;
  --success: #7ee2a8;
  --warning: #ffd166;
  --danger: #ff6b81;
  --relax: #66e0c2;
  --autopilot: #b18cff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  --max-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #1a1418;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #ffb8d8;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(255, 102, 170, 0.35);
  color: #fff;
}

/* Scrollbar ---------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border-radius: 8px;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: #4a3c43;
}

/* Accessibility helpers ---------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #1a1013;
  font-weight: 700;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Layout ------------------------------------------------------------------ */
.container {
  width: min(var(--max-width), 100% - 32px);
  margin-inline: auto;
}

.page {
  padding: 26px 0 72px;
  min-height: 55vh;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.08);
}

.card-title {
  font-size: 17px;
  letter-spacing: 0.01em;
}

.card-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 18px;
}

.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.06);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.grid-friends {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* Top bar ----------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(24, 19, 21, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-osu {
  color: var(--text);
}

.brand-rimu {
  color: var(--accent);
  text-shadow: 0 0 22px rgba(255, 102, 170, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  color: #1c1116;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(255, 102, 170, 0.28);
}

.nav-link-sub {
  color: var(--muted);
  font-weight: 500;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.account-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.account-user:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.account-name {
  font-size: 13.5px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
  width: 42px;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text-soft);
}

/* Avatars ----------------------------------------------------------------- */
.avatar {
  display: inline-block;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}

.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg {
  width: 128px;
  height: 128px;
  border-radius: 20px;
  border: 2px solid rgba(255, 102, 170, 0.5);
  box-shadow: var(--shadow);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #220f18;
  box-shadow: 0 6px 18px rgba(255, 102, 170, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  color: #220f18;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--panel-3);
  color: var(--text);
}

.btn-danger {
  background: rgba(255, 107, 129, 0.14);
  border-color: rgba(255, 107, 129, 0.45);
  color: #ffb3bd;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 107, 129, 0.26);
  color: #ffd7dc;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11.5px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* Pills / chips ----------------------------------------------------------- */
.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.pill.is-active {
  background: var(--accent);
  color: #221016;
  box-shadow: 0 3px 12px rgba(255, 102, 170, 0.25);
}

.pill-metric.is-active {
  background: var(--accent-strong);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #231016;
  background: var(--accent);
}

.mode-chip.mode-relax { background: var(--relax); }
.mode-chip.mode-autopilot { background: var(--autopilot); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-accent {
  border-color: rgba(255, 102, 170, 0.5);
  background: rgba(255, 102, 170, 0.14);
  color: var(--accent-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.tag-owner {
  background: #ffd166;
  color: #241405;
}

.tag-admin {
  background: #ff66aa;
  color: #1d1017;
}

/* Flashes ----------------------------------------------------------------- */
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.flash {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 13.5px;
  box-shadow: var(--shadow);
}

.flash-success {
  border-color: rgba(126, 226, 168, 0.4);
  background: rgba(126, 226, 168, 0.1);
  color: #c9f7dc;
}

.flash-error {
  border-color: rgba(255, 107, 129, 0.42);
  background: rgba(255, 107, 129, 0.12);
  color: #ffc6ce;
}

.flash-info {
  border-color: rgba(255, 102, 170, 0.35);
  background: rgba(255, 102, 170, 0.1);
  color: var(--text);
}

/* Home -------------------------------------------------------------------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  padding: 30px;
  background: var(--panel);
  border-color: rgba(255, 102, 170, 0.25);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.lead {
  max-width: 46ch;
  color: var(--text-soft);
  font-size: 14.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.hero-stat:last-child {
  grid-column: 1 / -1;
}

.hero-stat-num {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  color: var(--muted);
  font-size: 11.5px;
}

.announcement .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13.5px;
}

/* Tables ------------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
}

.board-table {
  width: 100%;
  font-size: 13.5px;
}

.board-table thead th {
  padding: 10px 14px;
  text-align: left;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.board-table tbody td {
  padding: 9px 14px;
  border-top: 1px solid var(--border-soft);
  vertical-align: middle;
}

.board-table tbody tr:first-child td {
  border-top: none;
}

.board-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.board-table-compact tbody td {
  padding: 7px 12px;
}

.col-rank {
  width: 64px;
}

.col-num {
  text-align: right;
  white-space: nowrap;
}

.col-action,
.col-actions {
  text-align: right;
  white-space: nowrap;
}

th.col-num {
  text-align: right;
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.rank-1 {
  color: #241a06;
  background: #ffd166;
  box-shadow: 0 2px 10px rgba(255, 209, 102, 0.3);
}

.rank-2 {
  color: #1c2228;
  background: #dbe3ea;
}

.rank-3 {
  color: #2a190e;
  background: #e9a06f;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.user-link {
  color: var(--text);
  font-weight: 600;
}

.user-link:hover {
  color: var(--accent-strong);
}

.score-map {
  min-width: 240px;
  max-width: 460px;
}

.score-map > a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}

.score-map > a:hover {
  color: var(--accent-strong);
}

.score-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.score-counts {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.mods {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.mod {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  padding: 3px 4px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.mod-hd, .mod-fl { background: #3d3a5c; color: #d9d4ff; }
.mod-hr { background: #5c3a3a; color: #ffd0d0; }
.mod-dt, .mod-nc { background: #5c4a2e; color: #ffe4b0; }
.mod-ez { background: #2e5c45; color: #c8f5dc; }
.mod-ht { background: #2e4c5c; color: #c8e8f5; }
.mod-rx { background: #2e5c57; color: #bff5ee; }
.mod-ap { background: #493060; color: #e5d0ff; }
.mod-cl { background: #60304a; color: #ffd0e6; }
.mod-nf, .mod-sd, .mod-pf { background: #4a3b30; color: #f0ddc8; }
.mod-none { font-family: var(--mono); font-size: 10px; }

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.mark-x, .mark-s { background: rgba(255, 209, 102, 0.2); color: #ffd166; }
.mark-a { background: rgba(126, 226, 168, 0.18); color: #7ee2a8; }
.mark-b { background: rgba(102, 204, 255, 0.15); color: #9ad0ff; }
.mark-c { background: rgba(177, 140, 255, 0.16); color: #c9b0ff; }
.mark-d, .mark-f { background: rgba(255, 107, 129, 0.16); color: #ff9aa7; }

.stars {
  color: var(--warning);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pp-none {
  color: var(--faint);
  font-size: 11.5px;
  font-style: italic;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Page headers ------------------------------------------------------------ */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.page-header-tight {
  margin-top: 16px;
}

.page-title {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Empty states ------------------------------------------------------------ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 22px;
  text-align: center;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
}

.empty-text {
  max-width: 52ch;
  color: var(--muted);
  font-size: 13px;
}

.empty-state-sm {
  padding: 22px 16px;
}

/* Player profile ---------------------------------------------------------- */
.profile-hero {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background-color: var(--panel);
  background-image: var(--profile-banner);
  background-size: cover;
  background-position: center 35%;
  min-height: 178px;
}

.profile-hero-inner {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 28px 24px 22px;
  flex-wrap: wrap;
}

.profile-avatar {
  position: relative;
  line-height: 0;
}

.profile-identity {
  flex: 1;
  min-width: 220px;
}

.profile-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.profile-sub {
  margin-top: 4px;
  font-size: 12px;
}

.profile-actions {
  align-self: flex-start;
}

.dot-sep {
  color: var(--faint);
}

.presence-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--panel);
  background: var(--faint);
}

.presence-dot.presence-online,
.presence-dot.presence-selecting,
.presence-dot.presence-playing,
.presence-dot.presence-afk {
  background: var(--success);
  box-shadow: 0 0 10px rgba(126, 226, 168, 0.6);
}

.presence-dot.presence-selecting { background: var(--warning); }
.presence-dot.presence-playing { background: var(--accent); }
.presence-dot.presence-afk {
  background: var(--warning);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.45);
}

.presence-label { font-weight: 600; }
.presence-label.presence-offline { color: var(--faint); }
.presence-label.presence-online { color: var(--success); }
.presence-label.presence-selecting { color: var(--warning); }
.presence-label.presence-playing { color: var(--accent); }
.presence-label.presence-afk { color: var(--warning); }

.friend-map {
  display: block;
  margin-top: 2px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-map:hover { color: var(--accent-strong); }

.profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}

.stat-label {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stat-value.accent {
  color: var(--accent);
}

.stat-grid-admin {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

/* Beatmap board ----------------------------------------------------------- */
.beatmap-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: var(--panel);
}

.beatmap-hero-main {
  flex: 1;
  min-width: 260px;
}

.beatmap-title {
  margin: 6px 0 8px;
  font-size: clamp(22px, 3.2vw, 30px);
  letter-spacing: -0.02em;
}

.beatmap-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.difficulty-name {
  color: var(--accent-strong);
  font-weight: 600;
}

.beatmap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.beatmap-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.personal-best {
  margin-bottom: 16px;
  border-color: rgba(255, 102, 170, 0.35);
}

.personal-best-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.personal-best-grid > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Friends ----------------------------------------------------------------- */
.friend-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--border-soft);
}

.friend-row:first-child {
  border-top: none;
}

.friend-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.friend-avatar {
  position: relative;
  line-height: 0;
}

.friend-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.friend-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.add-friend-form {
  flex-wrap: nowrap;
}

/* Punctuation for inputs --------------------------------------------------- */
.input {
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--faint);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 170, 0.18);
}

.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.input-lg {
  padding: 12px 16px;
  font-size: 15px;
}

.input-xs {
  width: 100px;
  padding: 4px 8px;
  font-size: 12px;
}

.input-file {
  padding: 8px;
  cursor: pointer;
}

.input-file::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #221016;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Forms ------------------------------------------------------------------- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field > label {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.form-help {
  color: var(--faint);
  font-size: 11.5px;
}

.form-help + .form-field {
  margin-top: 0;
}

.notice {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.notice-warning {
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.1);
  color: #ffe4a3;
}

/* Search ------------------------------------------------------------------ */
.search-panel {
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
}

.search-form .input {
  flex: 1;
}

.search-status {
  padding: 0 18px 14px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.search-card {
  display: flex;
  flex-direction: column;
}

.search-cover {
  position: relative;
  aspect-ratio: 900 / 250;
  background-color: var(--bg-deep);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-soft);
}

.search-cover-empty {
  background-color: #2a1e25;
}

.cover-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 23, 25, 0.85);
  border: 1px solid rgba(255, 102, 170, 0.5);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.search-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1;
}

.search-title {
  font-size: 16px;
}

.search-title a {
  color: var(--text);
}

.search-title a:hover {
  color: var(--accent-strong);
}

.search-artist {
  color: var(--muted);
  font-size: 12.5px;
}

.diff-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.diff-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 12.5px;
}

.diff-row:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.diff-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diff-stars {
  color: var(--warning);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.diff-hits {
  color: var(--accent-strong);
  font-size: 10.5px;
  white-space: nowrap;
}

.diff-md5 {
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.search-hint {
  border-style: dashed;
}

/* Auth -------------------------------------------------------------------- */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 26px 0;
}

.auth-card {
  width: min(440px, 100%);
}

.auth-header {
  padding: 26px 26px 0;
}

.auth-header .page-subtitle {
  margin-top: 6px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px 26px 26px;
}

.auth-footer {
  padding: 14px 26px;
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.link {
  font-weight: 600;
}

/* Settings ---------------------------------------------------------------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.avatar-settings {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.avatar-settings form {
  flex: 1;
  min-width: 220px;
}

.avatar-preview-wrap {
  position: relative;
  line-height: 0;
}

.avatar-preview {
  border: 2px dashed rgba(255, 102, 170, 0.7);
}

.mode-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.mode-option:hover {
  border-color: var(--panel-3);
  color: var(--text);
}

.mode-option:has(input:checked) {
  border-color: rgba(255, 102, 170, 0.6);
  background: rgba(255, 102, 170, 0.12);
  color: var(--text);
}

.mode-option input {
  accent-color: var(--accent);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.info-list > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-list dt {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info-list dd {
  margin: 0;
  font-size: 13.5px;
}

/* Admin ------------------------------------------------------------------- */
.admin-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.admin-reset-form {
  gap: 5px;
}

.admin-table td {
  vertical-align: middle;
}

/* Changelog --------------------------------------------------------------- */
.changelog-card {
  max-width: 860px;
}

.changelog-entry {
  padding: 22px 24px;
  border-top: 1px solid var(--border-soft);
}

.changelog-entry:first-child {
  border-top: none;
}

.changelog-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.changelog-version {
  font-size: 18px;
}

.changelog-date {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.changelog-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.changelog-entry-muted {
  color: var(--muted);
}

/* Error pages ------------------------------------------------------------- */
.error-card {
  width: min(560px, 100%);
  padding: 34px 28px;
  text-align: center;
}

.error-card .hero-actions {
  justify-content: center;
}

.error-code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

/* Pagination -------------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border-top: 1px solid var(--border-soft);
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}

.page-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.page-link.is-active {
  color: #221016;
  background: var(--accent);
  border-color: var(--accent);
}

/* Footer ------------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(18, 14, 16, 0.7);
  padding: 22px 0;
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 12px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.footer-brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-meta strong {
  color: var(--text-soft);
  font-family: var(--mono);
}

.footer-sep {
  color: var(--border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-placeholder {
  color: var(--panel-3);
  cursor: default;
}

.footer-copy {
  color: var(--faint);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid-admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2,
  .grid-friends {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 0;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .account {
    order: 1;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border-soft);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius-sm);
    padding: 10px 12px;
  }

  .account-name {
    display: none;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-best-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beatmap-hero-actions {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 20px);
  }

  .page {
    padding-top: 18px;
  }

  .hide-sm {
    display: none;
  }

  .stat-grid,
  .stat-grid-admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 16px;
  }

  .profile-hero-inner {
    padding: 20px 16px 16px;
    gap: 14px;
  }

  .avatar-lg {
    width: 88px;
    height: 88px;
  }

  .profile-name {
    font-size: 24px;
  }

  .board-table {
    font-size: 12.5px;
  }

  .board-table thead th {
    padding: 8px 10px;
  }

  .board-table tbody td {
    padding: 8px 10px;
  }

  .col-rank {
    width: 48px;
  }

  .score-map {
    min-width: 0;
    max-width: none;
  }

  .score-map > a {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .search-form {
    flex-direction: column;
    padding: 14px;
  }

  .search-form .btn {
    width: 100%;
  }

  .friend-row {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .friend-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .add-friend-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .add-friend-form .input {
    flex: 1;
  }

  .info-list,
  .personal-best-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .changelog-entry {
    padding: 18px 16px;
  }

  .empty-state {
    padding: 28px 16px;
  }

  .card-header,
  .card-body {
    padding: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hide-xs {
    display: none;
  }

  .hero-actions .btn,
  .auth-form .btn {
    width: 100%;
  }

  .home-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-header {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Owner console ----------------------------------------------------------- */
.announcement-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.owner-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.owner-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
}

.checkbox-inline {
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.owner-dl {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.owner-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-soft);
  padding-bottom: 6px;
}

.owner-dl > div:last-child {
  border-bottom: none;
}

.owner-dl dt {
  color: var(--muted);
  flex: 0 0 auto;
}

.owner-dl dd {
  margin: 0;
  text-align: right;
  word-break: break-all;
}

.owner-table details.row-actions {
  display: inline-block;
}

.owner-table .row-actions summary {
  cursor: pointer;
  list-style: none;
}

.owner-table .row-actions summary::-webkit-details-marker {
  display: none;
}

.row-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  min-width: 240px;
}

.owner-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.owner-feed li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
}

.owner-feed li:first-child {
  border-top: none;
}

.owner-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-create .inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.log-view {
  margin: 0;
  padding: 14px 16px;
  max-height: 420px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-soft);
  background: #141011;
  border-top: 1px solid var(--border-soft);
  white-space: pre-wrap;
  word-break: break-all;
}

.badge-danger {
  background: rgba(255, 107, 129, 0.16);
  color: var(--danger);
}

.owner-table tr.is-banned td {
  opacity: 0.55;
}

/* ==========================================================================
   osu!rimu visual refresh
   Reworked top bar, solid-colour heroes, ranking table, profile tabs and the
   beatmap library page.  Everything below is hand-written, local-only assets.
   ========================================================================== */

/* Top bar ---------------------------------------------------------------- */
.topbar {
  background: rgba(20, 15, 18, 0.9);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ff66aa;
  color: #200e17;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow:
    0 6px 18px rgba(255, 102, 170, 0.38),
    inset 0 -2px 6px rgba(0, 0, 0, 0.28),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.04);
  box-shadow:
    0 8px 22px rgba(255, 102, 170, 0.5),
    inset 0 -2px 6px rgba(0, 0, 0, 0.28);
}

.brand-word {
  color: var(--text);
  transition: color 0.15s ease;
}

.brand:hover .brand-word {
  color: var(--accent-strong);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  color: #1e0f16;
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(255, 102, 170, 0.32);
}

.nav-link-muted {
  color: var(--faint);
  cursor: default;
}

.nav-link-muted:hover {
  color: var(--faint);
  background: transparent;
}

.nav-link-danger {
  color: #ff9aa7;
}

.nav-link-danger:hover {
  color: #ffc6ce;
  background: rgba(255, 107, 129, 0.12);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.topbar-online strong {
  color: var(--text);
  font-family: var(--mono);
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(126, 226, 168, 0.85);
  flex: none;
}

.topbar-search {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topbar-search:hover,
.topbar-search.is-active {
  color: var(--text);
  border-color: rgba(255, 102, 170, 0.55);
  background: rgba(255, 102, 170, 0.12);
}

.account {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
}

.account-user {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.account-user:hover {
  border-color: rgba(255, 102, 170, 0.45);
  background: rgba(255, 102, 170, 0.12);
}

.nav-link-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  padding: 7px 9px;
}

.nav-mobile-account {
  display: none;
}

/* Shared heroes ------------------------------------------------------------ */
.osu-hero {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 102, 170, 0.28);
  background: var(--panel);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
  padding: 34px;
}

.home-hero-copy {
  min-width: 0;
}

.home-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: -0.03em;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}

.hero-stat:last-child {
  grid-column: 1 / -1;
}

.hero-stat-accent {
  border-color: rgba(255, 102, 170, 0.45);
  background: rgba(255, 102, 170, 0.14);
}

.hero-stat-num {
  font-size: 25px;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.hero-stat-accent .hero-stat-num {
  color: var(--accent-strong);
}

.hero-stat-label {
  color: var(--muted);
  font-size: 11.5px;
}

.coming-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.coming-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.coming-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 102, 170, 0.28);
  background: rgba(255, 102, 170, 0.12);
  color: var(--accent-strong);
  font-size: 16px;
}

.coming-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.coming-note {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
}

.page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  margin-bottom: 16px;
}

.page-hero-copy {
  flex: 1;
  min-width: 260px;
}

.page-hero .page-title {
  margin-top: 6px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.page-hero .page-subtitle {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.page-hero-note {
  margin-top: 10px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 12.5px;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Ranking / board tables -------------------------------------------------- */
.board-table-osu thead th {
  padding: 11px 14px;
  background: rgba(0, 0, 0, 0.18);
}

.board-table-osu tbody td {
  padding: 10px 14px;
}

.board-table-osu tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.board-table-osu tbody tr:hover {
  background: rgba(255, 102, 170, 0.06);
}

th.is-sorted {
  color: var(--accent-strong);
}

.value-accent {
  color: var(--accent-strong);
  font-weight: 700;
}

.user-cell-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.user-cell-text .small {
  color: var(--faint);
  font-size: 11px;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.rank-table .col-country {
  width: 78px;
}

.value-column-note {
  color: var(--faint);
  font-size: 10.5px;
}

/* Profile tabs ------------------------------------------------------------ */
.profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.profile-stats {
  margin-bottom: 4px;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 18px 0 16px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
}

.profile-tab {
  appearance: none;
  border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.profile-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.profile-tab.is-active {
  background: var(--accent);
  color: #231016;
  box-shadow: 0 4px 16px rgba(255, 102, 170, 0.32);
}

.profile-panel {
  margin-bottom: 16px;
}

.profile-panels.is-tabbed .profile-panel {
  display: none;
}

.profile-panels.is-tabbed .profile-panel.is-active {
  display: block;
}

.profile-about {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-about-text {
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13.5px;
}

/* Beatmap library --------------------------------------------------------- */
.library-hero {
  margin-bottom: 16px;
}

.library-toolbar {
  margin-bottom: 16px;
}

.library-search {
  flex-wrap: wrap;
  padding: 16px 18px 12px;
}

.library-search .input {
  flex: 1 1 280px;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 0 18px 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filter-label {
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.library-summary {
  padding: 0 18px 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

.library-summary strong {
  color: var(--text);
  font-family: var(--mono);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.map-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.map-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 102, 170, 0.42);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.map-cover {
  position: relative;
  display: block;
  aspect-ratio: 900 / 250;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background-color: #2a1d26;
}

.map-cover-letter {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 8px;
  font-size: clamp(44px, 7vw, 62px);
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.map-cover-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-cover-stars {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(19, 14, 17, 0.82);
  border: 1px solid rgba(255, 209, 102, 0.5);
  color: var(--warning);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.map-cover-mode {
  position: absolute;
  z-index: 3;
  left: 10px;
  top: 10px;
}

.map-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 16px 18px 18px;
}

.map-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-card-title {
  font-size: 16.5px;
  line-height: 1.3;
}

.map-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--text);
}

.map-card-title a:hover {
  color: var(--accent-strong);
}

.map-card-artist {
  color: var(--muted);
  font-size: 12.5px;
}

.map-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.map-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.map-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.map-stats dt {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-stats dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.map-pagination {
  margin-top: 16px;
}

/* Small refinements ------------------------------------------------------- */
.card {
  border-radius: var(--radius-lg);
}

.announcement-text {
  line-height: 1.65;
}

.empty-state .empty-title {
  color: var(--text);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1120px) {
  .topbar-online {
    display: none;
  }

  .nav-link {
    padding: 8px 10px;
  }
}

@media (max-width: 1024px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 26px;
  }

  .coming-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    order: 1;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .topbar-tools {
    display: none;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 6px;
    border-top: 1px solid var(--border-soft);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius-sm);
    padding: 10px 12px;
  }

  .nav-mobile-account {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
  }

  .nav-mobile-title {
    padding: 2px 12px 4px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav-mobile-online {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 12px;
  }

  .nav-mobile-online strong {
    color: var(--text);
    font-family: var(--mono);
  }

  .page-hero {
    padding: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .map-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 20px;
    gap: 18px;
  }

  .page-hero {
    padding: 18px;
  }

  .map-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-search {
    padding: 14px;
  }

  .library-filters {
    padding: 0 14px 12px;
  }

  .library-summary {
    padding: 12px 14px 14px;
  }

  .profile-tab {
    padding: 8px 14px;
  }

  .map-card-body {
    padding: 14px;
  }

  .map-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .map-card,
  .map-card:hover {
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   batch-04 refresh
   osu!-like top navigation (inline SVG icons + dropdown panels), player
   profile hero, online beatmap search and the about/status page.
   No keyframes and no motion effects: only hover colour changes.
   ========================================================================== */

/* Motion guard: the redesign intentionally has no animated elements. */
.brand-mark,
.brand:hover .brand-mark,
.map-card,
.map-card:hover {
  transform: none;
  transition: none;
}

.btn {
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: none;
}

/* Top navigation ---------------------------------------------------------- */
.topbar-inner {
  gap: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.2;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.86;
}

.nav-link.is-active .nav-icon {
  opacity: 1;
}

.nav-caret {
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

.nav-item {
  position: relative;
  display: inline-flex;
  flex: none;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.nav-trigger {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-trigger:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-trigger.is-active {
  color: #1e0f16;
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(255, 102, 170, 0.32);
}

.nav-placeholder {
  color: var(--faint);
  cursor: default;
  gap: 7px;
}

.nav-placeholder:hover {
  color: var(--faint);
  background: transparent;
}

.nav-coming {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Dropdown panels: rounded, shadowed, instant (no animation). */
.nav-dropdown,
.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 248px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown,
.nav-item.is-open > .nav-dropdown {
  display: flex;
}

.nav-dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-link:hover {
  color: var(--text);
  background: rgba(255, 102, 170, 0.12);
}

.nav-dropdown-title {
  font-size: 13px;
  font-weight: 600;
}

.nav-dropdown-desc {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

/* Account menu (top right) ------------------------------------------------ */
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-search .nav-icon {
  width: 15px;
  height: 15px;
}

.account-menu {
  position: relative;
}

.account-user {
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  cursor: pointer;
}

.account-caret {
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

.account-dropdown {
  right: 0;
  left: auto;
  min-width: 216px;
}

.account-menu:hover > .account-dropdown,
.account-menu:focus-within > .account-dropdown,
.account-menu.is-open > .account-dropdown {
  display: flex;
}

.account-dropdown-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 11px 9px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border-soft);
}

.account-dropdown-name {
  font-size: 13.5px;
  font-weight: 700;
}

.account-dropdown-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.account-dropdown-link {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.account-dropdown-link:hover {
  color: var(--text);
  background: rgba(255, 102, 170, 0.12);
}

.account-dropdown-logout {
  color: #ff9aa7;
}

.account-dropdown-logout:hover {
  color: #ffc6ce;
  background: rgba(255, 107, 129, 0.14);
}

/* Shared page furniture --------------------------------------------------- */
.page-hero {
  margin-bottom: 16px;
}

.page-hero-actions-col {
  flex-direction: column;
  align-items: stretch;
}

.search-hero {
  margin-bottom: 16px;
}

.about-hero {
  margin-bottom: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 226, 168, 0.45);
  background: rgba(126, 226, 168, 0.12);
  color: #c9f7dc;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Player profile hero ----------------------------------------------------- */
.player-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel);
  margin-bottom: 14px;
}

.player-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 208px;
  padding: 16px 22px;
  background-color: #241a20;
  background-image: var(--profile-banner);
  box-shadow: inset 0 -140px 120px -60px rgba(19, 14, 17, 0.85);
  background-size: cover;
  background-position: center 40%;
}

.player-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.player-banner-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.36);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.player-hero-body {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  padding: 0 24px 18px;
}

.player-avatar-wrap {
  margin-top: -72px;
  position: relative;
  line-height: 0;
}

.player-avatar {
  position: relative;
  width: max-content;
  line-height: 0;
}

.avatar-player {
  width: 144px;
  height: 144px;
  border-radius: 24px;
  border: 4px solid var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.player-avatar .presence-dot {
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-width: 4px;
}

.player-identity {
  min-width: 0;
  padding-top: 16px;
}

.player-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.player-presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
}

.player-rank-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: -36px;
  padding: 15px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 102, 170, 0.32);
  background: var(--panel-2);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.player-rank-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.player-rank-value {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.player-rank-empty {
  color: var(--muted);
  font-size: 20px;
}

.player-rank-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.player-rank-stats dt {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.player-rank-stats dd {
  margin: 2px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.player-hero-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.13);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.player-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0;
}

.player-facts > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player-facts dt {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.player-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.profile-about {
  gap: 16px;
}

.profile-about .info-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Online beatmap search (/beatmaps) --------------------------------------- */
.search-toolbar {
  margin-bottom: 16px;
}

.search-toolbar .search-form {
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.search-toolbar .search-form .input {
  flex: 1 1 280px;
}

.search-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 16px;
}

.search-filters .filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-filters .search-filter-note {
  margin: 0;
}

.search-filters .search-filter-note strong {
  color: var(--accent-strong);
}

.search-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  margin: 0 2px 12px;
}

.bm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bm-card {
  display: flex;
  flex-direction: column;
}

.bm-cover {
  position: relative;
  display: block;
  aspect-ratio: 900 / 250;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background-color: #2a1d26;
}

.bm-cover-letter {
  position: absolute;
  z-index: 0;
  left: 16px;
  bottom: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(40px, 6vw, 58px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.bm-cover-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bm-cover-tags {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bm-cover-tags .chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(19, 14, 17, 0.78);
  color: var(--text-soft);
  backdrop-filter: blur(4px);
}

.bm-cover-mode {
  color: var(--accent-strong);
}

.bm-cover-status {
  color: var(--muted);
  text-transform: uppercase;
}

.bm-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 16px 18px 18px;
}

.bm-head {
  min-width: 0;
}

.bm-title {
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.bm-title a {
  color: var(--text);
}

.bm-title a:hover {
  color: var(--accent-strong);
}

.bm-artist {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.bm-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.bm-meta dt {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bm-meta dd {
  margin: 1px 0 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-diffs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-diff {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 12.5px;
}

a.bm-diff:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.bm-diff-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-diff-stars {
  color: var(--warning);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.bm-diff-mode {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.bm-diff-muted {
  opacity: 0.72;
}

.bm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.search-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.search-page-note {
  margin-left: 8px;
}

.search-placeholder {
  border-style: dashed;
}

/* About / status page ----------------------------------------------------- */
.about-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.stat-accent {
  border-color: rgba(255, 102, 170, 0.4);
  background: rgba(255, 102, 170, 0.1);
}

.about-grid {
  margin-top: 16px;
}

.about-note {
  margin-top: 12px;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-soft);
}

.about-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.about-list strong {
  font-size: 13.5px;
}

.about-links {
  margin-top: 16px;
}

.about-links + .card {
  margin-top: 16px;
}

.about-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.about-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
}

.about-link:hover {
  color: var(--text);
  border-color: rgba(255, 102, 170, 0.45);
  background: rgba(255, 102, 170, 0.08);
}

.about-link strong {
  font-size: 14px;
}

/* Responsive refinements -------------------------------------------------- */
@media (max-width: 1120px) {
  .topbar-inner {
    gap: 10px;
  }

  .nav-link {
    padding: 8px 9px;
    font-size: 13.5px;
  }

  .nav-coming {
    display: none;
  }

  .account-name {
    max-width: 96px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .player-hero-body {
    grid-template-columns: 152px minmax(0, 1fr);
  }

  .player-rank-card {
    grid-column: 1 / -1;
    margin-top: 14px;
  }

  .player-facts {
    gap: 18px;
  }

  .bm-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bm-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .topbar-tools {
    display: none;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-item {
    display: block;
    width: 100%;
  }

  .nav-item::after {
    display: none;
  }

  .nav-trigger {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  .nav-trigger .nav-caret {
    margin-left: auto;
  }

  .nav-coming {
    display: inline-block;
    margin-left: auto;
  }

  .nav-dropdown {
    position: static;
    display: none;
    min-width: 0;
    margin: 2px 0 8px 10px;
    padding: 4px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--border-soft);
    box-shadow: none;
  }

  .nav-item:hover > .nav-dropdown {
    display: none;
  }

  .nav-item:focus-within > .nav-dropdown,
  .nav-item.is-open > .nav-dropdown {
    display: flex;
  }

  .nav-dropdown-link {
    padding: 9px 11px;
  }

  .player-hero-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 16px;
    gap: 4px;
  }

  .player-avatar-wrap {
    margin-top: -64px;
  }

  .avatar-player {
    width: 120px;
    height: 120px;
    border-radius: 20px;
  }

  .player-identity {
    padding-top: 4px;
  }

  .player-rank-card {
    margin-top: 12px;
  }

  .player-hero-footer {
    padding: 14px 16px 16px;
  }

  .player-facts {
    width: 100%;
    justify-content: space-between;
  }

  .profile-toolbar {
    margin: 12px 0;
  }

  .search-pagination {
    justify-content: flex-start;
  }

  .search-page-note {
    width: 100%;
    margin-left: 0;
  }

  .about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-hero {
    padding: 18px;
  }

  .page-hero-actions {
    width: 100%;
  }

  .page-hero-actions .btn,
  .page-hero-actions .status-pill {
    flex: 1 1 auto;
  }

  .player-banner {
    min-height: 168px;
    padding: 12px 16px;
  }

  .player-name {
    font-size: 25px;
  }

  .player-rank-value {
    font-size: 30px;
  }

  .player-rank-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-about .info-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bm-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-toolbar .search-form {
    padding: 14px;
  }

  .search-toolbar .search-form .input {
    flex: none;
    width: 100%;
  }

  .search-toolbar .search-form .btn {
    width: 100%;
  }

  .search-filters {
    padding: 12px 14px 14px;
  }

  .bm-body {
    padding: 14px;
  }

  .bm-actions .btn {
    flex: 1 1 auto;
  }

  .search-summary {
    margin: 0 0 10px;
  }

  .about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-link-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-facts {
    gap: 12px 18px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 13px;
  }

  .profile-about .info-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-rank-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-hero-footer .player-actions .btn {
    flex: 1 1 auto;
  }

  .bm-cover-tags .chip {
    font-size: 10px;
  }
}

/* Collapsed difficulty list on search cards ------------------------------- */
.bm-details {
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.bm-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.bm-details-summary::-webkit-details-marker {
  display: none;
}

.bm-details-summary:hover {
  color: var(--accent-strong);
}

.bm-details-hint {
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
}

.bm-details[open] .bm-details-hint {
  color: var(--accent-strong);
}

.bm-diff-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.bm-diff-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
}

.bm-diff-item:hover {
  border-color: var(--border);
}

.bm-diff-item .bm-diff-name {
  flex: 1 1 110px;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-diff-item .bm-diff-stars {
  color: var(--warning);
  font-family: var(--mono);
  font-weight: 700;
}

.bm-diff-item .bm-diff-mode {
  color: var(--faint);
  font-size: 10.5px;
}

.bm-diff-params {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.bm-diff-board {
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.bm-diff-board:hover {
  color: #ffb8d8;
}

.bm-diff-board-none {
  color: var(--faint);
  font-weight: 500;
}

/* Beatmapset detail page -------------------------------------------------- */
.set-hero {
  margin-bottom: 16px;
}

.set-cover {
  position: relative;
  aspect-ratio: 900 / 250;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background-color: #2a1d26;
}

.set-cover-letter {
  position: absolute;
  left: 22px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.set-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.set-cover-tags {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.set-cover-tags .chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(19, 14, 17, 0.82);
  color: var(--text-soft);
}

.set-hero-body {
  padding: 20px 24px 24px;
}

.set-title {
  margin: 6px 0 0;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.set-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.set-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.set-meta-grid dt {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.set-meta-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.set-boards {
  margin-top: 16px;
}

.set-boards-header {
  margin-bottom: 12px;
}

.set-diff {
  margin-bottom: 12px;
}

.set-diff-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}

.set-diff-summary::-webkit-details-marker {
  display: none;
}

.set-diff-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.set-diff[open] > .set-diff-summary {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.1);
}

.set-diff-stars {
  min-width: 52px;
  color: var(--warning);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.set-diff-name {
  flex: 1;
  min-width: 120px;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.set-diff-length {
  color: var(--muted);
  font-size: 12px;
}

.set-diff-toggle {
  color: var(--faint);
  font-size: 11px;
}

.set-diff-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 16px;
}

.set-diff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.set-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.set-board-title {
  font-size: 13.5px;
  font-weight: 700;
}

.set-note {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.set-empty {
  padding: 10px 2px;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 1024px) {
  .set-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .set-hero-body {
    padding: 16px;
  }

  .set-diff-summary {
    padding: 12px 14px;
  }

  .set-diff-body {
    padding: 12px 14px 14px;
  }
}

@media (max-width: 640px) {
  .bm-diff-item .bm-diff-name {
    flex-basis: 100%;
  }

  .bm-diff-params {
    flex: 1 1 100%;
    white-space: normal;
  }

  .set-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .set-diff-toggle {
    display: none;
  }

  .set-actions .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   batch-06 UI polish
   osu.ppy.sh-like global ranking page, underline tabs, compact home title bar
   and a tighter player banner.  Pure solid colours only, no motion effects.
   ========================================================================== */

/* Global ranking header (solid green section) ----------------------------- */
.ranking-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 16px 20px;
  margin-bottom: 10px;
  border: 1px solid #2e5c42;
  border-radius: var(--radius-lg);
  background: #163020;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.ranking-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ranking-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 1px solid #34784f;
  border-radius: 12px;
  background: #1d422c;
  color: #8fe3b0;
}

.ranking-header-icon .nav-icon {
  width: 24px;
  height: 24px;
  opacity: 1;
}

.ranking-header-copy {
  min-width: 0;
}

.ranking-header-eyebrow {
  color: #8fe3b0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ranking-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  color: #f2fff6;
  font-size: clamp(21px, 2.6vw, 27px);
  letter-spacing: -0.02em;
}

.ranking-title-en {
  color: #8fe3b0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ranking-header-sub {
  margin-top: 3px;
  color: #c6e6d2;
  font-size: 12.5px;
}

.ranking-header-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 50ch;
  color: #b6d9c3;
  font-size: 12px;
  text-align: right;
}

/* Underline tab filter bar ------------------------------------------------ */
.ranking-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 26px;
  margin-bottom: 10px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.tab-underline {
  display: inline-flex;
  align-items: center;
  margin-bottom: -1px;
  padding: 9px 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-underline:hover {
  color: var(--text);
}

.tab-underline.is-active {
  color: var(--text);
  border-bottom-color: #4cc38a;
}

.ranking-filter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  padding-bottom: 7px;
}

/* Ranking table ----------------------------------------------------------- */
.ranking-card {
  overflow: visible;
}

.ranking-table-wrap {
  overflow-x: auto;
}

.ranking-table tbody td {
  padding: 10px 14px;
}

.ranking-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.ranking-table thead th {
  background: var(--panel-2);
}

.rank-table thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.rank-table thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.ranking-table thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.ranking-table thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.mark-col {
  width: 58px;
}

.rank-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.rank-mark-ss {
  background: rgba(255, 102, 170, 0.18);
  color: #ff9ac6;
}

.rank-mark-s {
  background: rgba(255, 209, 102, 0.18);
  color: #ffd166;
}

.rank-mark-a {
  background: rgba(126, 226, 168, 0.16);
  color: #7ee2a8;
}

.rank-mark-zero {
  background: transparent;
  color: var(--faint);
  font-weight: 600;
}

@media (min-width: 1024px) {
  .ranking-table-wrap {
    overflow: visible;
  }

  .ranking-table thead th {
    position: sticky;
    top: 64px;
    z-index: 5;
  }
}

/* Compact home title bar + solid stat panel ------------------------------- */
.home-hero {
  padding: 22px 24px;
  gap: 22px;
}

.home-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(25px, 3.4vw, 36px);
}

.home-hero .lead {
  max-width: 54ch;
  font-size: 13.5px;
}

.home-hero .eyebrow {
  font-size: 10.5px;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border-soft);
  align-content: stretch;
}

.home-hero-stats .hero-stat {
  border: 0;
  border-radius: 0;
  background: #1a1418;
  padding: 12px 14px;
}

.home-hero-stats .hero-stat:last-child {
  grid-column: 1 / -1;
}

.home-hero-stats .hero-stat-accent {
  background: #231722;
}

.home-hero-stats .hero-stat-accent .hero-stat-num {
  color: var(--accent-strong);
}

.home-hero-stats .hero-stat-num {
  font-size: 23px;
}

/* Player profile polish --------------------------------------------------- */
.player-banner {
  min-height: 156px;
  padding: 12px 20px;
}

.player-hero-body {
  grid-template-columns: 148px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 0 22px 14px;
}

.player-avatar-wrap {
  position: relative;
  z-index: 2;
  margin-top: -56px;
}

.avatar-player {
  width: 124px;
  height: 124px;
  border-radius: 20px;
}

.player-hero-footer {
  padding: 12px 22px 14px;
}

.player-rank-card {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 13px 16px 14px;
}

.player-rank-value {
  font-size: 32px;
}

.profile-toolbar {
  margin: 10px 0;
}

/* ppy-like underline player tabs */
.profile-tabs {
  gap: 2px;
  width: 100%;
  max-width: none;
  margin: 4px 0 14px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.profile-tab {
  margin-bottom: -1px;
  padding: 10px 16px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
}

.profile-tab:hover {
  background: transparent;
  color: var(--text);
}

.profile-tab.is-active {
  background: transparent;
  color: var(--text);
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.profile-panel .card-header {
  padding: 13px 16px;
}

.profile-panel .card-title {
  font-size: 16px;
}

/* Nav spacing fine-tune --------------------------------------------------- */
.topbar-inner {
  gap: 12px;
}

.nav-link {
  gap: 6px;
  padding: 8px 10px;
}

.nav-icon {
  width: 16px;
  height: 16px;
}

.nav-dropdown {
  min-width: 236px;
}

.nav-dropdown-link {
  padding: 8px 10px;
}

@media (max-width: 1024px) {
  .ranking-header-note {
    max-width: none;
    text-align: left;
  }

  .home-hero-stats .hero-stat-num {
    font-size: 21px;
  }
}

@media (max-width: 860px) {
  .nav-link {
    padding: 10px 12px;
    gap: 7px;
  }

  .nav-icon {
    width: 17px;
    height: 17px;
  }

  .ranking-header {
    padding: 14px 16px;
  }

  .ranking-header-icon {
    width: 40px;
    height: 40px;
  }

  .ranking-filter-bar {
    gap: 2px 18px;
  }

  .ranking-filter-meta {
    width: 100%;
    margin-left: 0;
    padding-bottom: 8px;
  }

  .player-hero-body {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 0 16px 12px;
    gap: 12px;
  }

  .player-avatar-wrap {
    margin-top: -48px;
  }

  .avatar-player {
    width: 104px;
    height: 104px;
    border-radius: 18px;
  }

  .player-hero-footer {
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 18px;
    gap: 16px;
  }

  .ranking-title-en {
    font-size: 11px;
  }

  .ranking-header-note {
    font-size: 11.5px;
  }

  .tab-underline {
    padding: 9px 11px;
    font-size: 13px;
  }

  .player-hero-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 12px;
    gap: 4px;
  }

  .player-rank-card {
    margin-top: 10px;
  }

  .profile-tab {
    padding: 10px 13px;
    font-size: 13px;
  }
}

/* W03: owner audit log */
.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.audit-filters .form-field { min-width: 140px; }
.audit-filter-actions { display: flex; gap: 8px; }
.audit-summary { max-width: 320px; overflow-wrap: anywhere; }


/* F1: the mobile navigation must remain usable without JavaScript.  The menu is only
   collapsed behind the JS toggle when site.js has added html.js-site; without JavaScript the
   plain navigation stays visible and the dead toggle is hidden. */
@media (max-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
  }

  html.js-site .nav-toggle {
    display: flex;
  }

  html.js-site .site-nav {
    display: none;
  }

  html.js-site .site-nav.is-open {
    display: flex;
  }
}

