.mobile-menu {
  display: none;
}
.mobile-settings {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  color: inherit;
  text-decoration: none;
}
@media (max-width: 760px), (max-height: 540px) and (pointer: coarse) {
  :root {
    color-scheme: dark;
  }
  body[data-console-studio] {
    margin: 0;
    display: block;
    height: auto;
    overflow: auto;
  }
  body[data-console-studio] .workspace {
    margin: 0;
    width: 100%;
    padding: 0 14px 24px;
    min-width: 0;
    box-sizing: border-box;
  }
  body[data-console-studio] .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 58px;
    padding: 8px 10px;
    margin: 0 -3px 12px;
    gap: 8px;
    border-radius: 0 0 15px 15px;
    background: #182232f5;
  }
  .mobile-menu {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    border: 1px solid #66718170;
    border-radius: 12px;
    color: #ffe3d7;
    background: #2e3444;
    padding: 0 12px;
  }
  body[data-console-studio] .sidebar {
    display: none;
    position: fixed;
    inset: 58px auto auto 9px;
    width: min(265px, 82vw);
    height: auto;
    max-height: 78dvh;
    overflow: auto;
    padding: 14px;
    z-index: 30;
    border-radius: 16px;
    background: #202939;
  }
  body[data-console-studio].menu-open .sidebar {
    display: block;
  }
  .sidebar .brand,
  .sidebar .nav-caption,
  .sidebar-bottom,
  .top-actions #refresh {
    display: none !important;
  }
  #navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  #navigation button {
    min-height: 46px;
    text-align: left;
    padding: 6px 8px;
    white-space: normal;
  }
  .top-actions {
    gap: 5px;
    min-width: 0;
  }
  .top-actions .button,
  .top-actions button {
    font-size: 0.8rem;
    padding: 6px;
    max-width: 31vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumb {
    font-size: 0.75rem;
    min-width: 0;
  }
  .grid,
  .grid.two,
  .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .page-heading,
  .row-actions {
    flex-wrap: wrap;
  }
  .hero,
  .commerce-hero {
    min-height: 0;
    padding: 23px 18px;
  }
  .avatar-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  .avatar-library-grid .owned-card {
    min-height: 0 !important;
    min-width: 0;
    aspect-ratio: 3/5;
  }
  .owned-card .owned-avatar-info {
    padding: 8px;
  }
  .owned-card h3 {
    font-size: 1.1rem;
  }
  .owned-card-actions {
    gap: 3px;
    flex-wrap: wrap;
  }
  dialog {
    max-width: 95vw;
    max-height: 88dvh;
    overflow: auto;
  }
  input,
  select,
  textarea {
    max-width: 100%;
  }
  .hall-brand {
    position: relative !important;
    inset: auto !important;
    margin: 0;
    padding: 16px 15px;
    display: flex;
    width: auto;
    align-items: center;
  }
  .hall-main {
    height: auto !important;
    min-height: 0 !important;
    display: block;
    padding: 0 14px 96px !important;
  }
  .hall-title {
    margin: 12px 0 22px !important;
  }
  .hall-title h1 {
    font-size: clamp(28px, 8vw, 42px);
  }
  .companion-rail {
    width: 100% !important;
    overflow: visible !important;
  }
  .companion-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .companion-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 3/5.3;
    border-radius: 16px !important;
  }
  .hall-brand,
  .hall-main,
  .hall-footer {
    box-sizing: border-box;
    max-width: 100vw;
  }
  .companion-rail {
    padding: 0 !important;
  }
  .companion-cards {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .companion-card:only-child {
    grid-column: 1/-1;
    max-width: min(70vw, 260px) !important;
    justify-self: center;
  }
  .companion-info {
    inset: auto 9px 10px !important;
    padding: 0 !important;
  }
  .companion-tags:empty {
    display: none;
  }
  .companion-description {
    height: auto !important;
    margin: 0 0 9px !important;
  }
  body[data-console-studio] .owned-avatar-info {
    inset: auto 8px 10px;
    padding: 0;
  }
  body[data-console-studio] .owned-card-actions {
    display: flex;
    gap: 4px;
  }
  body[data-console-studio] .owned-card-actions button {
    min-width: 0;
    padding: 6px;
    border-radius: 10px;
    min-height: 36px;
  }
  body[data-console-studio] .owned-avatar-info p {
    font-size: 12px;
    line-height: 1.4;
    margin: 4px 0;
  }
  body[data-console-studio] .owned-avatar-info h3 {
    font-size: 17px;
  }
  .companion-info {
    padding: 0 !important;
  }
  .companion-info h2 {
    font-size: 1.05rem !important;
  }
  .companion-enter {
    font-size: 0.8rem !important;
    min-height: 36px;
  }
  .companion-description {
    font-size: 0.76rem !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .companion-tags {
    max-height: 22px;
    overflow: hidden;
  }
  body:has(.hall-main) {
    overflow-y: auto !important;
    height: auto !important;
  }
}

/* The Android shell owns the viewport; only the page's content region scrolls. */
html.android-app {height:100%;overflow:hidden;overscroll-behavior:none}
.android-app body[data-console-studio], .android-app body[data-companion-hall] {
  height:100dvh!important;min-height:0!important;overflow:hidden!important;overscroll-behavior:none;
}
.android-app body[data-companion-hall] {
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;
}
.android-app .hall-brand {position:static;inset:auto;padding:10px 16px;min-height:52px;max-width:none}
.android-app .hall-main {min-height:0!important;height:auto!important;display:block;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:10px 14px 18px!important}
.android-app .hall-main .hall-title {margin:8px 0 18px!important}
.android-app .hall-footer {position:static;inset:auto;min-height:0;display:block;padding:0;background:#172131f5;border-top:1px solid #eed5ce28;}
.android-app .hall-footer nav {padding:3px 6px 5px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;max-width:none;gap:0;}
.android-app .hall-footer nav a,.android-app .hall-footer #create-companion {
  min-width:0;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:2px;
  color:#dacfd2;font-size:12px;line-height:1.2;white-space:nowrap;letter-spacing:0;background:none;border:0;box-shadow:none;border-radius:10px;font-family:inherit;
}
.android-app .hall-footer nav .yn-icon {width:20px;height:20px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.android-app .hall-footer #create-companion span:first-child {display:grid;place-items:center;width:37px;height:24px;border-radius:9px;background:#deb1a6;color:#281e25;font:22px/1 sans-serif;}
.android-app .hall-footer #create-companion span:last-child {font:inherit;color:#f4d7ce}
.android-app .hall-footer :focus-visible {outline:2px solid #e5b9ad}
.companion-info .yn-download {
  display: block; margin: 5px auto 0; padding: 6px 12px; max-width: 100%;
  border: 0; border-radius: 12px; color: #f2e4dd; background: #1d2432c4;
  font: inherit; font-size: 12px; line-height: 1.35; cursor: pointer;
}
.companion-info .yn-download:focus-visible { outline: 2px solid #ebc0ac; }
.companion-info .yn-download:disabled { cursor: progress; }
@media(max-width:900px), (max-height:540px) {
  .android-app body[data-console-studio] {display:block;}
  .android-app body[data-console-studio] .workspace {box-sizing:border-box;width:100%;height:100%;min-height:0;margin:0;padding:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  .android-app body[data-console-studio] .workspace>footer {display:none}
  .android-app body[data-console-studio] .topbar {position:relative;inset:auto;margin:0;min-height:52px;border-radius:0;padding:6px 10px}
  .android-app body[data-console-studio] #main {position:static;height:auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px;min-width:0;}
}
