/*
 * Xingque Motion Workspace
 * Presentation-only layer inspired by premium film tools and restrained product sites.
 * Provider, task, credit and persistence behavior remains owned by app.js.
 */

body.studio-redesign {
  --xq-content: 1180px;
  --xq-radius: 8px;
  --xq-radius-small: 6px;
  --xq-ease: cubic-bezier(.2, .8, .2, 1);
  --xq-accent-soft: color-mix(in srgb, var(--sq-accent) 13%, transparent);
  --xq-panel-raised: color-mix(in srgb, var(--sq-panel) 94%, var(--sq-ink));
  --xq-stage: #101317;
  --xq-stage-line: color-mix(in srgb, var(--ff-line) 10%, transparent);
  --xq-stage-muted: var(--ff-muted);
  overflow-x: hidden;
}

body.studio-redesign * {
  box-sizing: border-box;
}

body.studio-redesign ::selection {
  color: var(--sq-accent-ink);
  background: var(--sq-accent);
}

body.studio-redesign :is(button, input, textarea, select, [contenteditable="true"]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sq-accent) 82%, white);
  outline-offset: 2px;
}

/* Workspace chrome */
body.studio-redesign .main {
  min-width: 0;
  background: var(--sq-bg);
}

body.studio-redesign .topbar {
  height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid var(--sq-line);
  color: var(--sq-ink);
  background: color-mix(in srgb, var(--sq-bg) 91%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
}

body.studio-redesign .topbar .crumb {
  color: var(--sq-ink);
  font-size: 12px;
  font-weight: 760;
}

body.studio-redesign .top-right .role,
body.studio-redesign .credit-pill {
  border: 1px solid var(--sq-line);
  color: var(--sq-muted);
  background: var(--sq-panel);
}

body.studio-redesign .avatar {
  border: 1px solid color-mix(in srgb, var(--sq-ink) 16%, transparent);
  color: var(--sq-panel);
  background: var(--sq-ink);
}

body.studio-redesign .sidebar {
  border-right-color: var(--sq-line);
  box-shadow: none;
  transition: width .26s var(--xq-ease), padding .26s var(--xq-ease), box-shadow .26s var(--xq-ease);
}

body.studio-redesign .sidebar:not(.collapsed):hover,
body.studio-redesign .sidebar.menu-locked {
  box-shadow: 18px 0 54px color-mix(in srgb, var(--ff-shadow-ink) 18%, transparent);
}

body.studio-redesign .sidebar-new {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--sq-accent) 18%, transparent);
}

body.studio-redesign .nav button {
  position: relative;
  overflow: hidden;
}

body.studio-redesign .nav button::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 2px;
  opacity: 0;
  background: var(--sq-accent);
  transform: scaleY(.35);
  transition: opacity .2s ease, transform .24s var(--xq-ease);
}

body.studio-redesign .nav button.active::before {
  opacity: 1;
  transform: scaleY(1);
}

body.studio-redesign .history {
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
  padding-block: 12px 18px;
}

body.studio-redesign .history-card {
  border-color: transparent;
  transition: border-color .2s ease, background-color .2s ease, transform .2s var(--xq-ease);
}

body.studio-redesign .history-card:hover {
  transform: translateX(2px);
}

/* Homepage frame */
body.studio-redesign .page-create {
  min-height: calc(100vh - 52px);
  background: var(--sq-bg);
}

body.studio-redesign .page-create .hero-bg {
  inset: 0;
  opacity: .42;
  pointer-events: none;
  background-image:
    linear-gradient(var(--sq-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--sq-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 440px);
}

body.studio-redesign .studio-shell {
  width: min(var(--xq-content), calc(100% - 48px));
  margin-inline: auto;
  padding: 34px 0 76px;
}

/* Media-first work stage: one lead work and three supporting signals. */
body.studio-redesign .showcase {
  position: relative;
  padding: 16px;
  border: 1px solid var(--xq-stage-line);
  border-radius: var(--xq-radius);
  overflow: hidden;
  color: #f7f9fb;
  background: var(--xq-stage);
  box-shadow: 0 24px 70px rgba(5, 7, 10, .2);
}

body.studio-redesign .showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ff-surface) 10%, transparent) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: .24;
}

body.studio-redesign .showcase-head {
  position: relative;
  z-index: 2;
  min-height: 48px;
  margin: 0 0 14px;
  align-items: center;
  color: #f7f9fb;
}

body.studio-redesign .showcase-head > div {
  display: grid;
  gap: 3px;
}

body.studio-redesign .showcase-head .eyebrow {
  color: var(--ff-secondary);
  font-size: 9px;
  line-height: 1;
  font-weight: 820;
}

body.studio-redesign .showcase-head .eyebrow svg {
  width: 13px;
  height: 13px;
}

body.studio-redesign .showcase-head h2 {
  color: #f7f9fb;
  font-size: 20px;
  line-height: 1.2;
}

body.studio-redesign .showcase-head p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--xq-stage-muted);
  font-size: 11px;
}

body.studio-redesign .showcase-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d07f;
  box-shadow: 0 0 0 4px rgba(53, 208, 127, .12);
}

body.studio-redesign .showcase-track {
  position: relative;
  z-index: 1;
  min-height: 276px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, 132px);
  gap: 12px;
  overflow: visible;
}

body.studio-redesign .showcase-card {
  --xq-card-y: 0px;
  --xq-card-scale: 1;
  width: 100%;
  height: 132px;
  min-height: 132px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--ff-line) 12%, transparent);
  border-radius: var(--xq-radius);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #1a1f25;
  box-shadow: none;
  transform: translate3d(0, calc(var(--motion-y, 0px) + var(--xq-card-y)), 0) scale(var(--xq-card-scale)) !important;
  transition: border-color .24s ease, box-shadow .28s ease, filter .28s ease;
}

body.studio-redesign .showcase-card:first-child {
  grid-row: 1 / 3;
  height: 276px;
  min-height: 276px;
  padding: 18px;
}

body.studio-redesign .showcase-card:nth-child(4) {
  grid-column: 2 / 4;
}

body.studio-redesign .showcase-card::before {
  inset: 0;
  opacity: 1;
  filter: saturate(.92) contrast(1.02);
  transform: scale(1.005);
  transition: transform .7s var(--xq-ease), filter .45s ease;
}

body.studio-redesign .showcase-card[data-video-url=""]::before {
  background-size: 200% 200%;
}

body.studio-redesign .showcase-card[data-video-url=""]:nth-child(1)::before { background-position: 0 0; }
body.studio-redesign .showcase-card[data-video-url=""]:nth-child(2)::before { background-position: 100% 0; }
body.studio-redesign .showcase-card[data-video-url=""]:nth-child(3)::before { background-position: 0 100%; }
body.studio-redesign .showcase-card[data-video-url=""]:nth-child(4)::before { background-position: 100% 100%; }

body.studio-redesign .showcase-card::after {
  inset: 0;
  background: linear-gradient(180deg, rgba(5,7,10,.02) 28%, rgba(5,7,10,.82) 100%);
}

body.studio-redesign .showcase-card:hover,
body.studio-redesign .showcase-card:focus-visible {
  --xq-card-y: -3px;
  --xq-card-scale: 1.006;
  border-color: rgba(84, 217, 239, .5);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--ff-shadow-ink) 30%, transparent);
}

body.studio-redesign .showcase-card:hover::before,
body.studio-redesign .showcase-card:focus-visible::before {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

body.studio-redesign .showcase-index {
  top: 12px;
  left: 12px;
  width: 30px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--ff-line) 22%, transparent);
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.8);
  background: rgba(7,9,12,.4);
  font-size: 9px;
  backdrop-filter: blur(10px);
}

body.studio-redesign .showcase-play {
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--ff-line) 22%, transparent);
  color: #fff;
  background: rgba(7,9,12,.48);
  backdrop-filter: blur(10px);
}

body.studio-redesign .showcase-card:first-child .showcase-play {
  width: 38px;
  height: 38px;
}

body.studio-redesign .showcase-copy {
  inset: auto 13px 12px;
  z-index: 2;
  display: grid;
  gap: 3px;
}

body.studio-redesign .showcase-copy small {
  color: rgba(255,255,255,.68);
  font-size: 9px;
  font-weight: 680;
}

body.studio-redesign .showcase-copy strong {
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 760;
}

body.studio-redesign .showcase-card:first-child .showcase-copy {
  inset: auto 18px 18px;
}

body.studio-redesign .showcase-card:first-child .showcase-copy strong {
  max-width: 90%;
  font-size: 23px;
  line-height: 1.16;
}

body.studio-redesign .showcase-arrow,
body.studio-redesign .showcase-dots {
  display: none !important;
}

/* Creation command surface */
body.studio-redesign .hero-title {
  width: min(920px, 100%);
  margin: 62px auto 18px;
  padding: 0;
  text-align: left;
}

body.studio-redesign .hero-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--sq-accent);
  font-size: 10px;
  line-height: 1;
  font-weight: 840;
}

body.studio-redesign .hero-title h1 {
  margin: 0;
  color: var(--sq-ink);
  font-size: 36px;
  line-height: 1.16;
  font-weight: 760;
  letter-spacing: 0;
}

body.studio-redesign .hero-title h1 :is(#userName, .hero-question) {
  color: inherit;
}

body.studio-redesign .hero-question::before {
  content: " / ";
  padding: 0 .18em;
  color: color-mix(in srgb, var(--sq-muted) 62%, transparent);
  font-weight: 430;
}

body.studio-redesign .hero-title p {
  margin: 10px 0 0;
  color: var(--sq-muted);
  font-size: 13px;
  line-height: 1.65;
  text-shadow: none;
}

body.studio-redesign .composer {
  width: min(920px, 100%);
  min-height: 210px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--sq-line);
  border-radius: var(--xq-radius);
  color: var(--sq-ink);
  background: var(--sq-panel);
  box-shadow: 0 22px 64px color-mix(in srgb, var(--sq-ink) 9%, transparent);
  transition: border-color .22s ease, box-shadow .28s ease, transform .28s var(--xq-ease);
}

body.studio-redesign .composer:focus-within {
  border-color: color-mix(in srgb, var(--sq-accent) 62%, var(--sq-line));
  box-shadow: 0 26px 74px color-mix(in srgb, var(--sq-ink) 11%, transparent), 0 0 0 3px var(--xq-accent-soft);
  transform: translateY(-1px);
}

body.studio-redesign .prompt-editor {
  min-height: 124px;
  max-height: min(250px, 36vh);
  padding: 2px 4px 16px;
  color: var(--sq-ink);
  font-size: 14px;
  line-height: 1.75;
}

body.studio-redesign .prompt-editor:empty::before {
  color: var(--sq-muted);
}

body.studio-redesign .composer-tools {
  min-height: 44px;
  padding-top: 12px;
  border-top: 1px solid var(--sq-line);
  gap: 6px;
}

body.studio-redesign .composer :is(.round, .chip) {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--xq-radius-small);
  color: var(--sq-muted);
  background: var(--sq-panel-soft);
}

body.studio-redesign .composer .chip {
  max-width: 245px;
}

body.studio-redesign .composer :is(.round, .chip):hover,
body.studio-redesign .composer .chip.menu-open {
  color: var(--sq-ink);
  border-color: var(--sq-line);
  background: color-mix(in srgb, var(--sq-panel) 82%, var(--sq-panel-soft));
}

body.studio-redesign .reference-mode-chip.active {
  color: var(--sq-accent-ink);
  border-color: var(--sq-accent);
  background: var(--sq-accent);
}

body.studio-redesign .arrow-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--sq-accent) 24%, transparent);
}

body.studio-redesign .credit-cost {
  margin-left: auto;
  color: var(--sq-muted);
}

/* Operational sections */
body.studio-redesign .home-copy-factory,
body.studio-redesign .creator-wall {
  width: min(var(--xq-content), 100%);
  margin-inline: auto;
}

body.studio-redesign .home-copy-factory {
  margin-top: 94px;
  padding-top: 34px;
  border-top: 1px solid var(--sq-line);
}

body.studio-redesign .copy-factory-head {
  margin-bottom: 22px;
}

body.studio-redesign .copy-factory-head h1,
body.studio-redesign .copy-factory-head h2 {
  color: var(--sq-ink);
  font-size: 30px;
  line-height: 1.18;
}

body.studio-redesign .copy-progress {
  border-radius: var(--xq-radius);
}

body.studio-redesign .copy-progress button {
  min-height: 68px;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

body.studio-redesign .copy-progress button:hover {
  background: color-mix(in srgb, var(--sq-panel) 82%, var(--sq-panel-soft));
}

body.studio-redesign .copy-stage {
  border-radius: var(--xq-radius);
  box-shadow: 0 18px 52px color-mix(in srgb, var(--sq-ink) 7%, transparent);
}

body.studio-redesign .copy-results-workspace,
body.studio-redesign .copy-script-card,
body.studio-redesign .copy-stage-footer {
  border-radius: var(--xq-radius);
}

body.studio-redesign .creator-wall {
  margin-top: 90px;
  padding-top: 32px;
  border-top: 1px solid var(--sq-line);
}

body.studio-redesign .creator-wall .section-head {
  margin-bottom: 18px;
}

body.studio-redesign .creator-wall h2 {
  color: var(--sq-ink);
  font-size: 26px;
}

body.studio-redesign .creator-grid {
  gap: 12px;
}

body.studio-redesign .creator-card {
  border-radius: var(--xq-radius);
}

/* Task mode stays dense and stable. */
body.studio-redesign .page-create.task-mode .studio-shell {
  width: min(1080px, calc(100% - 40px));
  padding-top: 24px;
}

body.studio-redesign .page-create.task-mode .composer {
  width: min(920px, 100%);
}

body.studio-redesign .video-task-card {
  border-color: var(--sq-line);
}

body.studio-redesign .task-prompt {
  color: var(--sq-ink);
}

body.studio-redesign .task-meta {
  color: var(--sq-muted);
}

/* Assets: discovery grid with clear project grouping. */
body.studio-redesign #page-assets,
body.studio-redesign #page-admin {
  width: min(var(--xq-content), calc(100% - 48px));
  margin-inline: auto;
  padding: 42px 0 76px;
}

body.studio-redesign :is(#page-assets, #page-admin) > .section-head {
  margin: 0 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sq-line);
}

body.studio-redesign :is(#page-assets, #page-admin) > .section-head h2 {
  margin: 0 0 7px;
  color: var(--sq-ink);
  font-size: 30px;
  line-height: 1.15;
}

body.studio-redesign :is(#page-assets, #page-admin) > .section-head p {
  color: var(--sq-muted);
}

body.studio-redesign .asset-group-head {
  min-height: 34px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--sq-line);
}

body.studio-redesign .asset-group-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body.studio-redesign .asset-card {
  border-radius: var(--xq-radius);
  transition: border-color .22s ease, transform .26s var(--xq-ease), box-shadow .26s ease;
}

body.studio-redesign .asset-card:hover {
  border-color: color-mix(in srgb, var(--sq-accent) 42%, var(--sq-line));
  box-shadow: 0 18px 42px color-mix(in srgb, var(--sq-ink) 10%, transparent);
  transform: translateY(-3px);
}

body.studio-redesign .asset-visual {
  aspect-ratio: 16 / 10;
}

/* Admin: quiet data surface, not a marketing card wall. */
body.studio-redesign .admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.studio-redesign .admin-grid .panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--sq-line);
  border-radius: var(--xq-radius);
  color: var(--sq-ink);
  background: var(--sq-panel);
  box-shadow: none;
}

body.studio-redesign .admin-grid .panel h3 {
  margin: 0 0 16px;
  color: var(--sq-ink);
  font-size: 15px;
}

body.studio-redesign .admin-grid .panel .row {
  min-height: 38px;
  border-color: var(--sq-line);
}

body.studio-redesign .employee-review-panel {
  grid-column: 1 / -1;
}

body.studio-redesign .featured-panel,
body.studio-redesign .invite-panel {
  grid-column: span 1;
}

/* Menus and player keep a compact native-tool feel. */
body.studio-redesign .menu-dialog {
  border: 1px solid var(--sq-line);
  border-radius: var(--xq-radius);
  color: var(--sq-ink);
  background: var(--sq-panel);
  box-shadow: 0 20px 56px color-mix(in srgb, var(--ff-shadow-ink) 22%, transparent);
}

body.studio-redesign .menu-dialog.anchored {
  overflow-x: hidden;
  overflow-y: auto;
}

body.studio-redesign .menu-dialog .menu {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body.studio-redesign .menu-dialog button {
  width: 100%;
  min-width: 0;
  border-radius: var(--xq-radius-small);
}

body.studio-redesign .menu-dialog :is(.model-option-copy, .model-option-copy b, .model-option-copy small) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.studio-redesign .video-dialog::backdrop {
  background: rgba(4, 6, 9, .86);
  backdrop-filter: blur(8px);
}

body.studio-redesign .video-dialog .video-player-shell {
  border-radius: var(--xq-radius);
}

body.studio-redesign .player-overlay {
  border-radius: var(--xq-radius-small);
}

/* Theme accuracy: every operational surface follows the active mode. */
:root[data-theme="light"] body.studio-redesign {
  --xq-stage: #111418;
  --xq-panel-raised: var(--ff-surface);
}

:root[data-theme="light"] body.studio-redesign :is(
  .topbar, .page, .hero-content, .copy-factory-shell, .copy-stage,
  .asset-group, .admin-grid, .employee-review-layout, .task-detail-panel
) {
  color: var(--ff-ink);
}

:root[data-theme="light"] body.studio-redesign :is(
  .copy-stage, .copy-progress button, .copy-script-card, .copy-results-workspace,
  .asset-card, .admin-grid .panel, .composer, .menu-dialog
) {
  color: var(--ff-ink);
}

:root[data-theme="light"] body.studio-redesign :is(
  .section-head p, .copy-stage p, .copy-stage small, .copy-result-meta,
  .copy-script-meta, .asset-copy p, .asset-copy span, .task-meta
) {
  color: var(--ff-muted);
}

:root[data-theme="light"] body.studio-redesign .sidebar {
  color: var(--ff-ink);
  background: var(--ff-surface);
}

:root[data-theme="light"] body.studio-redesign .sidebar :is(.brand-copy strong, .history-copy b, .settings-main) {
  color: var(--ff-ink);
}

:root[data-theme="light"] body.studio-redesign .sidebar :is(.brand-copy small, .history-head, .history-copy small) {
  color: var(--ff-muted);
}

:root[data-theme="light"] body.studio-redesign .sidebar-toggle,
:root[data-theme="light"] body.studio-redesign .nav button {
  color: var(--ff-muted);
}

:root[data-theme="light"] body.studio-redesign .sidebar-toggle:hover,
:root[data-theme="light"] body.studio-redesign .nav button:hover {
  color: var(--ff-ink);
  background: var(--ff-subtle);
}

:root[data-theme="light"] body.studio-redesign .nav button.active {
  color: var(--ff-ink);
  background: var(--ff-subtle);
}

:root[data-theme="dark"] body.studio-redesign .sidebar {
  color: #f5f7fa;
  background: #0b0e11;
}

:root[data-theme="dark"] body.studio-redesign :is(
  .copy-stage input, .copy-stage textarea, .copy-stage select,
  .settings-panel input, .settings-panel textarea
) {
  color: #f5f7fa;
}

/* Scrollbars remain invisible until the user interacts with the surface. */
body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
) {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
):is(:hover, :focus, :focus-within) {
  scrollbar-color: color-mix(in srgb, var(--sq-muted) 48%, transparent) transparent;
}

body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
)::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
)::-webkit-scrollbar-track {
  background: transparent;
}

body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
)::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: transparent;
}

body.studio-redesign :is(
  .history, .prompt-editor, .task-prompt, .copy-script-list,
  .copy-results-workspace, .task-detail-panel p, .employee-directory,
  .employee-workspace-review, .settings-panel
):is(:hover, :focus, :focus-within)::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--sq-muted) 48%, transparent);
}

@media (max-width: 1100px) {
  body.studio-redesign .studio-shell,
  body.studio-redesign #page-assets,
  body.studio-redesign #page-admin {
    width: min(100% - 36px, var(--xq-content));
  }

  body.studio-redesign .showcase-track {
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: repeat(3, 116px);
    min-height: 372px;
  }

  body.studio-redesign .showcase-card,
  body.studio-redesign .showcase-card:first-child {
    height: 116px;
    min-height: 116px;
  }

  body.studio-redesign .showcase-card:first-child {
    grid-row: 1 / 4;
    height: 372px;
    min-height: 372px;
  }

  body.studio-redesign .showcase-card:nth-child(4) {
    grid-column: auto;
  }

  body.studio-redesign .asset-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.studio-redesign .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.studio-redesign .topbar {
    padding-inline: 16px;
  }

  body.studio-redesign .studio-shell,
  body.studio-redesign #page-assets,
  body.studio-redesign #page-admin,
  body.studio-redesign .page-create.task-mode .studio-shell {
    width: calc(100% - 24px);
  }

  body.studio-redesign .studio-shell {
    padding-top: 18px;
  }

  body.studio-redesign .showcase {
    padding: 12px;
  }

  body.studio-redesign .showcase-head {
    min-height: 42px;
  }

  body.studio-redesign .showcase-head p {
    display: none;
  }

  body.studio-redesign .showcase-track {
    min-height: 238px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.studio-redesign .showcase-track::-webkit-scrollbar {
    display: none;
  }

  body.studio-redesign .showcase-card,
  body.studio-redesign .showcase-card:first-child {
    grid-row: auto;
    width: min(78vw, 310px);
    min-width: min(78vw, 310px);
    height: 238px;
    min-height: 238px;
    padding: 14px;
    scroll-snap-align: start;
  }

  body.studio-redesign .showcase-card:first-child .showcase-copy strong {
    font-size: 19px;
  }

  body.studio-redesign .hero-title {
    margin-top: 48px;
  }

  body.studio-redesign .hero-title h1 {
    font-size: 28px;
  }

  body.studio-redesign .hero-question {
    display: block;
    margin-top: 4px;
  }

  body.studio-redesign .composer {
    min-height: 228px;
    padding: 13px;
  }

  body.studio-redesign .composer-tools {
    align-items: center;
  }

  body.studio-redesign .composer .chip {
    max-width: 190px;
  }

  body.studio-redesign .home-copy-factory,
  body.studio-redesign .creator-wall {
    margin-top: 68px;
  }

  body.studio-redesign .copy-factory-head h1,
  body.studio-redesign .copy-factory-head h2 {
    font-size: 26px;
  }

  body.studio-redesign .asset-group-grid,
  body.studio-redesign .admin-grid {
    grid-template-columns: 1fr;
  }

  body.studio-redesign .employee-review-panel,
  body.studio-redesign .featured-panel,
  body.studio-redesign .invite-panel {
    grid-column: auto;
  }
}

/* Critical actions keep a stable hit box even while the rest of the UI animates. */
body.studio-redesign .composer-tools {
  position: relative;
  z-index: 6;
  isolation: isolate;
}

body.studio-redesign button[data-stable-hit-target] {
  min-width: 44px;
  min-height: 44px;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform: none !important;
}

body.studio-redesign button[data-stable-hit-target] > * {
  pointer-events: none;
}

body.studio-redesign .arrow-send[data-stable-hit-target] {
  width: 44px;
  height: 44px;
  z-index: 8;
}

body.studio-redesign .player-close[data-stable-hit-target] {
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  z-index: 50;
}

body.studio-redesign button[data-stable-hit-target]:focus-visible {
  outline: 2px solid var(--sq-accent);
  outline-offset: 3px;
}

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