/* =========================================================
   CDS v3.x style.css cleaned
   - 중복된 v2~v11 override 정리
   - compare timeline 라벨 active/hover 타이포 통일
   - 라벨 그림자 제거
   - slider 양끝 라운딩 first/last-of-type 기준으로 보정
   ========================================================= */

:root{
  --bg-app:#eef2f7;
  --bg-panel:#ffffff;
  --bg-soft:#eef3f8;
  --bg-viewer:#f8fafc;
  --line:#d7dee8;
  --line-soft:#cdd7e4;
  --text:#0f172a;
  --text-muted:#64748b;
  --blue:#2563eb;
  --active-bg:#facc15;
  --active-text:#020617;
  --hover-bg:#c4b5fd;
  --hover-label-bg:#c4b5fd;
  --hover-label-text:#1e1b4b;
  --available:paleturquoise;
  --missing:lightgray;
  --unsupported:#afb4bb;
  --label-font-size:10px;
  --label-font-weight:700;
  --label-line-height:1;
  --label-padding:3px 5px;
  --label-radius:999px;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:"Noto Sans KR","Malgun Gothic","Apple SD Gothic Neo",sans-serif;
  background:var(--bg-app);
  height:100vh;
  overflow:hidden;
}

button,
input,
select{
  font-family:inherit;
}

.hidden{
  display:none !important;
}

/* =========================================================
   Layout
   ========================================================= */

.app-shell{
  display:flex;
  height:100vh;
  min-width:0;
}

.sidebar{
  width:105px;
  background:var(--bg-panel);
  border-right:1px solid var(--line);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex-shrink:0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.sidebar > *{
  flex-shrink:0;
}

.privacy-link{
  margin-top:auto;
  padding-top:8px;
  color:var(--text-muted,#64748b);
  font-size:10px;
  text-align:center;
  text-decoration:underline;
  text-underline-offset:2px;
}

.sidebar::-webkit-scrollbar{
  display:none;
}

.main-panel{
  flex:1;
  min-width:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.public-chart-notice{
  display:flex;
  align-items:flex-start;
  gap:8px;
  flex:0 0 auto;
  padding:6px 12px;
  border-bottom:1px solid #e6dcbe;
  background:#fffbea;
  color:#66511e;
  font-size:12px;
  line-height:1.55;
  overflow-wrap:anywhere;
}

.public-chart-notice[hidden]{display:none;}
.public-chart-notice > span{flex:1;min-width:0;}
.public-chart-notice .public-chart-notice-dismiss{
  flex:0 0 20px;
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
  padding:0;
  border:0;
  border-radius:3px;
  background:transparent;
  color:inherit;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.public-chart-notice .public-chart-notice-dismiss:hover{background:#f2e8c6;}

.viewer-layout{
  flex:1;
  min-width:0;
  min-height:0;
  display:flex;
}

.viewer-wrap{
  position:relative;
  flex:1 1 auto;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:0;
  overflow:auto;
  overflow-x:auto;
  overflow-y:auto;
  padding:2px;
  background:var(--bg-viewer);
}

/* =========================================================
   Sidebar / menu / model buttons
   ========================================================= */

.logo-block{
  text-align:center;
  line-height:1.1;
  cursor:pointer;
  user-select:none;
  border-radius:6px;
  outline:none;
}

.logo-block:focus-visible{
  box-shadow:0 0 0 2px rgba(37,99,235,.25);
}

.title{
  color:blue;
  font-weight:700;
  font-size:15px;
}

.subtitle{
  margin-top:5px;
  font-size:11px;
  opacity:.65;
}

.main-menu{
  display:grid;
  gap:8px;
}

.menu-btn{
  padding:10px 5px;
  border:none;
  border-radius:12px;
  background:var(--bg-soft);
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  word-break:keep-all;
}

.menu-btn.active{
  background:#dbeafe;
}

.model-box{
  background:var(--bg-soft);
  padding:4px;
  border-radius:16px;
}

.model-grid{
  display:flex;
  flex-direction:column;
  gap:13px;
  margin-top:10px;
}

.model-section{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.model-section-title{
  font-size:13px;
  font-weight:700;
  color:#475569;
  padding-left:2px;
}

.model-button-list{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.model-cell{
  width:100%;
  padding:6px 3px;
  text-align:center;
  border:1px solid var(--line-soft);
  background:#fff;
  font-size:11px;
  border-radius:8px;
  cursor:pointer;
  transition:.15s;
}

.model-cell:hover{
  background:#eef6ff;
}

.model-cell.active{
  background:#dbeafe;
  border-color:#60a5fa;
  font-weight:700;
  color:blue;
}

.model-cell.compare-selected{
  background:#ede9fe;
  border-color:#8b5cf6;
  color:#5b21b6;
  font-weight:600;
}

.model-cell.compare-selected:hover{
  background:#ddd6fe;
}

.model-cell.disabled,
.model-cell:disabled{
  opacity:.60;
  cursor:not-allowed;
  background:#f1f5f9;
  color:#94a3b8;
}

.model-cell.disabled:hover,
.model-cell:disabled:hover{
  background:#f1f5f9;
}

.model-compare-section{
  margin-top:6px;
  padding-top:8px;
  border-top:1px solid var(--line);
}

.model-compare-toggle{
  width:100%;
  border:1px solid var(--line-soft);
  background:#fff;
  border-radius:10px;
  padding:7px 4px;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
  color:#475569;
  white-space:nowrap;
  word-break:keep-all;
}

.model-compare-toggle.active{
  background:#ede9fe;
  border-color:#8b5cf6;
  color:#5b21b6;
}

.model-compare-hint{
  margin-top:4px;
  font-size:9px;
  line-height:1.2;
  color:var(--text-muted);
  text-align:center;
}

/* =========================================================
   Toolbar / datetime
   ========================================================= */

.toolbar{
  background:#fff;
  padding:8px 14px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  border-bottom:1px solid var(--line);
  min-height:44px;
}

.toolbar-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}

.toolbar-time-row,
.toolbar-product-row{
  display:contents;
}

.toolbar-right{
  display:none;
}

#nowBtn{
  padding:6px 10px;
  border:none;
  border-radius:9px;
  background:#111827;
  color:#fff;
  cursor:pointer;
  font-size:12px;
  font-weight:900;
}

#runDate,
#runHour,
#productSelect,
#productCategory{
  height:32px;
  padding:6px 8px;
  border:1px solid #cfd8e3;
  border-radius:9px;
  font-size:12px;
  font-weight:800;
}

.legacy-run-control{
  display:inline-block !important;
}

.time-toggle-stack{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.time-mode{
  padding:2px 8px;
  border:none;
  background:#e5e7eb;
  cursor:pointer;
  font-size:11px;
  line-height:1.1;
}

.time-mode.active{
  background:var(--blue);
  color:#fff;
}

select option:disabled{
  color:#cbd5e1;
}

select option.group-header:disabled,
option.group-header{
  color:#334155;
  font-weight:700;
}

/* =========================================================
   Aux sidebar
   ========================================================= */

.aux-sidebar{
  width:70px;
  border-left:1px solid var(--line);
  background:#fff;
  overflow-y:auto;
  overflow-x:hidden;
  flex-shrink:0;
}

.aux-sidebar.hidden{
  display:none;
}

.aux-sidebar-inner{
  padding:10px 6px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.mobile-aux-trigger,
.mobile-aux-backdrop,
.mobile-aux-close,
.mobile-aux-search{
  display:none;
}

.aux-sidebar-title-row{
  display:block;
}

.aux-sidebar-title{
  margin-bottom:10px;
  font-size:11px;
  font-weight:700;
  color:#475569;
  text-align:center;
  letter-spacing:-.2px;
  white-space:nowrap;
}

.aux-sidebar-list{
  display:flex;
  flex-direction:column;
  gap:0;
}

.aux-item{
  appearance:none;
  border:none;
  background:transparent;
  padding:8px 6px;
  font-size:12px;
  line-height:.8;
  text-align:center;
  cursor:pointer;
  border-radius:10px;
  color:var(--text);
}

.aux-item:hover{
  background:#f1f5f9;
}

.aux-item.active{
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:700;
}

.aux-item.disabled,
.aux-item:disabled{
  opacity:.35;
  cursor:not-allowed;
  color:#94a3b8;
}

.aux-item.disabled:hover,
.aux-item:disabled:hover{
  background:transparent;
}

.aux-separator{
  height:1px;
  margin:3px 6px;
  background:#cbd5e1;
  border-radius:999px;
}

.aux-sidebar.aux-wide{
  width:max-content;
  min-width:120px;
  max-width:none;
  flex:0 0 auto;
}

.aux-sidebar.aux-wide .aux-sidebar-inner{
  width:max-content;
  min-width:100%;
}

.aux-sidebar.aux-wide .aux-sidebar-title{
  text-align:center;
  padding-left:8px;
}

.aux-sidebar.aux-wide .aux-item{
  width:100%;
  text-align:left;
  white-space:nowrap;
  padding-left:12px;
  padding-right:14px;
}

.aux-sidebar.aux-narrow{
  width:72px;
}

/* =========================================================
   Loading / viewer message
   ========================================================= */

#modelStatus{
  font-size:11px;
  opacity:.7;
}

#modelStatus:empty{
  display:none;
}

.viewer-message{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  color:#475569;
  text-align:center;
  line-height:1.6;
  white-space:pre-line;
}

.viewer-message.hidden{
  display:none !important;
}

.viewer-wrap.loading-active{
  overflow:hidden;
}

.viewer-wrap.loading-active .chart-images{
  filter:blur(2.5px);
  opacity:.55;
}

.loading{
  position:absolute;
  inset:0;
  z-index:20;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--text);
  background:rgba(248,250,252,.58);
  backdrop-filter:blur(1px);
}

.loading.hidden{
  display:none !important;
}

.spinner{
  width:34px;
  height:34px;
  border:4px solid rgba(37,99,235,.18);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .8s linear infinite;
}

.loading-text{
  font-size:12px;
  font-weight:700;
  background:rgba(255,255,255,.82);
  padding:6px 10px;
  border-radius:999px;
  box-shadow:0 2px 10px rgba(15,23,42,.08);
}

@keyframes spin{
  to{transform:rotate(360deg);}
}

/* =========================================================
   Image area
   ========================================================= */

.chart-images{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:8px;
  width:max-content;
  max-width:none;
}

.chart-images.hidden{
  display:none !important;
}

.chart-images img{
  display:block;
  flex:0 0 auto;
  max-width:none;
  height:auto;
  background:#fff;
  box-shadow:0 4px 18px rgba(0,0,0,.08);
}

.prepared-chart-image{
  opacity:1;
  transition:none;
}

.compare-inline-warning{
  font-size:11px;
  color:#b45309;
  background:#fffbeb;
  border:1px solid #fde68a;
  border-radius:8px;
  padding:6px 8px;
  margin-top:4px;
  white-space:pre-line;
}

/* =========================================================
   Single / compare timeline shared
   ========================================================= */

.forecast-bar{
  background:#fff;
  padding:8px 14px 7px;
  border-bottom:1px solid var(--line);
}

.forecast-bar.compare-active{
  padding:6px 12px 10px !important;
  overflow:visible;
}

.forecast-shell{
  position:relative;
  height:40px;
  display:flex;
  align-items:center;
}

.forecast-shell.compare-active{
  height:auto;
  min-height:0;
  align-items:stretch;
  overflow:visible;
}

.native-forecast-slider,
#forecastSlider{
  display:none !important;
  position:absolute;
  width:1px;
  height:1px;
  opacity:0 !important;
  pointer-events:none !important;
  visibility:hidden !important;
  appearance:none !important;
  -webkit-appearance:none !important;
}

.native-forecast-slider::-webkit-slider-thumb,
#forecastSlider::-webkit-slider-thumb,
.native-forecast-slider::-moz-range-thumb,
#forecastSlider::-moz-range-thumb{
  width:0 !important;
  height:0 !important;
  opacity:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

.native-forecast-slider::-webkit-slider-runnable-track,
#forecastSlider::-webkit-slider-runnable-track,
.native-forecast-slider::-moz-range-track,
#forecastSlider::-moz-range-track{
  opacity:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

.forecast-label-hidden{
  display:none;
}

.forecast-timeline{
  position:relative;
  width:100%;
  height:48px;
  padding-top:0;
}

.forecast-timeline:focus{
  outline:none;
}

.forecast-timeline.compare-timeline{
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  overflow:visible;
}

.compare-timeline-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:8px !important;
  min-height:22px;
  transform:translateY(-2px);
  margin-bottom:12px !important;
}

.compare-timeline-title,
.single-timeline-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--blue) !important;
  font-size:14px !important;
  line-height:1;
  font-weight:900 !important;
  letter-spacing:-.2px;
}

.compare-timeline-list{
  display:flex;
  flex-direction:column;
  gap:0 !important;
  width:100%;
  margin-top:-2px !important;
  padding-bottom:10px !important;
}

.compare-timeline-row,
.single-timeline-row{
  display:grid;
  grid-template-columns:70px minmax(180px,1fr) !important;
  align-items:center !important;
  gap:3px !important;
  min-height:14px !important;
  overflow:visible !important;
}

.compare-row-info{
  min-width:0 !important;
  min-height:14px !important;
  padding-right:0 !important;
  display:flex !important;
  align-items:center !important;
  font-size:10px;
  line-height:1;
  color:#334155;
  overflow:visible !important;
}

.compare-row-model{
  font-size:11px !important;
  line-height:1.25 !important;
  padding-top:1px !important;
  padding-right:0 !important;
  font-weight:800;
  letter-spacing:-.3px;
  white-space:nowrap;
  overflow:visible !important;
  text-overflow:ellipsis;
  color:#0000ff;
}

.compare-row-product{
  display:none !important;
}

.forecast-track,
.compare-track,
.single-forecast-track{
  position:relative;
  display:grid;
  height:9px !important;
  min-height:9px !important;
  background:#e5e7eb;
  border-radius:999px !important;
  overflow:visible !important;
  cursor:pointer;
}

.forecast-track{
  position:absolute;
  left:0;
  right:0;
  top:18px;
}

.forecast-segment,
.compare-segment{
  position:relative;
  min-width:0;
  height:9px !important;
  border:none;
  border-right:1px solid #fff;
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
  outline:none;
  box-shadow:none;
  transition:none;
}

/* 라벨 DOM이 segment 뒤에 붙으면 :last-child가 깨지므로 type 기준 사용 */
.forecast-segment:first-of-type,
.compare-segment:first-of-type{
  border-top-left-radius:999px;
  border-bottom-left-radius:999px;
}

.forecast-segment:last-of-type,
.compare-segment:last-of-type{
  border-right:none;
  border-top-right-radius:999px;
  border-bottom-right-radius:999px;
}

.forecast-segment:only-of-type,
.compare-segment:only-of-type{
  border-radius:999px;
  border-right:none;
}

.forecast-segment:focus,
.forecast-segment:focus-visible,
.forecast-segment:active,
.compare-segment:focus,
.compare-segment:focus-visible,
.compare-segment:active{
  outline:none;
  box-shadow:none;
}

.forecast-segment.state-loading,
.forecast-segment.state-missing,
.compare-segment.state-loading,
.compare-segment.state-missing{
  background:var(--missing);
}

.forecast-segment.state-available,
.compare-segment.state-available{
  background:var(--available);
}

.forecast-segment.state-unsupported,
.compare-segment.state-unsupported{
  background-color:var(--unsupported);
  /* Integer-aligned pixels keep the repeated diagonal mark a uniform width. */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' shape-rendering='crispEdges'%3E%3Cpath fill='%23757c86' d='M0 5h1v1H0z M1 4h1v1H1z M2 3h1v1H2z M3 2h1v1H3z M4 1h1v1H4z M5 0h1v1H5z'/%3E%3C/svg%3E");
  background-size:6px 6px;
}

.forecast-segment.active,
.compare-segment.active,
.compare-segment.active.hover-sync{
  background-color:var(--active-bg) !important;
}

.compare-segment:hover:not(.active),
.compare-segment.hover-sync:not(.active){
  background-color:var(--hover-bg) !important;
  z-index:5;
}

.forecast-timeline.is-single .forecast-track{
  left:50%;
  right:auto;
  width:min(90px, calc(100% - 24px));
  max-width:none;
  transform:translateX(-50%);
  grid-template-columns:1fr !important;
}

.forecast-timeline.is-single .forecast-segment{
  border-right:none;
  cursor:default;
}

.forecast-marker{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  pointer-events:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  z-index:3;
}

.marker-time,
.marker-lead{
  background:var(--active-bg);
  color:var(--active-text);
  font-weight:600;
  font-size:10px;
  line-height:1;
  padding:3px 5px;
  border-radius:999px;
  white-space:nowrap;
}

.marker-time,
.marker-lead{
  margin-top:0;
}

/* =========================================================
   Compare timeline labels
   active/hover: 색만 다르고 글꼴/크기/두께/패딩 동일, 그림자 없음
   ========================================================= */

.compare-segment.active::before,
.compare-segment.active::after,
.compare-segment:hover::before,
.compare-segment:hover::after,
.compare-segment.active.active-time-label::before,
.compare-segment.active.active-lead-label::after{
  display:none !important;
}

.compare-active-label,
.compare-segment.hover-sync.hover-time-label:not(.active)::before,
.compare-segment.hover-sync.hover-lead-label:not(.active)::after{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  z-index:30;
  font-size:var(--label-font-size) !important;
  font-weight:var(--label-font-weight) !important;
  line-height:var(--label-line-height) !important;
  padding:var(--label-padding) !important;
  border-radius:var(--label-radius) !important;
  white-space:nowrap !important;
  pointer-events:none;
  box-shadow:none !important;
}

.compare-active-label{
  display:block !important;
  left:var(--label-left,50%) !important;
  right:auto !important;
  background:var(--active-bg) !important;
  color:var(--active-text) !important;
}

.compare-active-time{
  top:-18px !important;
}

.compare-active-lead{
  bottom:-18px !important;
}

.compare-timeline-list.is-hovering .compare-active-label{
  display:block !important;
}

.compare-active-label.edge-start,
.compare-active-label.edge-end{
  left:var(--label-left,50%) !important;
  right:auto !important;
  transform:translateX(-50%) !important;
}

.compare-segment.hover-sync.hover-time-label:not(.active)::before,
.compare-segment.hover-sync.hover-lead-label:not(.active)::after{
  display:block !important;
  background:var(--hover-label-bg) !important;
  color:var(--hover-label-text) !important;
}

.compare-segment.hover-sync.hover-time-label:not(.active)::before{
  content:attr(data-time);
  top:-18px !important;
}

.compare-segment.hover-sync.hover-lead-label:not(.active)::after{
  content:attr(data-lead);
  bottom:-18px !important;
}

.compare-segment.active.hover-sync.hover-time-label::before,
.compare-segment.active.hover-sync.hover-lead-label::after{
  display:none !important;
}

/* =========================================================
   Compare controls
   ========================================================= */

.compare-controls{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  gap:8px !important;
  position:relative;
  white-space:nowrap;
}

.compare-fit-toggle{
  display:flex;
  align-items:center;
  gap:5px !important;
  font-size:12px !important;
  font-weight:700;
  color:#475569;
  line-height:1;
  user-select:none;
  cursor:pointer;
}

.compare-fit-toggle input{
  width:14px !important;
  height:14px !important;
  margin:0;
  accent-color:#8b5cf6;
}

.compare-layout-control{
  position:relative;
  display:flex;
  align-items:center;
}

.compare-layout-button,
.compare-layout-option{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:28px !important;
  min-height:28px !important;
  padding:0 10px !important;
  border:1px solid var(--line-soft);
  border-radius:8px !important;
  background:#fff;
  color:#334155;
  font-size:12px !important;
  font-weight:800;
  cursor:pointer;
}

.compare-layout-button:hover,
.compare-layout-option:hover,
.compare-playback-controls button:hover{
  background:#eef6ff;
}

.compare-layout-option.active,
.compare-layout-button:focus{
  border-color:#8b5cf6;
  background:#ede9fe;
  color:#5b21b6;
}

.compare-layout-menu{
  position:absolute;
  top:31px !important;
  right:0;
  z-index:50;
  display:grid;
  gap:5px;
  min-width:132px;
  padding:7px;
  background:#fff;
  border:1px solid var(--line-soft);
  border-radius:10px;
  box-shadow:0 10px 24px rgba(15,23,42,.16);
}

.compare-layout-menu.hidden{
  display:none !important;
}

.compare-layout-option{
  justify-content:flex-start;
  width:100%;
  min-width:118px;
  height:30px !important;
  min-height:30px !important;
}

.layout-mini{
  display:grid;
  grid-template-columns:repeat(var(--layout-cols,2),var(--layout-cell-w,6px)) !important;
  grid-template-rows:repeat(var(--layout-rows,1),var(--layout-cell-h,5px)) !important;
  gap:1px;
  padding:2px;
  border:1px solid currentColor;
  border-radius:4px;
  opacity:.9;
  flex:0 0 auto;
}

.layout-mini span{
  display:block;
  width:var(--layout-cell-w,6px) !important;
  height:var(--layout-cell-h,5px) !important;
  background:currentColor;
  opacity:.58;
  border-radius:1px;
}

.layout-mini span.empty{
  opacity:.12;
}

.compare-playback-controls{
  display:grid;
  grid-template-columns:repeat(4,26px) !important;
  gap:5px !important;
}

.compare-playback-controls button{
  width:26px !important;
  height:26px !important;
  padding:0;
  border:1px solid var(--line-soft);
  border-radius:8px !important;
  background:#fff;
  color:#334155;
  font-size:12px !important;
  font-weight:800;
  cursor:pointer;
}

/* =========================================================
   Compare images
   ========================================================= */

.chart-images.compare-images{
  gap:2px !important;
  align-items:start !important;
  justify-items:start !important;
}

.chart-images.compare-images.fit-screen{
  display:grid !important;
  grid-template-columns:repeat(var(--compare-columns,2),minmax(0,1fr)) !important;
  width:100% !important;
  max-width:100% !important;
  justify-items:stretch !important;
}

.chart-images.compare-images.fixed-size.layout-auto{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  width:100% !important;
  max-width:100% !important;
  justify-content:flex-start !important;
  align-items:flex-start !important;
}

.chart-images.compare-images.fixed-size.layout-manual{
  display:grid !important;
  grid-template-columns:repeat(var(--compare-columns,2),max-content) !important;
  width:max-content !important;
  max-width:none !important;
  justify-content:start !important;
  justify-items:start !important;
}

.chart-images.compare-images.compare-single{
  justify-content:flex-start !important;
  justify-items:start !important;
}

.compare-image-item{
  min-width:0;
  width:100%;
  min-height:100%;
  display:flex;
  justify-content:center;
  align-items:center !important;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px !important;
  padding:2px !important;
  box-shadow:0 2px 8px rgba(15,23,42,.06);
}

.chart-images.compare-images.fit-screen .compare-image-item{
  width:100% !important;
  max-width:100% !important;
}

.chart-images.compare-images.fit-screen.compare-single .compare-image-item,
.chart-images.compare-images.fixed-size .compare-image-item{
  width:max-content !important;
  max-width:none !important;
  flex:0 0 auto !important;
}

.chart-images.compare-images img{
  display:block;
  width:auto !important;
  height:auto !important;
  margin:auto;
  background:#fff;
  box-shadow:none;
  border-radius:0;
}

.chart-images.compare-images.fit-screen img{
  max-width:100% !important;
}

.chart-images.compare-images.fixed-size img{
  max-width:none !important;
}

.chart-images.compare-images.compare-single img{
  margin:0 auto !important;
}

.chart-images.compare-images.fit-screen.layout-auto{
  align-items:stretch !important;
}

.chart-images.compare-images.fit-screen.layout-auto .compare-image-item,
.chart-images.compare-images.layout-auto .compare-image-item{
  height:100%;
  align-self:stretch;
}

.compare-image-stack{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:100%;
  min-width:0;
}

.chart-images.compare-images.fixed-size .compare-image-stack{
  width:max-content;
  max-width:none;
}

.chart-images.compare-images.fit-screen .compare-image-stack{
  width:100%;
  max-width:100%;
}

.chart-images.compare-images .compare-image-stack img{
  display:block;
  flex:0 1 auto;
  margin:0 !important;
}

.chart-images.compare-images.fit-screen .compare-image-stack img{
  max-width:100% !important;
}

.chart-images.compare-images.fixed-size .compare-image-stack img{
  flex:0 0 auto;
  max-width:none !important;
}

.chart-images.compare-images .compare-image-item.compare-top-aligned{
  align-items:flex-start !important;
}

.compare-image-item.has-winter-product-notice,
.single-image-item.has-winter-product-notice{
  flex-direction:column;
  justify-content:flex-start;
}

.selection-confirmation{
  position:fixed;
  inset:auto;
  margin:0;
  transform:translate(-50%,-50%);
  box-sizing:border-box;
  width:min(420px,calc(100% - 32px));
  max-height:calc(100% - 32px);
  height:fit-content;
  padding:24px;
  border:1px solid #d7e2ee;
  border-radius:8px;
  color:#172033;
  background:#fff;
  box-shadow:0 12px 36px rgba(33,56,83,.16),0 2px 6px rgba(33,56,83,.06);
}
.selection-confirmation::backdrop{
  background:transparent;
}
.viewer-wrap.selection-blurred > *{filter:blur(3px);opacity:.65;pointer-events:none;}
.selection-confirmation p{margin:0;white-space:pre-line;font-size:13px;line-height:1.9;overflow-wrap:anywhere;color:#46556a;}
.selection-confirmation-actions{display:flex;justify-content:flex-end;gap:10px;margin:22px -24px -24px;padding:16px 24px;background:#f6f9fc;border-top:1px solid #eaf0f6;}
.selection-confirmation-actions button{min-width:84px;min-height:38px;padding:7px 20px;border:1px solid #d5dfeb;border-radius:6px;background:#fff;color:#51647b;cursor:pointer;font:inherit;font-size:13px;}
.selection-confirmation-actions .selection-confirmation-accept{background:#3479d2;border-color:#3479d2;color:white;box-shadow:0 2px 5px #3479d229;}
.selection-confirmation-actions button:hover{border-color:#7aabdf;background:#f1f6fc;}
.selection-confirmation-actions .selection-confirmation-accept:hover{background:#266ac1;color:white;}
.selection-confirmation-actions button:focus-visible{outline:2px solid #1767d2;outline-offset:3px;}
.viewer-icon-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:6px;border:1px solid #c9d8eb;border-radius:6px;background:#fff;color:#315882;cursor:pointer;flex:none;}
.viewer-icon-button svg{width:17px;height:17px;flex:none;}
.viewer-icon-button:hover{background:#edf5ff;border-color:#8aaddb;}
.viewer-icon-button:disabled{opacity:.45;cursor:default;}
.chart-capture-dialog{display:flex;flex-direction:column;max-height:calc(100dvh - 32px);}
.chart-capture-dialog:not([open]){display:none;}
.capture-status{flex:none;}
.capture-preview{overflow:auto;min-height:0;max-height:65dvh;margin-top:12px;background:#edf2f6;text-align:center;}
.capture-preview:empty{display:none;}
.capture-preview img{display:block;width:auto;height:auto;max-width:100%;max-height:60dvh;object-fit:contain;margin:auto;}
.viewer-fit-control{position:relative;display:flex;align-items:stretch;height:32px;border:1px solid var(--line-soft);border-radius:9px;background:#fff;}
.viewer-fit-control:hover{background:#f3f8ff;}
.timeline-top-controls .viewer-fit-control .compare-fit-toggle{height:30px !important;min-height:30px !important;border:0 !important;border-radius:8px 0 0 8px !important;background:transparent !important;padding-right:3px !important;}
.viewer-fit-control .viewer-fit-direction{display:flex;align-items:center;justify-content:center;width:24px;padding:0;border:0;border-radius:0 8px 8px 0;background:transparent;color:#426183;cursor:pointer;}
.viewer-fit-direction svg{width:14px;height:14px;}
.fit-direction-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:80;min-width:112px;padding:6px;border:1px solid #c9d8eb;border-radius:6px;background:#fff;box-shadow:0 4px 14px #203c5920;}
.fit-direction-menu[hidden]{display:none;}
.fit-direction-menu label{display:flex;align-items:center;gap:8px;padding:7px 10px;cursor:pointer;white-space:nowrap;font-size:12px;}
.fit-direction-menu label:hover{background:#edf5ff;}
.fit-direction-menu input{width:14px;height:14px;min-height:0;margin:0;accent-color:#2875d2;}
@media(max-width:700px) and (orientation:portrait){.app-shell .timeline-top-controls .viewer-fit-control{height:27px;}}
.chart-capture-dialog .selection-confirmation-actions{flex:none;}
.chart-capture-dialog .selection-confirmation-actions button{min-width:40px;padding:8px;}

.winter-product-notice{
  align-self:stretch;
  box-sizing:border-box;
  max-width:100%;
  margin:14px 8px 8px;
  padding:7px 10px;
  color:#285f9e;
  background:#eef6ff;
  border:1px solid #c4dafa;
  border-radius:4px;
  font-size:12px;
  line-height:1.6;
  text-align:center;
  overflow-wrap:anywhere;
}

.compare-placeholder{
  width:100%;
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  white-space:pre-line;
  background:#f1f5f9;
  color:var(--text-muted);
  border:1px dashed #cbd5e1;
  border-radius:8px;
  font-size:12px;
  line-height:1.5;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width:760px){
  .compare-timeline-header{
    grid-template-columns:1fr !important;
    align-items:start;
    gap:4px !important;
  }

  .compare-controls{
    justify-content:flex-start;
  }

  .compare-timeline-title,
  .single-timeline-title{
    font-size:13px !important;
  }

  .compare-timeline-row,
  .single-timeline-row{
    grid-template-columns:68px minmax(140px,1fr) !important;
    gap:3px !important;
  }

  .chart-images.compare-images{
    grid-template-columns:1fr;
  }
}

/* ===== v13: toolbar time shift, datetime panel compact, single image window ===== */
#nowBtn{
  height:32px !important;
  min-height:32px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 10px !important;
}

.run-shift-group{
  display:inline-flex;
  align-items:stretch;
  gap:0;
  height:32px;
}

.run-shift-group button{
  height:32px;
  min-width:42px;
  padding:0 7px;
  border:1px solid var(--line-soft);
  border-right:none;
  background:#ffffff;
  color:#334155;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  line-height:1;
}

.run-shift-group button:first-child{
  border-radius:9px 0 0 9px;
}

.run-shift-group button:last-child{
  border-right:1px solid var(--line-soft);
  border-radius:0 9px 9px 0;
}

.run-shift-group button:hover{
  background:#eef6ff;
  border-color:#93c5fd;
}

.chart-images.single-images{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:2px !important;
  width:max-content !important;
  max-width:none !important;
}

.chart-images.single-images.fit-screen{
  width:100% !important;
  max-width:100% !important;
}

.chart-images.single-images.fit-screen .single-image-item{
  width:100%;
  max-width:100%;
}

.chart-images.single-images.fit-screen .single-image-stack{
  display:grid;
  grid-template-columns:repeat(var(--single-image-count,1),minmax(0,1fr));
  width:100%;
  max-width:100%;
}

.chart-images.single-images.fit-screen .single-image-stack > img,
.chart-images.single-images.fit-screen .nmsc-image-slot{
  width:100% !important;
  min-width:0;
  max-width:100% !important;
}

.chart-images.single-images.fit-screen .single-image-stack img{
  width:100% !important;
  max-width:100% !important;
  object-fit:contain;
}

.single-image-item{
  flex:0 0 auto;
  min-width:0;
  width:max-content;
  max-width:none;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:6px;
  padding:2px;
  box-shadow:0 2px 8px rgba(15,23,42,.06);
}

.single-image-stack{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:3px;
  width:max-content;
  max-width:none;
}

.single-image-stack.nmsc-image-stack{
  align-items:flex-start;
  gap:6px;
  --nmsc-pair-height:540px;
}

.nmsc-image-slot{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  width:max-content;
  max-width:none;
}

.chart-images.single-images img,
.single-image-stack img{
  display:block;
  width:auto !important;
  max-width:none !important;
  height:auto !important;
  margin:0 !important;
  background:#ffffff;
  box-shadow:none !important;
  border-radius:0;
}

.chart-images.single-images .compare-inline-warning{
  flex-basis:100%;
}

.single-image-stack.nmsc-image-stack img.nmsc-chart-image{
  max-width:none !important;
  max-height:none !important;
  object-fit:contain;
}

.single-image-stack.nmsc-image-stack img.nmsc-ko-image{
  width:auto !important;
  height:auto !important;
}

.single-image-stack.nmsc-image-stack.nmsc-has-ko-height img.nmsc-ea-image{
  height:var(--nmsc-pair-height) !important;
  width:auto !important;
}

.single-image-stack.nmsc-image-stack.nmsc-mt-stack{
  align-items:center;
}

.single-image-stack.nmsc-image-stack.nmsc-mt-stack img.nmsc-mt-image{
  width:auto !important;
  height:auto !important;
  max-width:calc(100vw - 24px) !important;
  max-height:var(--nmsc-mt-max-height,calc(100vh - 190px)) !important;
  object-fit:contain;
}

@media (min-width:701px){
  .chart-images.single-images.fit-screen,
  .chart-images.single-images.fit-screen .single-image-item,
  .chart-images.single-images.fit-screen .single-image-stack{
    height:100% !important;
    max-height:100% !important;
  }

  .chart-images.single-images.fit-screen .single-image-item{
    box-sizing:border-box;
    justify-content:flex-start;
  }

  .chart-images.single-images.fit-screen .single-image-stack > img,
  .chart-images.single-images.fit-screen .nmsc-image-slot,
  .chart-images.single-images.fit-screen .nmsc-image-slot > img{
    width:100% !important;
    height:100% !important;
    min-height:0;
    max-height:100% !important;
    object-fit:contain;
    object-position:left top;
  }
}

.single-image-stack.nmsc-image-stack.nmsc-wait-for-ko:not(.nmsc-has-ko-height) .nmsc-ea-slot img{
  visibility:hidden;
}

.compare-image-stack img.nmsc-chart-image{
  max-height:calc(100vh - 150px) !important;
  max-width:calc(100vw - 140px) !important;
  object-fit:contain;
}

.compare-image-stack img.nmsc-ea-image,
.compare-image-stack img.nmsc-ko-image{
  max-height:calc(100vh - 170px) !important;
}


/* ===== v13.1 fixes ===== */

/* ===== v14: restore separate date/hour controls and simplify timeline header ===== */
.legacy-run-control{
  display:inline-block !important;
}

.datetime-control,
.datetime-btn,
.datetime-panel{
  display:none !important;
}

#runDate,
#runHour{
  display:inline-block !important;
}

.time-toggle-stack{
  display:flex !important;
  flex-direction:column;
  gap:1px;
}

/* 산출물명 헤더 제거: 컨트롤만 필요할 때 오른쪽에 작게 유지 */
.compare-timeline-header{
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  padding:0 !important;
  margin:0 0 4px 0 !important;
  transform:none !important;
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  min-height:0 !important;
}

.compare-timeline-header::before{
  display:none !important;
  content:none !important;
}

.compare-timeline-title,
.single-timeline-title{
  display:none !important;
}

/* 헤더가 controls-only일 때 공간을 거의 먹지 않게 압축 */
.compare-timeline-header.controls-only:empty{
  display:none !important;
}

.single-timeline-list .compare-timeline-header.controls-only,
.compare-timeline-list .compare-timeline-header.controls-only{
  margin-bottom:3px !important;
}

/* 날짜/시간 컨트롤과 이동 버튼 시각 정렬 */
#nowBtn,
#runDate,
#runHour,
#productCategory,
#productSelect,
.run-shift-group{
  height:32px !important;
}

.run-shift-group{
  order:10;
}

#productCategory{
  order:11;
}

#productSelect{
  order:12;
}

.main-datetime-group{
  display:inline-flex;
  align-items:stretch;
  gap:0;
  height:32px;
}

.main-datetime-group #runDate,
.main-datetime-group #runHour{
  height:32px !important;
  font-weight:800 !important;
}

.main-datetime-group #runDate{
  border-top-right-radius:0 !important;
  border-bottom-right-radius:0 !important;
  border-right:none !important;
}

.main-datetime-group #runHour{
  border-top-left-radius:0 !important;
  border-bottom-left-radius:0 !important;
}


/* ===== v14.1: toolbar timeline controls ===== */
.timeline-top-controls{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
}

.timeline-top-controls.hidden{
  display:none !important;
}

.timeline-top-controls .compare-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  white-space:nowrap;
}

/* controls were moved to toolbar, so no separate header row is needed in timeline */
.compare-timeline-header.controls-only,
.single-timeline-header.controls-only{
  display:none !important;
}

/* keep the slider block compact after removing header row */
.compare-timeline-list,
.single-timeline-list{
  gap:0 !important;
  margin-top:0 !important;
}

@media (max-width:1100px){
  .timeline-top-controls{
    margin-left:0;
  }

  .toolbar-left{
    flex-wrap:wrap;
  }
}

/* ===== v14.2: toolbar controls right alignment + consistent sizing + timeline label space ===== */
.toolbar-left{
  width:100% !important;
  min-width:0 !important;
}

.timeline-top-controls{
  margin-left:auto !important;
  margin-right:0 !important;
  flex:0 0 auto !important;
  order:99 !important;
  align-self:center !important;
}

.timeline-top-controls .compare-controls{
  height:32px !important;
  align-items:center !important;
  gap:8px !important;
}

.timeline-top-controls .compare-fit-toggle{
  height:32px !important;
  min-height:32px !important;
  padding:0 9px !important;
  border:1px solid var(--line-soft) !important;
  border-radius:9px !important;
  background:#ffffff !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1 !important;
}

.timeline-top-controls .compare-fit-toggle input{
  width:14px !important;
  height:14px !important;
}

.timeline-top-controls .compare-layout-button{
  height:32px !important;
  min-height:32px !important;
  padding:0 10px !important;
  border-radius:9px !important;
  font-size:12px !important;
}

.timeline-top-controls .compare-layout-menu{
  top:36px !important;
}

.timeline-top-controls .compare-playback-controls{
  grid-template-columns:repeat(4,32px) !important;
  gap:4px !important;
}

.timeline-top-controls .compare-playback-controls button{
  width:32px !important;
  height:32px !important;
  border-radius:9px !important;
  font-size:13px !important;
  line-height:1 !important;
}

/* Slider label clipping prevention: keep equal top/bottom breathing room. */
.forecast-bar{
  padding-top:14px !important;
  padding-bottom:14px !important;
  overflow:visible !important;
}

.forecast-bar.compare-active{
  padding-top:14px !important;
  padding-bottom:14px !important;
  overflow:visible !important;
}

.forecast-shell{
  min-height:44px !important;
  overflow:visible !important;
}

.forecast-shell.compare-active{
  min-height:44px !important;
  overflow:visible !important;
}

.forecast-timeline,
.forecast-timeline.compare-timeline{
  overflow:visible !important;
}

.compare-timeline-list,
.single-timeline-list{
  padding-top:4px !important;
  padding-bottom:4px !important;
}

@media (max-width:1100px){
  .timeline-top-controls{
    margin-left:0 !important;
    width:100% !important;
    justify-content:flex-end !important;
  }
}


/* ===== v3.12: model menu and timeline polish ===== */
.model-compare-section{
  margin-top:0 !important;
  margin-bottom:4px !important;
  padding-top:0 !important;
  padding-bottom:8px !important;
  border-top:none !important;
  border-bottom:1px solid var(--line) !important;
}

.model-section-toggle{
  width:100%;
  border:none;
  background:transparent;
  cursor:pointer;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.model-section-toggle:hover{
  color:var(--blue);
}

.radar-analysis-section{
  margin-top:4px;
  padding-top:8px;
  border-top:1px solid var(--line);
}

.radar-analysis-launcher{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid #86efac;
  border-radius:8px;
  background:#f0fdf4;
  color:#15803d;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.radar-analysis-launcher:hover{
  background:#dcfce7;
}

.radar-launcher-icon{
  font-size:13px;
  line-height:1;
}

.radar-launcher-text{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1.05;
}

.radar-launcher-text small{
  margin-top:2px;
  font-size:10px;
  font-weight:900;
  color:#16a34a;
}

.typhoon-guidance-section{
  margin-top:-7px;
}

.typhoon-guidance-launcher{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid #67e8f9;
  border-radius:8px;
  background:#ecfeff;
  color:#0e7490;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.typhoon-guidance-launcher:hover{
  background:#cffafe;
}

.typhoon-launcher-icon{
  font-size:13px;
  line-height:1;
}

.typhoon-launcher-text{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1.05;
}

.typhoon-launcher-text small{
  margin-top:2px;
  font-size:10px;
  font-weight:900;
  color:#0891b2;
}

.typhoon-page-body{
  background:#fff;
}

#typhoonGuidanceApp{
  height:100vh;
  min-width:0;
}

.typhoon-page{
  height:100vh;
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#ffffff;
  color:var(--text);
}

.typhoon-header{
  display:flex;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:0;
  padding:6px 7px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}

.typhoon-title-wrap{
  appearance:none;
  border:none;
  cursor:pointer;
  align-self:stretch;
  flex:0 0 86px;
  min-width:86px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:-6px 1px -6px -7px;
  padding:5px 7px;
  border-right:1px solid var(--line);
  background:#ffffff;
  color:#1d4ed8;
}

.typhoon-title-button:hover{
  background:#f8fafc;
}

.typhoon-title-button:focus-visible{
  outline:2px solid rgba(37,99,235,.28);
  outline-offset:-2px;
}

.typhoon-title{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#1d4ed8;
  font-size:16px;
  font-weight:950;
  line-height:1.08;
}

.typhoon-updated-time{
  align-self:center;
  flex:0 0 auto;
  margin-left:auto;
  padding-left:14px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  text-align:right;
}

.typhoon-select-controls{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:5px;
  min-width:0;
  flex:1 1 auto;
  padding-left:6px;
  overflow:hidden;
}

.typhoon-year-select,
.typhoon-storm-select{
  height:30px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
  padding:0 24px 0 7px;
  box-sizing:border-box;
}

.typhoon-year-select{
  width:96px;
}

.typhoon-storm-select{
  width:180px;
  min-width:0;
  max-width:220px;
}

.typhoon-fcst-toggle{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  height:30px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  overflow:hidden;
  background:#ffffff;
}

.typhoon-fcst-option{
  position:relative;
  height:100%;
  min-width:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  color:#334155;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  user-select:none;
}

.typhoon-fcst-option + .typhoon-fcst-option{
  border-left:1px solid var(--line-soft);
}

.typhoon-fcst-option input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.typhoon-fcst-option:has(input:checked){
  background:#111827;
  color:#ffffff;
}

.typhoon-time-bar{
  background:#fff;
}

.typhoon-time-shell{
  max-width:none;
}

.typhoon-time-slider{
  z-index:3;
}

.typhoon-content{
  flex:1;
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  background:var(--bg-viewer);
}

.typhoon-viewer{
  position:relative;
  flex:1;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
  padding:2px;
  background:var(--bg-viewer);
}

.typhoon-viewer-stage{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.typhoon-viewer.is-loading .typhoon-guidance-image{
  filter:blur(2.5px);
  opacity:.55;
}

.typhoon-model-info-panel{
  width:max-content;
  min-width:max-content;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-left:1px solid var(--line);
  background:#ffffff;
  overflow:hidden;
}

.typhoon-model-info-list{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:4px 10px 6px;
}

.typhoon-model-info-row{
  display:grid;
  grid-template-columns:136px max-content;
  gap:4px;
  min-width:max-content;
  padding:2px 0;
  border-bottom:none;
}

.typhoon-model-info-row.is-group-end{
  margin-bottom:3px;
  padding-bottom:5px;
  border-bottom:1px solid rgba(203,213,225,.72);
}

.typhoon-model-info-row:last-child{
  margin-bottom:0;
  padding-bottom:2px;
  border-bottom:none;
}

.typhoon-model-info-name{
  color:var(--typhoon-model-color,#1d4ed8);
  font-size:11px;
  font-weight:950;
  line-height:1.15;
  white-space:nowrap;
  text-shadow:0 0 1px rgba(15,23,42,.28);
}

.typhoon-model-info-description{
  color:#334155;
  font-size:11px;
  font-weight:650;
  line-height:1.22;
  white-space:nowrap;
  word-break:normal;
}

.typhoon-guidance-image{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  background:#ffffff;
  box-shadow:none;
  transition:filter .12s ease,opacity .12s ease;
}

.typhoon-status-panel{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:260px;
  min-height:120px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:8px;
  background:#ffffff;
  color:#475569;
  font-size:14px;
  font-weight:900;
}

@media (max-width: 980px){
  .typhoon-content{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) 230px;
  }

  .typhoon-model-info-panel{
    width:100%;
    min-width:0;
    border-left:none;
    border-top:1px solid var(--line);
  }

  .typhoon-model-info-row{
    grid-template-columns:136px max-content;
  }
}

@media (max-width: 560px){
  .typhoon-header{
    align-items:stretch;
    flex-wrap:wrap;
  }

  .typhoon-title-wrap{
    min-height:52px;
  }

  .typhoon-select-controls{
    width:calc(100% - 88px);
    flex:1 1 calc(100% - 88px);
  }

  .typhoon-updated-time{
    width:100%;
    padding:7px 0 0 0;
  }

  .typhoon-storm-select{
    flex:1 1 auto;
    max-width:none;
  }

  .typhoon-fcst-toggle{
    width:100%;
  }

  .typhoon-fcst-option{
    flex:1 1 50%;
  }
}

.radar-page-body{
  background:#eef2f7;
}

#radarAnalysisApp{
  height:100vh;
  min-width:0;
}

.radar-page{
  height:100vh;
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#ffffff;
}

.radar-page-header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  min-height:46px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
}

.radar-page-title{
  color:var(--text);
  font-size:16px;
  font-weight:900;
}

.radar-page-subtitle{
  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
}

.radar-controls{
  display:flex;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:0;
  padding:6px 7px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}

.radar-loop-controls{
  align-items:center;
}

.radar-menu-title{
  align-self:stretch;
  flex:0 0 86px;
  min-width:86px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:-6px 1px -6px -7px;
  padding:5px 7px;
  border-right:1px solid var(--line);
  background:#ffffff;
  color:#1d4ed8;
  font-size:17px;
  font-weight:950;
  line-height:1.08;
}

.radar-controls-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding-left:6px;
  overflow:hidden;
}

.radar-control-row{
  min-width:0;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:5px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}

.radar-control-row > *{
  flex:0 0 auto;
}

.radar-control-row::-webkit-scrollbar{
  height:6px;
}

.radar-control-row::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
}

.radar-now-button{
  height:30px;
  min-width:48px;
  padding:0 8px;
  border:1px solid #93c5fd;
  border-radius:8px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.radar-now-button:hover{
  background:#dbeafe;
}

.radar-field{
  display:flex;
  flex-direction:column;
  gap:3px;
  color:var(--text-muted);
  font-size:11px;
  font-weight:800;
}

.radar-field input,
.radar-field select{
  height:28px;
  min-width:74px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  padding:0 6px;
}

.radar-field input{
  width:112px;
}

.radar-controls input:not([type="checkbox"]),
.radar-controls select,
.radar-pane-controls select{
  height:28px;
  min-width:auto;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  font-weight:800;
  padding:0 6px;
}

.radar-date-input{
  width:112px;
}

.radar-datetime-input{
  width:148px;
}

.radar-date-picker-header{
  height:22px;
  display:grid;
  grid-template-columns:20px 1fr 20px;
  align-items:center;
  gap:2px;
  margin-bottom:3px;
}

.radar-date-picker-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-align:center;
  color:var(--text);
  font-size:12px;
  font-weight:900;
}

.radar-date-picker-year-select,
.radar-date-picker-month-select{
  height:20px;
  min-width:0;
  border:1px solid var(--line-soft);
  border-radius:5px;
  background:#ffffff;
  color:var(--text);
  font-size:10px;
  font-weight:900;
  padding:0 2px;
}

.radar-date-picker-year-select{
  width:68px;
}

.radar-date-picker-month-select{
  width:50px;
}

.radar-date-picker-nav,
.radar-date-picker-day{
  border:1px solid transparent;
  border-radius:5px;
  background:#ffffff;
  color:var(--text);
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.radar-date-picker-nav{
  height:20px;
  padding:0;
  line-height:1;
}

.radar-date-picker-nav:hover,
.radar-date-picker-day:hover{
  background:#f1f5f9;
}

.radar-date-picker-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:1px;
}

.radar-date-picker-weekday{
  height:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:10px;
  font-weight:900;
}

.radar-date-picker-weekday.weekend,
.radar-date-picker-day.weekend{
  color:#dc2626;
}

.radar-date-picker-blank{
  height:18px;
}

.radar-date-picker-day{
  height:18px;
  min-width:0;
  padding:0;
}

.radar-date-picker-day.selected{
  border-color:#111827;
  background:#111827;
  color:#ffffff;
}

.radar-datetime-picker-control{
  position:relative;
  display:inline-flex;
  align-items:stretch;
  height:30px;
  border:1px solid var(--line-soft);
  border-left:none !important;
  background:#ffffff;
  overflow:visible;
}

.radar-datetime-picker-control .radar-time-picker-toggle{
  width:20px;
  flex:0 0 20px;
  border-top-right-radius:7px !important;
  border-bottom-right-radius:7px !important;
  overflow:hidden;
}

.radar-datetime-picker-panel{
  position:fixed;
  z-index:1000;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:6px;
  border:1px solid var(--line-soft);
  border-radius:0 0 8px 8px;
  background:#ffffff;
  box-shadow:0 12px 24px rgba(15,23,42,.16);
}

.radar-date-picker-calendar{
  min-width:0;
}

.radar-datetime-time-section{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-width:0;
  padding-top:4px;
  border-top:1px solid #e2e8f0;
}

.radar-datetime-time-label{
  margin-right:4px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
}

.radar-time-picker-number{
  width:38px;
  height:26px;
  border:1px solid var(--line-soft);
  border-radius:6px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  font-weight:900;
  text-align:center;
  padding:0 2px;
}

.radar-datetime-time-colon{
  color:#334155;
  font-size:13px;
  font-weight:900;
  line-height:1;
}

.radar-time-picker-toggle{
  width:22px;
  height:100%;
  border:none;
  background:transparent;
  cursor:pointer;
  position:relative;
  flex:0 0 22px;
}

.radar-time-picker-toggle::before{
  content:"";
  position:absolute;
  left:6px;
  top:10px;
  width:7px;
  height:7px;
  border-right:2px solid #64748b;
  border-bottom:2px solid #64748b;
  transform:rotate(45deg);
}

.radar-time-picker-toggle[aria-expanded="true"]::before{
  top:13px;
  transform:rotate(225deg);
}

.radar-time-picker-toggle:hover{
  background:#f1f5f9;
}

.radar-pane-count-select{
  width:68px;
}

.radar-map-select{
  width:102px;
}

.radar-inline-field select{
  width:62px;
}

.radar-inline-field{
  height:32px;
  display:flex;
  align-items:center;
  gap:6px;
}

.radar-inline-label{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#475569;
  font-size:11px;
  font-weight:900;
  line-height:1.05;
}

.radar-shift-controls{
  display:grid;
  grid-template-columns:repeat(14, minmax(34px, 1fr));
  gap:4px;
  padding:3px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:#ffffff;
}

.radar-shift-controls button{
  height:24px;
  min-width:34px;
  padding:0 5px;
  border:1px solid #bfdbfe;
  border-radius:6px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.radar-shift-controls button:hover{
  background:#dbeafe;
}

.radar-check{
  height:30px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:0 8px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.radar-check input{
  width:14px;
  height:14px;
}

.radar-check-group .radar-check:hover{
  background:#f1f5f9;
}

.radar-button-group{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:0;
}

.radar-button-group > *{
  border-radius:0 !important;
}

.radar-button-group > *:not(:last-child){
  border-right:none !important;
}

.radar-button-group > *:first-child{
  border-top-left-radius:7px !important;
  border-bottom-left-radius:7px !important;
}

.radar-button-group > *:last-child{
  border-top-right-radius:7px !important;
  border-bottom-right-radius:7px !important;
}

.radar-mode-button{
  height:30px;
  padding:0 10px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.radar-mode-button:hover{
  background:#f1f5f9;
}

.radar-mode-button.active{
  background:#111827;
  border-color:#111827;
  color:#ffffff;
}

.radar-overlay-control{
  display:flex;
  align-items:center;
  gap:6px;
}

.radar-overlay-label{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  line-height:1.05;
}

.radar-check-group .radar-check{
  border-radius:0;
}

.radar-wind-control{
  position:relative;
  height:30px;
  min-width:86px;
  display:flex;
  align-items:stretch;
  border:1px solid var(--line-soft);
  background:#ffffff;
}

.radar-wind-control .radar-check{
  width:100%;
  height:28px;
  border:none;
  border-radius:0;
}

.radar-wind-button{
  min-width:86px;
  padding:0;
  gap:0;
  justify-content:stretch;
  overflow:hidden;
}

.radar-wind-button input{
  margin:0;
}

.radar-check-group .radar-wind-control:last-child .radar-wind-button{
  border-top-right-radius:7px !important;
  border-bottom-right-radius:7px !important;
}

.radar-check-group .radar-wind-control:first-child .radar-wind-button{
  border-top-left-radius:7px !important;
  border-bottom-left-radius:7px !important;
}

.radar-check-group .radar-wind-button:hover{
  background:#ffffff;
}

.radar-overlay-toggle-main{
  height:100%;
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:0 6px 0 5px;
}

.radar-overlay-toggle-main:hover,
.radar-wind-chevron:hover{
  background:#f1f5f9;
}

.radar-wind-chevron{
  position:relative;
  width:22px;
  height:100%;
  flex:0 0 22px;
  margin-left:0;
  margin-right:0;
  cursor:pointer;
}

.radar-wind-chevron::before{
  content:"";
  position:absolute;
  left:7px;
  top:10px;
  width:7px;
  height:7px;
  border-right:2px solid #64748b;
  border-bottom:2px solid #64748b;
  transform:rotate(45deg);
  transform-origin:center;
}

.radar-wind-button[aria-expanded="true"] .radar-wind-chevron::before{
  transform:rotate(225deg);
  top:13px;
}

.radar-wind-panel{
  position:fixed;
  left:0;
  top:0;
  z-index:1000;
  min-width:210px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:#ffffff;
  box-shadow:0 12px 24px rgba(15,23,42,.16);
}

.radar-wind-mode-group{
  display:flex;
  gap:8px;
}

.radar-wind-option{
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--text);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.radar-wind-option input{
  width:14px;
  height:14px;
}

.radar-wind-detail-row{
  display:grid;
  grid-template-columns:100px 88px;
  align-items:center;
  gap:8px;
}

.radar-wind-source-select,
.radar-wind-height-input{
  width:100%;
  height:30px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:var(--text);
  font-size:12px;
  font-weight:800;
  padding:0 8px;
}

.radar-wind-height-label{
  display:flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
  color:#64748b;
  font-size:11px;
  font-weight:900;
}

.radar-wind-height-label span{
  flex:0 0 auto;
}

.radar-wind-height-unit{
  color:#64748b;
}

.radar-wind-height-input{
  width:64px;
  min-width:64px;
  padding:0 5px;
}

.radar-station-button{
  min-width:78px;
}

.radar-station-panel{
  min-width:190px;
}

.radar-station-label-select{
  width:100%;
}

.radar-lightning-button{
  min-width:78px;
}

.radar-lightning-panel{
  min-width:190px;
}

.radar-lightning-interval-label{
  justify-content:flex-start;
}

.radar-lightning-interval-input{
  width:70px;
  min-width:70px;
}

.radar-actions{
  display:flex;
  gap:6px;
}

.radar-actions button{
  height:30px;
  padding:0 10px;
  border:1px solid #93c5fd;
  border-radius:7px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.radar-timeline-bar{
  flex:0 0 auto;
}

.radar-timeline{
  height:46px;
}

.radar-pane-grid{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(var(--radar-pane-count,1), minmax(0, 1fr));
  gap:8px;
  padding:6px 7px 7px;
  overflow:auto;
  background:#eef2f7;
}

.radar-pane-grid[data-pane-count="1"]{
  grid-template-columns:max-content;
  justify-content:start;
}

.radar-pane-grid[data-pane-count="2"]{
  grid-template-columns:max-content max-content;
  justify-content:start;
}

.radar-pane-grid[data-pane-count="3"]{
  grid-template-columns:max-content max-content;
  grid-template-rows:minmax(0, 1fr) minmax(0, 1fr);
  justify-content:start;
}

.radar-pane-grid[data-pane-count="3"] .radar-pane:nth-child(1){
  grid-column:1;
  grid-row:1 / 3;
}

.radar-pane-grid[data-pane-count="3"] .radar-pane:nth-child(2){
  grid-column:2;
  grid-row:1;
}

.radar-pane-grid[data-pane-count="3"] .radar-pane:nth-child(3){
  grid-column:2;
  grid-row:2;
}

.radar-pane-grid[data-pane-count="4"]{
  grid-template-columns:max-content max-content max-content;
  grid-template-rows:minmax(0, 1fr) minmax(0, 1fr);
  justify-content:start;
}

.radar-pane-grid[data-pane-count="4"] .radar-pane:nth-child(1){
  grid-column:1;
  grid-row:1 / 3;
}

.radar-pane-grid[data-pane-count="4"] .radar-pane:nth-child(2){
  grid-column:2;
  grid-row:1 / 3;
}

.radar-pane-grid[data-pane-count="4"] .radar-pane:nth-child(3){
  grid-column:3;
  grid-row:1;
}

.radar-pane-grid[data-pane-count="4"] .radar-pane:nth-child(4){
  grid-column:3;
  grid-row:2;
}

.radar-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:#ffffff;
}

.radar-pane-header{
  flex:0 0 auto;
  padding:5px 6px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}

.radar-pane-controls{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  align-items:flex-end;
}

.radar-pane-controls select{
  height:26px !important;
  min-height:26px !important;
  padding:0 6px !important;
  font-size:11px !important;
  line-height:24px !important;
}

.radar-pane-viewer{
  position:relative;
  flex:0 0 auto;
  align-self:center;
  margin-top:auto;
  margin-bottom:auto;
  width:var(--radar-image-width, auto);
  max-width:none;
  height:var(--radar-image-height, auto);
  max-height:100%;
  min-height:0;
  overflow:hidden;
  background:#f8fafc;
}

.radar-pane-image{
  display:block;
  width:auto;
  height:auto;
  max-width:none;
  margin:0 auto;
  background:#ffffff;
  transition:filter .12s ease, opacity .12s ease;
}

.radar-page:has(.radar-map-mode-group [data-map-tool="zoomIn"].active) .radar-pane-image{
  cursor:zoom-in;
}

.radar-page:has(.radar-map-mode-group [data-map-tool="zoomOut"].active) .radar-pane-image{
  cursor:zoom-out;
}

.radar-pane:not(.has-current-image) .radar-pane-image{
  visibility:hidden;
}

.radar-pane.is-loading.has-current-image .radar-pane-image{
  filter:blur(2px);
  opacity:.72;
}

.radar-viewer{
  position:relative;
  flex:1;
  min-height:0;
  margin:10px 12px 12px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:#f8fafc;
}

.radar-image{
  display:block;
  width:auto;
  height:auto;
  max-width:none;
  margin:0 auto;
  background:#ffffff;
  transition:filter .12s ease, opacity .12s ease;
}

.radar-viewer.is-loading.has-current-image .radar-image{
  filter:blur(2px);
  opacity:.72;
}

.radar-loading{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:none;
  align-items:center;
  gap:9px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(15,23,42,.78);
  color:#ffffff;
  font-size:12px;
  font-weight:900;
  pointer-events:none;
}

.radar-viewer.is-loading .radar-loading,
.radar-pane.is-loading .radar-loading{
  display:flex;
}

.radar-spinner{
  width:18px;
  height:18px;
  border:3px solid rgba(255,255,255,.35);
  border-top-color:#ffffff;
  border-radius:50%;
  animation:spin .8s linear infinite;
}

.radar-error{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  padding:10px 14px;
  border-radius:8px;
  background:rgba(185,28,28,.86);
  color:#ffffff;
  font-size:12px;
  font-weight:800;
  pointer-events:none;
}

.radar-mobile-control-group{
  display:contents;
}

.radar-page .radar-controls .radar-map-mode-group .radar-overlay-modal-button{
  display:none !important;
}

body.radar-overlay-modal-open{
  overflow:hidden;
}

.radar-overlay-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.radar-overlay-modal.hidden{
  display:none;
}

.radar-overlay-dialog{
  width:min(440px,calc(100vw - 28px));
  max-height:calc(100dvh - 28px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.4);
  border-radius:8px;
  background:#ffffff;
  box-shadow:0 24px 60px rgba(2,6,23,.32);
}

.radar-overlay-dialog:focus{
  outline:none;
}

.radar-overlay-dialog-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px;
  background:linear-gradient(135deg,#0f172a,#1e3a8a 60%,#0369a1);
  color:#ffffff;
}

.radar-overlay-dialog-title-wrap{
  min-width:0;
}

.radar-overlay-dialog-title{
  margin:0;
  font-size:19px;
  font-weight:900;
  line-height:1.15;
}

.radar-overlay-dialog-subtitle{
  margin:5px 0 0;
  color:#dbeafe;
  font-size:11px;
  font-weight:650;
  line-height:1.4;
}

.radar-overlay-dialog-close{
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid rgba(255,255,255,.28);
  border-radius:8px;
  background:rgba(255,255,255,.12);
  color:#ffffff;
  font-size:23px;
  line-height:1;
  cursor:pointer;
}

.radar-overlay-dialog-close:hover{
  background:rgba(255,255,255,.22);
}

.radar-overlay-dialog-body{
  min-height:0;
  overflow:auto;
  padding:14px;
}

.radar-overlay-dialog-body .radar-overlay-label{
  display:none;
}

.radar-overlay-dialog-body .radar-overlay-control,
.radar-overlay-dialog-body .radar-check-group{
  width:100%;
  min-width:0;
}

.radar-overlay-dialog-body .radar-check-group{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.radar-overlay-dialog-body .radar-check-group > *,
.radar-overlay-dialog-body .radar-wind-control,
.radar-overlay-dialog-body .radar-wind-button{
  width:100%;
  min-width:0;
  height:42px;
  box-sizing:border-box;
  border:1px solid var(--line-soft) !important;
  border-radius:8px !important;
}

.radar-overlay-dialog-body .radar-check-group .radar-check{
  height:40px;
  border:none !important;
  border-radius:8px !important;
  padding:0 10px;
  font-size:12px;
}

.radar-overlay-dialog-body .radar-check-group > .radar-check{
  height:42px;
  border:1px solid var(--line-soft) !important;
}

/* Radar mobile portrait workspace */
@media (max-width: 700px) and (orientation: portrait){
  html,
  body.radar-page-body{
    width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    background:#ffffff;
  }

  html{
    scrollbar-gutter:stable;
  }

  body.radar-page-body,
  #radarAnalysisApp,
  .radar-page{
    height:auto;
    min-height:100dvh;
    overflow:visible;
  }

  .radar-controls{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    align-items:stretch;
    padding:0;
    background:#ffffff;
  }

  .radar-menu-title{
    width:auto;
    min-width:0;
    margin:0;
    justify-content:center;
    padding:0 4px;
    font-size:14px;
    line-height:1.05;
  }

  .radar-controls-body{
    gap:3px;
    padding:4px 4px 4px 5px;
  }

  .radar-control-row{
    gap:3px;
    width:100%;
    overflow:visible;
  }

  .radar-settings-row{
    display:grid;
    grid-template-columns:60px 82px minmax(0,1fr);
  }

  .radar-settings-row > .radar-overlay-control{
    display:none;
  }

  .radar-page .radar-controls .radar-map-mode-group .radar-overlay-modal-button{
    display:inline-flex !important;
  }

  .radar-settings-row .radar-map-mode-group{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    min-width:0;
  }

  .radar-settings-row .radar-map-mode-group .radar-mode-button{
    width:100%;
    min-width:0;
    padding:0 2px;
    font-size:10px;
  }

  .radar-playback-row{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:3px;
  }

  .radar-mobile-control-group{
    display:grid;
  }

  .radar-time-row{
    display:grid;
    grid-template-columns:38px 116px minmax(0,1fr);
    gap:2px;
  }

  .radar-time-row .radar-primary-now-button{
    width:38px;
    min-width:38px;
    padding:0;
    font-size:10px;
  }

  .radar-time-row .radar-datetime-group{
    display:grid;
    grid-template-columns:minmax(0,1fr) 16px;
    width:116px;
    min-width:0;
  }

  .radar-time-row .radar-datetime-input{
    width:100% !important;
    min-width:0;
    padding:0 1px !important;
    font-size:10px !important;
    text-align:left !important;
  }

  .radar-time-row .radar-datetime-picker-control,
  .radar-time-row .radar-time-picker-toggle{
    width:16px;
    min-width:16px;
    flex-basis:16px;
  }

  .radar-time-row .radar-time-picker-toggle::before{
    left:4px;
  }

  .radar-time-row .radar-shift-controls{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    width:100%;
    min-width:0;
  }

  .radar-time-row .radar-shift-controls button{
    width:100%;
    min-width:0 !important;
    padding:0 !important;
    font-size:9px;
  }

  .radar-time-row .radar-shift-controls button:not([data-shift-minutes="-360"]):not([data-shift-minutes="-60"]):not([data-shift-minutes="-10"]):not([data-shift-minutes="5"]):not([data-shift-minutes="60"]):not([data-shift-minutes="360"]){
    display:none !important;
  }

  .radar-playback-options-row{
    display:grid;
    grid-template-columns:70px 70px 84px minmax(0,1fr);
  }

  .radar-playback-options-row .radar-inline-field{
    width:100%;
    min-width:0;
    gap:2px;
  }

  .radar-playback-options-row .radar-inline-label{
    flex:0 0 auto;
    font-size:8px;
  }

  .radar-playback-options-row .radar-inline-field select{
    width:auto !important;
    min-width:0;
    flex:1 1 auto;
    padding:0 1px !important;
    font-size:9px !important;
  }

  .radar-playback-options-row .timeline-playback-controls{
    display:grid !important;
    grid-template-columns:repeat(3,28px) !important;
  }

  .radar-playback-options-row .timeline-playback-controls button{
    width:28px !important;
    min-width:28px !important;
  }

  .radar-playback-options-row .radar-auto-refresh-button{
    width:100%;
    min-width:0;
    padding:0 2px !important;
    overflow:hidden;
    font-size:7px;
  }

  .radar-page .radar-controls button,
  .radar-page .radar-controls select,
  .radar-page .radar-datetime-input,
  .radar-page .radar-datetime-picker-control,
  .radar-page .radar-now-button,
  .radar-page .radar-mode-button,
  .radar-page .radar-check,
  .radar-page .radar-wind-control,
  .radar-page .radar-inline-field,
  .radar-page .radar-shift-controls,
  .radar-page .timeline-playback-controls button{
    height:28px !important;
    min-height:28px !important;
    font-size:11px;
  }

  .radar-pane-count-select{
    width:60px;
  }

  .radar-map-select{
    width:82px;
  }

  .radar-page .radar-datetime-input{
    width:140px !important;
  }

  .radar-page .radar-shift-controls button{
    height:28px !important;
    min-height:28px !important;
    min-width:34px;
  }

  .radar-page .radar-timeline-bar{
    flex:0 0 auto;
  }

  .radar-pane-grid,
  .radar-pane-grid[data-pane-count="1"],
  .radar-pane-grid[data-pane-count="2"],
  .radar-pane-grid[data-pane-count="3"],
  .radar-pane-grid[data-pane-count="4"]{
    flex:0 0 auto;
    width:100%;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:none;
    align-items:start;
    justify-content:stretch;
    gap:6px;
    padding:6px 4px 8px;
    overflow:visible;
    box-sizing:border-box;
  }

  .radar-pane-grid[data-pane-count] .radar-pane{
    grid-column:auto;
    grid-row:auto;
    width:100%;
    min-width:0;
    height:auto;
    border-radius:6px;
    box-sizing:border-box;
  }

  .radar-pane-header{
    height:37px;
    min-height:37px;
    padding:5px;
    box-sizing:border-box;
  }

  .radar-pane-controls{
    flex-wrap:nowrap;
    align-items:center;
    justify-content:flex-start;
    width:100%;
    gap:4px;
  }

  .radar-pane-controls select{
    flex:0 0 auto;
    width:auto;
    min-width:0 !important;
    padding-left:4px !important;
    padding-right:2px !important;
  }

  .radar-pane-viewer{
    align-self:stretch;
    width:100% !important;
    max-width:100%;
    height:auto !important;
    max-height:none;
    min-height:0;
    margin:0;
    aspect-ratio:835 / 820;
  }

  .radar-pane-image{
    width:100%;
    max-width:100%;
    height:auto;
    margin:0;
  }
}

.collapsible-model-section .model-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* 슬라이더 라벨 공간 균형 보정 */
.forecast-bar,
.forecast-bar.compare-active{
  padding-top:12px !important;
  padding-bottom:12px !important;
  overflow:visible !important;
}

.forecast-shell,
.forecast-shell.compare-active{
  min-height:46px !important;
  overflow:visible !important;
}

.compare-timeline-list,
.single-timeline-list{
  padding-top:6px !important;
  padding-bottom:6px !important;
}

/* ===== v3.12.1 hotfix: model labels + collapsible ended group + balanced slider spacing ===== */
.model-section > .model-section-title:not(.model-section-toggle){
  display:block;
  width:100%;
  border:none;
  background:transparent;
  cursor:default;
  text-align:left;
  padding-left:2px;
}

.model-section-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:none;
  background:transparent;
  cursor:pointer;
  text-align:left;
  padding-left:2px;
  appearance:none;
  -webkit-appearance:none;
}

.model-section-toggle:hover{
  color:var(--blue);
}

/* 슬라이더 날짜/예측시각 라벨 기준으로 위아래 여백을 다시 균형화 */
.forecast-bar,
.forecast-bar.compare-active{
  padding-top:8px !important;
  padding-bottom:6px !important;
  overflow:visible !important;
}

.forecast-shell,
.forecast-shell.compare-active{
  min-height:42px !important;
  height:auto !important;
  overflow:visible !important;
}

.forecast-timeline,
.forecast-timeline.compare-timeline{
  overflow:visible !important;
}

.compare-timeline-row,
.single-timeline-row{
  min-height:42px !important;
  align-items:center !important;
}

.compare-row-info{
  min-height:42px !important;
  align-items:center !important;
}

.compare-timeline-list,
.single-timeline-list{
  gap:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  margin-top:0 !important;
}

.compare-track,
.single-forecast-track{
  align-self:center !important;
}

/* ===== v3.12.2 hotfix: compact compare rows without clipping labels ===== */
/*
   v3.12.1에서 단일/비교 row를 같은 min-height:42px로 묶으면서
   비교 모드의 모델별 슬라이더 간격까지 커졌다.
   단일 모드는 라벨 공간을 row 안에서 확보하고,
   비교 모드는 전체 list의 위/아래 padding으로 active label 공간을 확보한다.
*/
.forecast-bar.compare-active{
  padding-top:6px !important;
  padding-bottom:6px !important;
  overflow:visible !important;
}

.forecast-shell.compare-active{
  min-height:0 !important;
  height:auto !important;
  overflow:visible !important;
}

.forecast-timeline.compare-timeline{
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
}

.compare-timeline-list{
  gap:1px !important;
  margin-top:0 !important;
  padding-top:19px !important;
  padding-bottom:19px !important;
}

.compare-timeline-row{
  min-height:14px !important;
  align-items:center !important;
}

.compare-timeline-row .compare-row-info{
  min-height:14px !important;
  align-items:center !important;
}

.compare-timeline-row .compare-row-model{
  line-height:1.15 !important;
  padding-top:0 !important;
}

.compare-timeline-row .compare-track{
  align-self:center !important;
}

/* 단일 모드는 기존처럼 한 줄 안에서 위/아래 라벨 공간을 확보 */
.single-timeline-list{
  gap:0 !important;
  margin-top:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

.single-timeline-row{
  min-height:42px !important;
  align-items:center !important;
}


/* ===== v3.14: compare toggle polish + unified single/one-model timeline height ===== */
.model-compare-section{
  margin-top:0 !important;
  margin-bottom:6px !important;
  padding:0 0 8px 0 !important;
  border-top:none !important;
  border-bottom:1px solid var(--line) !important;
}

.model-compare-toggle{
  height:28px !important;
  padding:0 4px !important;
  border-radius:9px !important;
  border:1px solid #93c5fd !important;
  background:#eff6ff !important;
  color:#1d4ed8 !important;
  font-size:10px !important;
  font-weight:800 !important;
  letter-spacing:-0.2px;
  box-shadow:none !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
}

.model-compare-toggle:hover{
  background:#dbeafe !important;
  border-color:#60a5fa !important;
}

.model-compare-toggle.active{
  background:#5b21b6 !important;
  border-color:#5b21b6 !important;
  color:#ffffff !important;
}

.model-compare-toggle.active:hover{
  background:#4c1d95 !important;
  border-color:#4c1d95 !important;
}

.model-compare-hint{
  display:none !important;
}

/*
  단일 모드와 모델비교 ON + 1개 모델 상태의 슬라이더 영역 높이를 통일한다.
  라벨 공간은 row 높이가 아니라 list padding으로 확보한다.
*/
.forecast-bar,
.forecast-bar.compare-active{
  padding-top:6px !important;
  padding-bottom:6px !important;
  overflow:visible !important;
}

.forecast-shell,
.forecast-shell.compare-active{
  min-height:0 !important;
  height:auto !important;
  overflow:visible !important;
}

.forecast-timeline,
.forecast-timeline.compare-timeline{
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
}

.compare-timeline-list,
.single-timeline-list{
  gap:1px !important;
  margin-top:0 !important;
  padding-top:19px !important;
  padding-bottom:19px !important;
}

.compare-timeline-row,
.single-timeline-row{
  min-height:14px !important;
  align-items:center !important;
}

.compare-timeline-row .compare-row-info,
.single-timeline-row .compare-row-info{
  min-height:14px !important;
  align-items:center !important;
}

.compare-timeline-row .compare-row-model,
.single-timeline-row .compare-row-model{
  line-height:1.15 !important;
  padding-top:0 !important;
}

.compare-track,
.single-forecast-track{
  align-self:center !important;
}


/* v3.15: layout selector refinements */
.timeline-top-controls .compare-layout-button{
  min-width:78px !important;
  gap:6px !important;
  justify-content:center !important;
}

.timeline-top-controls .compare-layout-menu{
  min-width:136px !important;
}

.timeline-top-controls .compare-layout-option{
  width:100% !important;
  min-width:120px !important;
  height:30px !important;
  justify-content:flex-start !important;
  gap:8px !important;
}

.compare-layout-button .layout-mini{
  margin-right:1px;
}

.compare-layout-option span:last-child,
.compare-layout-button span:last-child{
  white-space:nowrap;
}

/* Radar page compact controls */
.radar-page .radar-timeline-bar{
  padding-top:3px !important;
  padding-bottom:3px !important;
}

.radar-page .forecast-shell.compare-active{
  min-height:36px !important;
}

.radar-page .radar-timeline{
  height:auto !important;
}

.radar-page .radar-timeline .compare-timeline-list,
.radar-page .radar-timeline .single-timeline-list{
  padding-top:15px !important;
  padding-bottom:15px !important;
}

.typhoon-page .typhoon-time-bar{
  padding-top:3px !important;
  padding-bottom:3px !important;
}

.typhoon-page .typhoon-time-shell{
  min-height:36px !important;
}

.typhoon-page .typhoon-timeline .compare-timeline-list,
.typhoon-page .typhoon-timeline .single-timeline-list{
  padding-top:15px !important;
  padding-bottom:15px !important;
}

.radar-page .radar-primary-now-button{
  height:30px;
  min-height:30px;
  min-width:48px;
  border:none;
  border-radius:9px;
  background:#111827;
  color:#ffffff;
}

.radar-page .radar-primary-now-button:hover{
  background:#020617;
}

.radar-page .radar-play-button{
  height:30px;
  min-height:30px;
  min-width:42px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#ffffff;
  color:#111827;
}

.radar-page .radar-play-button:hover{
  background:#f1f5f9;
}

.radar-page .radar-shift-controls{
  gap:0;
  padding:0;
  border:none;
  border-radius:7px;
  overflow:hidden;
  background:#ffffff;
}

.radar-page .radar-shift-controls button{
  height:30px;
  min-width:36px;
  border:1px solid var(--line-soft);
  border-right:none;
  border-radius:0;
  background:#ffffff;
  color:var(--text);
}

.radar-page .radar-shift-controls button:first-child{
  border-top-left-radius:7px;
  border-bottom-left-radius:7px;
}

.radar-page .radar-shift-controls button:last-child{
  border-right:1px solid var(--line-soft);
  border-top-right-radius:7px;
  border-bottom-right-radius:7px;
}

.radar-page .radar-shift-controls button:hover{
  background:#f1f5f9;
}

.radar-page .radar-auto-refresh-button{
  height:32px !important;
  min-height:32px !important;
  padding:0 10px !important;
  border:1px solid #86efac;
  border-radius:8px;
  background:#f0fdf4;
  color:#15803d;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

.radar-page .radar-auto-refresh-button:hover{
  background:#dcfce7;
}

.radar-page .radar-auto-refresh-button.active{
  border-color:#111827;
  background:#111827;
  color:#ffffff;
}

.radar-page .radar-track:focus,
.radar-page .radar-track:focus-visible,
.radar-page .radar-track:active,
.radar-page .radar-track .compare-segment:focus,
.radar-page .radar-track .compare-segment:focus-visible,
.radar-page .radar-track .compare-segment:active{
  outline:none !important;
  box-shadow:none !important;
}

/* Unified timeline playback controls */
.radar-playback-row .radar-inline-field:nth-of-type(2) select{
  width:68px !important;
}

.timeline-playback-controls{
  display:flex !important;
  align-items:center !important;
  gap:0 !important;
  border-radius:8px !important;
  overflow:hidden !important;
}

.timeline-top-controls .compare-playback-controls,
.compare-playback-controls{
  grid-template-columns:repeat(3,32px) !important;
  gap:0 !important;
}

.timeline-playback-controls button,
.timeline-top-controls .compare-playback-controls button,
.radar-page .radar-playback-button{
  width:32px !important;
  height:30px !important;
  min-width:32px !important;
  min-height:30px !important;
  padding:0 !important;
  border:1px solid var(--line-soft) !important;
  border-right:none !important;
  border-radius:0 !important;
  background:#f8fafc !important;
  color:#334155 !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1 !important;
  cursor:pointer !important;
}

.timeline-playback-controls button:first-child{
  border-top-left-radius:8px !important;
  border-bottom-left-radius:8px !important;
}

.timeline-playback-controls button:last-child{
  border-right:1px solid var(--line-soft) !important;
  border-top-right-radius:8px !important;
  border-bottom-right-radius:8px !important;
}

.timeline-playback-controls button:hover{
  background:#eef2f7 !important;
}

.timeline-playback-controls .timeline-play-toggle,
.timeline-top-controls .compare-playback-controls .timeline-play-toggle,
.radar-page .timeline-playback-controls .timeline-play-toggle{
  background:#e2e8f0 !important;
  color:#0f172a !important;
}

.timeline-playback-controls .timeline-play-toggle.is-playing,
.timeline-top-controls .compare-playback-controls .timeline-play-toggle.is-playing,
.radar-page .timeline-playback-controls .timeline-play-toggle.is-playing{
  background:#fef3c7 !important;
  color:#92400e !important;
}

/* Match the main chart timeline spacing to the compact radar timeline. */
.app-shell .forecast-bar{
  padding-top:3px !important;
  padding-bottom:3px !important;
}

.app-shell .forecast-timeline .compare-timeline-list,
.app-shell .forecast-timeline .single-timeline-list{
  padding-top:15px !important;
  padding-bottom:15px !important;
}

/* Radar controls follow the main chart datetime control height. */
.radar-page .radar-controls button,
.radar-page .radar-controls select,
.radar-page .radar-datetime-input,
.radar-page .radar-date-input,
.radar-page .radar-datetime-picker-control,
.radar-page .radar-now-button,
.radar-page .radar-mode-button,
.radar-page .radar-check,
.radar-page .radar-wind-control,
.radar-page .radar-inline-field,
.radar-page .radar-shift-controls,
.radar-page .timeline-playback-controls button{
  height:30px !important;
  min-height:30px !important;
}

.radar-page .radar-wind-control .radar-check{
  height:100% !important;
  min-height:0 !important;
}

.radar-page .radar-time-picker-toggle{
  height:100% !important;
  min-height:0 !important;
}

.radar-page .radar-playback-controls button,
.radar-page .radar-shift-controls button{
  height:30px !important;
  min-height:30px !important;
}

.radar-page .radar-controls button,
.radar-page .radar-mode-button,
.radar-page .radar-now-button,
.radar-page .radar-check,
.radar-page .timeline-playback-controls button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
}

.radar-page .radar-controls input:not([type="checkbox"]),
.radar-page .radar-controls select{
  box-sizing:border-box !important;
  line-height:28px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

.radar-page .radar-datetime-picker-control,
.radar-page .radar-datetime-picker-control:focus-within,
.radar-page .radar-time-picker-toggle:focus,
.radar-page .radar-time-picker-toggle:active{
  outline:none !important;
  box-shadow:none !important;
}

.radar-page .radar-date-input{
  width:108px !important;
  padding-left:6px !important;
  padding-right:1px !important;
  outline:none !important;
  box-shadow:none !important;
}

.radar-page .radar-datetime-input{
  width:148px !important;
  padding-left:4px !important;
  padding-right:4px !important;
  border-right:none !important;
  outline:none !important;
  box-shadow:none !important;
  text-align:center !important;
}

.radar-page .radar-datetime-input:focus,
.radar-page .radar-datetime-input:active{
  border-color:var(--line-soft) !important;
  border-right:none !important;
  outline:none !important;
  box-shadow:none !important;
}

.radar-page .radar-date-input:focus,
.radar-page .radar-date-input:active{
  border-color:var(--line-soft) !important;
  border-right:none !important;
  outline:none !important;
  box-shadow:none !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-year-select,
.radar-page .radar-datetime-picker-panel .radar-date-picker-month-select{
  height:21px !important;
  min-height:21px !important;
  line-height:19px !important;
  padding:0 2px !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-header{
  height:24px !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-title{
  gap:3px !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-year-select{
  width:60px !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-month-select{
  width:52px !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-nav{
  height:19px !important;
  min-height:19px !important;
  padding:0 !important;
}

.radar-page .radar-datetime-picker-panel .radar-date-picker-day,
.radar-page .radar-datetime-picker-panel .radar-date-picker-blank{
  height:17px !important;
  min-height:17px !important;
  padding:0 !important;
}

.radar-page .radar-datetime-picker-panel .radar-time-picker-number{
  height:26px !important;
  min-height:26px !important;
  line-height:24px !important;
  padding:0 2px !important;
}

/* CDS 3.4: 클릭 가능한 미지원 산출물 표시 */
select option.unsupported-option{
  color:#a8b0bd;
  background:#f8fafc;
}

/* CDS 3.4: 모델 자동 전환 안내 말풍선 */
.selection-toast{
  position:fixed;
  z-index:10000;
  top:58px;
  left:50%;
  transform:translate(-50%,-8px);
  max-width:min(420px,calc(100vw - 32px));
  padding:9px 14px;
  border:1px solid #93c5fd;
  border-radius:10px;
  background:rgba(239,246,255,.97);
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  line-height:1.35;
  text-align:center;
  box-shadow:0 8px 24px rgba(15,23,42,.16);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}

.selection-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

/* Typhoon mobile portrait layout must win over shared timeline hotfixes above. */
@media (max-width: 700px) and (orientation: portrait){
  body.typhoon-page-body,
  #typhoonGuidanceApp,
  .typhoon-page{
    min-height:100dvh;
    height:100dvh;
  }

  .typhoon-page{
    overflow:hidden;
    border-top-left-radius:0;
    border-top-right-radius:0;
  }

  .typhoon-header{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:72px minmax(78px,84px) minmax(0,1fr);
    grid-template-rows:36px 36px;
    align-items:stretch;
    gap:6px;
    padding:0 6px 0 0;
    row-gap:4px;
  }

  .typhoon-title-wrap{
    grid-column:1;
    grid-row:1 / 3;
    width:auto;
    min-width:0;
    min-height:0;
    margin:0;
    padding:0 6px;
    border:none;
    border-right:1px solid var(--line);
    border-bottom:none;
    border-radius:0;
    background:#ffffff;
  }

  .typhoon-title{
    flex-direction:column;
    flex-wrap:nowrap;
    gap:0;
    font-size:14px;
    line-height:1.05;
    white-space:nowrap;
  }

  .typhoon-select-controls{
    display:contents;
  }

  .typhoon-year-select,
  .typhoon-storm-select{
    width:100%;
    height:32px;
    min-width:0;
    max-width:none;
    border-radius:8px;
    font-size:13px;
    padding-left:8px;
    align-self:start;
    margin-top:4px;
  }

  .typhoon-year-select{
    padding-right:22px;
  }

  .typhoon-storm-select{
    padding-right:24px;
  }

  .typhoon-fcst-toggle{
    grid-column:2 / -1;
    width:100%;
    height:32px;
    min-width:0;
    border-radius:8px;
    margin-top:0;
    margin-bottom:4px;
    align-self:end;
    border-top:1px solid var(--line-soft);
  }

  .typhoon-fcst-option{
    min-width:0;
    flex:1 1 50%;
    padding:0 6px;
    font-size:13px;
    line-height:1;
  }

  .typhoon-page .typhoon-time-bar{
    flex:0 0 auto;
    padding-top:3px !important;
    padding-bottom:4px !important;
  }

  .typhoon-page .typhoon-time-shell{
    min-height:42px !important;
  }

  .typhoon-page .typhoon-timeline .compare-timeline-list,
  .typhoon-page .typhoon-timeline .single-timeline-list{
    padding-top:14px !important;
    padding-bottom:14px !important;
  }

  .typhoon-content{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .typhoon-viewer{
    flex:0 0 auto;
    min-height:0;
    align-items:flex-start;
    justify-content:center;
    overflow:visible;
    padding:0;
  }

  .typhoon-viewer-stage{
    height:auto;
    align-items:flex-start;
  }

  .typhoon-guidance-image{
    width:100%;
    height:auto;
    max-width:100%;
    max-height:none;
    object-fit:contain;
  }

  .typhoon-model-info-panel{
    flex:1 1 0;
    width:100%;
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
    border-left:none;
    border-top:1px solid var(--line);
  }

  .typhoon-model-info-list{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding:7px 10px 5px;
  }

  .typhoon-model-info-row{
    grid-template-columns:minmax(108px,34%) minmax(0,1fr);
    min-width:0;
    gap:9px;
    padding:3px 0;
  }

  .typhoon-model-info-name,
  .typhoon-model-info-description{
    font-size:12px;
    line-height:1.25;
  }

  .typhoon-model-info-name{
    white-space:normal;
    overflow-wrap:anywhere;
  }

  .typhoon-model-info-description{
    white-space:normal;
    word-break:keep-all;
    overflow-wrap:anywhere;
  }

  .typhoon-page .typhoon-model-info-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    margin-top:0;
    padding:7px 10px;
    position:relative;
    bottom:auto;
  }

  .typhoon-page .typhoon-model-info-actions .typhoon-updated-time{
    flex:0 1 auto;
    align-self:center;
    width:auto;
    max-width:none;
    min-width:0;
    height:32px;
    min-height:32px;
    display:grid;
    grid-template-rows:12px 12px;
    align-content:center;
    align-items:center;
    justify-items:start;
    row-gap:0;
    margin:0;
    padding:0;
    text-align:left;
    font-size:11px;
    line-height:1.18;
    letter-spacing:0;
  }

  .typhoon-page .typhoon-updated-time .typhoon-updated-time-line,
  .typhoon-page .typhoon-updated-time .typhoon-update-schedule{
    width:auto;
    height:12px;
    line-height:12px;
    margin-top:0;
    text-align:left;
    white-space:nowrap;
  }

  .typhoon-page .typhoon-model-detail-button{
    flex:0 0 auto;
    margin-left:auto;
    min-height:32px;
    padding:7px 11px;
    font-size:12px;
    white-space:nowrap;
  }
}

@media (max-width: 380px) and (orientation: portrait){
  .typhoon-header{
    display:grid;
    grid-template-columns:68px minmax(74px,80px) minmax(0,1fr);
    grid-template-rows:35px 35px;
    row-gap:4px;
    padding-top:0;
    padding-bottom:0;
  }

  .typhoon-title-wrap{
    grid-column:1;
    grid-row:1 / 3;
    width:auto;
    min-height:0;
    padding:0 5px;
    border-right:1px solid var(--line);
    border-bottom:none;
    border-radius:0;
  }

  .typhoon-title{
    flex-direction:column;
    gap:0;
    font-size:13px;
    line-height:1.05;
  }

  .typhoon-select-controls{
    display:contents;
  }

  .typhoon-year-select,
  .typhoon-storm-select{
    height:31px;
    font-size:12px;
    align-self:start;
    margin-top:4px;
  }

  .typhoon-fcst-toggle{
    grid-column:2 / -1;
    height:31px;
    margin-bottom:4px;
  }

  .typhoon-model-info-panel{
    flex-basis:0;
  }

  .typhoon-model-info-row{
    grid-template-columns:minmax(96px,33%) minmax(0,1fr);
    gap:7px;
  }
}

/* CDS mobile portrait workspace */
@media (max-width: 700px) and (orientation: portrait){
  body:has(.app-shell){
    height:100dvh;
    overflow:hidden;
    background:#ffffff;
  }

  .app-shell{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    grid-template-rows:auto auto auto auto minmax(150px,1fr) auto;
    width:100%;
    height:100dvh;
    min-width:0;
    overflow:hidden;
    background:#ffffff;
  }

  .app-shell > .sidebar,
  .app-shell > .main-panel{
    display:contents;
  }

  .app-shell .logo-block{
    grid-column:1;
    grid-row:1 / 3;
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:5px 4px;
    border-right:1px solid var(--line);
    border-bottom:1px solid var(--line);
    border-radius:0;
    background:#ffffff;
  }

  .app-shell .logo-block .title{
    display:block;
    font-size:14px;
    line-height:1.08;
    white-space:nowrap;
  }

  .app-shell .logo-block .subtitle{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1px;
    margin:0;
    font-size:9px;
    line-height:1.1;
    white-space:nowrap;
  }

  .app-shell .main-menu{
    grid-column:2;
    grid-row:1;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0;
    min-width:0;
    border-bottom:1px solid var(--line);
    background:#ffffff;
  }

  .app-shell .menu-btn{
    min-width:0;
    height:28px;
    padding:0 3px;
    border-right:1px solid var(--line);
    border-radius:0;
    background:#ffffff;
    font-size:11px;
    line-height:1;
  }

  .app-shell .menu-btn:last-child{
    border-right:none;
  }

  .app-shell .menu-btn.active{
    background:#f4f8ff;
    color:#1d4ed8;
    box-shadow:inset 0 -2px 0 #3b82f6;
  }

  .app-shell .toolbar{
    grid-column:2;
    grid-row:2;
    min-width:0;
    min-height:0;
    display:block;
    padding:3px;
    border-bottom:1px solid var(--line);
    background:#ffffff;
  }

  .app-shell .toolbar-left{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:26px 27px;
    align-items:stretch;
    gap:2px;
    width:100%;
    min-width:0;
  }

  .app-shell .toolbar-time-row{
    grid-row:1;
    display:grid;
    grid-template-columns:40px 92px 58px 28px minmax(100px,1fr);
    align-items:stretch;
    gap:2px;
    min-width:0;
  }

  .app-shell .toolbar-product-row{
    grid-row:2;
    display:grid;
    grid-template-columns:var(--product-category-width,90px) minmax(0,1fr) 81px;
    align-items:stretch;
    gap:2px;
    min-width:0;
  }

  .app-shell #nowBtn{
    grid-column:auto;
    grid-row:auto;
    width:100%;
    height:26px !important;
    min-height:26px !important;
    padding:0 4px !important;
    border-radius:6px;
    font-size:10px;
  }

  .app-shell .main-datetime-group{
    display:contents;
  }

  .app-shell #runDate,
  .app-shell #runHour{
    width:100%;
    min-width:0;
    height:26px !important;
    min-height:26px !important;
    padding:3px 5px;
    border:1px solid #cfd8e3 !important;
    border-radius:6px !important;
    font-size:10px;
  }

  .app-shell #productSelect,
  .app-shell #productCategory{
    width:100%;
    min-width:0;
    height:27px !important;
    min-height:27px !important;
    padding:3px 5px;
    border-radius:6px;
    font-size:10px;
  }

  .app-shell .time-toggle-stack{
    grid-column:auto;
    grid-row:auto;
    width:100%;
    height:26px;
    min-width:0;
  }

  .app-shell .time-mode{
    flex:1 1 50%;
    min-height:0;
    padding:0 4px;
    font-size:7px;
  }

  .app-shell .run-shift-group{
    grid-column:auto;
    grid-row:auto;
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    width:100%;
    height:26px !important;
  }

  .app-shell .run-shift-group button{
    width:100%;
    min-width:0;
    height:26px !important;
    min-height:26px !important;
    padding:0 1px;
    border-radius:0;
    font-size:8px;
  }

  .app-shell .run-shift-group button:first-child{
    border-radius:7px 0 0 7px;
  }

  .app-shell .run-shift-group button:last-child{
    border-radius:0 7px 7px 0;
  }

  .app-shell #productCategory{
    grid-column:1;
    grid-row:1;
  }

  .app-shell #productSelect{
    grid-column:2;
    grid-row:1;
  }

  .app-shell .timeline-top-controls{
    grid-column:3;
    grid-row:1;
    width:auto;
    min-width:0;
    justify-content:flex-end;
    align-items:stretch;
    height:27px !important;
    min-height:27px !important;
    padding:0;
  }

  .app-shell .timeline-top-controls .compare-controls{
    gap:3px !important;
    align-items:stretch !important;
    height:27px !important;
    min-height:27px !important;
  }

  .app-shell .timeline-top-controls .compare-fit-toggle,
  .app-shell .timeline-top-controls .compare-layout-control{
    display:none !important;
  }

  .app-shell .timeline-playback-controls,
  .app-shell .timeline-top-controls .compare-playback-controls{
    grid-template-columns:repeat(3,27px) !important;
    gap:0 !important;
  }

  .app-shell .timeline-playback-controls button,
  .app-shell .timeline-top-controls .compare-playback-controls button{
    width:27px !important;
    min-width:27px !important;
    height:27px !important;
    min-height:27px !important;
    border-right:none !important;
    border-radius:0 !important;
    font-size:10px !important;
  }

  .app-shell .timeline-playback-controls button:first-child,
  .app-shell .timeline-top-controls .compare-playback-controls button:first-child{
    border-radius:6px 0 0 6px !important;
  }

  .app-shell .timeline-playback-controls button:last-child,
  .app-shell .timeline-top-controls .compare-playback-controls button:last-child{
    border-right:1px solid var(--line-soft) !important;
    border-radius:0 6px 6px 0 !important;
  }

  .app-shell .forecast-bar{
    grid-column:1 / -1;
    grid-row:3;
    width:100%;
    min-width:0;
    padding:3px 5px !important;
    border-bottom:1px solid var(--line);
    background:#ffffff;
  }

  .app-shell .forecast-shell,
  .app-shell .forecast-shell.compare-active{
    min-height:42px !important;
  }

  .app-shell .viewer-layout{
    grid-column:1 / -1;
    grid-row:5;
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    background:var(--bg-viewer);
  }

  .app-shell .viewer-wrap{
    flex:1 1 auto;
    width:100%;
    min-width:0;
    min-height:0;
    padding:0;
    border-bottom:1px solid var(--line);
  }

  .app-shell .aux-sidebar:not(.hidden){
    flex:0 0 auto;
    width:100%;
    max-width:none;
    max-height:none;
    border-left:none;
    border-top:1px solid var(--line);
    overflow:visible;
    background:#ffffff;
  }

  .app-shell .aux-sidebar .mobile-aux-trigger{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:7px;
    width:100%;
    min-height:34px;
    padding:5px 9px;
    border:0;
    background:#ffffff;
    color:var(--text);
    cursor:pointer;
    text-align:left;
  }

  .app-shell .mobile-aux-title{
    color:#64748b;
    font-size:9px;
    font-weight:700;
    white-space:nowrap;
  }

  .app-shell .mobile-aux-value{
    min-width:0;
    overflow:hidden;
    color:#1e3a5f;
    font-size:11px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .app-shell .mobile-aux-chevron{
    color:#64748b;
    font-size:13px;
    line-height:1;
  }

  .app-shell .aux-sidebar > .aux-sidebar-inner{
    display:none;
  }

  .app-shell .aux-sidebar.mobile-open .mobile-aux-backdrop{
    position:fixed;
    inset:0;
    z-index:1000;
    display:block;
    width:100%;
    height:100%;
    padding:0;
    border:0;
    background:rgba(15,23,42,.38);
  }

  .app-shell .aux-sidebar.mobile-open > .aux-sidebar-inner{
    position:fixed;
    right:0;
    bottom:0;
    left:0;
    z-index:1001;
    display:flex;
    max-height:min(70dvh,560px);
    padding:8px 10px max(12px,env(safe-area-inset-bottom));
    border-radius:8px 8px 0 0;
    background:#ffffff;
    box-shadow:0 -12px 30px rgba(15,23,42,.18);
  }

  .app-shell .aux-sidebar.mobile-open .mobile-aux-trigger{
    visibility:hidden;
  }

  .app-shell .aux-sidebar-title-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:30px;
  }

  .app-shell .aux-sidebar-title{
    margin:0;
    padding-left:2px;
    color:#334155;
    font-size:13px;
    text-align:left;
  }

  .app-shell .mobile-aux-close{
    display:grid;
    width:30px;
    height:30px;
    padding:0;
    place-items:center;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#64748b;
    font-size:15px;
    cursor:pointer;
  }

  .app-shell .mobile-aux-search{
    display:block;
    width:100%;
    height:34px;
    margin:5px 0 7px;
    padding:5px 9px;
    border:1px solid #cbd5e1;
    border-radius:6px;
    background:#f8fafc;
    color:var(--text);
    font:inherit;
    font-size:11px;
  }

  .app-shell .aux-sidebar-list{
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:3px;
    padding-bottom:2px;
  }

  .app-shell .aux-item{
    min-height:34px;
    padding:7px 8px;
    border:1px solid #e2e8f0;
    border-radius:6px;
    background:#ffffff;
    font-size:11px;
    line-height:1.2;
    text-align:left;
  }

  .app-shell .aux-item.active{
    border-color:#93c5fd;
    background:#eff6ff;
  }

  .app-shell .aux-separator{
    grid-column:1 / -1;
    margin:3px 2px;
  }

  .app-shell .chart-images.compare-images,
  .app-shell .chart-images.compare-images.fit-screen,
  .app-shell .chart-images.compare-images.fixed-size,
  .app-shell .chart-images.compare-images.layout-auto,
  .app-shell .chart-images.compare-images.layout-manual{
    display:grid !important;
    grid-template-columns:repeat(var(--compare-columns,1),minmax(0,1fr)) !important;
    width:100% !important;
    max-width:100% !important;
  }

  .app-shell .chart-images.compare-images .compare-image-item,
  .app-shell .chart-images.compare-images img{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
  }

  .app-shell .chart-images.compare-images.fit-screen.compare-single .compare-image-item{
    width:100% !important;
    max-width:100% !important;
  }

  .app-shell .chart-images.single-images{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }

  .app-shell .chart-images.single-images > .single-image-item:only-child{
    width:100% !important;
    max-width:100% !important;
    padding:0 !important;
    border:none !important;
    border-radius:0 !important;
  }

  .app-shell .chart-images.single-images > .single-image-item:only-child > .single-image-stack:has(> img:only-child),
  .app-shell .chart-images.single-images > .single-image-item:only-child > .single-image-stack:has(> img:only-child) > img{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
  }

  .app-shell .model-box{
    grid-column:1 / -1;
    grid-row:6;
    min-width:0;
    max-height:178px;
    overflow:auto;
    padding:5px 6px 6px;
    border-top:1px solid var(--line);
    border-radius:0;
    background:#ffffff;
  }

  .app-shell .public-chart-notice{
    grid-column:1 / -1;
    grid-row:4;
    width:100%;
    min-width:0;
    padding:5px 8px;
    font-size:11px;
  }

  .app-shell .model-grid{
    display:grid;
    grid-template-columns:72px repeat(5,minmax(0,1fr));
    grid-auto-flow:row;
    align-items:stretch;
    gap:5px 4px;
    margin:0;
  }

  .app-shell .model-section{
    min-width:0;
    gap:2px;
  }

  .app-shell .model-section-title,
  .app-shell .model-section-toggle{
    min-height:13px;
    padding:0 1px;
    font-size:9px;
    line-height:1.1;
  }

  .app-shell .model-button-list{
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    gap:2px;
  }

  .app-shell .model-section[data-model-group="global"]{
    grid-column:2 / span 3;
    grid-row:1;
  }

  .app-shell .model-section[data-model-group="regional"]{
    grid-column:5;
    grid-row:1;
  }

  .app-shell .model-section[data-model-group="local"]{
    grid-column:6;
    grid-row:1;
  }

  .app-shell .model-section[data-model-group="nowcast"]{
    grid-column:2;
    grid-row:2;
  }

  .app-shell .model-section[data-model-group="ended"]{
    grid-column:3 / 7;
    grid-row:2;
  }

  .app-shell .model-section[data-model-group="global"] .model-button-list{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
  }

  .app-shell .model-section[data-model-group="ended"] .model-button-list{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
  }

  .app-shell .model-section[data-model-group="gens"]{
    grid-column:2 / span 2;
  }

  .app-shell .model-section[data-model-group="lens"]{
    grid-column:4;
  }

  .app-shell .model-section[data-model-group="ended_ens"]{
    grid-column:5 / 7;
  }

  .app-shell .model-section[data-model-group="gens"] .model-button-list,
  .app-shell .model-section[data-model-group="ended_ens"] .model-button-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
  }

  .app-shell .model-section[data-model-group="model_analysis"]{
    grid-column:1 / span 3;
  }

  .app-shell .model-section[data-model-group="ended_analysis"]{
    grid-column:4 / span 3;
  }

  .app-shell .model-section[data-model-group="model_analysis"] .model-button-list,
  .app-shell .model-section[data-model-group="ended_analysis"] .model-button-list{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
  }

  .app-shell .model-cell{
    flex:none;
    width:100%;
    min-width:0;
    min-height:24px;
    padding:3px 2px;
    border-radius:6px;
    font-size:9px;
    line-height:1.05;
    white-space:normal;
    overflow-wrap:anywhere;
  }

  .app-shell .model-compare-section{
    grid-column:1;
    grid-row:span 2;
    margin:0 !important;
    padding:0 !important;
    border:none !important;
  }

  .app-shell .model-compare-toggle{
    height:100% !important;
    min-height:52px !important;
    padding:4px !important;
    white-space:normal !important;
    line-height:1.15;
  }

  .app-shell .radar-analysis-section,
  .app-shell .typhoon-guidance-section{
    grid-column:span 3;
    margin:0;
    padding-top:5px;
    border-top:1px solid var(--line);
  }

  .app-shell .radar-analysis-launcher,
  .app-shell .typhoon-guidance-launcher{
    min-height:30px;
    height:30px;
    border-radius:7px;
    font-size:10px;
  }

  .app-shell .radar-launcher-text,
  .app-shell .typhoon-launcher-text{
    flex-direction:row;
    gap:3px;
    line-height:1;
  }

  .app-shell .radar-launcher-text small,
  .app-shell .typhoon-launcher-text small{
    margin:0;
    font-size:8px;
  }

  .selection-toast{
    top:8px;
    max-width:calc(100vw - 16px);
    font-size:11px;
  }
}

@media (max-width: 450px) and (orientation: portrait){
  .app-shell .run-shift-group button{
    font-size:0;
  }

  .app-shell .run-shift-group button::after{
    content:attr(data-shift-hours);
    font-size:7px;
    line-height:1;
  }

  .app-shell .run-shift-group button[data-shift-hours="6"]::after,
  .app-shell .run-shift-group button[data-shift-hours="12"]::after,
  .app-shell .run-shift-group button[data-shift-hours="24"]::after{
    content:"+" attr(data-shift-hours);
  }
}

@media (max-width: 400px) and (orientation: portrait){
  .app-shell{
    grid-template-columns:54px minmax(0,1fr);
  }

  .app-shell .logo-block{
    gap:3px;
    padding-left:2px;
    padding-right:2px;
  }

  .app-shell .logo-block .title{
    font-size:11px;
  }

  .app-shell .logo-block .subtitle{
    font-size:7px;
  }

  .app-shell .menu-btn{
    padding:0 1px;
    font-size:10px;
  }

  .app-shell .toolbar{
    padding-left:3px;
    padding-right:3px;
  }

  .app-shell .toolbar-time-row{
    grid-template-columns:38px 84px 54px 24px minmax(72px,1fr);
  }

  .app-shell #nowBtn,
  .app-shell #runDate,
  .app-shell #runHour,
  .app-shell #productSelect,
  .app-shell #productCategory{
    padding-left:3px !important;
    padding-right:3px !important;
    font-size:9px;
  }

  .app-shell .timeline-playback-controls,
  .app-shell .timeline-top-controls .compare-playback-controls{
    grid-template-columns:repeat(3,27px) !important;
  }

  .app-shell .timeline-playback-controls button,
  .app-shell .timeline-top-controls .compare-playback-controls button{
    width:27px !important;
    min-width:27px !important;
    height:27px !important;
    min-height:27px !important;
  }

  .app-shell .model-grid{
    grid-template-columns:54px repeat(5,minmax(0,1fr));
  }

  .app-shell .model-cell{
    font-size:8px;
  }
}

/* Keep radar portrait overrides after all shared compact-control rules. */
@media (max-width: 700px) and (orientation: portrait){
  .radar-page .radar-controls button,
  .radar-page .radar-controls select,
  .radar-page .radar-datetime-input,
  .radar-page .radar-datetime-picker-control,
  .radar-page .radar-now-button,
  .radar-page .radar-mode-button,
  .radar-page .radar-check,
  .radar-page .radar-wind-control,
  .radar-page .radar-inline-field,
  .radar-page .radar-shift-controls,
  .radar-page .radar-shift-controls button,
  .radar-page .timeline-playback-controls button{
    height:28px !important;
    min-height:28px !important;
  }

  .radar-pane-grid[data-pane-count]{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:none !important;
  }

  .radar-pane-grid[data-pane-count] > .radar-pane:nth-child(n){
    grid-column:1 !important;
    grid-row:auto !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-datetime-group{
    width:116px !important;
    min-width:0 !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-datetime-input{
    width:100% !important;
    min-width:0 !important;
    padding-left:1px !important;
    padding-right:0 !important;
    font-size:10px !important;
    text-align:left !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-datetime-picker-control,
  .radar-page .radar-controls .radar-time-row .radar-time-picker-toggle{
    width:16px !important;
    min-width:16px !important;
    flex-basis:16px !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-shift-controls button{
    min-width:0 !important;
    padding:0 !important;
    font-size:9px !important;
    line-height:1 !important;
    letter-spacing:0 !important;
  }

  .radar-page .radar-controls .radar-time-row{
    grid-template-columns:38px 116px minmax(0,1fr) !important;
    gap:2px !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-primary-now-button{
    width:38px !important;
    min-width:38px !important;
    padding:0 4px !important;
    font-size:10px !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-shift-controls{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  }

  .radar-page .radar-controls .radar-time-row .radar-shift-controls button[data-shift-minutes="-5"],
  .radar-page .radar-controls .radar-time-row .radar-shift-controls button[data-shift-minutes="10"]{
    display:none !important;
  }

  .radar-page .radar-controls .radar-time-row,
  .radar-page .radar-controls .radar-time-row .radar-primary-now-button,
  .radar-page .radar-controls .radar-time-row .radar-datetime-group,
  .radar-page .radar-controls .radar-time-row .radar-datetime-input,
  .radar-page .radar-controls .radar-time-row .radar-datetime-picker-control,
  .radar-page .radar-controls .radar-time-row .radar-time-picker-toggle,
  .radar-page .radar-controls .radar-time-row .radar-shift-controls,
  .radar-page .radar-controls .radar-time-row .radar-shift-controls button{
    height:26px !important;
    min-height:26px !important;
  }

  .radar-page .radar-controls .radar-playback-options-row,
  .radar-page .radar-controls .radar-playback-options-row .radar-inline-field,
  .radar-page .radar-controls .radar-playback-options-row select,
  .radar-page .radar-controls .radar-playback-options-row .timeline-playback-controls,
  .radar-page .radar-controls .radar-playback-options-row .timeline-playback-controls button,
  .radar-page .radar-controls .radar-playback-options-row .radar-auto-refresh-button,
  .radar-page .radar-pane-controls select{
    height:27px !important;
    min-height:27px !important;
  }

  .radar-page .radar-controls select,
  .radar-page .radar-controls .radar-mode-button,
  .radar-page .radar-pane-controls select{
    font-size:10px !important;
  }

  .radar-page .radar-controls .radar-playback-options-row select,
  .radar-page .radar-controls .radar-playback-options-row .radar-auto-refresh-button,
  .radar-page .radar-controls .radar-playback-options-row .timeline-playback-controls button{
    font-size:10px !important;
  }
}

/* Height fitting keeps original aspect ratios and leaves horizontal scrolling to the viewer. */
.app-shell #chartImages.fit-height{
  display:grid !important;
  grid-template-columns:repeat(var(--fit-columns,1),max-content) !important;
  width:max-content !important;max-width:none !important;align-items:start !important;
}
.app-shell #chartImages.fit-height > .compare-image-item,
.app-shell #chartImages.fit-height > .single-image-item{
  width:max-content !important;max-width:none !important;
  height:var(--fit-cell-height) !important;min-height:0 !important;
  align-items:flex-start !important;justify-content:flex-start !important;
}
.app-shell #chartImages.fit-height .compare-image-stack,
.app-shell #chartImages.fit-height .single-image-stack{
  display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;
  width:max-content !important;max-width:none !important;
}
.app-shell #chartImages.fit-height .nmsc-image-slot{width:max-content !important;max-width:none !important;}
.app-shell #chartImages.fit-height img{
  width:var(--fit-image-width) !important;height:var(--fit-image-height) !important;
  max-width:none !important;max-height:none !important;object-fit:contain;
}
.app-shell #chartImages.fit-height .compare-placeholder{height:var(--fit-cell-height);width:320px;}

/* Chart magnifier */
.chart-magnifier-button.active{background:#dbeafe;border-color:#3b82f6;color:#1d4ed8;}
.chart-magnifier-lens{position:fixed;z-index:60;border-radius:50%;border:2px solid #315882;box-shadow:0 4px 16px rgba(0,0,0,.35),inset 0 0 0 1px rgba(255,255,255,.7);background-color:#fff;background-repeat:no-repeat;pointer-events:none;}
.chart-magnifier-lens[hidden]{display:none;}
.magnifier-active #chartImages img{cursor:crosshair;touch-action:none;}

/* ===== v3.7: responsive toolbar rows, scroll hints, model timetable ===== */

/* Desktop and tablet: the time row and the product row are real rows. One line while both
   fit (responsive-layout.js measures it); otherwise the product row takes its own line. */
@media not all and (max-width: 700px) and (orientation: portrait){
  .app-shell .toolbar-left{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:8px 10px !important;
  }

  .app-shell .toolbar-time-row,
  .app-shell .toolbar-product-row{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
  }

  .app-shell .toolbar-time-row{
    flex:0 0 auto;
    flex-wrap:wrap;
  }

  .app-shell .toolbar-product-row{
    flex:1 1 auto;
    flex-wrap:nowrap;
  }

  .app-shell .toolbar-product-row #productCategory{
    flex:1 1 120px;
    width:auto;
    min-width:0;
    max-width:170px;
  }

  .app-shell .toolbar-product-row #productSelect{
    flex:1 1 150px;
    width:auto;
    min-width:0;
    max-width:230px;
  }

  .app-shell .toolbar-product-row .timeline-top-controls{
    flex:0 0 auto !important;
    width:auto !important;
    margin-left:auto !important;
  }

  .app-shell .toolbar-left.is-stacked{
    flex-wrap:wrap !important;
  }

  .app-shell .toolbar-left.is-stacked .toolbar-product-row{
    flex:1 1 100%;
    flex-wrap:wrap;
    row-gap:8px;
  }

  .app-shell .toolbar-left.is-tight .toolbar-product-row #productCategory{
    flex:1 1 40%;
    max-width:none;
  }

  .app-shell .toolbar-left.is-tight .toolbar-product-row #productSelect{
    flex:1 1 55%;
    max-width:none;
  }

  .app-shell .toolbar-left.is-tight .toolbar-product-row .timeline-top-controls{
    flex:1 1 100% !important;
  }

  .app-shell .toolbar-left.is-tight .timeline-top-controls .compare-controls{
    width:100%;
  }

  .app-shell .toolbar-left.is-tight .timeline-top-controls .timeline-playback-controls,
  .app-shell .toolbar-left.is-tight .timeline-top-controls .compare-playback-controls{
    margin-left:auto;
  }

  /* Scroll hint for the desktop sidebar; the mobile dock hint is unused here. */
  .app-shell .scroll-hint-dock{
    display:none;
  }
}

/* Timetable button */
.viewer-icon-button.schedule-button{
  width:auto;
  gap:4px;
  padding:0 10px 0 8px;
  border-color:#1f4f86;
  background:#1f4f86;
  color:#ffffff;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.viewer-icon-button.schedule-button:hover,
.viewer-icon-button.schedule-button:focus-visible{
  border-color:#163b66;
  background:#163b66;
  color:#ffffff;
}

.schedule-button svg{
  width:16px;
  height:16px;
}

/* ---------- Scroll hints ---------- */
.scroll-hint{
  position:sticky;
  bottom:0;
  z-index:3;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  width:100%;
  height:34px;
  margin-top:-44px;
  padding:0 0 4px;
  border:0;
  background:linear-gradient(to bottom,rgba(255,255,255,0),var(--hint-bg,#ffffff) 70%);
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s;
}

.has-more-below > .scroll-hint{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.scroll-hint-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:20px;
  border:1px solid #c9d8eb;
  border-radius:999px;
  background:#ffffff;
  color:#2b5d99;
  font-size:10px;
  line-height:1;
  box-shadow:0 2px 6px rgba(32,60,89,.18);
  animation:scroll-hint-nudge 1.6s ease-in-out 3;
}

.scroll-hint:hover .scroll-hint-arrow,
.scroll-hint:focus-visible .scroll-hint-arrow{
  background:#edf5ff;
  border-color:#8aaddb;
}

.scroll-hint:focus-visible{
  outline:none;
}

.scroll-hint-sidebar{
  --hint-bg:var(--bg-panel);
  flex-shrink:0;
  margin-left:-10px;
  margin-right:-10px;
  width:calc(100% + 20px);
  margin-bottom:-10px;
}

@keyframes scroll-hint-nudge{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(3px);}
}

@media (prefers-reduced-motion: reduce){
  .scroll-hint-arrow{animation:none;}
}

/* ---------- Mobile portrait: product controls move above the model picker ---------- */
@media (max-width: 700px) and (orientation: portrait){
  .app-shell{
    grid-template-rows:auto auto auto auto minmax(120px,1fr) auto auto;
  }

  .app-shell > .sidebar > .scroll-hint-sidebar{
    display:none;
  }

  .app-shell .toolbar,
  .app-shell .toolbar-left{
    display:contents !important;
  }

  .app-shell .menu-btn{
    height:34px;
    font-size:12px;
  }

  /* Time row: two lines with full-size targets instead of one cramped line. */
  .app-shell .toolbar-time-row{
    grid-column:2;
    grid-row:2;
    display:grid;
    grid-template-columns:46px minmax(0,1.35fr) minmax(0,1fr) 40px;
    grid-template-rows:32px 32px;
    gap:4px;
    padding:4px;
    border-bottom:1px solid var(--line);
    background:#ffffff;
  }

  .app-shell #nowBtn,
  .app-shell #runDate,
  .app-shell #runHour,
  .app-shell .time-toggle-stack,
  .app-shell .run-shift-group,
  .app-shell .run-shift-group button{
    height:32px !important;
    min-height:32px !important;
  }

  .app-shell #nowBtn{
    font-size:12px;
  }

  .app-shell #runDate,
  .app-shell #runHour{
    padding:3px 6px;
    font-size:13px;
  }

  .app-shell .time-mode{
    font-size:10px;
  }

  .app-shell .run-shift-group{
    grid-column:1 / -1;
    grid-row:2;
  }

  .app-shell .run-shift-group button,
  .app-shell .run-shift-group button::after{
    font-size:12px !important;
  }

  .app-shell .run-shift-group button[data-shift-hours]{
    font-size:0 !important;
  }

  .app-shell .run-shift-group button[data-shift-hours]::after{
    content:attr(data-shift-hours) "h";
  }

  .app-shell .run-shift-group button[data-shift-hours="6"]::after,
  .app-shell .run-shift-group button[data-shift-hours="12"]::after,
  .app-shell .run-shift-group button[data-shift-hours="24"]::after{
    content:"+" attr(data-shift-hours) "h";
  }

  /* Product dock: selects on one line, tools on the next, right above the models. */
  .app-shell .toolbar-product-row{
    grid-column:1 / -1;
    grid-row:6;
    display:grid;
    grid-template-columns:minmax(96px,var(--product-category-width,40%)) minmax(0,1fr);
    grid-template-rows:38px 38px;
    gap:6px;
    padding:6px 8px;
    border-top:1px solid var(--line);
    background:#f6f9fc;
  }

  .app-shell #productCategory,
  .app-shell #productSelect{
    grid-row:1;
    height:38px !important;
    min-height:38px !important;
    padding:4px 8px;
    border-radius:8px;
    font-size:13px;
  }

  .app-shell #productCategory{grid-column:1;}
  .app-shell #productSelect{grid-column:2;}

  .app-shell .toolbar-product-row .timeline-top-controls{
    grid-column:1 / -1;
    grid-row:2;
    display:flex;
    width:100% !important;
    height:38px !important;
    min-height:38px !important;
    margin:0 !important;
  }

  .app-shell .toolbar-product-row .timeline-top-controls .compare-controls{
    display:flex !important;
    width:100%;
    height:38px !important;
    min-height:38px !important;
    gap:6px !important;
    align-items:stretch !important;
  }

  .app-shell .toolbar-product-row .viewer-icon-button{
    width:40px;
    height:38px;
    border-radius:8px;
  }

  .app-shell .toolbar-product-row .viewer-icon-button svg{
    width:19px;
    height:19px;
  }

  .app-shell .toolbar-product-row .viewer-icon-button.schedule-button{
    width:auto;
    padding:0 10px 0 8px;
    font-size:13px;
  }

  .app-shell .toolbar-product-row .viewer-icon-button.schedule-button svg{
    width:17px;
    height:17px;
  }

  /* The fit toggle shows with a short label; the menu opens upward from the dock. */
  .app-shell .toolbar-product-row .viewer-fit-control{
    display:inline-flex;
    height:38px !important;
    border-radius:8px;
  }

  .app-shell .toolbar-product-row .viewer-fit-control .compare-fit-toggle{
    display:inline-flex !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 2px 0 8px !important;
    gap:5px;
    font-size:0 !important;
  }

  .app-shell .toolbar-product-row .viewer-fit-control .compare-fit-toggle input{
    width:16px !important;
    height:16px !important;
  }

  .app-shell .toolbar-product-row .viewer-fit-control .compare-fit-toggle span::after{
    content:"맞춤";
    font-size:12px;
    font-weight:800;
  }

  .app-shell .toolbar-product-row .viewer-fit-direction{
    width:26px;
    height:36px;
  }

  .app-shell .toolbar-product-row .fit-direction-menu{
    top:auto;
    bottom:calc(100% + 6px);
  }

  .app-shell .toolbar-product-row .timeline-playback-controls,
  .app-shell .toolbar-product-row .compare-playback-controls{
    display:grid !important;
    grid-template-columns:repeat(3,38px) !important;
    margin-left:auto;
  }

  .app-shell .toolbar-product-row .timeline-playback-controls button,
  .app-shell .toolbar-product-row .compare-playback-controls button{
    width:38px !important;
    min-width:38px !important;
    height:38px !important;
    min-height:38px !important;
    font-size:13px !important;
  }

  .app-shell .model-box{
    grid-row:7;
    position:relative;
  }

  .app-shell .model-cell{
    min-height:30px;
    font-size:10px;
  }

  .app-shell .scroll-hint-dock{
    --hint-bg:#ffffff;
    grid-column:1 / -1;
    height:30px;
    margin-top:-30px;
  }
}

@media (max-width: 400px) and (orientation: portrait){
  .app-shell .toolbar-time-row{
    grid-template-columns:42px minmax(0,1.35fr) minmax(0,1fr) 36px;
  }

  .app-shell #runDate,
  .app-shell #runHour{
    padding:3px 4px !important;
    font-size:12px;
  }

  .app-shell #productCategory,
  .app-shell #productSelect{
    padding:4px 6px !important;
    font-size:12px;
  }

  .app-shell .toolbar-product-row .viewer-icon-button{
    width:36px;
  }

  .app-shell .toolbar-product-row .timeline-playback-controls,
  .app-shell .toolbar-product-row .compare-playback-controls{
    grid-template-columns:repeat(3,36px) !important;
  }

  .app-shell .toolbar-product-row .timeline-playback-controls button,
  .app-shell .toolbar-product-row .compare-playback-controls button{
    width:36px !important;
    min-width:36px !important;
  }

  .app-shell .model-cell{
    font-size:9px;
    letter-spacing:-.4px;
  }
}

@media (max-width: 374px) and (orientation: portrait){
  .app-shell .toolbar-product-row .viewer-icon-button.schedule-button .schedule-button-text{
    display:none;
  }

  .app-shell .toolbar-product-row .viewer-icon-button.schedule-button{
    width:36px;
    padding:0;
  }
}

/* ---------- Model timetable dialog (board style) ---------- */
.schedule-dialog{
  --ink:#111111;
  --muted:#777777;
  --rule:#dddddd;
  --c00:#ffe98a;--c00-bar:#d9ad00;--c00-ink:#7a6000;
  --c06:#d3f2bd;--c06-bar:#5c9e38;--c06-ink:#3a6d20;
  --c12:#cfe5ff;--c12-bar:#3b7fcc;--c12-ink:#1d5799;
  --c18:#ffd7e5;--c18-bar:#cf5a84;--c18-ink:#9b2f55;
  position:fixed;
  inset:0;
  margin:auto;
  width:min(900px,calc(100% - 24px));
  max-height:calc(100dvh - 24px);
  padding:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid var(--ink);
  border-radius:0;
  color:var(--ink);
  background:#ffffff;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}

.schedule-dialog::backdrop{
  background:rgba(17,17,17,.35);
}

.schedule-dialog .mono,
.schedule-board-time,
.schedule-board-cycle,
.schedule-board-leads,
.schedule-axis-tick,
.schedule-bar-tag,
.schedule-now-label,
.schedule-table-cycle,
.schedule-table-leads,
.schedule-table-time,
.schedule-mark{
  font-family:"Noto Sans KR","Malgun Gothic","Apple SD Gothic Neo",sans-serif;
  font-variant-numeric:tabular-nums;
  letter-spacing:0;
}

.schedule-header{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 14px 11px 18px;
  border-bottom:3px solid var(--ink);
  background:#ffffff;
}

.schedule-title{
  margin-right:auto;
  font-size:18px;
  font-weight:900;
  letter-spacing:-.5px;
}

.schedule-mode{
  display:flex;
  border:1px solid var(--ink);
}

.schedule-mode button{
  height:26px;
  padding:0 10px;
  border:0;
  background:#ffffff;
  color:var(--ink);
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.schedule-mode button[aria-pressed="true"]{
  background:var(--ink);
  color:#ffffff;
}

.schedule-close{
  width:30px;
  height:30px;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:24px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
}

.schedule-close:hover{
  color:#555555;
}

/* Board */
.schedule-scroll-wrap{
  position:relative;
}

.schedule-scroll{
  overflow-x:auto;
  scrollbar-width:thin;
}

.schedule-scroll-more{
  display:none;
}

.schedule-board{
  width:100%;
  border-collapse:collapse;
}

.schedule-board td{
  padding:7px 10px;
  border-bottom:1px dotted #bbbbbb;
  font-size:13px;
  white-space:nowrap;
}

.schedule-board td:first-child{
  padding-left:18px;
}

.schedule-board-state{
  width:64px;
}

.schedule-state{
  display:inline-block;
  padding:1px 6px;
  border:1px solid transparent;
  font-size:11px;
  font-weight:700;
  font-style:normal;
  line-height:1.4;
}

.schedule-state.is-live{
  background:#f2c200;
  color:var(--ink);
}

.schedule-state.is-next{
  border-color:#bbbbbb;
  color:var(--muted);
}

.schedule-state.is-late{
  background:#c8261b;
  color:#ffffff;
}

.schedule-board-time{
  font-size:15px;
  font-weight:700;
}

.schedule-board-cycle .schedule-mark,
.schedule-table-cycle .schedule-mark{
  font-weight:700;
}

.schedule-mark{
  padding:0 3px;
  color:inherit;
  background:linear-gradient(transparent 38%,var(--mark) 38%,var(--mark) 92%,transparent 92%);
}

.schedule-mark.c00{--mark:var(--c00);}
.schedule-mark.c06{--mark:var(--c06);}
.schedule-mark.c12{--mark:var(--c12);}
.schedule-mark.c18{--mark:var(--c18);}

.schedule-board-source,
.schedule-board-leads,
.schedule-table-source{
  color:var(--muted);
  font-size:12px;
}

.schedule-board-model{
  font-weight:900;
}

/* How far a producing run has got: real data, so the same navy as real times. */
.schedule-board-leads.is-progress{
  color:#0f2f6b;
  font-weight:700;
}

.schedule-board-remain{
  width:100%;
  padding-right:18px !important;
  text-align:right;
  color:#555555;
  font-size:12px;
}

.schedule-board tr.is-late .schedule-board-remain{
  color:#c8261b;
  font-weight:700;
}

/* Tabs */
.schedule-tabs{
  display:flex;
  gap:18px;
  padding:14px 18px 0;
}

.schedule-tabs button{
  padding:0 0 4px;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:#999999;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.schedule-tabs button[aria-selected="true"]{
  border-bottom-color:var(--ink);
  color:var(--ink);
}

.schedule-panel{
  padding:12px 18px 4px;
}

.schedule-panel[hidden]{
  display:none;
}

/* Timeline */
.schedule-timeline{
  --label:86px;
  position:relative;
}

.schedule-axis,
.schedule-lane{
  display:grid;
  grid-template-columns:var(--label) minmax(0,1fr);
  align-items:center;
}

.schedule-axis{
  height:16px;
}

.schedule-axis-track,
.schedule-lane-track{
  position:relative;
  height:100%;
}

.schedule-axis-tick{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  color:var(--muted);
  font-size:10px;
}


.schedule-lane{
  height:27px;
}

.schedule-lane-name{
  overflow:hidden;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.schedule-lane-track{
  border-bottom:1px solid #eeeeee;
}

.schedule-bar{
  position:absolute;
  top:14px;
  height:8px;
  min-width:3px;
  padding:0;
  border:1.5px solid var(--bar,#111111);
  border-radius:0;
  background:var(--bar,#111111);
  cursor:pointer;
}

.schedule-bar.is-self{
  background:var(--tint,#ffffff);
}

.schedule-bar.c00{--bar:var(--c00-bar);--tint:var(--c00);}
.schedule-bar.c06{--bar:var(--c06-bar);--tint:var(--c06);}
.schedule-bar.c12{--bar:var(--c12-bar);--tint:var(--c12);}
.schedule-bar.c18{--bar:var(--c18-bar);--tint:var(--c18);}

.schedule-bar.is-hourly{
  top:15px;
  width:2px !important;
  min-width:2px;
  height:6px;
  border:0;
  background:#999999;
}

.schedule-bar:hover,
.schedule-bar:focus-visible,
.schedule-bar.is-selected{
  outline:2px solid var(--ink);
  outline-offset:1px;
  z-index:2;
}

.schedule-bar-tag{
  position:absolute;
  top:2px;
  font-size:9px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  pointer-events:none;
}

.schedule-bar-tag.c00{color:var(--c00-ink);}
.schedule-bar-tag.c06{color:var(--c06-ink);}
.schedule-bar-tag.c12{color:var(--c12-ink);}
.schedule-bar-tag.c18{color:var(--c18-ink);}

.schedule-bar-tag[hidden]{
  display:none;
}

.schedule-now{
  position:absolute;
  top:0;
  bottom:0;
  left:calc(var(--label) + (100% - var(--label)) * var(--now,0));
  width:0;
  border-left:1px solid #d00000;
  pointer-events:none;
  z-index:3;
}

.schedule-now-label{
  position:absolute;
  top:-1px;
  left:4px;
  padding:0 2px;
  background:#ffffff;
  color:#d00000;
  font-size:10px;
  font-weight:600;
}

.schedule-detail{
  min-height:18px;
  margin-top:10px;
  font-size:12px;
  font-weight:700;
}

/* Table */
.schedule-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.schedule-table th,
.schedule-table td{
  padding:6px 10px;
  border-bottom:1px dotted #bbbbbb;
  text-align:left;
  white-space:nowrap;
}

.schedule-table thead th{
  border-bottom:1px solid var(--ink);
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.schedule-table-model{
  vertical-align:top;
  font-weight:900;
}

.schedule-table-time .schedule-state{
  margin-left:8px;
  font-family:"Noto Sans KR",sans-serif;
}

/* Legend */
.schedule-legend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 18px;
  margin-top:8px;
  padding:10px 18px 14px;
  border-top:1px solid var(--rule);
  color:#555555;
  font-size:11px;
}

.schedule-legend-group{
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.schedule-legend-group .schedule-mark{
  margin-right:3px;
  font-size:11px;
}

.schedule-key{
  display:inline-block;
  width:16px;
  height:7px;
  margin-left:6px;
  border:1.5px solid var(--ink);
  background:var(--ink);
}

.schedule-key:first-child{margin-left:0;}
.schedule-key.is-self{background:#ffffff;}

.schedule-legend-note{
  margin-left:auto;
}

@media (max-width: 700px){
  .schedule-dialog{
    width:calc(100% - 12px);
    max-height:calc(100dvh - 12px);
  }

  .schedule-header{
    gap:10px;
    padding:10px 8px 9px 12px;
  }

  .schedule-title{
    font-size:16px;
  }

  .schedule-mode button{
    height:28px;
    padding:0 9px;
  }

  .schedule-board td{
    padding:7px 6px;
    font-size:12px;
  }

  .schedule-board td:first-child{
    padding-left:12px;
  }

  .schedule-board-state{
    width:auto;
  }

  .schedule-board-time{
    font-size:13px !important;
  }

  .schedule-board-remain{
    padding-right:12px !important;
  }

  /* Content wider than the screen scrolls sideways; a fade and ▶ say there is more. */
  .schedule-scroll-wrap.has-more-right::after{
    content:"";
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    width:36px;
    background:linear-gradient(to right,rgba(255,255,255,0),#ffffff 85%);
    pointer-events:none;
  }

  .schedule-scroll-wrap.has-more-right > .schedule-scroll-more{
    position:absolute;
    top:50%;
    right:3px;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    padding:0;
    border:1px solid var(--ink);
    background:#ffffff;
    color:var(--ink);
    font-size:9px;
    transform:translateY(-50%);
    cursor:pointer;
  }

  .schedule-tabs{
    padding:12px 12px 0;
  }

  .schedule-panel{
    padding:10px 12px 4px;
  }

  .schedule-panel.schedule-scroll-wrap{
    padding:10px 0 4px 12px;
  }

  .schedule-timeline{
    --label:68px;
  }

  .schedule-lane-name{
    font-size:10px;
  }

  .schedule-table{
    font-size:11px;
  }

  .schedule-table th,
  .schedule-table td{
    padding:6px 4px;
  }

  .schedule-table thead th{
    font-size:10px;
  }

  .schedule-table-source{
    font-size:10px !important;
  }

  .schedule-table-time .schedule-state{
    margin-left:4px;
    padding:0 3px;
    font-size:9px;
  }

  .schedule-table-wrap ~ .schedule-scroll-more{
    top:30px !important;
  }

  .schedule-legend{
    gap:6px 12px;
    padding:10px 12px 12px;
  }

  .schedule-legend-note{
    margin-left:0;
  }
}

/* Timetable filters, live board rows */
.schedule-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 14px;
  padding:9px 18px;
  border-bottom:1px solid var(--rule);
  font-size:12px;
}

.schedule-select select{
  height:26px;
  padding:0 24px 0 8px;
  border:1px solid var(--ink);
  border-radius:0;
  background:#ffffff;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}

.schedule-cycles{
  display:flex;
  border:1px solid var(--ink);
}

.schedule-cycles button{
  height:24px;
  padding:0 9px;
  border:0;
  border-left:1px solid var(--ink);
  background:#ffffff;
  color:var(--ink);
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.schedule-cycles button:first-child{border-left:0;}
.schedule-cycles button.c00{--mark:var(--c00);}
.schedule-cycles button.c06{--mark:var(--c06);}
.schedule-cycles button.c12{--mark:var(--c12);}
.schedule-cycles button.c18{--mark:var(--c18);}

.schedule-cycles button[aria-pressed="true"]{
  background:var(--mark,var(--ink));
  color:var(--ink);
}

.schedule-cycles button:not([class])[aria-pressed="true"]{
  color:#ffffff;
}

/* Ten rows show; the rest scroll. */
.schedule-board-wrap{
  max-height:351px;
  overflow-y:auto;
  scrollbar-width:auto;
}

.schedule-board td{
  height:35px;
}

.schedule-board-empty{
  padding:12px 18px !important;
  color:var(--muted);
  font-size:12px !important;
}

.schedule-board-time{
  color:#0f2f6b;
}

.schedule-board-time .is-est{
  color:#5c5c5c;
  font-weight:500;
}

.schedule-state.is-done{
  background:#9fdc7c;
  color:var(--ink);
}

.schedule-board tr.is-done{
  color:#555555;
}

.schedule-bar.is-dim,
.schedule-bar-tag.is-dim{
  opacity:.18;
}

.schedule-lane.is-dim .schedule-lane-name{
  color:#bbbbbb;
}

@media (max-width: 700px){
  .schedule-filters{
    gap:8px 10px;
    padding:8px 12px;
  }

  .schedule-filters{
    flex-wrap:nowrap;
  }

  /* The model select takes what the cycle buttons leave, so both fit on one line. */
  .schedule-select{
    flex:1 1 0;
    min-width:0;
  }

  .schedule-select select{
    width:100%;
    height:30px;
  }

  .schedule-cycles{
    flex:none;
  }

  .schedule-cycles button{
    height:28px;
    padding:0 8px;
  }

  .schedule-board-wrap{
    max-height:351px;
  }
}

.schedule-board-loading{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:351px;
  color:var(--muted);
  font-size:12px;
}

.schedule-spinner{
  width:26px;
  height:26px;
  border:3px solid #dddddd;
  border-top-color:var(--ink);
  border-radius:50%;
  animation:schedule-spin .8s linear infinite;
}

@keyframes schedule-spin{
  to{transform:rotate(360deg);}
}

@media (prefers-reduced-motion: reduce){
  .schedule-spinner{animation-duration:2.4s;}
}
