:root {
  --white: #ffffff;
  --black: #000000;
  --orange-050: #fff1e8;
  --orange-500: #ff6f19;
  --orange-600: #e05e12;
  --grey-050: #f4f4f4;
  --grey-100: #e6e6e6;
  --grey-200: #c9c9c9;
  --grey-300: #9b9b9b;
  --grey-400: #6e6e6e;
  --grey-600: #303030;
  --grey-700: #1f1f1f;
  --grey-800: #161616;
  --surface-page: #ffffff;
  --surface-card: #ffffff;
  --surface-subtle: #f4f4f4;
  --text-heading: #000000;
  --text-body: #000000;
  --text-muted: #6e6e6e;
  --text-accent: #ff6f19;
  --border-hairline: #e6e6e6;
  --border-strong: #c9c9c9;
  --font-brand: "Blinker", "Blinker Fallback", system-ui, "Segoe UI", sans-serif;
  --text-display-m: clamp(2.25rem, 3.6vw, 3rem);
  --text-heading-l: 2rem;
  --text-heading-m: 1.5rem;
  --text-heading-s: 1.25rem;
  --text-body-l: 1.125rem;
  --text-body-m: 1rem;
  --text-body-s: 0.875rem;
  --text-label: 0.75rem;
  --weight-regular: 400;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --leading-display: 1.02;
  --leading-tight: 1.12;
  --leading-light-surface: 1.2;
  --leading-body: 1.5;
  --tracking-display: -0.025em;
  --tracking-heading: -0.015em;
  --radius-card: 20px;
  --radius-panel: 30px;
  --radius-hero: 40px;
  --radius-pill: 999px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --container: 1240px;
  --container-narrow: 760px;
  --shadow-s: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-l: 0 20px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow-orange: 0 12px 32px rgba(255, 111, 25, 0.32);
  --gradient-text: linear-gradient(96deg, #ff6f19 0%, #8e3b73 62%, #8325ff 100%);
  --gradient-scrim-bottom: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 38%, rgba(0, 0, 0, 0) 100%);
  --duration-fast: 160ms;
  --duration-base: 240ms;
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--surface-page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-brand);
  font-weight: var(--weight-regular);
  font-size: var(--text-body-m);
  line-height: var(--leading-body);
  color: var(--text-body);
  background: var(--surface-page);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  min-height: 72px;
  padding: var(--space-4) var(--space-10);
  background: var(--white);
  border-bottom: 1px solid var(--border-hairline);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--orange-050);
}

.site-nav a[aria-current='page'] {
  background: var(--black);
  color: var(--white);
}

.wordmark {
  font-size: var(--text-heading-s);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-heading);
  text-decoration: none;
  line-height: 1;
}

.wordmark strong {
  font-weight: var(--weight-extrabold);
}

.page {
  width: min(var(--container), calc(100% - 2 * var(--space-10)));
  margin: 0 auto;
  padding: var(--space-16) 0 var(--space-20);
}

.section-label {
  margin: 0 0 var(--space-3);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.headline {
  margin: 0;
  max-width: 18ch;
  font-size: var(--text-display-m);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.headline-section {
  margin: 0 0 var(--space-8);
  max-width: none;
  font-size: var(--text-heading-l);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}

.gradient-text {
  background-image: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: var(--container-narrow);
  margin: var(--space-6) 0 0;
  font-size: var(--text-body-l);
  line-height: var(--leading-light-surface);
}

.filter-rows {
  display: flex;
  flex-direction: column;
  margin: var(--space-6) 0 var(--space-5);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-10) 0 var(--space-8);
}

.filter-rows .filters {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
}

.filter-line {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--border-hairline);
}

.filter-rows .filters:first-child .filter-line:first-child {
  padding-top: 0;
  border-top: 0;
}

.filter-values {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}

.filter-label {
  margin: 0;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-body-s);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  cursor: pointer;
}

.filter-chip[aria-pressed='true'] {
  color: var(--text-heading);
  box-shadow: inset 0 -1.5px 0 var(--orange-500);
}

.filter-chip:hover,
.filter-chip[aria-pressed='true']:hover {
  color: var(--text-heading);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 111, 25, 0.28);
}

.spot-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--orange-050);
  color: var(--orange-600);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
}

.tag,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-heading);
  font-family: inherit;
  font-size: var(--text-body-m);
  font-weight: var(--weight-bold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.tag[aria-pressed='true'] {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.tag:hover {
  background: var(--orange-050);
}

.tag[aria-pressed='true']:hover {
  background: var(--black);
}

.button-primary {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: var(--white);
}

.button-primary:hover {
  background: var(--orange-600);
  border-color: var(--orange-600);
  transform: translateY(-2px);
}

.button-outline:hover {
  background: var(--orange-050);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button:active,
.tag:active {
  transform: scale(0.97);
}

.button:focus-visible,
.tag:focus-visible,
.spot-card__link:focus-visible,
.spot-card__qr:focus-visible,
.asset-link:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 111, 25, 0.28);
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

.spot-card {
  position: relative;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
  transition:
    transform var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard);
}

.spot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-l);
}

.spot-card[hidden] {
  display: none;
}

.spot-card__link {
  display: block;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-card);
}

.spot-card__qr {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.38);
  color: var(--white);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.spot-card__qr .icon {
  width: 16px;
  height: 16px;
}

.spot-card__qr:hover {
  background: rgba(0, 0, 0, 0.58);
}

.spot-card__qr:active {
  transform: scale(0.97);
}

.spot-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
  background: var(--grey-700);
}

.spot-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spot-card__scrim {
  position: absolute;
  inset: 0;
  background: var(--gradient-scrim-bottom);
}

.spot-card__meta {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spot-card__eyebrow {
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spot-card__title {
  font-size: var(--text-body-l);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}

.spot-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.spot-facts {
  display: grid;
  width: 100%;
  margin: 0;
}

.spot-fact {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--border-hairline);
}

.spot-fact:first-child {
  padding-top: 0;
  border-top: 0;
}

.spot-fact dt {
  margin: 0;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spot-fact__value {
  margin: 0;
  font-size: var(--text-body-s);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-heading);
}

.spot-fact__value.is-empty {
  color: var(--grey-300);
  font-weight: var(--weight-regular);
}

.spot-fact__meta {
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}

.spot-fact__value[data-tone]::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--grey-300);
  transform: translateY(-1px);
}

.spot-fact__value[data-tone='live']::before {
  background: #2f8f4e;
}

.spot-fact__value[data-tone='in development']::before {
  background: var(--orange-500);
}

.spot-fact__value[data-tone='needs attention']::before {
  background: #d4a017;
}

.spot-fact__value[data-tone='demo']::before {
  background: var(--grey-400);
}

.bsw-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  width: 100%;
  margin: 0;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.bsw-note__engine {
  color: var(--text-muted);
  font-weight: var(--weight-bold);
}

.bsw-note__hint {
  color: #8a5a00;
  font-weight: var(--weight-bold);
}

.spot-card__sync,
.sync-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.sync-bar {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 var(--space-8);
  padding: 0;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--grey-050);
  color: var(--grey-600);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
}

.sync-badge--local-only,
.sync-badge--local-newer {
  background: var(--orange-050);
  color: var(--orange-600);
}

.sync-badge--remote-only,
.sync-badge--remote-newer,
.sync-badge--online,
.sync-badge--bsw {
  background: #e8f2ff;
  color: #1d4f91;
}

.sync-badge--extern {
  background: #f3e8ff;
  color: #5b2d91;
}

.sync-badge--both-changed,
.sync-badge--remote-unreachable,
.sync-badge--remote-unversioned {
  background: #fff4d6;
  color: #8a5a00;
}

.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  width: 100%;
}

.sync-bar .sync-actions {
  width: auto;
}

.sync-actions .button {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 0 12px;
  font-size: var(--text-label);
}

.sync-actions [hidden],
.sync-message[hidden],
.sync-banner[hidden] {
  display: none !important;
}

.sync-message,
.sync-banner {
  margin: 0;
  font-size: var(--text-label);
  line-height: var(--leading-tight);
  color: var(--text-muted);
}

.sync-banner {
  margin-top: var(--space-6);
  font-size: var(--text-body-s);
}

.sync-message.is-error {
  color: #9d1c1c;
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.spot-editor {
  margin: 0 0 var(--space-8);
}

.spot-editor [hidden] {
  display: none !important;
}

.spot-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-4) var(--space-6);
}

.spot-summary .spot-facts {
  flex: 1 1 280px;
  max-width: 420px;
}

.spot-editor__title {
  margin: 0;
  font-size: var(--text-heading-m);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-tight);
}

.spot-form .spot-editor__title {
  grid-column: 1 / -1;
}

.spot-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-6);
  padding: var(--space-6);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
}

.spot-form [hidden] {
  display: none !important;
}

.spot-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

.spot-form__wide,
.spot-form__actions {
  grid-column: 1 / -1;
}

.spot-form input,
.spot-form select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-heading);
  font: inherit;
  font-size: var(--text-body-m);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.spot-form input[readonly] {
  background: var(--grey-050);
  color: var(--text-muted);
}

.spot-form label.spot-form__check {
  flex-direction: row;
  align-items: center;
  align-self: end;
  justify-self: start;
  gap: 10px;
  min-height: 40px;
  letter-spacing: 0;
  font-size: var(--text-body-s);
}

.spot-form__check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--orange-500);
}

.spot-form__hint {
  color: var(--text-muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  line-height: var(--leading-tight);
}

.spot-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.spot-form__status {
  margin: 0;
  font-size: var(--text-body-s);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  line-height: var(--leading-tight);
  color: var(--text-muted);
}

.spot-form__status.is-error {
  color: #9d1c1c;
}

.detail-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}

.phone {
  width: min(390px, 100%);
  aspect-ratio: 390 / 844;
  padding: 12px;
  border-radius: var(--radius-hero);
  background: var(--grey-800);
  box-shadow: var(--shadow-l);
}

.phone iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--black);
}

.asset-group + .asset-group {
  margin-top: var(--space-10);
}

.asset-group h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-heading-s);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-tight);
}

.asset-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.asset-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  min-height: 80px;
  padding: var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
  text-decoration: none;
}

.asset-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-l);
}

.asset-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-right: var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
}

.asset-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-l);
}

.asset-item .asset-link {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.asset-item .asset-link:hover {
  transform: none;
  box-shadow: none;
}

.asset-viewer {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  font-size: var(--text-label);
  white-space: nowrap;
}

.asset-thumb,
.asset-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface-subtle);
  object-fit: cover;
}

.asset-icon {
  display: grid;
  place-items: center;
  color: var(--text-heading);
}

.asset-name {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  word-break: break-word;
}

.asset-path {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--text-body-s);
  font-weight: var(--weight-regular);
}

.asset-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-body-s);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--orange-050);
  color: var(--text-heading);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.notice {
  margin: 0;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-card);
  background: var(--surface-subtle);
  color: var(--text-body);
}

.empty-state {
  margin-top: var(--space-8);
}

.qr-dialog {
  width: min(400px, calc(100% - 2 * var(--space-6)));
  padding: var(--space-8);
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--surface-card);
  color: var(--text-body);
  box-shadow: var(--shadow-l);
  text-align: center;
}

.qr-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.qr-dialog .headline-section {
  margin-bottom: var(--space-6);
}

.qr-code {
  display: grid;
  place-items: center;
  padding: var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
}

.qr-code img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

.qr-url {
  margin: var(--space-4) 0 var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-body-s);
  word-break: break-all;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

@media (max-width: 980px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .page {
    width: min(var(--container), calc(100% - 2 * var(--space-6)));
  }

  .site-header {
    width: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }

  .page {
    padding-top: var(--space-12);
  }
}

@media (max-width: 640px) {
  .spot-form {
    grid-template-columns: 1fr;
  }

  .asset-link {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .asset-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
  }

  .asset-item {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
  }

  .asset-viewer {
    width: 100%;
  }
}

.page.page-viewer {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  height: calc(100vh - 73px);
  min-height: 560px;
}

.viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--grey-050);
}

.viewer-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-drop[hidden] {
  display: none;
}

.viewer-drop {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-muted);
  font-size: var(--text-body-s);
  pointer-events: none;
  white-space: nowrap;
}

.viewer-stage.is-dragover {
  outline: 3px solid var(--orange-500);
  outline-offset: -3px;
}

.viewer-panel {
  overflow: auto;
  padding: var(--space-5);
  border-left: 1px solid var(--border-hairline);
  background: var(--white);
}

.viewer-status {
  margin: 0 0 var(--space-4);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.viewer-status.is-error {
  color: #9d1c1c;
}

.viewer-note {
  color: #8a5a00;
}

.viewer-note,
.viewer-muted {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-body-s);
  line-height: var(--leading-tight);
}

.viewer-block + .viewer-block {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-hairline);
}

.viewer-block h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-body-m);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-heading);
}

.viewer-panel label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-3);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

.viewer-panel input,
.viewer-panel select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-heading);
  font: inherit;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.viewer-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: var(--text-body-s);
  letter-spacing: 0;
}

.viewer-check input {
  width: auto;
  min-height: 0;
}

.viewer-grid-2,
.viewer-grid-3 {
  display: grid;
  gap: 8px;
}

.viewer-grid-2 {
  grid-template-columns: 1fr 1fr;
}

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

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.viewer-actions .button {
  min-height: 36px;
  padding: 0 14px;
  font-size: var(--text-label);
}

.viewer-actions label {
  flex: 1 1 140px;
  margin: 0;
}

.viewer-panel input.viewer-file-input {
  display: none;
}

.viewer-stats {
  display: grid;
  gap: 4px;
}

.viewer-stat {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-body-s);
}

.viewer-stat span {
  color: var(--text-muted);
}

.viewer-textures,
.viewer-tips {
  margin: var(--space-3) 0 0;
  padding-left: 1.1em;
  font-size: var(--text-body-s);
  line-height: var(--leading-tight);
}

.viewer-tips .is-crit {
  color: #9d1c1c;
}

.viewer-tips .is-warn {
  color: #8a5a00;
}

.viewer-advanced {
  margin-bottom: var(--space-3);
  font-size: var(--text-body-s);
}

.viewer-advanced summary {
  cursor: pointer;
  font-weight: var(--weight-bold);
}

@media (max-width: 980px) {
  .page.page-viewer {
    width: auto;
    padding-top: 0;
  }

  .viewer {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .viewer-stage {
    height: 55vh;
  }

  .viewer-panel {
    border-left: 0;
    border-top: 1px solid var(--border-hairline);
  }

  .viewer-drop {
    white-space: normal;
    width: min(280px, calc(100% - 32px));
    text-align: center;
  }
}

.creator {
  margin-top: var(--space-8);
}

.creator [hidden] {
  display: none !important;
}

.creator-tabs {
  margin-bottom: var(--space-6);
}

.creator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: var(--space-8);
  align-items: start;
}

.creator-form,
.creator-dialog form,
.creator-card {
  display: flex;
  flex-direction: column;
}

.creator-form label,
.creator-dialog label,
.creator-view-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-3);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

.creator-form input,
.creator-form select,
.creator-form textarea,
.creator-dialog input,
.creator-dialog select,
.creator-card select,
.creator-views input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-heading);
  font: inherit;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.creator-form textarea {
  min-height: 96px;
  resize: vertical;
}

.creator-status {
  min-height: 1.4em;
  margin: 0 0 var(--space-3);
  font-size: var(--text-body-s);
  line-height: var(--leading-tight);
}

.creator-status.is-error,
.creator-warn {
  color: #9d1c1c;
}

.creator-result:empty {
  display: none;
}

.creator-result,
.creator-card {
  padding: var(--space-5);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
}

.creator-result img,
.creator-card img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--grey-050);
}

.creator-result audio,
.creator-card audio {
  width: 100%;
}

.creator-result pre,
.creator-card pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  font-size: var(--text-body-s);
  line-height: var(--leading-tight);
}

.creator-model {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.model-stage {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f1ec;
}

.creator-card .model-stage {
  height: 240px;
  margin-bottom: var(--space-3);
}

.model-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.model-stage-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: var(--space-4);
  text-align: center;
}

.model-clip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
}

.creator-step {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
}

.creator-step:disabled {
  opacity: 0.55;
}

.creator-step legend {
  padding: 0 6px;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
}

.creator-form label.creator-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.creator-form label.creator-check input {
  width: auto;
  min-height: 0;
}

.creator-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: var(--space-3);
}

.creator-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

.creator-card h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-heading-s);
  line-height: var(--leading-tight);
}

.creator-card-kind {
  margin: 0 0 var(--space-2);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent);
}

.creator-file,
.creator-views > div {
  position: relative;
}

.creator-form label.creator-file {
  margin-bottom: 0;
}

.creator-form label.creator-file + .creator-drop {
  margin-bottom: var(--space-3);
}

.creator-form input.creator-file-input,
.creator-views input.creator-file-input {
  display: none;
}

.creator-drop,
.viewer-upload {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--grey-050);
  text-align: center;
  cursor: pointer;
}

.viewer-upload {
  margin-bottom: var(--space-3);
}

.viewer-upload [hidden] {
  display: none !important;
}

.creator-drop.is-drag,
.viewer-upload.is-drag {
  border-color: var(--text-accent);
  background: var(--orange-050);
}

.creator-drop img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
}

.creator-views .creator-drop img {
  max-height: 120px;
}

.creator-drop-hint,
.viewer-upload-hint {
  font-size: var(--text-body-s);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.viewer-upload-hint {
  overflow-wrap: anywhere;
}

.creator-drop-clear,
.viewer-upload-clear {
  min-height: 32px;
  padding: 0 12px;
}

.creator-views {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.creator-use {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.creator-use select {
  flex: 1;
  width: auto;
}

.creator-clear {
  align-self: flex-start;
  min-height: 36px;
  margin: -8px 0 var(--space-3);
  padding: 0 14px;
  font-size: var(--text-label);
}

.creator-dialog {
  width: min(480px, calc(100% - 2 * var(--space-6)));
  padding: var(--space-8);
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--surface-card);
  color: var(--text-body);
  box-shadow: var(--shadow-l);
}

.creator-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.creator-dialog .headline-section {
  margin-bottom: var(--space-5);
}

@media (max-width: 980px) {
  .creator-grid,
  .creator-views {
    grid-template-columns: 1fr;
  }
}
