/* Android-only adaptation candidate. V2.15 Apple presentation remains the baseline. */
@media (max-width: 950px) and (pointer: coarse) {
  html.yk-android body { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  html.yk-android body .app { box-sizing:border-box; min-width:0; max-width:100%; }
  html.yk-android body input,html.yk-android body textarea { font-size:max(16px,1em); }
  html.yk-android body .drawer-song { min-width:0; }
  html.yk-android body .drawer-song span { min-width:0; }
  html.yk-android body .drawer-song b { overflow-wrap:anywhere; }
  html.yk-android body .drawer-content { overscroll-behavior:contain; }
  html.yk-android body .song-drawer { max-width:100vw; max-height:var(--android-visible-height,100dvh); }
  html.yk-android body.space-stage .stage-control-layer section.stage-editor {
    max-width:calc(100vw - 24px)!important;
    max-height:min(50vh,calc(var(--android-visible-height,100dvh) - 135px))!important;
  }
  html.yk-android body.space-stage .stage-tools-toggle { min-height:44px!important; }
  html.yk-android body.space-stage .stage-tools button { min-height:44px!important; }
  html.yk-android body .stage-scope-dialog {
    max-height:calc(var(--android-visible-height,100dvh) - 28px);
    max-width:calc(100vw - 28px); padding:22px;
  }
  html.yk-android.android-keyboard-open body.space-stage .stage-control-layer section.stage-editor {
    bottom:calc(var(--android-obscured-bottom,0px) + 12px)!important;
    max-height:calc(var(--android-visible-height,100dvh) - 24px)!important;
  }
  html.yk-android.android-keyboard-open body .stage-scope-dialog {
    top:12px; bottom:auto; margin-top:0;
  }
  html.yk-android body.space-practice #practiceView .catalog-panel { min-width:0; min-height:0; }
  html.yk-android body.space-practice #practiceView .catalog-search input { min-width:0; font-size:17px; }
  html.yk-android body.space-practice #practiceView .catalog-filters {
    flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin;
  }
  html.yk-android body.space-practice #practiceView .catalog-filters button { flex-shrink:0; min-height:44px; }
}
@media (max-width: 600px) and (orientation: portrait) and (pointer: coarse) {
  html.yk-android body:not(.is-immersive) .app {
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(12px,env(safe-area-inset-right))!important;
  }
  html.yk-android body:not(.is-immersive) #appHeader.app-header {
    display:grid!important; grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important; gap:8px!important;
    padding:4px 0 10px!important; min-height:0!important;
  }
  html.yk-android body:not(.is-immersive) #appHeader.app-header>.brand {
    position:static!important; grid-column:1!important; grid-row:1!important;
    transform:none!important; margin:0!important; min-width:0; max-width:100%;
  }
  html.yk-android body #appHeader.app-header>.brand b { font-size:21px!important; }
  html.yk-android body #appHeader.app-header>.brand small { font-size:11px!important; letter-spacing:.04em!important; }
  html.yk-android body #appHeader.app-header>.brand img { width:36px!important; height:43px!important; }
  html.yk-android body #appHeader.app-header>.header-actions { grid-column:2!important; grid-row:1!important; }
  html.yk-android body #appHeader.app-header>.space-switch {
    position:static!important; grid-column:1 / -1!important; grid-row:2!important;
    transform:none!important; display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important; min-width:0!important; margin:0!important; box-sizing:border-box;
  }
  html.yk-android body #appHeader.app-header .space-switch>button {
    min-width:0!important; min-height:44px!important; padding:8px 5px!important; font-size:17px!important;
  }
  html.yk-android body.space-practice #practiceView .practice-layout {
    display:flex!important; flex-direction:column!important; gap:10px!important; min-height:0;
  }
  html.yk-android body.space-practice #practiceView .practice-sidebar { flex:0 0 auto!important; width:100%!important; padding:0!important; }
  html.yk-android body.space-practice #practiceView .current-practice { padding:8px!important; }
  html.yk-android body.space-practice #practiceView .practice-quick {
    display:flex!important; flex-wrap:nowrap!important; overflow-x:auto!important; gap:7px!important; padding:0 0 4px!important;
  }
  html.yk-android body.space-practice #practiceView .practice-quick-btn {
    flex:0 0 auto!important; min-height:44px!important; width:auto!important; padding:9px 12px!important; font-size:16px!important;
  }
  html.yk-android body.space-practice #practiceView .practice-quick>.practice-caption { display:none!important; }
  html.yk-android body.space-practice #practiceView .catalog-panel { flex:1!important; padding:12px!important; }
  html.yk-android body.space-practice #practiceView .catalog-rows { grid-template-columns:1fr!important; }
  html.yk-android body.space-stage #stageView .stage-song { top:36%!important; width:94%!important; right:3%!important; padding:16px!important; }
  html.yk-android body.space-stage #stageView .stage-search-suggestions.stage-word-globe { height:clamp(115px,20vh,165px)!important; }
  html.yk-android body.space-stage #stageView .stage-intro { top:4%!important; }
  html.yk-android body.space-stage #stageView .stage-song-label { font-size:18px!important; margin-top:10px!important; padding-top:10px!important; }
  html.yk-android body.space-lounge #loungeView .listening-controls { flex-wrap:wrap!important; min-width:0!important; gap:6px!important; }
  html.yk-android body.space-lounge #loungeView .listening-controls .timeline { min-width:0!important; flex-basis:100%!important; width:100%!important; }
  html.yk-android body.space-lounge #loungeView .listening-styles { overflow-x:auto!important; flex-wrap:nowrap!important; min-width:0!important; }
  html.yk-android body.space-lounge #loungeView .listening-styles button { flex-shrink:0!important; min-height:44px!important; }
}
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  html.yk-android body.space-stage #stageView .stage-song { top:4%!important; padding:12px 16px!important; }
  html.yk-android body.space-stage #stageView .stage-search-suggestions.stage-word-globe { height:100px!important; margin-bottom:6px!important; }
  html.yk-android body.space-stage #stageView .stage-song-label { font-size:16px!important; margin-top:8px!important; padding-top:8px!important; }
  html.yk-android body.space-stage .stage-control-layer section.stage-editor { max-height:calc(var(--android-visible-height,100dvh) - 115px)!important; }
}
