:root {
  --bg-primary: #0f141c;
  --bg-secondary: #171f2c;
  --bg-card: #1c2636;
  --bg-card-hover: #222f42;
  --bg-input: #121924;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --badge-splat: #10b981;
  --badge-splat-bg: rgba(16, 185, 129, 0.15);
  --badge-3mx: #3b82f6;
  --badge-3mx-bg: rgba(59, 130, 246, 0.15);
  --badge-pc: #f59e0b;
  --badge-pc-bg: rgba(245, 158, 11, 0.15);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 61px;
  --gutter: 24px;
  --layout-max: 2400px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --badge-splat-bg: rgba(16, 185, 129, 0.1);
  --badge-3mx-bg: rgba(59, 130, 246, 0.1);
  --badge-pc-bg: rgba(245, 158, 11, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.header-container {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-stats {
  display: flex;
  gap: 16px;
  align-items: center;
  background-color: var(--bg-input);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-label {
  color: var(--text-muted);
}

.stat-val {
  font-weight: 600;
  color: var(--text-primary);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.stat-dot.splat { background-color: var(--badge-splat); }
.stat-dot.bentley { background-color: var(--badge-3mx); }
.stat-dot.pc { background-color: var(--badge-pc); }

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* Main Container: three-column catalog layout */
.main-container {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: var(--gutter);
  width: 100%;
  flex: 1;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  grid-template-areas: "about results filters";
  gap: var(--gutter);
  align-items: start;
}

.catalog-results {
  grid-area: results;
  min-width: 0;
}

/* Side panels stay in place; only the results column scrolls with the page */
.about-panel,
.filters-panel {
  position: sticky;
  top: calc(var(--header-h) + var(--gutter));
  max-height: calc(100vh - var(--header-h) - 2 * var(--gutter));
  overflow-y: auto;
  scrollbar-width: thin;
}

.about-panel {
  grid-area: about;
}

.filters-panel {
  grid-area: filters;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* About card */
.about-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.about-summary {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style-position: inside;
}

.about-card[open] .about-summary {
  margin-bottom: 10px;
}

.about-body p {
  margin-bottom: 10px;
}

.about-lead {
  color: var(--text-primary);
  font-weight: 600;
}

.about-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 14px 0 6px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-list .stat-dot {
  margin-right: 6px;
}

.about-list b {
  color: var(--text-primary);
  font-weight: 600;
}

.about-list-plain li::before {
  content: "\00B7";
  margin-right: 6px;
  color: var(--text-muted);
}

kbd {
  font-family: monospace;
  font-size: 0.75rem;
  padding: 1px 5px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-input);
}

/* Filters panel */
.filters-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filters-bar .search-box-wrapper {
  flex: 1;
  min-width: 0;
}

.filters-toggle,
.filters-drawer-head,
.filters-drawer-foot,
.filters-backdrop {
  display: none;
}

.filter-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.filter-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.filter-field .filter-label {
  margin-bottom: 4px;
}

/* Technology Tabs (vertical list inside the panel) */
.tech-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tech-tab {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
  text-align: left;
  transition: var(--transition);
}

.tech-tab .stat-dot {
  margin-right: 4px;
}

.tech-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.tech-tab.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.tech-tab .tab-count {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.tech-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Filter selects */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: span 3;
}

.filter-field-wide {
  grid-column: span 4;
}

.filter-field-narrow {
  grid-column: span 2;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 36px 9px 38px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  display: none;
}

.search-clear:hover {
  color: var(--text-primary);
}

.select-control {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
}

.select-control:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Tag cloud: size grows with the number of models */
.tag-bar {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  line-height: 1.4;
}

.tag-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.tag-pill.active {
  background: var(--accent-green);
  color: #ffffff;
  border-color: var(--accent-green);
}

.tag-count {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-left: 3px;
}

.active-filters-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-reset {
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}

.btn-reset:hover {
  color: var(--accent-blue-hover);
}

/* Medium screens: filters on the right, about above the results */
@media (max-width: 1279px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "about filters"
      "results filters";
  }

  .about-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Phones and tablets: sticky search bar + filters drawer */
@media (max-width: 1023px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "about"
      "filters"
      "results";
    gap: 16px;
  }

  .filters-panel {
    top: var(--header-h);
    z-index: 30;
    max-height: none;
    overflow: visible;
    margin: 0 calc(-1 * var(--gutter));
    padding: 8px var(--gutter);
    border-radius: 0;
    border-width: 0 0 1px;
    background-color: var(--bg-primary);
    box-shadow: none;
  }

  body.filters-open .filters-panel {
    z-index: 70;
  }

  .filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }

  .filters-toggle-count {
    background: var(--accent-blue);
    color: #ffffff;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filters-toggle-count[hidden] {
    display: none;
  }

  .filters-body {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 0 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }

  body.filters-open .filters-body {
    transform: none;
    visibility: visible;
  }

  .filters-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--bg-secondary);
    padding: 12px 0;
  }

  .filters-drawer-head + .filter-section {
    margin-top: 0;
  }

  .filters-drawer-title {
    font-size: 1rem;
    font-weight: 700;
  }

  .filters-drawer-foot {
    display: block;
    position: sticky;
    bottom: 0;
    background-color: var(--bg-secondary);
    padding: 12px 0 16px;
    margin-top: 16px;
  }

  .filters-drawer-foot .btn-primary-viewer {
    width: 100%;
    padding: 11px 12px;
  }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background-color: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.filters-open .filters-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.filters-open {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .header-stats,
  .logo-subtitle {
    display: none;
  }

  .header-container {
    flex-wrap: nowrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .logo-title {
    font-size: 1.1rem;
  }

}

/* Grid Layout */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

/* Compact List View */
.models-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card Component: photo-first tile, the whole card opens the model page */
.model-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
}

.model-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.5);
}

.model-card:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.model-card:hover .card-img {
  transform: scale(1.04);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.card-open {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(15, 20, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.model-card:hover .card-open {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.card-chips {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 4px;
}

.card-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 20, 28, 0.72);
  color: #ffffff;
}

.card-chip.bentley { color: #93c5fd; }
.card-chip.pc { color: #fcd34d; }

/* Compact list view: thumbnail + title and date */
.models-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.models-grid.list-view .model-card {
  display: flex;
  align-items: center;
  aspect-ratio: auto;
  height: 76px;
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.models-grid.list-view .card-img {
  width: 122px;
  flex-shrink: 0;
}

.models-grid.list-view .card-overlay {
  position: static;
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0 16px;
}

.models-grid.list-view .card-title,
.models-grid.list-view .card-date {
  color: inherit;
  text-shadow: none;
}

.models-grid.list-view .card-date {
  color: var(--text-muted);
}

.models-grid.list-view .card-open {
  position: static;
  margin-right: 14px;
  flex-shrink: 0;
}

.models-grid.list-view .card-chips {
  display: none;
}

.btn-primary-viewer {
  flex: 1;
  background-color: var(--accent-blue);
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-primary-viewer:hover {
  background-color: var(--accent-blue-hover);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Pagination Bar */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  margin-top: 10px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.page-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 4px;
  font-size: 0.9rem;
}

.page-jump-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.page-jump-input {
  width: 50px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
}

.page-jump-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Model page: viewer + info panel, below the site header */
.scene-view {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  background-color: var(--bg-primary);
}

.scene-view[hidden] {
  display: none;
}

body.scene-open {
  overflow: hidden;
}

.scene-stage {
  position: relative;
  min-height: 0;
  background-color: #000000;
}

.scene-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.scene-panel {
  overflow-y: auto;
  padding: 16px 20px 24px;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  scrollbar-width: thin;
}

.scene-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.scene-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}

.scene-back:hover {
  color: var(--text-primary);
}

.scene-nav {
  display: flex;
  gap: 6px;
}

.scene-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.scene-meta .scene-id {
  font-family: monospace;
  color: var(--text-muted);
}

.scene-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.scene-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.scene-action:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}

.scene-description {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-line;
}

.scene-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.scene-tech {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.scene-tech-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.scene-tech-row .stat-dot {
  margin-right: 6px;
}

.scene-tech-state {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.scene-suggested {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scene-suggested .model-card {
  border-radius: var(--radius-sm);
}

.scene-suggested .card-title {
  font-size: 0.78rem;
}

.scene-suggested .card-open,
.scene-suggested .card-chips,
.scene-suggested .card-date {
  display: none;
}

.scene-notes summary {
  cursor: pointer;
  margin-bottom: 0;
}

.scene-notes[open] summary {
  margin-bottom: 6px;
}

.scene-notes #sceneNotes {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-word;
}

@media (max-width: 1023px) {
  .scene-view {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 58vh auto;
    overflow-y: auto;
  }

  .scene-panel {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--accent-green);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 16px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Phones: pagination wraps instead of overflowing */
@media (max-width: 640px) {
  .pagination-container {
    justify-content: center;
    padding: 12px;
  }

  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}
