/* 화면 크기·움직임 줄이기·인쇄 설정. 다른 규칙을 덮어써야 하므로 맨 마지막에 불러온다. */
/* 태블릿 */
@media (max-width: 860px) {
  .header-inner { padding: 10px 0; flex-flow: row wrap; align-items: center; gap: 6px 12px; }
  .main-nav { order: 3; width: 100%; padding-bottom: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex-shrink: 0; }
  html { scroll-padding-top: 104px; }
}

/* 휴대전화 */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { width: calc(100% - 28px); }
  .brand small { display: none; }
  .title-block { padding-top: 30px; }
  .headline-figures { grid-template-columns: 1fr 1fr; }
  .headline-figures dd { font-size: 1.6rem; }
  .notice { flex-direction: column; gap: 4px; }
  .info-table th { width: 96px; padding: 10px; }
  .info-table td { padding: 10px; }
  .status-table thead { display: none; }
  .status-table tbody tr, .status-table tfoot tr { display: grid; grid-template-columns: 1fr auto; }
  .status-table tbody th, .status-table tfoot th { width: auto; border-bottom: 0; padding-bottom: 2px; }
  .status-table td:nth-child(2) { width: auto; border-bottom: 0; padding-bottom: 2px; }
  .status-table .bar-col { grid-column: 1 / -1; padding-top: 2px; }
  .status-table tfoot .bar-col { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .col-box + .col-box { border-left: 0; border-top: 1px solid var(--line); }
  .timeline-row, .timeline-labels { grid-template-columns: 1fr 1.3fr 1fr; }
  .seg { padding: 10px 4px; font-size: .8rem; }
  .timeline-labels { font-size: .7rem; }
  .check-list li { padding-left: 0; }
  .check-list li strong { position: static; display: block; width: auto; }
  .simulator-layout { grid-template-columns: 1fr; }
  .save-panel { padding: 18px 14px; }
  .save-button { width: 100%; }
  .allocation-controls { padding: 18px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .allocation-result { padding: 18px 14px; }
  .result-body { grid-template-columns: 138px 1fr; gap: 10px; }
  .donut { width: 138px; height: 138px; }
  .result-list div { align-items: flex-end; flex-direction: column; gap: 0; }
  .result-list dt { align-self: stretch; }
  .result-list dd { align-self: flex-end; }
}

@media (max-width: 600px) {
  .stat-row dd { font-size: 1.2rem; }
  .stat-row div { padding: 10px 8px; }
  .average-box { padding: 14px; grid-template-columns: 1fr; justify-items: center; }
  .average-box > div { width: 100%; }
  .vote-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .intro-facts li { grid-template-columns: 1fr; row-gap: 2px; }
  .intro-steps { grid-template-columns: 1fr; }
  .lake { padding-top: 30px; }
  .lake-inner { padding-left: 22px; }
  .lake-inner > *:not(.gauge) { max-width: none; }
  .lake-array { top: auto; bottom: 40px; right: -30px; width: 90%; height: 170px; opacity: .45; }
  .dam-plate { font-size: .74rem; }
  .dam-plate span + span::before { margin: 0 6px; }
  .cta-row { flex-direction: column; }
  .cta { text-align: center; }
  .intro-steps li + li { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 390px) {
  .account-user > span { max-width: 96px; }
  .account-button { padding: 5px 8px; }
  .result-body { grid-template-columns: 1fr; }
  .donut { width: 160px; height: 160px; margin: 0 auto; }
  .result-list div { flex-direction: row; align-items: center; gap: 8px; }
  .result-list dd { align-self: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .top-strip, .site-header, .skip-link { display: none; }
  .title-block { border-bottom-width: 2px; }
}
