/* Shared mobile navigation from mockups 22–24. Browser chrome is not simulated. */
@media (max-width:1023px) {
  :root { --mobile-gutter: clamp(12px,3.75vw,35px); }
  body #top.top { display: grid; grid-template: 'brand nav context search tools' 64px / 56px minmax(0,1fr) 28px 28px 84px; gap: 4px; padding: 0 12px; height: 64px; min-height: 64px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  body #top .brand { width: 56px; min-width: 0; gap: 4px; }
  body #top .mark { width: 26px; height: 30px; border: 0; border-radius: 0; background: none; box-shadow: none; }
  body #top .mark > svg { display: none; }
  body #top .mark .pose-brand { display: block; width: 26px; height: 28px; object-fit: contain; }
  body #top .mark .costume-brand { display: none; }
  body #top .wm { display: flex; flex-direction: column; gap: 0; }
  body #top .wm b { font-size: 11px; line-height: 14px; }
  body #top .wm small { display: block; color: var(--tx); font-size: 8px; line-height: 10px; letter-spacing: .08em; }
  body #top .tabs { display: grid; grid-template-columns: 1fr 1fr .75fr; width: 100%; height: 100%; gap: 3px; margin: 0; padding: 0; align-self: stretch; }
  body #top .tabs .nav-trigger { display: flex; justify-content: center; width: 100%; height: 100%; min-height: 44px; padding: 0; border-radius: 0; gap: 0; background: none; color: var(--tx2); font-size: 12px; }
  body #top .tabs .nav-trigger > svg, body #top .history-nav { display: none; }
  body #top .tabs .history-nav { display: none; }
  body #top .tabs .nav-trigger > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body #top #libraryLabel { font-size: 0; }
  body #top #libraryLabel::after { content: attr(data-mobile-label); font-size: 12px; }
  body #top .tabs .current > .nav-trigger, body #top .tabs .nav-trigger.on { color: var(--ac); }
  body #top .tabs .current > .nav-trigger::after, body #top .tabs .nav-trigger.on::after { display: block; bottom: 8px; width: 18px; height: 2px; left: 50%; transform: translateX(-50%); }
  body #top .shell-context { display: flex; grid-area: context; width: 28px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; }
  body #top .shell-context > :not(#creativeSpaceMenu), body #top #creativeSpaceMenu summary span { display: none; }
  body #top #creativeSpaceMenu summary { display: grid; place-items: center; width: 28px; height: 40px; padding: 0; }
  body #top #creativeSpaceMenu summary svg { width: 20px; height: 20px; }
  body #top .search { display: block; grid-area: search; width: 28px; min-width: 0; max-width: none; height: 40px; margin: 0; }
  body #top #q { width: 28px; height: 40px; min-height: 40px; padding: 0; border: 0; background: var(--sf); color: transparent; border-radius: 16px; font-size: 14px; }
  body #top #q::placeholder { color: transparent; }
  body #top .sic { pointer-events: none; left: 5px; width: 18px; height: 18px; }
  body #top .q-kbd, body #top #qx { display: none; }
  body #top .search:focus-within { position: fixed; grid-area: auto; z-index: 30; inset: 10px 12px auto; width: calc(100vw - 24px); height: 44px; }
  body #top .search:focus-within #q { width: 100%; height: 44px; padding: 0 80px 0 36px; border: 1px solid var(--line2); background: var(--bg2); color: var(--tx); }
  body #top .search:focus-within #q::placeholder { color: var(--mu); }
  body #top .search:focus-within .sic { left: 12px; }
  body #top .search:focus-within #qDone { display: block; height: 40px; font-size: 13px; }
  body #top .search:focus-within #qDone { position: absolute; z-index: 2; right: 2px; top: 2px; }
  body #top #qsug { top: 52px; }
  body #top .tools { display: flex; gap: 0; width: 84px; margin: 0; padding: 0; border: 0; }
  body #top .tools > :is(#adultSw,#languageMenu,#themeMenu) { display: flex; flex: none; }
  body #top .tools :is(.icon,#adultSw) { display: grid; place-items: center; width: 28px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: none; }
  body #top #adultSw b { font-size: 11px; font-weight: 500; }
  body #top #adultSw .trk, body #top .settings-label, body #top #favoriteLocale, body #top #languageMenu summary::after { display: none; }
  body #top #adultSw[aria-checked=true] { color: var(--ac); }
  body #top .tools .icon > svg { width: 20px; height: 20px; }
  body #top .tools :is(.icon,#adultSw)::after { display: none; }
  body #top .recent-language-icon { display: none !important; }
  body #top :is(.shell-pop,.lang-panel,.theme-pop) { position: fixed; top: 68px; left: 12px; right: 12px; width: auto; min-width: 0; max-width: none; max-height: calc(100dvh - 90px); overflow-y: auto; }
  body #top .shell-pop button, body #top .shell-pop a { min-height: 44px; }
  body #top .tools #trayFab { display: none; }
}
@media (min-width:768px) and (max-width:1023px) {
  body #top.top { grid-template-columns: 90px minmax(200px,1fr) 100px 100px 140px; gap: 12px; height: 78px; grid-template-rows: 78px; padding-inline: 28px; }
  body #top .brand { width: 90px; gap: 8px; }
  body #top .mark, body #top .mark .pose-brand { width: 34px; height: 36px; }
  body #top .wm b { font-size: 16px; line-height: 20px; }
  body #top .wm small { font-size: 10px; line-height: 13px; }
  body #top .tabs .nav-trigger { font-size: 17px; }
  body #top #libraryLabel::after { font-size: 17px; }
  body #top .shell-context, body #top #creativeSpaceMenu summary { width: 100px; }
  body #top #creativeSpaceMenu summary { display: flex; gap: 8px; font-size: 16px; }
  body #top #creativeSpaceMenu summary span { display: inline; }
  body #top .search, body #top #q { width: 100px; }
  body #top .tools { width: 140px; justify-content: space-between; }
  body #top .tools :is(.icon,#adultSw) { width: 40px; height: 44px; }
  body #top .tools .icon > svg { width: 25px; height: 25px; }
  body #top #adultSw b { font-size: 17px; }
  body #top :is(.shell-pop,.lang-panel,.theme-pop) { top: 82px; }
}
@media (max-width:359px) {
  body #top.top { grid-template-columns: 28px minmax(0,1fr) 28px 28px 84px; padding-inline: 8px; gap: 2px; }
  body #top .brand { width: 28px; }
  body #top .wm { display: none; }
}
