.timer-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.timer-alert {
  position: fixed;
  top: 96px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(720px, calc(100% - 32px));
  padding: 16px 18px;
  border: 1px solid rgba(183, 121, 31, 0.42);
  border-radius: 10px;
  background: #fff8ed;
  box-shadow: 0 20px 60px rgba(23, 23, 23, 0.16);
  transform: translateX(-50%);
}

.timer-alert[hidden] {
  display: none;
}

.timer-alert.done {
  border-color: rgba(184, 74, 98, 0.42);
  background: #fff0f3;
}

.timer-alert strong,
.timer-alert span {
  display: block;
}

.timer-alert strong {
  font-size: 18px;
}

.timer-alert span {
  margin-top: 3px;
  color: var(--muted);
}

.timer-alert button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.timer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.timer-hero h1 {
  font-size: clamp(42px, 7vw, 76px);
}

.timer-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.timer-status-card,
.timer-panel,
.preset-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timer-status-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.timer-status-card span,
.time-form span,
.alert-options span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.timer-status-card strong {
  color: var(--accent-strong);
  font-size: 18px;
}

.timer-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.timer-panel,
.preset-panel {
  padding: 22px;
}

.timer-display {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(216, 240, 234, 0.54), rgba(255, 255, 255, 0.88)),
    var(--surface);
  text-align: center;
}

.timer-display span {
  color: var(--accent-strong);
  font-weight: 900;
}

.timer-display strong {
  display: block;
  margin: 10px 0;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: clamp(52px, 10vw, 104px);
  line-height: 1;
}

.timer-display p {
  margin: 0;
  color: var(--muted);
}

.timer-display.warning {
  border-color: rgba(183, 121, 31, 0.42);
  background: #fff8ed;
}

.timer-display.done {
  border-color: rgba(184, 74, 98, 0.42);
  background: #fff0f3;
}

.time-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.time-form label {
  display: grid;
  gap: 8px;
}

.time-form input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.time-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.time-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.panel-title {
  margin-bottom: 16px;
}

.panel-title h2 {
  font-size: 30px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preset-grid button {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 22px;
  font-weight: 900;
}

.preset-grid button:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 12px 30px rgba(23, 23, 23, 0.07);
}

.preset-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.alert-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.alert-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .timer-shell {
    width: min(100% - 28px, 1120px);
  }

  .timer-hero,
  .timer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .timer-hero h1 {
    font-size: 38px;
  }

  .timer-alert {
    top: 82px;
    align-items: stretch;
    flex-direction: column;
  }

  .time-inputs,
  .preset-grid {
    grid-template-columns: 1fr;
  }
}
