:root {
  --night: #080713;
  --violet: #5d34d0;
  --blue: #3b82f6;
  --magenta: #ff006e;
  --pink: #ec4899;
  --cyan: #00f0ff;
  --white: #ffffff;
  --text: rgba(255, 255, 255, 0.96);
  --muted: rgba(255, 255, 255, 0.62);
  --glass: rgba(20, 17, 48, 0.58);
  --glass-strong: rgba(13, 11, 30, 0.78);
  --stroke: rgba(255, 255, 255, 0.16);
  --font: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  --spring: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  min-width: 320px;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(93, 52, 208, 0.72), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(255, 0, 110, 0.42), transparent 30%),
    radial-gradient(circle at 62% 88%, rgba(0, 240, 255, 0.25), transparent 34%),
    linear-gradient(145deg, #080713 0%, #17103c 42%, #0d193d 100%);
  background-attachment: scroll;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.login-language-picker {
  position: fixed;
  z-index: 20;
  top: 20px;
  right: 24px;
}

.topbar-language-picker {
  margin-right: 4px;
}

.language-picker select {
  min-height: 34px;
  padding: 5px 28px 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--night);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

@media (max-width: 640px) {
  .login-language-picker {
    top: 10px;
    right: 12px;
  }

  .login-language-picker > span {
    display: none;
  }
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: conic-gradient(from 160deg at 50% 50%, #3b82f6, #a855f7, #ec4899, #00f0ff, #3b82f6);
  content: "";
  display: none;
  transform: scale(1.2);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.46;
}

[hidden] {
  display: none !important;
}

.aurora {
  position: fixed;
  z-index: -1;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.18;
  pointer-events: none;
}

.aurora-one {
  top: -18vw;
  left: -10vw;
  background: var(--violet);
}

.aurora-two {
  top: 12vh;
  right: -18vw;
  background: var(--magenta);
}

.aurora-three {
  right: 24vw;
  bottom: -30vw;
  background: var(--cyan);
}

.glass-panel {
  border: 1px solid var(--stroke);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(10, 132, 255, 0.16), transparent 31%),
    radial-gradient(circle at 86% 82%, rgba(94, 92, 230, 0.14), transparent 30%),
    #f5f5f7;
  color: #1d1d1f;
}

.login-view::before {
  position: absolute;
  top: -34vw;
  right: -22vw;
  width: min(820px, 66vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(10, 132, 255, 0.08));
  box-shadow: 0 60px 160px rgba(10, 132, 255, 0.12);
  content: "";
}

.login-content {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.65fr);
  align-items: center;
  gap: clamp(56px, 9vw, 132px);
}

.login-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #6e6e73;
  font-size: 14px;
}

.login-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
  box-shadow: 0 5px 14px rgba(10, 132, 255, 0.28);
}

.login-heading h1 {
  margin: 25px 0 22px;
  font-size: clamp(68px, 8vw, 118px);
  font-weight: 720;
  letter-spacing: -0.07em;
  line-height: 0.92;
  white-space: nowrap;
  background: linear-gradient(110deg, #1d1d1f 8%, #34343a 54%, #62626a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-heading > p:last-child {
  margin: 0;
  color: #6e6e73;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.login-form {
  padding: 36px;
  border-color: rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.login-form-heading h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-form-heading p {
  margin: 10px 0 0;
  color: #6e6e73;
  font-size: 14px;
  line-height: 1.5;
}

.field-group {
  margin-top: 30px;
}

.field-group label {
  display: block;
  margin: 0 0 9px 4px;
  color: #424245;
  font-size: 13px;
  font-weight: 600;
}

.field-group input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 17px;
  outline: none;
  background: rgba(255, 255, 255, 0.82);
  color: #1d1d1f;
  padding: 0 17px;
  transition: border-color var(--spring), box-shadow var(--spring), background var(--spring);
}

.field-group input:focus {
  border-color: #0071e3;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

.primary-button,
.action-button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-weight: 680;
  background: linear-gradient(110deg, var(--blue), var(--violet) 48%, var(--pink));
  box-shadow: 0 14px 36px rgba(59, 130, 246, 0.26), 0 0 28px rgba(236, 72, 153, 0.13);
  transition: transform var(--spring), box-shadow var(--spring), filter var(--spring);
}

.primary-button:hover:not(:disabled),
.action-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.12);
  box-shadow: 0 20px 48px rgba(93, 52, 208, 0.38), 0 0 36px rgba(0, 240, 255, 0.15);
}

.primary-button:active:not(:disabled),
.action-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
}

.login-form .primary-button {
  background: #0071e3;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.24);
}

.login-form .primary-button:hover:not(:disabled) {
  background: #0077ed;
  box-shadow: 0 16px 34px rgba(0, 113, 227, 0.3);
  filter: none;
}

.form-error {
  min-height: 20px;
  margin: 13px 4px 0;
  color: #d70015;
  font-size: 13px;
}

.dashboard {
  width: min(1440px, calc(100% - 24px));
  min-height: 0;
  margin: 0 auto;
  padding: 10px 0 22px;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(10, 8, 26, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 160deg, var(--cyan), var(--blue), var(--violet), var(--magenta), var(--cyan));
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35), inset 0 0 12px rgba(255, 255, 255, 0.44);
}

.brand-lockup p,
.brand-lockup h1 {
  margin: 0;
}

.brand-lockup p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.brand-lockup h1 {
  margin-top: 1px;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  gap: 4px;
}

.text-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  padding: 0 13px;
  font-size: 13px;
  transition: background var(--spring), color var(--spring);
}

.text-button:hover,
.text-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.text-button.has-activity {
  background: rgba(0, 240, 255, 0.12);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.22), 0 0 22px rgba(0, 240, 255, 0.12);
}

.log-dialog {
  width: min(1040px, calc(100% - 40px));
  height: min(780px, calc(100% - 40px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  outline: none;
  background: #f7f7f8;
  color: #17171a;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.log-dialog::backdrop {
  background: rgba(3, 2, 10, 0.76);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.upload-dialog {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  outline: none;
  background: rgba(8, 7, 19, 0.94);
  color: var(--text);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.upload-dialog::backdrop {
  background: rgba(3, 2, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.upload-shell {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.upload-header h2 {
  margin: 5px 0 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.upload-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-list {
  max-height: min(360px, 50vh);
  display: grid;
  gap: 8px;
  overflow: auto;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.upload-row.is-active {
  border-color: rgba(0, 240, 255, 0.42);
}

.upload-row.is-done {
  border-color: rgba(80, 220, 160, 0.35);
}

.upload-row.is-error {
  border-color: rgba(255, 92, 128, 0.45);
}

.upload-row-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.upload-row-identity strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-row-detail,
.upload-row-status {
  color: var(--muted);
  font-size: 11px;
}

.upload-row-meta {
  align-self: start;
  padding-top: 2px;
}

.upload-row-bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.upload-row-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #7dffce);
  transition: width 120ms linear;
}

.upload-row.is-error .upload-row-bar span {
  background: #ff6b8a;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
}

.upload-actions .primary-button:disabled {
  opacity: 0.45;
}

.log-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #d8d8dc;
  background: #ffffff;
}

.log-header .eyebrow {
  color: #e4002b;
}

.log-header h2 {
  margin: 4px 0 0;
  color: #17171a;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.log-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 5px;
  color: #6d6d74;
  font-size: 11px;
}

.log-filter select {
  min-width: 132px;
  height: 36px;
  border: 1px solid #c8c8cd;
  border-radius: 3px;
  outline: none;
  background: #ffffff;
  color: #17171a;
  padding: 0 30px 0 12px;
  font: inherit;
  font-size: 12px;
}

.log-filter select:focus {
  border-color: #e4002b;
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.1);
}

.log-dialog .text-button {
  border-radius: 3px;
  color: #4a4a50;
}

.log-dialog .text-button:hover,
.log-dialog .text-button:focus-visible {
  background: #ededf0;
  color: #17171a;
}

.log-operation {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid #d8d8dc;
  background: #f0f0f2;
  color: #44444a;
  font-size: 13px;
}

.log-operation.is-error {
  border-color: #e6a8b3;
  background: #fff0f3;
  color: #a3001f;
}

.log-output {
  min-height: 0;
  margin: 0;
  padding: 20px 24px 28px;
  overflow: auto;
  outline: none;
  background: #f7f7f8;
  color: #252529;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.5;
}

.log-output:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(228, 0, 43, 0.16);
}

.log-section {
  border: 1px solid #d8d8dc;
  background: #ffffff;
}

.log-section + .log-section {
  margin-top: 16px;
}

.log-section-header {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #d8d8dc;
  background: #f0f0f2;
}

.log-section-header h3 {
  min-width: 0;
  margin: 0;
  color: #17171a;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.log-section-kind,
.log-state {
  flex: none;
  color: #6d6d74;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.log-rows,
.log-stream {
  display: grid;
}

.log-row {
  display: grid;
  grid-template-columns: 68px 48px minmax(78px, 0.25fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #ededf0;
  align-items: baseline;
}

.log-row:last-child,
.log-line:last-child {
  border-bottom: 0;
}

.log-row.is-error {
  background: #fff4f6;
}

.log-time,
.log-level,
.log-source {
  color: #77777e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.log-level {
  color: #00644b;
  font-weight: 750;
}

.log-row.is-error .log-level {
  color: #c00024;
}

.log-source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-message,
.log-line {
  min-width: 0;
  overflow-wrap: anywhere;
}

.log-line {
  padding: 7px 12px;
  border-bottom: 1px solid #ededf0;
  color: #343439;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.log-empty {
  margin: 0;
  padding: 18px 14px;
  color: #77777e;
}

.log-note {
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid #d8d8dc;
  background: #ffffff;
  color: #77777e;
  font-size: 11px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 4px 16px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 3.5vw, 44px);
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compact-button {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 18px;
  font-size: 13px;
}

.section-description {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.controller-state,
.visual-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 620;
}

.status-mark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.status-mark.is-running {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.12), 0 0 20px rgba(0, 240, 255, 0.8);
}

.global-message {
  min-height: 0;
  margin: 0;
  padding: 0;
  border-color: transparent;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 14px;
  transition: padding var(--spring), min-height var(--spring), background var(--spring);
}

.global-message:not(:empty) {
  margin: 10px 0;
  min-height: 50px;
  padding: 15px 18px;
  border-color: var(--stroke);
  background: var(--glass);
}

.global-message.is-error {
  color: #ffd0e3;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  perspective: 1400px;
}

.library-empty {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px 24px;
  text-align: center;
}

.empty-orb {
  width: 82px;
  height: 82px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: conic-gradient(from 150deg, var(--cyan), var(--blue), var(--violet), var(--magenta), var(--cyan));
  box-shadow: 0 0 60px rgba(93, 52, 208, 0.36), inset 0 0 22px rgba(255, 255, 255, 0.42);
  animation: empty-orb-breathe 4s ease-in-out infinite;
}

.library-empty h3 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.055em;
}

.library-empty > p:not(.eyebrow) {
  max-width: 500px;
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@keyframes empty-orb-breathe {
  0%, 100% { transform: scale(0.96); filter: hue-rotate(0deg); }
  50% { transform: scale(1.05); filter: hue-rotate(18deg); }
}

.add-game-heading {
  padding-top: 18px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.catalog-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(10, 8, 28, 0.7));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  transition: transform var(--spring), border-color var(--spring), box-shadow var(--spring);
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 255, 0.34);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32), 0 0 34px rgba(0, 240, 255, 0.08);
}

.catalog-card.is-added {
  border-color: rgba(0, 240, 255, 0.3);
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.11), rgba(10, 8, 28, 0.74) 62%);
}

.catalog-visual {
  width: 136px;
  height: 136px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(130deg, var(--violet), var(--magenta), var(--cyan));
}

.catalog-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.catalog-content h3 {
  margin: 3px 0 0;
  font-size: 24px;
  letter-spacing: -0.045em;
}

.catalog-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-facts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.catalog-facts div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.065);
}

.catalog-facts dt {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.catalog-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}

.catalog-content .action-button {
  margin-top: auto;
}

.add-game-setup {
  display: grid;
  gap: 14px;
}

.add-game-setup[hidden] {
  display: none;
}

.setup-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
}

.setup-heading h2 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.setup-mods {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.game-card {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --glow-x: 50%;
  --glow-y: 50%;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(10, 8, 28, 0.7) 62%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: border-color var(--spring), box-shadow var(--spring);
}

.game-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.18), transparent 32%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--spring);
}

.game-card:hover {
  border-color: rgba(255, 255, 255, 0.27);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.34), 0 0 32px rgba(93, 52, 208, 0.11);
}

.game-card:hover::after {
  opacity: 1;
}

.game-visual {
  position: relative;
  width: 88px;
  height: 88px;
  align-self: center;
  justify-self: center;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(130deg, var(--violet), var(--magenta), var(--cyan));
  cursor: pointer;
}

.game-visual:focus-visible,
.game-title-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -3px;
}

.game-title-link {
  width: fit-content;
  cursor: pointer;
}

.game-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 7, 19, 0.82), transparent 58%);
  content: "";
}

.game-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.02);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), filter var(--spring);
}

.game-card:hover .game-visual img {
  transform: scale(1.07);
  filter: saturate(1.08) contrast(1.03);
}

.visual-state {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 7, 19, 0.6);
  color: var(--white);
}

.game-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(390px, 1.6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.game-card h2 {
  margin: 0;
  font-size: clamp(20px, 1.8vw, 27px);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.game-description {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.game-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 0;
}

.game-facts div {
  min-width: 0;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.065);
}

.game-facts dt {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.game-facts dd {
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.game-metrics {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(92px, 0.62fr);
  gap: 7px;
  margin: 0;
}

.game-metric {
  min-width: 0;
  display: flex;
  min-height: 68px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
}

.game-metric span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.game-metric strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-metric {
  position: relative;
  min-width: 0;
  height: 68px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.activity-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px 0;
}

.activity-heading span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.activity-heading strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-sparkline {
  position: absolute;
  inset: 24px 0 0;
  width: 100%;
  height: calc(100% - 24px);
  overflow: visible;
}

.spark-grid {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.spark-area {
  fill: rgba(0, 240, 255, 0.13);
}

.spark-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.54));
}

.spark-point {
  fill: var(--cyan);
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.7));
}

.tone-pink .spark-area {
  fill: rgba(236, 72, 153, 0.15);
}

.tone-pink .spark-line {
  stroke: #ff5ba7;
  filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.6));
}

.tone-pink .spark-point {
  fill: #ff5ba7;
  filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.72));
}

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

.game-feedback {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 8px 11px;
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  line-height: 1.45;
}

.game-feedback.is-error {
  border: 1px solid rgba(255, 80, 110, 0.38);
  background: rgba(255, 40, 80, 0.16);
  color: #ffd0dc;
}

.game-feedback-message {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.game-log-button {
  flex: none;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 208, 220, 0.38);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-size: 11px;
  font-weight: 650;
}

.game-log-button:hover,
.game-log-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.16);
}

.game-card.has-error {
  border-color: rgba(255, 80, 110, 0.45);
}

.game-card.has-activity {
  border-color: rgba(0, 240, 255, 0.3);
}

.action-button {
  min-width: 76px;
  min-height: 36px;
  padding: 7px 13px;
  font-size: 12px;
}

.action-button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: var(--white);
}

.action-button.danger {
  border: 1px solid rgba(255, 0, 110, 0.38);
  background: rgba(255, 0, 110, 0.16);
  box-shadow: none;
  color: #ffd0e3;
}

.action-button.danger:hover:not(:disabled) {
  border-color: rgba(255, 0, 110, 0.55);
  background: rgba(255, 0, 110, 0.26);
}

.confirm-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  outline: none;
  background: rgba(8, 7, 19, 0.94);
  color: var(--text);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.confirm-dialog::backdrop {
  background: rgba(3, 2, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.confirm-shell {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.confirm-shell h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.confirm-message {
  margin: 0;
  color: #ffd0e3;
  font-size: 13px;
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.migration-note {
  max-width: 440px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 0, 110, 0.12);
  color: #ffd0e3;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.5;
}

.detail-view {
  padding: 14px 0 8px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
}

.detail-hero {
  min-height: 220px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 20px;
  padding: 16px;
  overflow: hidden;
}

.detail-cover {
  height: 188px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(130deg, var(--violet), var(--magenta), var(--cyan));
}

.detail-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 8px 0 7px;
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.detail-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-status {
  position: static;
  width: fit-content;
  margin-top: 14px;
}

.detail-hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 250px;
}

.detail-hero-actions .action-button {
  min-width: 76px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0;
}

.detail-metric {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  background: rgba(14, 11, 35, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.detail-metric > span,
.detail-metric small {
  color: var(--muted);
  font-size: 11px;
}

.detail-metric strong {
  margin: 5px 0 3px;
  font-size: clamp(22px, 2.5vw, 31px);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.detail-activity {
  height: 104px;
  border-radius: 17px;
  background: rgba(14, 11, 35, 0.62);
}

.detail-activity .activity-heading {
  padding: 13px 14px 0;
}

.detail-activity .activity-heading span {
  font-size: 11px;
}

.detail-activity .activity-heading strong {
  font-size: clamp(22px, 2.5vw, 31px);
  letter-spacing: -0.045em;
}

.detail-activity .metric-sparkline {
  inset: 38px 0 0;
  height: calc(100% - 38px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-panel {
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
}

.players-panel {
  grid-column: span 2;
}

.access-panel {
  grid-column: span 2;
}

.mods-panel {
  grid-column: span 2;
}

.mods-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.mod-dropzone {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 22px 16px;
  border: 1px dashed rgba(0, 240, 255, 0.32);
  border-radius: 16px;
  background: rgba(0, 240, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  transition: border-color var(--spring), background var(--spring), box-shadow var(--spring);
}

.mod-dropzone strong {
  font-size: 13px;
  font-weight: 650;
}

.mod-dropzone span {
  color: var(--muted);
  font-size: 11px;
}

.mod-dropzone:hover,
.mod-dropzone.is-dragover {
  border-color: rgba(0, 240, 255, 0.78);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
}

.mod-dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.mod-list {
  max-height: 330px;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  overflow: auto;
}

.mod-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.mod-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mod-identity strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mod-identity span {
  color: var(--muted);
  font-size: 10px;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.panel-count {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.player-list {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
}

.player-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 5px 16px;
}

.player-name-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.player-name-line strong {
  font-size: 15px;
}

.player-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.13);
  color: #9af8ff;
  font-size: 10px;
  font-weight: 700;
}

.player-badge.secondary {
  background: rgba(168, 85, 247, 0.16);
  color: #dfc8ff;
}

.player-meta {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.player-action {
  min-height: 31px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, var(--blue), var(--violet));
  color: var(--white);
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 650;
}

.player-action.secondary {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
}

.player-action.danger {
  border-color: rgba(255, 0, 110, 0.34);
  color: #ffd0e3;
}

.access-add-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 0.45fr) auto;
  gap: 8px;
  padding-top: 12px;
}

.access-add-form input,
.access-add-form select {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  outline: none;
  background: rgba(9, 10, 21, 0.62);
  color: var(--white);
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
}

.access-add-form input:focus,
.access-add-form select:focus {
  border-color: rgba(0, 240, 255, 0.68);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.14);
}

.access-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 0 10px;
}

.access-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.access-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.access-group-heading strong {
  font-size: 12px;
}

.access-group-heading span {
  color: var(--cyan);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.access-list {
  max-height: 230px;
  display: grid;
  gap: 5px;
  padding: 7px;
  overflow: auto;
}

.access-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.access-identity {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.access-identity strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state.compact {
  padding: 8px 4px;
  font-size: 10px;
}

.configuration-panel {
  grid-column: span 2;
}

.configuration-info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-heading {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.setting-field {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(150px, 1.2fr);
  align-items: center;
  gap: 8px 12px;
  min-height: 44px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.setting-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.setting-control input:not([type="checkbox"]),
.setting-control select {
  width: 100%;
  min-width: 0;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  outline: none;
  background: rgba(9, 10, 21, 0.62);
  color: var(--white);
  padding: 0 9px;
  font: inherit;
  font-size: 11px;
}

.setting-control input:focus,
.setting-control select:focus {
  border-color: rgba(0, 240, 255, 0.68);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.14);
}

.setting-field.is-toggle {
  cursor: pointer;
}

.setting-field.is-toggle .setting-control {
  justify-content: flex-end;
}

.setting-field.is-locked {
  border-color: rgba(0, 240, 255, 0.16);
  background: rgba(0, 240, 255, 0.045);
}

.setting-locked-value {
  min-width: 0;
  color: #bffbff;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.setting-control input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: 180ms ease;
}

.setting-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  transition: 180ms ease;
}

.setting-control input:checked + .setting-switch {
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.22);
}

.setting-control input:checked + .setting-switch::after {
  transform: translateX(16px);
}

.setting-suffix,
.setting-hint,
.settings-note {
  color: var(--muted);
  font-size: 10px;
}

.setting-hint {
  grid-column: 1 / -1;
}

.setting-clear-secret {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffd0e3;
  font-size: 10px;
  cursor: pointer;
}

.settings-note {
  margin: 0;
  line-height: 1.5;
}

.announce-form {
  display: flex;
  gap: 8px;
  padding-top: 14px;
}

.announce-form input {
  min-width: 0;
  flex: 1;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  padding: 0 13px;
  font: inherit;
  font-size: 12px;
}

.announce-form input:focus {
  border-color: rgba(0, 240, 255, 0.68);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
}

.announce-form input::placeholder {
  color: var(--muted);
}

.empty-state,
.player-note {
  margin: 0;
  padding: 20px 4px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(93, 52, 208, 0.14), rgba(0, 240, 255, 0.045));
}

.player-note {
  padding: 8px 4px 0;
}

.detail-info {
  display: grid;
  margin: 0;
}

.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row dt {
  color: var(--muted);
  font-size: 12px;
}

.info-row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 8px 12px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

footer p {
  margin: 0;
}

@media (max-width: 1100px) {
  .game-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .game-content {
    grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1.4fr) auto;
    gap: 10px;
  }

  .game-metrics {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
  }

  .game-metric {
    min-height: 68px;
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
  }
}

@media (max-width: 900px) {
  .login-content {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .login-heading {
    padding-top: 5vh;
  }

  .login-heading h1 {
    white-space: normal;
  }

  .login-form {
    width: min(480px, 100%);
  }

  .detail-hero {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .detail-hero-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

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

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

  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .login-view {
    padding: 22px;
  }

  .login-heading h1 {
    font-size: clamp(72px, 22vw, 112px);
  }

  .login-form {
    padding: 25px;
    border-radius: 26px;
  }

  .dashboard {
    width: min(100% - 24px, 1320px);
    padding-top: 12px;
  }

  .topbar {
    top: 10px;
    border-radius: 21px;
  }

  .brand-orb {
    width: 36px;
    height: 36px;
  }

  .brand-lockup > div {
    display: none;
  }

  .topbar-language-picker select {
    width: 86px;
    padding-right: 18px;
  }

  .text-button {
    min-height: 38px;
    padding: 0 7px;
    font-size: 11px;
  }

  .log-dialog {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 4px;
  }

  .upload-dialog {
    width: calc(100% - 16px);
    border-radius: 20px;
  }

  .log-shell {
    padding: 0;
  }

  .log-header h2 {
    font-size: 25px;
  }

  .log-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .log-actions {
    width: 100%;
  }

  .log-filter {
    flex: 1;
  }

  .log-filter select {
    min-width: 0;
    flex: 1;
  }

  .log-operation {
    padding: 10px 16px;
  }

  .log-output {
    padding: 14px 12px 20px;
  }

  .log-note {
    padding: 10px 16px;
  }

  .log-row {
    grid-template-columns: 56px 44px minmax(0, 1fr);
    gap: 6px;
  }

  .log-message {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 34px;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .library-empty {
    min-height: 360px;
    padding: 44px 20px;
  }

  .catalog-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
    padding: 13px;
    border-radius: 20px;
  }

  .catalog-visual {
    width: 82px;
    height: 82px;
    border-radius: 15px;
  }

  .catalog-content h3 {
    font-size: 20px;
  }

  .catalog-facts {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 0;
    grid-template-columns: 84px minmax(0, 1fr);
    grid-template-rows: auto;
    border-radius: 22px;
  }

  .game-visual {
    width: 68px;
    height: 68px;
  }

  .game-content {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }

  .game-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

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

  .game-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .detail-cover {
    height: 170px;
  }

  .detail-hero-actions {
    grid-column: auto;
  }

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

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .players-panel {
    grid-column: auto;
  }

  .access-panel {
    grid-column: auto;
  }

  .mods-panel {
    grid-column: auto;
  }

  .configuration-panel {
    grid-column: auto;
  }

  .configuration-info {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .access-groups {
    grid-template-columns: 1fr;
  }

  .access-add-form {
    grid-template-columns: 1fr;
  }

  .setting-field {
    grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1.3fr);
  }

  .player-row {
    align-items: stretch;
    flex-direction: column;
  }

  .player-identity {
    grid-template-columns: 1fr;
  }

  .player-actions {
    justify-content: flex-start;
  }

  footer {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
