:root {
  --bg: #f8f4ea;
  --ink: #121212;
  --card: #fffdf8;
  --accent: #ff7a3d;
  --accent-2: #1f7a8c;
  --line: #111111;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: radial-gradient(circle at top left, #fff4d6 0%, var(--bg) 45%, #f0efe8 100%);
  color: var(--ink);
}

button,
input,
select,
dialog {
  font: inherit;
}

a {
  color: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
}

.page-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 132px;
}

.hero {
  display: block;
}

.hero-copy,
.control-dock,
.builder-section,
.prompt-card,
.empty-state,
.modal-shell {
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 122, 61, 0.15), rgba(31, 122, 140, 0.08)),
    var(--card);
}

.control-dock {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 18px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(124px, 0.52fr)) auto;
  min-width: 860px;
  gap: 8px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent-2);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 48rem;
  font-size: 1rem;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stat-card {
  padding: 14px;
  border: 2px solid var(--line);
  background: white;
}

.stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #555;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 1.15rem;
}

.search-block {
  display: grid;
  gap: 10px;
  font-weight: 800;
}

.search-block span,
.control-dock .select-block span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-dock .search-block,
.control-dock .select-block {
  display: block;
}

.control-dock .search-block span,
.control-dock .select-block span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-block input {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  background: white;
  height: 38px;
  padding: 8px 12px;
  outline: none;
  font-size: 14px;
  font-weight: 700;
}

.search-block input:focus {
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.22);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.select-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-block select {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  background: white;
  padding: 10px 34px 10px 10px;
  outline: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.control-dock .select-block select {
  height: 38px;
  padding: 8px 30px 8px 10px;
}

.select-block select:focus {
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.control-actions .chip {
  height: 38px;
  min-height: 0;
  padding: 8px 12px;
  white-space: nowrap;
}

.chip,
.tab,
.link-button,
.modal-close {
  border: 2px solid var(--line);
  background: white;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

.chip:hover,
.tab:hover,
.link-button:hover,
.modal-close:hover {
  transform: translate(-1px, -1px);
}

.chip {
  padding: 10px 14px;
  font-weight: 800;
}

.chip.active {
  background: var(--accent);
  color: white;
}

.chip.muted {
  background: #f5f5f5;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 36px 0 18px;
  scroll-margin-top: 104px;
}

.results-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.results-count {
  margin: 0;
  font-weight: 800;
}

.builder-section {
  position: fixed;
  right: max(20px, calc((100vw - 1280px) / 2 + 20px));
  bottom: 0;
  left: max(20px, calc((100vw - 1280px) / 2 + 20px));
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 760px);
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 122, 140, 0.12), rgba(255, 122, 61, 0.08)),
    var(--card);
  scroll-margin-top: 104px;
}

.builder-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  order: 2;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  border-top: 2px solid var(--line);
  background: rgba(255, 253, 248, 0.98);
}

.builder-summary::-webkit-details-marker {
  display: none;
}

.builder-summary h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1;
  text-transform: uppercase;
}

.builder-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
}

.builder-summary-meta strong {
  padding: 7px 10px;
  border: 2px solid var(--line);
  background: white;
  font-size: 12px;
}

.builder-toggle-label {
  display: inline-flex;
  min-width: 84px;
  justify-content: center;
  padding: 8px 10px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.builder-toggle-label::before {
  content: "展开面板";
}

.builder-section[open] .builder-toggle-label::before {
  content: "收起面板";
}

.builder-content {
  order: 1;
  display: grid;
  gap: 16px;
  max-height: calc(min(78vh, 760px) - 74px);
  overflow: auto;
  padding: 0 16px 16px;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.builder-controls {
  display: grid;
  gap: 12px;
}

.builder-row {
  display: grid;
  gap: 10px;
}

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

.builder-row.two {
  grid-template-columns: minmax(120px, 0.5fr) minmax(0, 1.5fr);
}

.field-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-block input {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  background: white;
  padding: 11px 12px;
  outline: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.field-block input:focus {
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.22);
}

.builder-output-panel {
  position: static;
  min-width: 0;
  border: 2px solid var(--line);
  background: #fffefb;
}

.output-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 2px solid var(--line);
  background: white;
}

.output-head span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.output-head strong {
  padding: 5px 8px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: white;
  font-size: 12px;
}

.builder-output {
  margin: 0;
  min-height: 220px;
  max-height: 300px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.92rem;
}

.builder-references {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 2px solid var(--line);
  background: white;
}

.builder-reference-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.builder-reference-head small {
  color: #555;
  letter-spacing: 0;
}

.builder-reference-list {
  display: grid;
  gap: 8px;
}

.builder-reference-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.builder-reference-open,
.builder-reference-use {
  border: 2px solid var(--line);
  background: white;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.builder-reference-open {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.builder-reference-open span {
  overflow-wrap: anywhere;
  font-weight: 900;
  line-height: 1.25;
}

.builder-reference-open small {
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.builder-reference-use {
  padding: 0 10px;
  background: #e8fbff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.builder-reference-open:hover,
.builder-reference-open:focus-visible,
.builder-reference-use:hover,
.builder-reference-use:focus-visible {
  background: var(--accent);
  color: white;
  transform: translate(-1px, -1px);
}

.builder-reference-open:hover small,
.builder-reference-open:focus-visible small {
  color: white;
}

.builder-reference-empty {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
}

.builder-remix {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--line);
  background: #fffaf0;
}

.remix-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  background: white;
}

.remix-head span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.remix-actions {
  display: flex;
  gap: 8px;
}

.mini-button {
  padding: 6px 8px;
  border: 2px solid var(--line);
  background: #e8fbff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: background-color 150ms ease, transform 150ms ease;
}

.mini-button:hover,
.mini-button:focus-visible {
  background: var(--accent);
  color: white;
  transform: translate(-1px, -1px);
}

.remix-output {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.9rem;
}

.card-grid {
  columns: 3 300px;
  column-gap: 18px;
}

.prompt-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  break-inside: avoid;
}

.card-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.thumb-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: 3px solid var(--line);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 122, 61, 0.22), rgba(31, 122, 140, 0.2));
}

.thumb-shell > .thumb {
  position: absolute;
  inset: 0;
}

.thumb,
.modal-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.thumb {
  object-fit: cover;
}

.thumb-video {
  background: #060606;
}

.thumb-poster {
  pointer-events: none;
  transition: opacity 180ms ease;
}

.thumb-video.playing + .thumb-poster,
.card-button:hover .thumb-poster,
.card-button:focus-visible .thumb-poster {
  opacity: 0;
}

.placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.65), transparent 30%),
    linear-gradient(135deg, #ff7a3d, #1f7a8c);
}

.media-flag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  background: rgba(17, 17, 17, 0.88);
  color: white;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.card-badge,
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5e5e5e;
  font-weight: 800;
}

.card-insights,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-insights {
  align-items: center;
  margin: 0 0 12px;
}

.score-pill,
.insight-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 2px solid var(--line);
  background: white;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.score-pill {
  background: var(--ink);
  color: white;
}

.insight-chip.strong {
  background: #e8fbff;
}

.insight-chip.muted {
  border-color: rgba(17, 17, 17, 0.45);
  background: #f7f7f7;
  color: #444;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.card-body p:last-child {
  margin: 0;
  line-height: 1.6;
  color: #333;
}

.card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.builder-inline-button {
  display: inline-flex;
  padding: 8px 10px;
  border: 2px solid var(--line);
  background: #e8fbff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transition: background-color 150ms ease, transform 150ms ease;
}

.builder-inline-button:hover,
.builder-inline-button:focus-visible {
  background: var(--accent);
  color: white;
  transform: translate(-1px, -1px);
}

.card-prompt-wrap {
  position: relative;
  padding: 0 16px 16px;
}

.card-prompt {
  margin: 0;
  max-height: 10.6em;
  overflow: hidden;
  padding: 12px 14px;
  border: 2px solid rgba(17, 17, 17, 0.9);
  background: #fffaf0;
  color: #262626;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.card-prompt-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 42px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 250, 240, 0), #fffaf0);
}

.copy-hover {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  border: 2px solid var(--line);
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.copy-hover.copied {
  background: var(--accent-2);
}

.card-prompt-wrap:hover .copy-hover,
.card-prompt-wrap:focus-within .copy-hover,
.prompt-panel:hover .copy-hover,
.prompt-panel:focus-within .copy-hover,
.copy-hover:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.empty-state {
  margin-top: 20px;
  padding: 28px;
}

.empty-state.hidden,
.hidden {
  display: none !important;
}

.modal {
  width: min(1240px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.modal-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

.modal-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  background: #060606;
  border-right: 3px solid var(--line);
}

.modal-media-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--media-aspect-ratio, 16 / 9);
  min-height: 0;
  max-height: calc(100vh - 24px);
  background: #060606;
  overflow: hidden;
}

.modal-media-shell.is-portrait {
  width: min(100%, 54vh);
  margin: 0 auto;
}

.modal-media-shell.is-square {
  width: min(100%, 70vh);
  margin: 0 auto;
}

.modal-player {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
  background: #060606;
}

.modal-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.modal-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-overlay {
  position: absolute;
  inset: auto 20px 20px 20px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 2px solid var(--line);
  background: rgba(18, 18, 18, 0.84);
  color: white;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.9);
}

.media-overlay.compact {
  inset: auto 16px 16px 16px;
  grid-auto-flow: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.media-chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-note {
  margin: 0;
  line-height: 1.5;
}

.media-overlay-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px solid white;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.modal-body {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 28px;
}

.modal-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-pill {
  border: 2px solid var(--line);
  padding: 4px 8px;
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.modal-body h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.modal-description {
  line-height: 1.7;
  color: #333;
}

.modal-insights {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  padding: 16px;
  border: 2px solid var(--line);
  background:
    linear-gradient(135deg, rgba(31, 122, 140, 0.1), rgba(255, 122, 61, 0.08)),
    #fffefb;
}

.insight-score {
  display: grid;
  gap: 10px;
}

.insight-score strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.score-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4d4d4d;
}

.score-bar {
  height: 12px;
  border: 2px solid var(--line);
  background: white;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.insight-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modal-actions,
.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  font-weight: 800;
}

.link-button.ghost {
  background: #f5f5f5;
}

.tab {
  padding: 9px 14px;
  font-weight: 800;
}

.tab.active {
  background: var(--accent-2);
  color: white;
}

.prompt-panel {
  position: relative;
}

.prompt-copy-button {
  top: 12px;
  right: 12px;
}

.prompt-box {
  margin: 0;
  padding: 48px 18px 18px;
  min-height: 260px;
  max-height: 50vh;
  overflow: auto;
  border: 2px solid var(--line);
  background: #fffefb;
  white-space: pre-wrap;
  line-height: 1.65;
}

.modal-related {
  margin-top: 18px;
}

.related-head {
  margin-bottom: 8px;
}

.related-list {
  display: grid;
  gap: 8px;
}

.related-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--line);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.related-item:hover,
.related-item:focus-visible {
  background: #e8fbff;
  transform: translate(-1px, -1px);
}

.related-item span {
  font-weight: 900;
  line-height: 1.25;
}

.related-item small {
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: 900;
  z-index: 2;
}

@media (max-width: 1024px) {
  .modal {
    overflow: auto;
  }

  .modal-shell,
  .builder-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid {
    columns: 2 280px;
  }

  .modal-shell {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

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

  .builder-output-panel {
    position: static;
  }

  .modal-media {
    min-height: 240px;
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }

  .modal-media-shell {
    max-height: min(58vh, 520px);
  }

  .modal-player {
    height: 100%;
  }

  .modal-body {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 0 14px 118px;
  }

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

  .control-dock {
    margin-right: -14px;
    margin-left: -14px;
    border-right: 0;
    border-left: 0;
  }

  .filter-grid,
  .insight-groups,
  .builder-row.three,
  .builder-row.two,
  .builder-reference-item {
    grid-template-columns: 1fr;
  }

  .builder-section {
    right: 0;
    left: 0;
    max-height: 82vh;
    border-right: 0;
    border-left: 0;
  }

  .builder-summary {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .builder-summary-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .builder-content {
    max-height: calc(82vh - 118px);
  }

  .card-grid {
    columns: 1;
  }

  .results-head {
    align-items: start;
    flex-direction: column;
  }
}
