/* 移动端：底部抽屉（bottom sheet），可上下拖动，最高 90vh */
  @media (max-width:640px), (pointer:coarse){
    #panel{
      top:auto; left:0; right:0; bottom:0; width:100%;
      height:var(--sheet-h, 112px); max-height:90vh; min-height:100px;
      padding:6px 16px 18px;
      border-radius:20px 20px 0 0; border-bottom:none;
      transition:transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s, height .08s linear;
      display:flex; flex-direction:column; overflow:hidden;
    }
    /* 头部（拖动条+时间轴）固定，仅内容区滚动，互不重叠 */
    #panelHead{ flex:none; position:relative; z-index:8; }
    #panelBody{ flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
      scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.18) transparent; }
    #panelBody::-webkit-scrollbar{ width:4px; }
    #panelBody::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.18); border-radius:4px; }
    #panel.collapsed{ transform:translateY(calc(100% - 44px)); opacity:1; }
    #dragHandle{
      display:flex; align-items:center; justify-content:center; height:15px;
      margin:0 -16px 4px; cursor:ns-resize; touch-action:none;
      border-radius:20px 20px 0 0;
      background:transparent;
    }
    #dragHandle::before{
      content:""; width:42px; height:4px; border-radius:4px; background:rgba(255,255,255,.32);
    }
    #toggleUI{ top:14px; left:14px; }
    #hint{ display:none; }
    /* 移动端时间轴在面板头部 */
    .time-ruler{
      position:relative; height:46px; margin:6px 0 4px;
      border-radius:10px; border:1px solid rgba(255,255,255,.09);
    }
    /* 观测天体：正方形卡片（上图片下名称），单行横向滚动 */
    #planetGrid{
      display:flex; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden;
      gap:10px; padding-bottom:8px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch;
    }
    #planetGrid .pbtn{
      flex:0 0 78px; min-width:78px; width:78px; height:78px; scroll-snap-align:start;
      display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
      padding:7px 4px; border-radius:12px;
    }
    #planetGrid .pbtn-img{
      display:block; width:46px; height:42px; object-fit:contain;
      filter:drop-shadow(0 2px 6px rgba(0,0,0,.55));
    }
    #planetGrid .pbtn-name{ font-size:11px; line-height:1; white-space:nowrap; }
    #planetGrid::-webkit-scrollbar{ height:3px; }
    #planetGrid::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.22); border-radius:3px; }

    /* === 移动端整体放大：组件、文本、选项高度 === */
    #panel{ padding:8px 16px 22px; }
    .p-stats{ gap:10px; margin:14px 0 6px; padding:12px; }
    .p-stats span{ font-size:11px; }
    .p-stats b{ font-size:14px; margin-top:4px; }
    .sep{ margin:16px 0; }
    .phase-row{ font-size:12px; padding:10px 12px; margin-top:11px; }
    .ctrl{ margin-bottom:16px; }
    .ctrl label{ font-size:13px; margin-bottom:10px; }
    input[type=range]{ height:5px; }
    input[type=range]::-webkit-slider-thumb{ width:18px; height:18px; }
    input[type=range]::-moz-range-thumb{ width:18px; height:18px; }
    .switches{ gap:11px; }
    .tg{ padding:14px 14px; font-size:13px; }
    .sw-item .ctrl{ padding:2px 14px 14px; }
    .tg i{ width:34px; height:19px; border-radius:10px; }
    .tg i::after{ width:15px; height:15px; top:1px; left:1px; }
    .tg.on i::after{ left:17px; }
    .pbtn, .sbtn, .vbtn{ padding:11px 0; font-size:12px; border-radius:10px; }
    #planetGrid .pbtn{ flex-basis:82px; min-width:82px; width:82px; height:82px; padding:8px 4px; }
    #planetGrid .pbtn-img{ width:50px; height:44px; }
    #planetGrid .pbtn-name{ font-size:12px; }
    .speed-ticks{ height:20px; margin-top:9px; }
    .speed-ticks span{ font-size:11px; padding:3px 1px; }
    button.main{ padding:12px; font-size:13px; border-radius:11px; }
    .btn-row{ gap:10px; margin-top:11px; }
    .event{ font-size:12px; line-height:1.7; margin-top:12px; }
    .p-foot{ font-size:11px; margin-top:16px; }
    #dragHandle{ height:20px; }
    #dragHandle::before{ width:52px; height:5px; }
    .time-ruler{ height:52px; }
    .ruler-unit{ font-size:10px; }
  }
