/* 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 (chosen sample A): each is a glass button like the rest of Spossity (liquid-glass.css: gloss, hairline
   edge, soft shadow, 12 corners), its icon in the app's glossy icon tile (10). The selected one is violet glass. */
html:root:root body.is-logged-in .avatar-studio-menu { gap: 8px !important; padding: 10px !important; }
html:root:root body.is-logged-in .avatar-studio-menu .avatar-studio-tab {
  background: var(--lg-gloss), var(--lg-float) !important; border: 1px solid var(--lg-float-edge) !important;
  border-radius: 12px !important; box-shadow: var(--lg-shadow) !important;
}
html:root:root body.is-logged-in .avatar-studio-menu .avatar-studio-tab i {
  border-radius: 10px !important; border: 1px solid rgba(29, 75, 153, .12) !important; background: #edf4ff !important;
  box-shadow: 0 3px 9px rgba(14, 50, 105, .1), inset 0 1px 0 rgba(255, 255, 255, .8) !important;
}
html:root:root[data-theme="dark"] body.is-logged-in .avatar-studio-menu .avatar-studio-tab i {
  border-color: rgba(148, 184, 255, .2) !important;
  background: radial-gradient(circle at 32% 22%, rgba(129, 174, 255, .28), transparent 34%), linear-gradient(155deg, #245695, #112d53 72%) !important;
  box-shadow: 0 6px 14px rgba(0, 4, 13, .34), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
}
html:root:root body.is-logged-in .avatar-studio-menu .avatar-studio-tab:is(.active,[aria-pressed="true"]) {
  color: #ffffff !important; border-color: rgba(255, 255, 255, .4) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, var(--sp-color-violet, #7a45f0), #5b6cf5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 22px rgba(122, 69, 240, .45) !important;
}
html:root:root body.is-logged-in .avatar-studio-menu .avatar-studio-tab:is(.active,[aria-pressed="true"]) i {
  background: rgba(255, 255, 255, .18) !important; border-color: rgba(255, 255, 255, .35) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3) !important;
}
/* The tile's own shine strip (i::after in the dark theme) is not used here: the tile carries its gloss. */
html:root body .avatar-studio-menu .avatar-studio-tab i::after,
html:root body .avatar-studio-menu .avatar-studio-tab i::before { content: none !important; display: none !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; }

/* My Avatar before the member has created theirs: the empty room with one card to create it. */
.avatar-dressing-room .avatar-none-card {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(300px, calc(100% - 40px));
  padding: 20px 18px; border-radius: 24px; text-align: center; color: #0b285b;
  background: rgba(246, 244, 252, .94); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 18px 40px rgba(8, 23, 43, .28);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.avatar-dressing-room .avatar-none-card[hidden] { display: none; }
.avatar-dressing-room .avatar-none-card strong { font-size: 18px; line-height: 1.25; }
.avatar-dressing-room .avatar-none-card span { font-size: 14px; line-height: 1.45; color: #52698f; }
.avatar-dressing-room .avatar-none-card button { margin-top: 4px; min-height: 46px; padding: 0 22px; }
html[data-theme="dark"] .avatar-dressing-room .avatar-none-card { color: #f5f8ff; background: rgba(8, 23, 43, .9); border-color: rgba(159, 180, 210, .28); }
html[data-theme="dark"] .avatar-dressing-room .avatar-none-card span { color: #9fb4d2; }
/* Tapping Makeover or Preview before there is an avatar draws attention to the card. */
.avatar-dressing-room .avatar-none-card.is-nudged { animation: avatar-none-nudge .5s var(--sp-ease-snappy, ease); }
@keyframes avatar-none-nudge { 0%, 100% { transform: translate(-50%, -50%); } 30% { transform: translate(-50%, -50%) scale(1.04); } 60% { transform: translate(-50%, -50%) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .avatar-dressing-room .avatar-none-card.is-nudged { animation: none; } }
/* My Avatar, Makeover and Preview wait, dimmed, until the member has created their avatar. */
html:root body .avatar-studio-menu .avatar-studio-tab.is-waiting { opacity: .45; }
