/* Shared product navigation and interaction targets across the page mockups. */
.tabs a.nav-trigger { text-decoration: none; }
body:has(> #personalNav:not([hidden])) { --personal-nav-height: 52px; }
.personal-nav:not([hidden]) {
  display: flex; align-items: stretch; gap: 8px; min-height: 52px; max-width: 100%;
  padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg2);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.personal-nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; flex: none; min-height: 51px; padding: 10px 14px;
  color: var(--tx2); font-size: 14px; line-height: 22px; text-decoration: none; white-space: nowrap;
}
.personal-nav a:hover { color: var(--tx); background: var(--sf); }
.personal-nav a[aria-current=page] { color: var(--ac); font-weight: 600; }
.personal-nav a[aria-current=page]::after { content: ''; position: absolute; inset: auto 14px 0; height: 2px; background: var(--ac); }
.personal-nav i { padding: 1px 6px; border-radius: 999px; background: var(--sf); color: var(--tx2); font: 11px/18px var(--sans); }
.personal-nav i:empty { display: none; }
.personal-nav a:focus-visible { outline-offset: -4px; }
@media(max-width:767px) {
  body:has(> #personalNav:not([hidden])) { --personal-nav-height: 48px; }
  .personal-nav:not([hidden]) { gap: 0; padding-inline: 8px; }
  .personal-nav a { min-height: 47px; padding-inline: 12px; font-size: 13px; gap: 5px; }
  .personal-nav:not([hidden]) { min-height: 48px; }
}
.workspace-search-label { display: none; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .search { display: block !important; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top #q { visibility: hidden; pointer-events: none; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .search #qKbd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: absolute; inset: 0; transform: none; width: 100%; height: 100%; padding: 0 16px 0 40px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--sf); color: var(--mu);
  font: 14px/1.4 var(--sans); box-shadow: none;
}
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .sic { z-index: 1; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .search :is(#qx,#qDone) { display: none; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top #qKbd .workspace-search-label { display: inline; order: -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top #qKbd .hist-quick-search { display: none; }
body #grid .cbtns button { min-width: 40px; min-height: 40px; }
body #grid .card-copy { min-width: 36px; min-height: 36px; }
html body #top #languageMenu summary::before { content: none; }
html body #top #languageMenu summary > svg:first-child { display: block; }
html body #top #theme .sun { display: block; }
html body #top #theme .moon { display: none; }
html[data-theme=dark] body #top #theme .sun { display: none; }
html[data-theme=dark] body #top #theme .moon { display: block; }
@media(min-width:1024px) {
  html body #top.top[class] {
    display: grid; grid-template: 'brand nav context search tools' 78px / auto auto minmax(80px,1fr) minmax(180px,344px) auto;
    align-items: center; gap: 24px; height: 78px; min-height: 78px; margin: 0; padding: 0 34px;
    border-bottom: 1px solid var(--line); background: var(--bg2);
  }
  html body #top .brand { display: flex; align-items: center; gap: 9px; width: auto; margin: 0; }
  html body #top .mark { width: 36px; height: 36px; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html body #top .mark > svg, html body #top .mark .pose-brand { display: none; }
  html body #top .mark .costume-brand { display: block; width: 36px; height: 36px; object-fit: contain; }
  html body #top .wm { display: flex; flex-direction: row; align-items: baseline; gap: 6px; }
  html body #top .wm b, html body #top .wm small { display: inline; color: var(--tx); font-size: 18px; line-height: 26px; letter-spacing: 0; font-weight: 550; }
  html body #top .wm small::before { content: '/ '; }
  html body #top .tabs { display: flex; align-items: stretch; align-self: stretch; width: auto; gap: 30px; margin: 0 0 0 12px; padding: 0; }
  html body #top .tabs .shell-menu { width: auto; height: 100%; }
  html body #top .tabs .nav-trigger { display: flex; align-items: center; justify-content: center; width: auto; height: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--tx2); font-size: 18px; font-weight: 500; white-space: nowrap; }
  html body #top .tabs .nav-trigger > svg, html body #top .tabs .history-nav { display: none; }
  html body #top .tabs .nav-trigger.on, html body #top .tabs .current > .nav-trigger { color: var(--ac); background: none; }
  html body #top .tabs .nav-trigger.on::after, html body #top .tabs .current > .nav-trigger::after { display: block; position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 2px; transform: none; background: var(--ac); }
  html body #top .shell-context { display: flex; align-items: center; min-width: 0; min-height: 30px; height: auto; margin: 0; padding: 0 0 0 22px; gap: 12px; border-left: 1px solid var(--line); font-size: 16px; }
  html body #top .shell-context > :is(#creativeSpaceMenu,#historyPageMenu) { display: none; }
  html body #top #shellPage { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); font-size: 16px; font-weight: 550; }
  html body #top #shellPage::after { display: none; }
  html body #top #studioEmptyReferences { min-width: 0; padding: 4px 0; border: 0; background: none; font-size: 15px; }
  html body.studio-empty #top #shellPage { display: none; }
  html body #top .search { display: block !important; width: 100%; min-width: 0; max-width: none; height: 44px; margin: 0; justify-self: stretch; }
  html body #top #q { width: 100%; height: 44px; min-height: 44px; padding: 8px 70px 8px 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--sf); font-size: 15px; }
  html body #top #q:not(:focus)::placeholder { color: var(--mu); }
  html body #top .sic { left: 14px; width: 19px; height: 19px; stroke: var(--mu); }
  html body #top .q-kbd { left: auto; right: 12px; padding: 3px 6px; border: 0; background: var(--bg2); color: var(--mu); font: 12px/1.4 var(--sans); }
  html body #top .tools { display: flex; align-items: center; gap: 17px; width: auto; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line); }
  html body #top .tools > :is(#languageMenu,#themeMenu) { display: flex; }
  html body #top .tools > :is(#languageMenu,#themeMenu) { margin: 0; padding: 0; border: 0; }
  html body #top .tools .settings-label, html body #top #favoriteLocale, html body #top #languageMenu summary::after { display: none; }
  html body #top .tools .icon { display: grid; place-items: center; width: 36px; height: 44px; min-height: 44px; padding: 6px; border: 0; border-radius: 8px; background: none; }
  html body #top .tools .icon > svg { width: 24px; height: 24px; }
  html body #top #languageMenu summary { display: grid; width: 36px; gap: 0; }
  html body #top #languageMenu .recent-language-icon { display: none; }
  html body #top #themeMenu { margin: 0; padding: 0; border: 0; }
  html body #top .asw { display: flex; align-items: center; gap: 7px; min-height: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; font-size: 16px; }
  html body #top .asw b { order: -1; font-weight: 500; }
  html body #top .asw .trk { width: 40px; height: 24px; background: var(--line2); }
  html body #top .asw .kn { width: 18px; height: 18px; top: 3px; left: 3px; }
  html body #top .asw[aria-checked=true] .trk { background: var(--ac); }
  html body #top .asw[aria-checked=true] .kn { transform: translateX(16px); }
  html body #top .tools #trayFab { display: flex; width: 36px; min-height: 44px; padding: 0; }
  html body #top .tools #trayFab .dock-mark { width: 32px; height: 32px; }
  html body #top :is(.shell-pop,.lang-panel,.theme-pop) { top: calc(100% + 8px); }
  html body #top :is(#languageMenu,#themeMenu) .shell-pop, html body #top .lang-panel { left: auto; right: 0; }
}
@media(min-width:1024px) and (max-width:1279px) {
  html body #top.top[class] { gap: 14px; padding-inline: 24px; grid-template-columns: auto auto minmax(60px,1fr) minmax(140px,240px) auto; }
  html body #top .tabs { gap: 20px; margin-left: 0; }
  html body #top .tabs .nav-trigger { font-size: 15px; }
  html body #top .shell-context { padding-left: 14px; }
  html body #top #shellPage { font-size: 14px; }
  html body #top .tools { gap: 10px; padding-left: 12px; }
  html body #top .asw .trk { display: none; }
  html body #top .wm b, html body #top .wm small { font-size: 16px; }
  html body #top .mark { width: 32px; height: 32px; }
  html body #top .mark .costume-brand { width: 32px; height: 32px; }
}
@media(max-width:1023px) {
  body.studio-empty #studioReferences { position: static; width: auto; height: auto; }
  body.studio-empty #studioReferences > summary { display: none; }
  body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .search:focus-within { position: relative; inset: auto; grid-area: search; z-index: auto; width: 100%; height: 40px; }
  body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top .search #qKbd { display: grid; place-items: center; padding: 0; }
  body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top #qKbd .workspace-search-label { display: none; }
  body:is([data-tab=studio],[data-tab=history],[data-tab=account]) #top #qKbd > .command-key { display: none; }
  body.mobile-library #grid .mobile-card-favorite { min-width: 36px; min-height: 40px; }
  body.mobile-library #grid .mobile-card-menu summary { min-width: 28px; min-height: 40px; }
  body.mobile-library #grid .card .card-badges .card-flip { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; top: 8px; left: 8px; border-radius: 20px; background: var(--bg2); color: var(--tx); font-size: 11px; }
  body.mobile-library #grid .card-flip .flip-hint { display: none; }
}
