:root {
  --bg: #0b0f17;
  --bg-soft: #121929;
  --bg-panel: rgba(18, 25, 40, 0.78);
  --bg-panel-strong: rgba(16, 23, 36, 0.92);
  --bg-elevated: rgba(24, 33, 50, 0.96);
  --text: #f4f1ea;
  --muted: #9da8bb;
  --line: rgba(168, 182, 209, 0.16);
  --line-strong: rgba(196, 208, 230, 0.26);
  --accent: #d7b26d;
  --accent-strong: #f0cd8b;
  --accent-ink: #1f1710;
  --success: #76d0a7;
  --warning: #ebb46b;
  --danger: #f18a8a;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.3);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.38;
  background:
    radial-gradient(circle at top left, rgba(215, 178, 109, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(116, 142, 184, 0.18), transparent 28%),
    linear-gradient(180deg, #0a0f18 0%, #101522 44%, #0c111a 100%);
  color-scheme: dark;
}

body.admin-shell,
body.gallery-shell,
body.public-shell,
body.login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.is-modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

small {
  color: var(--muted);
}

input,
textarea,
select,
button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(28, 36, 53, 0.86);
  color: #e3e9f4;
  padding: 0.58rem 0.7rem;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(164, 177, 198, 0.72);
}

select {
  appearance: none;
  background-image:
    linear-gradient(180deg, rgba(28, 36, 53, 0.92), rgba(25, 33, 49, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.25 4.5 6 8.25 9.75 4.5' fill='none' stroke='%23d7b26d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 0.8rem) 50%;
  background-size: auto, 12px;
  padding-right: 2.35rem;
}

option,
optgroup {
  background: #182132;
  color: #e6edf8;
}

select option:checked,
select option:hover,
select option:focus {
  background: #27344c;
  color: #f5f7fb;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  outline: none;
  border-color: rgba(240, 205, 139, 0.6);
  box-shadow: 0 0 0 3px rgba(215, 178, 109, 0.12);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input[type="file"] {
  padding: 0.26rem 0.3rem 0.26rem 0.32rem;
  border-style: dashed;
  border-color: rgba(104, 215, 171, 0.24);
  background:
    linear-gradient(180deg, rgba(20, 29, 44, 0.96), rgba(16, 24, 37, 0.94));
  color: rgba(199, 209, 224, 0.82);
}

input[type="file"]::file-selector-button {
  margin-right: 0.72rem;
  border: 1px solid rgba(104, 215, 171, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(104, 215, 171, 0.18), rgba(95, 122, 160, 0.16));
  color: #edf7f2;
  padding: 0.52rem 0.82rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

input[type="file"]::file-selector-button:hover {
  border-color: rgba(104, 215, 171, 0.46);
  background: linear-gradient(135deg, rgba(104, 215, 171, 0.26), rgba(95, 122, 160, 0.22));
  transform: translateY(-1px);
}

.file-picker {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.34rem 0.4rem;
  border: 1px dashed rgba(104, 215, 171, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 29, 44, 0.96), rgba(16, 24, 37, 0.94));
  cursor: pointer;
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.5rem 0.82rem;
  border-radius: 10px;
  border: 1px solid rgba(104, 215, 171, 0.28);
  background: linear-gradient(135deg, rgba(104, 215, 171, 0.18), rgba(95, 122, 160, 0.16));
  color: #edf7f2;
  font-weight: 700;
}

.file-picker-text {
  min-width: 0;
  color: rgba(199, 209, 224, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-shell {
  position: relative;
  padding: 0.8rem 0.8rem 0;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(215, 178, 109, 0.14), transparent 20%),
    radial-gradient(circle at 85% 0%, rgba(78, 102, 137, 0.14), transparent 24%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.7rem;
  padding: 0.72rem 0.9rem;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 17, 27, 0.8);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.site-logo {
  display: block;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.site-logo-admin,
.site-logo-login,
.site-logo-legal {
  width: 46px;
  height: 46px;
  padding: 0.35rem;
}

.site-logo-hero {
  width: 48px;
  height: 48px;
  padding: 0.38rem;
}

.site-logo-footer {
  width: 34px;
  height: 34px;
  padding: 0.3rem;
  border-radius: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(240, 205, 139, 0.95), rgba(180, 144, 83, 0.75));
  color: #1d1711;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark-footer {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.74rem;
}

.brand {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-subtitle,
.page-subtitle,
.panel-subtitle,
.hero-subtitle,
.thumb-copy,
.viewer-description,
.micro-copy {
  color: var(--muted);
}

.page-subtitle,
.panel-subtitle,
.hero-subtitle,
.viewer-description {
  font-size: 0.82rem;
  line-height: 1.34;
}

.brand-subtitle,
.eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent-strong);
}

h2 {
  font-size: 1rem;
}

h3 {
  font-size: 1.02rem;
}

h4 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.topnav a {
  padding: 0.42rem 0.66rem;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
  font-size: 0.8rem;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.content {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.content-shell {
  display: grid;
  gap: 0.7rem;
  flex: 1;
  align-content: start;
}

.content-admin {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.page-head-rich {
  padding: 0.15rem 0 0.25rem;
}

.page-head h1,
.customer-hero h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.page-metrics,
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.metric-chip,
.stat-card {
  min-width: 98px;
  padding: 0.54rem 0.66rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 88px;
}

.metric-chip span,
.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-chip strong,
.stat-card strong,
.meta-item strong {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.94rem;
}

.panel,
.login-card,
.viewer-card,
.sub-panel,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.panel,
.login-card,
.viewer-card,
.sub-panel {
  padding: 0.88rem;
}

.compact-panel {
  padding: 0.72rem;
}

.content-admin .panel,
.content-admin .sub-panel,
.content-admin .stat-card {
  padding: 0.74rem;
}

.panel-header,
.viewer-head,
.strip-header,
.model-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.upload-panel,
.model-card,
.viewer-card,
.customer-hero.premium {
  position: relative;
  overflow: hidden;
}

.upload-panel::before,
.model-card::before,
.viewer-card::before,
.customer-hero.premium::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 205, 139, 0.45), transparent);
}

.notice {
  padding: 0.68rem 0.82rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 205, 139, 0.2);
  background: rgba(215, 178, 109, 0.08);
}

.notice-error {
  margin-bottom: 1rem;
  border-color: rgba(241, 138, 138, 0.3);
  background: rgba(241, 138, 138, 0.1);
  color: #ffdada;
}

.success-panel {
  border-color: rgba(118, 208, 167, 0.3);
  background: rgba(118, 208, 167, 0.1);
}

.stack-form,
.stack-list {
  display: grid;
  gap: 0.5rem;
}

.inline-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.inline-group-stack {
  flex-direction: column;
  align-items: stretch;
}

.inline-group-spread {
  justify-content: space-between;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.form-grid-3 {
  grid-template-columns: 1.1fr 0.9fr 1fr;
}

.stack-form > .btn,
.form-grid > .btn,
.form-grid-3 > .btn {
  justify-self: start;
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.btn-sm {
  padding: 0.42rem 0.68rem;
  font-size: 0.78rem;
}

.btn-primary {
  border-color: rgba(240, 205, 139, 0.5);
  background: linear-gradient(135deg, rgba(240, 205, 139, 0.96), rgba(194, 153, 89, 0.92));
  color: var(--accent-ink);
  font-weight: 700;
}

.btn-secondary {
  border-color: rgba(172, 188, 216, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.btn-subtle {
  border-color: rgba(172, 188, 216, 0.18);
  background: rgba(255, 255, 255, 0.025);
}

.btn-danger {
  border-color: rgba(241, 138, 138, 0.3);
  background: rgba(241, 138, 138, 0.12);
  color: #ffd3d3;
}

.btn:hover,
.media-list-item:hover,
.thumb:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  padding: 0.18rem 0.46rem;
  border-radius: 999px;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e8edf7;
}

.badge-success {
  background: rgba(118, 208, 167, 0.14);
  border-color: rgba(118, 208, 167, 0.32);
  color: #cbf3de;
}

.badge-warn {
  background: rgba(235, 180, 107, 0.12);
  border-color: rgba(235, 180, 107, 0.3);
  color: #ffe2ba;
}

.badge-danger {
  background: rgba(241, 138, 138, 0.12);
  border-color: rgba(241, 138, 138, 0.3);
  color: #ffd3d3;
}

.stats-grid,
.diag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.dashboard-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-grid {
  align-items: start;
}

.stat-card-highlight {
  background:
    radial-gradient(circle at top right, rgba(104, 215, 171, 0.22), transparent 46%),
    linear-gradient(180deg, rgba(15, 24, 38, 0.98), rgba(11, 18, 29, 0.96));
}

.stat-card-highlight-alt {
  background:
    radial-gradient(circle at top right, rgba(240, 205, 139, 0.22), transparent 46%),
    linear-gradient(180deg, rgba(15, 24, 38, 0.98), rgba(11, 18, 29, 0.96));
}

.stat-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.analytics-panel {
  display: grid;
  gap: 0.8rem;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 230px;
  padding: 0.9rem 0.85rem 0.65rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(12, 17, 27, 0.82), rgba(12, 17, 27, 0.96));
}

.trend-column {
  display: grid;
  gap: 0.45rem;
  align-items: end;
}

.trend-bars {
  display: grid;
  grid-auto-flow: column;
  align-items: end;
  justify-content: center;
  gap: 0.28rem;
  min-height: 160px;
}

.trend-bar {
  width: 14px;
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.trend-bar-views {
  background: linear-gradient(180deg, rgba(240, 205, 139, 0.96), rgba(207, 153, 66, 0.78));
}

.trend-bar-visitors {
  background: linear-gradient(180deg, rgba(104, 215, 171, 0.96), rgba(80, 145, 123, 0.78));
}

.trend-meta {
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  text-align: center;
}

.trend-meta strong {
  font-size: 0.86rem;
}

.trend-meta span {
  color: var(--muted);
  font-size: 0.72rem;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-swatch-views {
  background: linear-gradient(180deg, rgba(240, 205, 139, 0.96), rgba(207, 153, 66, 0.78));
}

.legend-swatch-visitors {
  background: linear-gradient(180deg, rgba(104, 215, 171, 0.96), rgba(80, 145, 123, 0.78));
}

.analytics-list,
.country-bars {
  display: grid;
  gap: 0.56rem;
}

.analytics-row,
.country-row {
  display: grid;
  gap: 0.42rem;
  padding: 0.72rem 0.78rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.analytics-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.analytics-row-copy,
.analytics-row-value,
.country-row-copy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.analytics-row-copy strong,
.country-row-copy strong {
  min-width: 0;
}

.analytics-row-value {
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.74rem;
}

.analytics-row-value strong {
  color: var(--text);
  font-size: 0.95rem;
}

.country-row-copy {
  justify-content: space-between;
}

.country-row-copy span {
  color: var(--muted);
  font-size: 0.74rem;
}

.country-row-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.country-row-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(104, 215, 171, 0.94), rgba(95, 122, 160, 0.86));
}

.admin-grid-2,
.admin-grid-3 {
  display: grid;
  gap: 0.6rem;
}

.admin-grid-2 {
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.35fr);
}

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

.activity-list li,
.diag-grid li,
.action-row,
.action-card {
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.activity-stream {
  list-style: none;
  padding: 0;
  margin: 0.55rem 0 0;
  display: grid;
  gap: 0.42rem;
}

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.58rem 0.66rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.activity-copy {
  display: grid;
  gap: 0.12rem;
}

.activity-copy strong {
  font-size: 0.84rem;
}

.activity-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.42rem;
  margin-top: 0.55rem;
}

.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.action-card {
  gap: 0.5rem;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 0.68rem 0.72rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.content-admin .table th,
.content-admin .table td,
.table-compact th,
.table-compact td {
  padding: 0.54rem 0.6rem;
}

.table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.media-browser-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
}

.media-browser-rail {
  display: grid;
  gap: 0.68rem;
  position: sticky;
  top: 82px;
  padding: 0.74rem;
}

.media-browser-detail {
  display: grid;
}

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.media-tab-label,
.media-title-lockup,
.status-text {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-width: 0;
}

.status-text {
  padding: 0.18rem 0.44rem;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1;
}

.media-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}

.media-icon svg {
  width: 100%;
  height: 100%;
}

.media-icon-inline {
  width: 0.85rem;
  height: 0.85rem;
}

.media-tab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.44rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.media-tab strong {
  font-size: 0.72rem;
  color: var(--text);
}

.media-tab.active {
  color: var(--accent-ink);
  border-color: rgba(240, 205, 139, 0.5);
  background: linear-gradient(135deg, rgba(240, 205, 139, 0.95), rgba(200, 161, 95, 0.9));
}

.media-tab-tone-interactive.active {
  color: #e7f1ff;
  border-color: rgba(116, 172, 255, 0.45);
  background: linear-gradient(135deg, rgba(62, 105, 176, 0.96), rgba(95, 143, 216, 0.88));
}

.media-tab-tone-image.active {
  color: #1f1710;
  border-color: rgba(240, 205, 139, 0.45);
  background: linear-gradient(135deg, rgba(240, 205, 139, 0.98), rgba(208, 160, 76, 0.9));
}

.media-tab-tone-audio.active {
  color: #0f1b14;
  border-color: rgba(104, 215, 171, 0.45);
  background: linear-gradient(135deg, rgba(104, 215, 171, 0.96), rgba(76, 184, 139, 0.88));
}

.media-tab-tone-file.active {
  color: #eef1f8;
  border-color: rgba(158, 170, 203, 0.34);
  background: linear-gradient(135deg, rgba(73, 84, 108, 0.96), rgba(52, 61, 79, 0.92));
}

.media-list,
.thumb-list {
  display: grid;
  gap: 0.5rem;
}

.media-list {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.12rem;
}

.media-list-item,
.thumb {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.56rem;
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  transition: 180ms ease;
  align-items: start;
  overflow: hidden;
}

.media-list-item-audio,
.thumb-audio {
  box-shadow: inset 0 0 0 1px rgba(104, 215, 171, 0.08);
}

.media-list-item-image,
.thumb-image {
  box-shadow: inset 0 0 0 1px rgba(240, 205, 139, 0.08);
}

.media-list-item-interactive,
.thumb-interactive {
  box-shadow: inset 0 0 0 1px rgba(101, 153, 233, 0.08);
}

.media-list-item.active,
.thumb.active {
  border-color: rgba(240, 205, 139, 0.48);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.media-list-thumb,
.thumb-media {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  min-height: 84px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  align-self: start;
  flex-shrink: 0;
}

.media-list-thumb-image,
.thumb-media-image {
  background:
    linear-gradient(180deg, rgba(24, 32, 46, 0.96), rgba(17, 23, 34, 0.98)),
    radial-gradient(circle at top, rgba(240, 205, 139, 0.12), transparent 54%);
}

.media-list-thumb-audio,
.thumb-media-audio {
  background:
    linear-gradient(180deg, rgba(15, 30, 26, 0.92), rgba(15, 23, 34, 0.98)),
    radial-gradient(circle at top, rgba(104, 215, 171, 0.16), transparent 54%);
}

.media-list-thumb-interactive,
.thumb-media-interactive {
  background:
    linear-gradient(180deg, rgba(17, 28, 49, 0.94), rgba(15, 22, 34, 0.98)),
    radial-gradient(circle at top, rgba(95, 143, 216, 0.16), transparent 54%);
}

.media-list-copy,
.thumb-body {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.media-list-copy strong,
.thumb-title-row strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.media-detail-panel {
  display: grid;
  gap: 0.72rem;
}

.media-detail-top {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
}

.media-detail-panel[data-media-kind="audio"] .media-detail-top,
.media-detail-panel[data-media-kind="image"] .media-detail-top,
.media-detail-panel[data-media-kind="file"] .media-detail-top {
  grid-template-columns: 240px minmax(0, 1fr);
}

.model-stage-wrap {
  display: grid;
  gap: 0.5rem;
}

.model-stage,
.preview-holder,
.preview-media,
.thumb-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(240, 205, 139, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(12, 17, 27, 0.96), rgba(18, 25, 40, 0.98));
}

.model-stage {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.model-stage-image-image,
.model-stage-image-audio,
.media-thumb-image-image {
  object-fit: contain;
  padding: 0.45rem;
}

.media-thumb-image-audio {
  object-fit: contain;
  padding: 0.3rem;
}

.model-stage-image,
.preview-media img,
.thumb-media img,
.selected-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-list-thumb .media-thumb-image,
.thumb-media .media-thumb-image,
.preview-holder .selected-preview,
.model-stage .model-stage-image-image,
.model-stage .model-stage-image-audio,
.model-stage .model-stage-image-file {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.media-list-thumb .media-thumb-image-interactive,
.thumb-media .media-thumb-image-interactive,
.model-stage .model-stage-image-interactive {
  object-fit: cover;
  padding: 0;
}

.model-stage-empty,
.preview-media-empty,
.thumb-media-empty,
.preview-fallback,
.preview-skeleton {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.thumb-media-empty {
  gap: 0.3rem;
  font-size: 0.76rem;
}

.thumb-media-empty .media-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.preview-skeleton {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.model-stage-empty strong {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--text);
}

.media-action-stack {
  display: grid;
  gap: 0.42rem;
}

.media-icon-stage {
  width: 1.5rem;
  height: 1.5rem;
  color: #76d0a7;
}

.model-stage-audio-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
}

.model-stage-audio-poster {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0.8rem;
}

.model-stage-audio-controls {
  display: grid;
  gap: 0.32rem;
  padding: 0.62rem 0.72rem 0.72rem;
  border-top: 1px solid var(--line);
  background: rgba(10, 17, 27, 0.86);
}

.model-stage-audio-player {
  width: 100%;
  max-width: 100%;
}

.model-stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.replace-file-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.replace-file-form input[type="file"] {
  min-width: 0;
  padding: 0.42rem 0.55rem;
}

.micro-copy {
  font-size: 0.76rem;
  line-height: 1.32;
}

.model-card-body {
  display: grid;
  gap: 0.7rem;
}

.media-detail-head {
  display: grid;
  gap: 0.62rem;
  min-width: 0;
}

.model-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) repeat(4, minmax(110px, 0.85fr));
  gap: 0.45rem;
}

.meta-item {
  padding: 0.62rem 0.72rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.meta-item-wide {
  min-width: 0;
}

.wrap-anywhere,
.meta-item strong,
.preview-error {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.media-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.preview-library {
  display: grid;
  gap: 0.55rem;
}

.preview-tile {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: stretch;
  padding: 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.preview-media {
  min-height: 72px;
}

.preview-tile-actions {
  display: grid;
  align-content: center;
  gap: 0.35rem;
}

.preview-error,
.error {
  color: #ffd2d2;
}

.model-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
}

.mono,
code {
  font-family: "Consolas", "Cascadia Code", monospace;
}

.upload-progress {
  display: grid;
  gap: 0.35rem;
}

.upload-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.upload-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(240, 205, 139, 0.8), rgba(118, 208, 167, 0.88));
  transition: width 140ms ease;
}

.upload-progress-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.generated-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.generated-link code {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.48rem 0.62rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  word-break: break-all;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.qr-thumb {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.gallery-shell {
  padding: 0.82rem 0.82rem 0;
}

.public-shell {
  padding: 0.82rem 0.82rem 0;
}

.public-stage {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: 0.8rem;
}

.gallery-layout {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}

.gallery-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.72rem;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.customer-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 0.96rem 1.04rem;
  flex: none;
}

.customer-hero.premium {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 17, 27, 0.8);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.share-hero {
  align-self: start;
}

.hero-lockup {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.logo-dot {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 205, 139, 0.94), rgba(95, 122, 160, 0.92));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  color: #16120d;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.site-logo-hero {
  width: 68px;
  height: 68px;
  padding: 0.44rem;
  border-radius: 18px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0.72rem;
  max-width: none;
  margin: 0;
  align-items: start;
}

.model-strip {
  display: grid;
  gap: 0.55rem;
  align-self: start;
  position: sticky;
  top: 82px;
}

.thumb-list {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 0.2rem;
}

.thumb-copy {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.thumb-title-row,
.thumb-footer,
.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.thumb-preview-status {
  font-size: 0.72rem;
  color: var(--muted);
}

.viewer-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.preview-holder {
  width: 152px;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  padding: 0.4rem;
}

.selected-preview {
  min-height: 0;
}

.preview-holder .selected-preview {
  border-radius: 18px;
}

.preview-fallback-audio {
  gap: 0.4rem;
  justify-items: start;
  align-content: center;
  padding: 0.7rem 0.82rem;
}

.preview-audio-glyph {
  display: inline-block;
  width: 100%;
  height: 26px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0, transparent 2%, rgba(104, 215, 171, 0.95) 2%, rgba(104, 215, 171, 0.95) 4%, transparent 4%, transparent 8%, rgba(240, 205, 139, 0.95) 8%, rgba(240, 205, 139, 0.95) 10%, transparent 10%, transparent 14%, rgba(104, 215, 171, 0.95) 14%, rgba(104, 215, 171, 0.95) 16%, transparent 16%, transparent 20%, rgba(240, 205, 139, 0.95) 20%, rgba(240, 205, 139, 0.95) 22%, transparent 22%, transparent 26%, rgba(104, 215, 171, 0.95) 26%, rgba(104, 215, 171, 0.95) 28%, transparent 28%, transparent 32%, rgba(240, 205, 139, 0.95) 32%, rgba(240, 205, 139, 0.95) 34%, transparent 34%, transparent 38%, rgba(104, 215, 171, 0.95) 38%, rgba(104, 215, 171, 0.95) 40%, transparent 40%, transparent 44%, rgba(240, 205, 139, 0.95) 44%, rgba(240, 205, 139, 0.95) 46%, transparent 46%, transparent 50%, rgba(104, 215, 171, 0.95) 50%, rgba(104, 215, 171, 0.95) 52%, transparent 52%, transparent 56%, rgba(240, 205, 139, 0.95) 56%, rgba(240, 205, 139, 0.95) 58%, transparent 58%, transparent 62%, rgba(104, 215, 171, 0.95) 62%, rgba(104, 215, 171, 0.95) 64%, transparent 64%, transparent 68%, rgba(240, 205, 139, 0.95) 68%, rgba(240, 205, 139, 0.95) 70%, transparent 70%, transparent 74%, rgba(104, 215, 171, 0.95) 74%, rgba(104, 215, 171, 0.95) 76%, transparent 76%, transparent 80%, rgba(240, 205, 139, 0.95) 80%, rgba(240, 205, 139, 0.95) 82%, transparent 82%, transparent 86%, rgba(104, 215, 171, 0.95) 86%, rgba(104, 215, 171, 0.95) 88%, transparent 88%, transparent 92%, rgba(240, 205, 139, 0.95) 92%, rgba(240, 205, 139, 0.95) 94%, transparent 94%, transparent 100%);
}

.viewer-shell {
  position: relative;
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(240, 205, 139, 0.08), transparent 28%),
    linear-gradient(180deg, #0b1220, #101827 48%, #0b1018);
  isolation: isolate;
}

.viewer-shell-audio {
  min-height: 320px;
}

.media-detail-panel[data-media-kind="audio"] .model-stage,
.media-detail-panel[data-media-kind="image"] .model-stage,
.media-detail-panel[data-media-kind="file"] .model-stage {
  min-height: 170px;
}

.viewer-shell-audio .viewer-pane-audio {
  padding: 0.75rem;
}

.viewer-pane {
  position: absolute;
  inset: 0;
}

.viewer-pane-canvas canvas,
.viewer-image {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-image {
  object-fit: contain;
  background:
    radial-gradient(circle at top, rgba(240, 205, 139, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(12, 17, 27, 0.92), rgba(18, 25, 40, 0.98));
}

.viewer-pane-audio {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.audio-card {
  display: grid;
  gap: 0.6rem;
  width: min(560px, 100%);
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 23, 36, 0.92);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

.audio-card audio {
  display: none;
}

.audio-visualizer {
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 16, 24, 0.94), rgba(16, 26, 34, 0.98));
}

.audio-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.audio-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.audio-timeline {
  width: 100%;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
}

.inspector-backdrop {
  align-items: center;
}

.inspector-dialog {
  width: min(980px, calc(100vw - 1.5rem));
  display: grid;
  gap: 0.7rem;
}

.inspector-shell {
  min-height: 520px;
}

.settings-branding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0.7rem;
}

.settings-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.settings-intro-field textarea {
  min-height: 120px;
}

.field-stack {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.settings-logo-card,
.legal-card {
  padding: 0.78rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.settings-logo-card {
  display: grid;
  gap: 0.45rem;
}

.settings-logo-preview {
  width: 100%;
  max-height: 104px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  padding: 0.45rem;
}

.settings-logo-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.share-preview-shell {
  display: grid;
  gap: 0.72rem;
  flex: 1;
  align-content: start;
}

.share-viewer-card {
  width: 100%;
}

.public-message-shell,
.store-shell {
  display: grid;
  gap: 0.8rem;
  flex: 1;
  align-content: start;
}

.public-message-shell {
  display: flex;
  min-height: calc(100vh - 180px);
  align-items: center;
  justify-content: center;
}

.public-message-card {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  padding: 1.4rem;
  width: min(820px, 100%);
}

.public-message-card .hero-lockup {
  justify-content: center;
  text-align: left;
}

.public-message-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.store-card {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
}

.store-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(240, 205, 139, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(12, 17, 27, 0.98), rgba(18, 25, 40, 0.98));
  padding: 0.45rem;
}

.store-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.store-card-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.store-card-copy {
  display: grid;
  gap: 0.25rem;
}

.store-card-copy h2 {
  font-size: 1rem;
  line-height: 1.15;
}

.store-card-price {
  color: var(--accent);
  font-weight: 700;
}

.store-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-store-panel {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.2rem;
}

.settings-store-import {
  grid-column: span 2;
}

.settings-store-list {
  display: grid;
  gap: 0.45rem;
  max-height: 210px;
  overflow: auto;
}

.settings-store-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-store-item span {
  color: var(--muted);
  white-space: nowrap;
}

.settings-store-editor {
  display: grid;
  gap: 0.7rem;
}

.settings-store-product {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.settings-store-product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 55%),
    rgba(12, 18, 30, 0.88);
}

.settings-store-product-image,
.settings-store-product-empty {
  width: 100%;
  height: 100%;
  display: block;
}

.settings-store-product-image {
  object-fit: cover;
}

.settings-store-product-empty {
  display: grid;
  place-items: center;
}

.settings-store-product-copy {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.settings-store-product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.settings-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.settings-inline-actions form {
  margin: 0;
}

.settings-store-product-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.field-span-2 {
  grid-column: span 2;
}

.legal-panel {
  display: grid;
  gap: 0.9rem;
}

.legal-head {
  display: grid;
  gap: 0.45rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.legal-card {
  display: grid;
  gap: 0.34rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 1440px;
  width: 100%;
  margin: auto auto 0;
  padding: 0.72rem 0.82rem max(0.72rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 21, 33, 0.18), rgba(15, 21, 33, 0.58)),
    rgba(8, 12, 19, 0.2);
  color: var(--muted);
  font-size: 0.74rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

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

.gallery-layout .site-footer,
.gallery-stage + .site-footer {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer-lockup,
.site-footer-meta,
.site-footer-copy {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.site-footer-lockup {
  min-width: 0;
}

.site-footer-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
}

.site-footer-copy strong {
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1;
}

.site-footer-meta {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  color: var(--text);
}

.viewer-pane-canvas.switching {
  opacity: 0.82;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 19, 0.58);
  backdrop-filter: blur(5px);
  z-index: 2;
}

.viewer-message {
  min-height: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.viewer-message[data-tone="error"] {
  color: #ffd1d1;
}

.viewer-message[data-tone="warn"] {
  color: #ffe0bc;
}

.badge-tone-interactive {
  background: rgba(70, 118, 196, 0.18);
  border-color: rgba(116, 172, 255, 0.28);
  color: #cfe2ff;
}

.badge-tone-image {
  background: rgba(240, 205, 139, 0.16);
  border-color: rgba(240, 205, 139, 0.3);
  color: #ffe3ad;
}

.badge-tone-audio {
  background: rgba(104, 215, 171, 0.16);
  border-color: rgba(104, 215, 171, 0.3);
  color: #cef6e6;
}

.badge-tone-file {
  background: rgba(137, 149, 179, 0.15);
  border-color: rgba(168, 182, 209, 0.24);
  color: #dde5f4;
}

.status-tone-ready {
  color: #8cdfb3;
  border-color: rgba(104, 215, 171, 0.26);
  background: rgba(104, 215, 171, 0.12);
}

.status-tone-pending {
  color: #ffd59d;
  border-color: rgba(240, 205, 139, 0.24);
  background: rgba(240, 205, 139, 0.11);
}

.status-tone-failed {
  color: #ffb5b5;
  border-color: rgba(241, 138, 138, 0.24);
  background: rgba(241, 138, 138, 0.1);
}

.status-tone-neutral {
  color: var(--muted);
  border-color: rgba(168, 182, 209, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.select-control {
  min-width: 180px;
}

.diag-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}

.diag-grid li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.42rem;
}

.status-list li,
.log-entry {
  padding: 0.54rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.log-columns {
  columns: 2;
  column-gap: 0.6rem;
}

.log-columns.single-row {
  columns: 1;
}

.log-entry {
  display: grid;
  gap: 0.32rem;
  break-inside: avoid;
  margin: 0 0 0.55rem;
}

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

.empty-state {
  padding: 0.72rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
}

.toast-stack {
  position: fixed;
  right: 10px;
  bottom: 10px;
  display: grid;
  gap: 0.4rem;
  z-index: 80;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 0.68rem 0.82rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 17, 27, 0.94);
  box-shadow: var(--shadow);
  transform: translateY(8px);
  opacity: 0;
  transition: 180ms ease;
}

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

.toast-success {
  border-color: rgba(118, 208, 167, 0.32);
}

.toast-error {
  border-color: rgba(241, 138, 138, 0.32);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 90;
}

.dialog {
  width: min(420px, calc(100vw - 2rem));
  padding: 0.88rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 23, 36, 0.98);
  box-shadow: var(--shadow);
}

.dialog-message {
  margin: 0.55rem 0 0.8rem;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.login-shell {
  padding: 0.85rem;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 440px);
  gap: 0.75rem;
  width: min(1040px, 100%);
  margin: auto auto 0;
  flex: 1;
}

.login-stage-copy,
.login-stage-panel {
  padding: 0.95rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.login-stage-copy {
  display: grid;
  align-content: end;
  gap: 0.55rem;
}

.login-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.login-card h1 {
  margin-bottom: 0.7rem;
}

.mt-md {
  margin-top: 0.7rem;
}

.hidden,
#downloadBtn.hidden {
  display: none !important;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1200px) {
  .admin-grid-2,
  .admin-grid-3,
  .media-browser-shell,
  .media-detail-top,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .media-browser-rail,
  .model-strip {
    position: static;
  }

  .media-list,
  .thumb-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .log-columns {
    columns: 1;
  }

  .media-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trend-chart {
    min-height: 210px;
  }

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

  .topbar,
  .page-head,
  .customer-hero,
  .model-card-header,
  .viewer-head {
    flex-direction: column;
  }

  .stats-grid,
  .diag-grid,
  .diag-grid-compact,
  .model-meta-grid,
  .media-detail-grid,
  .form-grid,
  .form-grid-3,
  .diag-columns,
  .settings-compact-grid,
  .store-grid {
    grid-template-columns: 1fr 1fr;
  }

  .preview-tile {
    grid-template-columns: 1fr;
  }

  .preview-holder {
    width: 100%;
  }

  .settings-branding-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-shell,
  .gallery-shell,
  .public-shell,
  .login-shell {
    padding: 0.75rem;
  }

  .topnav,
  .media-list,
  .thumb-list,
  .stats-grid,
  .diag-grid,
  .diag-grid-compact,
  .model-meta-grid,
  .media-detail-grid,
  .form-grid,
  .form-grid-3,
  .diag-columns,
  .login-stage,
  .settings-compact-grid,
  .store-grid {
    grid-template-columns: 1fr;
  }

  .settings-store-product,
  .settings-store-product-fields {
    grid-template-columns: 1fr;
  }

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

  .settings-store-import {
    grid-column: auto;
  }

  .public-message-card .hero-lockup,
  .store-card-actions {
    justify-content: flex-start;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .analytics-row,
  .country-row {
    grid-template-columns: 1fr;
  }

  .trend-chart {
    gap: 0.4rem;
    padding-inline: 0.55rem;
  }

  .trend-bar {
    width: 11px;
  }

  .media-list-item,
  .thumb {
    grid-template-columns: 1fr;
  }

  .viewer-shell {
    min-height: 440px;
  }

  .inspector-shell {
    min-height: 420px;
  }

  .model-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-meta {
    margin-left: 0;
    justify-content: flex-start;
  }
}
