/* Screen-size layouts for the base interface: wide, laptop, tablet, short and phone screens; reduced motion.
 * index.html loads the stylesheets in src/styles/ in a fixed order; later files override earlier ones. */
@media (min-width: 1700px) {
  .department-panel {
    width: 412px;
    right: 30px;
    top: calc(172px + var(--hud, 0px));
    bottom: 102px;
  }
  .panel-content {
    padding: 22px 25px;
  }
  .supplier-card {
    padding: 16px;
  }
  .panel-header {
    padding: 24px 25px 19px;
  }
  .supplier-details strong {
    font-size: 11px;
  }
  .supplier-name {
    font-size: 13px;
  }
  .mission-card {
    width: 375px;
  }
  .department-dock {
    top: calc(225px + var(--hud, 0px));
  }
  .dept-btn {
    width: 43px;
    height: 43px;
  }
  .world-tools {
    top: calc(174px + var(--hud, 0px));
    left: 22px;
  }
  .location-label {
    left: 92px;
    top: calc(230px + var(--hud, 0px));
  }
}
@media (max-width: 1200px) {
  .health-stat {
    min-width: 130px;
    padding-right: 23px;
    margin-right: 23px;
  }
  .health-strip {
    padding-left: 24px;
  }
  .health-note {
    display: none;
  }
  .health-stat strong {
    font-size: 18px;
  }
  .department-panel {
    width: 350px;
    right: 16px;
    top: 161px;
    bottom: 90px;
  }
  .panel-content {
    padding: 16px;
  }
  .panel-header {
    padding: 19px 17px 15px;
  }
  .panel-header h2 {
    font-size: 24px;
  }
  .panel-header p {
    font-size: 10px;
  }
  .department-dock {
    left: 15px;
  }
  .world-tools {
    left: 15px;
  }
  .location-label {
    left: 84px;
  }
  .mission-card {
    left: 84px;
    width: 292px;
    padding: 14px;
  }
  .mission-card p {
    font-size: 10px;
  }
  .footer-tip {
    display: none;
  }
  .shift-bar {
    gap: 20px;
  }
}
@media (max-width: 1000px) {
  .health-stat {
    min-width: 0;
    flex: 1;
    margin-right: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  .health-icon {
    width: 27px;
    height: 27px;
  }
  .health-icon .icon {
    width: 16px;
    height: 16px;
  }
  .health-stat strong {
    font-size: 16px;
  }
  .health-strip {
    padding-left: 20px;
  }
  .topbar {
    padding: 0 20px;
    gap: 20px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand-caption {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .career-heading {
    padding-left: 20px;
  }
  .top-actions {
    gap: 1px;
  }
  .top-actions .icon-btn {
    width: 34px;
    height: 34px;
  }
  .location-label span:last-child {
    display: none;
  }
  .mission-card {
    width: 260px;
  }
  .department-panel {
    width: 330px;
  }
  .focus-caption {
    display: none;
  }
  .focus-block {
    padding-left: 17px;
  }
  .shift-bar {
    gap: 15px;
  }
  .world-tools .view-switch button {
    padding: 8px 10px;
  }
}
@media (max-height: 770px) and (min-width: 761px) {
  .topbar {
    height: 64px;
  }
  .health-strip {
    top: 64px;
    height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .world-stage {
    top: calc(122px + var(--hud, 0px));
    bottom: 62px;
  }
  .world-tools {
    top: calc(138px + var(--hud, 0px));
  }
  .department-panel {
    top: 138px;
    bottom: 79px;
  }
  .location-label {
    top: calc(193px + var(--hud, 0px));
  }
  .department-dock {
    top: calc(192px + var(--hud, 0px));
    gap: 1px;
    padding: 5px;
  }
  .dept-btn {
    height: 32px;
    width: 32px;
  }
  .dept-btn .icon {
    width: 17px;
    height: 17px;
  }
  .mission-card {
    bottom: 79px;
    padding: 13px 16px;
  }
  .mission-card p {
    font-size: 10px;
  }
  .mission-card h3 {
    font-size: 12px;
  }
  .shift-bar {
    height: 62px;
  }
  .incident-banner {
    bottom: 76px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 61px;
    padding: 0 14px;
    gap: 15px;
  }
  .brand {
    font-size: 15px;
    letter-spacing: 0.5px;
  }
  .brand-caption {
    font-size: 6px;
    letter-spacing: 1.2px;
  }
  .brand-mark {
    transform: scale(0.8);
    width: 26px;
  }
  .career-heading {
    border: 0;
    padding: 0;
    gap: 3px;
  }
  .career-heading strong {
    font-size: 10px;
  }
  .career-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .top-actions {
    gap: 0;
  }
  .top-actions .icon-btn {
    width: 31px;
    min-width: 31px;
    height: 31px;
  }
  .top-actions .icon {
    width: 17px;
    height: 17px;
  }
  #help-btn {
    display: none;
  }
  .health-strip {
    top: 61px;
    height: 55px;
    padding: 9px 12px;
  }
  .health-stat {
    padding-right: 5px;
    margin-right: 7px;
    gap: 0;
  }
  .health-icon {
    display: none;
  }
  .health-stat .eyebrow {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .health-stat strong {
    font-size: 14px;
    margin-top: 3px;
  }
  .health-stat strong small {
    font-size: 8px;
    margin-left: 1px;
  }
  .world-stage {
    top: 116px;
    bottom: 65px;
  }
  .world-tools {
    top: 131px;
    left: 14px;
  }
  .view-switch button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .world-tools .glass {
    height: 38px;
  }
  .location-label {
    top: 181px;
    left: 18px;
    font-size: 7px;
  }
  .department-dock {
    top: 224px;
    left: 12px;
    padding: 4px;
    gap: 0;
    border-radius: 11px;
  }
  .dept-btn {
    width: 30px;
    height: 32px;
  }
  .dept-btn .icon {
    width: 16px;
    height: 16px;
  }
  .dept-btn::before {
    left: 40px;
  }
  .dock-separator {
    margin: 2px;
  }
  .department-panel {
    top: auto;
    bottom: 78px;
    right: 11px;
    left: 58px;
    width: auto;
    max-height: 59vh;
    border-radius: 14px;
  }
  .panel-header {
    padding: 15px 16px 12px;
  }
  .panel-header h2 {
    font-size: 22px;
  }
  .panel-header p {
    font-size: 10px;
    margin-top: 6px;
  }
  .panel-content {
    padding: 13px 15px;
  }
  .panel-header .eyebrow {
    font-size: 7px;
  }
  .mission-card {
    bottom: 81px;
    left: 65px;
    width: calc(100% - 81px);
    padding: 13px 15px;
  }
  .panel-open .mission-card {
    display: none;
  }
  .incident-banner,
  .panel-open .incident-banner {
    bottom: 76px;
    left: 50%;
    max-width: calc(100% - 24px);
    padding: 6px 12px 6px 6px;
    font-size: 11px;
    gap: 9px;
  }
  .incident-banner .toast-face,
  .incident-banner .toast-face canvas {
    width: 32px;
    height: 32px;
  }
  .shift-bar {
    height: 65px;
    padding: 0 12px;
    gap: 12px;
  }
  .time-controls {
    gap: 6px;
  }
  .time-controls .icon-btn {
    min-width: 27px;
    width: 27px;
  }
  .time-track {
    width: 56px;
  }
  .time-controls .eyebrow {
    font-size: 8px;
  }
  .speed-buttons {
    gap: 0;
    margin-left: 1px;
  }
  .speed-buttons button {
    padding: 6px 5px;
    font-size: 8px;
  }
  .focus-block {
    padding-left: 12px;
    gap: 7px;
  }
  .focus-block > .eyebrow {
    display: none;
  }
  .focus-dots {
    gap: 3px;
  }
  .focus-dots i {
    width: 5px;
    height: 11px;
  }
  .focus-dots.dense {
    gap: 2px;
  }
  .focus-dots.dense i {
    width: 3px;
  }
  .end-shift {
    min-width: 100px;
    font-size: 11px;
    height: 38px;
    padding: 9px 12px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .dialog {
    padding: 25px 22px;
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .dialog h2 {
    font-size: 26px;
    margin-right: 20px;
  }
  .dialog-intro {
    font-size: 11px !important;
  }
  .dialog > .close-dialog {
    top: 12px;
    right: 12px;
  }
  .report-grid {
    gap: 6px;
  }
  .report-stat {
    padding: 12px;
  }
  .report-stat strong {
    font-size: 20px;
  }
  .report-stat .eyebrow {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .report-score {
    width: 60px;
    height: 60px;
  }
  .report-score strong {
    font-size: 25px;
  }
  .report-top {
    gap: 12px;
  }
  .report-top h2 {
    font-size: 25px;
  }
  .journal-layout {
    grid-template-columns: 1fr;
  }
  .journal-causes {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    max-height: 170px;
  }
  .journal-causes .decision-card {
    min-width: 210px;
    margin: 0;
  }
  .journal-causes .empty-state {
    min-width: 210px;
  }
  .timeline {
    margin-top: 5px;
  }
  .skill-grid {
    grid-template-columns: 1fr;
  }
  .skill-card {
    display: grid;
    grid-template-columns: 25px 1fr;
    gap: 5px 12px;
    align-items: center;
  }
  .skill-card > .icon {
    margin: 0;
  }
  .skill-card p {
    grid-column: 2;
    margin: 0;
    min-height: 0;
  }
  .skill-card .btn {
    grid-column: 2;
    margin-top: 5px;
    justify-self: start;
  }
  .career-list {
    gap: 6px;
  }
  .career-stop {
    padding: 9px;
  }
  .career-stop strong {
    font-size: 9px;
  }
  .howto-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .welcome-open .world-stage {
    opacity: 0.75;
  }
  .toast-stack {
    right: 13px;
    left: 13px;
    bottom: 80px;
    max-width: none;
  }
  .toast {
    font-size: 10px;
    padding: 12px 14px;
  }
  .newgame-modes {
    gap: 7px;
  }
  .mode-option {
    padding: 13px;
  }
  .mode-option small {
    font-size: 9px;
  }
  .difficulty-options .btn {
    font-size: 10px;
    padding: 10px;
  }
  .dialog-footer .footnote {
    font-size: 8px;
  }
  .promotion {
    padding: 15px;
  }
  .promotion h3 {
    font-size: 15px;
  }
  .promotion p {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
