/* ══════════════════════════════════════════════
   Arcade Hub — Design System & Hub Styles
   ══════════════════════════════════════════════ */

:root {
  --bg-color: #fff7e8;
  --card-bg: rgba(255, 252, 245, 0.74);
  --card-bg-hover: rgba(255, 246, 231, 0.92);
  --primary: #f06537;
  --secondary: #ff9960;
  --accent: #f06537;
  --text-main: #34241e;
  --text-muted: #876653;
  --glass-border: #efd9b8;
  --glass-border-hover: #efbd87;
  --radius-card: 20px;
  --radius-pill: 100px;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --home-warm-bg: #fff7e8;
  --home-warm-ink: #2f2630;
  --home-warm-muted: #7a6471;
  --home-warm-line: rgba(128, 86, 96, 0.16);
  --home-warm-surface: rgba(255, 255, 255, 0.72);
  --home-warm-shadow: 0 24px 70px rgba(98, 57, 45, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  background:
    linear-gradient(180deg, #fff6e7 0%, #ffeef5 42%, #ecfbff 100%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 232, 182, 0.86), transparent 38%),
    linear-gradient(260deg, rgba(207, 247, 255, 0.72), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 238, 245, 0.22));
}

/* ── Page Transitions ── */

body.page-enter {
  opacity: 0;
}

body.page-enter-active {
  opacity: 1;
  transition: opacity 0.25s ease-out;
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
}

.transition-overlay.active {
  pointer-events: all;
  animation: overlay-expand 0.35s var(--ease-out-expo) forwards;
}

@keyframes overlay-expand {
  from {
    opacity: 1;
    clip-path: circle(0% at var(--cx) var(--cy));
  }
  to {
    opacity: 1;
    clip-path: circle(var(--max-r) at var(--cx) var(--cy));
  }
}

/* ── Background ── */

.blob-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 199, 97, 0.16), transparent 36%),
    linear-gradient(230deg, rgba(93, 214, 232, 0.14), transparent 42%),
    linear-gradient(0deg, rgba(251, 113, 133, 0.08), transparent 54%);
  filter: blur(70px);
}

/* ── Header ── */

header {
  padding: 1rem 5%;
  background: rgba(255, 249, 238, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--home-warm-line);
  color: var(--home-warm-ink);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(132, 82, 41, 0.14);
}

.logo span {
  color: #df6e48;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sound-toggle {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--home-warm-line);
  color: var(--home-warm-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-toggle::before {
  content: "";
  width: 22px;
  height: 22px;
  background: center / contain no-repeat;
}

.sound-toggle.sound-on::before {
  background-image: url("hub/assets/ui-icons/sound-on.webp");
}

.sound-toggle.sound-off::before {
  background-image: url("hub/assets/ui-icons/sound-off.webp");
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(223, 110, 72, 0.32);
}

.arcade-coins {
  font-weight: 800;
  color: #8c5315;
  background: rgba(255, 224, 142, 0.62);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(201, 132, 33, 0.22);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
}

/* ── Language Picker ── */

.lang-picker-wrap {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(255, 249, 238, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(128, 86, 96, 0.16);
  border-radius: 12px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-option {
  background: none;
  border: none;
  color: var(--home-warm-muted, #7a6471);
  font-family: "Outfit", sans-serif;
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
  background: rgba(223, 110, 72, 0.08);
  color: var(--home-warm-ink, #2f2630);
}

.lang-option.active {
  color: #df6e48;
  background: rgba(223, 110, 72, 0.1);
}

/* ── Main Layout ── */

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 3rem) 5% clamp(2.5rem, 5vw, 4.5rem);
}

/* ── Hero ── */

.hero {
  text-align: left;
  margin-bottom: clamp(1.1rem, 2vw, 1.65rem);
}

.home-shell {
  color: var(--home-warm-ink);
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  min-height: clamp(360px, 56vh, 560px);
  padding: clamp(1.4rem, 4vw, 3.2rem);
  overflow: hidden;
  border: 1px solid rgba(143, 94, 69, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 242, 219, 0.58) 42%, rgba(220, 250, 255, 0.5)),
    linear-gradient(90deg, rgba(255, 201, 97, 0.24), rgba(255, 132, 158, 0.1));
  box-shadow: var(--home-warm-shadow);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.5), transparent);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: 0;
  max-width: 760px;
  color: var(--home-warm-ink);
}

.gradient-text {
  display: block;
  background: linear-gradient(135deg, #df6e48, #ef7d9f 48%, #16a8be);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--home-warm-muted);
  max-width: 540px;
  margin: 0;
  line-height: 1.5;
}

.hero-showcase {
  position: relative;
  z-index: 1;
  min-height: 330px;
}

.hero-stage-card {
  position: absolute;
  display: grid;
  align-content: end;
  overflow: hidden;
  border: 1px solid rgba(115, 78, 76, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 234, 207, 0.7)),
    linear-gradient(35deg, rgba(255, 197, 85, 0.24), rgba(114, 222, 238, 0.18));
  box-shadow: 0 18px 46px rgba(117, 72, 56, 0.16);
}

.hero-stage-card strong,
.hero-stage-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.hero-stage-card strong {
  color: #33242e;
  font-size: 1.2rem;
  font-weight: 900;
}

.hero-stage-card em {
  margin-top: 0.25rem;
  color: #82616c;
  font-size: 0.86rem;
  font-style: normal;
}

.hero-stage-card-main {
  inset: 16px 34px 28px 0;
  padding: 1.35rem;
}

.hero-stage-card-main::before {
  content: "";
  position: absolute;
  inset: 16px 18px 86px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.66), rgba(255,255,255,.12)),
    url("games/shared/assets/warm-card-covers/synth-slicer.webp") center / contain no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.hero-stage-card-side {
  right: 0;
  bottom: 0;
  width: min(52%, 230px);
  min-height: 160px;
  padding: 1rem;
  transform: translateY(18px);
}

.hero-stage-card-side::before {
  content: "";
  position: absolute;
  inset: 12px 12px 70px;
  border-radius: 14px;
  background: url("games/shared/assets/warm-card-covers/micro-kingdom.webp") center / contain no-repeat;
}

.hero-stage-light {
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%);
}

.hero-stage-token {
  position: absolute;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, #ffe4a8, #fcb5c7 52%, #9be7f1);
  box-shadow: 0 14px 30px rgba(119, 72, 58, 0.16);
}

.hero-stage-token-a {
  width: 72px;
  height: 72px;
  right: 30px;
  top: 0;
  transform: rotate(8deg);
}

.hero-stage-token-b {
  width: 52px;
  height: 52px;
  left: 24px;
  bottom: 12px;
  transform: rotate(-10deg);
}

/* ── Platform Dashboard ── */

.challenge-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent, #fbbf24) 36%, transparent);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--accent, #fbbf24) 20%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

.home-command-band {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.85rem;
  margin: clamp(1rem, 2vw, 1.35rem) 0 clamp(1.25rem, 3vw, 2rem);
  padding: 0;
}

.home-command-band > section {
  flex: 1 1 280px;
  min-width: 0;
}

.home-command-band > section:empty,
.home-command-band > section[style*="display: none"] {
  display: none;
}

.challenge-banner[hidden] {
  display: none;
}

.challenge-banner-body {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.challenge-banner-body strong {
  color: var(--text-main);
  font-size: 1rem;
}

.challenge-banner-body span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.challenge-banner-play {
  flex: 0 0 auto;
  border: none;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  background: var(--accent, #fbbf24);
  color: #04121a;
  cursor: pointer;
  font-weight: 800;
}

.platform-dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.26fr);
  gap: 1rem;
  margin-bottom: clamp(1.35rem, 3vw, 2.2rem);
}

.dash-snapshot,
.dash-row-block,
.dash-highlights,
.dash-activity,
.dash-missions,
.dash-friend-activity {
  border: 1px solid rgba(128, 86, 96, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 230, 0.48)),
    linear-gradient(45deg, rgba(255, 196, 61, 0.1), rgba(101, 210, 226, 0.08));
  box-shadow: 0 16px 42px rgba(98, 57, 45, 0.08);
}

.dash-snapshot {
  padding: 1.15rem;
  min-width: 0;
}

.dash-kicker,
.dash-section-title {
  color: #b56b25;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dash-welcome {
  margin: 0.3rem 0 0.85rem;
  color: var(--home-warm-ink);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.08;
}

.dash-level-meter {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(128, 86, 96, 0.12);
}

.dash-level-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #fb7185, #22d3ee);
}

.dash-snapshot-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.dash-snapshot-stat {
  min-width: 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(128, 86, 96, 0.12);
}

.dash-snapshot-value,
.dash-snapshot-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-snapshot-value {
  color: var(--home-warm-ink);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-snapshot-label {
  margin-top: 0.2rem;
  color: var(--home-warm-muted);
  font-size: 0.74rem;
}

.dash-game-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.dash-row-block,
.dash-highlights,
.dash-activity,
.dash-missions,
.dash-friend-activity {
  min-width: 0;
  padding: 1rem;
}

.dash-snapshot {
  min-height: 100%;
}

.dash-section-title {
  margin-bottom: 0.75rem;
}

.dash-game-list {
  display: grid;
  gap: 0.55rem;
}

.dash-daily-mix {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  min-height: 78px;
  margin-bottom: 0.65rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--accent, #fbbf24) 30%, rgba(128, 86, 96, 0.16));
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--accent, #fbbf24) 22%, transparent), transparent 36%),
    rgba(255, 255, 255, 0.46);
  color: var(--home-warm-ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    transform var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.dash-daily-mix:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #fbbf24) 58%, transparent);
  background: rgba(255, 255, 255, 0.72);
}

.dash-daily-mix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent, #fbbf24);
  color: #101018;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent, #fbbf24) 28%, transparent);
}

.dash-daily-mix-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dash-daily-mix-kicker,
.dash-daily-mix-title,
.dash-daily-mix-sub {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-daily-mix-kicker {
  color: var(--accent, #fbbf24);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-daily-mix-title {
  color: var(--home-warm-ink);
  font-weight: 900;
}

.dash-daily-mix-sub {
  color: var(--home-warm-muted);
  font-size: 0.74rem;
}

.dash-game {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 62px;
  padding: 0.65rem;
  border: 1px solid rgba(128, 86, 96, 0.12);
  border-left: 3px solid var(--accent, #fbbf24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--home-warm-ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    transform var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.dash-game:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #fbbf24) 52%, transparent);
  background: rgba(255, 255, 255, 0.72);
}

.dash-game-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 32%),
    color-mix(in srgb, var(--accent, #fbbf24) 30%, rgba(255, 255, 255, 0.08));
  color: #160f18;
  font-weight: 900;
}

.dash-game-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dash-game-name,
.dash-game-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-game-name {
  color: var(--home-warm-ink);
  font-weight: 800;
}

.dash-game-sub {
  color: var(--home-warm-muted);
  font-size: 0.76rem;
}

.dash-play {
  color: #b56b25;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dash-lower {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
}

.dash-mission-list,
.dash-friend-list {
  display: grid;
  gap: 0.65rem;
}

.dash-mission {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 86px;
  padding: 0.75rem;
  border: 1px solid rgba(128, 86, 96, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.dash-mission.complete {
  border-color: rgba(52, 211, 153, 0.32);
}

.dash-mission-body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.dash-mission-title,
.dash-mission-sub,
.dash-mission-progress {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-mission-title {
  color: var(--home-warm-ink);
  font-weight: 800;
}

.dash-mission-sub,
.dash-mission-progress {
  color: var(--home-warm-muted);
  font-size: 0.74rem;
}

.dash-mission-progress {
  color: #b56b25;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-mission-meter {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(128, 86, 96, 0.12);
}

.dash-mission-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #22d3ee);
}

.dash-mission-claim {
  min-width: 76px;
  min-height: 34px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
}

.dash-mission-claim:disabled {
  cursor: default;
  opacity: 0.5;
}

.dash-friend-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 54px;
}

.dash-friend-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.dash-highlight-strip {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.dash-highlight-strip::-webkit-scrollbar {
  display: none;
}

.dash-highlight-chip {
  min-width: 180px;
  max-width: 220px;
  padding: 0.75rem;
  border: 1px solid rgba(128, 86, 96, 0.14);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 238, 188, 0.62), rgba(255, 221, 232, 0.42));
}

.dash-highlight-title,
.dash-highlight-sub,
.dash-highlight-score {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-highlight-title {
  color: var(--home-warm-ink);
  font-weight: 800;
}

.dash-highlight-sub {
  margin-top: 0.15rem;
  color: var(--home-warm-muted);
  font-size: 0.76rem;
}

.dash-highlight-score {
  margin-top: 0.45rem;
  color: #b56b25;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-activity-list {
  display: grid;
  gap: 0.55rem;
}

.dash-activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.dash-activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: #df6e48;
  box-shadow: 0 0 12px rgba(223, 110, 72, 0.34);
}

.dash-activity-text {
  min-width: 0;
}

.dash-activity-title,
.dash-activity-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-activity-title {
  color: var(--home-warm-ink);
  font-weight: 700;
}

.dash-activity-sub {
  color: var(--home-warm-muted);
  font-size: 0.76rem;
}

.dash-empty {
  color: var(--home-warm-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ── Stats Strip ── */

.stats-strip {
  display: flex;
  gap: 1px;
  background: rgba(128, 86, 96, 0.12);
  border: 1px solid rgba(128, 86, 96, 0.1);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 0;
  min-height: 100%;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.5);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--home-warm-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--home-warm-ink);
}

/* ── Filter Bar ── */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.2rem, 2.5vw, 1.8rem);
  flex-wrap: wrap;
}

.home-discovery {
  position: relative;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid rgba(128, 86, 96, 0.13);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 20px 58px rgba(98, 57, 45, 0.08);
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(128, 86, 96, 0.14);
  color: var(--home-warm-muted);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--duration-fast),
    color var(--duration-fast),
    border-color var(--duration-fast);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--home-warm-ink);
}

.filter-chip.active {
  background: #2f2630;
  border-color: #2f2630;
  color: #fff9ee;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  pointer-events: none;
}

.search-input {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(128, 86, 96, 0.14);
  color: var(--home-warm-ink);
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  width: 200px;
  outline: none;
  transition:
    border-color var(--duration-fast),
    width var(--duration-normal);
}

.search-input::placeholder {
  color: var(--home-warm-muted);
}

.search-input:focus {
  border-color: rgba(223, 110, 72, 0.4);
  width: 260px;
}

/* ── Card Sections ── */

.card-section {
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.section-heading {
  font-size: 1rem;
  font-weight: 900;
  color: var(--home-warm-ink);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 1.25rem;
  padding-left: 2px;
}

/* ── Horizontal Scroll Section ── */

.game-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 2px 10px;
  margin: -8px -2px 0;
}

.game-scroll::-webkit-scrollbar {
  display: none;
}

.game-scroll .game-card {
  width: clamp(216px, 22vw, 248px);
  min-width: clamp(216px, 22vw, 248px);
  flex-shrink: 0;
  padding: 1rem;
  border-radius: 16px;
}

.game-scroll .card-top-row {
  margin-bottom: 0.65rem;
}

.game-scroll .category-pill {
  font-size: 0.58rem;
  padding: 2px 8px;
  letter-spacing: 1px;
}

.game-scroll .card-actions {
  gap: 4px;
}

.game-scroll .info-toggle,
.game-scroll .fav-toggle {
  width: 24px;
  height: 24px;
}

.game-scroll .card-cover {
  aspect-ratio: 1.72;
  border-radius: 12px;
  margin: -0.05rem 0 0.7rem;
  box-shadow:
    0 10px 20px rgba(122, 74, 58, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.game-scroll .card-cover-canvas::before {
  inset: 9px;
  border-radius: 10px;
}

.game-scroll .card-cover .game-icon-canvas,
.game-scroll .game-card.art-feature .card-cover .game-icon-canvas {
  width: min(38%, 82px);
  border-radius: 16px;
}

.game-scroll .game-icon-canvas {
  width: 52px;
  height: 52px;
  margin-bottom: 0.55rem;
}

.game-scroll .game-card h3 {
  font-size: 1rem;
  margin-bottom: 0.28rem;
}

.game-scroll .card-tagline {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
}

.game-scroll .stats-ribbon {
  gap: 0.5rem;
  padding-top: 0.55rem;
  flex-wrap: wrap;
}

.game-scroll .stats-ribbon .stat {
  font-size: 0.66rem;
}

/* ── Game Grid ── */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: 1.25rem;
}

/* ── Game Card ── */

.game-card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(128, 86, 96, 0.13);
  border-left: 3px solid var(--accent, var(--primary));
  border-radius: var(--radius-card);
  padding: 1.5rem;
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal),
    border-color var(--duration-normal),
    box-shadow var(--duration-normal);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.game-card:focus-visible {
  outline: 2px solid var(--accent, var(--primary));
  outline-offset: 3px;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    color-mix(in oklch, var(--accent) 8%, transparent) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--duration-normal);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(223, 110, 72, 0.28);
  box-shadow:
    0 18px 48px rgba(98, 57, 45, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px -6px color-mix(in oklch, var(--accent) 20%, transparent);
}

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

.game-card.recently-played {
  border-left-color: var(--accent, #6366f1);
  box-shadow:
    0 16px 42px -24px color-mix(in oklch, var(--accent) 42%, transparent);
}

.game-card.art-feature {
  --syn-card-ink: #2a2140;
  --syn-card-muted: #6b4e76;
  background:
    radial-gradient(circle at 18% 82%, rgba(86, 214, 232, 0.28), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 143, 184, 0.3), transparent 30%),
    linear-gradient(145deg, #fff7d8 0%, #e4fbff 52%, #ffe1ee 100%);
  border-color: rgba(255, 151, 92, 0.24);
  border-left-color: #ffc43d;
  box-shadow:
    0 14px 38px rgba(255, 196, 61, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset;
}

.game-card.art-feature::before {
  opacity: 1;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.8) 0 8%, transparent 18%),
    radial-gradient(circle at 78% 72%, rgba(255, 196, 61, 0.28) 0 12%, transparent 26%);
}

.game-card.art-feature:hover {
  background:
    radial-gradient(circle at 18% 82%, rgba(86, 214, 232, 0.34), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 143, 184, 0.36), transparent 32%),
    linear-gradient(145deg, #fff9df 0%, #dbfbff 52%, #ffdce9 100%);
  border-color: rgba(255, 151, 92, 0.4);
  box-shadow:
    0 18px 48px rgba(255, 143, 184, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.54) inset,
    0 0 28px -10px rgba(34, 199, 232, 0.8);
}

.game-card.art-feature .category-pill {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 151, 92, 0.26);
  color: #6b4e76;
}

.game-card.art-feature .info-toggle,
.game-card.art-feature .fav-toggle {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 151, 92, 0.22);
  color: #6b4e76;
}

.game-card.art-feature .game-icon-canvas {
  width: 112px;
  height: 112px;
  margin: -0.2rem auto 0.9rem;
  border-radius: 18px;
  box-shadow:
    0 14px 32px rgba(34, 199, 232, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.game-card.art-feature h3 {
  color: var(--syn-card-ink);
  text-align: center;
}

.game-card.art-feature .card-tagline {
  color: var(--syn-card-muted);
  text-align: center;
}

.game-card.art-feature .stats-ribbon {
  justify-content: center;
  border-top-color: rgba(107, 78, 118, 0.14);
}

.game-card.art-feature .stats-ribbon .stat {
  color: rgba(42, 33, 64, 0.68);
}

.game-card.warm-cover-card {
  --warm-card-ink: #3a2441;
  --warm-card-muted: #7e5f75;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 82% 88%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    linear-gradient(145deg, #fff4d8 0%, #fce1e8 44%, #d9f8ff 100%);
  border-color: rgba(255, 166, 92, 0.32);
  border-left-color: #ffc43d;
  box-shadow:
    0 18px 44px rgba(255, 166, 92, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.54) inset;
}

.game-card.warm-cover-card::before {
  opacity: 1;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.32), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(255, 210, 63, 0.32) 0 10%, transparent 24%);
}

.game-card.warm-cover-card:hover {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.82), transparent 28%),
    radial-gradient(circle at 82% 88%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 36%),
    linear-gradient(145deg, #fff7df 0%, #ffdfe9 44%, #d4fbff 100%);
  border-color: rgba(255, 166, 92, 0.48);
  box-shadow:
    0 22px 56px rgba(255, 143, 110, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.66) inset,
    0 0 30px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.game-card.warm-cover-card .category-pill {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(128, 86, 96, 0.16);
  color: #70506a;
  box-shadow: 0 4px 12px rgba(122, 74, 58, 0.08);
}

.game-card.warm-cover-card .info-toggle,
.game-card.warm-cover-card .fav-toggle {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(128, 86, 96, 0.16);
  color: #70506a;
  box-shadow: 0 4px 12px rgba(122, 74, 58, 0.08);
}

.game-card.warm-cover-card h3 {
  color: var(--warm-card-ink);
  text-align: left;
}

.game-card.warm-cover-card .card-tagline {
  color: var(--warm-card-muted);
  text-align: left;
}

.game-card.warm-cover-card .stats-ribbon {
  border-top-color: rgba(85, 57, 73, 0.13);
}

.game-card.warm-cover-card .stats-ribbon .stat {
  color: rgba(58, 36, 65, 0.7);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1.48;
  border-radius: 16px;
  overflow: hidden;
  margin: -0.15rem 0 1rem;
  background: linear-gradient(135deg, #ffe9ba, #c9f6ff);
  box-shadow:
    0 16px 30px rgba(122, 74, 58, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
}

.card-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.card-cover-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
    radial-gradient(circle at 74% 72%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34%),
    linear-gradient(135deg, #fff1c8 0%, #ffe3ef 46%, #c9f7ff 100%);
}

.card-cover-canvas::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.46), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 8px 24px rgba(122, 74, 58, 0.09) inset,
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.card-cover .game-icon-canvas,
.game-card.art-feature .card-cover .game-icon-canvas {
  position: relative;
  z-index: 1;
  width: min(42%, 112px);
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 16px 32px rgba(122, 74, 58, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.game-card.micro-cover-card .card-cover {
  aspect-ratio: 1.04;
  padding: 7px;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 76% 72%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 34%),
    linear-gradient(135deg, #fff0c9 0%, #ffe4f0 48%, #d4fbff 100%);
}

.game-card.micro-cover-card .card-cover img {
  border-radius: 12px;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.72), transparent 42%),
    linear-gradient(135deg, #fff6df 0%, #ffe8ef 48%, #ddfbff 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .58) inset;
}

.game-card.micro-cover-card .card-cover-canvas::before {
  background:
    radial-gradient(circle at 45% 45%, rgba(255,255,255,0.34), transparent 18%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08));
}

.game-card.micro-cover-card .card-cover .game-icon-canvas {
  width: min(48%, 122px);
  filter: drop-shadow(0 14px 18px color-mix(in srgb, var(--accent) 28%, transparent));
}

.game-card.warm-cover-card:hover .card-cover img {
  transform: scale(1.025);
}

.game-card.warm-cover-card:hover .card-cover .game-icon-canvas {
  transform: scale(1.05);
}

.card-cover-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.45), transparent 36%),
    linear-gradient(to top, rgba(58, 36, 65, 0.18), transparent 42%);
  mix-blend-mode: screen;
}

.card-inner {
  position: relative;
  z-index: 1;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: color-mix(in srgb, var(--pill-color, #7a6471) 70%, #3a2441);
  background: color-mix(in oklch, var(--pill-color, #94a3b8) 10%, transparent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in oklch, var(--pill-color, #94a3b8) 20%, transparent);
  line-height: 1.1;
  text-align: center;
}

.fav-toggle {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(128, 86, 96, 0.12);
  color: var(--home-warm-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--duration-fast), transform var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-toggle:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.fav-toggle.active {
  color: #fbbf24;
}

.game-icon-canvas {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
}

.game-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.card-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.stats-ribbon {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.stats-ribbon .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* ── Header Icon Buttons ── */

.header-icon-btn {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--home-warm-line);
  color: var(--home-warm-muted);
  font-size: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: center / 100% 100% no-repeat;
  vertical-align: middle;
}

.ui-icon-home { background-image: url("hub/assets/ui-icons/home.webp"); }
.ui-icon-challenges { background-image: url("hub/assets/ui-icons/challenges.webp"); }
.ui-icon-leaderboards { background-image: url("hub/assets/ui-icons/leaderboards.webp"); }
.ui-icon-achievements { background-image: url("hub/assets/ui-icons/achievements.webp"); }
.ui-icon-all-games { background-image: url("hub/assets/ui-icons/all-games.webp"); }
.ui-icon-play-later { background-image: url("hub/assets/ui-icons/play-later.webp"); }
.ui-icon-favorites { background-image: url("hub/assets/ui-icons/favorites.webp"); }
.ui-icon-owned { background-image: url("hub/assets/ui-icons/owned.webp"); }
.ui-icon-rewards { background-image: url("hub/assets/ui-icons/rewards.webp"); }
.ui-icon-settings { background-image: url("hub/assets/ui-icons/settings.webp"); }
.ui-icon-coins { background-image: url("hub/assets/ui-icons/coins.webp"); }
.ui-icon-gems { background-image: url("hub/assets/ui-icons/gems.webp"); }
.ui-icon-profile { background-image: url("hub/assets/ui-icons/profile.webp"); }
.ui-icon-language { background-image: url("hub/assets/ui-icons/language.webp"); }
.ui-icon-rating { background-image: url("hub/assets/ui-icons/rating.webp"); }
.ui-icon-time-played { background-image: url("hub/assets/ui-icons/time-played.webp"); }

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(223, 110, 72, 0.32);
  transform: scale(1.08);
}

/* ── Modal Overlay ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(57, 38, 29, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(154, 216, 239, 0.2), transparent 34%),
    linear-gradient(180deg, #fffdf7 0%, #fff4e5 100%);
  border: 1px solid #ead3b4;
  border-radius: var(--radius-card);
  color: #372720;
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #372720;
}

.modal-close {
  background: #fff4e5;
  border: 1px solid #efd7b7;
  color: #8b6855;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.modal-close:hover {
  color: #f06537;
  background: #ffe8cf;
}

/* ── Highlight Feed ── */

.highlight-feed-panel {
  width: min(94vw, 860px);
  max-width: 860px;
  box-shadow: 0 30px 90px rgba(89, 53, 36, 0.18);
}

.highlight-feed-body {
  display: grid;
  gap: 1rem;
}

.highlight-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.highlight-filter-reset,
.highlight-filter-pin,
.highlight-select-button {
  min-height: 38px;
  border: 1px solid #efd9b8;
  border-radius: 12px;
  background: #fffaf2;
  color: #3f2c24;
  font-family: inherit;
  font-size: 0.82rem;
}

.highlight-filter-reset,
.highlight-filter-pin {
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.highlight-filter-reset:hover,
.highlight-filter-pin:hover,
.highlight-filter-pin.active {
  border-color: rgba(251, 191, 36, 0.42);
  background: #ffe6c2;
}

.highlight-filter-reset:hover,
.highlight-filter-pin:hover {
  transform: translateY(-1px);
}

.highlight-select {
  position: relative;
  min-width: 170px;
  z-index: 2;
}

.highlight-select-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(126, 83, 44, 0.05);
}

.highlight-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #c46b42;
  border-bottom: 2px solid #c46b42;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--duration-fast);
}

.highlight-select.open .highlight-select-button::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.highlight-select-button:focus-visible {
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.14);
}

.highlight-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: #fffaf2;
  box-shadow: 0 18px 42px rgba(85, 50, 24, 0.14);
}

.highlight-select.open .highlight-select-menu {
  display: grid;
  gap: 4px;
}

.highlight-select-option {
  width: 100%;
  min-height: 34px;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3f2c24;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
}

.highlight-select-option:hover,
.highlight-select-option.active {
  background: #ffe7c3;
  color: #c5542e;
}

.highlight-feed-list {
  display: grid;
  gap: 0.7rem;
}

.highlight-feed-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(240, 101, 55, 0.1), transparent 32%),
    rgba(255, 252, 245, 0.74);
  border-color: #efd9b8;
  box-shadow: 0 12px 28px rgba(124, 82, 45, 0.06);
}

.highlight-feed-row.pinned {
  border-color: rgba(251, 191, 36, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.045);
}

.highlight-feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f06537, #ff9a62);
  color: #fff;
}

.highlight-feed-row-body,
.profile-highlight-body {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.highlight-feed-row-title,
.highlight-feed-row-meta,
.highlight-feed-row-sub,
.profile-highlight-title,
.profile-highlight-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-feed-row-title,
.profile-highlight-title {
  color: #34241e;
  font-weight: 800;
}

.highlight-feed-row-meta,
.highlight-feed-row-sub,
.profile-highlight-meta {
  color: #876653;
  font-size: 0.75rem;
}

.highlight-feed-score {
  color: #f06537;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  white-space: nowrap;
}

.highlight-feed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.highlight-feed-actions button,
.profile-highlight-share {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  border: 1px solid #efcfaa;
  border-radius: 10px;
  background: #fff4e5;
  color: #b6532d;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast);
}

.highlight-feed-actions button:hover,
.profile-highlight-share:hover {
  border-color: #efbd87;
  background: #ffe5cc;
}

.highlight-feed-actions .danger {
  color: #d44434;
}

.highlight-feed-actions .danger:hover {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.highlight-feed-empty {
  display: grid;
  gap: 0.35rem;
  padding: 2rem 1rem;
  border: 1px dashed #e8cba8;
  border-radius: 14px;
  color: #876653;
  background: #fff8ed;
  text-align: center;
}

.highlight-feed-empty strong {
  color: #34241e;
}

/* ── Settings Rows ── */

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.settings-panel .setting-row {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.72);
}

.setting-row-stack {
  align-items: flex-start;
}

.setting-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.setting-title {
  color: #34241e;
  font-weight: 850;
  font-size: 0.95rem;
}

.setting-desc {
  font-size: 0.75rem;
  color: #876653;
}

.setting-divider {
  height: 1px;
  background: transparent;
  margin: 0;
}

.setting-toggle {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: #f1ddc4;
  border: 1px solid #e7c8a3;
  cursor: pointer;
  position: relative;
  transition: background var(--duration-fast);
  flex-shrink: 0;
}

.setting-toggle.active {
  background: linear-gradient(145deg, #f06537, #ff9960);
  border-color: #efbd87;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 4px 10px rgba(89, 53, 36, 0.18);
  transition: transform var(--duration-fast);
}

.setting-toggle.active .toggle-knob {
  transform: translateX(20px);
}

.setting-btn {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid #efcfaa;
  background: #fff4e5;
  color: #b6532d;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  flex-shrink: 0;
}

.setting-btn.danger {
  color: #d44434;
  border-color: rgba(212, 68, 52, 0.24);
}

.setting-btn.danger:hover {
  background: #ffe3da;
}

.setting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.setting-status {
  flex-basis: 100%;
  color: #876653;
  font-size: 0.72rem;
  text-align: right;
}

.setting-name-input {
  width: 150px;
  border: 1px solid #efd9b8;
  border-radius: 10px;
  background: #fffaf2;
  color: #3f2c24;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  padding: 8px 12px;
}

.setting-about {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.72);
}

.setting-about h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #34241e;
}

.setting-about p {
  font-size: 0.8rem;
  color: #876653;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.setting-version {
  font-size: 0.7rem;
  color: #b6532d;
  font-family: "JetBrains Mono", monospace;
}

/* ── Achievement Toast ── */

.ach-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-out-expo), opacity var(--duration-normal);
}

.ach-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.ach-toast-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 22px rgba(111, 69, 33, 0.18);
}

.ach-toast-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ach-toast-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fbbf24;
  font-weight: 700;
}

.ach-toast-name {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Achievement Panel ── */

.achievements-panel {
  margin-bottom: 2rem;
  padding: 22px;
  border: 1px solid #ecd7bb;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(154, 216, 239, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.9), rgba(255, 246, 231, 0.72));
  box-shadow: 0 22px 60px rgba(116, 76, 45, 0.08);
}

.ach-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.ach-panel-header h2 {
  font-size: 1.25rem;
  font-weight: 850;
  color: #3d2b26;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ach-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: #b45d34;
  font-weight: 850;
  padding: 7px 10px;
  border: 1px solid #f0d3ab;
  border-radius: 999px;
  background: #fff6e7;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.ach-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 12px 14px;
  overflow: hidden;
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid #efd9b8;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(120, 78, 39, 0.06);
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.ach-card.unlocked {
  border-color: rgba(240, 101, 55, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 241, 219, 0.8)),
    rgba(251, 191, 36, 0.04);
  box-shadow:
    0 16px 36px rgba(240, 101, 55, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.ach-card.locked {
  opacity: 0.58;
  filter: saturate(0.5);
}

.ach-card.locked::after {
  content: "🔒";
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(116, 84, 67, 0.16);
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.86);
  box-shadow: 0 8px 18px rgba(69, 43, 32, 0.1);
  font-size: 0.82rem;
}

.ach-card.unlocked:hover {
  transform: translateY(-2px);
}

.ach-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 12px 22px rgba(111, 69, 33, 0.16),
    0 0 0 4px rgba(255, 255, 255, 0.62);
}

.ach-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ach-name {
  color: #3d2b26;
  font-weight: 850;
  font-size: 0.94rem;
}

.ach-desc {
  font-size: 0.75rem;
  color: #7d6254;
  line-height: 1.3;
}

/* ── Profile Panel ── */

.profile-header-btn {
  padding: 3px;
}

.profile-panel,
.settings-panel {
  width: min(94vw, 760px);
  max-width: 760px;
  box-shadow: 0 30px 90px rgba(89, 53, 36, 0.18);
}

.profile-panel {
  width: min(94vw, 860px);
  max-width: 860px;
}

.profile-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-identity {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #efd9b8;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(154, 216, 239, 0.22), transparent 36%),
    rgba(255, 252, 245, 0.78);
  box-shadow: 0 14px 34px rgba(124, 82, 45, 0.07);
}

.profile-avatar {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.profile-avatar-img {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(124, 82, 45, 0.16);
}

.profile-identity-body {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.profile-username {
  font-size: 1.18rem;
  color: #34241e;
  overflow-wrap: anywhere;
}

.profile-friend-code {
  color: #b6532d;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}

.profile-edit-row {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.profile-edit-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid #efd9b8;
  border-radius: 10px;
  background: #fffaf2;
  color: #3f2c24;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.48rem 0.62rem;
}

.profile-edit-row button,
.profile-action-btn {
  min-height: 34px;
  border: 1px solid #efcfaa;
  border-radius: 10px;
  background: #fff4e5;
  color: #b6532d;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.42rem 0.65rem;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
}

.profile-edit-row button:hover,
.profile-action-btn:hover:not(:disabled) {
  background: #ffe5cc;
  border-color: #efbd87;
  transform: translateY(-1px);
}

.profile-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.profile-gift-select {
  min-height: 34px;
  max-width: 160px;
}

.profile-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.profile-tab {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #efd9b8;
  border-radius: 999px;
  background: #fff8ec;
  color: #775746;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.45rem 0.65rem;
}

.profile-tab.active {
  color: #fff;
  border-color: #f0c79a;
  background: linear-gradient(145deg, #f06537, #ff9960);
  box-shadow: 0 8px 18px rgba(240, 101, 55, 0.2);
}

.profile-rank {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #b6532d;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  gap: 8px;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 1rem;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 10px 24px rgba(124, 82, 45, 0.05);
}

.profile-stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #f06537;
}

.profile-stat-label {
  font-size: 0.65rem;
  color: #876653;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Profile Leaderboard ── */

.profile-lb-heading {
  font-size: 0.9rem;
  font-weight: 850;
  color: #7d5643;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.profile-lb-empty {
  font-size: 0.8rem;
  color: #876653;
  text-align: center;
  padding: 1rem;
}

.profile-lb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #efd9b8;
  background: rgba(255, 252, 245, 0.72);
  border-radius: 12px;
}

.profile-lb-rank {
  width: 2rem;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.profile-lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.85rem;
}

.profile-lb-score {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f06537;
}

.profile-highlight-list {
  display: grid;
  gap: 0.45rem;
}

.profile-highlight-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.58rem 0.65rem;
  border: 1px solid #efd9b8;
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.72);
}

.profile-highlight-mark {
  color: #f06537;
  text-align: center;
}

.profile-highlight-share {
  min-height: 30px;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.profile-provider-grid,
.profile-avatar-grid,
.profile-interest-grid,
.profile-medal-grid,
.profile-wall-grid {
  display: grid;
  gap: 0.7rem;
}

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

.profile-provider-card,
.profile-medal-card,
.profile-wall-item,
.profile-friend-code-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.82rem;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 10px 24px rgba(124, 82, 45, 0.05);
}

.profile-provider-card span,
.profile-medal-card p,
.profile-wall-item span,
.profile-medal-meta,
.profile-tab-hint {
  color: #876653;
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-aicofi {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.92), rgba(255, 241, 219, 0.68));
}

.profile-aicofi-form {
  display: grid;
  gap: 0.5rem;
}

.profile-aicofi-input {
  border: 1px solid #efd9b8;
  border-radius: 10px;
  background: #fffaf2;
  color: #3f2c24;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.48rem 0.62rem;
}

.profile-aicofi-actions {
  display: flex;
  gap: 0.5rem;
}

.profile-aicofi-actions .profile-action-btn {
  flex: 1;
}

.profile-aicofi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.profile-aicofi-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.profile-aicofi-email {
  color: #876653;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-aicofi-status {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-aicofi-status.is-error {
  color: #d44434;
}

.profile-aicofi-status.is-info {
  color: #876653;
}

.profile-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-bottom: 0.85rem;
  border: 1px dashed #e8cba8;
  border-radius: 10px;
  color: #b6532d;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.55rem 0.8rem;
}

.profile-upload input {
  display: none;
}

.profile-avatar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-avatar-choice {
  display: grid;
  gap: 0.38rem;
  justify-items: center;
  min-width: 0;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.72);
  color: #3f2c24;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.45rem;
}

.profile-avatar-choice.active {
  border-color: rgba(240, 101, 55, 0.44);
  background: #fff1dc;
}

.profile-avatar-choice img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
}

.profile-avatar-choice span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-friend-code-card strong {
  color: #b6532d;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
}

.profile-friend-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem;
  border: 1px solid #efd9b8;
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.72);
}

.profile-friend-row img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.profile-friend-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.profile-friend-body span {
  color: #876653;
  font-size: 0.72rem;
}

.profile-interest-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-interest-chip {
  min-height: 38px;
  border: 1px solid #efd9b8;
  border-radius: 999px;
  background: #fff8ec;
  color: #775746;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-interest-chip.active {
  color: #fff;
  border-color: #f0c79a;
  background: linear-gradient(145deg, #f06537, #ff9960);
}

.profile-showcase {
  margin-top: 1rem;
}

.profile-showcase-row,
.profile-medal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.profile-showcase-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #efcfaa;
  border-radius: 999px;
  background: #fff4e5;
  color: #b6532d;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.32rem 0.58rem;
}

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

.profile-wall-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.profile-medal-icon {
  font-size: 1.8rem;
}

.profile-medal-card {
  align-content: start;
}

.profile-medal-card.rarity-epic,
.profile-showcase-chip.rarity-epic,
.profile-wall-item.rarity-epic {
  border-color: rgba(168, 85, 247, 0.36);
  background: rgba(246, 232, 255, 0.72);
}

.profile-medal-card.rarity-legendary,
.profile-showcase-chip.rarity-legendary,
.profile-wall-item.rarity-legendary {
  border-color: rgba(240, 101, 55, 0.34);
  background: #fff1dc;
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 3rem 2rem;
  margin-top: auto;
  color: var(--home-warm-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(128, 86, 96, 0.12);
}

/* ── Warm Home Overrides For Dynamic Modules ── */

.home-command-band .daily-wrap {
  justify-content: stretch;
  padding: 0;
  margin: 0;
}

.home-command-band .daily-card {
  width: 100%;
  min-height: 100%;
  border: 1px solid rgba(128, 86, 96, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 236, 212, 0.54)),
    linear-gradient(45deg, rgba(255, 196, 61, 0.12), rgba(101, 210, 226, 0.08));
  color: var(--home-warm-ink);
  box-shadow: none;
}

.home-command-band .daily-card::before {
  opacity: 0.26;
}

.home-command-band .daily-icon {
  background: linear-gradient(145deg, #ffe4a8, #f9abc0 54%, #9be7f1);
  color: #3a2441;
}

.home-command-band .daily-name {
  color: var(--home-warm-ink);
}

.home-command-band .daily-tag {
  color: var(--home-warm-muted);
}

.home-command-band .daily-play {
  background: #2f2630;
  color: #fff9ee;
}

.player-level {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: var(--home-warm-line) !important;
  color: var(--home-warm-ink) !important;
}

.player-level:hover {
  border-color: rgba(223, 110, 72, 0.32) !important;
  box-shadow: 0 0 14px rgba(223, 110, 72, 0.2) !important;
}

.player-level .pl-ring {
  color: #df6e48 !important;
}

/* ══════════════════════════════════════════════
   Responsive Breakpoints
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .home-hero,
  .platform-dashboard,
  .dash-lower {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-showcase {
    min-height: 280px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 4%;
  }

  nav {
    align-items: flex-start;
    gap: 0.85rem;
    overflow: hidden;
  }

  .header-right {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .header-right::-webkit-scrollbar {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }

  .hero p {
    font-size: 0.95rem;
  }

  .home-hero {
    padding: 1.25rem;
    border-radius: 22px;
    width: 100%;
    min-width: 0;
  }

  .hero-showcase {
    min-height: 250px;
  }

  .hero-stage-card-main {
    inset: 0 26px 20px 0;
  }

  .hero-stage-card-side {
    width: min(56%, 210px);
  }

  .stats-strip {
    flex-wrap: wrap;
  }

  .dash-game-rows {
    grid-template-columns: 1fr;
  }

  .dash-mission {
    grid-template-columns: 1fr;
  }

  .dash-mission-claim {
    width: 100%;
  }

  .setting-row,
  .setting-actions {
    align-items: stretch;
  }

  .setting-row-stack {
    flex-direction: column;
  }

  .highlight-feed-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .highlight-feed-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .stat-item {
    flex: 1 1 45%;
    min-width: 0;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    overflow: hidden;
  }

  .filter-chips,
  .search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

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

  .search-input:focus {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1.5rem 4%;
  }

  .hero {
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .home-hero {
    padding: 1rem;
    border-radius: 18px;
  }

  .hero-copy,
  .hero h1,
  .hero p {
    max-width: 100%;
    min-width: 0;
  }

  .hero p {
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-showcase {
    min-height: 250px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero-stage-card-main {
    inset: 0 0 28px;
    padding: 1rem;
  }

  .hero-stage-card-main::before {
    inset: 12px 12px 78px;
  }

  .hero-stage-card-side {
    right: 0;
    bottom: 10px;
    width: min(54%, 168px);
    min-height: 126px;
    border-radius: 17px;
    transform: none;
  }

  .hero-stage-token-a {
    width: 54px;
    height: 54px;
    right: 12px;
  }

  .hero-stage-token-b {
    display: none;
  }

  .home-command-band,
  .home-discovery {
    padding: 0.65rem;
    border-radius: 18px;
  }

  .stats-strip {
    border-radius: 10px;
  }

  .dash-snapshot-stats {
    grid-template-columns: 1fr;
  }

  .dash-game {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .dash-mission-title,
  .dash-mission-sub,
  .dash-mission-progress {
    white-space: normal;
  }

  .dash-game-mark {
    width: 38px;
    height: 38px;
  }

  .highlight-feed-panel {
    width: 94%;
    padding: 1.2rem;
  }

  .highlight-feed-filters {
    align-items: stretch;
  }

  .highlight-filter-reset,
  .highlight-filter-pin,
  .highlight-select {
    width: 100%;
  }

  .highlight-feed-row {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .highlight-feed-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .highlight-feed-score,
  .highlight-feed-actions {
    grid-column: 2;
  }

  .highlight-feed-actions button,
  .profile-highlight-share {
    min-height: 44px;
  }

  .profile-identity {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem;
  }

  .profile-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .profile-edit-row {
    flex-direction: column;
  }

  .profile-provider-grid,
  .profile-medal-grid,
  .profile-wall-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .profile-friend-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .profile-friend-row .profile-action-btn {
    grid-column: 1 / -1;
  }

  .profile-highlight-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .profile-highlight-share {
    grid-column: 2;
    justify-self: start;
  }

  .dash-play {
    grid-column: 2;
  }

  .stat-item {
    padding: 0.75rem 0.5rem;
  }

  .stat-value {
    font-size: 0.95rem;
  }

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

  .game-scroll .game-card {
    width: 218px;
    min-width: 218px;
    padding: 0.9rem;
    border-radius: 15px;
  }

  .game-scroll .card-cover {
    aspect-ratio: 1.8;
    margin-bottom: 0.6rem;
  }

  .game-scroll .card-cover .game-icon-canvas,
  .game-scroll .game-card.art-feature .card-cover .game-icon-canvas {
    width: min(36%, 72px);
  }

  .game-card {
    padding: 1.25rem;
  }

  .game-icon-canvas {
    width: 48px;
    height: 48px;
  }

  .game-card.art-feature .game-icon-canvas {
    width: 88px;
    height: 88px;
  }

  .game-card h3 {
    font-size: 1.1rem;
  }

  .stats-ribbon {
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  /* 44px minimum touch targets on mobile */
  .filter-chip {
    min-height: 44px;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .header-icon-btn,
  .sound-toggle {
    width: 44px;
    height: 44px;
  }

  .fav-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .welcome-dismiss {
    min-width: 44px;
    min-height: 44px;
  }

  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ── Welcome Banner ── */

.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: banner-in 0.4s var(--ease-out-expo) both;
}

.welcome-banner.hiding {
  animation: banner-out 0.25s ease-in forwards;
}

@keyframes banner-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes banner-out {
  to { opacity: 0; transform: translateY(-10px); }
}

.welcome-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.welcome-content > div {
  min-width: 0;
}

.welcome-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.welcome-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.welcome-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow-wrap: normal;
}

.welcome-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.welcome-dismiss:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Empty Hint ── */

.empty-hint-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  text-align: center;
}

/* ── Library Shell Redesign ── */

body {
  background:
    linear-gradient(180deg, #fffaf1 0%, #fff5e8 48%, #fffaf2 100%);
  color: #35231e;
}

.blob-bg {
  display: none;
}

.library-topbar {
  height: 76px;
  padding: 0 22px;
  background: rgba(255, 250, 241, 0.96);
  border-bottom: 1px solid #ead7bd;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 12px 36px rgba(112, 72, 42, 0.05);
}

.library-topbar nav {
  max-width: none;
  height: 100%;
  gap: 18px;
  justify-content: space-between;
}

.library-topbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 230px;
  min-width: 230px;
  color: #3b2925;
  font-size: 2rem;
  font-weight: 900;
}

.logo-joy {
  font-size: 1.75rem;
}

.library-topbar .logo-mark {
  flex: 0 0 auto;
}

.library-topbar .logo span:not(.logo-joy) {
  color: #f06537;
}

.library-topbar .header-right {
  gap: 12px;
}

.header-wallet,
.library-topbar .player-level {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff8ed;
  border: 1px solid #efdabf;
  color: #3f2a23;
  box-shadow: 0 8px 22px rgba(126, 83, 44, 0.06);
}

.header-wallet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
}

.header-wallet .ui-icon {
  width: 28px;
  height: 28px;
}

.gem-wallet {
  color: #2f3a58;
}

.header-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid #9ad8ef;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff3df, #bfefff);
  cursor: pointer;
  font-size: 1.55rem;
  box-shadow: 0 8px 22px rgba(45, 154, 190, 0.16);
}

.header-avatar-btn .ui-icon {
  width: 36px;
  height: 36px;
}

.library-topbar .header-icon-btn,
.library-topbar .sound-toggle {
  min-width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: #866654;
}

.library-topbar .sound-toggle::before {
  width: 28px;
  height: 28px;
}

.library-topbar .lang-trigger {
  width: auto;
  min-width: 82px;
  padding: 0 12px;
  gap: 7px;
  border: 1px solid #efdabf;
  border-radius: 999px;
  background: #fff8ed;
  color: #6f5146;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.library-topbar .lang-trigger .ui-icon {
  width: 25px;
  height: 25px;
}

.library-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  flex: 1 0 auto;
  min-height: 0;
}

.library-sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: calc(100vh - 76px);
  padding: 24px 18px;
  border-right: 1px solid #ead7bd;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(255, 246, 231, 0.88));
}

.side-nav-kicker {
  padding: 0 14px 7px;
  color: #a47a63;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #745443;
  cursor: pointer;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1;
  text-align: left;
}

.side-nav .ui-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.52);
  background-size: 24px 24px;
  background-position: 50% 50%;
}

.side-nav .ui-icon-home,
.side-nav .ui-icon-all-games,
.side-nav .ui-icon-challenges {
  background-size: 25px 25px;
}

.side-nav.active {
  color: #f05d2f;
  background: #fff3df;
  border-color: #efd5af;
  box-shadow: 0 12px 30px rgba(189, 111, 46, 0.08);
}

.side-nav.active .ui-icon {
  background-color: #fff0dc;
  box-shadow: 0 8px 18px rgba(240, 101, 55, 0.22);
}

.settings-side {
  margin-top: auto;
  border-top: 1px solid #ead7bd;
  border-radius: 0;
  padding-top: 22px;
}

.library-main {
  max-width: none;
  margin: 0;
  padding: 22px 28px 40px;
}

.library-filter {
  position: sticky;
  top: 76px;
  z-index: 20;
  margin: -2px -2px 18px;
  padding: 8px 2px 12px;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(255, 250, 241, 0.86));
  backdrop-filter: blur(10px);
}

.library-filter .filter-chip {
  background: #fff8ec;
  border-color: #efdbc0;
  color: #7a5745;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 850;
}

.library-filter .filter-chip.active {
  background: #fff0dc;
  border-color: #f2c694;
  color: #f05d2f;
}

.library-filter .search-input {
  height: 38px;
  background: #fff8ec;
  border-color: #efdbc0;
  color: #3b2925;
}

.custom-select {
  position: relative;
  min-width: 152px;
  color: #6a493a;
  font-family: "Outfit", system-ui, sans-serif;
}

.custom-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  width: 100%;
  min-width: 0;
  gap: 10px;
  border: 1px solid #efdbc0;
  border-radius: 9px;
  background: #fff8ec;
  color: #6a493a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0 11px 0 12px;
  box-shadow: 0 8px 20px rgba(125, 75, 34, 0.08);
  cursor: pointer;
  line-height: 1;
}

.custom-select-button::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.72;
  transition: transform 0.16s ease;
}

.custom-select.open .custom-select-button::after {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  display: grid;
  min-width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #efd5af;
  border-radius: 12px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: 0 18px 42px rgba(112, 70, 39, 0.18);
  opacity: 0;
  transform: translateY(-5px) scale(0.98);
  pointer-events: none;
  transform-origin: top right;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.custom-select.open .custom-select-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-select-option {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #745443;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.active {
  background: #fff0dc;
  color: #f05d2f;
}

.custom-select-button:focus-visible {
  outline: 3px solid rgba(255, 173, 88, 0.36);
  outline-offset: 2px;
}

.records-select,
.profile-gift-select {
  min-width: 0;
}

.records-select .custom-select-button,
.profile-gift-select .custom-select-button {
  min-height: 38px;
  height: auto;
  border-radius: 12px;
  background: #fffaf2;
  border-color: #efd9b8;
  color: #3f2c24;
}

.profile-gift-select .custom-select-button {
  min-height: 34px;
  font-size: 0.76rem;
}

.library-main .challenge-overview {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(210px, 0.72fr) minmax(220px, 0.9fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid #efd8b7;
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 190, 104, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 245, 0.96), rgba(255, 242, 220, 0.94));
  box-shadow: 0 16px 36px rgba(132, 82, 41, 0.1);
}

.challenge-overview-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.challenge-overview-copy span {
  color: #f05d2f;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-overview-copy strong {
  color: #2f211c;
  font-size: 1.35rem;
  line-height: 1.08;
}

.challenge-overview-copy em {
  color: #6d4d3f;
  font-style: normal;
  font-size: 0.92rem;
}

.challenge-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.challenge-overview-stats span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  place-items: center;
  border: 1px solid #efd8b7;
  border-radius: 12px;
  background: rgba(255, 250, 241, 0.72);
  color: #7b5a49;
  font-size: 0.76rem;
  font-weight: 800;
}

.challenge-overview-stats b {
  color: #2f211c;
  font-size: 1.25rem;
}

.challenge-overview-mission {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #efd8b7;
  border-radius: 12px;
  background: rgba(255, 250, 241, 0.72);
}

.challenge-overview-mission span {
  color: #f05d2f;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-overview-mission strong,
.challenge-overview-mission em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-overview-mission strong {
  color: #2f211c;
  font-size: 0.92rem;
}

.challenge-overview-mission em {
  color: #7b5a49;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 750;
}

.challenge-overview-mission i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eed8b9;
}

.challenge-overview-mission i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f9733f, #f2b84b);
}

.challenge-overview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.challenge-overview .challenge-banner-play {
  border: 1px solid #efbd87;
  background: #f9733f;
  color: #fffaf1;
  box-shadow: 0 10px 22px rgba(232, 105, 54, 0.18);
}

.challenge-overview .challenge-banner-play.secondary {
  background: #fff8ec;
  color: #7a5745;
}

.social-pulse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid #efd8b7;
  border-radius: 14px;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: 0 10px 24px rgba(132, 82, 41, 0.07);
  overflow-x: auto;
}

.home-news {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #ecd7bb;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(154, 216, 239, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.9), rgba(255, 246, 231, 0.76));
  box-shadow: 0 18px 44px rgba(116, 76, 45, 0.07);
}

.home-news-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.home-news-header h2 {
  margin: 0;
  color: #34241e;
  font-size: 1.22rem;
  font-weight: 950;
}

.home-news-header p {
  margin: 3px 0 0;
  color: #876653;
  font-size: 0.84rem;
}

.home-news-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-news-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #efd9b8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(124, 82, 45, 0.05);
}

.home-news-card span {
  display: block;
  margin-bottom: 7px;
  color: #b6532d;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.home-news-card strong {
  display: block;
  color: #34241e;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.15;
}

.home-news-card p {
  margin: 7px 0 0;
  color: #7d6254;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ai-bot-panel {
  display: grid;
  gap: 16px;
}

.ai-bot-header,
.ai-bot-match,
.ai-bot-card {
  border: 1px solid #ecd7bb;
  background:
    radial-gradient(circle at 100% 0%, rgba(154, 216, 239, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(255, 246, 231, 0.78));
  box-shadow: 0 18px 44px rgba(116, 76, 45, 0.07);
}

.ai-bot-header {
  padding: 20px;
  border-radius: 18px;
}

.ai-bot-header span,
.ai-match-header span,
.ai-bot-copy span {
  color: #b6532d;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.ai-bot-header h2,
.ai-match-header h3 {
  margin: 4px 0;
  color: #34241e;
  font-weight: 950;
}

.ai-bot-header p,
.ai-match-header p,
.ai-bot-copy p {
  margin: 0;
  color: #7d6254;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ai-bot-roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-bot-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border-radius: 16px;
}

.ai-bot-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(145deg, var(--bot-accent, #f06537), #ffb06e);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--bot-accent, #f06537) 24%, transparent);
}

.ai-bot-copy {
  min-width: 0;
}

.ai-bot-copy strong,
.ai-bot-copy em {
  display: block;
}

.ai-bot-copy strong {
  color: #34241e;
  font-size: 1rem;
  font-weight: 950;
}

.ai-bot-copy em {
  color: #8b6a54;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.ai-bot-action {
  grid-column: 1 / -1;
  min-height: 36px;
  border: 1px solid #efbd87;
  border-radius: 999px;
  background: #fff4e5;
  color: #b6532d;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
}

.ai-bot-action.primary {
  padding: 0 14px;
  background: #f9733f;
  color: #fffaf1;
  box-shadow: 0 10px 22px rgba(232, 105, 54, 0.18);
}

.ai-bot-match {
  padding: 18px;
  border-radius: 18px;
}

.ai-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.ai-split-pane {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #efd9b8;
  border-radius: 16px;
  background: #fffaf2;
}

.ai-split-pane.is-bot {
  border-color: #e8c3a8;
  background: #fff4e5;
}

.ai-split-title {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border-bottom: 1px solid #efd9b8;
}

.ai-split-title span {
  color: #b6532d;
  font: 850 0.6rem "JetBrains Mono", monospace;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.ai-split-title strong {
  color: #34241e;
  font-weight: 950;
}

.ai-split-title em {
  color: #7d6254;
  font-size: 0.74rem;
  font-style: normal;
}

.ai-split-pane iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: #111827;
}

.ai-game-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-game-picks button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #efd9b8;
  border-radius: 999px;
  background: #fffaf2;
  color: #745443;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
}

.ai-game-picks button.active {
  border-color: #f0c79a;
  background: #fff2dc;
  color: #f05d2f;
}

.social-pulse[hidden] {
  display: none;
}

.social-pulse-label {
  flex: 0 0 auto;
  color: #f05d2f;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.social-pulse-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #efd8b7;
  border-radius: 999px;
  background: #fff8ec;
  color: #6d4d3f;
  font-size: 0.78rem;
}

.social-pulse-item b,
.social-pulse-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-pulse-item b {
  color: #2f211c;
  max-width: 98px;
}

.social-pulse-item span {
  max-width: 128px;
}

.social-pulse-empty {
  max-width: none;
}

.social-pulse-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #efbd87;
  border-radius: 999px;
  background: #fff1dc;
  color: #f05d2f;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
}

.social-pulse-action:hover {
  background: #ffe6c2;
}

.quick-continue {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: stretch;
  margin: 0 0 18px;
}

.quick-continue-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 94px;
  padding: 16px;
  border: 1px solid #efd8b7;
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 201, 120, 0.28), transparent 36%),
    linear-gradient(135deg, #fffaf1, #fff0d8);
  box-shadow: 0 12px 28px rgba(132, 82, 41, 0.08);
}

.quick-continue-heading span {
  color: #2f211c;
  font-size: 1.05rem;
  font-weight: 950;
}

.quick-continue-heading small {
  color: #8b6a54;
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-continue-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-continue-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 94px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #f9733f) 28%, #efd8b7);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 230, 0.94)),
    linear-gradient(90deg, color-mix(in srgb, var(--accent, #f9733f) 18%, transparent), transparent);
  color: #2f211c;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 26px rgba(132, 82, 41, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-continue-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #f9733f) 58%, #efbd87);
  box-shadow: 0 16px 30px rgba(132, 82, 41, 0.12);
}

.quick-continue-badge {
  width: fit-content;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #f9733f) 14%, #fff5df);
  color: color-mix(in srgb, var(--accent, #f9733f) 72%, #3a251c);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
}

.quick-continue-card strong,
.quick-continue-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-continue-card strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.quick-continue-card small {
  color: #7a5745;
  font-size: 0.76rem;
  font-weight: 700;
}

.library-grid-host .card-section {
  margin-bottom: 24px;
}

.library-grid-host .section-heading {
  display: none;
}

.library-grid-host .game-scroll,
.library-grid-host .game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 24px;
  overflow: visible;
  padding: 0;
  margin: 0 0 24px;
}

.library-grid-host .game-scroll .game-card,
.library-grid-host .game-card {
  width: auto;
  min-width: 0;
  min-height: 420px;
  padding: 0;
  border: 1px solid #efd8b7;
  border-left: 1px solid #efd8b7;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 254, 248, 0.92), rgba(255, 247, 233, 0.94));
  box-shadow:
    0 14px 34px rgba(132, 82, 41, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.library-grid-host .game-card:hover {
  transform: translateY(-4px);
  background: #fffaf0;
  border-color: #eec58f;
  box-shadow:
    0 18px 42px rgba(132, 82, 41, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
}

.library-grid-host .card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 16px 12px;
}

.library-grid-host .card-top-row {
  position: static;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  pointer-events: auto;
}

.library-grid-host .card-actions {
  pointer-events: auto;
}

.library-grid-host .info-toggle {
  display: none;
}

.library-grid-host .fav-toggle {
  position: static;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #e8c69e;
  background: rgba(255, 253, 245, 0.92);
  color: #9a5b2c;
  border-radius: 50%;
}

.library-grid-host .new-game-pill {
  display: none;
}

.library-grid-host .category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 9px;
  border: 2px solid #fff;
  border-radius: 9px;
  background: color-mix(in srgb, var(--pill-color, #f97316) 82%, white);
  color: #fff;
  box-shadow: 0 7px 18px rgba(122, 67, 35, 0.15);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

.library-grid-host .card-cover {
  order: -1;
  width: calc(100% + 32px);
  aspect-ratio: 1.37;
  margin: 0 -16px 12px;
  border-radius: 11px 11px 0 0;
  background: #f8e3bf;
  box-shadow: none;
}

.library-grid-host .card-cover img {
  object-fit: contain;
  border-radius: 0;
  background: #f8e3bf;
}

.library-grid-host .micro-cover-card .card-cover,
.library-grid-host .stage-pack-card .card-cover,
.library-grid-host .game-card.micro-cover-card .card-cover {
  aspect-ratio: 1.37;
  padding: 0;
  background: #f8e3bf;
}

.library-grid-host .game-card.micro-cover-card .card-cover img,
.library-grid-host .game-card.stage-pack-card .card-cover img {
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.library-grid-host .card-cover-shine {
  background:
    linear-gradient(180deg, transparent 62%, rgba(108, 62, 35, 0.26)),
    linear-gradient(115deg, rgba(255, 255, 255, 0.24), transparent 42%);
  mix-blend-mode: normal;
}

.stage-count-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  min-width: 56px;
  min-height: 58px;
  padding: 6px 8px;
  border: 1px solid #e6c692;
  border-radius: 10px;
  background: rgba(255, 255, 246, 0.9);
  color: #4e8a37;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(100, 65, 31, 0.13);
}

.stage-count-badge b {
  font-size: 1.3rem;
  line-height: 1;
}

.stage-count-badge em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 900;
}

.stage-preview-strip {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stage-preview-strip img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(79, 50, 27, 0.18);
}

.stage-preview-strip img:nth-child(1) {
  object-position: left center;
}

.stage-preview-strip img:nth-child(3) {
  object-position: right center;
}

.library-grid-host .game-card h3 {
  color: #2f211c;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.08;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.library-grid-host .card-tagline {
  min-height: 42px;
  margin: 0 0 12px;
  color: #5d4136;
  font-size: 0.98rem;
  line-height: 1.35;
}

.library-grid-host .mechanic-badges {
  gap: 8px;
  margin: 0 0 12px;
}

.library-grid-host .mechanic-badge {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  border-color: color-mix(in srgb, var(--accent, #f97316) 24%, #eccca4);
  background: color-mix(in srgb, var(--accent, #f97316) 13%, #fff5e5);
  color: color-mix(in srgb, var(--accent, #f97316) 60%, #5c3b2b);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
}

.library-grid-host .card-local-board {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid #efd8b7;
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.72);
}

.card-local-board-label {
  color: #9a6b51;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-local-board-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  color: #6d4d3f;
  font-size: 0.76rem;
  font-weight: 750;
}

.card-local-board-row b {
  color: #f0a12b;
  font-size: 0.72rem;
}

.card-local-board-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-local-board-row em {
  color: #3f2a23;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.card-local-board-row.is-you {
  color: #f05d2f;
}

.library-grid-host .card-progress-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 12px;
}

.card-progress-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #efd8b7;
  border-radius: 9px;
  background: rgba(255, 248, 236, 0.68);
}

.card-progress-row b,
.card-progress-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-progress-row b {
  color: #9a6b51;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-progress-row em {
  color: #3f2a23;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 800;
}

.library-grid-host .game-card.recently-played {
  border-color: #f2bf82;
  box-shadow:
    0 15px 36px rgba(132, 82, 41, 0.14),
    0 0 0 2px rgba(249, 115, 63, 0.1) inset;
}

.library-grid-host .card-stage-name-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 12px;
}

.card-stage-name-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 148px;
  padding: 0 8px;
  border: 1px solid #efd8b7;
  border-radius: 999px;
  background: #fff8ec;
  color: #7b5a49;
  font-size: 0.68rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-grid-host .stats-ribbon {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #ecd5b5;
}

.library-grid-host .stats-ribbon .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6f4d3d;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 650;
}

.library-grid-host .stats-ribbon .stat:first-child {
  color: #6f4d3d;
}

.library-grid-host .stats-ribbon .stat:first-child::first-letter {
  color: #ffb21d;
}

.library-empty-state {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 28px;
  border: 1px dashed #e6c79f;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 226, 0.7));
  color: #6f4d3d;
  text-align: center;
}

.library-empty-state[hidden] {
  display: none;
}

.library-empty-state strong {
  color: #35231e;
  font-size: 1.2rem;
}

.library-empty-state span {
  font-size: 0.95rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 24px;
  padding: 28px 20px 36px;
  margin-top: auto;
  border-top: 1px solid var(--home-warm-line, rgba(0, 0, 0, 0.08));
  color: var(--home-warm-muted, #8a7f76);
  font-size: 0.9rem;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 1280px) {
  .library-grid-host .game-scroll,
  .library-grid-host .game-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
  }
}

@media (max-width: 980px) {
  .library-topbar {
    height: auto;
    padding: 12px 16px;
  }

  .library-topbar nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .library-topbar .logo {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 1.55rem;
  }

  .library-shell {
    grid-template-columns: 1fr;
  }

  .library-sidebar {
    position: static;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid #ead7bd;
  }

  .library-sidebar .side-nav-kicker {
    align-self: center;
  }

  .side-nav {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
  }

  .settings-side {
    margin-top: 0;
    border-top: none;
    border-radius: 12px;
    padding-top: 0;
  }

  .library-main {
    padding: 18px 16px 34px;
  }

  .library-filter {
    position: static;
  }

  .library-filter .sort-select {
    flex: 0 0 176px;
  }

  .library-main .challenge-overview {
    grid-template-columns: 1fr;
  }

  .quick-continue {
    grid-template-columns: 1fr;
  }

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

  .ai-bot-roster,
  .ai-split-stage {
    grid-template-columns: 1fr;
  }

  .ai-match-header {
    display: grid;
  }

  .challenge-overview-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .library-grid-host .game-scroll,
  .library-grid-host .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .library-grid-host .game-card {
    min-height: 360px;
  }

  .library-grid-host .fav-toggle {
    position: static;
  }
}

@media (max-width: 560px) {
  .challenge-overview-stats {
    grid-template-columns: 1fr;
  }

  .challenge-overview-actions .challenge-banner-play {
    width: 100%;
  }

  .library-filter .sort-select {
    flex: 1 1 100%;
    width: 100%;
  }

  .quick-continue-list {
    grid-template-columns: 1fr;
  }

  .home-news-header {
    display: block;
  }

  /* Compact the News rail into a horizontal swipe strip on phones so it
     doesn't stack 5 tall cards above the playable grid (keep "play" near the
     top of the fold). */
  .home-news-rail {
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .home-news-card {
    scroll-snap-align: start;
  }

  .ai-split-pane iframe {
    height: 340px;
  }
}

@media (max-width: 520px) {
  .library-topbar {
    padding: 10px 12px;
    overflow: hidden;
  }

  .library-topbar nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .library-topbar .logo {
    flex: 0 1 auto;
    font-size: 1.34rem;
    gap: 7px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .library-topbar .header-right {
    justify-content: flex-end;
    min-width: 0;
  }

  .library-shell,
  .library-main,
  .library-filter,
  .library-grid-host {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .library-sidebar,
  .filter-chips {
    max-width: 100vw;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .library-sidebar::-webkit-scrollbar,
  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .social-pulse {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .social-pulse-label,
  .social-pulse-action {
    flex: 0 0 auto;
  }

  .social-pulse-item {
    flex: 1 1 180px;
    min-width: 0;
  }

  .library-grid-host .game-scroll,
  .library-grid-host .game-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .header-wallet.arcade-coins,
  .header-wallet.gem-wallet,
  .library-topbar .player-level,
  .library-topbar .sound-toggle,
  .library-topbar .lang-picker-wrap {
    display: none;
  }

  .library-grid-host .game-card {
    min-height: 410px;
  }

  .library-grid-host .card-top-row {
    top: 226px;
  }

  .library-grid-host .fav-toggle {
    top: 154px;
  }
}

/* ── Footer Legal + Social Links ── */

footer .footer-legal,
footer .footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

footer .footer-legal a {
  color: var(--home-warm-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer .footer-legal a:hover,
footer .footer-legal a:focus-visible {
  color: var(--accent);
}

footer .footer-social {
  gap: 0.9rem;
  margin-top: 0.85rem;
}

footer .footer-social a {
  display: inline-flex;
  color: var(--home-warm-muted);
  transition: color 0.2s ease;
}

footer .footer-social a:hover,
footer .footer-social a:focus-visible {
  color: var(--accent);
}

footer .footer-social svg {
  width: 18px;
  height: 18px;
}

/* ── Reduced Motion ── */

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