/* PixelDeck V66 — professional pixel UI, responsive layout and adaptive themes. */
:root {
  --v65-bg: #06110a;
  --v65-surface: rgba(9, 29, 16, .92);
  --v65-surface-2: #102d1a;
  --v65-border: rgba(150, 226, 116, .3);
  --v65-accent: #9be64d;
  --v65-accent-2: #5df7d4;
  --v65-shadow: 0 16px 48px rgba(0, 0, 0, .28);
}

html { scroll-behavior: smooth; }
body { line-height: 1.5; }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 3px solid var(--v65-accent-2) !important;
  outline-offset: 3px;
}

.topbar {
  grid-template-columns: 170px minmax(480px, 1fr) auto auto;
  min-height: 72px;
  padding: 10px clamp(14px, 2.5vw, 36px);
  gap: clamp(12px, 2vw, 24px);
  border-bottom-width: 2px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.logo-brand .site-logo-img { width: 152px; height: auto; object-fit: contain; }
.logo-brand { padding: 0; color: inherit; background: transparent; text-align: left; }
#nav.nav { gap: 6px; justify-content: center; min-width: 0; }
#nav.nav > .nav-btn,
#nav.nav > .nav-more > summary {
  min-height: 40px;
  padding: 9px 12px !important;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  font-size: 12px !important;
}
#nav.nav > .nav-btn:hover,
#nav.nav > .nav-more > summary:hover {
  border-color: var(--v65-border);
  background: rgba(155, 230, 77, .08);
  transform: none;
}
#nav.nav > .nav-btn.active {
  color: var(--v65-accent);
  background: rgba(155, 230, 77, .12);
  border-color: rgba(155, 230, 77, .35);
}
#nav.nav > .nav-create-btn {
  color: #06110a;
  background: var(--v65-accent);
  border-color: #d7ff72;
  font-weight: 900;
}
.nav-more-menu {
  right: 0;
  left: auto;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--v65-border);
  border-radius: 12px;
  background: #071b0e;
  box-shadow: var(--v65-shadow);
}
.nav-more-menu .nav-btn {
  display: flex;
  justify-content: flex-start;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}
.online-ticker { white-space: nowrap; }
.top-actions .lang-select { border-radius: 8px; }
.notification-btn.active { color: #06110a; background: var(--v65-accent); }

main { max-width: 1380px; padding-top: clamp(28px, 5vw, 70px); }
.landing-grid {
  grid-template-columns: minmax(0, 1.07fr) minmax(360px, .83fr);
  min-height: auto;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.hero-text h1 {
  max-width: 780px;
  margin: 20px 0;
  font-size: clamp(42px, 6.2vw, 86px);
  letter-spacing: -.055em;
  line-height: .96;
  text-wrap: balance;
}
.hero-text > p { max-width: 680px; font-size: clamp(16px, 1.4vw, 19px); }
.hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 760px;
}
.hero-stats div {
  min-width: 0;
  border-width: 1px;
  border-radius: 8px;
  box-shadow: none;
  background: rgba(8, 30, 16, .74);
}
.hero-stats b { overflow: hidden; text-overflow: ellipsis; }
.v65-prompt-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  border: 1px solid rgba(93, 247, 212, .28);
  border-radius: 10px;
  box-shadow: none;
}
.v65-prompt-card b { margin: 0; font-size: 15px; }
.v65-primary-actions { max-width: 760px; }
.v65-primary-actions > * { min-height: 52px; border-width: 2px; border-radius: 9px; box-shadow: 4px 4px 0 #020804; }
.v65-primary-actions .v65-discover-btn { flex: 1.2; }
.v65-primary-actions .direct-upload-open { flex: 1; }
.v65-feature-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 760px;
  margin-top: 18px;
}
.v65-feature-rail > * {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--v65-border);
  border-radius: 9px;
  color: var(--text);
  background: rgba(8, 28, 15, .78);
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}
.v65-feature-rail > *:hover { border-color: var(--v65-accent); background: rgba(155, 230, 77, .1); }
.v65-feature-rail span { grid-row: span 2; color: var(--v65-accent); }
.v65-feature-rail b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.v65-feature-rail small { color: var(--muted); font-size: 9px; }
.community-goal-card { max-width: 760px; }
.creator-quest-card {
  max-width: 760px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(93, 247, 212, .3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(9, 34, 19, .96), rgba(8, 31, 30, .8));
}
.creator-quest-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.creator-quest-head span { color: var(--v65-accent-2); font-size: 10px; letter-spacing: .12em; }
.creator-quest-head h2 { margin: 3px 0 0; font-size: 16px; }
.creator-quest-head > strong { color: var(--v65-accent); }
.creator-quest-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.creator-quest-item { padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(0,0,0,.15); }
.creator-quest-item.done { border-color: rgba(155,230,77,.45); }
.creator-quest-item b, .creator-quest-item small { display: block; }
.creator-quest-item small { margin-top: 4px; color: var(--muted); }

.home-showcase-column { position: sticky; top: 100px; }
.podium-showcase, .museum-feature-card, .panel {
  border-radius: 12px;
}
.home-asset-hub { margin-top: clamp(52px, 8vw, 110px); }
.home-lower-grid { gap: 18px; }
.landing-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.artwork-card,
.hall-card,
.asset-card {
  overflow: hidden;
  border-radius: 12px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.artwork-card:hover,
.hall-card:hover,
.asset-card:hover {
  transform: translateY(-3px);
  border-color: var(--v65-accent);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}
.artwork-card img,
.artwork-card-preview img,
.hall-card img,
.asset-card img { image-rendering: pixelated; }
.artwork-card img[loading="lazy"], .asset-card img[loading="lazy"] { background: #071b0e; }

.site-footer {
  align-items: center;
  gap: 22px;
  border-top-width: 1px;
  border-radius: 12px;
}
.site-footer > div { display: grid; gap: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; }
.site-footer a, .site-footer .link-btn { color: var(--muted); text-decoration: none; }
.site-footer a:hover, .site-footer .link-btn:hover { color: var(--v65-accent); }

.modal { padding: 20px; backdrop-filter: blur(9px); }
.modal-card {
  border-width: 2px;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .65);
}
.modal-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
.modal-close:hover { background: rgba(255,255,255,.1); }

.skeleton {
  min-height: 180px;
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,.035) 25%, rgba(155,230,77,.11) 45%, rgba(255,255,255,.035) 65%);
  background-size: 250% 100%;
  animation: v65-shimmer 1.35s infinite linear;
}
@keyframes v65-shimmer { to { background-position-x: -250%; } }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 145px 1fr auto; }
  .online-ticker { display: none; }
  .logo-brand .site-logo-img { width: 136px; }
  .landing-grid { gap: 38px; }
  .v65-feature-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-width: 1px; border-radius: 8px; box-shadow: none; }
  .brand { justify-self: start; }
  #nav.nav { align-items: stretch; padding: 12px; }
  #nav.nav > .nav-btn, #nav.nav > .nav-more > summary { width: 100%; justify-content: center; }
  .nav-more-menu { position: static; width: 100%; box-shadow: none; }
  .landing-grid { grid-template-columns: 1fr; }
  .home-showcase-column { position: static; }
  .home-showcase-column { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
}

@media (max-width: 760px) {
  .floating-pixels { display: none; }
  main { padding: 24px 13px 96px; }
  .topbar { min-height: 64px; padding: 9px 11px; gap: 8px; }
  .logo-brand .site-logo-img { width: 118px; }
  .top-actions { gap: 5px; }
  .top-actions > .lang-select, .notification-btn { min-width: 42px; height: 42px; padding: 5px; }
  .hero-text h1 { margin-top: 15px; font-size: clamp(38px, 13vw, 60px); }
  .hero-text > p { font-size: 15px; line-height: 1.6; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .v65-prompt-card { grid-template-columns: 1fr auto; }
  .v65-prompt-card > span { grid-column: 1 / -1; }
  .v65-primary-actions { display: grid; grid-template-columns: 1fr; }
  .v65-feature-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-quest-list { grid-template-columns: 1fr; }
  .home-showcase-column { grid-template-columns: 1fr; }
  .landing-cards { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; }
  .site-footer nav { justify-content: flex-start; }
  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px max(7px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  }
  .mobile-bottom-nav button { min-width: 0; padding: 9px 3px; font-size: 9px; }
  .mobile-bottom-nav .mobile-create { color: #07130c; background: var(--v65-accent); border-color: var(--v65-accent); transform: translateY(-5px); }
}

@media (max-width: 420px) {
  .logo-brand .site-logo-img { width: 104px; }
  .top-actions .lang-select { display: none; }
  .v65-feature-rail { grid-template-columns: 1fr; }
}

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

/* =========================================================
   V66 ADAPTIVE VISUAL SYSTEM
   The core application keeps its existing variables while every visual layer
   now inherits from a single accessible theme palette.
========================================================= */
:root,
html[data-theme="forest"] {
  --theme-bg: #08150d;
  --theme-panel: #10291a;
  --theme-surface: #143620;
  --theme-accent: #8ddd4f;
  --theme-bright: #65e6c4;
  --theme-muted: #a9cdb2;
  --theme-ink: #071008;
}
html[data-theme="ocean"] { --theme-bg:#061421; --theme-panel:#0c2e45; --theme-surface:#103a55; --theme-accent:#45c9f5; --theme-bright:#88f5df; --theme-muted:#a9cbd9; --theme-ink:#041019; }
html[data-theme="sunset"] { --theme-bg:#1b1016; --theme-panel:#3a1b2a; --theme-surface:#4a2332; --theme-accent:#ff8b4d; --theme-bright:#ffcf6e; --theme-muted:#d9b5bd; --theme-ink:#180a08; }
html[data-theme="candy"] { --theme-bg:#190e22; --theme-panel:#35194a; --theme-surface:#48225e; --theme-accent:#ff71bd; --theme-bright:#7de8ff; --theme-muted:#d6b7e4; --theme-ink:#190820; }
html[data-theme="midnight"] { --theme-bg:#080b19; --theme-panel:#141b35; --theme-surface:#1d2746; --theme-accent:#7c91ff; --theme-bright:#57e4d0; --theme-muted:#aeb8d8; --theme-ink:#060817; }
html[data-theme="royal"] { --theme-bg:#120b21; --theme-panel:#281747; --theme-surface:#38205b; --theme-accent:#b982ff; --theme-bright:#ffd86a; --theme-muted:#c9b5dd; --theme-ink:#11081d; }
html[data-theme="ember"] { --theme-bg:#1a0c09; --theme-panel:#35150f; --theme-surface:#492016; --theme-accent:#ff7340; --theme-bright:#ffd65d; --theme-muted:#d5b5a8; --theme-ink:#170805; }
html[data-theme="winter"] { --theme-bg:#071624; --theme-panel:#102f46; --theme-surface:#173e58; --theme-accent:#77d8ff; --theme-bright:#f2fbff; --theme-muted:#b8d7e5; --theme-ink:#05121b; }
html[data-theme="newyear"] { --theme-bg:#090816; --theme-panel:#1e1638; --theme-surface:#2d2050; --theme-accent:#ffd35c; --theme-bright:#aa8cff; --theme-muted:#c9c0dc; --theme-ink:#120d08; }
html[data-theme="easter"] { --theme-bg:#151225; --theme-panel:#30264a; --theme-surface:#41345d; --theme-accent:#ff91c8; --theme-bright:#b8f28a; --theme-muted:#d5c7e3; --theme-ink:#140a16; }
html[data-theme="halloween"] { --theme-bg:#130a18; --theme-panel:#2c1237; --theme-surface:#40194d; --theme-accent:#ff812d; --theme-bright:#bd7cff; --theme-muted:#c9aecf; --theme-ink:#17080c; }

html[data-theme] {
  --bg: var(--theme-bg);
  --ink: var(--theme-ink);
  --panel: var(--theme-panel);
  --panel2: var(--theme-surface);
  --line: var(--theme-accent);
  --text: #f7fbf8;
  --muted: var(--theme-muted);
  --cyan: var(--theme-bright);
  --yellow: var(--theme-bright);
  --season-bg: var(--theme-bg);
  --season-panel: var(--theme-panel);
  --season-accent: var(--theme-accent);
  --season-bright: var(--theme-bright);
  --v65-bg: var(--theme-bg);
  --v65-surface: color-mix(in srgb, var(--theme-panel) 90%, transparent);
  --v65-surface-2: var(--theme-surface);
  --v65-border: color-mix(in srgb, var(--theme-accent) 36%, transparent);
  --v65-accent: var(--theme-accent);
  --v65-accent-2: var(--theme-bright);
  color-scheme: dark;
}

html, body { width: 100%; max-width: 100%; }
body {
  background:
    radial-gradient(circle at 13% -8%, color-mix(in srgb, var(--theme-accent) 25%, transparent), transparent 32rem),
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--theme-bright) 16%, transparent), transparent 30rem),
    linear-gradient(180deg, var(--theme-panel), var(--theme-bg) 34%, color-mix(in srgb, var(--theme-bg) 82%, #000));
  background-attachment: fixed;
  transition: background-color .3s ease, color .3s ease;
}
.bg-grid {
  z-index: 0;
  opacity: .46;
  background-image:
    linear-gradient(color-mix(in srgb, var(--theme-accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--theme-accent) 6%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.68) 46%, transparent 94%);
}
.floating-pixels { display: none !important; }
.pixel-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; }
.pixel-background i {
  position: absolute;
  left: var(--pixel-x);
  top: var(--pixel-y);
  width: var(--pixel-size);
  height: var(--pixel-size);
  opacity: .22;
  background: var(--theme-accent);
  box-shadow: 3px 3px 0 color-mix(in srgb, #000 36%, transparent);
  animation: pd-pixel-drift var(--pixel-duration) steps(12, end) var(--pixel-delay) infinite;
  will-change: transform;
}
.pixel-background i:nth-child(3n + 2) { background: var(--theme-bright); opacity: .16; }
.pixel-background i:nth-child(3n + 3) { background: color-mix(in srgb, var(--theme-accent) 48%, #fff); opacity: .12; }
@keyframes pd-pixel-drift {
  0%, 100% { transform: translate3d(0, 16px, 0) rotate(0); }
  25% { transform: translate3d(20px, -16px, 0) rotate(90deg); }
  50% { transform: translate3d(-8px, -42px, 0) rotate(180deg); }
  75% { transform: translate3d(-26px, -10px, 0) rotate(270deg); }
}
html[data-theme="winter"] .pixel-background i { background:#f4fcff; opacity:.34; animation-name:pd-pixel-snow; box-shadow:none; }
html[data-theme="winter"] .pixel-background i:nth-child(3n) { background:#76d8ff; }
@keyframes pd-pixel-snow { from { transform:translate3d(-12px,-22vh,0); } to { transform:translate3d(34px,108vh,0); } }
html[data-theme="newyear"] .pixel-background i { opacity:.33; animation-name:pd-pixel-firework; box-shadow:0 0 12px color-mix(in srgb,var(--theme-accent) 65%,transparent); }
@keyframes pd-pixel-firework { 0%,72%,100%{transform:scale(.25);opacity:.05} 78%{transform:scale(1.8);opacity:.7} 84%{transform:translate3d(18px,-22px,0) scale(.65);opacity:.15} }
html[data-theme="halloween"] .pixel-background i { animation-name:pd-pixel-haunt; }
@keyframes pd-pixel-haunt { 0%,100%{transform:translate3d(0,10px,0);opacity:.12} 42%{transform:translate3d(24px,-24px,0);opacity:.38} 46%{opacity:.05} 50%{opacity:.34} }

.topbar, main, .mobile-bottom-nav, .site-footer { position: relative; z-index: 2; }
.topbar {
  background: color-mix(in srgb, var(--theme-bg) 86%, transparent) !important;
  border-color: color-mix(in srgb, var(--theme-accent) 52%, transparent) !important;
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 12px 40px rgba(0,0,0,.28), inset 0 -1px 0 color-mix(in srgb,var(--theme-bright) 14%,transparent);
}
#nav.nav > .nav-btn:hover,
#nav.nav > .nav-more > summary:hover { background:color-mix(in srgb,var(--theme-accent) 11%,transparent); border-color:color-mix(in srgb,var(--theme-accent) 42%,transparent); }
#nav.nav > .nav-btn.active { color:var(--theme-bright); background:color-mix(in srgb,var(--theme-accent) 15%,transparent); border-color:color-mix(in srgb,var(--theme-accent) 46%,transparent); }
#nav.nav > .nav-create-btn,
.primary,
button.primary {
  color: var(--theme-ink) !important;
  border-color: color-mix(in srgb,var(--theme-bright) 72%,#fff) !important;
  background: linear-gradient(135deg,var(--theme-accent),color-mix(in srgb,var(--theme-bright) 78%,var(--theme-accent))) !important;
  box-shadow: 3px 3px 0 color-mix(in srgb,#000 72%,var(--theme-panel));
}
.secondary, button.secondary {
  color:var(--text);
  border-color:color-mix(in srgb,var(--theme-accent) 46%,transparent);
  background:color-mix(in srgb,var(--theme-panel) 86%,transparent);
}
.primary:hover, .secondary:hover { filter:brightness(1.08); }
.pill { border-color:color-mix(in srgb,var(--theme-accent) 54%,transparent); background:color-mix(in srgb,var(--theme-panel) 75%,transparent); }
.hero-text h1 { text-shadow:0 4px 0 color-mix(in srgb,#000 48%,transparent), 0 0 42px color-mix(in srgb,var(--theme-accent) 13%,transparent); }
.hero-stats div,
.v65-feature-rail > *,
.creator-quest-card,
.view .panel,
.view .artwork-card,
.view .asset-card,
.view .hall-card {
  border-color:color-mix(in srgb,var(--theme-accent) 25%,transparent);
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 84%,transparent),color-mix(in srgb,var(--theme-panel) 91%,transparent));
  box-shadow:0 16px 42px rgba(0,0,0,.17), inset 0 1px 0 rgba(255,255,255,.035);
}
.artwork-card:hover, .asset-card:hover, .hall-card:hover, .v65-feature-rail > *:hover {
  border-color:color-mix(in srgb,var(--theme-accent) 72%,transparent);
  box-shadow:0 18px 46px rgba(0,0,0,.27), 0 0 0 1px color-mix(in srgb,var(--theme-accent) 12%,transparent);
}
input, textarea, select {
  color:var(--text);
  border-color:color-mix(in srgb,var(--theme-accent) 32%,transparent) !important;
  background:color-mix(in srgb,var(--theme-bg) 84%,#000) !important;
}
input:focus, textarea:focus, select:focus { border-color:var(--theme-accent) !important; box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 14%,transparent); }
.modal { background:color-mix(in srgb,var(--theme-bg) 72%,transparent); }
.modal-card { border-color:color-mix(in srgb,var(--theme-accent) 62%,transparent); background:linear-gradient(180deg,var(--theme-surface),var(--theme-panel)); }
.nav-more-menu { background:color-mix(in srgb,var(--theme-bg) 96%,#000); }
.mobile-bottom-nav { background:color-mix(in srgb,var(--theme-bg) 94%,transparent) !important; border-color:color-mix(in srgb,var(--theme-accent) 55%,transparent) !important; backdrop-filter:blur(18px); }
.mobile-bottom-nav .mobile-create { color:var(--theme-ink) !important; background:var(--theme-accent) !important; border-color:var(--theme-bright) !important; }
.site-footer { border-color:color-mix(in srgb,var(--theme-accent) 22%,transparent); background:color-mix(in srgb,var(--theme-bg) 52%,transparent); }

/* Theme picker */
.theme-toggle-btn,
.theme-panel-close {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  border:1px solid color-mix(in srgb,var(--theme-accent) 42%,transparent);
  border-radius:9px;
  color:var(--theme-bright);
  background:color-mix(in srgb,var(--theme-panel) 82%,transparent);
  box-shadow:none;
}
.theme-toggle-btn { position:relative; font-size:20px; color:var(--theme-button-color,var(--theme-accent)); }
.theme-toggle-btn::after { content:""; position:absolute; right:5px; bottom:5px; width:6px; height:6px; background:var(--theme-bright); box-shadow:-7px 0 var(--theme-accent); }
.theme-toggle-btn:hover { border-color:var(--theme-accent); transform:translateY(-1px); }
.theme-panel {
  position:fixed;
  z-index:900;
  top:78px;
  right:clamp(12px,2vw,28px);
  width:min(440px,calc(100vw - 24px));
  max-height:calc(100dvh - 96px);
  overflow:auto;
  padding:20px;
  border:1px solid color-mix(in srgb,var(--theme-accent) 56%,transparent);
  border-radius:16px;
  color:var(--text);
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 97%,#000),color-mix(in srgb,var(--theme-bg) 97%,#000));
  box-shadow:0 28px 90px rgba(0,0,0,.58), 5px 5px 0 color-mix(in srgb,#000 72%,var(--theme-panel));
  backdrop-filter:blur(22px);
}
.theme-panel.hidden { display:none; }
.theme-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.theme-panel-head h2 { margin:3px 0 0; font-size:20px; }
.theme-panel-kicker { color:var(--theme-accent); font-size:10px; font-weight:900; letter-spacing:.16em; }
.theme-panel-close { color:var(--text); font-size:24px; }
.theme-panel-intro { margin:12px 0 16px; color:var(--muted); font-size:13px; line-height:1.55; }
.theme-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.theme-option {
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:66px;
  padding:10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  color:var(--text);
  background:rgba(255,255,255,.035);
  text-align:left;
  box-shadow:none;
}
.theme-option:hover { border-color:color-mix(in srgb,var(--theme-accent) 48%,transparent); background:rgba(255,255,255,.06); }
.theme-option.active { border-color:var(--theme-accent); background:color-mix(in srgb,var(--theme-accent) 12%,transparent); }
.theme-option-auto { grid-column:1 / -1; }
.theme-swatches { display:grid; grid-template-columns:repeat(2,12px); width:24px; height:24px; box-shadow:0 0 0 2px rgba(255,255,255,.15); }
.theme-swatches i { display:block; background:var(--swatch); }
.theme-option-copy { min-width:0; }
.theme-option-copy b, .theme-option-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.theme-option-copy b { font-size:12px; }
.theme-option-copy small { margin-top:4px; color:var(--muted); font-size:9px; }
.theme-option-check { opacity:0; color:var(--theme-accent); font-weight:900; }
.theme-option.active .theme-option-check { opacity:1; }
.theme-schedule { margin:14px 0 0; padding-top:12px; border-top:1px solid rgba(255,255,255,.08); color:var(--muted); font-size:10px; line-height:1.5; }

/* Responsive finishing pass */
@media (max-width: 980px) {
  .landing-grid { gap:26px; }
  .home-showcase-column { gap:12px; }
}
@media (max-width: 760px) {
  body { padding-bottom:calc(66px + env(safe-area-inset-bottom)); }
  main { width:100%; padding:18px 11px calc(92px + env(safe-area-inset-bottom)) !important; }
  .topbar { padding-top:max(7px,env(safe-area-inset-top)) !important; background:color-mix(in srgb,var(--theme-bg) 94%,transparent) !important; }
  #nav.nav.open,
  .nav.open {
    position:fixed !important;
    top:calc(62px + env(safe-area-inset-top));
    right:8px;
    left:8px;
    width:auto !important;
    max-height:calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding:10px !important;
    border:1px solid color-mix(in srgb,var(--theme-accent) 55%,transparent) !important;
    border-radius:14px;
    background:color-mix(in srgb,var(--theme-bg) 97%,#000) !important;
    box-shadow:0 24px 70px rgba(0,0,0,.62);
  }
  .mobile-lang-row { border-width:1px; border-color:color-mix(in srgb,var(--theme-accent) 30%,transparent); border-radius:9px; }
  .hero-text h1 { font-size:clamp(34px,12vw,54px); line-height:1; letter-spacing:-.045em; }
  .hero-text > p { font-size:15px; }
  .v65-primary-actions > *, .wide { width:100%; min-height:48px; }
  .hero-stats div { min-height:70px; padding:10px; }
  .hero-stats b { font-size:18px; }
  .theme-panel { top:auto; right:8px; bottom:calc(72px + env(safe-area-inset-bottom)); left:8px; width:auto; max-height:min(72dvh,680px); border-radius:16px 16px 10px 10px; padding:16px; }
  .pixel-background i:nth-child(n + 15) { display:none; }
  .modal { align-items:flex-end; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .modal-card { width:100%; max-height:calc(100dvh - 24px); overflow:auto; border-radius:16px 16px 10px 10px; padding:20px 16px; }
  input, textarea, select { font-size:16px; }
  button, a.nav-btn, summary { min-height:44px; }
  .site-footer { margin:12px 0 0; padding:16px 12px calc(76px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { padding-bottom:env(safe-area-inset-bottom) !important; }
}
@media (max-width: 480px) {
  .top-actions { gap:4px !important; }
  .theme-toggle-btn, .notification-btn, .install-pwa-btn { width:40px; height:40px; min-width:40px; }
  .hero-stats { gap:6px; }
  .v65-feature-rail { grid-template-columns:1fr 1fr; }
  .v65-feature-rail > * { padding:10px 8px; }
  .theme-grid { grid-template-columns:1fr; }
  .theme-option-auto { grid-column:auto; }
  .creator-quest-head { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 360px) {
  .logo-brand .site-logo-img { width:88px !important; }
  .brand.logo-brand { max-width:88px !important; }
  .v65-feature-rail { grid-template-columns:1fr; }
  .hero-text h1 { font-size:32px; }
}
@media (hover: none) {
  .artwork-card:hover, .hall-card:hover, .asset-card:hover { transform:none; }
}
@media (prefers-reduced-motion: reduce) {
  .pixel-background i { animation:none !important; opacity:.08; }
}
