html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #9fb8cc;
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
}
canvas {
  display: block;
  touch-action: none;
}
#counter {
  position: fixed;
  top: 12px;
  left: 12px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(8, 20, 30, 0.5);
  backdrop-filter: blur(6px);
  color: #eef4f7;
  font-size: 14px;
  letter-spacing: 0.4px;
  pointer-events: none;
}
#ocean-audio-toggle {
  position: fixed;
  top: 52px;
  left: 12px;
  z-index: 10;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 20, 30, 0.5);
  backdrop-filter: blur(6px);
  color: #eef4f7;
  font: 600 12px/1.2 inherit;
  letter-spacing: 0.4px;
  cursor: pointer;
}
#ocean-audio-toggle:hover {
  background: rgba(8, 20, 30, 0.68);
}
#ocean-audio-toggle:focus-visible {
  outline: 2px solid #7dd9e6;
  outline-offset: 2px;
}
#ocean-audio-toggle[aria-pressed="true"] {
  border-color: rgba(125, 217, 230, 0.55);
}
#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  pointer-events: none;
}
#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 0.5px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%);
}
#crosshair::before {
  width: 16px;
  height: 1px;
}
#crosshair::after {
  width: 1px;
  height: 16px;
}
#panel {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 210px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(8, 20, 30, 0.55);
  backdrop-filter: blur(6px);
  color: #dfeaf0;
  font-size: 12px;
  user-select: none;
}
#panel-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 13px/1 inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
}
#panel-caret {
  opacity: 0.7;
  transition: transform 0.15s ease;
}
#panel.collapsed #panel-caret {
  transform: rotate(-90deg);
}
#panel-body {
  margin-top: 8px;
}
#panel.collapsed #panel-body {
  display: none;
}
#status {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.5;
  opacity: 0.85;
}
#status.error {
  color: #ff9a9a;
  opacity: 1;
}
#panel label {
  display: block;
  margin: 10px 0 3px;
  display: flex;
  justify-content: space-between;
}
#panel label span:last-child {
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
#panel input[type="range"] {
  width: 100%;
  accent-color: #3fb6c9;
}
#panel .help {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
#panel .help-title {
  font-weight: 600;
  opacity: 0.85;
  margin: 8px 0 4px;
}
#panel .help-title:first-child {
  margin-top: 0;
}
#panel .help ul {
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0.7;
  line-height: 1.7;
}
#panel kbd {
  display: inline-block;
  min-width: 14px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  font: 11px/1.4 ui-monospace, monospace;
  text-align: center;
}
#panel .weather {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
#panel .weather #weather-name {
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}
#panel .weather .check {
  margin: 8px 0;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  cursor: pointer;
}
#panel .weather .check input {
  accent-color: #3fb6c9;
}
#panel .weather button {
  width: 100%;
  padding: 6px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: 600 12px/1 inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
}
#panel .weather button:hover {
  background: rgba(255, 255, 255, 0.16);
}
/* 雷電與隕石撞擊的全螢幕白光；opacity 由 JS 即時控制、快速衰減 */
#weather-flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}
