.main_1 .clock {
  font-family: "Manrope", sans-serif;
}

.main[data-page="timer"] .main_1 {
  padding: 42px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main[data-page="timer"] .timer_hero_card {
  width: 100%;
  min-height: 460px;
  padding: 0.75rem 1.2rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.main[data-page="timer"] .timer_badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 4px;
  color: var(--primary);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main[data-page="timer"] .timer_display {
  width: 100%;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main_1 .clock#nRepeat {
  margin-top: 0.3rem;
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--text-soft);
}
.main_1 .clock#time {
  font-size: clamp(4.8rem, 12vw, 9rem);
  font-weight: 300;
  letter-spacing: -0.08em;
  line-height: 0.92;
  color: var(--text);
}
.main_1 .clock#msec {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--primary);
}
.main[data-page="timer"] .timer_preset_row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

.main[data-page="timer"] .timer_secondary_tools {
  width: 100%;
  margin-top: -0.2rem;
}

.main[data-page="timer"] .timer_preset_button {
  min-height: 42px;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: rgba(228, 234, 247, 0.96);
  color: var(--text-soft);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 0 0 1px rgba(114, 122, 105, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.main[data-page="timer"] .timer_preset_button:hover {
  background: rgba(239, 244, 255, 1);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(183, 244, 129, 0.55), 0 12px 24px rgba(54, 104, 0, 0.08);
  transform: translateY(-1px);
}

.main[data-page="timer"] .timer_preset_button:active {
  transform: translateY(0);
}

.main_1 .clock #run, .main_1 .clock #reset {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-top: 1.1rem;
  padding: 0 20px;
  width: min(15vw, 180px);
}
.main_1 .clock #run:hover, .main_1 .clock #reset:hover {
  cursor: pointer;
}
.main_1 .clock #run {
  margin-right: 1vw;
}
.main_1 .clock #reset {
  margin-left: 1vw;
}

.main[data-page="timer"] .main_1 .clock button {
  border: none;
  border-radius: 18px;
  min-height: 56px;
  padding: 0 26px;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.main[data-page="timer"] .main_1 .clock button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.main[data-page="timer"] .main_1 #run.timer-button--start,
.main[data-page="timer"] .main_1 #run.timer-button--restart {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 16px 28px rgba(54, 104, 0, 0.18);
}

.main[data-page="timer"] .main_1 #run.timer-button--pause {
  background: linear-gradient(135deg, rgba(78, 96, 116, 0.96), rgba(57, 72, 88, 0.96));
  color: #fff;
  box-shadow: 0 16px 28px rgba(13, 28, 46, 0.16);
}

.main[data-page="timer"] .main_1 #reset.timer-button--reset {
  background: rgba(228, 234, 247, 0.96);
  color: var(--text-soft);
  box-shadow: inset 0 0 0 1px rgba(114, 122, 105, 0.18);
}

.main[data-page="timer"] .main_1 #reset.timer-button--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.main_extra #laptime table {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--text-soft);
  border-collapse: collapse;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.main_extra #laptime table tbody {
  border-top: 3px solid var(--primary);
}
.main_extra #laptime table tbody tr {
  border-bottom: 1px solid rgba(194, 201, 182, 0.22);
}
.main_extra #laptime table tbody tr th, .main_extra #laptime table tbody tr td {
  font-family: "Inter", sans-serif;
  padding: 0.5rem;
}

body.dark-mode .main[data-page="timer"] .timer_preset_button,
body.dark-mode .main[data-page="timer"] .main_1 #reset.timer-button--reset {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.dark-mode .main[data-page="timer"] .timer_badge {
  color: var(--primary-glow);
}

body.dark-mode .main[data-page="timer"] .timer_preset_button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(173, 180, 190, 0.22), 0 12px 24px rgba(0, 0, 0, 0.2);
}

body.dark-mode .main[data-page="timer"] .main_1 #run.timer-button--start,
body.dark-mode .main[data-page="timer"] .main_1 #run.timer-button--restart,
body.dark-mode .main[data-page="timer"] .main_1 #run.timer-button--pause {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

@media screen and (max-width: 700px) and (orientation: portrait) {
  .main_1 .clock#nRepeat {
    font-size: 1rem;
  }
  .main_1 .clock#time {
    font-size: clamp(4rem, 18vw, 5.6rem);
    line-height: 0.9;
  }
  .main[data-page="timer"] .timer_hero_card {
    min-height: 400px;
    padding: 0.7rem 0.2rem 0.35rem;
  }
  .main_1 .clock#msec {
    font-size: clamp(1.9rem, 7vw, 2.8rem);
  }
  .main[data-page="timer"] .timer_preset_row {
    gap: 0.5rem;
  }
  .main[data-page="timer"] .timer_preset_button {
    min-height: clamp(36px, 10vw, 42px);
    padding: 0 clamp(0.7rem, 2.8vw, 0.9rem);
    font-size: clamp(0.82rem, 3.2vw, 0.92rem);
  }
  .main_1 .clock #run, .main_1 .clock #reset {
    font-family: "Inter", sans-serif;
    font-size: clamp(0.96rem, 3.6vw, 1.05rem);
    margin-top: 0.9rem;
    width: min(40vw, 180px);
    min-height: clamp(48px, 12vw, 56px);
    padding: 0 clamp(0.9rem, 3vw, 1.1rem);
  }
  .main_extra #laptime table {
    font-size: 0.92rem;
  }
}

@media screen and (max-width: 420px) {
  .main[data-page="timer"] .timer_preset_row {
    gap: 0.4rem;
  }

  .main[data-page="timer"] .timer_preset_button {
    min-height: clamp(34px, 9.6vw, 40px);
    padding: 0 0.7rem;
    font-size: clamp(0.78rem, 3vw, 0.86rem);
  }

  .main_1 .clock #run, .main_1 .clock #reset {
    width: min(42vw, 156px);
    min-height: clamp(44px, 11vw, 52px);
    font-size: clamp(0.9rem, 3.4vw, 1rem);
    border-radius: 15px;
  }
}

.main[data-page="stopwatch"] .main_1 {
  padding: 42px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main[data-page="stopwatch"] .main_bttm {
  padding-top: 8px;
}

.main[data-page="stopwatch"] .main_extra {
  padding-top: 1.75rem;
}

.main[data-page="stopwatch"] .stopwatch_hero_card {
  width: 100%;
  min-height: 530px;
  padding: 2.2rem 1.6rem;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.main[data-page="stopwatch"] .stopwatch_hero_card::before {
  content: none;
}

.main[data-page="stopwatch"] .stopwatch_badge {
  position: relative;
  z-index: 1;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.main[data-page="stopwatch"] .stopwatch_display {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  --stopwatch-msec-slot: 3.8ch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.main[data-page="stopwatch"] .stopwatch_display_time_shell {
  display: inline-grid;
  grid-template-columns: var(--stopwatch-msec-slot) auto var(--stopwatch-msec-slot);
  align-items: end;
  justify-items: center;
  column-gap: 0.3em;
}

.main[data-page="stopwatch"] .stopwatch_internal_controls {
  display: none;
}

.main[data-page="stopwatch"] .clock#time {
  grid-column: 2;
  display: block;
  font-size: clamp(4.8rem, 12vw, 10rem);
  font-weight: 300;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 0.92;
  white-space: nowrap;
}

.main[data-page="stopwatch"] .clock#msec {
  grid-column: 3;
  justify-self: start;
  font-size: clamp(2.6rem, 6vw, 6rem);
  font-weight: 300;
  color: rgba(77, 130, 29, 0.45);
  font-variant-numeric: tabular-nums;
  text-align: left;
  line-height: 0.9;
  white-space: nowrap;
  margin-left: 0.06em;
}

.main.FULLSCREEN[data-page="stopwatch"] .main_1 {
  align-items: stretch;
  justify-content: stretch;
}

.main.FULLSCREEN[data-page="stopwatch"] .stopwatch_hero_card {
  min-height: 100%;
  height: 100%;
  border-radius: 0;
  padding: 4rem 2.8rem 3.2rem;
}

.main[data-page="stopwatch"] .stopwatch_controls {
  position: relative;
  z-index: 1;
  margin-top: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.main[data-page="stopwatch"] .stopwatch_icon_control,
.main[data-page="stopwatch"] .stopwatch_run_control,
.main[data-page="stopwatch"] #stopwatch_export,
.main[data-page="stopwatch"] #stopwatch_clear_history {
  font-family: "Inter", sans-serif;
  border: none;
  cursor: pointer;
}

.main[data-page="stopwatch"] .stopwatch_icon_control {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: inset 0 0 0 2px rgba(114, 122, 105, 0.24);
}

.main[data-page="stopwatch"] .stopwatch_icon_control .icon_svg {
  width: 2rem;
  height: 2rem;
}

.main[data-page="stopwatch"] .stopwatch_icon_control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.main[data-page="stopwatch"] .stopwatch_run_control {
  min-width: 226px;
  min-height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 18px 34px rgba(54, 104, 0, 0.22);
}

.main[data-page="stopwatch"] .stopwatch_run_control .icon_svg {
  width: 2rem;
  height: 2rem;
}

.main[data-page="stopwatch"] .stopwatch_run_control.is-running {
  background: #5d6979;
  box-shadow: 0 18px 34px rgba(13, 28, 46, 0.18);
}

.main[data-page="stopwatch"] .stopwatch_run_label {
  font-size: 0.94em;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.main[data-page="stopwatch"] .stopwatch_stats_card {
  padding: 1.6rem;
  border-radius: 24px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(194, 201, 182, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main[data-page="stopwatch"] .stopwatch_stats_card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.main[data-page="stopwatch"] .stopwatch_stat_box {
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface);
}

.main[data-page="stopwatch"] .stopwatch_stat_label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.main[data-page="stopwatch"] .stopwatch_stat_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.main[data-page="stopwatch"] .stopwatch_stat_row strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.main[data-page="stopwatch"] .stopwatch_stat_row span {
  font-family: "Manrope", sans-serif;
  font-size: 1.24rem;
  color: var(--text);
}

.main[data-page="stopwatch"] #stopwatch_clear_history {
  margin-top: 0.35rem;
  min-height: 48px;
  border-radius: 16px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.main[data-page="stopwatch"] .stopwatch_records_shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.main[data-page="stopwatch"] .stopwatch_records_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.main[data-page="stopwatch"] .stopwatch_records_header h2 {
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text);
}

.main[data-page="stopwatch"] #stopwatch_export {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 14px;
  background: transparent;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.main[data-page="stopwatch"] #laptime {
  border-radius: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(194, 201, 182, 0.12);
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.main[data-page="stopwatch"] .stopwatch_laptime {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main[data-page="stopwatch"] #laptime table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  min-width: 32rem;
}

.main[data-page="stopwatch"] #laptime table th:last-child,
.main[data-page="stopwatch"] #laptime table td:last-child {
  min-width: 8.4rem;
  white-space: nowrap;
}

.main[data-page="stopwatch"] #laptime table tr:first-child {
  background: var(--surface-soft);
}

.main[data-page="stopwatch"] #laptime table tr:first-child th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.main[data-page="stopwatch"] #laptime table td,
.main[data-page="stopwatch"] #laptime table th {
  padding: 1.15rem 1.5rem;
  font-family: "Inter", sans-serif;
  border-bottom: 1px solid rgba(194, 201, 182, 0.16);
  text-align: center;
  vertical-align: middle;
}

.main[data-page="stopwatch"] #laptime table td:first-child {
  font-family: "Manrope", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.main[data-page="stopwatch"] #laptime table tr:not(:first-child) td {
  font-size: 1.05rem;
  color: var(--text);
}

.main[data-page="stopwatch"] #laptime table tr:last-child td {
  border-bottom: none;
}

.main[data-page="stopwatch"] .stopwatch_empty_state {
  padding: 2rem 1.5rem;
  font-family: "Inter", sans-serif;
  color: var(--text-soft);
  text-align: center;
}

.main[data-page="stopwatch"] .stopwatch_diff_chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 30px;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
}

.main[data-page="stopwatch"] .stopwatch_diff_chip--plus {
  background: rgba(255, 218, 214, 0.9);
  color: #ba1a1a;
}

.main[data-page="stopwatch"] .stopwatch_diff_chip--minus {
  background: rgba(206, 232, 178, 0.9);
  color: #406f16;
}

.main[data-page="stopwatch"] .stopwatch_diff_chip--base {
  background: transparent;
  color: var(--text-soft);
  min-width: auto;
  padding: 0;
}

@media screen and (max-width: 1024px) {
  .main.FULLSCREEN[data-page="stopwatch"] .stopwatch_hero_card {
    padding: 3rem 2rem 2.4rem;
  }
}

@media screen and (max-width: 700px) {
  .main.FULLSCREEN[data-page="timer"] .timer_hero_card {
    min-height: auto;
    padding: 0.7rem 0.25rem 0.35rem;
  }

  .main.FULLSCREEN[data-page="timer"] .timer_secondary_tools {
    margin-top: 0.15rem;
  }

  .main.FULLSCREEN[data-page="stopwatch"] .stopwatch_hero_card {
    padding: 1.8rem 0.55rem 1.6rem;
  }

  .main[data-page="stopwatch"] .stopwatch_hero_card {
    min-height: 420px;
    padding: 1.6rem 0.5rem;
  }

  .main[data-page="stopwatch"] .stopwatch_controls {
    gap: clamp(0.55rem, 2.8vw, 0.8rem);
    flex-wrap: nowrap;
    width: 100%;
  }

  .main[data-page="stopwatch"] .stopwatch_display {
    margin-top: 1rem;
  }

  .main[data-page="stopwatch"] .stopwatch_display_time_shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.18rem;
  }

  .main[data-page="stopwatch"] .clock#time {
    grid-column: auto;
    font-size: clamp(3.2rem, 17vw, 5.1rem);
    letter-spacing: -0.06em;
  }

  .main[data-page="stopwatch"] .clock#msec {
    grid-column: auto;
    justify-self: center;
    text-align: center;
    font-size: clamp(1.45rem, 6vw, 2.2rem);
    line-height: 1;
    margin-left: 0;
  }

  .main[data-page="stopwatch"] .stopwatch_run_control {
    min-width: 0;
    min-height: clamp(60px, 16vw, 72px);
    flex: 1 1 auto;
    padding: 0 0.9rem;
    font-size: clamp(1rem, 3.8vw, 1.12rem);
  }

  .main[data-page="stopwatch"] .stopwatch_icon_control {
    width: clamp(58px, 16vw, 72px);
    height: clamp(58px, 16vw, 72px);
    flex: 0 0 auto;
  }

  .main[data-page="stopwatch"] .stopwatch_icon_control .icon_svg,
  .main[data-page="stopwatch"] .stopwatch_run_control .icon_svg {
    width: clamp(1.35rem, 4.8vw, 1.8rem);
    height: clamp(1.35rem, 4.8vw, 1.8rem);
  }

  .main[data-page="stopwatch"] .stopwatch_records_header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main[data-page="stopwatch"] #laptime table td,
  .main[data-page="stopwatch"] #laptime table th {
    padding: 0.9rem 0.75rem;
  }

  .main[data-page="stopwatch"] #laptime table {
    min-width: 31rem;
  }
}

@media screen and (max-width: 420px) {
  .main.FULLSCREEN[data-page="stopwatch"] .stopwatch_hero_card {
    padding: 1.45rem 0.35rem 1.4rem;
  }

  .main[data-page="stopwatch"] .stopwatch_hero_card {
    padding: 1.35rem 0.35rem;
  }

  .main[data-page="stopwatch"] .stopwatch_display_time_shell {
    gap: 0.12rem;
  }

  .main[data-page="stopwatch"] .clock#time {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
    letter-spacing: -0.05em;
  }

  .main[data-page="stopwatch"] .clock#msec {
    font-size: clamp(1.25rem, 5.6vw, 1.8rem);
  }

  .main[data-page="stopwatch"] .stopwatch_controls {
    gap: 0.45rem;
  }

  .main[data-page="stopwatch"] .stopwatch_run_control {
    padding: 0 0.7rem;
    gap: 0.45rem;
  }

  .main[data-page="stopwatch"] #laptime table {
    min-width: 29rem;
  }

  .main[data-page="stopwatch"] #laptime table th:last-child,
  .main[data-page="stopwatch"] #laptime table td:last-child {
    min-width: 7.6rem;
  }
}
