/* Rusalik Studio — тёмная кинематографичная тема в духе ночных транзитных
   магистралей: один акцент (сигнальный янтарь) + вторичный «рельсовый»
   бирюзовый, выведенные через oklch/color-mix. */

:root {
  --accent: oklch(78% 0.16 70);
  --accent-strong: oklch(68% 0.17 55);
  --accent-quiet: color-mix(in oklch, var(--accent) 16%, transparent);
  --rail: oklch(72% 0.1 200);
  --rail-quiet: color-mix(in oklch, var(--rail) 16%, transparent);

  --bg: oklch(15% 0.018 255);
  --bg-raised: oklch(18% 0.02 255);
  --surface: oklch(21% 0.02 255);
  --surface-2: oklch(25% 0.02 255);
  --border: color-mix(in oklch, white 12%, transparent);
  --border-strong: color-mix(in oklch, white 22%, transparent);
  --text: oklch(94% 0.008 255);
  --muted: oklch(68% 0.02 255);
  --muted-2: oklch(56% 0.02 255);

  --danger: oklch(66% 0.19 25);
  --success: oklch(74% 0.15 150);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 24px 60px -20px oklch(0% 0 0 / 0.6);
  --shadow-md: 0 12px 30px -14px oklch(0% 0 0 / 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, color-mix(in oklch, var(--accent) 10%, transparent), transparent),
    radial-gradient(50rem 30rem at -10% 20%, color-mix(in oklch, var(--rail) 8%, transparent), transparent);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

.label-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 200ms var(--ease);
}
.link-more:hover { gap: 10px; }

/* ---------- rail-track divider (signature motif) ---------- */
.rail-divider {
  height: 18px;
  background-image: repeating-linear-gradient(
    90deg,
    color-mix(in oklch, var(--accent) 35%, transparent) 0 26px,
    transparent 26px 52px
  );
  opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--bg) 55%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 250ms var(--ease), border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-md);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: 0.01em; }
.brand .brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(155deg, var(--accent), var(--accent-strong));
  display: grid; place-items: center; color: oklch(18% 0.02 255); font-size: 16px;
  box-shadow: 0 6px 18px -6px color-mix(in oklch, var(--accent) 70%, transparent);
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 9px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.main-nav a:hover, .main-nav a.is-active { color: var(--text); background: var(--surface); }

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

.burger {
  display: none;
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); align-items: center; justify-content: center; font-size: 18px;
}

.mobile-nav {
  display: none;
  position: fixed; inset: 72px 0 0 0; z-index: 39;
  background: color-mix(in oklch, var(--bg) 97%, transparent);
  backdrop-filter: blur(10px);
  padding: 18px 20px 28px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 15px 6px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--border);
}
.mobile-nav .mobile-actions { margin-top: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: oklch(16% 0.02 255); box-shadow: 0 10px 28px -12px color-mix(in oklch, var(--accent) 80%, transparent); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 14px 32px -12px color-mix(in oklch, var(--accent) 90%, transparent); }
.btn-ghost { background: color-mix(in oklch, white 6%, transparent); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: color-mix(in oklch, white 12%, transparent); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: color-mix(in oklch, var(--danger) 18%, transparent); color: var(--danger); border-color: color-mix(in oklch, var(--danger) 40%, transparent); }
.btn-danger:hover { background: color-mix(in oklch, var(--danger) 28%, transparent); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 6%, color-mix(in oklch, var(--bg) 30%, transparent) 42%, color-mix(in oklch, var(--bg) 15%, transparent) 70%),
    linear-gradient(90deg, color-mix(in oklch, var(--bg) 70%, transparent), transparent 60%);
}
.hero-content { position: relative; z-index: 2; padding: 64px 0 56px; width: 100%; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.hero-badge {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in oklch, var(--accent) 55%, transparent);
  color: var(--accent); background: var(--accent-quiet);
}
.hero-title {
  font-size: clamp(2.2rem, 1.5rem + 4vw, 3.5rem);
  max-width: 20ch;
  margin-bottom: 16px;
}
.hero-tagline { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); color: var(--muted); max-width: 56ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 32px; }
.hero-meta .meta-row { display: flex; flex-direction: column; gap: 4px; }
.hero-meta .meta-value { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; letter-spacing: 0.02em; }

@media (max-width: 767px) {
  .hero { min-height: 66vh; }
  .hero-content { padding: 40px 0 32px; }
}

/* ---------- carousels ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex: 0 0 auto; }
.carousel-nav {
  display: none;
  position: absolute; top: 40%; translate: 0 -50%;
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: color-mix(in oklch, var(--bg) 80%, transparent); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; z-index: 3; cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.carousel-nav:hover { background: var(--surface-2); border-color: var(--accent); }
.carousel-nav.prev { left: -10px; }
.carousel-nav.next { right: -10px; }
@media (min-width: 900px) { .carousel-nav { display: flex; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), box-shadow 260ms var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }

.game-card { width: 272px; }
.game-card .card-media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--surface-2); }
.game-card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.game-card:hover .card-media img { transform: scale(1.06); }
.game-card .status-chip {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.status-chip.released { color: var(--rail); background: color-mix(in oklch, var(--rail) 20%, var(--bg)); border: 1px solid color-mix(in oklch, var(--rail) 45%, transparent); }
.status-chip.announced { color: var(--accent); background: color-mix(in oklch, var(--accent) 20%, var(--bg)); border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent); }
.game-card .card-body { padding: 16px; }
.game-card .card-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.game-card .card-tagline { font-size: 14px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* grid catalogues */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .grid-cards { grid-template-columns: 1fr; } }
.grid-cards .game-card { width: 100%; }

/* news cards */
.news-card { width: 300px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.news-card .news-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--accent-quiet); color: var(--accent);
  display: grid; place-items: center; font-size: 18px;
}
.news-card .news-date { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted-2); letter-spacing: 0.05em; }
.news-card .news-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.news-card .news-excerpt { font-size: 14px; color: var(--muted); line-height: 1.55; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .news-grid { grid-template-columns: 1fr; } }
.news-grid .news-card { width: 100%; }

/* ---------- section shell ---------- */
.section { padding: 56px 0; }
.section-tight { padding: 40px 0; }

/* ---------- tags / departure-board chips ---------- */
.tag-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--muted);
  border-bottom: 2px solid var(--accent);
}

/* ---------- empty state ---------- */
.empty-state {
  text-align: center; padding: 64px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-raised);
}
.empty-state i { font-size: 34px; color: var(--muted-2); margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 44ch; margin-inline: auto; margin-bottom: 20px; }

/* ---------- game detail ---------- */
.detail-hero { position: relative; border-bottom: 1px solid var(--border); }
.detail-hero-media { position: relative; aspect-ratio: 21/9; overflow: hidden; }
.detail-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), transparent 60%); }
.detail-crumb { padding: 18px 0 0; font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.detail-crumb a:hover { color: var(--accent); }

.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding: 40px 0 64px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-title { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.6rem); margin-bottom: 10px; }
.detail-tagline { color: var(--muted); font-size: 17px; margin-bottom: 22px; }
.detail-desc { color: var(--text); line-height: 1.75; max-width: 68ch; margin-bottom: 32px; white-space: pre-line; }

.meta-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px;
}
.meta-row { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.meta-row .meta-label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.meta-row .meta-value { font-size: 15px; font-weight: 600; }

.status-panel { border-radius: var(--radius-sm); padding: 14px; background: color-mix(in oklch, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent); display: flex; flex-direction: column; gap: 10px; }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.status-line i { width: 18px; text-align: center; color: var(--muted-2); }
.status-line.is-off i { color: var(--danger); }
.status-line.is-on i { color: var(--success); }

.gallery-title { font-size: 22px; font-weight: 800; margin: 40px 0 18px; }
.trailer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 12px; }
@media (max-width: 700px) { .trailer-grid { grid-template-columns: 1fr; } }
.trailer-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; }
.trailer-caption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.shot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
.shot-thumb { aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); cursor: zoom-in; position: relative; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.shot-thumb:hover img { transform: scale(1.08); }

/* ---------- skeleton shimmer ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklch, white 8%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
.skeleton.is-loaded::after { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- lightbox ---------- */
dialog.lightbox { border: none; background: transparent; padding: 0; max-width: 92vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: color-mix(in oklch, black 82%, transparent); }
.lightbox-inner { position: relative; display: flex; align-items: center; justify-content: center; }
.lightbox-inner img { max-width: 92vw; max-height: 84vh; border-radius: 10px; }
.lightbox-close, .lightbox-arrow {
  position: absolute; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: color-mix(in oklch, var(--bg) 75%, transparent); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.lightbox-close { top: -54px; right: 0; }
.lightbox-arrow.prev { left: -56px; top: 50%; translate: 0 -50%; }
.lightbox-arrow.next { right: -56px; top: 50%; translate: 0 -50%; }
@media (max-width: 767px) {
  .lightbox-close { top: -50px; right: 0; }
  .lightbox-arrow.prev { left: 6px; }
  .lightbox-arrow.next { right: 6px; }
}
@starting-style { dialog.lightbox[open] .lightbox-inner { opacity: 0; scale: 0.96; } }
dialog.lightbox .lightbox-inner { transition: opacity 220ms var(--ease), scale 220ms var(--ease); }

/* ---------- toasts ---------- */
.toast-region { position: fixed; top: 88px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.toast {
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; opacity: 0; translate: 0 -8px; transition: opacity 240ms var(--ease), translate 240ms var(--ease);
}
.toast.is-visible { opacity: 1; translate: 0 0; }
.toast i { margin-top: 2px; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast .toast-close { margin-left: auto; cursor: pointer; color: var(--muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--muted-2); }
.field input[type="text"], .field input[type="url"], .field input[type="file"], .field input[type="password"], .field textarea, .field select {
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); padding: 10px 12px; font: inherit; width: 100%;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field textarea { min-height: 110px; resize: vertical; field-sizing: content; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-quiet);
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field .field-error { font-size: 12.5px; color: var(--danger); }
.field-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.field-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .field.col-span-2 { grid-column: 1 / -1; }

/* ---------- admin ---------- */
.admin-shell { padding: 40px 0 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-tabs a { padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); }
.admin-tabs a.is-active, .admin-tabs a:hover { color: var(--text); background: var(--surface); border-color: var(--border-strong); }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; }
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
table.admin-table th, table.admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
table.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); background: var(--bg-raised); }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table .row-actions { display: flex; gap: 8px; }
table.admin-table img.thumb { width: 52px; height: 68px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

dialog.modal { border: none; padding: 0; border-radius: var(--radius); background: var(--bg-raised); color: var(--text); width: min(640px, 94vw); max-height: 88vh; box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: color-mix(in oklch, black 78%, transparent); backdrop-filter: blur(2px); }
dialog.modal .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-raised); z-index: 1; }
dialog.modal .modal-head h3 { font-size: 19px; }
dialog.modal .modal-close { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border-strong); cursor: pointer; }
dialog.modal .modal-body { padding: 22px; overflow-y: auto; }
dialog.modal .modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--bg-raised); }
@starting-style { dialog.modal[open] { opacity: 0; translate: 0 12px; } }
dialog.modal { opacity: 1; translate: 0 0; transition: opacity 220ms var(--ease), translate 220ms var(--ease); }

.login-shell { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.login-card .brand-mark { margin-bottom: 18px; }

.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer p { color: var(--muted-2); font-size: 13.5px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
