/* ═══════════ DESIGN TOKENS & TYPOGRAPHY ═══════════ */
:root {
  --mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: 'Pretendard', 'Outfit', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --r: 16px;
  --r-sm: 9px;
  --c1: #F2EFE6; --c2: #3E9B5A; --c3: #E0B02E; --c4: #D8453C;
  --k1: #3E8FCB; --k2: #E0B02E; --k3: #E07A33; --k4: #D8453C;
}

[data-theme="dark"] {
  --page: #080C13;
  --ink: #E9EFF6; --dim: rgba(233,239,246,.68); --faint: rgba(233,239,246,.45);
  --glass: rgba(255,255,255,.055); --glass-2: rgba(255,255,255,.085);
  --edge: rgba(255,255,255,.13); --edge-hi: rgba(255,255,255,.22);
  --shade: 0 10px 40px rgba(0,0,0,.45);
  --accent: #4FD6C1; --accent-bg: rgba(79,214,193,.14);
  --grid: rgba(255,255,255,.09); --c0: rgba(255,255,255,.10);
  --black-fill: #15151B; --black-line: #5D5D6A;
  --b1: #FF6B35; --b2: #FFB347; --b3: #2DD4BF; --b4: #5B57E8; --b-op: .30;
}

[data-theme="light"] {
  --page: #E9EEF5;
  --ink: #13202E; --dim: rgba(19,32,46,.70); --faint: rgba(19,32,46,.48);
  --glass: rgba(255,255,255,.58); --glass-2: rgba(255,255,255,.76);
  --edge: rgba(255,255,255,.85); --edge-hi: rgba(255,255,255,1);
  --shade: 0 8px 32px rgba(31,45,80,.12);
  --accent: #0E9384; --accent-bg: rgba(14,147,132,.12);
  --grid: rgba(19,32,46,.11); --c0: rgba(19,32,46,.10);
  --black-fill: #20202A; --black-line: #6E6E7C;
  --b1: #FF8A5B; --b2: #FFD79A; --b3: #7DD3C8; --b4: #A5B4FC; --b-op: .55;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page); color: var(--ink); font-family: var(--sans);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; position: relative; overflow-x: hidden;
}

/* Ambient Glow Field */
.field { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(72px); opacity: var(--b-op); }
.field b { position: absolute; border-radius: 50%; display: block; }
.b1 { width: 44vw; height: 44vw; left: -4%; top: 2%; background: var(--b1); }
.b2 { width: 38vw; height: 38vw; right: 2%; top: -4%; background: var(--b2); }
.b3 { width: 42vw; height: 42vw; left: 22%; bottom: -6%; background: var(--b3); }
.b4 { width: 34vw; height: 34vw; right: 8%; bottom: 6%; background: var(--b4); }

.wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 22px 16px 72px; }

/* Glassmorphism Container */
.glass {
  background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--shade), inset 0 1px 0 var(--edge-hi);
}

.card-inner {
  border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--edge);
}

/* Header */
header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  padding: 22px 26px; margin-bottom: 16px;
}
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 6px; font-weight: 600;
}
h1 {
  font-family: 'Outfit', var(--sans); font-size: 26px; font-weight: 750;
  letter-spacing: -.025em; margin: 0 0 4px; line-height: 1.25;
}
.sub { color: var(--dim); font-size: 14px; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; padding: 4px 9px;
  border: 1px solid var(--edge); border-radius: 20px; color: var(--faint); background: var(--glass-2);
}
.badge.warn { color: #C79A3E; border-color: rgba(199,154,62,.45); background: rgba(199,154,62,.1); }
.badge.live { color: #3E9B5A; border-color: rgba(62,155,90,.45); background: rgba(62,155,90,.12); }
.badge.gh-badge { color: var(--accent); border-color: rgba(79,214,193,.45); background: var(--accent-bg); }

.themeBtn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--edge); color: var(--ink); font-size: 16px;
  display: grid; place-items: center; backdrop-filter: blur(12px); transition: .15s;
}
.themeBtn:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

/* 📌 2-COLUMN DASHBOARD GRID WITH STICKY SIDEBAR */
.dashboard-main-grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start;
}

.command-sidebar {
  position: sticky; top: 16px; z-index: 10;
  max-height: calc(100vh - 32px); overflow-y: auto;
  border-color: rgba(79,214,193,0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.command-sidebar::-webkit-scrollbar { width: 4px; }
.command-sidebar::-webkit-scrollbar-thumb { background: var(--edge-hi); border-radius: 4px; }

.ctl-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* VERTICAL ACTION BUTTON GROUP IN STICKY SIDEBAR */
.action-btn-group-vertical {
  display: flex; flex-direction: column; gap: 10px;
}

.btn-step-1 {
  width: 100%; justify-content: center;
  background: var(--glass-2); border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 12px 14px;
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 8px; backdrop-filter: blur(10px);
}
.btn-step-1:hover {
  background: var(--accent-bg); border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,214,193,0.25);
}

.btn-step-2 {
  width: 100%; justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #30A894 100%);
  color: #080C13; font-family: var(--sans); font-size: 14px; font-weight: 800;
  padding: 13px 14px; border-radius: var(--r-sm); border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all 0.16s ease;
  box-shadow: 0 4px 20px rgba(79,214,193,0.35); letter-spacing: -0.01em;
}
.btn-step-2:hover {
  transform: translateY(-2px); box-shadow: 0 8px 28px rgba(79,214,193,0.55);
  filter: brightness(1.08);
}
.btn-step-2:active { transform: translateY(0); }

.gh-toast {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px; margin-bottom: 16px;
  background: rgba(79,214,193,0.08); border: 1px solid var(--accent); border-radius: var(--r-sm);
  animation: fadeIn 0.2s ease-in-out;
}
.gh-toast .spinner {
  width: 22px; height: 22px; border: 3px solid rgba(79,214,193,0.3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Panels & Sections */
.panel { margin-bottom: 20px; overflow: hidden; }
.phd {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 14px 22px; border-bottom: 1px solid var(--edge); background: rgba(255,255,255,0.02);
}
.phd h2 { font-family: 'Outfit', var(--sans); font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.01em; color: var(--ink); }
.phd .note { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.pbd { padding: 18px 22px; }

/* 8-Factor Environmental Multi-Index Banner */
.env-banner-8 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px;
}
.env-chip {
  padding: 12px 14px; border-radius: var(--r-sm); background: var(--glass-2); border: 1px solid var(--edge);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.env-chip:hover { border-color: var(--edge-hi); transform: translateY(-1px); }
.env-chip .tag { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.env-chip .val { font-family: var(--mono); font-size: 20px; font-weight: 700; margin: 2px 0; letter-spacing: -0.02em; }
.env-chip .sub { font-size: 11px; color: var(--dim); }

/* Region Selector Buttons */
.region-selector {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.region-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--glass-2); border: 2px solid var(--edge); color: var(--dim);
  font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 10px 14px;
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s ease;
}
.region-btn:hover {
  color: var(--ink); border-color: var(--edge-hi);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.region-btn.active {
  background: linear-gradient(135deg, rgba(56,189,248,.12), rgba(99,102,241,.12));
  border-color: var(--accent); color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--accent), 0 2px 10px rgba(56,189,248,.15);
}
.region-icon { font-size: 18px; }
.region-name { letter-spacing: .03em; }

/* Preset Unit Activity Buttons Grid - Compact 2-Column */
.act-presets {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 6px;
}
.act-btn {
  background: var(--glass-2); border: 1px solid var(--edge); color: var(--dim);
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; text-align: center; transition: all 0.14s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-btn:hover { color: var(--ink); border-color: var(--edge-hi); transform: translateY(-1px); }
.act-btn.active {
  background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.f label {
  display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px; font-weight: 700;
}
.seg { display: flex; flex-wrap: wrap; gap: 3px; }
.seg button {
  flex: 1 1 auto; background: var(--glass-2); border: 1px solid var(--edge); color: var(--dim);
  font-family: var(--sans); font-size: 11px; font-weight: 550; padding: 5px 7px; border-radius: 6px;
  cursor: pointer; transition: .14s; white-space: nowrap;
}
.seg button:hover { color: var(--ink); border-color: var(--edge-hi); }
.seg button[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.hint { font-size: 10.5px; color: var(--faint); margin: 3px 0 0; line-height: 1.35; }
.row { display: flex; gap: 6px; align-items: center; }
input[type=number], input[type=date], select {
  background: var(--glass-2); border: 1px solid var(--edge); color: var(--ink);
  font-family: var(--mono); font-size: 12.5px; padding: 5px 8px; border-radius: 6px; width: 100%;
}
input[type=date] { font-family: var(--sans); }
select { font-family: var(--sans); font-weight: 500; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ⚠️ SAFETY NEWS TIMELINE MODULE */
.news-box {
  display: flex; flex-direction: column; gap: 10px;
}
.news-card {
  padding: 14px 18px; border-radius: var(--r-sm); background: var(--glass-2);
  border: 1px solid var(--edge); transition: border-color 0.15s ease;
}
.news-card:hover { border-color: var(--k3); }
.news-card .hdr { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.news-card .news-title { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.news-card .news-title:hover { color: var(--accent); }
.news-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 12px; background: rgba(224,122,51,.2); color: var(--k3); border: 1px solid rgba(224,122,51,.4); }
.news-snippet { font-size: 12.5px; color: var(--dim); line-height: 1.5; margin: 4px 0 0; }
.news-meta { font-size: 11px; color: var(--faint); margin-top: 6px; font-family: var(--mono); }

/* SIDE-BY-SIDE COMPARISON BOX */
.comp-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 20px;
  background: var(--glass-2); border: 1px solid var(--edge-hi); border-radius: var(--r-sm);
}
.comp-col { display: flex; flex-direction: column; gap: 8px; }
.comp-title { font-size: 13.5px; font-weight: 700; font-family: var(--sans); letter-spacing: -0.01em; }
.comp-col.legacy .comp-title { color: #E0B02E; }
.comp-col.proposed .comp-title { color: var(--accent); }

.comp-card {
  padding: 16px; border-radius: var(--r-sm); border: 1px solid var(--edge); background: rgba(0,0,0,0.15);
}
.comp-card .head { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; font-family: var(--sans); }
.comp-card .desc { font-size: 13px; color: var(--dim); line-height: 1.55; }

/* SVG Charts */
svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--dim); font-family: var(--sans); }
.legend span { display: flex; align-items: center; }
.legend i { display: inline-block; width: 15px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.legend i.dot { width: 8px; height: 8px; border-radius: 50%; }

/* HOURLY RISK TIMELINE CARDS */
.timeline-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
}
.time-card {
  padding: 12px; border-radius: var(--r-sm); background: var(--glass-2); border: 1px solid var(--edge);
  display: flex; flex-direction: column; gap: 4px; text-align: center; transition: border-color 0.15s ease, transform 0.15s ease;
}
.time-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.time-card .t-hour { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--ink); }
.time-card .t-lvl { font-family: var(--sans); font-size: 12px; font-weight: 700; padding: 3px 6px; border-radius: 6px; margin: 2px 0; }
.time-card .t-sub { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }

/* Stats & Cards Grid */
.g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stat { padding: 18px 22px; border-bottom: 1px solid var(--edge); }
.stat:last-child { border-bottom: none; }
.stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.stat .v { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 3px; }
.stat .v small { font-size: 15px; font-weight: 500; color: var(--dim); margin-left: 3px; }
.stat .d { font-size: 12.5px; color: var(--dim); margin-top: 4px; line-height: 1.45; }

.verdict { padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--edge); }
.chip {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.chip.hatch {
  background: repeating-linear-gradient(45deg, var(--black-fill) 0 5px, var(--black-line) 5px 10px);
  color: #fff; border: 1px solid var(--black-line);
}
.verdict h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; font-family: var(--sans); }
.verdict p { margin: 0; font-size: 13.5px; color: var(--dim); line-height: 1.5; }

/* Measured Grid & Tables */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.cell { background: var(--glass-2); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 6px 8px; }
.cell.meas { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-bg); }
.cell span { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--faint); letter-spacing: .06em; }
.cell input { background: transparent; border: none; padding: 3px 0; font-size: 14.5px; font-weight: 600; width: 100%; font-family: var(--mono); }
.cell input:focus { outline: none; }

.tools { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tools button {
  background: var(--glass-2); border: 1px solid var(--edge); color: var(--dim); font-size: 12px;
  font-weight: 550; padding: 6px 13px; border-radius: 20px; cursor: pointer; transition: .14s; font-family: var(--sans);
}
.tools button:hover { color: var(--accent); border-color: var(--accent); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 580px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--edge); }
th { font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
td.num { font-family: var(--mono); text-align: right; }
tr.now td { background: var(--accent-bg); }

.slots { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 22px; }
.slot { font-family: var(--mono); font-size: 12px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--dim); }
.slot.ok { border-color: rgba(62,155,90,.6); color: #3E9B5A; background: rgba(62,155,90,.08); }
.slot.no { border-color: rgba(216,69,60,.55); color: #D8453C; background: rgba(216,69,60,.08); }

/* Footer */
footer { margin-top: 24px; padding: 22px 26px; font-size: 12.5px; color: var(--faint); line-height: 1.65; }
footer h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; font-weight: 600; }
footer ol { margin: 0; padding-left: 18px; }
footer li { margin-bottom: 6px; }
.caution {
  border-left: 3px solid #C79A3E; padding: 14px 0 14px 16px; margin: 16px 0; color: var(--dim);
  background: rgba(199,154,62,.06); border-radius: 0 8px 8px 0;
}

[hidden] { display: none !important; }
@media (max-width: 960px) {
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .command-sidebar { position: relative; top: 0; max-height: none; }
}
@media (max-width: 820px) {
  .comp-box { grid-template-columns: 1fr; }
}
@media (max-width: 620px) { h1 { font-size: 21px; } .stat .v { font-size: 24px; } .wrap { padding: 16px 12px 52px; } header { flex-direction: column; } }

/* ═══════════ MODAL POPUP & HIGH CONTRAST STYLES ═══════════ */
.btn-sub-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-sub-sm:hover {
  background: var(--glass);
  border-color: var(--accent);
  color: var(--accent);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-window {
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  background: #141C28;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 24px;
  background: #1E2838;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: #FFFFFF;
  background: var(--c4);
  border-color: var(--c4);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* ── 30일 DB 팝업: 지역(논산/양평) 선택 탭 ── */
.modal-region-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #16202E;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
}
.modal-region-label {
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: .3px;
}
.modal-region-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-region-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 96px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1B2433;
  color: #CBD5E1;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
}
.modal-region-btn small {
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  font-family: var(--mono);
}
.modal-region-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #F8FAFC;
}
.modal-region-btn.active {
  background: #38BDF8;
  border-color: #38BDF8;
  color: #0B1220;
}
.modal-region-btn.active small { color: rgba(11, 18, 32, 0.7); }

.modal-grid-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.modal-meta-box {
  background: #1B2433;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-meta-box label {
  font-size: 11.5px;
  color: #94A3B8;
  display: block;
  margin-bottom: 3px;
  font-weight: 500;
}
.modal-meta-box span {
  font-size: 14px;
  font-weight: 700;
  color: #38BDF8;
  font-family: var(--mono);
}

/* High Contrast Table with Sticky Header */
.modal-table-container {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #17202E;
}

.modal-table-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.modal-table-container th {
  position: sticky;
  top: 0;
  background: #232F42;
  color: #F8FAFC;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  text-align: left;
  z-index: 10;
}

.modal-table-container th.num, .modal-table-container td.num {
  text-align: right;
  font-family: var(--mono);
}

.modal-table-container td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
}

.modal-table-container tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.modal-table-container tr:hover td {
  background: rgba(56, 189, 248, 0.08);
  color: #FFFFFF;
}

.modal-table-container tr.now td {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #FFFFFF !important;
  font-weight: 700;
}



/* ══════════ ❄️ 한랭 스트레스 패널 (TB MED 508) ══════════ */
.cold-panel {
  margin-top: 16px; padding: 16px 18px; border-radius: 12px;
  background: rgba(56, 189, 248, .06);
  border: 1px solid rgba(56, 189, 248, .28);
}
.cold-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
}
.cold-item {
  background: var(--glass-2); border-radius: 9px; padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .07);
}
.cold-item label { display: block; font-size: 11.5px; color: var(--dim); font-weight: 600; margin-bottom: 3px; }
.cold-item b { display: block; font-size: 17px; font-family: var(--mono); font-weight: 700; color: var(--ink); }
.cold-item small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--faint); }
.cold-warn {
  margin: 12px 0 0; padding: 10px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.65;
  background: rgba(245, 158, 11, .10); border-left: 3px solid var(--k3); color: var(--ink);
}
.cold-src { margin: 12px 0 0; font-size: 11px; color: var(--faint); letter-spacing: .2px; }

/* ══════════ 📋 ARAS 척도 변환 패널 ══════════ */
.aras-score {
  padding: 18px; border-radius: 12px; background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, .09);
}
.aras-eq { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.aras-f, .aras-total {
  flex: 1 1 130px; min-width: 120px; text-align: center;
  padding: 12px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
}
.aras-f em, .aras-total em { display: block; font-style: normal; font-size: 11.5px; color: var(--dim); font-weight: 600; }
.aras-f b, .aras-total b { display: block; font-size: 30px; font-family: var(--mono); font-weight: 800; line-height: 1.25; color: var(--ink); }
.aras-f small, .aras-total small { display: block; font-size: 11.5px; color: var(--faint); }
.aras-x { display: flex; align-items: center; font-size: 21px; color: var(--dim); font-weight: 700; }
.aras-total { border-width: 2px; }
.aras-total.p-high { background: rgba(220, 38, 38, .16); border-color: var(--c4); }
.aras-total.p-high b, .aras-total.p-high small { color: var(--c4); }
.aras-total.p-mid { background: rgba(245, 158, 11, .14); border-color: var(--k3); }
.aras-total.p-mid b, .aras-total.p-mid small { color: var(--k3); }
.aras-total.p-low { background: rgba(74, 222, 128, .12); border-color: var(--c1); }
.aras-act { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.aras-res { margin: 8px 0 0; font-size: 12.5px; color: var(--dim); }
.aras-res b { font-family: var(--mono); }
.aras-res b.p-low { color: var(--c1); }
.aras-res b.p-mid { color: var(--k3); }
.aras-res b.p-high { color: var(--c4); }
.aras-h { margin: 20px 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.aras-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aras-tbl th {
  text-align: left; padding: 8px 10px; font-size: 11.5px; color: var(--dim); font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.aras-tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--ink); line-height: 1.55; }
.aras-pri, .aras-m4 {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.aras-pri.p1 { background: rgba(220, 38, 38, .18); color: var(--c4); }
.aras-pri.p2 { background: rgba(245, 158, 11, .18); color: var(--k3); }
.aras-pri.p3 { background: rgba(56, 189, 248, .16); color: var(--accent); }
.aras-pri.p4 { background: rgba(148, 163, 184, .16); color: var(--dim); }
.aras-pri.p5 { background: rgba(148, 163, 184, .10); color: var(--faint); }
.aras-m4 { background: rgba(255, 255, 255, .06); color: var(--dim); }
.aras-note { margin: 14px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.7; }

/* ══════════ 🎙️ FSB 실행 직전 안전브리핑 ══════════ */
.fsb-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
  padding: 14px 16px; margin-bottom: 16px; border-radius: 10px;
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .09);
}
.fsb-head label { display: block; font-size: 11px; color: var(--faint); font-weight: 600; margin-bottom: 2px; }
.fsb-head b { font-size: 13px; color: var(--ink); font-weight: 700; }

.fsb-step { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.fsb-step:first-of-type { border-top: none; padding-top: 0; }
.fsb-no {
  flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent);
  font-family: var(--mono); font-weight: 800; font-size: 14px;
}
.fsb-body { flex: 1 1 auto; min-width: 0; }
.fsb-body h4 { margin: 4px 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.fsb-body h4 small { font-size: 11.5px; font-weight: 500; color: var(--faint); margin-left: 4px; }

.fsb-ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.85; color: var(--ink); }
.fsb-ul li { margin-bottom: 2px; }
.fsb-ul.ask { list-style: none; padding-left: 0; }
.fsb-ul.ask li::before { content: "▸ "; color: var(--k2); font-weight: 700; }
.fsb-ul.say { list-style: none; padding-left: 0; color: var(--accent); font-weight: 600; }
.fsb-ul.chk { list-style: none; padding-left: 0; }
.fsb-ul.chk li::before { content: "□ "; color: var(--dim); font-family: var(--mono); }
.fsb-kv { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); }
.fsb-kv b { color: var(--ink); font-family: var(--mono); }

.fsb-go { padding: 14px 16px; border-radius: 10px; border-width: 2px; border-style: solid; }
.fsb-go b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.fsb-go p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink); }
.fsb-go.p-high { background: rgba(216, 69, 60, .14); border-color: var(--c4); }
.fsb-go.p-high b { color: var(--c4); }
.fsb-go.p-mid { background: rgba(224, 176, 46, .14); border-color: var(--k2); }
.fsb-go.p-mid b { color: var(--k2); }
.fsb-go.p-low { background: rgba(62, 155, 90, .14); border-color: var(--c2); }
.fsb-go.p-low b { color: var(--c2); }
.fsb-hard {
  margin: 10px 0 0; padding: 10px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.7;
  background: rgba(216, 69, 60, .10); border-left: 3px solid var(--c4); color: var(--ink);
}
.fsb-auth { margin: 10px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.7; }
.fsb-copied {
  display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 700; color: var(--c2);
  background: rgba(62, 155, 90, .14); border: 1px solid var(--c2);
}

/* ══════════ ARAS 산출 근거 분해 ══════════ */
.aras-break {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 16px;
}
.aras-bcol {
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px; padding: 12px 14px;
}
.aras-bcol h5 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.aras-bcol h5 small { font-weight: 500; color: var(--faint); }
.aras-btbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.aras-btbl td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: top; }
.aras-btbl tr.base td { background: rgba(255, 255, 255, .03); }
.aras-btbl tr.sum td { border-top: 1px solid rgba(255, 255, 255, .18); border-bottom: none; font-weight: 800; }
.aras-btbl .bl { width: 74px; color: var(--dim); font-weight: 600; white-space: nowrap; }
.aras-btbl .bd { width: 40px; text-align: center; font-family: var(--mono); font-weight: 700; }
.aras-btbl .bd.up { color: var(--c4); }
.aras-btbl .bd.dn { color: var(--c2); }
.aras-btbl .bd.zero { color: var(--faint); }
.aras-btbl tr.sum .bd { color: var(--accent); font-size: 15px; }
.aras-btbl .bw { color: var(--dim); line-height: 1.5; }

/* ═══════════ 30일 훈련 가능 캘린더 ═══════════ */

/* 지역 탭 */
.cal-region-tabs { display: flex; gap: 6px; }
.cal-region-tab {
  padding: 5px 14px; border-radius: 8px; border: 1px solid var(--edge);
  background: var(--glass); color: var(--dim); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.cal-region-tab.active {
  background: var(--accent-bg); color: var(--accent); border-color: var(--accent);
}
.cal-region-tab:hover { border-color: var(--accent); }

/* 통계 바 */
.cal-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.cal-stat-box {
  background: var(--glass-2); border: 1px solid var(--edge); border-radius: 10px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 4px;
}
.cal-stat-box .cs-label { font-size: 11px; color: var(--dim); font-weight: 600; letter-spacing: .04em; }
.cal-stat-box .cs-val { font-size: 22px; font-weight: 800; font-family: var(--mono); color: var(--ink); }
.cal-stat-box .cs-val small { font-size: 13px; font-weight: 500; color: var(--dim); }
.cal-stat-box .cs-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 4px; overflow: hidden;
}
.cal-stat-box .cs-bar-fill {
  height: 100%; border-radius: 3px; transition: width .5s ease;
}

/* 등급 분포 (가로 칩) */
.cal-dist { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.cal-dist-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
  font-family: var(--mono);
}
.cal-dist-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* 월 구분 헤더 */
.cal-month-hdr {
  grid-column: 1 / -1; padding: 8px 0 4px;
  font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -.01em;
}

/* 요일 헤더 */
.cal-dow-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 5px;
}
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--faint);
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 0;
}

/* 달력 그리드 */
.cal-grid-inner {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
}

/* 각 날짜 셀 */
.cal-cell {
  position: relative; border-radius: 10px; padding: 10px 8px 8px;
  background: var(--glass); border: 1px solid var(--edge);
  cursor: pointer; transition: all .22s ease; min-height: 88px;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.cal-cell::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 10px 0 0 10px; transition: background .2s;
}
.cal-cell:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2);
  border-color: var(--accent);
}
.cal-cell.selected {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(79,214,193,.25);
}
.cal-cell.today { border-color: var(--k2); }
.cal-cell.empty { visibility: hidden; }

/* 등급별 왼쪽 바 색상 */
.cal-cell.lv0::before { background: var(--c0); }
.cal-cell.lv1::before { background: var(--c1); }
.cal-cell.lv2::before { background: var(--c2); }
.cal-cell.lv3::before { background: var(--c3); }
.cal-cell.lv4::before { background: var(--c4); }
.cal-cell.lv5::before { background: var(--black-fill); }

/* 셀 내부 텍스트 */
.cal-date {
  font-size: 13px; font-weight: 700; font-family: var(--mono); color: var(--ink);
  display: flex; align-items: center; gap: 4px;
}
.cal-date .cal-today-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--k2); display: inline-block;
}
.cal-season { font-size: 12px; }
.cal-hours {
  font-size: 11.5px; font-weight: 600; color: var(--dim);
  font-family: var(--mono);
}
.cal-hours b { color: var(--accent); }
.cal-safe {
  font-size: 10.5px; color: var(--faint); font-family: var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-lv-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  font-family: var(--mono);
}

/* 반응형 */
@media (max-width: 900px) {
  .cal-grid-inner { grid-template-columns: repeat(7, 1fr); gap: 3px; }
  .cal-cell { min-height: 72px; padding: 8px 5px 6px; }
  .cal-date { font-size: 11.5px; }
  .cal-hours { font-size: 10.5px; }
  .cal-safe { display: none; }
  .cal-lv-badge { font-size: 9px; padding: 1px 4px; }
}
@media (max-width: 600px) {
  .cal-grid-inner { grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .cal-cell { min-height: 58px; padding: 6px 4px 5px; border-radius: 7px; }
  .cal-date { font-size: 10.5px; }
  .cal-season { font-size: 10px; }
  .cal-hours { font-size: 9.5px; }
  .cal-lv-badge { display: none; }
  .cal-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════ PRINT STYLES FOR OFFICIAL MILITARY REPORT ══════════ */
.print-header-block { display: none; }

@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  body {
    background: #ffffff !important; color: #000000 !important;
    font-size: 11pt; line-height: 1.4;
  }
  .field, .no-print, button, .themeBtn, .btn-step-1, .btn-sub-sm, header button, aside.panel {
    display: none !important;
  }
  .wrap { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .dashboard-grid { display: block !important; }
  .dashboard-content { width: 100% !important; }
  .glass, .panel {
    background: #ffffff !important; border: 1px solid #cccccc !important;
    box-shadow: none !important; backdrop-filter: none !important;
    border-radius: 6px !important; margin-bottom: 14px !important;
    color: #000000 !important;
  }
  .phd h2 { color: #000000 !important; font-size: 14pt !important; }
  .phd .note { color: #555555 !important; }

  /* 인쇄 전용 헤더 및 결재란 */
  .print-header-block {
    display: flex !important; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 14px;
  }
  .print-header-title h1 { margin: 0 0 4px; font-size: 16pt; font-weight: 800; color: #000; }
  .print-header-title p { margin: 0; font-size: 9.5pt; color: #444; }
  .print-approval-tbl { border-collapse: collapse; border: 1px solid #000; text-align: center; }
  .print-approval-tbl th, .print-approval-tbl td {
    border: 1px solid #000; padding: 3px 8px; font-size: 8.5pt; color: #000;
  }
  .print-approval-tbl th { background: #f0f0f0 !important; font-weight: 700; }

  /* 캘린더 인쇄 커스텀 */
  .cal-cell {
    border: 1px solid #bbb !important; background: #fafafa !important;
    color: #000000 !important; min-height: 54px !important;
    box-shadow: none !important;
  }
  .cal-date { color: #000 !important; font-size: 10pt !important; }
  .cal-hours { color: #333 !important; font-size: 9pt !important; }
  .cal-safe { color: #666 !important; font-size: 8pt !important; }
  .cal-stat-box {
    background: #f8f9fa !important; border: 1px solid #ddd !important;
    color: #000000 !important;
  }
  .cal-stat-box .cs-val { color: #000000 !important; }
  .cal-stat-box .cs-label { color: #444444 !important; }
  .cal-region-tabs { display: none !important; }
}

/* ══════════ MOBILE PWA & TOUCH RESPONSIVE STYLES ══════════ */
* {
  -webkit-tap-highlight-color: transparent;
}

button, .region-btn, .act-btn, .cal-cell, .news-card, .time-card {
  touch-action: manipulation;
}

button:active, .region-btn:active, .act-btn:active {
  transform: scale(0.97) !important;
  opacity: 0.9;
}

@media (max-width: 850px) {
  .wrap {
    padding: 12px 10px calc(48px + env(safe-area-inset-bottom));
  }

  /* Header Mobile Layout */
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 14px;
    margin-bottom: 12px;
    border-radius: 14px;
  }
  
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }
  
  h1 {
    font-size: 19px;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  
  .sub {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .badges {
    gap: 4px;
    margin-top: 8px;
  }

  .badge {
    font-size: 9.5px;
    padding: 3px 7px;
    border-radius: 12px;
  }

  header > div:last-child {
    align-items: stretch !important;
    width: 100%;
    margin-top: 4px;
  }

  header > div:last-child > div {
    display: flex !important;
    width: 100%;
    justify-content: space-between;
    gap: 6px !important;
  }

  .btn-step-1 {
    width: 100%;
    min-height: 44px;
    font-size: 13.5px;
    justify-content: center;
    border-radius: 10px;
  }

  .btn-sub-sm {
    flex: 1;
    min-height: 38px;
    font-size: 11.5px;
    padding: 5px 6px;
    justify-content: center;
    white-space: nowrap;
  }

  .themeBtn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  /* Main Split Grid to 1 Column */
  .dashboard-main-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .command-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    z-index: 1;
    margin-bottom: 12px;
  }

  /* Environmental Chips Grid on Mobile */
  .env-banner-8 {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }

  .env-chip {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .env-chip .tag {
    font-size: 9px;
  }

  .env-chip .val {
    font-size: 16px;
    margin: 1px 0;
  }

  .env-chip .sub {
    font-size: 10px;
  }

  /* Form & Controls Touch Friendly */
  .phd {
    padding: 12px 14px;
  }

  .phd h2 {
    font-size: 15px;
  }

  .pbd {
    padding: 14px 14px;
  }

  .region-selector {
    gap: 6px;
  }

  .region-btn {
    min-height: 42px;
    font-size: 12.5px;
    padding: 8px 10px;
  }

  .act-presets {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .act-btn {
    min-height: 38px;
    padding: 6px;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }

  /* Mobile Input font-size to prevent iOS Safari auto-zoom */
  input[type=number], input[type=date], select {
    font-size: 14px;
    padding: 8px 10px;
    min-height: 42px;
    border-radius: 8px;
  }

  .seg {
    gap: 4px;
  }

  .seg button {
    min-height: 38px;
    font-size: 11.5px;
    padding: 6px 8px;
    border-radius: 8px;
  }
}

@media (max-width: 640px) {
  /* Side-by-Side Box to Single Column */
  .comp-box {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .comp-card {
    padding: 12px 14px;
  }

  .comp-card .head {
    font-size: 15px;
  }

  .comp-card .desc {
    font-size: 12px;
  }

  /* Stats & Cards Grid */
  .g2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat {
    padding: 12px 14px;
  }

  .stat .v {
    font-size: 24px;
  }

  .verdict {
    padding: 14px;
    gap: 12px;
  }

  .chip {
    width: 48px;
    height: 48px;
    font-size: 18px;
    border-radius: 12px;
  }

  .verdict h3 {
    font-size: 16px;
  }

  .verdict p {
    font-size: 12.5px;
  }

  /* Hourly Cards Grid */
  .timeline-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 6px;
  }

  .time-card {
    padding: 8px 6px;
  }

  .time-card .t-hour {
    font-size: 11.5px;
  }

  .time-card .t-lvl {
    font-size: 10.5px;
    padding: 2px 4px;
  }

  /* News Card Mobile */
  .news-card {
    padding: 10px 12px;
  }

  .news-card .hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .news-card .news-title {
    font-size: 13px;
    line-height: 1.4;
  }

  .news-snippet {
    font-size: 11.5px;
  }

  /* Scrollable Table touch */
  .scroll {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
}
