* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overscroll-behavior: none; }
body { overflow: hidden; background: #000; font-family: 'Courier New', monospace; cursor: crosshair; }
canvas { display: block; }
canvas.game-canvas {
  position: fixed;
  inset: 0;
  touch-action: none;
  overscroll-behavior: none;
}

#loading {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 1000; transition: opacity 1s; text-align: center;
  padding: 0 20px;
}
#loading .loading-title {
  font-size: 48px; color: #c8a850; text-shadow: 0 0 20px rgba(200,168,80,0.5);
  letter-spacing: 8px; margin-bottom: 10px; width: 100%;
}
#loading .loading-subtitle {
  font-size: 16px; color: #7a8a9a; letter-spacing: 4px; margin-bottom: 40px;
}
.load-bar {
  width: 300px; height: 4px; background: #1a2a3a; border-radius: 2px; overflow: hidden;
}
.load-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #c8a850, #e8d080);
  transition: width 0.3s;
}
#load-text { color: #5a6a7a; font-size: 12px; margin-top: 15px; letter-spacing: 2px; }

#hud {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 10;
}

.hud-health {
  position: absolute; bottom: 30px; left: 30px;
}
body:not(.mobile-device) .hud-health,
body:not(.mobile-device) .hud-weapons,
.hud-mobile-stats {
  border: 1px solid rgba(168, 190, 214, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.84), rgba(12, 24, 38, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}
body:not(.mobile-device) .hud-health {
  padding: 12px 16px 14px;
}
.health-label { color: #8a9aaa; font-size: 11px; letter-spacing: 2px; margin-bottom: 5px; }
.health-bar {
  width: 250px; height: 8px; background: rgba(20,30,50,0.8);
  border: 1px solid rgba(100,120,140,0.3); border-radius: 2px;
}
.health-fill {
  height: 100%; background: linear-gradient(90deg, #2a8a2a, #4aca4a);
  border-radius: 1px; transition: width 0.3s;
}
.health-fill.warning { background: linear-gradient(90deg, #ca8a2a, #eaaa3a); }
.health-fill.critical { background: linear-gradient(90deg, #ca2a2a, #ea4a3a); }

.hud-weapons {
  position: absolute; bottom: 30px; right: 30px; text-align: left;
}
body:not(.mobile-device) .hud-weapons {
  min-width: 232px;
  padding: 12px 16px 10px;
}
.weapon-item {
  color: #7a8a9a; font-size: 12px; margin-bottom: 8px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 8px;
}
.weapon-item:last-child {
  margin-bottom: 0;
}
.weapon-item.active { color: #c8a850; }
.weapon-item .key {
  display: inline-block; width: 20px; height: 20px; line-height: 20px;
  text-align: center; border: 1px solid currentColor; border-radius: 3px;
  font-size: 10px;
}
.weapon-name {
  min-width: 0;
}
.reload-bar {
  width: 80px; height: 3px; background: rgba(30,40,60,0.8);
  display: block; margin-left: auto; flex: 0 0 80px;
  border-radius: 1px;
}
.reload-fill {
  height: 100%; background: #c8a850; border-radius: 1px; transition: width 0.05s linear;
}

.hud-minimap {
  position: absolute; top: 70px; right: 30px;
}
.minimap-canvas {
  border: 1px solid rgba(100,120,140,0.3);
  background: rgba(10,20,40,0.7);
  border-radius: 4px;
}

.hud-alert {
  position: absolute; top: 25%; left: 50%; transform: translate(-50%, -50%);
  display: inline-block;
  max-width: min(90vw, 520px);
  width: fit-content;
  color: #9f2218; font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; letter-spacing: 2px; line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  isolation: isolate;
  opacity: 0; transition: opacity 0.3s;
}

.hud-alert::before,
.hud-alert::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-align: inherit;
  white-space: pre-wrap;
}

.hud-alert::before {
  color: transparent;
  -webkit-text-stroke: 5px rgba(0, 0, 0, 0.96);
  filter: blur(1px);
  z-index: -2;
}

.hud-alert::after {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 244, 214, 0.94);
  z-index: -1;
}

.hud-kills {
  position: static;
}
.kills-value { color: #aabaca; font-size: 18px; }
.kills-label { color: #5a6a7a; font-size: 10px; letter-spacing: 2px; }

.hud-mobile-stats {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 164px;
  display: flex;
  justify-content: center;
  padding: 10px 14px 8px;
  transform: translateX(-50%);
}

.hud-mobile-stats .hud-kills {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.hud-mobile-stats .kills-value {
  color: #f4df95;
  font-size: 22px;
  line-height: 1;
  min-height: 1em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hud-mobile-stats .kills-label {
  font-size: 10px;
  line-height: 1.1;
  min-height: 1.1em;
  color: #d7e3ef;
  letter-spacing: 1.4px;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.hud-audio {
  position: absolute;
  top: 18px;
  left: 18px;
  pointer-events: auto;
}

.hud-audio-toggle {
  width: 62px;
  height: 34px;
  border: 1px solid rgba(168, 190, 214, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.84), rgba(12, 24, 38, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  color: #d7e3ef;
  font-size: 9px;
  letter-spacing: 1.6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.hud-audio.is-open .hud-audio-toggle {
  color: #f4df95;
  border-color: rgba(200, 168, 80, 0.64);
}

.hud-audio-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: 52px;
  height: 164px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  border: 1px solid rgba(168, 190, 214, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.84), rgba(12, 24, 38, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.hud-audio-panel[hidden] {
  display: none;
}

.hud-audio input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  accent-color: #c8a850;
  background: transparent;
  cursor: pointer;
  transform: rotate(-90deg);
  touch-action: none;
}

.hud-audio input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(138, 154, 170, 0.34);
}

.hud-audio input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 1px solid rgba(232, 216, 160, 0.72);
  border-radius: 50%;
  background: #f4df95;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
}

.hud-audio input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(138, 154, 170, 0.34);
}

.hud-audio input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(232, 216, 160, 0.72);
  border-radius: 50%;
  background: #f4df95;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
}

/* crosshair CSS removed — replaced by 3D aim circle */

#gameOver {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(5,10,20,0.9); display: none; flex-direction: column;
  align-items: center; justify-content: center; z-index: 100; text-align: center;
  padding: 0 20px;
}
#gameOver h2 { color: #ca3a3a; font-size: 42px; letter-spacing: 6px; margin-bottom: 20px; width: 100%; }
#gameOver .final-score { color: #c8a850; font-size: 24px; margin-bottom: 30px; white-space: pre-line; }
#gameOver .restart-btn {
  color: #8a9aaa; font-size: 14px; letter-spacing: 3px;
  border: 1px solid #3a4a5a; padding: 12px 30px; cursor: pointer;
  background: transparent;
  font: inherit;
  pointer-events: all; transition: all 0.3s;
  appearance: none;
  -webkit-appearance: none;
}
#gameOver .restart-btn:hover { color: #c8a850; border-color: #c8a850; }

#instructionsModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 18, 0.82);
  z-index: 900;
}

#instructionsModal .instructions-panel {
  width: min(92vw, 720px);
  border: 1px solid rgba(168, 190, 214, 0.36);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.94), rgba(12, 24, 38, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.46);
  padding: 24px 24px 22px;
  text-align: left;
}

#instructionsModal .instructions-text {
  color: #d6e3f0;
  font-size: clamp(15px, 1.55vw, 19px);
  line-height: 1.55;
  margin-bottom: 12px;
}

#instructionsModal .instructions-start-btn {
  margin-top: 10px;
  color: #d6e3f0;
  font-size: 13px;
  letter-spacing: 2.2px;
  border: 1px solid rgba(200, 168, 80, 0.72);
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  background: rgba(17, 31, 48, 0.74);
  font: inherit;
  pointer-events: all;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

#instructionsModal .instructions-start-btn:hover {
  color: #f4df95;
  border-color: #f4df95;
  background: rgba(22, 38, 58, 0.9);
}

body.mobile-device .instructions-desktop-only {
  display: none;
}

#timeOfDayModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.92) 0%, rgba(2, 6, 12, 0.94) 100%);
  z-index: 950;
}

#timeOfDayModal .tod-panel {
  width: min(92vw, 720px);
  border: 1px solid rgba(168, 190, 214, 0.36);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.94), rgba(12, 24, 38, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.46);
  padding: 28px 24px 26px;
  text-align: center;
}

#timeOfDayModal .tod-title {
  color: #c8a850;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 18px rgba(200, 168, 80, 0.35);
}

#timeOfDayModal .tod-sub {
  color: #8a9aaa;
  font-size: clamp(14px, 1.8vw, 16px);
  letter-spacing: 2px;
  margin-bottom: 22px;
}

#timeOfDayModal .tod-button-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

#timeOfDayModal .tod-btn {
  flex: 1 1 220px;
  max-width: 280px;
  min-height: 140px;
  color: #d6e3f0;
  font-size: 14px;
  letter-spacing: 2.4px;
  border: 1px solid rgba(200, 168, 80, 0.72);
  border-radius: 10px;
  padding: 18px 16px;
  cursor: pointer;
  background: rgba(17, 31, 48, 0.74);
  font: inherit;
  pointer-events: all;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#timeOfDayModal .tod-btn:hover {
  color: #f4df95;
  border-color: #f4df95;
  background: rgba(22, 38, 58, 0.92);
  transform: translateY(-2px);
}

#timeOfDayModal .tod-btn .tod-btn-label {
  font-weight: 600;
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: 3px;
}

#timeOfDayModal .tod-btn .tod-btn-desc {
  color: #8a9aaa;
  font-size: 13px;
  letter-spacing: 1.2px;
  line-height: 1.55;
  max-width: 230px;
}

#timeOfDayModal .tod-btn--day {
  background: linear-gradient(180deg, rgba(40, 64, 96, 0.78), rgba(22, 38, 58, 0.82));
}

#timeOfDayModal .tod-btn--night {
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.88), rgba(4, 8, 18, 0.92));
}

@media (max-width: 520px) {
  #timeOfDayModal .tod-panel {
    padding: 22px 16px 18px;
  }
  #timeOfDayModal .tod-btn {
    min-height: 110px;
    padding: 14px 12px;
  }
}

@media (max-width: 520px) {
  #loading .loading-title {
    font-size: clamp(34px, 10vw, 48px);
    letter-spacing: clamp(4px, 1.8vw, 8px);
  }

  #loading .loading-subtitle {
    font-size: 14px;
    letter-spacing: clamp(2px, 1vw, 4px);
  }

  #gameOver h2 {
    font-size: clamp(30px, 9vw, 42px);
    letter-spacing: clamp(3px, 1.4vw, 6px);
  }

  #gameOver .final-score {
    font-size: 20px;
  }

  #instructionsModal .instructions-panel {
    padding: 18px 16px 16px;
  }

  #instructionsModal .instructions-text {
    line-height: 1.5;
    margin-bottom: 10px;
  }

  #instructionsModal .instructions-start-btn {
    width: 100%;
    text-align: center;
  }
}

body.mobile-device {
  --mobile-bottom-inset: max(18px, env(safe-area-inset-bottom));
  --mobile-control-size: min(34vw, 148px);
  --mobile-control-radius: min(17vw, 74px);
  --mobile-thumb-size: calc(var(--mobile-control-size) * 0.42);
  cursor: default;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body.mobile-device * {
  -webkit-user-select: none;
  user-select: none;
}

#mobileControls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding:
    0 max(18px, env(safe-area-inset-right))
    var(--mobile-bottom-inset)
    max(18px, env(safe-area-inset-left));
  pointer-events: none;
}

body.mobile-device #mobileControls {
  display: flex;
}

.mobile-left-cluster,
.mobile-right-cluster {
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.mobile-right-cluster {
  align-items: flex-end;
  gap: 14px;
}

.mobile-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  pointer-events: auto;
}

.joystick {
  position: relative;
  width: var(--mobile-control-size);
  height: var(--mobile-control-size);
  border-radius: 50%;
  border: 1px solid rgba(130, 156, 184, 0.45);
  background:
    radial-gradient(circle at 35% 30%, rgba(78, 104, 132, 0.34), rgba(18, 28, 42, 0.66) 62%, rgba(8, 12, 18, 0.84) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(205, 223, 242, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  touch-action: none;
}

.joystick::before,
.joystick::after {
  content: '';
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.joystick::before {
  width: 72%;
  height: 72%;
  border: 1px solid rgba(160, 186, 214, 0.14);
}

.joystick::after {
  width: 20%;
  height: 20%;
  border: 1px solid rgba(200, 220, 238, 0.2);
  background: rgba(200, 220, 238, 0.04);
}

.joystick.active {
  border-color: rgba(200, 168, 80, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(232, 216, 160, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.34);
}

.joystick-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mobile-thumb-size);
  height: var(--mobile-thumb-size);
  border-radius: 50%;
  border: 1px solid rgba(220, 232, 244, 0.24);
  background:
    radial-gradient(circle at 32% 28%, rgba(226, 236, 246, 0.68), rgba(120, 146, 174, 0.62) 42%, rgba(36, 52, 68, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out;
  pointer-events: none;
}

.joystick.active .joystick-thumb {
  transition: none;
}

.mobile-fire-btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(146, 168, 192, 0.42);
  background:
    linear-gradient(180deg, rgba(40, 58, 76, 0.9), rgba(10, 18, 28, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.28);
  color: #d8e6f4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
}

.mobile-fire-btn svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mobile-fire-btn.cooldown {
  color: #7d8b99;
  border-color: rgba(110, 126, 144, 0.32);
}

.mobile-fire-btn.is-pressed {
  transform: translateY(1px) scale(0.97);
  border-color: rgba(200, 168, 80, 0.85);
  color: #f1d995;
}

body.mobile-device .hud-health {
  top: 18px;
  right: 18px;
  left: auto;
  bottom: auto;
  width: 122px;
  text-align: right;
}

body.mobile-device .hud-weapons {
  display: none;
}

  body.mobile-device .hud-mobile-stats {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: auto;
    bottom: var(--mobile-bottom-inset);
    left: 50%;
    width: 102px;
    padding: 8px 8px 6px;
    border-radius: 14px;
    transform: translateX(-50%);
  }

body.mobile-device .hud-mobile-stats .hud-kills {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  transform: none;
  text-align: center;
  gap: 4px;
}

body.mobile-device .hud-mobile-stats .kills-value {
  color: #f4df95;
  font-size: 16px;
  line-height: 1;
  min-height: 1em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.mobile-device .hud-mobile-stats .kills-label {
  font-size: 9px;
  line-height: 1.1;
  min-height: 1.1em;
  letter-spacing: 1.2px;
  white-space: nowrap;
  color: #d7e3ef;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

body.mobile-device .hud-audio {
  top: 64px;
  right: 18px;
  left: auto;
}

body.mobile-device .hud-audio-toggle {
  width: 56px;
  height: 32px;
  font-size: 8px;
  letter-spacing: 1.3px;
}

body.mobile-device .hud-audio-panel {
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 172px;
  padding: 10px 0;
}

body.mobile-device .hud-audio input[type="range"] {
  width: 28px;
  height: 124px;
  transform: none;
  direction: rtl;
  writing-mode: vertical-lr;
}

body.mobile-device .hud-audio input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: 0;
}

body.mobile-device .hud-audio input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
}

body.mobile-device .hud-minimap {
  top: 18px;
  left: 18px;
  right: auto;
}

body.mobile-device .hud-health .health-bar {
  width: 100%;
}

body.mobile-device .hud-minimap canvas {
  width: 96px;
  height: 96px;
}

@media (max-width: 900px) {
  body.mobile-device .hud-health { width: 114px; }
  body.mobile-device .hud-mobile-stats { width: 96px; }
  body.mobile-device .health-label { font-size: 9px; letter-spacing: 1.2px; }
  body.mobile-device .hud-mobile-stats .kills-value { font-size: 15px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  body.mobile-device {
    --mobile-control-size: min(24vw, 132px);
    --mobile-control-radius: min(12vw, 66px);
  }

  body.mobile-device .hud-health {
    top: 12px;
    width: 128px;
  }

  body.mobile-device .hud-audio {
    top: 52px;
    right: 12px;
  }

  body.mobile-device .hud-mobile-stats {
    top: auto;
    bottom: var(--mobile-bottom-inset);
    width: 108px;
    padding: 8px 10px 6px;
  }

  body.mobile-device .hud-mobile-stats .kills-value {
    font-size: 16px;
  }

  body.mobile-device .hud-minimap {
    top: 12px;
    left: 12px;
  }

  body.mobile-device .hud-minimap canvas {
    width: 86px;
    height: 86px;
  }
}

@media (orientation: landscape) {
  body.mobile-device .hud-mobile-stats {
    top: auto;
    bottom: calc(var(--mobile-bottom-inset) + var(--mobile-control-size) + 12px);
    left: calc(max(18px, env(safe-area-inset-left)) + var(--mobile-control-radius));
    width: 108px;
    padding: 8px 10px 6px;
    transform: translateX(-50%);
  }
}


/* Search-friendly pre-game landing content */
#timeOfDayModal .tod-panel {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tod-hero {
  margin-bottom: 24px;
}

.tod-eyebrow {
  color: #8ea5bc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.6px;
  margin-bottom: 8px;
}

#timeOfDayModal .tod-title {
  margin-bottom: 8px;
}

.tod-subtitle {
  max-width: 580px;
  margin: 0 auto;
  color: #d6e3f0;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.55;
}

.tod-section-title {
  color: #c8a850;
  font-size: clamp(20px, 2.8vw, 25px);
  letter-spacing: 2.4px;
  margin-bottom: 7px;
}

.tod-seo {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(168, 190, 214, 0.24);
  color: #c8d5e2;
  text-align: left;
}

.tod-seo > h2 {
  color: #e8d080;
  font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: 1.8px;
  margin-bottom: 12px;
}

.tod-seo > p {
  color: #b9c9d8;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.75;
}

.tod-feature-grid,
.tod-guide-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.tod-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tod-guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tod-feature-grid article,
.tod-guide-grid section {
  padding: 15px;
  border: 1px solid rgba(168, 190, 214, 0.2);
  border-radius: 10px;
  background: rgba(8, 18, 30, 0.48);
}

.tod-seo h3 {
  color: #d9c173;
  font-size: 15px;
  letter-spacing: 1.3px;
  margin-bottom: 9px;
}

.tod-seo article p,
.tod-seo li,
.tod-seo dt,
.tod-seo dd {
  color: #aebfce;
  font-size: 14px;
  line-height: 1.7;
}

.tod-seo ul {
  padding-left: 18px;
}

.tod-seo li + li {
  margin-top: 5px;
}

.tod-seo dt {
  color: #d6e3f0;
  font-weight: 700;
}

.tod-seo dd + dt {
  margin-top: 9px;
}

body.mobile-device.pre-game-scroll-enabled {
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

body.mobile-device.pre-game-scroll-enabled #timeOfDayModal,
body.mobile-device.pre-game-scroll-enabled #timeOfDayModal .tod-panel,
body.mobile-device.pre-game-scroll-enabled #instructionsModal,
body.mobile-device.pre-game-scroll-enabled #instructionsModal .instructions-panel {
  touch-action: pan-y;
}

@media (max-width: 680px), (max-height: 760px) {
  #timeOfDayModal {
    height: 100dvh;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  #timeOfDayModal .tod-panel {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
  }

  .tod-feature-grid,
  .tod-guide-grid {
    grid-template-columns: 1fr;
  }

  .tod-seo {
    margin-top: 20px;
    padding-top: 18px;
  }
}
