* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
}
header {
  /*background: #3a5a94;*/
  background: #005387;
  color: #fff;
  text-align: center;
  padding: 20px 10px 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 20;
}
.logo {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 2px;
  opacity: 0.9;
  margin-top: 8px;
  cursor: pointer;
  padding: 4px 12px;
}
.menu-toggle:active {
  opacity: 0.7;
}

.menu-panel {
  background: #003251;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  text-align: left;
  border-radius: 6px;
}
.menu-panel.open {
  max-height: 500px;
}
.menu-inner {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reset-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #c94b4b;
  color: #fff;
  cursor: pointer;
}
.reset-btn.confirm {
  background: #922828;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 0.9rem;
  gap: 10px;
}
.menu-link {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  text-decoration: underline;
  padding: 6px 0 2px;
}
.menu-link:active {
  opacity: 0.7;
}
.switch {
  position: relative;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #6b7fa8;
  border-radius: 24px;
  transition: 0.2s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider {
  background-color: #4caf50;
}
.switch input:checked + .slider:before {
  transform: translateX(22px);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #c8cfdf;
  position: relative;
  overflow: hidden;
  z-index: 25;
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: #2f8bed;
  transition:
    width 0.2s linear,
    background-color 0.3s ease;
}
.progress-fill.warning {
  background: #c94b4b;
}

main {
  flex: 1;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.timer-display {
  font-size: 2.6rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  transition: color 0.3s ease;
}
.timer-display.warning {
  color: #c94b4b;
}
.btn {
  width: 100%;
  max-width: 340px;
  padding: 18px;
  font-size: 1.3rem;
  border: none;
  border-radius: 6px;
  background: #005387;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:active {
  background: #2c4573;
}
.btn.running {
  background: #c94b4b;
}
.btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.section {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.divider {
  width: 100%;
  max-width: 340px;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}
.flight-list {
  width: 100%;
  max-width: 340px;
  list-style: none;
  margin-top: 6px;
}
.flight-list li {
  background: #f4f6fa;
  border: 1px solid #dde3ee;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}
.flight-list li span.idx {
  margin-right: 8px;
}
.sound-hint {
  font-size: 0.75rem;
  color: #c5c5c5;
  text-align: center;
  margin-top: -6px;
}

@media (min-width: 600px) {
  .timer-display {
    font-size: 3.2rem;
  }
  .btn {
    font-size: 1.5rem;
    padding: 20px;
  }
  main {
    padding: 30px 20px;
  }
  .menu-panel .menu-inner {
    max-width: 400px;
    margin: 0 auto;
  }
}

.info-block {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.info-title {
  font-size: 1.5rem;
  color: #3a5a94;
  margin-bottom: 14px;
  text-align: center;
}
.info-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .info-block {
    max-width: 500px;
  }
}
