.alarm {
  max-width: 640px;
  margin: 0 auto;
}

.alarm__lead {
  margin: 0 0 1.1rem;
  color: #475569;
  font-size: .95rem;
}

.alarm-unlock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding: .8rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}

.alarm-unlock p {
  margin: 0;
  font-size: .85rem;
  color: #92400e;
}

.alarm-unlock button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  flex: 0 0 auto;
  padding: .5rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #f59e0b;
  border: 1px solid transparent;
  border-radius: 999px;
}

.alarm-unlock button:hover {
  background: #d97706;
}

.alarm-firing {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, .82);
  animation: alarm-firing-fade .2s ease;
}

@keyframes alarm-firing-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.alarm-firing__label {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  animation: alarm-pulse 1s ease-in-out infinite;
}

.alarm-firing__time {
  margin: 0;
  font-size: 3.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
}

@keyframes alarm-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.alarm-firing__actions {
  display: flex;
  gap: .8rem;
  margin-top: .6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.alarm-firing__actions button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .7rem 1.4rem;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
}

#snoozeButton {
  color: #1e1b4b;
  background: #fbbf24;
}

#snoozeButton:hover {
  background: #f59e0b;
}

#stopButton {
  color: #fff;
  background: #ef4444;
}

#stopButton:hover {
  background: #dc2626;
}

.alarm-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.alarm-tab {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .6rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.alarm-tab.is-active {
  color: #1e1b4b;
  border-bottom-color: #fb923c;
}

.alarm-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.alarm-list__empty {
  padding: 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: .88rem;
}

.alarm-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem .8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.alarm-item.is-disabled {
  opacity: .55;
}

.alarm-item__time {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1e1b4b;
}

.alarm-item__label {
  flex: 1 1 auto;
  font-size: .88rem;
  color: #475569;
  word-break: break-all;
}

.alarm-item__toggle,
.alarm-item__delete {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  flex: 0 0 auto;
  padding: .3rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
}

.alarm-item__toggle {
  color: #1e1b4b;
  background: #fff;
  border: 1px solid #c7d2fe;
}

.alarm-item.is-disabled .alarm-item__toggle {
  color: #94a3b8;
  border-color: #e2e8f0;
}

.alarm-item__delete {
  color: #ef4444;
  background: #fff;
  border: 1px solid #fecaca;
}

.alarm-item__delete:hover {
  background: #fef2f2;
}

.alarm-add {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.alarm-add input[type="time"] {
  flex: 0 0 auto;
  width: auto;
  padding: .5rem .6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.alarm-add input[type="text"] {
  flex: 1 1 10rem;
  padding: .5rem .6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.alarm-add button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  flex: 0 0 auto;
  padding: .5rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #1e1b4b;
  border: 1px solid transparent;
  border-radius: 999px;
}

.alarm-add button:hover {
  background: #14123a;
}

.alarm-timer-display {
  margin: .4rem 0 1rem;
  text-align: center;
  font-size: 3.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1e1b4b;
}

#timerLabel {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  padding: .5rem .6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.alarm-timer-presets {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}

.alarm-timer-presets button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .4rem .9rem;
  font-size: .85rem;
  font-weight: 700;
  color: #1e1b4b;
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
}

.alarm-timer-presets button:hover {
  background: #eef2ff;
}

.alarm-timer-custom {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.alarm-timer-custom label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: #475569;
}

.alarm-timer-custom input[type="number"] {
  width: 4.2rem;
  padding: .4rem .3rem;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.alarm-timer-actions {
  display: flex;
  gap: .6rem;
  margin-bottom: 1.6rem;
}

.alarm-timer-actions button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .55rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #1e1b4b;
  border: 1px solid transparent;
  border-radius: 999px;
}

.alarm-timer-actions button:hover:not(:disabled) {
  background: #14123a;
}

.alarm-timer-actions button:disabled {
  opacity: .45;
  cursor: default;
}

.alarm-settings {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.alarm-settings__title {
  margin: 0 0 .7rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #64748b;
  text-transform: uppercase;
}

.alarm-settings label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .7rem;
  font-size: .88rem;
  color: #1e293b;
}

.alarm-settings select {
  padding: .4rem .5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.alarm-settings input[type="range"] {
  flex: 1 1 auto;
  width: auto;
}

.alarm-settings button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .4rem .9rem;
  margin: 0 0 .7rem .2rem;
  font-size: .82rem;
  font-weight: 700;
  color: #1e1b4b;
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
}

.alarm-settings button:hover {
  background: #eef2ff;
}

.alarm-note {
  margin: 1rem 0 0;
  font-size: .8rem;
  color: #94a3b8;
}

@media (max-width: 480px) {
  .alarm-timer-display {
    font-size: 2.6rem;
  }

  .alarm-firing__time {
    font-size: 2.4rem;
  }

  .alarm-add {
    flex-direction: column;
    align-items: stretch;
  }

  .alarm-add input[type="time"] {
    width: 100%;
  }
}
