/* Give the interactive web room the workspace, rather than a preview card. */
@media (min-width: 901px) {
  body.is-logged-in .avatar-studio-view {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: calc(100svh - 24px);
    overflow: visible;
    padding-bottom: 16px;
  }
  .avatar-studio-view .avatar-studio-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .avatar-studio-view .avatar-studio-menu {
    position: static;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 6px;
  }
  .avatar-studio-view .avatar-studio-panel[data-avatar-panel="main"] {
    padding: 8px;
  }
  .avatar-studio-view .avatar-studio-panel[data-avatar-panel="main"] .avatar-dressing-room.engine-backed {
    height: max(480px, calc(100svh - 190px));
    min-height: 480px;
    aspect-ratio: auto;
    max-height: none;
  }
}

/* All Studio menu icons use the canonical control accent in every state. */
html body.is-logged-in .avatar-studio-menu .avatar-studio-tab i,
html body.is-logged-in .avatar-studio-menu .avatar-studio-tab i svg {
  color: var(--sp-color-violet) !important;
}
html[data-theme="dark"] body.is-logged-in .avatar-studio-menu .avatar-studio-tab i,
html[data-theme="dark"] body.is-logged-in .avatar-studio-menu .avatar-studio-tab i svg {
  color: var(--sp-control-icon-dark) !important;
}

/* Keep the Studio actions together; narrow screens scroll the same row. */
.avatar-studio-view .avatar-studio-menu {grid-template-columns:repeat(6,minmax(140px,1fr));overflow-x:auto}

/* Phones: the six Studio actions sit in a 3 x 2 grid, as in the iPhone app, so none is cut off. */
@media (max-width: 600px) {
  .avatar-studio-view .avatar-studio-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
  }
  .avatar-studio-view .avatar-studio-menu .avatar-studio-tab {
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
}

/* Phones and tablets: My Digital Studio fills the screen, as in the app; ‹ Profile goes back. */
@media (max-width: 1100px) {
  body.is-logged-in[data-app-view="avatar"] .app-topbar,
  body.is-logged-in[data-app-view="avatar"] .mobile-bottom-nav {
    display: none !important;
  }
  body.is-logged-in[data-app-view="avatar"] .avatar-studio-view {
    height: 100% !important;
    max-height: none !important;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* Consent reads as plain text on one panel, as in the app: topic headings over their paragraphs, no cards. */
html:root body .avatar-studio-panel[data-avatar-panel="privacy"] .avatar-privacy-grid { display: flex !important; flex-direction: column; gap: 14px !important; }
html:root body .avatar-studio-panel[data-avatar-panel="privacy"] .avatar-privacy-card.avatar-privacy-card.avatar-privacy-card {
  padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; background-color: transparent !important; box-shadow: none !important; backdrop-filter: none !important;
}
html:root body .avatar-studio-panel[data-avatar-panel="privacy"] .avatar-privacy-card strong { margin-bottom: 4px; font-size: 14px !important; }
html:root body .avatar-studio-panel[data-avatar-panel="privacy"] .avatar-privacy-card span { font-size: 13px !important; line-height: 1.45 !important; }

/* Phones: Studio section titles use the app's type (22 extra-bold). The page heading keeps the shared page-heading style. */
@media (max-width: 600px) {
  html:root body.is-logged-in .avatar-studio-panel .avatar-panel-heading h3 { font-size: 22px !important; font-weight: 800 !important; letter-spacing: 0 !important; }
}

/* Studio buttons show their icons without a tile, as in the app; the selected one is white on the violet. */
html:root body .avatar-studio-menu .avatar-studio-tab i {
  background: none !important; background-color: transparent !important; box-shadow: none !important; border-color: transparent !important;
}
html:root body .avatar-studio-menu .avatar-studio-tab:is(.active,[aria-pressed="true"]) i,
html:root body .avatar-studio-menu .avatar-studio-tab:is(.active,[aria-pressed="true"]) i svg { color: #ffffff !important; }
