:root {
  --bg: #06080c;
  --panel: rgba(18, 22, 32, 0.78);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #ff4d2e;
  --accent-soft: rgba(255, 77, 46, 0.14);
  --danger: #ff6b6b;
  --ok: #5bd38a;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -15%, rgba(255, 77, 46, 0.11), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 40%, rgba(60, 100, 255, 0.05), transparent 45%),
    linear-gradient(180deg, #0a0d14 0%, #06080c 55%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 24px rgba(255, 77, 46, 0.35);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav a.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.site-main {
  flex: 1;
  padding-top: 28px;
}

.page-account .site-main {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 52px);
}

.page-admin .site-main {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.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;
}

.admin-hero {
  margin: 0 0 8px;
  padding-bottom: clamp(16px, 2vw, 24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-hero--compact {
  margin-bottom: 4px;
  padding-bottom: 12px;
}

.admin-hero-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-hero-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.admin-hero-userline {
  display: block;
  margin-bottom: 8px;
}

.admin-hero-role {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-hero-lead .role-badge {
  vertical-align: middle;
}

.admin-toolbar {
  margin-bottom: 8px;
}

.admin-search-wrap {
  position: relative;
  margin-bottom: 18px;
}
.admin-search-input {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.admin-search-input::placeholder { color: var(--muted); }
.admin-search-input:focus {
  border-color: var(--accent);
}
.admin-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: rgba(10, 14, 22, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: none;
  overflow: hidden;
}
.admin-search-results.is-open {
  display: block;
}
.admin-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.admin-search-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.admin-search-item-name {
  font-weight: 500;
}
.admin-search-item-nick {
  color: var(--muted);
  font-weight: 400;
}
.admin-search-empty {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Admin user detail */
.admin-user-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.admin-dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
  margin: 0;
}
.admin-dl dt {
  color: var(--muted);
  font-size: 0.85rem;
  padding-top: 2px;
}
.admin-dl dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}
@media (max-width: 600px) {
  .admin-dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .admin-dl dt {
    margin-top: 10px;
  }
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.18s,
    color 0.18s;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.admin-tab.is-active {
  color: #fff;
  background: rgba(255, 77, 46, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 107, 69, 0.35);
}

.admin-table-compact .admin-ban-cell {
  min-width: 0;
  vertical-align: middle;
}

.admin-ban-days-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.admin-ban-days-field-label {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 14px;
}

.admin-stat-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.admin-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f0f3f9;
}

.admin-analytics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-analytics-block {
  margin: 0;
}

.admin-analytics-block:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.admin-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-mini-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.admin-mini-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-mini-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f0f3f9;
}

.admin-table--compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table--compact th,
.admin-table--compact td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table--compact th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-table--compact td:nth-child(2),
.admin-table--compact td:nth-child(3),
.admin-table--compact th:nth-child(2),
.admin-table--compact th:nth-child(3) {
  text-align: center;
  width: 80px;
}

/* ── Admin charts ── */
.admin-chart-section {
  margin: 0;
}

.chart-bar-wrap {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.chart-bar-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 10px 22px 0;
  font-size: 0.64rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 160px;
  padding-bottom: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  min-width: 0;
}

.chart-bar-fill {
  width: 100%;
  max-width: 14px;
  border-radius: 3px 3px 0 0;
  height: var(--bar-h, 0%);
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 1px;
}

.chart-bar-fill--accent {
  background: linear-gradient(180deg, var(--accent) 0%, rgba(255, 77, 46, 0.4) 100%);
}

.chart-bar-fill--green {
  background: linear-gradient(180deg, #5bd38a 0%, rgba(91, 211, 138, 0.4) 100%);
}

.chart-bar-label {
  position: absolute;
  bottom: -20px;
  font-size: 0.56rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Chart tooltip */
.chart-tooltip {
  position: absolute;
  bottom: calc(var(--bar-h, 0%) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 22, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  font-size: 0.7rem;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.chart-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(10, 14, 22, 0.95);
}
.chart-tooltip strong {
  color: var(--text);
  font-weight: 600;
}
.chart-tooltip span {
  color: var(--muted);
  font-size: 0.65rem;
}
.chart-bar:hover .chart-tooltip {
  opacity: 1;
}
.chart-bar:hover .chart-bar-fill {
  filter: brightness(1.3);
}

/* Horizontal bar chart */
.chart-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-hbar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-hbar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.chart-hbar-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-hbar-nums {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.chart-hbar-total {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.chart-hbar-week {
  font-size: 0.72rem;
  color: #5bd38a;
  font-weight: 600;
}

.chart-hbar-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.chart-hbar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-hbar-fill--total {
  background: linear-gradient(90deg, var(--accent), rgba(255, 77, 46, 0.45));
  z-index: 1;
}

.chart-hbar-fill--week {
  background: linear-gradient(90deg, #5bd38a, rgba(91, 211, 138, 0.45));
  z-index: 2;
}

.admin-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-panel-links {
  margin-top: 4px;
}

.admin-section-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}

.admin-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-link-tile {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.18s, background 0.18s;
}

.admin-link-tile:hover {
  border-color: rgba(255, 107, 69, 0.35);
  background: rgba(255, 77, 46, 0.06);
  color: #fff;
}

.admin-hint {
  margin: 16px 0 0;
  font-size: 0.88rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.45);
}

.admin-table-roles .admin-role-select {
  width: auto;
  max-width: 12rem;
  min-width: 9.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}
.admin-table td a {
  color: var(--text);
  text-decoration: none;
}
.admin-table td a:hover {
  text-decoration: underline;
}

.admin-table th {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-mono {
  font-variant-numeric: tabular-nums;
  color: #c8d0e0;
}

.admin-break {
  word-break: break-word;
  max-width: 200px;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-ok {
  color: #7ee0c0;
  font-weight: 600;
}

.admin-warn {
  color: #ffc266;
  font-weight: 600;
}

.admin-role-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-role-select {
  padding: 6px 10px;
  padding-right: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.82rem;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-ban-cell {
  min-width: 0;
  vertical-align: middle;
}

.admin-table-bans .admin-ban-status {
  margin: 0;
}

.admin-ban-status {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.admin-ban-status--on {
  color: #ffc266;
  font-weight: 600;
}

.admin-ban-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.admin-ban-form.admin-ban-form--compact {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.admin-ban-form.admin-ban-form--compact .admin-ban-days {
  flex: 0 0 auto;
  width: 4.25rem;
  max-width: 5rem;
  min-width: 3.5rem;
}

.admin-ban-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  margin: 0;
}

.admin-ban-check input {
  margin: 0;
  accent-color: var(--accent);
}

.admin-ban-days {
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ═══════ Admin Games ═══════ */

.admin-games-toolbar {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.admin-game-form {
  margin-top: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: 14px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-form-group.full {
  grid-column: 1 / -1;
}

.admin-form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.admin-input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.18s;
}

.admin-input:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.admin-input {
  resize: vertical;
  min-height: 80px;
}

select.admin-input,
select.admin-role-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.55)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select.admin-input:focus,
select.admin-role-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.85)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select.admin-input option,
select.admin-role-select option {
  background: #141820;
  color: var(--text);
}

/* Date / datetime inputs: white calendar icon on dark bg */
input[type="date"].admin-input,
input[type="datetime-local"].admin-input,
input[type="time"].admin-input {
  color-scheme: dark;
}

input[type="date"].admin-input::-webkit-calendar-picker-indicator,
input[type="datetime-local"].admin-input::-webkit-calendar-picker-indicator,
input[type="time"].admin-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

input[type="file"].admin-input {
  padding: 6px 10px;
}

.admin-checks {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  grid-column: 1 / -1;
}

.admin-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
}

.admin-checks input[type="checkbox"] {
  accent-color: var(--accent);
}

.admin-form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

/* ═══════ Upload Card (shared for media + build) ═══════ */

.upload-card {
  margin-top: 24px;
  padding: 28px 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.upload-card-header {
  margin-bottom: 20px;
}

.upload-card-header h2 {
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.upload-card-header p {
  margin: 1px 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Preview area */
.upload-preview {
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.upload-preview-img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.upload-preview-img:hover {
  transform: scale(1.02);
}

.upload-preview-img--banner {
  width: 420px;
  height: auto;
  aspect-ratio: 16 / 9;
}

.upload-preview-img--icon {
  width: 112px;
  height: 112px;
  border-radius: 20px;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 0.82rem;
  transition: border-color 0.2s, background 0.2s;
}

.upload-placeholder:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
}

.upload-placeholder--banner {
  width: 420px;
  aspect-ratio: 16 / 9;
}

.upload-placeholder--icon {
  width: 112px;
  height: 112px;
  border-radius: 20px;
}

.upload-placeholder-icon {
  opacity: 0.4;
}

.upload-placeholder-icon svg {
  display: block;
}

/* Drop zone */
.upload-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.upload-dropzone:hover {
  border-color: var(--accent);
  background: rgba(255, 77, 46, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 77, 46, 0.1);
}

.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(255, 77, 46, 0.08);
  box-shadow: 0 0 20px rgba(255, 77, 46, 0.1);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone-icon {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.upload-dropzone-icon svg {
  display: block;
}

.upload-dropzone:hover .upload-dropzone-icon {
  opacity: 0.8;
}

.upload-dropzone-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.upload-dropzone-text strong {
  color: var(--accent);
  font-weight: 600;
}

.upload-dropzone-hint {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

.upload-filename {
  display: none;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  word-break: break-all;
}

.upload-filename.is-visible {
  display: block;
}

/* Build info badge */
.build-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(0, 184, 148, 0.06);
  border: 1px solid rgba(0, 184, 148, 0.15);
}

.build-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 184, 148, 0.12);
  color: #55efc4;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.build-info-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.build-info-meta strong {
  color: var(--text);
}

.build-no-data {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Upload actions */
.upload-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

/* Danger card override */
.upload-card--danger {
  border-color: rgba(255, 90, 74, 0.18);
  background: linear-gradient(135deg, rgba(255,90,74,0.03) 0%, rgba(0,0,0,0.25) 100%);
}

.upload-card--danger p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* Build form row */
.upload-build-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-bottom: 4px;
}

@media (max-width: 680px) {
  .upload-preview-img--banner,
  .upload-placeholder--banner {
    width: 100%;
  }
  .upload-build-row {
    grid-template-columns: 1fr;
  }
}

.btn-danger {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.18s;
}

.btn-danger:hover {
  background: #e74c3c;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.admin-back-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s;
}

.admin-back-link:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════ End Admin Games ═══════ */

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  margin-bottom: 36px;
}

.hero-glow {
  position: absolute;
  top: -48px;
  left: -10%;
  width: 65%;
  height: 220px;
  background: radial-gradient(ellipse, rgba(255, 77, 46, 0.35) 0%, transparent 70%);
  opacity: 0.45;
  pointer-events: none;
}

.hero-title {
  position: relative;
  margin: 0 0 16px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-line {
  display: block;
}

.hero-line.accent {
  background: linear-gradient(105deg, #fff 0%, #ffb4a8 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  position: relative;
  margin: 0 0 24px;
  max-width: 520px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-launcher-row {
  position: relative;
  margin: 0 0 20px;
}

.hero-launcher-row .btn-launcher-hero {
  width: 100%;
  max-width: min(100%, 380px);
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.panel-form {
  max-width: 420px;
}

.page-account .panel-account,
.page-account .panel-library {
  padding: clamp(24px, 4vw, 40px) clamp(22px, 4vw, 42px);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 56px rgba(0, 0, 0, 0.35);
}

.account-hero {
  margin: 0 0 clamp(28px, 4vw, 40px);
  padding: 0 0 clamp(18px, 2.5vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.account-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(120, 140, 255, 0.55) 100%);
  opacity: 0.9;
}

.account-hero-kicker {
  margin: 0 0 12px;
  padding-left: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.account-hero-title {
  margin: 0;
  padding-left: 16px;
  font-size: clamp(1.5rem, 4.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.account-profile-region {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.account-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8b2c4;
}

.account-section-lead {
  margin: 0 0 22px;
  max-width: 48rem;
  font-size: 0.94rem;
  line-height: 1.6;
}

.account-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.account-meta-card {
  position: relative;
  padding: 20px 22px 20px 24px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.22s, background 0.22s, transform 0.2s;
}

.account-meta-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), #ff8f7a);
  opacity: 0.85;
}

.account-meta-card:nth-child(2)::before {
  background: linear-gradient(180deg, #6b9dff, #8ec5ff);
}

.account-meta-card:nth-child(3)::before {
  background: linear-gradient(180deg, #5bd3a0, #7ee0c0);
}

.account-meta-card:nth-child(4)::before {
  background: linear-gradient(180deg, #e0b565, #ffd88a);
}

.account-meta-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(14, 18, 30, 0.65);
  transform: translateY(-1px);
}

.account-meta-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-meta-value {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  color: #f0f3f9;
}

.account-meta-value-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-meta-verify-row {
  align-items: center;
  min-height: 2.25rem;
}

.email-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.email-status-badge--ok {
  color: #b8f0cd;
  background: rgba(91, 211, 138, 0.14);
  border: 1px solid rgba(91, 211, 138, 0.35);
}

.email-status-badge--warn {
  color: #ffd88a;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.account-resend-verify-form--inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.account-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #dfe6f2;
}

.account-break {
  word-break: break-word;
}

.account-edit-surface {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 77, 46, 0.06) 0%, transparent 42%),
    rgba(8, 11, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.account-edit-surface .account-section-title {
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: 0.1em;
}

.form.account-nick-form {
  margin-top: 0;
  gap: 18px;
}

.form.account-nick-form.account-nick-form--wide {
  flex-direction: column;
  align-items: stretch;
}

@media (min-width: 600px) {
  .form.account-nick-form.account-nick-form--wide {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 16px 20px;
  }

  .account-nick-form--wide .field-grow {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.account-nick-form .field-grow {
  flex: 1 1 100%;
  min-width: 0;
}

.account-nick-form .field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 12px;
}

.page-account .btn-account-save {
  width: 100%;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 0.98rem;
  box-shadow: 0 6px 22px rgba(255, 77, 46, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
}

@media (min-width: 600px) {
  .page-account .btn-account-save {
    width: auto;
    min-width: 148px;
    flex-shrink: 0;
  }
}

.page-account .btn-account-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 77, 46, 0.35);
}

.page-account .btn-account-save:active {
  transform: translateY(0);
}

.library-panel-head {
  margin-bottom: clamp(22px, 3vw, 30px);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.library-panel-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.library-panel-subtitle {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36rem;
}

.library-empty {
  padding: 28px 24px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.library-empty-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.library-empty .muted {
  margin: 0 auto;
  max-width: 28rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #d63a22 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-launcher {
  gap: 10px;
  background: rgba(255, 77, 46, 0.14);
  color: #ffe8e4;
  border-color: rgba(255, 120, 90, 0.45);
}

.btn-launcher-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.btn-launcher:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 77, 46, 0.35) 0%, rgba(90, 120, 220, 0.2) 100%);
  border-color: rgba(255, 150, 120, 0.55);
  box-shadow:
    0 8px 28px rgba(255, 77, 46, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transform: translateY(-2px);
}

.btn-launcher:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(255, 77, 46, 0.2);
}

@keyframes launcher-cta-pulse {
  0%,
  100% {
    box-shadow:
      0 6px 28px rgba(255, 77, 46, 0.5),
      0 0 36px rgba(255, 90, 50, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  50% {
    box-shadow:
      0 10px 40px rgba(255, 77, 46, 0.62),
      0 0 56px rgba(255, 110, 70, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }
}

.btn-launcher.btn-launcher-hero {
  position: relative;
  overflow: visible;
  gap: 14px;
  justify-content: flex-start;
  padding: 16px 22px 16px 20px;
  min-height: 58px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(148deg, #ff6b45 0%, var(--accent) 42%, #c72e18 100%);
  border: 1px solid rgba(255, 210, 190, 0.55);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  box-shadow:
    0 6px 28px rgba(255, 77, 46, 0.5),
    0 0 36px rgba(255, 90, 50, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: launcher-cta-pulse 2.8s ease-in-out infinite;
}

.btn-launcher-hero-icon {
  width: 28px;
  height: 28px;
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.btn-launcher-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.15;
  text-align: left;
}

.btn-launcher-label-main {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.btn-launcher-label-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.btn-launcher.btn-launcher-hero:hover {
  color: #fff;
  filter: brightness(1.08);
  border-color: rgba(255, 230, 210, 0.65);
  transform: translateY(-3px);
  background: linear-gradient(148deg, #ff7a55 0%, #ff4d2e 45%, #d83820 100%);
}

.btn-launcher.btn-launcher-hero:active {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-launcher.btn-launcher-hero:focus-visible {
  outline: 2px solid rgba(255, 200, 160, 0.95);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-launcher.btn-launcher-hero {
    animation: none;
  }

  .btn-launcher.btn-launcher-hero {
    box-shadow:
      0 8px 32px rgba(255, 77, 46, 0.5),
      0 0 40px rgba(255, 90, 50, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.account-role {
  margin: 8px 0 16px;
}

.role-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 2px solid rgba(255, 77, 46, 0.45);
  box-shadow: 0 4px 16px rgba(255, 77, 46, 0.12);
}

.role-badge.role-moderator {
  background: rgba(100, 149, 237, 0.18);
  color: #b4c9ff;
  border-color: rgba(120, 160, 255, 0.5);
  box-shadow: 0 4px 16px rgba(100, 149, 237, 0.15);
}

.role-badge.role-admin {
  background: rgba(255, 193, 7, 0.14);
  color: #ffe08a;
  border-color: rgba(255, 200, 80, 0.45);
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.12);
}

.role-badge.role-user {
  background: rgba(255, 255, 255, 0.07);
  color: #dce3ef;
  border: 2px solid rgba(255, 130, 100, 0.35);
  box-shadow: 0 4px 18px rgba(255, 77, 46, 0.08);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.field span {
  color: var(--muted);
}

.field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 16, 0.65);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 77, 46, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-footer {
  margin-top: 16px;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.account-welcome {
  margin-top: 0;
  font-size: 1.05rem;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.alert-success {
  background: rgba(91, 211, 138, 0.12);
  border: 1px solid rgba(91, 211, 138, 0.35);
  color: #b8f0cd;
}

.alert-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffc9c9;
}

.alert-warn {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffe08a;
}

.news-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.news-item {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.news-item:first-child {
  border-top: none;
  padding-top: 8px;
}

.news-item time {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.news-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-game-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 77, 46, .14);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.news-game-badge:hover {
  background: rgba(255, 77, 46, .28);
}

.news-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  word-break: break-word;
}

.news-item-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.news-item-link:hover {
  color: var(--accent);
}

.news-item-read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

.news-item-read-more:hover {
  color: #ff7a5e;
}

/* ═══════════════════════════════════════════════
   News article detail page
   ═══════════════════════════════════════════════ */
.news-article {
  max-width: 780px;
}

.news-article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.news-article-back {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.news-article-back:hover {
  color: var(--text);
}

.news-article-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.news-article-title {
  margin: 0 0 24px;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.news-article-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-word;
}

/* Game news section on game detail page */
.game-news-section {
  margin-top: 28px;
}

/* Единое уведомление справа сверху (все страницы) */
.site-toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top, 0px));
  right: max(18px, env(safe-area-inset-right, 0px));
  z-index: 10000;
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  max-width: min(400px, calc(100vw - 28px));
  border-radius: 16px;
  overflow: hidden;
  background: rgba(14, 18, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateX(18px);
  animation: site-toast-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes site-toast-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.site-toast-out {
  animation: site-toast-exit 0.38s ease forwards;
}

@keyframes site-toast-exit {
  to {
    opacity: 0;
    transform: translateX(14px);
  }
}

.site-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 14px 14px 18px;
  box-sizing: border-box;
  min-width: 0;
}

.site-toast-icon {
  flex-shrink: 0;
  display: flex;
  margin-top: 1px;
  line-height: 0;
}

.site-toast-icon svg {
  display: block;
}

.site-toast--success .site-toast-icon {
  color: var(--ok);
}

.site-toast--error .site-toast-icon {
  color: var(--danger);
}

.site-toast--info .site-toast-icon {
  color: #8eb9ff;
}

.site-toast-text {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #e8ecf4;
}

.site-toast-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.site-toast-close:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.site-toast-bar {
  height: 3px;
  transform-origin: left center;
  animation: site-toast-timer 5.6s linear forwards;
}

.site-toast--success .site-toast-bar {
  background: linear-gradient(90deg, #3dbf75, #7ee0c0);
}

.site-toast--error .site-toast-bar {
  background: linear-gradient(90deg, #ff5c5c, #ffb199);
}

.site-toast--info .site-toast-bar {
  background: linear-gradient(90deg, #5b8cff, #a8c4ff);
}

@keyframes site-toast-timer {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-toast {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .site-toast-out {
    animation: none;
    opacity: 0;
  }

  .site-toast-bar {
    animation: none;
    transform: scaleX(0.35);
  }
}

.account-logout-wrap {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
}

.btn-logout:hover {
  color: #ffd6d6;
  border-color: rgba(255, 130, 120, 0.55);
  background: linear-gradient(135deg, rgba(255, 90, 90, 0.18) 0%, rgba(255, 77, 46, 0.12) 100%);
  box-shadow:
    0 6px 22px rgba(255, 77, 46, 0.18),
    0 0 24px rgba(255, 100, 90, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-logout:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(255, 77, 46, 0.12);
}

.btn-logout:focus-visible {
  outline: none;
  border-color: rgba(255, 160, 140, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 77, 46, 0.25);
}

.library-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.library-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background: rgba(12, 16, 26, 0.55);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}

.library-card:hover {
  border-color: rgba(255, 77, 46, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  transform: translateY(-2px);
}

.library-card-art {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0.06em;
  line-height: 1;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 77, 46, 0.5) 0%, transparent 55%),
    linear-gradient(315deg, rgba(72, 110, 255, 0.35) 0%, rgba(18, 22, 32, 0.9) 100%);
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.library-card-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.library-card-body {
  flex: 1;
  min-width: 0;
  padding: 22px 24px 22px 22px;
  display: flex;
  flex-direction: column;
}

.library-card-body h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.library-card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  flex: 1;
}

.library-card-playtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.library-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.library-card-tag {
  align-self: flex-start;
  margin-top: 14px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .library-card {
    flex-direction: column;
  }

  .library-card-art {
    flex: 0 0 auto;
    min-height: 100px;
    width: 100%;
    font-size: 1.5rem;
  }

  .library-card-body {
    padding: 18px 18px 20px;
  }

  .library-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.small-print {
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-tight .field {
  margin-bottom: 12px;
}

.field-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.field-checkbox input {
  width: auto;
  margin-top: 4px;
  flex-shrink: 0;
}

.field-checkbox span {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.legal-doc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.legal-doc h2 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 28px 0 12px;
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc p,
.legal-doc li {
  margin: 0 0 12px;
}

.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.legal-doc .legal-note {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #ffe6a8;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* —— Страница 404 —— */
@keyframes err404-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -18px) scale(1.03);
  }
  66% {
    transform: translate(-10px, 10px) scale(0.98);
  }
}

@keyframes err404-pulse-glow {
  0%,
  100% {
    opacity: 0.45;
    filter: blur(0);
  }
  50% {
    opacity: 0.85;
    filter: blur(1px);
  }
}

@keyframes err404-title-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes err404-shimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

@keyframes err404-btn-glow {
  0%,
  100% {
    box-shadow: 0 6px 22px rgba(255, 77, 46, 0.28);
  }
  50% {
    box-shadow: 0 8px 32px rgba(255, 77, 46, 0.45);
  }
}

.page-404 {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.err404-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(255, 77, 46, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(80, 120, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #0a0d14 0%, #06080c 50%);
}

.err404-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: err404-float 14s ease-in-out infinite;
}

.err404-orb--1 {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: 8%;
  left: -8%;
  background: rgba(255, 77, 46, 0.35);
  animation-duration: 18s;
}

.err404-orb--2 {
  width: min(320px, 55vw);
  height: min(320px, 55vw);
  bottom: 12%;
  right: -5%;
  background: rgba(100, 140, 255, 0.22);
  animation-duration: 22s;
  animation-delay: -4s;
}

.err404-orb--3 {
  width: min(200px, 40vw);
  height: min(200px, 40vw);
  top: 42%;
  right: 18%;
  background: rgba(255, 120, 90, 0.2);
  animation-duration: 16s;
  animation-delay: -8s;
}

.err404-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 70%);
  opacity: 0.5;
  animation: err404-pulse-glow 8s ease-in-out infinite;
}

.err404-layout {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 48px) 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.err404-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: auto;
  padding-top: 8px;
  transition: color 0.2s, transform 0.2s;
}

.err404-brand:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.err404-brand-mark {
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(255, 77, 46, 0.35);
}

.err404-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 0 48px;
}

.err404-kicker {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  animation: err404-title-in 0.7s ease-out both;
}

.err404-title {
  margin: 0 0 20px;
  font-size: clamp(5rem, 22vw, 8.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  animation: err404-title-in 0.75s ease-out 0.08s both;
}

.err404-title-inner {
  display: inline-block;
  background: linear-gradient(
    105deg,
    #fff 0%,
    #ffb4a8 35%,
    var(--accent) 55%,
    #fff 75%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: err404-shimmer 5s linear infinite;
  text-shadow: 0 0 80px rgba(255, 77, 46, 0.35);
}

.err404-lead {
  margin: 0 0 32px;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  animation: err404-title-in 0.8s ease-out 0.2s both;
}

.err404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  animation: err404-title-in 0.85s ease-out 0.32s both;
}

.err404-btn-pulse {
  animation: err404-btn-glow 2.8s ease-in-out infinite;
}

.err404-foot {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .err404-orb,
  .err404-grid,
  .err404-title-inner,
  .err404-btn-pulse {
    animation: none;
  }

  .err404-kicker,
  .err404-title,
  .err404-lead,
  .err404-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .err404-title-inner {
    background: linear-gradient(105deg, #fff 0%, var(--accent) 100%);
  }
}

.nav-balance {
  font-size: 0.86rem;
  font-weight: 600;
  color: #e4eaf5;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.hero-compact {
  margin-bottom: 28px;
}

.hero-title-sm {
  font-size: clamp(1.65rem, 5vw, 2.45rem);
}

.hero-compact .hero-lead {
  max-width: 38rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 10px;
  min-height: 0;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.02rem;
  border-radius: 12px;
}

.panel-store .store-head {
  margin-bottom: 20px;
}

.store-head-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.store-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .store-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 920px) {
  .store-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.store-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10, 14, 22, 0.55);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.store-card:hover {
  border-color: rgba(255, 77, 46, 0.22);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.store-card-link {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  color: inherit;
  text-decoration: none;
}

.store-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.store-card-art {
  flex: 0 0 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  background:
    linear-gradient(155deg, rgba(255, 77, 46, 0.45) 0%, transparent 55%),
    linear-gradient(315deg, rgba(72, 110, 255, 0.3) 0%, rgba(14, 18, 28, 0.95) 100%);
  color: rgba(255, 255, 255, 0.95);
}

.store-card-body {
  padding: 16px 18px;
  flex: 1;
  min-width: 0;
}

.store-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.store-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.store-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.store-price {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.store-price-free {
  color: var(--ok);
}

.store-badge,
.store-badge-owned {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.store-badge-owned {
  background: rgba(91, 211, 138, 0.12);
  border: 1px solid rgba(91, 211, 138, 0.35);
  color: #b8f0cd;
}

.store-badge-beta {
  background: rgba(255, 160, 30, 0.15);
  border: 1px solid rgba(255, 160, 30, 0.3);
  color: #ffb84d;
  font-size: 0.62rem;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.steam-row-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Beta callout block */
.beta-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 160, 30, 0.06);
  border: 1px solid rgba(255, 160, 30, 0.18);
  width: 100%;
  box-sizing: border-box;
}

.beta-callout--ready {
  background: rgba(91, 211, 138, 0.06);
  border-color: rgba(91, 211, 138, 0.18);
}

.beta-callout-icon {
  flex-shrink: 0;
  color: #ffb84d;
  margin-top: 1px;
}

.beta-callout--ready .beta-callout-icon {
  color: #5bd38a;
}

.beta-callout-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.beta-callout-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.beta-callout-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.beta-callout-text strong {
  color: #ffb84d;
}

.beta-callout--ready .beta-callout-text strong {
  color: #5bd38a;
}

.btn-beta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  background: rgba(255, 160, 30, 0.18);
  color: #ffb84d;
}

.beta-callout--ready .btn-beta {
  background: rgba(91, 211, 138, 0.18);
  color: #5bd38a;
}

.btn-beta:hover {
  background: rgba(255, 160, 30, 0.28);
  transform: translateY(-1px);
}

.beta-callout--ready .btn-beta:hover {
  background: rgba(91, 211, 138, 0.28);
}

.store-inline-form {
  margin: 0;
}

.page-game .site-main {
  padding-top: 20px;
}

.game-detail {
  margin-bottom: 48px;
}

/* —— Страница игры v2: шапка 4:1 + иконка —— */
.game-detail-v2 {
  position: relative;
}

.game-detail-banner-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 1;
  max-height: min(52vh, 420px);
  background: linear-gradient(135deg, #1a1420 0%, #0d1018 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.game-detail-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-detail-banner-fallback {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(125deg, rgba(255, 77, 46, 0.35) 0%, transparent 45%),
    linear-gradient(300deg, rgba(72, 110, 255, 0.28) 0%, rgba(8, 10, 16, 0.95) 100%);
}

.game-detail-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(6, 8, 12, 0.25) 45%,
    rgba(6, 8, 12, 0.88) 100%
  );
  pointer-events: none;
}

.game-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 28px);
  margin-top: -56px;
  margin-bottom: 22px;
  padding: 0 4px;
  position: relative;
  z-index: 1;
}

.game-detail-head.card-overlap {
  align-items: flex-end;
}

.game-detail-icon-wrap {
  flex: 0 0 auto;
}

.game-detail-icon-img {
  width: clamp(104px, 22vw, 132px);
  height: clamp(104px, 22vw, 132px);
  border-radius: 22px;
  object-fit: cover;
  display: block;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #12161f;
}

.game-detail-art {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  background:
    linear-gradient(145deg, rgba(255, 77, 46, 0.5) 0%, transparent 50%),
    linear-gradient(315deg, rgba(72, 110, 255, 0.35) 0%, rgba(12, 16, 26, 0.9) 100%);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.game-detail-art--solo {
  width: clamp(104px, 22vw, 132px);
  height: clamp(104px, 22vw, 132px);
  border-radius: 22px;
  flex: none;
}

.game-detail-head-text {
  flex: 1;
  min-width: min(100%, 220px);
  padding-bottom: 4px;
}

.game-detail-studio {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.game-detail-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.game-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.game-detail-meta--head {
  margin-top: 4px;
}

.game-detail-price {
  font-size: 1.25rem;
}

.game-detail-body-v2 {
  padding: clamp(22px, 3vw, 32px);
}

.game-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.game-detail-fact {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.game-detail-fact-label {
  color: var(--muted);
  font-weight: 600;
}

.game-detail-fact-val {
  font-weight: 600;
  color: var(--text);
}

.game-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.game-tag-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.game-detail-body {
  padding: clamp(20px, 3vw, 28px);
}

.game-detail-desc {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #c5cedd;
}

.game-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.game-detail-actions .btn.btn-lg {
  min-height: 3.25rem;
  box-sizing: border-box;
}

.game-claim-form {
  margin: 0;
  display: inline-flex;
  align-items: stretch;
}

@media (max-width: 520px) {
  .game-detail-head {
    margin-top: -40px;
  }

  .game-detail-fact {
    width: 100%;
    justify-content: space-between;
  }
}

.game-buy-form {
  margin: 0;
}

.game-buy-hint {
  margin: 0 0 14px;
  max-width: 40rem;
  font-size: 0.92rem;
}

.library-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s;
  white-space: nowrap;
}

.library-card-more:hover {
  color: #ff7a5e;
}

@media (max-width: 480px) {
  .store-card-link {
    flex-direction: column;
  }

  .store-card-art {
    flex: 0 0 auto;
    min-height: 72px;
    width: 100%;
  }
}

/* —— Каталог «Игры» в стиле витрины (горизонтальные строки) —— */
.panel-steam-store {
  padding: 0;
  overflow: hidden;
}

.panel-steam-store .store-head {
  padding: 22px 24px 16px;
  margin-bottom: 0;
}

/* Пустой каталог / ошибка — те же боковые отступы, что у заголовка */
.panel-steam-store .steam-store-state {
  padding: 4px 24px 28px;
}

.panel-steam-store .steam-store-state-text {
  margin: 0;
  line-height: 1.6;
  max-width: 40rem;
}

.panel-steam-store .steam-store-state-alert {
  margin: 0;
}

.steam-game-list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.steam-row {
  display: block;
  border-top: 1px solid rgba(0, 0, 0, 0.35);
  background: #1b2838;
  transition: background 0.15s ease;
}

.steam-row:first-child {
  border-top: none;
}

.steam-row:hover {
  background: #2a475e;
}

.steam-row-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 14px 18px 16px;
  color: inherit;
  text-decoration: none;
}

.steam-row-body:hover {
  color: inherit;
  text-decoration: none;
}

.steam-row-cap {
  flex: 0 0 clamp(160px, 32vw, 292px);
  width: clamp(160px, 32vw, 292px);
  aspect-ratio: 292 / 136;
  border-radius: 2px;
  overflow: hidden;
  background: #0e1419;
  align-self: center;
}

.steam-row-cap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.steam-row-cap-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(145deg, rgba(255, 77, 46, 0.35) 0%, transparent 50%),
    linear-gradient(210deg, rgba(60, 100, 180, 0.25) 0%, #121a24 100%);
}

.steam-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 2px 0;
}

.steam-row-title {
  margin: 0;
  font-size: clamp(1.22rem, 2.35vw, 1.52rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #e8ecf4;
  line-height: 1.2;
}

.steam-row:hover .steam-row-title {
  color: #fff;
}

.steam-row-platforms {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #7a8494;
}

.steam-plat {
  display: flex;
  opacity: 0.9;
}

.steam-row-tags {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #9aa3b5;
}

.steam-row-pricing {
  flex: 0 0 auto;
  width: min(220px, 30vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  position: relative;
  padding: 6px 0 22px;
  text-align: right;
}

.steam-price-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.steam-price-block--sale {
  gap: 0;
}

.steam-discount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 6px 8px;
  margin-right: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c5e582;
  background: #4c6b22;
  border-radius: 2px;
  line-height: 1;
}

.steam-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.steam-price-was {
  font-size: 0.68rem;
  color: #5c6a7a;
  text-decoration: line-through;
}

.steam-price-final {
  font-size: 1.02rem;
  font-weight: 600;
  color: #beee11;
  line-height: 1.2;
}

.steam-price-final--free {
  color: #beee11;
  font-weight: 600;
}

.steam-owned-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9cf0c2;
  background: rgba(76, 107, 34, 0.35);
  border: 1px solid rgba(156, 240, 194, 0.25);
  border-radius: 2px;
}

.steam-row-date {
  position: absolute;
  right: 0;
  bottom: 2px;
  font-size: 0.72rem;
  color: #6a7588;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .steam-row-body {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .steam-row-cap {
    flex: 0 0 clamp(140px, 42vw, 220px);
    width: clamp(140px, 42vw, 220px);
    max-height: none;
  }

  .steam-row-pricing {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 10px;
  }

  .steam-row-date {
    position: static;
  }
}

/* —— Вход / регистрация: по центру, широкая карточка —— */
.page-auth .site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: min(72vh, 880px);
  padding-top: clamp(20px, 4vw, 40px);
  padding-bottom: clamp(36px, 7vw, 72px);
}

.auth-page {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-page-inner {
  width: 100%;
  max-width: min(100%, 540px);
}

.panel-auth {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 42px) clamp(26px, 5vw, 48px);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(155deg, rgba(255, 77, 46, 0.06) 0%, transparent 42%),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 28px 72px rgba(0, 0, 0, 0.42);
}

.auth-kicker {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 4.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.auth-lead {
  margin: 0 0 26px;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 38rem;
}

.form-auth {
  gap: 18px;
}

.form-auth .field span {
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.form-auth .field input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 16, 0.72);
}

.form-auth .field input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: rgba(255, 77, 46, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-auth .field-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  flex-shrink: 0;
  margin: 0.2rem 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  box-shadow: none;
}

.form-auth .field.field-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.form-auth .field-checkbox span {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.btn-auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 24px;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 12px;
  min-height: 52px;
}

.auth-footer {
  margin: 24px 0 0;
  text-align: center;
  font-size: 0.93rem;
  line-height: 1.5;
}

.auth-footer a {
  font-weight: 600;
}

.auth-alert a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel-auth .alert {
  margin: 0 0 18px;
}

.panel-auth .alert:last-of-type {
  margin-bottom: 18px;
}

/* ═══════════════════════════════════════════════
   Hamburger toggle button (hidden on desktop)
   ═══════════════════════════════════════════════ */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.77, 0, 0.18, 1),
              opacity 0.25s ease;
  transform-origin: center;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* — Overlay backdrop — */
.nav-overlay {
  display: none;
}

/* — Body scroll lock — */
body.nav-lock {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: ≤ 768px (tablet / mobile)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* — Hamburger visible — */
  .nav-toggle {
    display: flex;
    order: 2;
    z-index: 1002;
  }

  .site-header {
    position: relative;
    padding: 14px 0 14px;
  }

  .brand {
    order: 1;
    flex: 1;
  }

  /* — Dark overlay — */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* — Slide-in panel from right — */
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 82vw);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 80px 28px 32px;
    background: linear-gradient(180deg, #0c1018 0%, #0a0e16 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 72px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--muted);
    border-radius: 12px;
    border-bottom: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
  }

  .nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transform: translateX(4px);
    text-decoration: none;
  }

  .nav a.is-active {
    color: var(--text);
    background: rgba(255, 77, 46, 0.1);
    border-bottom: none;
  }

  .nav a.is-active::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
  }

  /* — Staggered fade-in for links — */
  .nav.is-open a,
  .nav.is-open .nav-balance {
    animation: navSlideIn 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
  }

  .nav.is-open > :nth-child(1) { animation-delay: 0.06s; }
  .nav.is-open > :nth-child(2) { animation-delay: 0.10s; }
  .nav.is-open > :nth-child(3) { animation-delay: 0.14s; }
  .nav.is-open > :nth-child(4) { animation-delay: 0.18s; }
  .nav.is-open > :nth-child(5) { animation-delay: 0.22s; }
  .nav.is-open > :nth-child(6) { animation-delay: 0.26s; }
  .nav.is-open > :nth-child(7) { animation-delay: 0.30s; }

  @keyframes navSlideIn {
    from {
      opacity: 0;
      transform: translateX(24px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-balance {
    align-self: flex-start;
    margin-top: 16px;
  }

  /* — Layout padding — */
  .layout {
    padding: 0 16px 32px;
  }

  /* — Hero — */
  .hero {
    margin-bottom: 28px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero-lead {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  .btn-launcher.btn-launcher-hero {
    padding: 14px 18px;
    min-height: 52px;
    font-size: 0.95rem;
  }

  .btn-launcher-label-main {
    font-size: 1rem;
  }

  /* — Panel — */
  .panel {
    padding: 18px 16px;
  }

  /* — News — */
  .news-item h3 {
    font-size: 0.95rem;
  }

  /* — Site footer — */
  .site-footer {
    margin-top: 32px;
    padding-top: 16px;
  }

  .site-footer p {
    font-size: 0.78rem;
    line-height: 1.7;
  }

  /* — Game detail — */
  .game-detail-banner-wrap {
    aspect-ratio: 3 / 1;
    border-radius: 10px;
  }

  .game-detail-head {
    margin-top: -36px;
    gap: 14px;
  }

  .game-detail-icon-img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .game-detail-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .game-detail-body,
  .game-detail-body-v2 {
    padding: 18px 16px;
  }

  .game-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .game-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* — Store rows (Steam style) — */
  .steam-row-body {
    padding: 10px 12px 12px;
    gap: 12px;
  }

  .steam-row-title {
    font-size: 1.05rem;
  }

  /* — Admin — */
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    gap: 4px;
    padding: 3px;
  }

  .admin-tab {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  /* — Account — */
  .page-account .panel-account,
  .page-account .panel-library {
    padding: 22px 18px;
  }

  .account-hero-title {
    font-size: clamp(1.3rem, 5vw, 1.7rem);
  }

  .account-meta-grid {
    grid-template-columns: 1fr;
  }

  /* — Auth pages — */
  .panel-auth {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  .auth-title {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
  }

  /* — Upload cards — */
  .upload-card {
    padding: 20px 16px 18px;
  }

  .upload-preview {
    flex-direction: column;
  }

  .upload-preview-img--banner,
  .upload-placeholder--banner {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: ≤ 480px (small phones)
   ═══════════════════════════════════════════════ */
@media (max-width: 480px) {

  .layout {
    padding: 0 12px 24px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
  }

  .hero-glow {
    display: none;
  }

  .hero-lead {
    font-size: 0.88rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-launcher.btn-launcher-hero {
    padding: 12px 14px;
    min-height: 48px;
  }

  .btn-launcher-hero-icon {
    width: 22px;
    height: 22px;
  }

  .panel {
    padding: 16px 14px;
    border-radius: 10px;
  }

  .panel-head h2 {
    font-size: 1rem;
  }

  .news-item {
    padding: 14px 0;
  }

  .news-item h3 {
    font-size: 0.9rem;
  }

  .news-item p {
    font-size: 0.88rem;
  }

  .admin-analytics {
    grid-template-columns: 1fr;
  }

  .admin-mini-grid {
    grid-template-columns: 1fr;
  }

  .chart-bar-container {
    height: 120px;
  }

  .chart-bar-fill {
    max-width: 8px;
  }

  .chart-bar-label {
    font-size: 0.5rem;
  }

  .chart-bar-y-axis {
    font-size: 0.56rem;
    min-width: 22px;
    padding-right: 6px;
  }

  .chart-hbar-head {
    flex-direction: column;
    gap: 2px;
  }

  .admin-table-scroll {
    margin: 0 -16px;
    padding: 0 16px;
  }

  /* Footer compact */
  .site-footer p {
    font-size: 0.72rem;
    line-height: 1.8;
  }

  /* Store cards */
  .store-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }

  /* Game detail */
  .game-detail-head {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -28px;
  }

  .game-detail-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .game-detail-art,
  .game-detail-art--solo {
    width: 64px !important;
    height: 64px !important;
    border-radius: 14px;
    font-size: 1rem;
  }

  .game-detail-meta {
    gap: 8px;
  }

  .game-detail-fact {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  /* Steam rows on very small */
  .steam-row-cap {
    flex: 0 0 100%;
    width: 100%;
  }

  .steam-row-body {
    flex-direction: column;
    padding: 8px 10px 10px;
  }

  .steam-row-info {
    gap: 6px;
  }

  .steam-row-pricing {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 4px 0 6px;
  }

  /* Admin */
  .admin-hero-title {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }

  .admin-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  /* Account */
  .page-account .panel-account,
  .page-account .panel-library {
    padding: 18px 14px;
    border-radius: var(--radius);
  }

  .account-hero::before {
    display: none;
  }

  .account-hero-kicker,
  .account-hero-title {
    padding-left: 0;
  }

  .library-panel-head h2 {
    font-size: 1.1rem;
  }

  /* Auth */
  .panel-auth {
    padding: 22px 16px;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .btn-auth-submit {
    padding: 12px 20px;
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* Upload */
  .upload-card {
    padding: 16px 12px 14px;
  }

  .upload-dropzone {
    padding: 18px 14px;
  }

  .upload-build-row {
    grid-template-columns: 1fr;
  }

  /* 404 page */
  .err404-layout {
    padding: 20px 16px 24px;
  }

  .err404-title {
    font-size: clamp(4rem, 20vw, 6rem);
  }

  .err404-lead {
    font-size: 0.92rem;
  }

  .err404-actions {
    flex-direction: column;
    width: 100%;
  }

  .err404-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════
   Public Profile Page
   ═══════════════════════════════════════════════ */

.panel-profile {
  padding: 0;
  overflow: hidden;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(255, 77, 46, 0.08) 0%, rgba(18, 22, 32, 0.6) 100%);
}

.profile-avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff7b5e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(255, 77, 46, 0.25);
}

.profile-avatar-text {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-transform: uppercase;
}

.profile-hero-info {
  flex: 1;
  min-width: 0;
}

.profile-hero-name {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text);
  line-height: 1.2;
}

.profile-hero-username {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.profile-meta-item {
  font-size: 0.88rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-own-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 40px;
  background: rgba(255, 77, 46, 0.06);
  border-top: 1px solid var(--border);
}

.profile-own-badge {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.panel-profile-library {
  margin-top: 24px;
}

.library-panel-head {
  margin-bottom: 18px;
}

.library-panel-head h2 {
  margin: 0 0 4px;
}

.library-panel-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

@media (max-width: 768px) {
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
    gap: 18px;
  }

  .profile-hero-meta {
    justify-content: center;
  }

  .profile-own-bar {
    flex-direction: column;
    text-align: center;
    padding: 14px 20px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .profile-avatar {
    width: 72px;
    height: 72px;
  }

  .profile-avatar-text {
    font-size: 1.8rem;
  }

  .profile-hero-name {
    font-size: 1.35rem;
  }
}

/* ═══════════════════════════════════════════════
   Touch-friendly: increase tap targets
   ═══════════════════════════════════════════════ */
@media (pointer: coarse) {
  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 38px;
  }

  .admin-tab {
    min-height: 42px;
  }
}
