.phone-nav,.phone-sheet,.phone-observation,.phone-ranking-status{display:none}
@media(max-width:680px), (max-width:1000px) and (max-height:500px) and (pointer:coarse){
  html:has(.phone-layout),body.phone-layout{height:100%;overflow:hidden;overscroll-behavior:none}
  body.phone-layout{height:100dvh;display:flex;flex-direction:column}
  .phone-layout .topbar{height:48px;min-height:48px;padding:0 10px}
  .phone-layout .brand h1{font-size:16px}.phone-layout .brand p{display:none}
  .phone-layout .refresh{min-height:40px;font-size:11px}
  .phone-observation{display:flex;align-items:end;gap:8px;padding:6px 10px;background:#fff;flex-shrink:0;z-index:650}
  .phone-variable{flex:1;min-width:0}
  .phone-observation label{display:block;font-size:11px;font-weight:700;color:#52717f;margin:0 0 3px}
  .phone-observation select{font-size:16px;min-width:0;min-height:44px;padding:8px;width:100%}
  .phone-observation #period-wrap{width:105px;flex-shrink:0}
  .phone-observation #period-wrap[hidden]{display:none}
  .phone-ranking-status{display:flex;align-items:center;gap:8px;background:#e1eff0;padding:5px 10px;font-size:11px;flex-shrink:0}
  .phone-ranking-status[hidden]{display:none}.phone-ranking-status>span{flex:1;min-width:0}
  .phone-ranking-status button{border:1px solid #a4c6cc;border-radius:5px;background:#fff;min-height:36px;font-size:11px;padding:4px 8px}
  .phone-layout .workspace{display:block;flex:1;min-height:0;height:auto;position:relative}
  .phone-layout .sidebar{display:contents}
  .phone-layout .workspace>.map-shell{position:absolute;inset:0;display:block;height:100%;min-height:0;overflow:hidden}
  .phone-layout .map-shell>#map{position:absolute;inset:0;height:100%;min-height:0;touch-action:none}
  .phone-layout .map-heading{position:absolute;top:8px;left:10px;right:10px;padding:6px 9px;max-width:none;border-radius:6px;background:#e8f1f3ed;pointer-events:none}
  .phone-layout .map-heading .eyebrow,.phone-layout .map-heading h2{display:none}
  .phone-layout #valid-time,.phone-layout .map-heading p:last-child{font-size:11px;line-height:1.35;max-width:none}
  .phone-layout .dark-map .map-heading{background:#102632ed}
  .phone-layout .map-tools{position:absolute;top:auto;bottom:24px;left:8px;right:54px;padding:0;gap:5px;max-width:none;justify-content:flex-start}
  .phone-layout .map-tools>button,.phone-layout .map-tools>label{font-size:11px;min-height:44px;padding:8px}
  .phone-layout .map-tools input{width:16px;height:16px}
  .phone-layout .leaflet-control-zoom{margin-bottom:24px!important;margin-right:8px!important}
  .phone-layout .leaflet-control-zoom a{width:40px!important;height:40px!important;line-height:40px!important}
  .phone-layout .leaflet-control-attribution{font-size:8px!important;max-width:100%}
  .phone-nav{display:flex;flex-shrink:0;z-index:1100;background:#102c3a;padding:4px 4px calc(4px + env(safe-area-inset-bottom));gap:3px}
  .phone-nav button{flex:1;min-width:0;min-height:48px;font-size:11px;border:0;background:transparent;color:#d2e3e9;border-radius:6px;padding:4px 2px}
  .phone-nav button[aria-pressed=true]{background:#087f87;color:#fff;font-weight:700}
  .phone-sheet{display:flex;position:fixed;inset:auto 8px calc(64px + env(safe-area-inset-bottom));height:calc(100dvh - 138px - env(safe-area-inset-bottom));max-height:82dvh;z-index:1000;flex-direction:column;overflow:hidden;background:#fff;color:#17323e;border:1px solid #cbd8df;border-radius:12px;box-shadow:0 8px 35px #10263255}
  .phone-keyboard .phone-sheet{top:calc(var(--phone-visible-top,0px) + 8px);bottom:auto;height:calc(var(--phone-visible-height,100dvh) - 16px);max-height:none}
  .phone-sheet[hidden]{display:none}
  .phone-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;background:#edf4f6;border-bottom:1px solid #cbd8df;flex-shrink:0;font-size:14px}
  .phone-close{min-height:44px;border:1px solid #b5cdd6;border-radius:7px;background:#fff;padding:8px 10px;font-size:12px}
  .phone-sheet-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .phone-sheet-content>section,.phone-sheet-content>.map-bottom{display:none}
  .phone-sheet-content>.phone-panel-open{display:block;position:static;inset:auto;height:auto;min-height:0;margin:0;padding:16px;border:0;overflow:visible;pointer-events:auto}
  .phone-sheet .controls>.eyebrow,.phone-sheet .controls>h2,.phone-sheet .atlas-observation-heading{display:none}
  .phone-sheet .controls input,.phone-sheet .controls select{font-size:16px}
  .phone-sheet .controls .field-label{margin-top:12px}
  .phone-sheet .segmented button{min-height:44px}
  .phone-sheet .detail-heading{gap:10px}.phone-sheet #clear-selection{min-width:44px;min-height:44px}
  .phone-sheet .map-bottom .legend{max-width:none;max-height:none;color:#17323e;background:#f4f8fa;border-color:#cbd8df;overflow:visible}
  .phone-sheet .coverage{color:#17323e;background:transparent;padding-top:12px}
  .phone-sheet .sidebar-footer{display:block;padding:14px 0;background:transparent;color:#526f7d}
  .phone-layout .notice{position:absolute;top:70px;left:8px;right:8px;max-height:80px;overflow:auto;margin:0;font-size:11px;padding:8px;pointer-events:auto}
  .phone-layout .atlas-table-panel{padding:0 0 4px}.phone-layout .atlas-table-heading{padding-top:10px}
  .phone-layout .atlas-table-footer{max-height:22%}.phone-layout .point-label{font-size:10px;padding:0 2px!important}
  @media(max-height:500px){
    .phone-layout .topbar{height:40px;min-height:40px}.phone-observation{padding:3px 10px}
    .phone-observation label{display:none}.phone-nav button{min-height:40px}
    .phone-sheet{top:8px;bottom:calc(56px + env(safe-area-inset-bottom));height:auto;max-height:none}
    .phone-layout .map-heading{display:none}.phone-layout .atlas-table-heading{padding:8px 12px;flex-direction:row;align-items:center}
    .phone-layout .atlas-table-heading h2{font-size:16px}.phone-layout .atlas-table-footer{display:none}
    .phone-layout .atlas-table-scroll{min-height:0}.phone-layout .atlas-swipe-hint{display:none}
  }
}
