@font-face {
  font-family: "Roboto";
  src: url("assets/Roboto-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/Roboto-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/Roboto-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #111827;
  --ink-soft: #344054;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e6e9ef;
  --line-strong: #d5dae3;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-hover: #f2f4f7;
  --accent: #dc315b;
  --accent-dark: #bf2148;
  --accent-soft: #fff0f4;
  --success: #16845b;
  --success-soft: #ecfdf3;
  --danger: #c92a3f;
  --danger-soft: #fff1f3;
  --warning: #a15c07;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.04);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.sidebar-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

:focus-visible {
  outline: 3px solid rgba(220, 49, 91, 0.28);
  outline-offset: 2px;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.auth-screen,
.login-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface-soft);
}

.auth-screen { align-content: center; color: var(--muted); }
.auth-screen p { margin: 14px 0 0; }

.auth-loading-mark {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.login-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand,
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.login-brand img,
.sidebar-brand img { object-fit: contain; }
.login-brand span { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.login-copy { margin: 34px 0 28px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.login-copy h1, .page-header h1 { margin: 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.16; letter-spacing: -0.035em; }
.login-copy > p:last-child, .page-header > div > p:last-child { margin: 10px 0 0; color: var(--muted); }

.field { display: grid; gap: 7px; }
.field + .field { margin-top: 18px; }
.field label { color: var(--ink-soft); font-size: 13px; font-weight: 600; }

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input { min-height: 44px; padding: 10px 12px; }
textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }
input:hover, textarea:hover { border-color: #b8c0cc; }
input:focus, textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(220, 49, 91, 0.12); }
.field-hint { color: var(--muted); font-size: 12px; }

.form-message {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: 0.65; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: white; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.button-secondary { border-color: var(--line-strong); background: var(--surface); }
.button-secondary:hover:not(:disabled) { background: var(--surface-hover); }
.button-danger { color: var(--danger); background: var(--danger-soft); }
.button-danger:hover:not(:disabled) { background: #ffe4e8; }
.button-wide { width: 100%; margin-top: 22px; }
.button-login-alternative { margin-top: 10px; }
.button-compact { min-height: 38px; padding: 7px 12px; font-size: 13px; }

.password-reset-button {
  display: block;
  margin: 14px auto 0;
  padding: 4px;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.password-reset-button:hover { color: var(--accent-dark); text-decoration: underline; }
.password-reset-button:disabled { cursor: wait; opacity: .65; }

.button-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin 700ms linear infinite; }
.button-spinner-dark { border-color: rgba(31, 35, 40, .22); border-top-color: var(--text); }
.button.is-loading .button-spinner { display: block; }

.login-note {
  display: flex;
  gap: 9px;
  margin: 26px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.login-note svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--success); }

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

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 256px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar-head { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px 0 20px; border-bottom: 1px solid var(--line); }
.sidebar-brand span { display: grid; line-height: 1.25; }
.sidebar-brand strong { font-size: 16px; }
.sidebar-brand small { color: var(--muted); font-size: 11px; }

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
  transition: background 160ms ease, color 160ms ease;
}
.icon-button:hover { background: var(--surface-hover); }
.icon-button svg { width: 20px; height: 20px; }
.sidebar-close { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 18px 12px; }
.nav-label { margin: 0 10px 7px; color: var(--muted-light); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 24px; }
.nav-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 160ms ease, background 160ms ease;
}
.nav-item + .nav-item { margin-top: 3px; }
.nav-item:hover { color: var(--ink); background: var(--surface-hover); }
.nav-item.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.nav-item svg { width: 19px; height: 19px; }
.nav-count { min-width: 23px; margin-left: auto; padding: 2px 6px; border-radius: 999px; color: var(--muted); background: var(--surface-hover); font-size: 11px; text-align: center; }
.nav-item.is-active .nav-count { color: var(--accent-dark); background: white; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.site-link { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--muted); font-size: 13px; }
.site-link:hover { color: var(--ink); }
.site-link svg { width: 17px; height: 17px; }
.admin-profile { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px; border-radius: 11px; background: var(--surface-soft); }
.profile-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; color: white; background: var(--ink); font-size: 13px; font-weight: 700; }
.profile-copy { min-width: 0; display: grid; flex: 1; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile .icon-button { width: 36px; height: 36px; color: var(--muted); }
.admin-profile .icon-button:hover { color: var(--danger); background: var(--danger-soft); }

.sidebar-backdrop { display: none; }
.workspace { min-height: 100svh; margin-left: 256px; }
.topbar { position: sticky; z-index: 20; top: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.menu-button { display: none; }
.topbar-title { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #20a66a; box-shadow: 0 0 0 3px var(--success-soft); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.save-status { color: var(--muted); font-size: 12px; }

.content { width: min(100%, 1260px); margin: 0 auto; padding: 34px 34px 64px; }
.view { animation: view-in 220ms var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header-action { align-items: center; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(16,24,40,.025); }
.metric-icon { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-soft); }
.metric-icon svg { width: 20px; height: 20px; }
.metric-card > div { min-width: 0; display: grid; }
.metric-card span:not(.metric-icon) { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card strong { margin: 2px 0; font-size: 22px; letter-spacing: -0.03em; }
.metric-card small { color: var(--muted-light); font-size: 11px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(16,24,40,.025); }
.panel-heading { display: flex; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 16px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.publish-state { min-height: 164px; display: flex; align-items: center; gap: 16px; padding: 28px 24px; }
.publish-check { width: 44px; height: 44px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-soft); }
.publish-check svg { width: 22px; height: 22px; stroke-width: 2.2; }
.publish-state strong { font-size: 15px; }
.publish-state p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.quick-actions { padding: 8px; }
.quick-actions button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; text-align: left; }
.quick-actions button:hover { background: var(--surface-hover); }
.quick-actions svg { width: 17px; height: 17px; color: var(--muted); }

.form-panel { overflow: hidden; }
.form-panel fieldset { margin: 0; padding: 24px; border: 0; }
.form-panel fieldset + fieldset { border-top: 1px solid var(--line); }
.form-panel legend { padding: 0; font-size: 16px; font-weight: 700; }
.fieldset-help { margin: 4px 0 20px; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field + .field { margin-top: 0; }
.form-grid + .field, .fieldset-help + .field, fieldset > .field + .form-grid { margin-top: 18px; }
.form-footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px 12px 24px; border-top: 1px solid var(--line); background: #fbfcfd; }
.form-footer span { color: var(--muted); font-size: 12px; }
.form-footer.standalone { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.list-panel { overflow: hidden; }
.list-head, .content-row { display: grid; grid-template-columns: minmax(240px, 1fr) 110px 70px 88px; align-items: center; gap: 16px; }
.list-head { min-height: 44px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fbfcfd; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.content-row { min-height: 68px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.content-row:last-child { border-bottom: 0; }
.content-main { min-width: 0; }
.content-main strong, .content-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-main strong { font-size: 13px; }
.content-main small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.badge-live { color: var(--success); background: var(--success-soft); }
.badge-draft { color: var(--warning); background: #fff8eb; }
.row-order { color: var(--muted); font-variant-numeric: tabular-nums; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-actions .icon-button { width: 38px; height: 38px; color: var(--muted); }
.row-actions .icon-button:hover { color: var(--ink); }
.row-actions .delete:hover { color: var(--danger); background: var(--danger-soft); }

.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; padding: 40px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 38px; height: 38px; margin-bottom: 14px; color: var(--muted-light); }
.empty-state h2 { margin: 0; color: var(--ink); font-size: 16px; }
.empty-state p { margin: 6px 0 0; font-size: 13px; }

.game-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.game-admin-card { overflow: hidden; display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.game-preview { position: relative; min-height: 238px; background: #f0f1f4; }
.game-preview img { width: 100%; height: 100%; object-fit: cover; }
.game-index { position: absolute; top: 10px; left: 10px; min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 6px; border-radius: 7px; color: white; background: rgba(17,24,39,.8); font-size: 11px; font-weight: 700; }
.game-fields { padding: 18px; }
.game-fields .field + .field { margin-top: 13px; }
.game-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.file-button { position: relative; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; }
.file-button:hover { background: var(--surface-hover); }
.file-button input { position: absolute; inset: 0; min-height: 0; cursor: pointer; opacity: 0; }
.file-button svg { width: 16px; height: 16px; }
.check-field { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.check-field input { width: 17px; min-height: 17px; accent-color: var(--accent); }

.upload-panel { padding: 20px; }
.upload-drop { position: relative; min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 24px; border: 1px dashed #bdc4cf; border-radius: 10px; background: #fbfcfd; text-align: left; }
.upload-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop input { position: absolute; inset: 0; min-height: 0; cursor: pointer; opacity: 0; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: var(--surface); }
.upload-icon svg { width: 21px; height: 21px; }
.upload-drop label { font-weight: 700; pointer-events: none; }
.upload-drop p { margin: 3px 0 0; color: var(--muted); font-size: 12px; pointer-events: none; }
.upload-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; margin-top: 18px; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.media-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.media-thumb { position: relative; aspect-ratio: 4 / 3; background: #eef0f3; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .icon-button { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; color: var(--danger); background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.media-info { padding: 12px; }
.media-info strong, .media-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info strong { font-size: 12px; }
.media-info small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.switch-field { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; cursor: pointer; }
.switch-field > span:first-child { display: grid; }
.switch-field strong { font-size: 13px; }
.switch-field small { color: var(--muted); font-size: 11px; }
.switch-field input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #cbd1da; transition: background 160ms ease; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(16,24,40,.2); content: ""; transition: transform 160ms var(--ease); }
.switch-field input:checked + .switch { background: var(--accent); }
.switch-field input:checked + .switch::after { transform: translateX(18px); }
.switch-field input:focus-visible + .switch { outline: 3px solid rgba(220,49,91,.25); outline-offset: 2px; }

.dialog { width: min(calc(100% - 32px), 620px); max-height: calc(100svh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 80px rgba(16,24,40,.24); }
.dialog::backdrop { background: rgba(17,24,39,.48); backdrop-filter: blur(2px); }
.dialog form { padding: 24px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-head h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.dialog .compact-grid { align-items: end; margin-top: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: min(340px, calc(100vw - 40px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 12px 34px rgba(16,24,40,.16); animation: toast-in 220ms var(--ease); }
.toast svg { width: 19px; height: 19px; color: var(--success); }
.toast.is-error svg { color: var(--danger); }
.toast span { font-size: 13px; font-weight: 500; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-admin-card { grid-template-columns: 120px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-102%); transition: transform 220ms var(--ease); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-grid; }
  .sidebar-backdrop { position: fixed; z-index: 25; inset: 0; display: block; border: 0; pointer-events: none; opacity: 0; background: rgba(17,24,39,.38); transition: opacity 220ms ease; }
  .sidebar-open .sidebar-backdrop { pointer-events: auto; opacity: 1; }
  .workspace { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .topbar-title { margin-right: auto; margin-left: 8px; }
  .content { padding: 28px 20px 56px; }
  .overview-grid { grid-template-columns: 1fr; }
  .game-admin-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .login-card { padding: 28px 22px; }
  .topbar { height: 64px; padding: 0 12px; }
  .topbar-title, .save-status { display: none; }
  .content { padding: 24px 14px 48px; }
  .page-header, .page-header-action { align-items: stretch; flex-direction: column; gap: 16px; }
  .page-header .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { padding: 16px; }
  .form-grid.two, .upload-fields, .dialog .compact-grid { grid-template-columns: 1fr; }
  .form-panel fieldset { padding: 20px 16px; }
  .form-footer { align-items: stretch; flex-direction: column; padding: 16px; }
  .form-footer .button { width: 100%; }
  .list-head { display: none; }
  .content-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px; }
  .content-main { grid-column: 1 / -1; }
  .row-order { display: none; }
  .row-actions { grid-column: 2; grid-row: 2; }
  .game-admin-card { grid-template-columns: 100px minmax(0, 1fr); }
  .game-preview { min-height: 260px; }
  .game-fields { padding: 14px; }
  .game-controls { align-items: flex-start; flex-direction: column; }
  .media-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dialog form { padding: 20px 16px; }
  .dialog-actions .button { flex: 1; }
}

@media (max-width: 420px) {
  .game-admin-card { grid-template-columns: 1fr; }
  .game-preview { min-height: 180px; max-height: 240px; }
  .media-grid { grid-template-columns: 1fr; }
}

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