@font-face {
  font-family: ArialRounded;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/Arial_Rounded_MT.ttf") format("truetype");
}

@font-face {
  font-family: ArialRounded;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/Arial-Rounded-MT-Bold.ttf") format("truetype");
}

:root {
  font-family: ArialRounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  --theme-pomodoro: #2f6a95;
  --theme-short-break: #4a7950;
  --theme-long-break: #6c4d89;
  --page-background: var(--theme-pomodoro);
  --card-background: rgba(255, 255, 255, 0.1);
  --selected-tab-background: rgba(0, 0, 0, 0.15);
  --accent: var(--theme-pomodoro);
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page-background);
  font-weight: 300;
  transition: background-color 160ms ease;
}

body[data-mode="shortBreak"] {
  --page-background: var(--theme-short-break);
  --accent: var(--theme-short-break);
}

body[data-mode="longBreak"] {
  --page-background: var(--theme-long-break);
  --accent: var(--theme-long-break);
}

body.modal-open {
  overflow: hidden;
}

.timer-progress {
  width: 100%;
  height: 3px;
  margin-top: -3px;
  overflow: hidden;
  pointer-events: none;
}

.timer-progress__fill {
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  transition: width 160ms linear;
}

body[data-timer-running="true"] .timer-progress__fill {
  min-width: 12px;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.site-header {
  width: min(100% - 32px, 620px);
  height: 61px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.top-nav {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  opacity: 0.9;
}

.nav-button:hover,
.task-more:hover {
  opacity: 1;
}

.nav-button:active,
.task-more:active {
  transform: translateY(2px);
}

.nav-button {
  gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 300;
  line-height: 16px;
}

.nav-button img,
.icon-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.save-button {
  padding-inline: 12px;
}

.icon-button {
  width: 34px;
  padding: 8px 9px;
}

.page-content {
  width: min(100% - 32px, 480px);
  margin: 40px auto 0;
}

.timer-card {
  height: 312px;
  padding: 20px 0 0;
  border-radius: 6px;
  background: var(--card-background);
  text-align: center;
  transition: background-color 160ms ease;
}

.mode-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 28px;
}

.mode-button {
  height: 28px;
  border-radius: 4px;
  padding: 2px 12px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  white-space: nowrap;
}

.mode-button[aria-pressed="true"] {
  background: var(--selected-tab-background);
  font-weight: 700;
}

.mode-button:active {
  transform: translateY(2px);
}

.timer-value {
  display: block;
  width: 100%;
  height: 159px;
  margin: 20px 0 0;
  color: #fff;
  font-family: ArialRounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 120px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}

.timer-controls {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 75px;
}

.start-button {
  width: 200px;
  height: 55px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 0 #ebebeb;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: normal;
  transition: color 0.5s ease-in-out;
}

.start-button:active,
.start-button--running {
  box-shadow: none;
  transform: translateY(6px);
}

.reset-button[hidden],
.skip-button[hidden] {
  display: none;
}

.reset-button,
.skip-button {
  position: absolute;
  top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 1px 6px;
  background: transparent;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

.reset-button {
  left: 68px;
}

.skip-button {
  right: 68px;
}

.reset-button:hover,
.skip-button:hover {
  opacity: 0.8;
}

.reset-button img,
.skip-button img {
  display: block;
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.timer-status {
  margin-top: 0;
  padding-top: 20px;
  text-align: center;
}

.round-count,
.status-message {
  margin: 0;
}

.round-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 300;
  line-height: normal;
}

.status-message {
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 300;
  line-height: normal;
}

.tasks {
  margin-top: 20px;
}

.tasks-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
}

.tasks h1 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
}

.task-more-control {
  position: relative;
}

.task-more {
  width: 32px;
  height: 32px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.task-options-menu {
  position: absolute;
  z-index: 1;
  top: 100%;
  right: 0;
  width: 210px;
  padding: 4px 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 8%), 0 2px 6px rgb(0 0 0 / 10%);
  color: #4f2b2d;
  transform: translateY(10px);
}

.task-options-menu[hidden] {
  display: none;
}

.task-options-menu__action {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 300;
  line-height: 16px;
  text-align: left;
}

.task-options-menu__action:hover,
.task-options-menu__action:active {
  background: #f0f0f0;
}

.task-options-menu__action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.task-options-menu__icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-right: 8px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.task-options-menu__divider {
  width: 85%;
  height: 1px;
  margin: 0 auto;
  background: #efefef;
}

.add-task {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  margin-top: 18px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: normal;
  opacity: 0.8;
}

.add-task:hover {
  opacity: 1;
}

.add-task[hidden] {
  display: none;
}

.add-task img,
.add-task span {
  opacity: 0.8;
}

.add-task img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.task-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75px;
  margin-top: 28px;
  padding: 18px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 300;
  line-height: 34px;
  text-align: center;
}

.task-summary[hidden] {
  display: none;
}

.task-summary__metric {
  margin: 0 8px;
  white-space: nowrap;
}

.task-summary__value {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.task-summary__slash {
  margin: 0 1px;
}

.task-summary__duration {
  color: rgba(255, 255, 255, 0.7);
}

.task-list:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.task-row {
  position: relative;
  width: 100%;
  border-radius: 4px;
}

.task-row.is-dragging {
  z-index: 10;
  background: rgba(0, 0, 0, 0.1);
  overflow-anchor: none;
}

.task-row.is-dragging > .task-item {
  visibility: hidden;
}

.task-item {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border: 0;
  border-left: 6px solid transparent;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: grab;
  user-select: none;
  transition: background-color 160ms ease, border-left-color 160ms ease;
}

.task-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 14px;
}

:where(.task-list:not(.is-reordering)) .task-item:hover {
  border-left-color: #d9d9d9;
  background: #fafafa;
}

.task-item.is-active {
  border-left-color: #222;
}

.task-item.is-editing {
  display: none;
}

.task-item.is-entering {
  animation: task-row-enter 160ms ease-out both;
}

.task-item__main {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: 12px 0;
}

.task-item__copy {
  min-width: 0;
  flex: 1;
}

.task-item__marker {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  margin: 0 10px 0 0;
  padding: 0;
  border: 2px solid #dfdfdf;
  border-radius: 50%;
  background: #dfdfdf;
  color: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.task-item__marker::after {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  content: "";
  transform: rotate(45deg);
}

.task-item__marker.is-completed {
  border-color: #a34747;
  background: #a34747;
}

.task-item__marker:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.task-item__title {
  overflow: hidden;
  color: #555;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.is-completed .task-item__title {
  color: #aaa;
  text-decoration: line-through;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.task-item__note {
  padding: 0 18px 12px 30px;
  user-select: text;
}

.task-item__note p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: hsl(51 84% 93%);
  box-shadow: 0 1px 0 rgb(0 0 0 / 10%);
  color: hsl(51 64% 23%);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.task-item__meta {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 14px;
}

.task-item__estimate {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #aaa;
  font-weight: 700;
  white-space: nowrap;
}

.task-item__actual {
  font-size: 18px;
}

.task-item__separator {
  font-size: 14px;
}

.task-options {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 10px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #aaa;
  font-size: 22px;
  line-height: 1;
  opacity: 0.65;
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.task-options:hover {
  background: #f1f1f1;
  color: #555;
  opacity: 1;
}

.task-options:active {
  background: #e9e9e9;
}

.task-form {
  display: block;
  min-height: 277px;
  margin-top: 12px;
  overflow: visible;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.1);
  color: #555;
  opacity: 1;
  transform: translateY(0);
}

.task-row > .task-form {
  margin-top: 0;
}

.task-form[hidden] {
  display: none;
}

.task-form[data-editor-state="opening"] {
  opacity: 0.1;
  transform: scale(1, 0.8);
}

.task-form[data-editor-state="open"] {
  transform-origin: center;
  animation: task-editor-enter 100ms ease-in-out both;
}

.task-form[data-note-expanded="true"] {
  min-height: 355px;
}

.task-form-fields {
  min-height: 212px;
  padding: 10px 20px 14px;
}

.task-form[data-note-expanded="true"] .task-form-fields {
  min-height: 290px;
}

.task-form input,
.task-form textarea,
.task-form button {
  font-family: inherit;
}

#task-name {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #555;
  font-size: 22px;
  font-weight: 700;
  outline: 0;
}

#task-name::placeholder {
  color: #ddd;
  font-style: italic;
  font-synthesis: style;
  opacity: 1;
}

#task-note::placeholder {
  color: #c4c4c4;
  opacity: 1;
}

.estimate-section {
  margin-top: 17px;
}

.estimate-section > label {
  display: block;
  color: #555;
  font-size: 16px;
  font-weight: 700;
}

.estimate-controls {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
}

.actual-control[hidden] {
  display: none;
}

#task-estimate,
#task-actual {
  width: 75px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: #efefef;
  color: #555;
  font-size: 16px;
  font-weight: 700;
  outline: 0;
}

#task-estimate {
  appearance: textfield;
  -moz-appearance: textfield;
}

#task-estimate::-webkit-inner-spin-button,
#task-estimate::-webkit-outer-spin-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.estimate-button,
.form-save,
.form-cancel,
.form-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 700;
}

.estimate-button {
  padding: 0;
  background: #fff;
  color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.estimate-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.estimate-button:hover {
  background: #f9f9f9;
}

.estimate-button:active,
.form-save:active {
  box-shadow: none;
  transform: translateY(2px);
}

.task-form-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
}

.task-form[data-note-expanded="true"] .note-field {
  order: -1;
  flex: 0 0 100%;
}

.form-option[hidden] {
  display: none;
}

.form-option {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  background: transparent;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-decoration: underline;
  opacity: 0.9;
}

.form-option:hover {
  opacity: 1;
}

.note-field {
  min-width: 0;
}

.note-field[hidden] {
  display: none;
}

#task-note {
  display: block;
  width: 100%;
  min-height: 62px;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: #efefef;
  color: #555;
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  outline: 0;
}

.task-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 65px;
  padding: 13px 20px;
  border-top: 1px solid #eeeeee;
  background: #f4f4f4;
}

.form-delete[hidden] {
  display: none;
}

.form-delete {
  margin-right: auto;
  padding: 1px 6px;
  background: transparent;
  color: #9e9e9e;
  box-shadow: none;
  cursor: pointer;
  transition: all 100ms ease;
}

.form-delete svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.form-delete:hover {
  background: #e9e9e9;
  color: #636363;
}

.form-action-shell {
  display: inline-flex;
  padding: 1px;
  border-radius: 10px;
  background: linear-gradient(#f7f7f7, #d9d9d9);
}

.form-action-shell--save {
  background: linear-gradient(#616161, #333);
}

.form-cancel,
.form-save {
  min-width: 74px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.form-cancel {
  background: #f4f4f4;
  color: #9e9e9e;
}

.form-cancel:hover {
  color: #636363;
}

.form-save {
  background: #45474b;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.form-save:hover:not(:disabled) {
  background: #535356;
}

.form-save:disabled {
  cursor: not-allowed;
  background: #45474b;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
}

#task-name:focus-visible {
  outline: 0;
}

.task-form input:not(#task-name):focus-visible,
.task-form textarea:focus-visible,
.task-form button:focus-visible,
.task-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes task-editor-enter {
  from {
    opacity: 0.1;
    transform: scale(1, 0.8);
  }

  to {
    opacity: 1;
    transform: scale(1, 1);
  }
}

@keyframes task-row-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-overlay,
.history-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-padding-top: 68px;
  padding: 48px 0 58px;
  background: rgb(0 0 0 / 40%);
}

.settings-overlay::-webkit-scrollbar,
.history-overlay::-webkit-scrollbar {
  width: 6px;
}

.settings-overlay::-webkit-scrollbar-thumb,
.history-overlay::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #2c2f30;
}

.settings-overlay[hidden],
.history-overlay[hidden] {
  display: none;
}

.settings-modal,
.history-modal {
  width: 400px;
  align-self: flex-start;
  flex: 0 0 auto;
  overflow: hidden;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 20px rgb(0 0 0 / 15%), 0 3px 6px rgb(0 0 0 / 10%);
  color: #222;
  outline: 0;
  transform: translateY(20px);
}

.settings-modal__header {
  position: relative;
  height: 50px;
  padding: 16px 23px;
}

.settings-modal__header h2 {
  margin: 0;
  color: #aaa;
  font-size: 15px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  text-transform: uppercase;
}

.settings-modal__close {
  position: absolute;
  top: 7px;
  right: 6px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #555;
}

.settings-modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.settings-modal__close:hover {
  background: #f1f1f1;
  color: #222;
}

.settings-modal__content {
  padding: 0 20px;
}

.settings-section {
  padding: 0 0 12px;
  margin: 0 0 12px;
  border-bottom: 1px solid #dfdfdf;
}

.settings-section:last-child {
  border-bottom: 0;
}

.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0 10px;
  color: #aaa;
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.settings-section h3 svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

.settings-time-row,
.settings-inline-field,
.settings-switch-row,
.settings-theme-row,
.settings-repeat-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-time-row {
  display: block;
  padding: 12px 0 8px;
}

.settings-field-label,
.settings-inline-field > span,
.settings-switch-row > span,
.settings-theme-row > span,
.settings-repeat-field > span {
  color: #555;
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
}

.settings-time-inputs {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.settings-time-inputs label {
  display: grid;
  width: 98px;
  gap: 4px;
  color: #aaa;
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
}

.settings-time-inputs input,
.settings-inline-field input,
.settings-repeat-field input {
  box-sizing: border-box;
  height: 39px;
  border: 0;
  border-radius: 6px;
  background: #efefef;
  color: #555;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 19px;
}

.settings-time-inputs input {
  width: 98px;
  padding: 10px;
}

.settings-switch-row {
  min-height: 56px;
  padding: 12px 0;
}

.settings-inline-field {
  min-height: 63px;
  padding: 12px 0;
}

.settings-inline-field input {
  width: 70px;
  padding: 10px;
}

.settings-sound-select {
  position: relative;
  width: 130px;
  height: 40px;
  flex: 0 0 130px;
}

.settings-sound-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.settings-sound-select__trigger {
  display: flex;
  width: 130px;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 0;
  border-radius: 4px;
  background: #ebebeb;
  color: #787878;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  user-select: none;
}

.settings-sound-select__trigger svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0.5;
}

.settings-sound-select__options {
  position: absolute;
  z-index: 3;
  top: 44px;
  right: 0;
  width: 130px;
  padding: 8px 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%), 0 1px 3px rgb(0 0 0 / 8%);
}

.settings-sound-select__options[hidden] {
  display: none;
}

.settings-sound-select__options button {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  padding: 12px;
  border: 0;
  background: transparent;
  color: #787878;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
}

.settings-sound-select__options button:hover,
.settings-sound-select__options button:focus-visible {
  background: #d4d4d4;
  color: #454545;
}

.settings-sound-select__options button[aria-selected="true"] {
  color: #787878;
}

.settings-switch {
  position: relative;
  width: 60px;
  height: 32px;
  flex: 0 0 60px;
  appearance: none;
  border-radius: 50px;
  background: #ccc;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.settings-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50px;
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 30%);
  content: "";
  transition: transform 160ms ease;
}

.settings-switch:checked {
  background: rgb(132 199 51 / 80%);
}

.settings-switch:checked::after {
  transform: translateX(28px);
}

.settings-sound-group {
  padding: 12px 0;
}

.settings-sound-group + .settings-sound-group {
  padding-top: 12px;
}

.settings-sound-group .settings-inline-field {
  min-height: 40px;
  padding: 0;
}

.settings-range-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 39px;
  margin-top: 22px;
}

.settings-range-field output {
  width: 34px;
  color: #aaa;
  font-size: 16px;
  font-weight: 300;
  line-height: 18px;
  text-align: right;
}

.settings-range-field input {
  width: 137px;
  height: 7px;
  margin: 2px;
  appearance: none;
  border-radius: 50px;
  background: #ccc;
  cursor: pointer;
}

.settings-range-field input::-webkit-slider-thumb {
  width: 25px;
  height: 25px;
  appearance: none;
  border: 0;
  border-radius: 50px;
  background: #fff;
  box-shadow: 1px 1px 4px rgb(0 0 0 / 20%);
  cursor: pointer;
}

.settings-range-field input::-moz-range-track {
  height: 7px;
  border: 0;
  border-radius: 50px;
  background: #ccc;
}

.settings-range-field input::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50px;
  background: #fff;
  box-shadow: 1px 1px 4px rgb(0 0 0 / 20%);
  cursor: pointer;
}

.settings-repeat-field {
  min-height: 39px;
  margin-top: 12px;
}

.settings-repeat-field input {
  width: 55px;
  padding: 10px;
}

.settings-theme-row {
  min-height: 54px;
  padding: 12px 0;
}

.settings-theme-swatches {
  display: flex;
  align-items: center;
  gap: 11.1875px;
  height: 27.1875px;
}

.theme-swatch {
  width: 27.1875px;
  height: 27.1875px;
  flex: 0 0 27.1875px;
  padding: 0;
  border: 0;
  border-radius: 6.4px;
}

.settings-color-picker-anchor {
  position: relative;
  width: 0;
  height: 27.1875px;
}

.settings-color-picker {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 38px;
  width: 220px;
  padding: 4px 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 8%), 0 2px 6px rgb(0 0 0 / 10%);
}

.settings-color-picker[hidden] {
  display: none;
}

.settings-color-picker p {
  margin: 0;
  padding: 12px 16px;
  color: #222;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
}

.settings-color-options {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 8px;
  padding: 16px;
}

.settings-color-option {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6.4px;
}

.settings-color-option[aria-pressed="true"]::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  content: "✓";
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgb(0 0 0 / 40%);
}

.settings-modal input:focus-visible,
.settings-modal select:focus-visible,
.settings-modal button:focus-visible,
.history-modal button:focus-visible {
  outline: 2px solid #555;
  outline-offset: 2px;
}

.history-modal__content {
  padding: 0 20px 20px;
}

.history-empty {
  margin: 14px 0 8px;
  color: #888;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-record {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  background: #fff;
}

.history-record__load {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
  padding: 13px 14px;
  background: transparent;
  color: #555;
  text-align: left;
}

.history-record__load:hover {
  background: #f7f7f7;
}

.history-record__time {
  overflow: hidden;
  color: #444;
  font-size: 15px;
  font-weight: 700;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-record__summary {
  color: #999;
  font-size: 13px;
  font-weight: 300;
  line-height: 16px;
}

.history-record__delete {
  align-self: center;
  margin: 0 10px;
  padding: 8px;
  border-radius: 4px;
  background: transparent;
  color: #a34747;
  font-size: 13px;
  font-weight: 700;
}

.history-record__delete:hover {
  background: #f8ebeb;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .top-nav {
    height: auto;
    min-height: 60px;
    padding: 12px 0;
    align-items: flex-start;
  }

  .site-header {
    height: auto;
    min-height: 61px;
  }

  .nav-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .nav-button {
    padding: 8px;
  }

  .page-content {
    margin-top: 24px;
  }

  .timer-card {
    height: 312px;
  }

  .mode-button {
    padding-inline: 8px;
    font-size: 14px;
  }

  .timer-value {
    font-size: clamp(80px, 29vw, 120px);
  }

  .settings-modal,
  .history-modal {
    width: calc(100% - 24px);
  }
}

@media (max-width: 360px) {
  .settings-time-inputs label,
  .settings-time-inputs input {
    width: min(98px, calc((100vw - 64px) / 3));
  }
}

@media (max-width: 410px) {
  .nav-button:nth-child(-n + 2) span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
