:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #f0f4f8;
  --text: #17202a;
  --muted: #687586;
  --border: #d9e1ea;
  --teal: #0f9f93;
  --coral: #e96f57;
  --amber: #d6941d;
  --indigo: #4d63d9;
  --shadow: 0 18px 48px rgba(23, 32, 42, 0.08);
  font-family:
    Inter,
    "Noto Sans JP",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Installable app experience */
.pwa-install-action[hidden],
[data-pwa-update][hidden],
.pwa-connectivity-notice[hidden],
.pwa-update-notice[hidden] {
  display: none !important;
}

.settings-pwa-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.settings-pwa-actions {
  display: flex;
  flex: none;
}

.pwa-dialog {
  width: min(calc(100% - 32px), 430px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #15202d;
  background: #fff;
  box-shadow: 0 18px 48px rgb(21 32 45 / 22%);
}

.pwa-dialog::backdrop {
  background: rgb(21 32 45 / 52%);
}

.pwa-dialog form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.pwa-dialog header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-dialog header div {
  display: grid;
  gap: 2px;
}

.pwa-dialog header small {
  color: var(--muted);
}

.pwa-dialog ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
  line-height: 1.55;
  font-weight: 700;
}

.pwa-connectivity-notice,
.pwa-update-notice {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: min(calc(100% - 32px), 420px);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgb(21 32 45 / 18%);
  font-size: 13px;
  font-weight: 700;
}

.pwa-connectivity-notice {
  padding: 11px 14px;
  color: #fff;
  background: #15202d;
}

.pwa-update-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  background: #fff;
}

.pwa-update-notice button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--teal);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 720px) {
  .settings-pwa-section {
    align-items: stretch;
    padding: 11px 12px;
  }

  .pwa-connectivity-notice,
  .pwa-update-notice {
    top: calc(env(safe-area-inset-top) + 64px);
    right: 8px;
    bottom: auto;
    max-width: calc(100% - 16px);
  }
}

@media (max-width: 420px) {
  .settings-pwa-section {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-dialog,
  .pwa-connectivity-notice,
  .pwa-update-notice {
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(15, 159, 147, 0.3);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #17202a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(calc(-100% - 20px));
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

.session-loading-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: var(--surface);
}

.session-loading-screen > strong {
  font-size: 22px;
}

.session-loading-screen p {
  color: var(--muted);
  font-size: 13px;
}

.loading-indicator {
  width: 28px;
  height: 28px;
  border: 3px solid #dbe4ec;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(15, 159, 147, 0.14);
}

[id] {
  scroll-margin-top: 24px;
}

.login-screen {
  min-height: 100vh;
  background: var(--bg);
}

.landing-header {
  display: flex;
  width: min(1360px, calc(100% - 48px));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  background: var(--surface);
}

.login-brand {
  color: var(--text);
}

.landing-nav,
.landing-footer div {
  display: flex;
  align-items: center;
  gap: 26px;
}

.landing-nav a,
.landing-footer a {
  color: #354254;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.landing-nav a:hover,
.landing-footer a:hover,
.auth-text-button:hover {
  color: var(--teal);
}

.landing-login-button {
  width: 104px;
  min-height: 36px;
  justify-content: center;
  padding-inline: 18px;
}

.landing-main {
  display: grid;
  width: min(1360px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
  margin: 0 auto;
  padding: 54px 0 44px;
}

.landing-intro {
  min-width: 0;
}

.landing-copy {
  max-width: 760px;
}

.landing-eyebrow,
.auth-step,
.preview-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-copy h1 {
  display: grid;
  gap: 2px;
  margin-top: 9px;
  line-height: 1.05;
  text-wrap: balance;
}

.landing-product-name {
  font-size: clamp(54px, 5.3vw, 76px);
  font-weight: 900;
}

.landing-product-subtitle {
  color: #3f4d60;
  font-size: 18px;
  font-weight: 800;
}

.landing-lead {
  max-width: 700px;
  margin-top: 18px;
  color: #455367;
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.landing-hero-actions a {
  min-height: 44px;
  justify-content: center;
  padding-inline: 22px;
  text-decoration: none;
}

.onboarding-flow {
  margin: 24px 0 22px;
}

.onboarding-title {
  color: #263547;
  font-size: 12px;
  font-weight: 850;
}

.onboarding-steps {
  display: grid;
  margin: 10px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.onboarding-steps li {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.onboarding-steps li:not(:last-child)::after {
  width: max(20px, 18%);
  height: 1px;
  flex: 1;
  margin-right: 12px;
  background: var(--border);
  content: "";
}

.onboarding-steps li span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #bdc9d6;
  border-radius: 50%;
  background: var(--surface);
  color: #3e4c5e;
  font-weight: 850;
}

.onboarding-steps li.active {
  color: var(--text);
}

.onboarding-steps li.active span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.onboarding-steps strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.landing-preview {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(23, 32, 42, 0.05);
}

.landing-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.landing-preview-heading h2 {
  margin-top: 4px;
  font-size: 16px;
}

.preview-profile-link {
  color: inherit;
  text-decoration: none;
}

.preview-profile-link:hover .preview-sync-status {
  color: #087d73;
}

.preview-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.preview-sync-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.preview-player {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-player-monogram {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--coral);
  border-radius: 7px;
  background: #142433;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.preview-player > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.preview-player > div:nth-child(2) strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-player > div:nth-child(2) span,
.preview-player-rating span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.preview-player-rating {
  display: grid;
  justify-items: end;
}

.preview-player-rating strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-metrics div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}

.preview-metrics div:first-child {
  padding-left: 0;
}

.preview-metrics div:last-child {
  padding-right: 0;
  border-right: 0;
}

.preview-metrics span,
.preview-frame-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.preview-metrics strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.preview-frames {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-frame {
  min-width: 0;
  padding-right: 18px;
}

.preview-frame + .preview-frame {
  padding-right: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.preview-frame-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.preview-frame-heading strong {
  font-size: 12px;
}

.preview-jackets {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 7px;
}

#landingNewPreview {
  grid-template-columns: repeat(3, minmax(44px, 1fr));
}

.landing-jacket {
  position: relative;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid #ccd6e1;
  border-radius: 5px;
  background: #e5f2f0;
}

.landing-jacket img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-jacket span {
  position: absolute;
  inset: auto 3px 3px;
  overflow: hidden;
  color: #59677a;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-score-list {
  display: grid;
  padding: 6px 20px 10px;
}

.preview-score-head,
.preview-score-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 110px 54px;
  gap: 12px;
  align-items: center;
}

.preview-score-head {
  padding: 6px 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.preview-score-row {
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}

.preview-score-row > span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-score-row strong {
  color: #344156;
  font-size: 11px;
  text-align: right;
}

.preview-score-row em {
  color: var(--teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.landing-guide,
.landing-feature-band,
.landing-data-band {
  border-top: 1px solid var(--border);
}

.landing-guide {
  background: var(--surface);
}

.landing-section-inner {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0;
}

.landing-section-heading {
  max-width: 700px;
}

.landing-section-heading h2,
.landing-data-layout h2 {
  margin-top: 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.25;
  text-wrap: balance;
}

.landing-section-heading > p:last-child {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  text-wrap: pretty;
}

.landing-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 38px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.landing-guide-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  min-width: 0;
  padding: 25px 30px 26px 0;
}

.landing-guide-steps li + li {
  padding-left: 30px;
  border-left: 1px solid var(--border);
}

.landing-guide-steps > li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #9db0c2;
  border-radius: 50%;
  color: #354254;
  font-size: 12px;
  font-weight: 900;
}

.landing-guide-steps h3 {
  font-size: 16px;
  line-height: 1.45;
}

.landing-guide-steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  text-wrap: pretty;
}

.landing-requirement {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 18px;
  border-left: 3px solid var(--amber);
  background: #fff8e8;
  color: #4f4b42;
  font-size: 12px;
  line-height: 1.65;
}

.landing-requirement strong {
  flex: 0 0 auto;
  color: var(--text);
}

.landing-requirement a {
  color: #8a5a06;
  font-weight: 850;
}

.landing-feature-band {
  background: #edf2f6;
}

.landing-feature-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(48px, 8vw, 112px);
}

.landing-feature-list {
  border-top: 1px solid #bdc9d4;
}

.landing-feature-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 17px;
  padding: 19px 0;
  border-bottom: 1px solid #bdc9d4;
}

.landing-feature-list article > strong {
  color: var(--teal);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.landing-feature-list h3 {
  font-size: 16px;
}

.landing-feature-list p {
  margin-top: 5px;
  color: #536174;
  font-size: 12px;
  line-height: 1.65;
  text-wrap: pretty;
}

.landing-data-band {
  background: #172431;
  color: #f7fafc;
}

.landing-data-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(48px, 8vw, 112px);
}

.landing-data-band .landing-eyebrow {
  color: #63d5c9;
}

.landing-data-copy > p {
  color: #d8e1e9;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.7;
}

.landing-data-copy ul {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  color: #aebbc8;
  font-size: 12px;
  list-style: none;
}

.landing-data-copy li {
  position: relative;
  padding-left: 18px;
}

.landing-data-copy li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63d5c9;
  content: "";
}

.landing-data-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 25px;
}

.landing-data-links a {
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-underline-offset: 4px;
}

.auth-panel {
  position: sticky;
  top: 28px;
  display: grid;
  overflow: hidden;
  border: 1px solid #cfd9e4;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-strong);
}

.auth-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.auth-mode-switch button.active {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.05);
}

.auth-form {
  display: grid;
  gap: 18px;
  padding: 26px 28px 22px;
}

.auth-heading {
  display: grid;
  gap: 7px;
}

.auth-heading h2 {
  font-size: 24px;
}

.auth-heading > p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #354254;
  font-weight: 700;
}

.auth-form label > span {
  font-size: 12px;
}

.auth-form label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-form input {
  width: 100%;
  min-width: 0;
}

.auth-form .primary-button,
.auth-form .secondary-button {
  width: 100%;
}

.authenticated-landing {
  display: grid;
  gap: 20px;
  padding: 30px 28px;
}

.authenticated-landing .primary-button,
.authenticated-landing .secondary-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.landing-bookmarklet-status {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.music-page {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.music-page > * {
  min-width: 0;
}

.music-page .public-header {
  margin-bottom: 0;
}

.music-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
}

.music-jacket-shell {
  position: relative;
  width: 180px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #8d54c7;
  border-radius: 8px;
  background: var(--surface-strong);
}

.music-jacket,
.music-jacket-placeholder {
  width: 100%;
  height: 100%;
}

.music-jacket {
  display: block;
  object-fit: cover;
}

.music-jacket-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 48px;
}

.music-identity {
  min-width: 0;
}

.music-identity h1 {
  overflow-wrap: anywhere;
  font-size: 46px;
  line-height: 1.15;
}

.music-identity > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.music-chart-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 16px;
}

.music-chart-badges .difficulty {
  min-width: 88px;
}

.music-constant-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: baseline;
  gap: 5px;
  border-radius: 6px;
  padding: 3px 9px;
  background: #17202a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.music-constant-badge strong {
  font-size: 17px;
}

.music-chart-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 18px 0 0;
}

.music-chart-facts div {
  min-width: 128px;
  padding-right: 20px;
  border-right: 1px solid var(--border);
}

.music-chart-facts div + div {
  padding-left: 20px;
}

.music-chart-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.music-chart-facts dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.music-chart-tabs {
  display: flex;
  overflow-x: auto;
  min-height: 58px;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.music-chart-tabs a {
  display: grid;
  min-width: 88px;
  place-content: center;
  gap: 2px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.music-chart-tabs a:hover,
.music-chart-tabs a.active {
  border-bottom-color: var(--coral);
  color: var(--text);
}

.music-chart-tabs span {
  font-size: 13px;
  font-weight: 900;
}

.music-chart-tabs small {
  font-size: 10px;
  font-weight: 750;
}

.music-stat-panel,
.music-attainment-panel {
  overflow: hidden;
}

.music-rank-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 24px 0;
}

.music-rank-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.music-rank-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.music-chart-scroll {
  overflow-x: auto;
  padding: 14px 18px 8px;
}

.music-band-chart {
  display: grid;
  min-width: 980px;
  height: 350px;
  grid-template-columns: repeat(28, minmax(25px, 1fr));
  gap: 5px;
  align-items: end;
  padding: 10px 8px 0;
  border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(
    to top,
    transparent 0 69px,
    rgba(216, 224, 232, 0.65) 69px 70px
  );
}

.music-band-column {
  display: grid;
  height: 100%;
  grid-template-rows: 18px minmax(0, 1fr) 28px;
  gap: 3px;
  align-items: end;
}

.music-band-column > small {
  min-height: 16px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.music-band-column > strong {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.music-band-stack {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 100%;
  flex-direction: column-reverse;
  border: 1px solid #d8e0e8;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.72);
}

.music-band-stack.empty {
  opacity: 0.38;
}

.music-band-stack.suppressed {
  display: grid;
  place-items: end center;
  padding-bottom: 6px;
  background: repeating-linear-gradient(
    135deg,
    #f2f4f7 0 6px,
    #e4e8ed 6px 12px
  );
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.music-rank-segment {
  display: block;
  min-height: 2px;
}

.rank-sss-plus {
  background: #93e5e5;
}

.rank-sss {
  background: #f5dda0;
}

.rank-ss-plus {
  background: #e9a454;
}

.rank-ss {
  background: #f1c23e;
}

.rank-s-plus {
  background: #b1b9dd;
}

.rank-s {
  background: #8da2ca;
}

.rank-other {
  background: #62676d;
}

.music-stat-note {
  margin: 0;
  padding: 10px 24px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.music-attainment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.music-attainment-grid article {
  display: grid;
  min-height: 116px;
  place-content: center;
  justify-items: center;
  gap: 3px;
  border-right: 1px solid var(--border);
}

.music-attainment-grid article:last-child {
  border-right: 0;
}

.music-attainment-grid span,
.music-attainment-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.music-attainment-grid strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .music-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .music-jacket-shell {
    width: 104px;
  }

  .music-identity h1 {
    font-size: 23px;
  }

  .music-identity > p {
    font-size: 12px;
  }

  .music-chart-facts {
    grid-column: 1 / -1;
  }

  .music-chart-facts div {
    min-width: 96px;
    padding-right: 10px;
  }

  .music-chart-facts div + div {
    padding-left: 10px;
  }

  .music-attainment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .music-attainment-grid article {
    min-height: 92px;
    border-bottom: 1px solid var(--border);
  }
}

/* CHUNITHM profile */
.chuni-page {
  --chuni-ink: #17202a;
  --chuni-muted: #667487;
  --chuni-line: #d5dee8;
  --chuni-accent: #009d91;
  --chuni-gold: #aa7900;
  color: var(--chuni-ink);
}

.chuni-brand-mark {
  background: #17202a;
  border-bottom-color: #f2bd35;
}

.chuni-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 240px;
  color: var(--chuni-muted);
  font-weight: 700;
}

.chuni-loading-dot {
  width: 12px;
  height: 12px;
  border: 3px solid #d4dde7;
  border-top-color: var(--chuni-accent);
  border-radius: 50%;
  animation: chuni-spin 0.8s linear infinite;
}

@keyframes chuni-spin {
  to {
    transform: rotate(360deg);
  }
}

.chuni-profile {
  display: grid;
  gap: 16px;
}

.chuni-profile-panel {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(430px, 1fr) 238px;
  align-items: stretch;
  border: 1px solid var(--chuni-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 32, 42, 0.06);
  overflow: hidden;
}

.chuni-profile-main {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 20px 22px;
}

.chuni-profile-copy {
  min-width: 0;
}

.chuni-profile-copy h1 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 30px;
  line-height: 1.18;
}

.chuni-profile-copy .profile-ranks {
  margin-top: 8px;
}

.chuni-profile-performance {
  display: grid;
  min-width: 0;
  grid-template-columns: 158px minmax(0, 1fr);
  align-items: stretch;
  border-left: 1px solid var(--chuni-line);
}

.chuni-rating-block {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--chuni-line);
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.chuni-rating-block::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(
    90deg,
    #f27a72,
    #f0c456,
    #57bb8a,
    #68acd5,
    #9a79d7
  );
  content: "";
}

.chuni-rating-block > span,
.chuni-rating-block small {
  color: var(--chuni-muted);
  font-size: 11px;
  font-weight: 800;
}

.chuni-rating-block strong {
  font-size: 40px;
  line-height: 1.05;
}

.chuni-frame-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-left: 0;
}

.chuni-frame-summary > div {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 10px 14px;
  border-right: 1px solid var(--chuni-line);
  border-bottom: 1px solid var(--chuni-line);
}

.chuni-frame-summary > div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.chuni-frame-summary dt {
  color: var(--chuni-muted);
  font-size: 12px;
  font-weight: 800;
}

.chuni-frame-summary dd {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
}

.chuni-profile-actions {
  display: grid;
  align-content: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--chuni-line);
  color: var(--chuni-muted);
  font-size: 12px;
  font-weight: 700;
}

.chuni-profile-actions > span:first-child {
  grid-column: 1 / -1;
  text-align: right;
}

.chuni-profile-actions .secondary-button {
  min-width: 0;
  min-height: 40px;
  padding-inline: 10px;
  white-space: nowrap;
}

.chuni-view {
  display: grid;
  gap: 16px;
}

.chuni-target-section {
  border-top: 1px solid var(--chuni-line);
}

.chuni-target-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f7f9fb;
}

.chuni-target-section h3 {
  margin: 0;
  font-size: 18px;
}

.chuni-target-section header span {
  color: var(--chuni-muted);
  font-size: 12px;
  font-weight: 700;
}

.chuni-new-section > header {
  border-top: 3px solid #e96f57;
}

.chuni-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chuni-target-card {
  --card-background: #fff;
  --card-hover-background: #f9fbfc;
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 132px;
  align-items: stretch;
  min-height: 108px;
  border-bottom: 1px solid var(--chuni-line);
  border-left: 3px solid #8a5bd1;
  background: var(--card-background);
}

.chuni-target-card:hover {
  background: var(--card-hover-background);
}

.chuni-target-card:nth-child(odd) {
  border-right: 1px solid var(--chuni-line);
}

.chuni-target-jacket {
  position: relative;
  display: block;
  align-self: stretch;
  width: 108px;
  height: 100%;
  min-height: 108px;
  overflow: hidden;
  background: #eaf0f5;
}

.chuni-target-jacket img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.chuni-target-position {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(23, 32, 42, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.chuni-target-copy {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px;
}

.chuni-target-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chuni-target-copy > strong a,
.chuni-candidate-row > strong a,
.chuni-song-cell strong a {
  color: inherit;
  text-decoration: none;
}

.chuni-target-copy > strong a:hover,
.chuni-candidate-row > strong a:hover,
.chuni-song-cell strong a:hover {
  color: var(--chuni-accent);
  text-decoration: underline;
}

.chuni-target-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--chuni-muted);
  font-size: 12px;
  font-weight: 800;
}

.chuni-target-lamps {
  min-height: 14px;
  color: var(--chuni-gold);
  font-size: 11px;
  font-weight: 900;
}

.chuni-target-result {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 2px;
  padding: 10px 12px;
}

.chuni-target-result > strong {
  font-size: 19px;
}

.chuni-target-result > b {
  color: var(--chuni-accent);
  font-size: 25px;
}

.chuni-difficulty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #8a5bd1;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.chuni-difficulty-badge.difficulty-basic {
  background: #31a654;
}

.chuni-difficulty-badge.difficulty-advanced {
  background: #e4a515;
}

.chuni-difficulty-badge.difficulty-expert {
  background: #e34f5f;
}

.chuni-difficulty-badge.difficulty-master {
  background: #8a4fd0;
}

.chuni-difficulty-badge.difficulty-ultima {
  background: #202833;
}

.chuni-difficulty-badge.difficulty-world-s-end {
  background: #497185;
}

.chuni-target-card.difficulty-basic {
  border-left-color: #31a654;
}

.chuni-target-card.difficulty-advanced {
  border-left-color: #e4a515;
}

.chuni-target-card.difficulty-expert {
  border-left-color: #e34f5f;
}

.chuni-target-card.difficulty-master {
  border-left-color: #8a4fd0;
}

.chuni-target-card.difficulty-ultima {
  border-left-color: #202833;
}

.chuni-target-card.rank-sss-plus {
  --card-background: linear-gradient(
    105deg,
    rgba(226, 177, 44, 0.11),
    rgba(255, 250, 232, 0.04) 52%,
    #fff 100%
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(226, 177, 44, 0.16),
    rgba(255, 250, 232, 0.07) 52%,
    #fff 100%
  );
}

.chuni-target-card.performance-sss {
  --card-background: linear-gradient(
    105deg,
    rgba(116, 132, 154, 0.1),
    rgba(245, 247, 250, 0.04) 52%,
    #fff 100%
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(116, 132, 154, 0.15),
    rgba(245, 247, 250, 0.07) 52%,
    #fff 100%
  );
}

.chuni-target-card.performance-ss-plus {
  --card-background: linear-gradient(
    105deg,
    rgba(180, 112, 65, 0.12),
    rgba(249, 235, 220, 0.04) 52%,
    #fff 100%
  );
}

.chuni-target-card.performance-aj,
.chuni-target-card.performance-ajc {
  --card-background: linear-gradient(
    105deg,
    rgba(244, 114, 116, 0.13),
    rgba(244, 203, 89, 0.12),
    rgba(75, 185, 132, 0.11),
    rgba(76, 156, 214, 0.12),
    rgba(187, 103, 194, 0.13)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(244, 114, 116, 0.18),
    rgba(244, 203, 89, 0.17),
    rgba(75, 185, 132, 0.16),
    rgba(76, 156, 214, 0.17),
    rgba(187, 103, 194, 0.18)
  );
}

.chuni-target-card.performance-ajc {
  box-shadow: inset 0 0 0 1px rgba(204, 91, 167, 0.24);
}

.chuni-rank {
  color: #596678;
  font-weight: 900;
}

.chuni-rank.rank-sss-plus {
  color: #b27b00;
}

.chuni-rank.rank-sss {
  color: #53677e;
}

.chuni-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--chuni-line);
}

.chuni-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--chuni-line);
}

.chuni-candidate-row:nth-child(odd) {
  border-right: 1px solid var(--chuni-line);
}

.chuni-candidate-row > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-candidate-row > span {
  color: var(--chuni-muted);
  font-size: 12px;
}

.chuni-official-candidate {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 7px;
  border: 1px solid rgba(14, 135, 126, 0.32);
  border-radius: 4px;
  padding: 1px 5px;
  background: #e9f7f5;
  color: #087d73;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.chuni-candidate-row > div {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 8px;
}

.chuni-candidate-row > div strong {
  color: var(--chuni-accent);
  font-size: 20px;
}

.chuni-load-button {
  display: block;
  width: min(320px, calc(100% - 32px));
  margin: 14px auto;
}

.chuni-record-toolbar {
  align-items: end;
}

.chuni-score-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 130px;
  gap: 8px;
}

.chuni-score-filters input,
.chuni-score-filters select {
  width: 100%;
  min-height: 42px;
}

.chuni-score-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--chuni-line);
}

.chuni-score-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
}

.chuni-score-table th,
.chuni-score-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--chuni-line);
  text-align: right;
  vertical-align: middle;
}

.chuni-score-table th {
  height: 44px;
  background: #f7f9fb;
  color: var(--chuni-muted);
  font-size: 12px;
}

.chuni-score-table th:first-child,
.chuni-score-table td:first-child,
.chuni-score-table th:nth-child(2),
.chuni-score-table td:nth-child(2),
.chuni-score-table th:nth-child(6),
.chuni-score-table td:nth-child(6) {
  text-align: left;
}

.chuni-score-table th:first-child {
  width: 31%;
}

.chuni-score-table th:nth-child(2) {
  width: 11%;
}

.chuni-score-table th:nth-child(6) {
  width: 16%;
}

.chuni-score-table th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.chuni-song-cell {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.chuni-song-cell img {
  width: 54px;
  height: 54px;
  border-radius: 4px;
  background: #eef3f6;
  object-fit: contain;
  object-position: center;
}

.chuni-score-jacket {
  display: block;
  width: 54px;
  height: 54px;
}

.chuni-song-cell span {
  display: grid;
  min-width: 0;
}

.chuni-song-cell strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chuni-song-cell small {
  overflow: hidden;
  color: var(--chuni-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-number-cell,
.chuni-rating-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.chuni-rating-cell {
  color: var(--chuni-accent);
}

.chuni-empty-cell,
.chuni-empty-message {
  padding: 32px !important;
  color: var(--chuni-muted);
  text-align: center !important;
}

.chuni-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.chuni-history-list {
  border-top: 1px solid var(--chuni-line);
}

.chuni-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 90px 80px 100px;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--chuni-line);
  color: inherit;
  text-decoration: none;
}

.chuni-history-row:hover {
  background: #f5f9f9;
}

.chuni-history-row strong {
  font-size: 20px;
}

.chuni-history-row .is-positive {
  color: var(--chuni-accent);
  font-weight: 900;
}

.chuni-history-row small {
  color: var(--chuni-muted);
  text-align: right;
}

@media (max-width: 1120px) {
  .chuni-profile-panel {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr);
  }

  .chuni-profile-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--chuni-line);
  }

  .chuni-profile-actions > span:first-child {
    grid-column: 1 / -1;
    text-align: right;
  }
}

@media (max-width: 760px) {
  .chuni-profile-panel {
    grid-template-columns: 1fr;
  }

  .chuni-profile-main {
    padding: 16px;
  }

  .chuni-profile-copy h1 {
    font-size: 23px;
  }

  .chuni-profile-performance {
    grid-template-columns: 126px minmax(0, 1fr);
    border-top: 1px solid var(--chuni-line);
    border-left: 0;
  }

  .chuni-rating-block {
    padding-inline: 10px;
  }

  .chuni-rating-block strong {
    font-size: 34px;
  }

  .chuni-frame-summary {
    border-left: 0;
  }

  .chuni-frame-summary > div {
    padding: 10px 14px;
  }

  .chuni-profile-actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--chuni-line);
    border-left: 0;
  }

  .chuni-target-grid,
  .chuni-candidate-list {
    grid-template-columns: 1fr;
  }

  .chuni-target-card:nth-child(odd),
  .chuni-candidate-row:nth-child(odd) {
    border-right: 0;
  }

  .chuni-target-card {
    grid-template-columns: 92px minmax(0, 1fr) 110px;
    min-height: 92px;
  }

  .chuni-target-jacket {
    width: 92px;
    min-height: 92px;
  }

  .chuni-target-copy {
    gap: 5px;
    padding: 8px 9px;
  }

  .chuni-target-copy > strong {
    font-size: 14px;
  }

  .chuni-target-result {
    padding: 8px 9px;
  }

  .chuni-target-result > strong {
    font-size: 16px;
  }

  .chuni-target-result > b {
    font-size: 22px;
  }

  .chuni-record-toolbar {
    align-items: stretch;
  }

  .chuni-score-filters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .chuni-score-filters label:first-child {
    grid-column: 1 / -1;
  }

  .chuni-history-row {
    grid-template-columns: 1fr auto auto;
    gap: 6px 10px;
    padding: 12px 14px;
  }

  .chuni-history-row small {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 440px) {
  .chuni-target-card {
    grid-template-columns: 84px minmax(0, 1fr) 92px;
    min-height: 84px;
  }

  .chuni-target-jacket {
    width: 84px;
    min-height: 84px;
  }

  .chuni-profile-main {
    padding: 13px;
  }

  .chuni-profile-copy h1 {
    font-size: 21px;
  }

  .chuni-profile-copy .profile-ranks {
    gap: 4px;
    margin-top: 5px;
  }

  .chuni-profile-performance {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .chuni-rating-block strong {
    font-size: 29px;
  }

  .chuni-frame-summary > div {
    min-height: 52px;
    padding: 8px 10px;
  }

  .chuni-frame-summary dt {
    font-size: 10px;
  }

  .chuni-frame-summary dd {
    font-size: 17px;
  }

  .chuni-profile-actions {
    padding: 10px 12px;
  }

  .chuni-target-lamps {
    display: none;
  }

  .chuni-target-result > strong {
    font-size: 14px;
  }

  .chuni-target-result > b {
    font-size: 20px;
  }

  .chuni-target-meta {
    gap: 5px;
    font-size: 10px;
  }
}

/* ChuRec（仮） landing and profile parity */
.landing-detail-section {
  display: none;
}

.landing-login-link,
.landing-reassurance {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.landing-login-link a {
  color: var(--teal);
  font-weight: 850;
}

.landing-reassurance {
  margin-top: 7px;
}

.landing-development-status,
.landing-companion-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.landing-development-status strong {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid rgba(8, 125, 115, 0.3);
  border-radius: 4px;
  padding: 1px 7px;
  background: rgba(8, 125, 115, 0.06);
  color: #087d73;
  font-size: 10px;
  letter-spacing: 0;
}

.landing-companion-link {
  margin-top: 5px;
}

.landing-companion-link a {
  color: var(--teal);
  font-weight: 800;
}

.onboarding-steps small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.login-screen:not(.auth-open):not(.authenticated) .landing-main {
  display: block;
  width: min(1120px, calc(100% - 48px));
  padding-top: 42px;
}

.login-screen:not(.auth-open):not(.authenticated) .landing-intro {
  display: grid;
  justify-items: center;
}

.login-screen:not(.auth-open):not(.authenticated) .landing-copy {
  width: min(760px, 100%);
  text-align: center;
}

.login-screen:not(.auth-open):not(.authenticated) .landing-copy h1 {
  justify-items: center;
}

.login-screen:not(.auth-open):not(.authenticated) .landing-hero-actions {
  justify-content: center;
}

.login-screen:not(.auth-open):not(.authenticated) .onboarding-flow,
.login-screen:not(.auth-open):not(.authenticated) .landing-preview {
  width: min(820px, 100%);
}

.login-screen:not(.auth-open):not(.authenticated) .auth-panel,
.login-screen:not(.auth-open):not(.authenticated) .preview-score-list {
  display: none;
}

.login-screen.auth-open .landing-main {
  display: block;
  width: min(500px, calc(100% - 40px));
  padding-top: 40px;
}

.login-screen.auth-open .landing-intro {
  display: none;
}

.login-screen.auth-open .auth-panel {
  position: static;
}

.login-screen.authenticated .landing-main {
  width: min(1160px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  gap: 34px;
  padding-top: 38px;
}

.login-screen.authenticated .landing-copy h1 {
  margin-top: 0;
}

.login-screen.authenticated .landing-product-name {
  font-size: clamp(44px, 4.5vw, 62px);
}

.login-screen.authenticated .landing-product-subtitle {
  font-size: 16px;
}

.login-screen.authenticated .landing-lead {
  margin-top: 12px;
  font-size: 14px;
}

.login-screen.authenticated .landing-hero-actions,
.login-screen.authenticated .landing-login-link,
.login-screen.authenticated .landing-reassurance,
.login-screen.authenticated .onboarding-flow,
.login-screen.authenticated .preview-score-list {
  display: none;
}

.login-screen.authenticated .landing-preview {
  margin-top: 24px;
}

.login-screen.authenticated .auth-panel {
  top: 20px;
}

.chuni-target-card.performance-sss-plus,
.chuni-target-card.rank-sss-plus {
  --card-background: linear-gradient(
    100deg,
    rgba(222, 173, 49, 0.115),
    rgba(255, 248, 222, 0.035)
  );
  --card-hover-background: linear-gradient(
    100deg,
    rgba(222, 173, 49, 0.17),
    rgba(255, 248, 222, 0.08)
  );
}

.chuni-target-card.performance-sss {
  --card-background: linear-gradient(
    100deg,
    rgba(126, 145, 166, 0.13),
    rgba(244, 247, 250, 0.045)
  );
  --card-hover-background: linear-gradient(
    100deg,
    rgba(126, 145, 166, 0.19),
    rgba(244, 247, 250, 0.09)
  );
}

.chuni-target-card.performance-ss-plus {
  --card-background: linear-gradient(
    100deg,
    rgba(184, 111, 60, 0.14),
    rgba(250, 235, 218, 0.045)
  );
  --card-hover-background: linear-gradient(
    100deg,
    rgba(184, 111, 60, 0.2),
    rgba(250, 235, 218, 0.09)
  );
}

.chuni-target-card.performance-aj {
  --card-background: linear-gradient(
    100deg,
    rgba(246, 111, 115, 0.12),
    rgba(246, 198, 70, 0.11),
    rgba(77, 186, 129, 0.1),
    rgba(75, 154, 214, 0.11),
    rgba(178, 94, 191, 0.12)
  );
}

.chuni-target-card.performance-ajc {
  --card-background: linear-gradient(
    100deg,
    rgba(246, 111, 115, 0.19),
    rgba(246, 198, 70, 0.18),
    rgba(77, 186, 129, 0.17),
    rgba(75, 154, 214, 0.18),
    rgba(178, 94, 191, 0.19)
  );
}

@media (max-width: 900px) {
  .login-screen:not(.auth-open):not(.authenticated) .landing-main,
  .login-screen.authenticated .landing-main {
    width: min(720px, calc(100% - 40px));
    padding-top: 32px;
  }

  .login-screen.authenticated .landing-main {
    display: flex;
  }

  .login-screen.authenticated .landing-copy {
    text-align: center;
  }

  .login-screen.authenticated .landing-copy h1 {
    justify-items: center;
  }
}

@media (max-width: 720px) {
  .login-screen:not(.auth-open):not(.authenticated) .landing-main,
  .login-screen.authenticated .landing-main,
  .login-screen.auth-open .landing-main {
    width: calc(100% - 28px);
    padding-top: 24px;
  }

  .landing-login-link,
  .landing-reassurance {
    font-size: 11px;
  }

  .login-screen:not(.auth-open):not(.authenticated) .landing-preview {
    margin-top: 4px;
  }

  .chuni-profile-actions > span:first-child {
    text-align: left;
  }
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.legal-consent {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px !important;
  align-items: start;
  color: var(--muted) !important;
  font-size: 10px;
  font-weight: 600 !important;
  line-height: 1.65;
}

.legal-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.legal-consent a {
  color: #087d73;
  font-weight: 800;
}

.privacy-icon {
  color: var(--teal);
  font-size: 8px;
  line-height: 2;
}

.auth-text-button {
  border: 0;
  padding: 2px;
  background: transparent;
  color: #3f526a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.login-status {
  min-height: 20px;
  margin: -4px 28px 18px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
}

.login-status:empty {
  min-height: 0;
  margin-bottom: 0;
}

.landing-footer {
  display: flex;
  width: min(1360px, calc(100% - 48px));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.landing-footer .landing-footer-notice {
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 3px;
  line-height: 1.55;
}

.landing-footer-notice strong {
  color: var(--text);
  font-size: 13px;
}

.registration-complete-dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(23, 32, 42, 0.22);
}

.registration-complete-dialog::backdrop {
  background: rgba(16, 24, 32, 0.55);
}

.registration-complete-content {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.registration-success-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e2f5f1;
  color: #087d73;
  font-size: 22px;
  font-weight: 900;
}

.registration-complete-copy {
  display: grid;
  gap: 7px;
}

.registration-complete-copy h2 {
  font-size: 23px;
}

.registration-complete-copy > p:last-child,
.registration-next-step span {
  color: var(--muted);
  line-height: 1.65;
}

.registration-credentials {
  display: grid;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.registration-credentials div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
}

.registration-credentials div + div {
  border-top: 1px solid var(--border);
}

.registration-credentials dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.registration-credentials dd {
  overflow: hidden;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.registration-next-step {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-left: 3px solid var(--teal);
  background: #f0f8f7;
}

.registration-next-step strong {
  font-size: 13px;
}

.registration-next-step span {
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px 18px;
  background: #101820;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  box-shadow: inset 0 -4px 0 var(--coral);
  color: #fff;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #b9c3d0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.workspace {
  min-width: 0;
  padding: 0 28px 28px;
}

.app-site-header {
  width: min(1360px, 100%);
  margin-inline: auto;
  padding: 28px 28px 0;
}

.workspace > .topbar,
.workspace > .rating-profile-panel,
.workspace > .app-view {
  width: min(1360px, 100%);
  margin-inline: auto;
}

.empty-score-onboarding {
  max-width: 920px;
  margin: 34px auto 0;
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  padding: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.empty-score-heading {
  max-width: 680px;
}

.empty-score-heading h2 {
  margin-top: 6px;
  font-size: 24px;
}

.empty-score-heading p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.sync-tutorial-steps {
  display: grid;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.sync-tutorial-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.tutorial-step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e5f5f3;
  color: #087c72;
  font-weight: 850;
}

.sync-tutorial-steps li > div {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.sync-tutorial-steps p,
.tutorial-status {
  color: var(--muted);
  line-height: 1.65;
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tutorial-status {
  min-height: 24px;
  padding-left: 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.18;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

p,
span,
td,
th,
button,
input,
select {
  font-size: 14px;
}

.topbar p,
.panel-toolbar p,
.stat-heading span,
td span {
  color: var(--muted);
}

.player-profile-meta {
  margin-top: 4px;
  line-height: 1.45;
}

.topbar-actions,
.filters,
.sync-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions select {
  min-height: 40px;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.history-button.compact {
  justify-self: start;
  min-height: 28px;
  padding: 0 9px;
}

.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.danger-button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(233, 111, 87, 0.1);
  border-color: rgba(233, 111, 87, 0.36);
  color: #b43e2a;
  font-weight: 800;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.sync-panel,
.rating-profile-panel,
.quality-panel,
.metric,
.table-panel,
.stats-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sync-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.rating-profile-panel {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(280px, 0.85fr) minmax(430px, 1.15fr) auto;
  gap: 16px 22px;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rating-profile-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-monogram {
  display: grid;
  width: 76px;
  height: 76px;
  border: 3px solid var(--coral);
  border-radius: 8px;
  background: #10202b;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  place-items: center;
}

.rating-profile-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.rating-profile-copy h1,
.rating-profile-copy h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-profile-copy h1 {
  font-size: 24px;
}

.rating-profile-copy h2 {
  font-size: 22px;
}

.profile-trophy {
  overflow: hidden;
  color: #8a6500;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-account {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-ranks {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.profile-ranks span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.rating-profile-rating {
  display: grid;
  min-width: 118px;
  gap: 5px;
  text-align: right;
}

.rating-profile-rating span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rating-profile-rating strong {
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.profile-performance {
  display: grid;
  min-width: 0;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-metrics {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--border);
}

.profile-metric {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 6px 12px;
}

.profile-metric:nth-child(even) {
  border-left: 1px solid var(--border);
}

.profile-metric:nth-child(n+3) {
  border-top: 1px solid var(--border);
}

.profile-metric span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-metric strong {
  overflow: hidden;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-profile-actions {
  display: flex;
  min-width: 118px;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.last-sync-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.sync-technical-meta {
  display: none !important;
}

.quality-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 14px 18px;
  border-left: 4px solid var(--teal);
}

.quality-panel.is-warning {
  border-left-color: var(--amber);
}

.quality-panel.is-failed {
  border-left-color: var(--coral);
}

.quality-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.quality-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.quality-copy span {
  color: var(--muted);
  font-weight: 700;
}

.quality-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.quality-badges span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.quality-badges span.coverage-ok,
.quality-badges span.route-ok,
.quality-badges span.health-ok {
  background: rgba(42, 157, 143, 0.14);
  color: #19766c;
}

.quality-badges span.coverage-warning,
.quality-badges span.route-warning,
.quality-badges span.health-warning,
.quality-badges span.health-unknown {
  background: rgba(245, 158, 11, 0.16);
  color: #8b5d0b;
}

.quality-badges span.health-failed {
  background: rgba(233, 111, 87, 0.14);
  color: #b43e2a;
}

.quality-warnings,
.quality-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.quality-warnings {
  color: #8b5d0b;
}

.quality-actions {
  color: var(--muted);
}

.quality-warnings li,
.quality-actions li {
  font-size: 12px;
  line-height: 1.45;
}

.rating-targets-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.rating-improvement-panel {
  overflow: hidden;
}

.rating-history-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.rating-snapshot-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.rating-snapshot-actions,
.rating-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rating-snapshot-badges {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.rating-history-list {
  display: grid;
}

.rating-history-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rating-history-row {
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}

.rating-history-trigger {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(116px, 150px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 14px 18px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.rating-history-trigger:hover {
  background: rgba(15, 34, 51, 0.035);
}

.rating-history-row.has-warning {
  border-left-color: var(--amber);
}

.rating-history-row.is-failed {
  border-left-color: var(--coral);
}

.rating-history-main {
  display: grid;
  gap: 2px;
}

.rating-history-main strong {
  font-size: 22px;
  line-height: 1.1;
}

.rating-history-main span {
  color: var(--muted);
  font-weight: 800;
}

.rating-history-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.rating-history-meta span {
  display: inline-flex;
  min-height: 24px;
  max-width: 100%;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  overflow: hidden;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-history-meta span.coverage-ok {
  background: rgba(42, 157, 143, 0.14);
  color: #19766c;
}

.rating-history-meta span.coverage-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #8b5d0b;
}

.rating-history-meta .rating-history-chevron {
  margin-left: auto;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  transition: transform 160ms ease;
}

.rating-history-trigger[aria-expanded="true"] .rating-history-chevron {
  transform: rotate(180deg);
}

.rating-history-detail {
  padding: 0 18px 18px 180px;
}

.rating-history-detail h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.rating-history-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.rating-history-detail-heading h3,
.rating-history-detail-heading .empty-state {
  margin: 0;
}

.compact-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.rating-history-changes {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.rating-history-change {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, auto);
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
}

.rating-history-change-title,
.rating-history-change-values {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.rating-history-change-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-history-change-title span,
.rating-history-change-values span,
.rating-history-change-values em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.rating-history-change-values {
  justify-content: flex-end;
}

.rating-history-filters {
  align-items: center;
}

.target-summary {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.target-summary span {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.target-summary .target-diagnostic {
  display: none;
}

.target-summary span.coverage-ok {
  background: rgba(42, 157, 143, 0.14);
  color: #19766c;
}

.target-summary span.coverage-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #8b5d0b;
}

.target-summary span.coverage-neutral {
  background: rgba(69, 88, 197, 0.12);
  color: var(--indigo);
}

.rating-target-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: inline-grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  grid-auto-flow: column;
}

.segmented-control button {
  min-width: 56px;
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--border);
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button:hover {
  background: rgba(69, 88, 197, 0.08);
}

.segmented-control button.active {
  background: var(--text);
  color: #fff;
}

.segmented-control button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(69, 88, 197, 0.24);
  outline-offset: -3px;
}

.target-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.target-frame + .target-frame {
  border-left: 1px solid var(--border);
}

.target-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.target-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.target-heading span {
  color: var(--muted);
  font-weight: 800;
}

.target-list {
  display: grid;
}

.rating-targets-panel > .target-columns {
  grid-template-columns: minmax(0, 1fr);
}

.rating-targets-panel > .target-columns > .target-frame + .target-frame {
  border-top: 1px solid var(--border);
  border-left: 0;
}

.rating-targets-panel .target-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rating-targets-panel .target-list > .rating-target-card:nth-child(even) {
  border-left: 1px solid var(--border);
}

.rating-target-card {
  --difficulty-color: #8994a6;
  --card-background: var(--surface);
  --card-hover-background: #fbfcfe;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 104px;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--card-background);
}

.rating-target-card.difficulty-basic,
.rating-target-jacket.difficulty-basic {
  --difficulty-color: #38a96b;
}

.rating-target-card.difficulty-advanced,
.rating-target-jacket.difficulty-advanced {
  --difficulty-color: #e0ad13;
}

.rating-target-card.difficulty-expert,
.rating-target-jacket.difficulty-expert {
  --difficulty-color: #df4e55;
}

.rating-target-card.difficulty-master,
.rating-target-jacket.difficulty-master {
  --difficulty-color: #8d54c7;
}

.rating-target-card.difficulty-remaster,
.rating-target-jacket.difficulty-remaster {
  --difficulty-color: #e889b6;
}

.rating-target-card.difficulty-utage,
.rating-target-jacket.difficulty-utage {
  --difficulty-color: #d08a28;
}

.rating-target-card.performance-sss-plus {
  --card-background: linear-gradient(
    105deg,
    rgba(231, 177, 32, 0.115),
    rgba(255, 249, 224, 0.055)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(231, 177, 32, 0.16),
    rgba(255, 249, 224, 0.08)
  );
}

.rating-target-card.performance-sss {
  --card-background: linear-gradient(
    105deg,
    rgba(116, 132, 154, 0.13),
    rgba(241, 245, 249, 0.06)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(116, 132, 154, 0.18),
    rgba(241, 245, 249, 0.09)
  );
}

.rating-target-card.performance-ss-plus {
  --card-background: linear-gradient(
    105deg,
    rgba(180, 112, 65, 0.14),
    rgba(249, 235, 220, 0.07)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(180, 112, 65, 0.19),
    rgba(249, 235, 220, 0.1)
  );
}

.rating-target-card.performance-ap {
  --card-background: linear-gradient(
    105deg,
    rgba(244, 114, 116, 0.12),
    rgba(244, 203, 89, 0.115),
    rgba(75, 185, 132, 0.11),
    rgba(76, 156, 214, 0.115),
    rgba(187, 103, 194, 0.12)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(244, 114, 116, 0.16),
    rgba(244, 203, 89, 0.155),
    rgba(75, 185, 132, 0.15),
    rgba(76, 156, 214, 0.155),
    rgba(187, 103, 194, 0.16)
  );
}

.rating-target-card.performance-ap-plus {
  --card-background: linear-gradient(
    105deg,
    rgba(239, 91, 98, 0.19),
    rgba(240, 200, 75, 0.18),
    rgba(82, 191, 124, 0.17),
    rgba(75, 182, 216, 0.18),
    rgba(210, 103, 181, 0.19)
  );
  --card-hover-background: linear-gradient(
    105deg,
    rgba(239, 91, 98, 0.24),
    rgba(240, 200, 75, 0.23),
    rgba(82, 191, 124, 0.22),
    rgba(75, 182, 216, 0.23),
    rgba(210, 103, 181, 0.24)
  );
}

.rating-target-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--difficulty-color);
  content: "";
}

.rating-target-card:hover {
  background: var(--card-hover-background);
}

.rating-target-rank {
  flex: 0 0 auto;
  color: #c2c8d1;
  font-size: 17px;
  font-weight: 900;
  font-style: italic;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rating-target-card.best .rating-target-rank {
  color: rgba(69, 88, 197, 0.28);
}

.rating-target-card.new .rating-target-rank {
  color: rgba(233, 111, 87, 0.32);
}

.rating-target-jacket {
  --difficulty-color: #8994a6;
  position: relative;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 3px solid var(--difficulty-color);
  border-radius: 6px;
  background: var(--surface-strong);
}

.rating-target-jacket .jacket-thumb {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}

.dx-chart-corner {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: linear-gradient(
    105deg,
    #ed4056 0 16%,
    #f19d38 16% 31%,
    #f0d33f 31% 46%,
    #43b96d 46% 61%,
    #3eadd4 61% 76%,
    #635dcc 76% 89%,
    #ce54ae 89% 100%
  );
  box-shadow:
    0 1px 3px rgba(15, 29, 45, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: rotate(-8deg);
}

.rating-target-main {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(160px, 1fr) 148px;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "title values"
    "meta values"
    "constant values";
  gap: 3px 12px;
  align-items: center;
}

.rating-target-title-line {
  display: flex;
  min-width: 0;
  grid-area: title;
  align-self: start;
  gap: 7px;
  align-items: baseline;
  padding-top: 3px;
}

.rating-target-title {
  overflow: hidden;
  color: inherit;
  font-size: 18px;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-target-title:hover,
.rating-target-title:focus-visible,
.target-song-link:hover,
.target-song-link:focus-visible,
.score-record-title:hover strong,
.score-record-title:focus-visible strong,
.chart-directory-song-link:hover strong,
.chart-directory-song-link:focus-visible strong {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rating-target-chart-meta {
  display: flex;
  min-width: 0;
  grid-area: meta;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rating-target-constant {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  grid-area: constant;
  align-self: end;
  justify-self: start;
  align-items: baseline;
  gap: 3px;
}

.rating-target-constant > span {
  color: var(--muted);
  font-size: 10px;
}

.rating-target-constant strong {
  color: var(--text);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rating-target-chart-type {
  display: inline-flex;
  min-height: 20px;
  flex: 0 0 auto;
  align-items: center;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.difficulty-label {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 5px;
  padding: 0 6px;
  background: var(--difficulty-color);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.estimated-label {
  color: #8b5d0b;
}

.rating-target-values {
  display: grid;
  min-width: 0;
  grid-area: values;
  align-self: stretch;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
  padding-block: 2px;
}

.rating-target-values div {
  display: grid;
  min-width: 0;
  gap: 0;
  justify-items: end;
}

.rating-target-values span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-combo-badge {
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  margin-left: 5px;
  border: 1px solid rgba(126, 90, 162, 0.25);
  border-radius: 4px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.68);
  color: #70458f;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.rating-target-values strong {
  overflow: hidden;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-target-values div:last-child strong {
  color: var(--teal);
  font-size: 22px;
}

.rating-target-actions {
  display: flex;
  grid-area: actions;
  align-self: center;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.rating-target-actions .history-button {
  min-height: 25px;
  border-radius: 6px;
  padding-inline: 7px;
  font-size: 11px;
}

.target-contribution-list {
  display: grid;
}

.target-contribution-row {
  display: grid;
  min-height: 50px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  gap: 10px;
  grid-template-columns:
    38px 32px minmax(0, 1fr) minmax(88px, 0.72fr) minmax(42px, auto);
}

.target-contribution-row.is-estimated {
  border-left-color: var(--amber);
}

.target-contribution-row.best .target-rank,
.target-contribution-row.best .target-contribution-value {
  color: var(--indigo);
}

.target-contribution-row.new .target-rank,
.target-contribution-row.new .target-contribution-value {
  color: var(--coral);
}

.target-contribution-row .jacket-thumb {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.target-contribution-song {
  min-width: 0;
}

.target-contribution-song strong,
.target-contribution-song span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-contribution-song strong {
  font-size: 13px;
}

.target-contribution-song span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.target-contribution-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8ecf2;
}

.target-contribution-bar {
  display: block;
  width: var(--contribution-width);
  height: 100%;
  border-radius: inherit;
  background: var(--indigo);
}

.target-contribution-row.new .target-contribution-bar {
  background: var(--coral);
}

.target-contribution-track.is-missing::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 5px,
    rgba(109, 119, 136, 0.18) 5px 8px
  );
  content: "";
}

.target-contribution-value {
  text-align: right;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.target-row {
  display: grid;
  grid-template-columns: 48px 40px minmax(0, 1fr) minmax(84px, auto) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}

.target-row.improvement-row {
  grid-template-columns:
    72px 40px minmax(0, 1fr) minmax(150px, auto) minmax(92px, auto);
}

.target-row.best .target-rank {
  color: var(--indigo);
}

.target-row.new .target-rank {
  color: var(--coral);
}

.target-row.target-priority-high {
  border-left-color: var(--coral);
}

.target-row.target-priority-mid {
  border-left-color: var(--amber);
}

.target-row.target-priority-done {
  border-left-color: rgba(42, 157, 143, 0.36);
}

.target-row.improvement-row.is-outside {
  background: #fcfdff;
}

.target-row.improvement-row .target-rank {
  font-variant-numeric: tabular-nums;
}

.target-rank {
  font-weight: 900;
}

.jacket-thumb {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 6px;
  background: var(--surface-strong);
  object-fit: cover;
}

.jacket-thumb.placeholder {
  border: 1px solid var(--border);
}

.rating-target-jacket-link,
.music-jacket-link,
.score-record-jacket,
.target-song-link,
.score-record-title,
.chart-directory-song-link,
.chart-directory-jacket-link {
  color: inherit;
  text-decoration: none;
}

.rating-target-jacket-link,
.music-jacket-link,
.score-record-jacket,
.chart-directory-jacket-link {
  display: block;
}

.target-song {
  min-width: 0;
}

.target-song strong,
.target-song span,
.target-score strong,
.target-score span {
  display: block;
}

.target-song strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-song span,
.target-score span,
.empty-state {
  color: var(--muted);
}

.target-song .target-chart-meta {
  overflow: hidden;
  margin-top: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.target-score {
  text-align: right;
}

.target-score .status-badges {
  justify-content: flex-end;
  margin-top: 4px;
}

.improvement-delta strong {
  color: var(--teal);
}

.improvement-slot strong {
  font-size: 14px;
}

.target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.target-score strong {
  font-size: 18px;
  line-height: 1.1;
}

.target-score span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.empty-state {
  padding: 18px;
}

.empty-state.compact {
  padding-block: 12px;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sync-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface-strong);
  color: var(--muted);
  white-space: nowrap;
}

.sync-meta span.preflight-ok {
  background: rgba(33, 150, 128, 0.14);
  color: #197667;
  font-weight: 800;
}

.sync-meta span.preflight-warning {
  background: rgba(217, 88, 55, 0.14);
  color: #b6472f;
  font-weight: 800;
}

.sync-meta span.preflight-checking {
  background: rgba(68, 87, 196, 0.12);
  color: var(--indigo);
  font-weight: 800;
}

.sync-meta .share-image-status {
  max-width: 100%;
  min-height: 40px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.bookmarklet-install-link {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--teal);
  cursor: grab;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.bookmarklet-install-link:hover {
  background: rgba(33, 150, 128, 0.1);
}

.bookmarklet-install-link:active {
  cursor: grabbing;
}

.bookmarklet-install-link.is-disabled {
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.58;
  pointer-events: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.app-view {
  display: grid;
  gap: 16px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.content-grid,
.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.content-grid > *,
.history-grid > * {
  min-width: 0;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.panel-toolbar h2 {
  white-space: nowrap;
}

.table-panel .panel-toolbar {
  flex-wrap: wrap;
}

.panel-toolbar.compact {
  align-items: flex-start;
}

.filters {
  flex: 1 1 320px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.filters select {
  flex: 0 0 140px;
}

.filters input {
  flex: 1 1 220px;
  min-width: 160px;
}

.filters input[type="number"] {
  flex: 0 0 116px;
  min-width: 96px;
}

.filters input.short-filter {
  flex: 0 0 104px;
  min-width: 88px;
}

.record-filters {
  align-items: center;
}

.rating-distribution-filters {
  flex: 0 1 auto;
  align-items: center;
}

.range-source-input {
  display: none !important;
}

.dual-range-filter {
  --range-start: 0%;
  --range-end: 100%;
  flex: 0 1 250px;
  min-width: 210px;
  padding: 5px 10px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.dual-range-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dual-range-heading output {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dual-range-control {
  position: relative;
  height: 20px;
  margin-top: 1px;
}

.dual-range-track {
  position: absolute;
  top: 9px;
  right: 2px;
  left: 2px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #dce3eb 0 var(--range-start),
    var(--teal) var(--range-start) var(--range-end),
    #dce3eb var(--range-end) 100%
  );
}

.filters .dual-range-input,
.dual-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 20px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.dual-range-input::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  appearance: none;
  background: var(--teal);
  box-shadow: 0 0 0 1px #0c877e;
  cursor: grab;
  pointer-events: auto;
}

.dual-range-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px #0c877e;
  cursor: grab;
  pointer-events: auto;
}

.dual-range-input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.record-option {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.record-option input {
  flex: none;
  width: 16px;
  min-width: 0;
  height: 16px;
  min-height: auto;
  padding: 0;
  margin: 0;
}

.compact-check {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.compact-check input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--teal);
}

.record-summary-badges {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.record-summary-table {
  min-width: 1120px;
}

.record-master-filter {
  max-width: 280px;
}

.record-summary-table th:first-child,
.record-summary-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.record-summary-table th:first-child {
  background: #fbfcfe;
}

.record-summary-table td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
}

.table-scroll {
  max-width: 100%;
  overflow: auto;
}

.table-footer {
  display: flex;
  justify-content: center;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

.score-title-cell {
  display: flex;
  min-width: 240px;
  align-items: center;
  gap: 10px;
}

.score-title-cell > div {
  min-width: 0;
}

.score-title-cell strong {
  overflow: hidden;
  max-width: 280px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-title-meta {
  overflow: hidden;
  max-width: 300px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.difficulty,
.rank {
  display: inline-flex;
  min-width: 76px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
}

.chart-type-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.difficulty.master,
.difficulty.remaster {
  background: rgba(77, 99, 217, 0.12);
  color: var(--indigo);
}

.difficulty.expert {
  background: rgba(233, 111, 87, 0.14);
  color: var(--coral);
}

.difficulty.utage {
  background: rgba(15, 159, 147, 0.13);
  color: var(--teal);
}

.rank {
  min-width: 58px;
  background: rgba(214, 148, 29, 0.15);
  color: #8b5d0b;
}

.rank-progress {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: rgba(15, 159, 147, 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.rank-progress.complete {
  background: rgba(214, 148, 29, 0.15);
  color: #8b5d0b;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.target-badge {
  display: inline-flex;
  min-width: 44px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-strong);
  font-weight: 900;
}

.target-badge.best {
  background: rgba(77, 99, 217, 0.12);
  color: var(--indigo);
}

.target-badge.new {
  background: rgba(233, 111, 87, 0.14);
  color: var(--coral);
}

.target-badge.candidate {
  min-width: 62px;
  border: 1px dashed currentColor;
  background: var(--surface);
  font-size: 0.76rem;
}

.score-list-heading {
  display: grid;
  gap: 4px;
}

.score-target-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.score-target-legend span {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.score-target-legend .best {
  border-color: rgba(77, 99, 217, 0.24);
  background: #f3f5ff;
  color: #3f51b9;
}

.score-target-legend .new {
  border-color: rgba(233, 111, 87, 0.28);
  background: #fff3ef;
  color: #b84f3a;
}

.public-score-filters {
  align-items: center;
  gap: 8px;
}

.public-score-filters #publicQueryInput {
  flex: 1 1 210px;
  min-width: 190px;
}

.public-score-filters select {
  flex-basis: 132px;
  min-width: 118px;
  max-width: 170px;
}

.public-score-filters #publicVersionFilter,
.public-score-filters #publicCategoryFilter {
  flex-basis: 150px;
}

.dx-score-mode {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dx-score-mode .segmented-control button {
  min-width: 48px;
  min-height: 36px;
  padding-inline: 9px;
  font-size: 12px;
}

.public-score-table {
  min-width: 1290px;
  table-layout: fixed;
  font-size: 13px;
}

.public-score-table th,
.public-score-table td {
  height: 66px;
  padding: 8px 9px;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.public-score-table th {
  height: 42px;
  padding-block: 0;
  text-transform: none;
}

.public-score-table th:nth-child(1),
.public-score-table td:nth-child(1) {
  width: 288px;
}

.public-score-table th:nth-child(2),
.public-score-table td:nth-child(2) {
  width: 76px;
}

.public-score-table th:nth-child(3),
.public-score-table td:nth-child(3) {
  width: 62px;
}

.public-score-table th:nth-child(4),
.public-score-table td:nth-child(4) {
  width: 102px;
}

.public-score-table th:nth-child(5),
.public-score-table td:nth-child(5),
.public-score-table th:nth-child(6),
.public-score-table td:nth-child(6),
.public-score-table th:nth-child(7),
.public-score-table td:nth-child(7),
.public-score-table th:nth-child(9),
.public-score-table td:nth-child(9),
.public-score-table th:nth-child(10),
.public-score-table td:nth-child(10),
.public-score-table th:nth-child(11),
.public-score-table td:nth-child(11) {
  width: 72px;
}

.public-score-table th:nth-child(8),
.public-score-table td:nth-child(8) {
  width: 100px;
}

.public-score-table th:nth-child(12),
.public-score-table td:nth-child(12) {
  width: 82px;
}

.public-score-table th:first-child,
.public-score-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 var(--border);
}

.public-score-table th:first-child {
  z-index: 2;
  background: #fbfcfe;
}

.public-score-table tr.score-target-row.best td {
  background: #f3f5ff;
}

.public-score-table tr.score-target-row.new td {
  background: #fff3ef;
}

.public-score-table tr.score-unplayed-row td {
  background: #f7f9fb;
  color: #7d8894;
}

.public-score-table tr.score-target-row.best td:first-child {
  border-left: 3px solid #6675dc;
}

.public-score-table tr.score-target-row.new td:first-child {
  border-left: 3px solid #e96f57;
}

.public-record-summary-table {
  min-width: 1120px;
}

.score-sort-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
}

.score-sort-button::after {
  width: 12px;
  margin-left: 3px;
  color: #a4adba;
  content: "↕";
  font-size: 10px;
}

[aria-sort="ascending"] .score-sort-button::after {
  color: var(--teal);
  content: "↑";
}

[aria-sort="descending"] .score-sort-button::after {
  color: var(--teal);
  content: "↓";
}

.score-sort-button:hover,
.score-sort-button.active {
  color: var(--text);
}

.score-sort-button:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(69, 88, 197, 0.22);
  outline-offset: 3px;
}

.score-record-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.score-record-heading {
  display: grid;
  min-width: 0;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.score-record-jacket .jacket-thumb {
  width: 50px;
  height: 50px;
  border-radius: 5px;
}

.score-record-title strong {
  display: -webkit-box;
  overflow: hidden;
  max-width: 220px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.score-record-title .score-title-meta {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-score-table .difficulty {
  min-width: 46px;
  min-height: 22px;
  border-radius: 4px;
  padding-inline: 5px;
  font-size: 10px;
}

.public-score-table .chart-type-label {
  margin-top: 2px;
  font-size: 9px;
  text-align: center;
}

.public-score-table .rank {
  min-width: 46px;
  min-height: 22px;
  border-radius: 4px;
  font-size: 11px;
}

.numeric-cell {
  text-align: right;
}

.score-constant,
.score-achievement,
.score-rating {
  color: var(--text);
  font-weight: 900;
}

.score-constant {
  font-size: 15px;
}

.score-achievement {
  font-size: 13px;
}

.score-rating {
  color: var(--teal);
  font-size: 15px;
}

.record-status {
  display: inline-flex;
  min-width: 42px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0 5px;
  background: #edf1f5;
  color: #637083;
  font-size: 10px;
  font-weight: 900;
}

.record-status.ap,
.record-status.ap- {
  background: #fff0bd;
  color: #8c6200;
}

.record-status.fc,
.record-status.fc- {
  background: #e8f7f4;
  color: #087d72;
}

.record-status.fsd,
.record-status.fsd-,
.record-status.fs,
.record-status.fs- {
  background: #ecedff;
  color: #4959bd;
}

.public-score-table small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.dx-score-deficit {
  color: #b84f3a;
  font-size: 14px;
}

.dx-star {
  color: #b97900;
  font-weight: 900;
}

.community-top-rate {
  color: #087d72;
  font-weight: 900;
}

.score-empty-value {
  color: #a4adba;
}

.score-date-button {
  border: 0;
  border-bottom: 1px dotted #9aa5b3;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.score-date-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.score-date-button:focus-visible {
  outline: 3px solid rgba(15, 159, 147, 0.2);
  outline-offset: 3px;
}

.stats-panel {
  overflow: hidden;
}

.stats-panel + .stats-panel {
  margin-top: 16px;
}

.standard-course-notice {
  margin-top: 16px;
  border-left: 4px solid var(--coral);
  background: #fff9f6;
}

.standard-course-notice p {
  margin: 4px 0 0;
}

.standard-course-notice a {
  color: #b54835;
  font-weight: 900;
}

.public-profile-tabs a.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.stats-list {
  display: grid;
  gap: 0;
}

.rating-distribution-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.rating-distribution-metric {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 16px 18px;
}

.rating-distribution-metric + .rating-distribution-metric {
  border-left: 1px solid var(--border);
}

.rating-distribution-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rating-distribution-metric strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.2;
}

.rating-distribution-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding: 16px 18px 18px;
}

.rating-distribution-histogram {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(25, minmax(28px, 1fr));
  gap: 3px;
  min-width: 920px;
  height: 250px;
  align-items: stretch;
}

.rating-distribution-bar {
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr) 24px;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.rating-distribution-bar > strong,
.rating-distribution-bar > span {
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-distribution-bar > strong {
  align-self: end;
  color: var(--text);
}

.rating-distribution-bar > span {
  color: var(--muted);
  font-weight: 800;
}

.rating-distribution-column {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #aeb9c6;
  background: linear-gradient(to top, rgba(215, 222, 231, 0.38), transparent);
}

.rating-distribution-column i {
  position: absolute;
  right: 2px;
  bottom: 0;
  left: 2px;
  min-height: 0;
  border-radius: 3px 3px 0 0;
  background: #64748b;
}

.rating-band-rainbow .rating-distribution-column i {
  background: #cf4f71;
}

.rating-band-gold .rating-distribution-column i {
  background: #c6921d;
}

.rating-band-silver .rating-distribution-column i {
  background: #8994a6;
}

.rating-band-bronze .rating-distribution-column i {
  background: #b9784e;
}

.rating-band-violet .rating-distribution-column i {
  background: #7568b7;
}

.rating-band-blue .rating-distribution-column i {
  background: #3e8db6;
}

.rating-distribution-row {
  display: grid;
  grid-template-columns: 112px minmax(120px, 1fr) 104px;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.rating-distribution-row > strong,
.rating-distribution-row > span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rating-distribution-row > span {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.rating-distribution-track {
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #e8edf3;
}

.rating-distribution-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #64748b;
}

.rating-band-rainbow .rating-distribution-track i {
  background: #cf4f71;
}

.rating-band-gold .rating-distribution-track i {
  background: #c6921d;
}

.rating-band-silver .rating-distribution-track i {
  background: #8994a6;
}

.rating-band-bronze .rating-distribution-track i {
  background: #b9784e;
}

.rating-band-violet .rating-distribution-track i {
  background: #7568b7;
}

.rating-band-blue .rating-distribution-track i {
  background: #3e8db6;
}

.stat-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.rating-entry-filters .segmented-control {
  flex: 0 0 auto;
}

.rating-entry-table-scroll {
  border-top: 1px solid var(--border);
}

.rating-entry-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.rating-entry-table th,
.rating-entry-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: middle;
}

.rating-entry-table th {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.rating-entry-table th:first-child {
  width: 36%;
}

.rating-entry-table th:nth-child(2) {
  width: 108px;
}

.rating-entry-table th:nth-child(3) {
  width: 70px;
}

.rating-entry-table th:nth-child(4) {
  width: 142px;
}

.rating-entry-table th:nth-child(n+5) {
  width: 112px;
}

.rating-entry-table th button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.rating-entry-table th button::after {
  width: 10px;
  color: #a4afba;
  content: "";
}

.rating-entry-table th button.active[data-direction="asc"]::after {
  color: var(--teal);
  content: "▲";
}

.rating-entry-table th button.active[data-direction="desc"]::after {
  color: var(--teal);
  content: "▼";
}

.rating-entry-row {
  content-visibility: auto;
  contain-intrinsic-size: 62px;
}

.rating-entry-row:hover {
  background: #f8fbfc;
}

.rating-entry-title-cell {
  display: grid;
  min-width: 0;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.rating-entry-title-cell .jacket-thumb {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
}

.rating-entry-title-cell div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.rating-entry-title-cell strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rating-entry-title-cell span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-entry-row td:nth-child(2) small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.rating-entry-table .numeric-cell,
.rating-entry-rate-cell {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.rating-entry-rate-cell strong {
  display: block;
  margin-bottom: 5px;
  color: var(--indigo);
  font-size: 14px;
}

.rating-entry-row.new .rating-entry-rate-cell strong {
  color: var(--coral);
}

.rating-entry-rate-cell .rating-entry-meter {
  height: 5px;
}

.rating-entry-overview {
  display: grid;
  align-items: center;
  gap: 14px;
  grid-template-columns: minmax(160px, 1fr) minmax(170px, auto);
}

.rating-entry-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #e8edf3;
}

.rating-entry-meter span {
  display: block;
  width: var(--entry-width);
  height: 100%;
  border-radius: inherit;
  background: var(--indigo);
}

.rating-entry-item.new .rating-entry-meter span {
  background: var(--coral);
}

.rating-entry-item.new .stat-heading b {
  color: var(--coral);
}

.rating-entry-metrics {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: right;
}

.rating-entry-metrics strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rating-entry-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.rating-band-stats {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.rating-band-row {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.rating-band-row strong {
  color: var(--text);
  font-size: 12px;
}

.rating-band-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rating-band-row div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 6px;
}

.rating-band-row span {
  display: inline-flex;
  min-width: 0;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-radius: 8px;
  padding: 0 7px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.rating-band-row span b {
  color: var(--text);
  font-size: 12px;
}

.stat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-title-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.stat-title-cell > div {
  min-width: 0;
}

.stat-heading strong,
.stat-heading span {
  display: block;
}

.stat-heading strong {
  overflow: hidden;
  max-width: 420px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-heading b {
  color: var(--indigo);
}

.stat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 42px 54px;
  gap: 8px;
  align-items: center;
  margin: 7px 0;
}

.rank-bar div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.rank-bar strong {
  font-size: 12px;
  text-align: right;
}

.rank-bar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.community-detail-panel {
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

.community-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.community-detail-heading h3 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.3;
}

.community-detail-heading h3 span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-detail-heading p {
  color: var(--muted);
}

.community-detail-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.community-detail-section {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.community-detail-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.community-detail-section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.score-history-panel {
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

.score-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.score-history-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.3;
}

.score-history-heading p {
  color: var(--muted);
}

.score-history-list {
  display: grid;
}

.score-history-item {
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.score-history-main,
.score-history-meta,
.score-history-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.score-history-main strong {
  font-size: 16px;
}

.score-history-main span,
.score-history-meta span,
.score-history-deltas span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.score-history-deltas .is-positive {
  background: rgba(15, 159, 147, 0.12);
  color: #0a7068;
}

.score-history-deltas .is-negative {
  background: rgba(233, 111, 87, 0.13);
  color: #b43e2a;
}

.settings-form {
  display: grid;
  gap: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.setting-row input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.setting-field {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.setting-field-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.setting-field-heading > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.setting-field textarea,
.setting-field > input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.55;
}

.setting-field textarea {
  min-height: 88px;
  resize: vertical;
}

.setting-field textarea:focus-visible,
.setting-field > input:focus-visible {
  outline: 3px solid rgba(69, 88, 197, 0.2);
  outline-offset: 1px;
}

.setting-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.setting-copy strong {
  font-size: 14px;
  line-height: 1.3;
}

.setting-copy span {
  color: var(--muted);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.settings-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.settings-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.settings-legal-footer a {
  color: #087d73;
  font-weight: 800;
  text-decoration: none;
}

.settings-legal-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.settings-status {
  min-height: 20px;
  color: var(--teal);
  font-weight: 800;
}

.public-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.public-link-row .secondary-button {
  display: inline-flex;
  max-width: min(100%, 320px);
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.confirmation-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(15, 24, 32, 0.28);
}

.confirmation-dialog::backdrop {
  background: rgba(15, 24, 32, 0.64);
}

.confirmation-dialog-form,
.confirmation-dialog-copy {
  display: grid;
}

.confirmation-dialog-form {
  gap: 0;
}

.confirmation-dialog-copy {
  gap: 14px;
  padding: 22px;
}

.confirmation-dialog-copy h2,
.confirmation-dialog-copy p {
  margin: 0;
}

.confirmation-dialog-copy h2 {
  font-size: 20px;
}

.confirmation-dialog-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.confirmation-dialog-copy label {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.confirmation-dialog-copy strong {
  overflow-wrap: anywhere;
}

.confirmation-dialog-copy input {
  width: 100%;
  min-width: 0;
}

.confirmation-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-strong);
}

.settings-inline-actions {
  display: flex;
  flex: 0 1 420px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.settings-inline-actions input[type="file"] {
  flex: 1 1 220px;
  min-width: 180px;
}

.secondary-button.is-disabled {
  opacity: 0.58;
}

.public-page {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.not-found-panel {
  display: grid;
  min-height: 360px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
}

.not-found-panel h1,
.not-found-panel p {
  margin: 0;
}

.not-found-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.legal-page {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.legal-heading {
  padding: 38px 2px 28px;
  border-bottom: 1px solid var(--border);
}

.legal-heading h1 {
  margin: 7px 0 0;
  font-size: 42px;
  line-height: 1.2;
}

.legal-heading > p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 22px 0 0;
}

.legal-dates div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.legal-dates dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.legal-dates dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  gap: 44px;
  align-items: start;
  justify-content: center;
  padding: 22px 0 50px;
}

.legal-toc {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--border);
}

.legal-toc strong {
  padding: 3px 8px 8px;
  font-size: 12px;
}

.legal-toc a {
  border-radius: 5px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.legal-toc a:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.legal-document {
  min-width: 0;
}

.legal-document section {
  scroll-margin-top: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.legal-document section:first-child {
  padding-top: 12px;
}

.legal-document h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.legal-document h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}

.legal-document p,
.legal-document li {
  color: #425064;
  font-size: 13px;
  line-height: 1.9;
}

.legal-document p {
  margin: 10px 0 0;
}

.legal-document ul,
.legal-document ol {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 1.6em;
}

.legal-document a,
.site-legal-footer a {
  color: #087d73;
}

.site-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.site-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-legal-footer a {
  font-weight: 750;
  text-decoration: none;
}

.site-legal-footer a[aria-current="page"] {
  color: var(--text);
}

.public-profile-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.public-profile-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.public-profile-tabs a:hover,
.public-profile-tabs a:focus-visible,
.public-profile-tabs a.active {
  border-bottom-color: var(--coral);
  color: var(--text);
}

#rating,
#records {
  scroll-margin-top: 12px;
}

.public-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.public-header .brand {
  color: var(--text);
}

.public-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-navigation {
  display: flex;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.site-navigation-toggle {
  display: none;
}

.site-navigation-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.site-navigation-link:hover,
.site-navigation-link:focus-visible {
  border-color: #aebbc9;
  background: var(--surface-strong);
}

.site-navigation-link.active {
  border-color: #17202a;
  background: #17202a;
  color: #fff;
}

.public-hero h1 {
  margin-bottom: 4px;
}

.public-hero p {
  color: var(--muted);
  font-weight: 700;
}

.public-hero .profile-comment {
  max-width: 720px;
  margin-top: 10px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-wrap;
}

.public-hero {
  grid-template-columns:
    minmax(280px, 0.85fr) minmax(430px, 1.15fr)
    minmax(290px, auto);
}

.public-profile-actions {
  display: grid;
  min-width: 290px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-profile-actions .last-sync-note,
.public-profile-actions .share-image-status {
  grid-column: 1 / -1;
}

.rating-share-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.24);
}

.rating-share-dialog::backdrop {
  background: rgba(18, 30, 40, 0.58);
}

.rating-share-dialog-heading,
.rating-share-dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.rating-share-dialog-heading {
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.rating-share-dialog-heading h2,
.rating-share-dialog-heading p {
  margin: 0;
}

.rating-share-dialog-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rating-share-preview {
  display: grid;
  max-height: calc(100vh - 230px);
  min-height: 280px;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: #e6edf3;
  color: var(--muted);
  font-weight: 800;
}

.rating-share-preview img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  border: 1px solid #b7c7d3;
  background: #dff4fb;
}

.rating-share-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.rating-share-dialog-actions .share-image-status {
  margin-right: auto;
}

.public-grid {
  display: grid;
  gap: 16px;
}

.constant-table-view {
  overflow: hidden;
}

.constant-table-toolbar {
  align-items: center;
}

.constant-table-controls,
.constant-table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.constant-table-controls {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: flex-end;
}

.constant-table-select-control {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.constant-table-select-control select {
  width: auto;
  min-width: 124px;
  min-height: 34px;
  padding-block: 4px;
  font-size: 11px;
}

.constant-table-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.constant-table-guide p {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.constant-table-guide strong {
  color: #a83d2c;
}

.constant-table-legend span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 7px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.constant-table-legend .difficulty-master {
  border-color: #8d54c7;
  color: #7141a2;
}

.constant-table-legend .difficulty-remaster {
  border-color: #e889b6;
  border-style: dashed;
  color: #b54f82;
}

.constant-table-legend .difficulty-ultima {
  border-color: #252831;
  background: #252831;
  color: #fff;
}

.constant-table-legend .constant-legend-new {
  border-color: rgba(239, 111, 87, 0.5);
  background: rgba(239, 111, 87, 0.1);
  color: #b4422d;
}

.constant-table-legend .constant-legend-target {
  border-color: rgba(13, 148, 136, 0.34);
  color: #087d73;
}

.constant-table-legend .constant-legend-unplayed {
  border-color: #bdc7d1;
  background: #eef2f5;
  color: #768391;
}

.constant-table-board {
  --constant-tile-size: 108px;
  --constant-tile-gap: 4px;
  min-height: 180px;
  padding: 8px;
  background: #edf1f4;
  user-select: none;
}

.constant-table-board > .empty-state {
  margin: 0;
  padding: 36px 18px;
  background: var(--surface);
}

.constant-level-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--constant-tile-gap);
  margin: var(--constant-tile-gap) 0;
  content-visibility: auto;
  contain-intrinsic-size: auto var(--constant-tile-size);
}

.constant-level-label,
.constant-chart-card {
  width: var(--constant-tile-size);
  height: var(--constant-tile-size);
  flex: 0 0 var(--constant-tile-size);
  box-sizing: border-box;
}

.constant-level-label {
  display: grid;
  margin: 0;
  place-items: center;
  border: 4px solid #17202a;
  background: #fff;
  color: #111820;
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
}

.constant-chart-card {
  --constant-difficulty: #8794a3;
  position: relative;
  display: block;
  overflow: hidden;
  border: 4px solid var(--constant-difficulty);
  background: #dfe6eb;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}

.constant-chart-card:hover,
.constant-chart-card:focus-visible {
  z-index: 3;
  outline: 2px solid #17202a;
  outline-offset: 1px;
  box-shadow: 0 5px 16px rgba(23, 32, 42, 0.28);
}

.constant-chart-card.difficulty-basic {
  --constant-difficulty: #38a96b;
}

.constant-chart-card.difficulty-advanced {
  --constant-difficulty: #e0ad13;
}

.constant-chart-card.difficulty-expert {
  --constant-difficulty: #df4e55;
}

.constant-chart-card.difficulty-master {
  --constant-difficulty: #8d54c7;
}

.constant-chart-card.difficulty-remaster {
  --constant-difficulty: #e889b6;
  border-style: dashed;
}

.constant-chart-card.difficulty-ultima {
  --constant-difficulty: #252831;
}

.constant-chart-card.difficulty-world-s-end {
  --constant-difficulty: #66717d;
}

.constant-chart-card img,
.constant-chart-jacket-placeholder {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.constant-chart-jacket-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), transparent 55%),
    #d8e0e6;
}

.constant-chart-card::before,
.constant-chart-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.constant-chart-card::after {
  background: linear-gradient(
    to bottom,
    rgba(7, 13, 18, 0.64) 0,
    rgba(7, 13, 18, 0.08) 34%,
    rgba(7, 13, 18, 0.04) 52%,
    rgba(7, 13, 18, 0.76) 100%
  );
}

.constant-chart-card.performance-sss-plus::before {
  background: rgba(231, 177, 32, 0.08);
}

.constant-chart-card.performance-sss::before {
  background: rgba(116, 132, 154, 0.1);
}

.constant-chart-card.performance-ss-plus::before {
  background: rgba(180, 112, 65, 0.11);
}

.constant-chart-card.performance-ap::before {
  background: linear-gradient(
    135deg,
    rgba(244, 114, 116, 0.13),
    rgba(244, 203, 89, 0.12),
    rgba(75, 185, 132, 0.12),
    rgba(76, 156, 214, 0.12),
    rgba(187, 103, 194, 0.13)
  );
}

.constant-chart-card.performance-ap-plus::before {
  background: linear-gradient(
    135deg,
    rgba(239, 91, 98, 0.2),
    rgba(240, 200, 75, 0.18),
    rgba(82, 191, 124, 0.18),
    rgba(75, 182, 216, 0.19),
    rgba(210, 103, 181, 0.2)
  );
}

.constant-chart-card.performance-aj::before {
  background: linear-gradient(
    135deg,
    rgba(255, 220, 92, 0.16),
    rgba(255, 255, 255, 0.1),
    rgba(77, 198, 206, 0.14)
  );
}

.constant-chart-card.performance-ajc::before {
  background: linear-gradient(
    135deg,
    rgba(67, 206, 217, 0.22),
    rgba(255, 255, 255, 0.19),
    rgba(255, 211, 72, 0.2)
  );
}

.constant-chart-card.is-unplayed img {
  filter: grayscale(0.72);
  opacity: 0.48;
}

.constant-chart-card.is-new-chart {
  box-shadow: inset 0 -4px #ef6f57;
}

.constant-chart-top,
.constant-chart-side,
.constant-chart-achievement,
.constant-chart-title {
  position: absolute;
  z-index: 2;
}

.constant-chart-top {
  display: flex;
  top: 2px;
  right: 3px;
  left: 3px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
}

.constant-chart-badges,
.constant-chart-side {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.constant-chart-badges {
  flex-direction: column;
  align-items: flex-start;
  max-width: 52px;
}

.constant-chart-side {
  top: 25px;
  right: 3px;
  max-width: 42px;
  justify-content: flex-end;
}

.constant-status-badge,
.constant-new-badge,
.constant-target-badge,
.constant-chart-type {
  display: inline-flex;
  min-height: 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 3px;
  padding: 0 3px;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.constant-status-badge {
  background: rgba(12, 23, 32, 0.78);
}

.constant-status-badge.status-sss-plus {
  border-color: #ffe07a;
  background: rgba(111, 77, 3, 0.9);
  color: #fff2a8;
  font-size: 9px;
  text-shadow: 0 1px 2px #392300;
}

.constant-status-badge.status-sss {
  border-color: #e4ebf2;
  background: rgba(53, 66, 80, 0.9);
  color: #f4f7fa;
  font-size: 9px;
}

.constant-status-badge.status-ap,
.constant-status-badge.status-ap-plus {
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(
    110deg,
    #e75c68,
    #dda934,
    #3f9f73,
    #438fc4,
    #a95bac
  );
  color: #fff;
  font-size: 9px;
  text-shadow: 0 1px 2px rgba(20, 24, 29, 0.92);
}

.constant-status-badge.status-aj,
.constant-status-badge.status-ajc {
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(110deg, #e4ad23, #58b9c4, #8865c8);
  color: #fff;
  font-size: 9px;
}

.constant-status-badge.status-ajc {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.48);
  background: linear-gradient(110deg, #f0c23f, #47c5d0, #a479d9);
}

.constant-status-badge.status-ap-plus {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.48),
    0 1px 5px rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.constant-chart-card.is-best-target .constant-chart-rating {
  color: #ddc8ff;
}

.constant-chart-card.is-new-target .constant-chart-rating {
  color: #ffb5a6;
}

.constant-chart-card.is-best-target .constant-chart-rating,
.constant-chart-card.is-new-target .constant-chart-rating {
  -webkit-text-stroke-color: rgba(20, 10, 34, 0.92);
  text-shadow: 0 1px 4px rgba(5, 8, 12, 0.98);
}

.constant-chart-card.performance-ap .constant-chart-achievement,
.constant-chart-card.performance-ap-plus .constant-chart-achievement {
  color: #f0ffff;
  -webkit-text-stroke-color: rgba(15, 42, 48, 0.92);
  text-shadow: none;
}

.constant-chart-card.performance-aj .constant-chart-achievement,
.constant-chart-card.performance-ajc .constant-chart-achievement {
  color: #f3ffff;
  -webkit-text-stroke-color: rgba(15, 42, 48, 0.92);
}

.chuni-constant-table-board .constant-chart-achievement {
  font-size: 14px;
}

.constant-new-badge {
  border-color: #ff9c89;
  background: #d94d35;
}

.constant-target-badge.best {
  background: #6651c8;
}

.constant-target-badge.new {
  background: #d64e3a;
}

.constant-chart-type.standard {
  background: rgba(19, 31, 40, 0.78);
}

.constant-chart-type.dx {
  border-color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(
    90deg,
    #ed5151 0 20%,
    #ee9d36 20% 40%,
    #e2c52a 40% 60%,
    #66af54 60% 80%,
    #259ed2 80%
  );
}

.constant-chart-rating,
.constant-chart-achievement {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(6, 12, 18, 0.85);
  paint-order: stroke fill;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.constant-chart-rating {
  flex: 0 0 auto;
  font-size: 20px;
}

.constant-chart-achievement {
  right: 3px;
  bottom: 21px;
  left: 3px;
  overflow: hidden;
  font-size: 15px;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
}

.constant-chart-card.is-unplayed .constant-chart-achievement {
  color: #f6f8fa;
  font-size: 14px;
}

.constant-chart-title {
  right: 0;
  bottom: 0;
  left: 0;
  height: 19px;
  overflow: hidden;
  padding: 1px 3px 0;
  background: rgba(7, 12, 17, 0.84);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.constant-table-board.hide-titles .constant-chart-title {
  display: none;
}

.constant-table-board.hide-titles .constant-chart-achievement {
  bottom: 3px;
}

.public-rating-view {
  display: grid;
  gap: 16px;
}

.public-rating-view .rating-targets-panel,
.public-rating-view .rating-history-panel {
  margin-bottom: 0;
}

.public-rating-view .target-row.improvement-row {
  grid-template-columns:
    72px 40px minmax(0, 1fr) minmax(150px, auto) minmax(110px, auto);
}

.update-page-shell {
  display: grid;
  gap: 16px;
}

.update-loading {
  padding: 36px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.update-loading p,
.update-heading h1,
.update-heading p,
.update-player-copy h2 {
  margin: 0;
}

.update-page {
  display: grid;
  gap: 16px;
}

.update-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px 0;
}

.update-heading h1 {
  margin-top: 3px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.update-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.update-summary-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(430px, 1.35fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
}

.update-player-copy {
  min-width: 0;
}

.update-player-copy h2 {
  overflow: hidden;
  margin-top: 3px;
  font-size: 30px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-rating-flow {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.update-rating-flow > div {
  display: grid;
  gap: 2px;
}

.update-rating-flow span,
.update-summary-metrics span,
.update-record-rating > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.update-rating-flow strong {
  font-size: 38px;
  line-height: 1;
}

.update-rating-arrow {
  color: var(--muted);
  font-size: 24px;
}

.update-rating-flow em {
  color: var(--teal);
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.update-rating-flow em.negative {
  color: #c94a3b;
}

.update-summary-metrics {
  display: grid;
  min-width: 180px;
  gap: 8px;
}

.update-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.update-share-status {
  margin: 0 20px 12px;
}

.update-record-list {
  border-top: 1px solid var(--border);
}

.update-record {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(150px, auto) 42px;
  min-height: 112px;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.update-record:last-child {
  border-bottom: 0;
}

.update-record-jacket {
  position: relative;
  display: block;
  width: 112px;
  min-height: 112px;
  overflow: hidden;
  border-left: 6px solid var(--muted);
  background: var(--surface-strong);
}

.update-record-jacket img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-record.difficulty-basic .update-record-jacket {
  border-left-color: #40a85a;
}

.update-record.difficulty-advanced .update-record-jacket {
  border-left-color: #c7a51e;
}

.update-record.difficulty-expert .update-record-jacket {
  border-left-color: #e3535b;
}

.update-record.difficulty-master .update-record-jacket {
  border-left-color: #8648c7;
}

.update-record.difficulty-re-master .update-record-jacket {
  border-left-color: #efafd0;
}

.update-record-main {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 8px;
  padding: 12px 16px;
}

.update-record-title-row,
.update-record-chart,
.update-record-values,
.update-record-rating > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.update-record-title-row,
.update-record-chart,
.update-record-values {
  min-width: 0;
  max-width: 100%;
}

.update-record-title-row > a {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-kind {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.update-record-chart {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.update-record-chart strong {
  color: var(--text);
}

.update-record-values {
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 800;
}

.update-record-values em,
.update-record-rating em {
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.update-record-rating {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 3px;
  padding: 12px 8px;
  text-align: right;
}

.update-record-rating small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.update-record-rating strong {
  color: var(--teal);
  font-size: 28px;
  line-height: 1;
}

.update-remove-button {
  align-self: center;
  justify-self: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
}

.update-remove-button:hover {
  color: #c94a3b;
}

@media (max-width: 980px) {
  .update-summary-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .update-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .update-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .update-heading .secondary-button {
    align-self: start;
  }

  .update-summary-panel {
    padding: 20px;
  }

  .update-rating-flow {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .update-rating-flow em {
    grid-column: 1 / -1;
  }

  .update-rating-flow strong {
    font-size: 32px;
  }

  .update-actions {
    width: 100%;
    justify-content: stretch;
  }

  .update-actions .secondary-button,
  .update-actions .primary-button {
    flex: 1 1 140px;
  }

  .update-record {
    grid-template-columns: 88px minmax(0, 1fr) 36px;
    min-height: 116px;
  }

  .update-record-jacket {
    width: 88px;
    min-height: 116px;
  }

  .update-record-main {
    gap: 5px;
    padding: 10px;
  }

  .update-record-title-row > a {
    font-size: 16px;
  }

  .update-record-chart {
    flex-wrap: wrap;
    gap: 3px 6px;
    font-size: 11px;
  }

  .update-record-values {
    flex-wrap: wrap;
    gap: 3px 6px;
    font-size: 14px;
  }

  .update-record-rating {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    padding: 0 10px 8px;
  }

  .update-record-rating > span,
  .update-record-rating small,
  .update-record-rating em {
    display: none;
  }

  .update-record-rating strong {
    font-size: 22px;
  }

  .update-remove-button {
    grid-column: 3;
    grid-row: 1;
  }
}

.public-onboarding .panel-toolbar {
  align-items: center;
}

.public-onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-onboarding-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 24px 22px 46px;
  color: var(--muted);
  font-weight: 700;
}

.public-onboarding-hint {
  margin: -8px 24px 22px;
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  background: #f0f8f7;
  color: #4f6172;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.directory-panel {
  margin-top: 16px;
}

/* CHUNITHM chart catalog */
.chuni-catalog-hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(480px, 1.3fr);
}

.chuni-catalog-metrics {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.chuni-catalog-metrics div {
  min-width: 0;
  padding: 4px 16px;
  border-left: 1px solid var(--border);
}

.chuni-catalog-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.chuni-catalog-metrics dd {
  overflow: hidden;
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-catalog-panel {
  margin-top: 16px;
}

.chuni-catalog-toolbar {
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr);
  border-bottom: 1px solid var(--border);
}

.chuni-catalog-filter-disclosure {
  min-width: 0;
}

.chuni-catalog-filter-disclosure > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.chuni-catalog-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.chuni-catalog-filter-disclosure > summary::after {
  color: var(--teal);
  content: "+";
  font-size: 21px;
  line-height: 1;
}

.chuni-catalog-filter-disclosure[open] > summary::after {
  content: "−";
}

.chuni-catalog-filter-disclosure > summary small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-catalog-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfe;
}

.chuni-catalog-filters > label,
.chuni-constant-filter {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.chuni-catalog-filters label > span,
.chuni-constant-filter legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.chuni-catalog-filters input,
.chuni-catalog-filters select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.chuni-filter-query {
  grid-column: span 2;
}

.chuni-constant-filter {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  margin: 0;
  border: 0;
  padding: 0;
}

.chuni-constant-filter legend {
  grid-column: 1 / -1;
}

.chuni-constant-filter > span {
  align-self: center;
  color: var(--muted);
}

.chuni-worlds-end-toggle {
  align-content: end;
  grid-template-columns: auto 1fr !important;
  min-height: 38px;
}

.chuni-catalog-filters .record-option,
.chuni-filter-reset {
  align-self: end;
}

.chuni-filter-reset {
  min-height: 38px;
}

.chuni-catalog-constant-board {
  min-height: 320px;
}

.chuni-catalog-constant-row {
  overflow: hidden;
}

.chuni-catalog-difficulty {
  border-radius: 3px;
  padding: 2px 3px;
  background: rgba(9, 16, 23, 0.76);
  font-size: 11px;
  -webkit-text-stroke-width: 0;
}

.chuni-catalog-constant-board
  .constant-chart-card.difficulty-ultima
  .chuni-catalog-difficulty {
  background: rgba(18, 20, 25, 0.92);
}

.chuni-catalog-constant-board
  .constant-chart-card.difficulty-world-s-end
  .chuni-catalog-difficulty {
  background: rgba(71, 81, 92, 0.9);
}

.chuni-catalog-constant-board .constant-chart-jacket-placeholder {
  display: grid;
  place-items: center;
  color: #74808c;
  font-size: 28px;
}

.chuni-catalog-mobile-sort {
  display: none;
}

.chuni-catalog-table {
  width: 100%;
  min-width: 940px;
  table-layout: fixed;
}

.chuni-catalog-table th,
.chuni-catalog-table td {
  height: 72px;
  padding: 8px 11px;
  vertical-align: middle;
}

.chuni-catalog-table th {
  height: 42px;
}

.chuni-catalog-table th button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.chuni-catalog-table th button.active::after {
  content: " ↓";
  color: var(--teal);
}

.chuni-catalog-table th[aria-sort="ascending"] button.active::after {
  content: " ↑";
}

.chuni-catalog-table th:nth-child(1) {
  width: 34%;
}

.chuni-catalog-table th:nth-child(2) {
  width: 13%;
}

.chuni-catalog-table th:nth-child(3) {
  width: 9%;
}

.chuni-catalog-table th:nth-child(4) {
  width: 16%;
}

.chuni-catalog-table th:nth-child(5) {
  width: 8%;
}

.chuni-catalog-table th:nth-child(6) {
  width: 7%;
}

.chuni-catalog-table th:nth-child(7) {
  width: 13%;
}

.chuni-catalog-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}

.chuni-catalog-song {
  display: grid;
  min-width: 0;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.chuni-catalog-song:hover strong,
.chuni-catalog-song:focus-visible strong {
  color: var(--teal);
  text-decoration: underline;
}

.chuni-catalog-jacket {
  display: grid;
  width: 58px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 22px;
}

.chuni-catalog-jacket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.chuni-catalog-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chuni-catalog-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.25;
}

.chuni-catalog-copy small,
.chuni-catalog-table td > small,
.chuni-catalog-table td > span + small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-difficulty {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 4px;
  padding: 0 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.chuni-difficulty-link {
  display: inline-flex;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.chuni-difficulty-link:hover {
  filter: brightness(0.94);
}

.chuni-difficulty-link:focus-visible {
  outline: 3px solid rgba(14, 135, 126, 0.32);
  outline-offset: 2px;
}

.chuni-difficulty.difficulty-basic {
  background: #2eaa66;
}

.chuni-difficulty.difficulty-advanced {
  background: #e9a622;
}

.chuni-difficulty.difficulty-expert {
  background: #e45150;
}

.chuni-difficulty.difficulty-master {
  background: #8c4bc4;
}

.chuni-difficulty.difficulty-ultima {
  background: #242832;
}

.chuni-difficulty.difficulty-world-s-end {
  background: #616a76;
}

.chuni-new-label {
  color: var(--coral) !important;
  font-weight: 900;
}

.chuni-designer {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.chuni-catalog-empty td {
  height: 160px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .chuni-catalog-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .chuni-catalog-filters {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .chuni-filter-query {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .chuni-catalog-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .chuni-catalog-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .chuni-catalog-metrics div {
    padding: 10px 8px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .chuni-catalog-metrics div:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .chuni-catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
  }

  .chuni-catalog-toolbar {
    gap: 10px;
    padding: 12px;
  }

  .chuni-catalog-filter-disclosure > summary {
    min-height: 40px;
  }

  .chuni-catalog-filter-disclosure > summary small {
    max-width: 58vw;
  }

  .chuni-filter-query,
  .chuni-constant-filter,
  .chuni-worlds-end-toggle,
  .chuni-catalog-mobile-sort {
    grid-column: 1 / -1;
  }

  .chuni-catalog-constant-board {
    --constant-tile-size: 86px;
    --constant-tile-gap: 2px;
    padding: 4px;
  }

  .chuni-catalog-constant-board .constant-level-label {
    border-width: 3px;
    font-size: 30px;
  }

  .chuni-catalog-constant-board .constant-chart-card {
    border-width: 3px;
  }

  .chuni-catalog-constant-board .constant-chart-title {
    height: 17px;
    font-size: 9px;
    line-height: 16px;
  }

  .chuni-catalog-difficulty {
    font-size: 9px;
  }

  .chuni-catalog-mobile-sort {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .chuni-catalog-mobile-sort label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
  }

  .chuni-catalog-scroll {
    overflow: visible;
  }

  .chuni-catalog-table,
  .chuni-catalog-table tbody,
  .chuni-catalog-table tr,
  .chuni-catalog-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .chuni-catalog-table thead {
    display: none;
  }

  .chuni-catalog-table tbody {
    display: grid;
  }

  .chuni-catalog-table tbody tr:not(.chuni-catalog-empty) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, auto);
    gap: 0 12px;
    min-height: 88px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
  }

  .chuni-catalog-table td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .chuni-catalog-table td:nth-child(1) {
    grid-row: span 2;
  }

  .chuni-catalog-table td:nth-child(2),
  .chuni-catalog-table td:nth-child(3),
  .chuni-catalog-table td:nth-child(5) {
    align-self: center;
    text-align: right;
  }

  .chuni-catalog-table td:nth-child(4),
  .chuni-catalog-table td:nth-child(6),
  .chuni-catalog-table td:nth-child(7) {
    display: none;
  }

  .chuni-catalog-song {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .chuni-catalog-jacket {
    width: 68px;
    height: 68px;
  }

  .chuni-catalog-copy strong {
    font-size: 14px;
  }

  .chuni-catalog-empty {
    display: block !important;
  }
}

.chart-directory-table {
  min-width: 920px;
  table-layout: fixed;
}

.chart-directory-table th,
.chart-directory-table td {
  padding: 10px 12px;
}

.chart-directory-table th:nth-child(1) {
  width: 36%;
}

.chart-directory-table th:nth-child(2) {
  width: 13%;
}

.chart-directory-table th:nth-child(3),
.chart-directory-table th:nth-child(5),
.chart-directory-table th:nth-child(6) {
  width: 8%;
}

.chart-directory-table th:nth-child(4) {
  width: 15%;
}

.chart-directory-table th:nth-child(7) {
  width: 12%;
}

.chart-directory-title {
  min-width: 0;
}

.chart-directory-jacket-link .jacket-thumb,
.chart-directory-jacket-link .jacket-placeholder {
  width: 46px;
  height: 46px;
}

.chart-directory-song-link {
  display: block;
  min-width: 0;
}

.chart-directory-title strong {
  display: -webkit-box;
  max-width: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  white-space: normal;
}

.chart-directory-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-score-table tbody tr,
.chart-directory-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 66px;
}

.site-navigation-link.is-navigation-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.directory-list {
  display: grid;
}

.directory-user {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr) minmax(92px, auto) minmax(220px, 1.1fr)
    minmax(150px, auto) auto;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.directory-main,
.directory-rating,
.directory-stats,
.directory-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.directory-main strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-main span,
.directory-rating span,
.directory-stats span,
.directory-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.directory-rating strong {
  color: var(--teal);
  font-size: 22px;
  line-height: 1;
}

.directory-user.incomplete-rating-frames .directory-rating strong {
  color: #6d7885;
}

.directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.directory-stats {
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 6px;
}

.compare-panel {
  margin-bottom: 16px;
}

.compare-form {
  align-items: center;
}

.compare-metrics {
  margin-top: 16px;
}

.compare-table {
  min-width: 980px;
}

.compare-table td:nth-child(2),
.compare-table td:nth-child(3),
.compare-table td:nth-child(4) {
  text-align: right;
}

.compare-table th:nth-child(2),
.compare-table th:nth-child(3),
.compare-table th:nth-child(4) {
  text-align: right;
}

.is-positive {
  color: var(--teal);
}

.is-negative {
  color: var(--coral);
}

.status-badge.compare-left {
  background: rgba(77, 99, 217, 0.12);
  color: var(--indigo);
}

.status-badge.compare-right {
  background: rgba(233, 111, 87, 0.14);
  color: var(--coral);
}

.status-badge.compare-tie {
  background: rgba(15, 159, 147, 0.12);
  color: var(--teal);
}

.status-badge.compare-only {
  background: var(--surface-strong);
}

.directory-stats span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-strong);
  white-space: nowrap;
}

.directory-meta {
  justify-items: start;
}

.directory-empty {
  border-top: 1px solid var(--border);
}

.public-error h1 {
  font-size: 24px;
}

@media (max-width: 1240px) {
  .rating-profile-panel:not(.public-hero) {
    grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  }

  .rating-profile-panel:not(.public-hero) .rating-profile-actions {
    grid-column: 1 / -1;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (max-width: 1180px) {
  .target-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .target-frame + .target-frame {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .rating-targets-panel .target-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .rating-targets-panel .target-list > .rating-target-card:nth-child(even) {
    border-left: 0;
  }
}

@media (max-width: 980px) {
  .rating-distribution-chart {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .content-grid,
  .history-grid,
  .metrics-grid,
  .quality-panel,
  .target-columns {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-profile-panel,
  .public-hero {
    grid-template-columns: minmax(260px, 0.9fr) minmax(410px, 1.1fr);
  }

  .rating-profile-actions,
  .public-profile-actions {
    grid-column: 1 / -1;
  }

  .rating-profile-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .public-profile-actions {
    display: grid;
  }

  .rating-distribution-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-distribution-metric:nth-child(odd) {
    border-left: 0;
  }

  .rating-distribution-metric:nth-child(n+3) {
    border-top: 1px solid var(--border);
  }

  .rating-distribution-row {
    grid-template-columns: 92px minmax(80px, 1fr) 86px;
    gap: 8px;
  }

  .target-frame + .target-frame {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .topbar,
  .sync-panel,
  .panel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters,
  .settings-inline-actions,
  .sync-meta,
  .target-summary,
  .topbar-actions {
    width: 100%;
  }

  .target-summary {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .rating-target-toolbar-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .segmented-control {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .target-row {
    grid-template-columns: 40px 40px minmax(0, 1fr);
  }

  .target-row.improvement-row {
    grid-template-columns: 56px 40px minmax(0, 1fr);
  }

  .public-rating-view .target-row.improvement-row {
    grid-template-columns: 56px 40px minmax(0, 1fr);
  }

  .target-contribution-row {
    grid-template-columns: 32px 32px minmax(0, 1fr) 46px;
  }

  .target-contribution-track {
    grid-column: 3 / -1;
  }

  .rating-history-row {
    display: block;
  }

  .rating-history-trigger {
    grid-template-columns: minmax(0, 1fr);
  }

  .rating-history-detail {
    padding: 0 12px 12px;
  }

  .rating-history-change {
    grid-template-columns: minmax(0, 1fr);
  }

  .rating-history-change-title,
  .rating-history-change-values {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .rating-history-row .history-button {
    justify-self: start;
  }

  .rating-history-actions,
  .rating-snapshot-actions {
    justify-content: flex-start;
  }

  .target-score {
    grid-column: 3;
    text-align: left;
  }

  .target-score .status-badges {
    justify-content: flex-start;
  }

  .improvement-slot {
    grid-column: 3;
  }

  .target-actions {
    grid-column: 3;
    justify-content: flex-start;
  }

  .settings-inline-actions {
    justify-content: flex-start;
  }

  .stat-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-heading strong {
    max-width: 100%;
  }

  .stat-actions {
    align-self: stretch;
    justify-content: space-between;
  }

  .rating-entry-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .rating-entry-metrics {
    text-align: left;
  }

  .quality-badges {
    justify-content: flex-start;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(72px, 0.65fr);
  }

  .topbar-actions .primary-button {
    grid-column: 1 / -1;
  }

  .topbar-actions .secondary-button {
    padding-inline: 8px;
  }

  .topbar-actions #copyProbeBookmarkletButton {
    grid-column: 1 / span 2;
  }

  .topbar-actions #logoutButton {
    grid-column: 3;
  }

  .filters {
    flex: 0 1 auto;
  }

  .sync-meta {
    justify-content: flex-start;
  }

  .filters > *,
  .topbar-actions .primary-button {
    flex: 1;
  }

  .public-page {
    padding: 18px;
  }

  .public-link-row,
  .settings-actions,
  .score-history-heading,
  .public-header-actions,
  .public-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-navigation {
    width: 100%;
    justify-content: flex-start;
  }

  .directory-user {
    grid-template-columns: 1fr;
  }

  .directory-stats {
    grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
  }

  .score-history-item {
    grid-template-columns: 1fr;
  }

  .public-link-row .secondary-button {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .public-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .public-header-actions .secondary-button {
    min-width: 0;
    min-height: 36px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .app-site-header {
    padding: 18px 18px 0;
  }

  .workspace {
    padding: 0 18px 18px;
  }

  .site-navigation {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 5px;
    scrollbar-color: #c3ccd6 transparent;
    scrollbar-width: thin;
  }

  .site-navigation::-webkit-scrollbar {
    height: 3px;
  }

  .site-navigation::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c3ccd6;
  }

  .site-navigation-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding-inline: 11px;
    font-size: 13px;
  }

  .rating-profile-panel:not(.public-hero),
  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .rating-profile-identity {
    grid-column: 1 / -1;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .profile-performance {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .profile-metrics {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .profile-metric {
    padding: 5px 8px;
  }

  .profile-metric span {
    font-size: 10px;
    line-height: 1.3;
    white-space: normal;
  }

  .profile-metric strong {
    font-size: 17px;
  }

  .profile-monogram {
    width: 64px;
    height: 64px;
    font-size: 25px;
  }

  .rating-profile-copy h1,
  .rating-profile-copy h2 {
    font-size: 20px;
  }

  .rating-profile-rating {
    min-width: 0;
    text-align: left;
  }

  .rating-profile-rating strong {
    font-size: 32px;
  }

  .rating-profile-actions {
    grid-column: 1 / -1;
    align-items: flex-end;
    flex-direction: row;
    justify-content: flex-end;
  }

  .public-profile-actions {
    grid-column: 1 / -1;
  }

  .metrics-grid {
    gap: 8px;
  }

  .metric {
    padding: 13px;
  }

  .metric span {
    min-height: 30px;
    margin-bottom: 5px;
    font-size: 11px;
  }

  .metric strong {
    font-size: 23px;
  }

  .rating-target-card {
    min-height: 96px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }

  .rating-target-jacket {
    width: 76px;
    height: 76px;
  }

  .rating-target-main {
    grid-template-columns: minmax(108px, 1fr) minmax(92px, auto);
    grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "title values"
      "meta values"
      "constant values";
    gap: 3px 7px;
  }

  .rating-target-title-line {
    gap: 5px;
    padding-top: 0;
  }

  .rating-target-rank {
    font-size: 13px;
  }

  .rating-target-title {
    font-size: 15px;
  }

  .rating-target-chart-meta {
    flex-wrap: wrap;
    gap: 4px;
  }

  .difficulty-label {
    min-height: 20px;
    padding-inline: 5px;
    font-size: 9px;
  }

  .rating-target-chart-type {
    min-height: 20px;
    font-size: 10px;
  }

  .rating-target-constant strong {
    font-size: 18px;
  }

  .dx-chart-corner {
    top: 3px;
    right: 3px;
    width: 20px;
    height: 13px;
  }

  .rating-target-values {
    gap: 1px;
  }

  .rating-target-values strong {
    font-size: 17px;
  }

  .rating-target-values div:last-child strong {
    font-size: 18px;
  }

  .rating-target-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .rating-target-actions .history-button {
    min-height: 22px;
    padding-inline: 6px;
    font-size: 10px;
  }

  .app-view[data-view="scores"] .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-view[data-view="scores"] .filters > * {
    min-width: 0;
    width: 100%;
  }

  #difficultyFilter,
  #queryInput,
  #scoreVersionInput,
  #scoreCategoryInput,
  #exportScoresButton {
    grid-column: 1 / -1;
  }

  .score-table {
    min-width: 0;
  }

  .score-table thead {
    display: none;
  }

  .score-table tbody {
    display: block;
  }

  .score-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
  }

  .score-table td {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
    padding: 9px 0;
    border: 0;
    white-space: normal;
  }

  .score-table td:nth-child(even):not(.score-table-title) {
    padding-left: 12px;
  }

  .score-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
  }

  .score-table .score-table-title,
  .score-table .score-table-actions {
    grid-column: 1 / -1;
  }

  .score-table .score-table-title {
    padding-bottom: 12px;
  }

  .score-table .score-table-title::before {
    content: none;
  }

  .score-table .score-title-cell {
    min-width: 0;
  }

  .score-table .score-title-cell strong,
  .score-table .score-title-meta {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .score-table .score-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* CHUNITHM music detail */
.chuni-music-page {
  display: grid;
  gap: 16px;
}

.chuni-music-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #64748b;
  font-size: 13px;
}

.chuni-music-breadcrumb a {
  color: #087f78;
  font-weight: 800;
  text-decoration: none;
}

.chuni-music-breadcrumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-music-hero {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) minmax(300px, 0.48fr);
  align-items: center;
  gap: 24px;
  padding: 20px;
}

.chuni-music-jacket {
  display: grid;
  width: 188px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d4dde7;
  border-radius: 6px;
  background: #edf2f7;
  color: #94a3b8;
  font-size: 42px;
}

.chuni-music-jacket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.chuni-music-heading {
  min-width: 0;
}

.chuni-music-heading h1 {
  max-width: 22ch;
  margin: 4px 0 6px;
  overflow-wrap: anywhere;
  color: #111c2b;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.chuni-music-heading > p {
  margin: 0;
  color: #53657a;
  font-size: 17px;
  font-weight: 700;
}

.chuni-music-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.chuni-music-tag {
  padding: 4px 8px;
  border: 1px solid #d4dde7;
  border-radius: 4px;
  background: #f8fafc;
  color: #526174;
  font-size: 12px;
  font-weight: 800;
}

.chuni-music-tag.new {
  border-color: #ffc3b4;
  background: #fff0eb;
  color: #c24c35;
}

.chuni-music-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #d9e1e9;
  border-radius: 6px;
  background: #f8fafc;
}

.chuni-music-facts div {
  min-width: 0;
  padding: 14px;
  border-left: 1px solid #d9e1e9;
}

.chuni-music-facts div:first-child {
  border-left: 0;
}

.chuni-music-facts dt {
  color: #718096;
  font-size: 11px;
  font-weight: 800;
}

.chuni-music-facts dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: #172231;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-music-detail-panel,
.chuni-community-panel,
.chuni-rating-band-panel {
  overflow: hidden;
}

.chuni-chart-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #d9e1e9;
  scrollbar-width: thin;
}

.chuni-chart-tab {
  display: flex;
  flex: 1 0 118px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: #f8fafc;
  color: #627187;
  cursor: pointer;
  font: inherit;
}

.chuni-chart-tab span {
  font-size: 12px;
  font-weight: 900;
}

.chuni-chart-tab strong {
  font-size: 19px;
}

.chuni-chart-tab.active {
  border-bottom-color: #0f9d94;
  background: #fff;
  color: #111c2b;
}

.chuni-chart-tab.difficulty-basic.active {
  border-bottom-color: #38aa63;
}

.chuni-chart-tab.difficulty-advanced.active {
  border-bottom-color: #e8b72e;
}

.chuni-chart-tab.difficulty-expert.active {
  border-bottom-color: #e75858;
}

.chuni-chart-tab.difficulty-master.active {
  border-bottom-color: #944ad6;
}

.chuni-chart-tab.difficulty-ultima.active {
  border-bottom-color: #1e293b;
}

.chuni-chart-summary {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 0.7fr 1.7fr;
}

.chuni-chart-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 15px 18px;
  border-left: 1px solid #e1e7ee;
}

.chuni-chart-summary > div:first-child {
  border-left: 0;
}

.chuni-chart-summary span,
.chuni-chart-summary small {
  color: #718096;
  font-size: 11px;
  font-weight: 800;
}

.chuni-chart-summary strong {
  overflow: hidden;
  color: #162232;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-chart-summary .chuni-difficulty {
  justify-self: start;
  font-size: 12px;
}

.chuni-community-toolbar {
  border-bottom: 1px solid #d9e1e9;
}

.chuni-community-toolbar h2,
.chuni-rating-band-panel h2 {
  margin: 3px 0 2px;
}

.chuni-community-toolbar p,
.chuni-rating-band-panel .panel-toolbar p {
  margin: 0;
}

.chuni-privacy-note {
  padding: 5px 8px;
  border-radius: 4px;
  background: #e8f6f4;
  color: #087f78;
  font-size: 12px;
  font-weight: 800;
}

.chuni-community-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e1e7ee;
}

.chuni-community-overview > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 14px 18px;
  border-left: 1px solid #e1e7ee;
}

.chuni-community-overview > div:first-child {
  border-left: 0;
}

.chuni-community-overview span {
  margin-right: auto;
  color: #718096;
  font-size: 11px;
  font-weight: 800;
}

.chuni-community-overview strong {
  color: #172231;
  font-size: 22px;
}

.chuni-community-overview small {
  color: #718096;
  font-size: 11px;
  font-weight: 800;
}

.chuni-rate-section {
  padding: 16px 18px;
  border-bottom: 1px solid #e1e7ee;
}

.chuni-rate-section:last-child {
  border-bottom: 0;
}

.chuni-rate-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.chuni-rate-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.chuni-lamp-rates {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chuni-rate-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe2e9;
  border-top: 4px solid #9aa7b5;
  border-radius: 6px;
  background: #fbfcfd;
}

.chuni-rate-card > span {
  color: #526174;
  font-size: 12px;
  font-weight: 900;
}

.chuni-rate-card strong {
  color: #172231;
  font-size: 24px;
  line-height: 1.15;
}

.chuni-rate-card small {
  color: #718096;
  font-size: 11px;
  font-weight: 700;
}

.chuni-rate-card.rank-max {
  border-top-color: #34d5db;
}

.chuni-rate-card.rank-sss- {
  border-top-color: #68d4e4;
}

.chuni-rate-card.rank-sss {
  border-top-color: #f4cf4c;
}

.chuni-rate-card.rank-ss- {
  border-top-color: #f2a74b;
}

.chuni-rate-card.rank-ss {
  border-top-color: #e97a45;
}

.chuni-rate-card.lamp-all-justice-critical {
  border-top-color: #32c9d2;
}

.chuni-rate-card.lamp-all-justice {
  border-top-color: #ffcf43;
}

.chuni-rate-card.lamp-full-combo {
  border-top-color: #f19b3f;
}

.chuni-band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 18px 0;
}

.chuni-band-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #53657a;
  font-size: 11px;
  font-weight: 800;
}

.chuni-band-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.chuni-band-chart-scroll {
  overflow-x: auto;
  padding: 14px 18px 18px;
  scrollbar-width: thin;
}

.chuni-band-chart {
  display: grid;
  grid-template-columns: repeat(var(--band-count, 1), minmax(58px, 1fr));
  gap: 7px;
  min-width: calc(var(--band-count, 1) * 66px);
  min-height: 278px;
  align-items: end;
  padding: 8px 0 0;
  border-bottom: 1px solid #cfd8e2;
  background-image: linear-gradient(to top, #e9eef3 1px, transparent 1px);
  background-size: 100% 52px;
}

.chuni-band-column {
  display: grid;
  grid-template-rows: 20px 208px 18px 16px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.chuni-band-average {
  overflow: hidden;
  color: #526174;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-band-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 208px;
  border: 1px solid #cfd8e2;
  border-radius: 3px 3px 0 0;
  background: #f3f6f8;
}

.chuni-band-stack > span:not(.chuni-band-suppressed) {
  flex: 0 0 calc(var(--rate) * 1%);
  min-height: 1px;
}

.chuni-band-column > strong {
  padding-top: 4px;
  color: #27364a;
  font-size: 11px;
  white-space: nowrap;
}

.chuni-band-column > small {
  color: #7a889b;
  font-size: 10px;
}

.chuni-band-column.suppressed .chuni-band-stack {
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    #f6f8fa,
    #f6f8fa 7px,
    #e8edf2 7px,
    #e8edf2 14px
  );
}

.chuni-band-suppressed {
  color: #718096;
  font-size: 10px;
  font-weight: 800;
  writing-mode: vertical-rl;
}

.band-max {
  background: #41d3d7;
}

.band-sss- {
  background: #8ddbe5;
}

.band-sss {
  background: #ffe47d;
}

.band-ss- {
  background: #f5b056;
}

.band-ss {
  background: #ea7e4a;
}

.band-other {
  background: #9ba7b5;
}

.chuni-music-empty {
  align-self: center;
  grid-column: 1 / -1;
  margin: auto;
  padding: 28px;
  color: #718096;
  font-weight: 800;
  text-align: center;
}

.chuni-music-source {
  margin: 0 2px 12px;
  color: #718096;
  font-size: 12px;
}

.chuni-music-source a {
  color: #087f78;
  font-weight: 800;
}

@media (max-width: 980px) {
  .chuni-music-hero {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .chuni-music-jacket {
    width: 150px;
  }

  .chuni-music-facts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .chuni-music-page {
    gap: 12px;
  }

  .chuni-music-breadcrumb {
    padding: 0 2px;
  }

  .chuni-music-hero {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .chuni-music-jacket {
    width: 112px;
  }

  .chuni-music-heading h1 {
    margin-top: 2px;
    font-size: 25px;
  }

  .chuni-music-heading > p {
    font-size: 14px;
  }

  .chuni-music-tags {
    gap: 4px;
    margin-top: 9px;
  }

  .chuni-music-tag {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chuni-music-facts div {
    padding: 10px;
  }

  .chuni-music-facts dd {
    font-size: 15px;
  }

  .chuni-chart-tab {
    flex-basis: 94px;
    min-height: 50px;
  }

  .chuni-chart-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chuni-chart-summary > div {
    padding: 11px 12px;
  }

  .chuni-chart-summary > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #e1e7ee;
    border-left: 0;
  }

  .chuni-chart-summary strong {
    font-size: 17px;
  }

  .chuni-community-toolbar {
    align-items: flex-start;
  }

  .chuni-community-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chuni-community-overview > div {
    padding: 11px 12px;
    border-top: 1px solid #e1e7ee;
  }

  .chuni-community-overview > div:nth-child(odd) {
    border-left: 0;
  }

  .chuni-community-overview strong {
    font-size: 19px;
  }

  .chuni-rate-section {
    padding: 14px 12px;
  }

  .chuni-rate-cards {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .chuni-lamp-rates {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
  }

  .chuni-rate-card {
    padding: 9px 10px;
  }

  .chuni-rate-card strong {
    font-size: 20px;
  }

  .chuni-band-legend {
    gap: 7px 12px;
    padding: 10px 12px 0;
  }

  .chuni-band-chart-scroll {
    padding: 10px 12px 14px;
  }

  .chuni-band-chart {
    grid-template-columns: repeat(var(--band-count, 1), 58px);
  }
}

@media (max-width: 420px) {
  .chuni-music-hero {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .chuni-music-jacket {
    width: 92px;
  }

  .chuni-music-heading h1 {
    font-size: 22px;
  }

  .chuni-music-facts {
    grid-template-columns: 0.65fr 0.65fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1100px) {
  .landing-main {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    gap: 36px;
  }

  .preview-metrics div {
    padding-inline: 10px;
  }
}

@media (max-width: 900px) {
  .login-screen {
    background: var(--bg);
  }

  .landing-header {
    width: 100%;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }

  .landing-main {
    display: flex;
    width: min(720px, calc(100% - 40px));
    flex-direction: column;
    gap: 24px;
    padding-top: 36px;
  }

  .landing-intro {
    display: contents;
  }

  .landing-copy {
    order: 1;
  }

  .onboarding-flow {
    width: 100%;
    order: 2;
    margin: 0;
  }

  .auth-panel {
    position: static;
    width: 100%;
    order: 3;
  }

  .landing-preview {
    width: 100%;
    order: 4;
  }

  .landing-footer {
    width: min(720px, calc(100% - 40px));
  }

  .landing-section-inner {
    width: min(720px, calc(100% - 40px));
    padding-block: 54px;
  }

  .landing-feature-layout,
  .landing-data-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .settings-legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-heading {
    padding-block: 26px 20px;
  }

  .legal-heading h1 {
    font-size: 31px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-top: 6px;
  }

  .legal-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-toc strong {
    grid-column: 1 / -1;
  }

  .legal-document section {
    padding-block: 22px;
  }

  .site-legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .empty-score-onboarding {
    margin-top: 18px;
    padding: 24px 18px;
  }

  .empty-score-heading h2 {
    font-size: 21px;
  }

  .tutorial-status {
    padding-left: 0;
  }

  .landing-header {
    min-height: 64px;
  }

  .landing-nav a {
    display: none;
  }

  .landing-nav {
    gap: 0;
  }

  .landing-main {
    width: calc(100% - 28px);
    padding: 28px 0 32px;
  }

  .landing-copy h1 {
    margin-top: 8px;
    line-height: 1.25;
  }

  .landing-product-name {
    font-size: 48px;
  }

  .landing-product-subtitle {
    font-size: 15px;
  }

  .landing-lead {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.75;
  }

  .landing-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .onboarding-title {
    font-size: 13px;
  }

  .onboarding-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 8px;
    border-block: 1px solid var(--border);
  }

  .onboarding-steps li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 2px;
  }

  .onboarding-steps li:not(:last-child)::after {
    display: none;
  }

  .onboarding-steps li + li {
    border-top: 1px solid var(--border);
  }

  .onboarding-steps li span {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .onboarding-steps strong {
    font-size: 13px;
  }

  .auth-form {
    padding: 22px 20px 18px;
  }

  .auth-heading h2 {
    font-size: 22px;
  }

  .login-status {
    margin-inline: 20px;
  }

  .landing-preview-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .preview-player {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding-inline: 16px;
  }

  .preview-player-monogram {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .preview-player-rating strong {
    font-size: 21px;
  }

  .preview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 0;
  }

  .preview-metrics div:nth-child(2) {
    border-right: 0;
  }

  .preview-metrics div:nth-child(3) {
    padding-left: 0;
  }

  .preview-frames {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .preview-frame {
    padding: 0;
  }

  .preview-frame + .preview-frame {
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .preview-score-list {
    padding-inline: 16px;
  }

  .preview-score-head,
  .preview-score-row {
    grid-template-columns: minmax(0, 1fr) 86px 42px;
    gap: 8px;
  }

  .landing-footer {
    width: calc(100% - 28px);
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-footer div {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .landing-section-inner {
    width: calc(100% - 28px);
    padding-block: 42px;
  }

  .landing-section-heading h2,
  .landing-data-layout h2 {
    font-size: 28px;
  }

  .landing-guide-steps {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 28px;
  }

  .landing-guide-steps li,
  .landing-guide-steps li + li {
    padding: 20px 0;
    border-left: 0;
  }

  .landing-guide-steps li + li {
    border-top: 1px solid var(--border);
  }

  .landing-requirement {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .landing-feature-list article {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }

  .registration-complete-content {
    gap: 16px;
    padding: 22px 18px;
  }

  .registration-credentials div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
}

@media (max-width: 380px) {
  .landing-header {
    padding-inline: 14px;
  }

  .login-brand {
    gap: 8px;
    font-size: 18px;
  }

  .landing-login-button {
    padding-inline: 12px;
  }

  .landing-copy h1 {
    line-height: 1.2;
  }

  .landing-product-name {
    font-size: 42px;
  }
}

@media (max-width: 900px) {
  .public-score-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-score-filters > *,
  .public-score-filters select,
  .public-score-filters input {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .public-score-filters .record-option input {
    width: 16px;
  }

  .public-score-filters #publicQueryInput,
  .public-score-filters .dx-score-mode {
    grid-column: 1 / -1;
  }

  .public-score-filters .dx-score-mode {
    justify-content: space-between;
  }
}

.mobile-score-sort {
  display: none;
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .public-page {
    padding: 14px max(14px, env(safe-area-inset-right))
      max(22px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .app-site-header {
    padding: 14px 14px 0;
  }

  .workspace {
    padding: 0 14px max(20px, env(safe-area-inset-bottom));
  }

  .public-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .public-header .brand {
    min-width: 0;
  }

  .site-navigation-link {
    width: 100%;
    min-height: 42px;
    padding-inline: 8px;
    font-size: 13px;
    white-space: normal;
  }

  .public-profile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 12px;
  }

  .public-profile-tabs a {
    min-width: 0;
    justify-content: center;
    padding-inline: 4px;
    font-size: 13px;
    text-align: center;
  }

  .constant-table-toolbar,
  .constant-table-guide {
    display: grid;
    align-items: stretch;
  }

  .constant-table-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .constant-table-controls .record-option,
  .constant-table-select-control {
    min-width: 0;
    justify-content: center;
  }

  .constant-table-select-control {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .constant-table-select-control select {
    width: 100%;
    min-width: 0;
  }

  .constant-table-guide {
    padding: 10px 12px;
  }

  .constant-table-legend {
    gap: 5px;
  }

  .constant-table-board {
    --constant-tile-size: 104px;
    --constant-tile-gap: 2px;
    padding: 4px;
  }

  .constant-level-label {
    font-size: 36px;
  }

  .public-hero.is-empty-profile {
    display: none;
  }

  .public-hero .profile-performance {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
  }

  .public-hero .rating-profile-rating {
    align-self: stretch;
    align-content: center;
    border-right: 1px solid var(--border);
  }

  .public-hero .rating-profile-rating strong {
    font-size: 27px;
  }

  .public-hero .profile-metrics {
    border-top: 0;
    border-left: 0;
  }

  .public-hero .profile-metric {
    padding: 5px 7px;
  }

  .public-hero .profile-metric span {
    font-size: 9px;
  }

  .public-hero .profile-metric strong {
    font-size: 15px;
  }

  .public-profile-actions {
    min-width: 0;
  }

  .public-profile-actions #publicShareImageButton {
    grid-column: 1 / -1;
  }

  .public-onboarding {
    overflow: hidden;
  }

  .public-onboarding .panel-toolbar {
    display: grid;
    gap: 16px;
    padding: 18px 16px 14px;
  }

  .public-onboarding .panel-toolbar h2 {
    font-size: 20px;
    text-wrap: balance;
  }

  .public-onboarding-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .public-onboarding-actions .primary-button,
  .public-onboarding-actions .secondary-button {
    width: 100%;
    min-height: 46px;
  }

  .public-onboarding-steps {
    gap: 10px;
    padding: 14px 22px 18px 42px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.5;
  }

  .public-onboarding-hint {
    margin: 0 16px 18px;
    font-size: 11px;
  }

  .update-page-shell,
  .update-page {
    gap: 12px;
  }

  .update-heading {
    gap: 12px;
    margin: 14px 2px 2px;
  }

  .update-heading h1 {
    font-size: 32px;
  }

  .update-heading p {
    margin-top: 6px;
    font-size: 12px;
  }

  .update-heading .secondary-button {
    width: 100%;
  }

  .update-summary-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px;
  }

  .update-player-copy h2 {
    font-size: 24px;
  }

  .update-rating-flow {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .update-rating-flow strong {
    font-size: 30px;
  }

  .update-rating-flow em {
    grid-column: auto;
    align-self: end;
    padding-bottom: 1px;
    font-size: 19px;
  }

  .update-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .update-summary-metrics span {
    padding: 9px 10px;
    border-radius: 6px;
    background: var(--surface-strong);
    line-height: 1.35;
  }

  .update-records-panel .panel-toolbar {
    gap: 14px;
    padding: 16px;
  }

  .update-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .update-actions .secondary-button,
  .update-actions .primary-button {
    min-height: 44px;
  }

  .update-actions #updateRestoreButton:not(.is-hidden) {
    grid-column: 1 / -1;
  }

  .update-record {
    grid-template-columns: 94px minmax(0, 1fr) 36px;
    grid-template-rows: minmax(88px, auto) 38px;
    min-height: 126px;
  }

  .update-record-jacket {
    width: 94px;
    min-height: 126px;
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .update-record-main {
    grid-column: 2;
    grid-row: 1;
    align-content: start;
    gap: 5px;
    padding: 10px 8px 7px;
  }

  .update-record-title-row > a {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: initial;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .update-record-chart {
    gap: 2px 6px;
    font-size: 10px;
  }

  .update-record-values {
    gap: 2px 5px;
    font-size: 12px;
  }

  .update-record-rating {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    align-self: stretch;
    justify-content: flex-start;
    gap: 7px;
    padding: 6px 8px;
    border-top: 1px solid var(--border);
    text-align: left;
  }

  .update-record-rating > span,
  .update-record-rating em {
    display: block;
  }

  .update-record-rating > div {
    margin-left: auto;
  }

  .update-record-rating small {
    display: none;
  }

  .update-record-rating strong {
    font-size: 21px;
  }

  .update-record-rating em {
    font-size: 10px;
  }

  .update-remove-button {
    grid-column: 3;
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
  }

  .public-view[data-public-view="records"] > .panel-toolbar {
    gap: 16px;
    padding: 16px 14px;
  }

  .public-score-filters {
    gap: 8px;
  }

  .public-score-filters .dual-range-filter,
  .public-score-filters .mobile-score-sort {
    grid-column: 1 / -1;
  }

  .mobile-score-sort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 7px;
  }

  .mobile-score-sort label {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-score-sort select,
  .mobile-score-sort button {
    width: 100%;
    min-height: 42px;
  }

  .public-score-table,
  .chart-directory-table,
  .compare-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .public-score-table thead,
  .compare-table thead {
    display: none;
  }

  .public-score-table tbody,
  .chart-directory-table tbody,
  .compare-table tbody {
    display: grid;
    gap: 9px;
    padding: 10px;
  }

  .public-score-table tr,
  .chart-directory-table tbody tr,
  .compare-table tbody tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(23, 32, 42, 0.045);
  }

  .public-score-table tr {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 10px 9px;
  }

  .public-score-table tr.score-target-row.best {
    border-left: 3px solid #6675dc;
    background: #f3f5ff;
  }

  .public-score-table tr.score-target-row.new {
    border-left: 3px solid #e96f57;
    background: #fff3ef;
  }

  .public-score-table tr.score-unplayed-row {
    background: #f7f9fb;
  }

  .public-score-table tr.score-target-row.best td,
  .public-score-table tr.score-target-row.new td,
  .public-score-table tr.score-unplayed-row td {
    background: transparent;
  }

  .public-score-table th,
  .public-score-table td {
    position: static;
    display: grid;
    width: auto;
    height: auto;
    min-width: 0;
    align-content: center;
    gap: 3px;
    padding: 8px 5px;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    white-space: normal;
  }

  .public-score-table td::before,
  .chart-directory-table td::before,
  .compare-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
  }

  .public-score-table .score-table-title {
    grid-column: 1 / -1;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(122, 139, 157, 0.22);
  }

  .public-score-table .score-table-title::before {
    content: none;
  }

  .score-record-heading {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }

  .score-record-jacket .jacket-thumb {
    width: 56px;
    height: 56px;
  }

  .score-record-title strong,
  .score-record-title .score-title-meta {
    max-width: none;
  }

  .score-record-title strong {
    font-size: 15px;
  }

  .public-score-table td:nth-child(4) {
    grid-column: span 2;
  }

  .public-score-table td:nth-child(12) {
    font-size: 12px;
  }

  .public-score-table tr > td:only-child {
    grid-column: 1 / -1;
  }

  .public-score-table .score-achievement,
  .public-score-table .score-rating {
    font-size: 15px;
  }

  .chart-directory-table thead {
    display: block;
    overflow: visible;
    padding: 8px 10px 0;
    scrollbar-width: none;
  }

  .chart-directory-table thead::-webkit-scrollbar {
    display: none;
  }

  .chart-directory-table thead tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .chart-directory-table thead th {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    border: 0;
    padding: 0;
  }

  .chart-directory-table thead button {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 6px;
    background: var(--surface);
    font-size: 10px;
  }

  .chart-directory-table thead th:last-child {
    display: grid;
    min-height: 34px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .chart-directory-table tbody tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 10px 8px;
  }

  .chart-directory-table td {
    display: grid;
    width: auto;
    min-width: 0;
    align-content: center;
    gap: 4px;
    padding: 8px 5px;
    border: 0;
    white-space: normal;
  }

  .chart-directory-table td:first-child {
    grid-column: 1 / -1;
    padding-block: 10px;
    border-bottom: 1px solid var(--border);
  }

  .chart-directory-table td:first-child::before {
    content: none;
  }

  .chart-directory-table td:nth-child(4),
  .chart-directory-table td:nth-child(7) {
    grid-column: span 2;
  }

  .chart-directory-jacket-link .jacket-thumb,
  .chart-directory-jacket-link .jacket-placeholder {
    width: 56px;
    height: 56px;
  }

  .compare-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 10px 9px;
  }

  .compare-table td {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 8px 5px;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .compare-table td:first-child {
    grid-column: 1 / -1;
    padding-block: 10px;
    border-bottom: 1px solid var(--border);
  }

  .compare-table td:first-child::before {
    content: none;
  }

  .compare-table td:last-child {
    align-content: end;
    justify-items: end;
  }

  .public-record-summary-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .public-record-summary-table thead {
    display: none;
  }

  .public-record-summary-table tbody {
    display: grid;
    gap: 9px;
    padding: 10px;
  }

  .public-record-summary-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
  }

  .public-record-summary-table th,
  .public-record-summary-table td,
  .public-record-summary-table th:first-child,
  .public-record-summary-table td:first-child {
    position: static;
    display: grid;
    min-width: 0;
    align-content: center;
    gap: 3px;
    padding: 8px 9px;
    border: 0;
    background: transparent;
    text-align: left;
  }

  .public-record-summary-table th::before,
  .public-record-summary-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 800;
  }

  .public-record-summary-table th:first-child {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }

  .public-record-summary-table th:first-child::before {
    content: none;
  }

  .rating-distribution-chart,
  .music-chart-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .rating-distribution-chart {
    display: block;
    padding: 14px;
  }

  .rating-distribution-histogram {
    min-width: 720px;
    height: 220px;
  }

  .music-chart-scroll {
    padding-inline: 14px;
  }

  .music-band-chart {
    min-width: 760px;
    height: 300px;
  }

  .rating-share-dialog,
  .registration-complete-dialog,
  .confirmation-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
    overscroll-behavior: contain;
  }

  .rating-share-dialog-heading,
  .rating-share-dialog-actions {
    padding-inline: 14px;
  }

  .rating-share-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-share-dialog-actions .share-image-status {
    grid-column: 1 / -1;
    margin: 0;
  }

  .registration-complete-content {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }

  .site-legal-footer {
    gap: 12px;
    margin-top: 28px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .site-legal-footer nav {
    gap: 10px 16px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .topbar-actions .primary-button,
  .topbar-actions #logoutButton {
    grid-column: auto;
  }

  .topbar-actions .primary-button,
  .topbar-actions .secondary-button {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .chart-directory-table thead,
  .chart-directory-table thead tr {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .directory-panel .mobile-score-sort {
    width: 100%;
    flex: 1 0 100% !important;
    grid-column: 1 / -1;
  }

  .chart-directory-table thead {
    display: none;
  }
}

.chuni-update-record .update-record-title-row > strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-update-record.difficulty-ultima .update-record-jacket {
  border-left-color: #252831;
}

.chuni-update-record.difficulty-world-s-end .update-record-jacket {
  border-left-color: #73808d;
}

@media (max-width: 700px) {
  .chuni-update-summary {
    grid-template-columns: 1fr;
  }

  .chuni-update-record .update-record-title-row > strong {
    font-size: 16px;
  }
}

/* CHUNITHM public directory and insights */
.chuni-directory-page,
.chuni-stats-page {
  --chuni-accent: #009d91;
  --chuni-ink: #17202a;
  --chuni-muted: #667487;
  --chuni-line: #d5dee8;
}

#appShell .topbar-actions {
  display: flex;
  justify-content: flex-end;
}

#appShell .topbar-actions #logoutButton {
  min-width: 108px;
}

.chuni-directory-hero,
.chuni-stats-hero {
  align-items: center;
}

.chuni-directory-metrics {
  display: grid;
  min-width: 300px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  margin: 0;
  border-left: 1px solid var(--chuni-line);
}

.chuni-directory-metrics div {
  display: grid;
  gap: 5px;
  padding: 8px 22px;
}

.chuni-directory-metrics div + div {
  border-left: 1px solid var(--chuni-line);
}

.chuni-directory-metrics dt {
  color: var(--chuni-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chuni-directory-metrics dd {
  margin: 0;
  color: var(--chuni-ink);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.chuni-directory-filters,
.chuni-entry-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 0.5fr));
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--chuni-line);
  background: #f8fafc;
}

.chuni-directory-filters label,
.chuni-entry-filters label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.chuni-directory-filters label > span,
.chuni-entry-filters label > span {
  color: var(--chuni-muted);
  font-size: 11px;
  font-weight: 800;
}

.chuni-directory-filters input,
.chuni-directory-filters select,
.chuni-entry-filters input,
.chuni-entry-filters select {
  width: 100%;
  min-width: 0;
}

.chuni-user-list {
  display: grid;
  border-top: 1px solid var(--chuni-line);
}

.chuni-user-entry {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) 110px 200px 150px 24px;
  gap: 18px;
  align-items: center;
  min-height: 88px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--chuni-line);
  color: var(--chuni-ink);
  text-decoration: none;
  transition: background-color 120ms ease;
}

.chuni-user-entry:hover {
  background: #f5faf9;
}

.chuni-user-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.chuni-directory-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 2px solid #e6b638;
  border-radius: 6px;
  background: var(--chuni-ink);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.chuni-directory-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chuni-user-name {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chuni-user-name strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-user-name small,
.chuni-user-rating > span,
.chuni-user-activity span {
  overflow: hidden;
  color: var(--chuni-muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-user-rating,
.chuni-user-activity {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.chuni-user-rating strong {
  color: var(--chuni-accent);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.chuni-user-entry.is-incomplete .chuni-user-rating strong {
  color: #6d7885;
}

.chuni-user-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--chuni-line);
  border-radius: 6px;
}

.chuni-user-targets > span {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
}

.chuni-user-targets > span + span {
  border-left: 1px solid var(--chuni-line);
}

.chuni-user-targets small {
  color: var(--chuni-muted);
  font-size: 10px;
  font-weight: 800;
}

.chuni-user-targets strong,
.chuni-user-activity strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.chuni-user-arrow {
  color: #9aa7b4;
  font-size: 30px;
  line-height: 1;
}

.chuni-directory-empty,
.chuni-stats-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 44px 18px;
  text-align: center;
}

.chuni-stats-panel {
  margin-top: 16px;
}

.chuni-distribution-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--chuni-line);
  padding: 18px;
}

.chuni-distribution-chart {
  display: grid;
  grid-auto-columns: minmax(42px, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  min-width: max(760px, 100%);
  height: 240px;
}

.chuni-distribution-bar {
  display: grid;
  min-width: 0;
  grid-template-rows: 24px minmax(0, 1fr) 24px;
  gap: 5px;
  text-align: center;
}

.chuni-distribution-bar strong,
.chuni-distribution-bar small {
  overflow: hidden;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-distribution-bar strong {
  align-self: end;
}

.chuni-distribution-bar small {
  color: var(--chuni-muted);
  font-weight: 800;
}

.chuni-distribution-column {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #9cabb8;
  background: linear-gradient(to top, #eef3f6, transparent 72%);
}

.chuni-distribution-column i {
  position: absolute;
  right: 3px;
  bottom: 0;
  left: 3px;
  height: var(--distribution-height);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #20b9a9, #008b82);
}

.chuni-distribution-bar.is-suppressed {
  opacity: 0.5;
}

.chuni-entry-toolbar .segmented-control {
  flex: 0 0 auto;
}

.chuni-entry-filters {
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(130px, 0.5fr));
}

.chuni-entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--chuni-line);
}

.chuni-entry-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 84px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--chuni-line);
  border-left: 3px solid #8b63d2;
  color: var(--chuni-ink);
  text-decoration: none;
}

.chuni-entry-card:nth-child(odd) {
  border-right: 1px solid var(--chuni-line);
}

.chuni-entry-card:hover {
  background: #f5faf9;
}

.chuni-entry-card.difficulty-basic {
  border-left-color: #34a45e;
}

.chuni-entry-card.difficulty-advanced {
  border-left-color: #e2ab2e;
}

.chuni-entry-card.difficulty-expert {
  border-left-color: #e3535f;
}

.chuni-entry-card.difficulty-master {
  border-left-color: #8b63d2;
}

.chuni-entry-card.difficulty-ultima {
  border-left-color: #252831;
}

.chuni-entry-card.difficulty-world-s-end {
  border-left-color: #73808d;
}

.chuni-entry-jacket {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #e9eef3;
  color: #8794a2;
  font-size: 20px;
}

.chuni-entry-jacket img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.chuni-entry-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chuni-entry-identity > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chuni-entry-identity > small {
  overflow: hidden;
  color: var(--chuni-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chuni-entry-tags {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chuni-entry-tags b:last-child {
  color: var(--chuni-ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chuni-entry-rate {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: right;
}

.chuni-entry-rate strong {
  color: var(--chuni-accent);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.chuni-entry-rate small {
  color: var(--chuni-muted);
  font-size: 10px;
  font-weight: 800;
}

.chuni-entry-rate i {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--chuni-accent) var(--entry-rate),
    #e3e9ee var(--entry-rate)
  );
}

@media (max-width: 900px) {
  .chuni-directory-filters,
  .chuni-entry-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chuni-user-query,
  .chuni-entry-query {
    grid-column: 1 / -1;
  }

  .chuni-user-entry {
    grid-template-columns: minmax(210px, 1fr) 94px 170px 24px;
  }

  .chuni-user-activity {
    display: none;
  }

  .chuni-entry-list {
    grid-template-columns: 1fr;
  }

  .chuni-entry-card:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 620px) {
  .chuni-directory-hero,
  .chuni-stats-hero {
    display: grid;
    gap: 18px;
  }

  .chuni-directory-metrics {
    width: 100%;
    min-width: 0;
    border-top: 1px solid var(--chuni-line);
    border-left: 0;
  }

  .chuni-directory-metrics div {
    padding: 12px 4px 0;
  }

  .chuni-directory-toolbar,
  .chuni-entry-toolbar {
    align-items: flex-start;
  }

  .chuni-directory-toolbar .secondary-button {
    min-height: 40px;
    padding-inline: 12px;
  }

  .chuni-directory-filters,
  .chuni-entry-filters {
    gap: 10px;
    padding: 14px;
  }

  .chuni-user-entry {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    gap: 10px;
    min-height: 84px;
    padding: 12px 14px;
  }

  .chuni-user-targets {
    display: none;
  }

  .chuni-user-identity {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .chuni-directory-avatar {
    width: 52px;
    height: 52px;
  }

  .chuni-user-name strong {
    font-size: 15px;
  }

  .chuni-user-rating strong {
    font-size: 21px;
  }

  .chuni-user-arrow {
    font-size: 24px;
  }

  .chuni-distribution-scroll {
    margin-inline: 0;
    padding: 14px;
  }

  .chuni-distribution-chart {
    height: 210px;
  }

  .chuni-entry-toolbar .segmented-control {
    width: 100%;
  }

  .chuni-entry-card {
    grid-template-columns: 58px minmax(0, 1fr) 76px;
    gap: 9px;
    min-height: 78px;
    padding: 9px 10px;
  }

  .chuni-entry-jacket {
    width: 58px;
  }

  .chuni-entry-identity > strong {
    font-size: 13px;
  }

  .chuni-entry-rate strong {
    font-size: 17px;
  }
}

/* Stable five-category navigation shared with MaiRec. */
.public-header {
  min-height: 42px;
}

.site-navigation {
  display: grid;
  width: min(560px, 100%);
  max-width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  overflow: visible;
  padding: 0;
}

.site-navigation-toggle {
  display: none !important;
}

.site-navigation-link {
  width: 100%;
  min-height: 40px;
}

.site-navigation-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.site-navigation-label-mobile {
  display: none;
}

@media (min-width: 721px) and (max-width: 980px) {
  .public-header,
  .landing-header {
    align-items: center;
    flex-direction: row;
  }

  .public-header .brand {
    flex: 0 0 auto;
  }

  .site-navigation {
    width: min(560px, calc(100% - 118px));
  }
}

@media (max-width: 720px) {
  :root {
    --mobile-site-navigation-height: 52px;
  }

  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .public-header,
  .public-header.app-site-header,
  .landing-header {
    position: sticky;
    z-index: 60;
    top: 0;
    display: grid;
    width: calc(100% + 28px);
    height: var(--mobile-site-navigation-height);
    min-height: var(--mobile-site-navigation-height);
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin: 0 -14px 12px;
    padding: 0 max(4px, env(safe-area-inset-right)) 0
      max(4px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 14px rgba(28, 39, 51, 0.06);
    backdrop-filter: blur(12px);
  }

  .login-screen .landing-header {
    width: 100%;
    margin-inline: 0;
  }

  .public-header .brand,
  .landing-header .brand {
    width: 44px;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    gap: 0;
  }

  .public-header .brand > span:last-child,
  .landing-header .brand > span:last-child {
    display: none;
  }

  .public-header .brand-mark,
  .landing-header .brand-mark {
    width: 34px;
    height: 34px;
  }

  .site-navigation {
    display: grid;
    width: 100%;
    height: 100%;
    max-width: none;
    grid-column: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    padding: 4px 0;
  }

  .site-navigation-link {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-radius: 6px;
    padding-inline: 1px;
    font-size: 10.5px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .site-navigation-label-full {
    display: none;
  }

  .site-navigation-label-mobile {
    display: inline;
  }

  [id] {
    scroll-margin-top: calc(var(--mobile-site-navigation-height) + 56px);
  }
}
