@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

.fmt50x-tool {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
  background: #ffffff;
  color: #172033;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.fmt50x-tool,
.fmt50x-tool * {
  box-sizing: border-box;
}

.fmt50x-tool button,
.fmt50x-tool input,
.fmt50x-tool output {
  font: inherit;
}

.fmt50x-tool button {
  margin: 0;
}

.fmt50x-tool__wrapper {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 34px 20px 44px;
  box-sizing: border-box;
}

.fmt50x-tool__header {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.fmt50x-tool__title {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 4.2vw, 2.625rem);
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.fmt50x-tool__subtitle {
  margin: 10px auto 0;
  color: #536176;
  font-size: 17px;
  line-height: 1.55;
}

.fmt50x-tool__box {
  width: 100%;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.fmt50x-tool__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  gap: 34px;
}

.fmt50x-tool__countdown-panel,
.fmt50x-tool__settings-panel {
  min-width: 0;
}

.fmt50x-tool__settings-panel {
  padding-left: 34px;
  border-left: 1px solid #e5e9f0;
}

.fmt50x-tool__status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fmt50x-tool__section-title,
.fmt50x-tool__group-title {
  margin: 0;
  color: #172033;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.fmt50x-tool__group-title {
  font-size: 16px;
}

.fmt50x-tool__status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid #d9e0e9;
  border-radius: 999px;
  background: #f7f9fc;
  color: #425066;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.fmt50x-tool__status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #64748b;
}

.fmt50x-tool__status--running {
  border-color: #bcd0fa;
  background: #edf4ff;
  color: #174c9c;
}

.fmt50x-tool__status--running .fmt50x-tool__status-dot {
  background: #2563b8;
}

.fmt50x-tool__status--paused {
  border-color: #f1d58d;
  background: #fff8e8;
  color: #805b05;
}

.fmt50x-tool__status--paused .fmt50x-tool__status-dot {
  background: #c58a08;
}

.fmt50x-tool__status--complete {
  border-color: #a9dec0;
  background: #eefbf3;
  color: #17643a;
}

.fmt50x-tool__status--complete .fmt50x-tool__status-dot {
  background: #218852;
}

.fmt50x-tool__timer-area {
  margin-top: 24px;
}

.fmt50x-tool__time {
  color: #111827;
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.065em;
  line-height: 1;
  text-align: center;
}

.fmt50x-tool__progress {
  position: relative;
  width: 100%;
  height: 10px;
  margin-top: 25px;
  overflow: hidden;
  border-radius: 6px;
  background: #e8edf4;
}

.fmt50x-tool__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #2867c7;
  transition: width 180ms linear, background-color 160ms ease;
}

.fmt50x-tool__progress-text {
  margin: 8px 0 0;
  color: #617086;
  font-size: 14px;
  text-align: right;
}

.fmt50x-tool__primary-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.fmt50x-tool__button,
.fmt50x-tool__preset,
.fmt50x-tool__toggle {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.fmt50x-tool__button {
  padding: 11px 17px;
  font-size: 15px;
}

.fmt50x-tool__button--primary {
  border-color: #2158a8;
  background: #2867c7;
  color: #ffffff;
}

.fmt50x-tool__button--primary:hover {
  border-color: #19498e;
  background: #2158a8;
}

.fmt50x-tool__button--secondary,
.fmt50x-tool__button--utility {
  border-color: #cfd7e3;
  background: #ffffff;
  color: #25334a;
}

.fmt50x-tool__button--secondary:hover,
.fmt50x-tool__button--utility:hover {
  border-color: #9caabd;
  background: #f6f8fb;
}

.fmt50x-tool__button--apply {
  align-self: end;
  border-color: #c5d3e7;
  background: #eaf2fd;
  color: #194d95;
}

.fmt50x-tool__button--apply:hover {
  border-color: #98b5de;
  background: #dceafd;
}

.fmt50x-tool__button--reset {
  border-color: #e4c4c4;
  background: #fffafa;
  color: #a12b2b;
}

.fmt50x-tool__button--reset:hover {
  border-color: #d9a5a5;
  background: #fff1f1;
}

.fmt50x-tool__button:disabled {
  border-color: #dfe4eb;
  background: #eef1f5;
  color: #8a95a5;
  cursor: not-allowed;
  opacity: 0.82;
}

.fmt50x-tool__button:focus-visible,
.fmt50x-tool__preset:focus-visible,
.fmt50x-tool__toggle:focus-visible,
.fmt50x-tool__number-input:focus-visible,
.fmt50x-tool__range:focus-visible {
  outline: 3px solid rgba(37, 99, 184, 0.28);
  outline-offset: 2px;
}

.fmt50x-tool__preset-group {
  margin-top: 28px;
}

.fmt50x-tool__presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.fmt50x-tool__preset {
  padding: 9px 10px;
  border-color: #d6dde7;
  background: #ffffff;
  color: #3b485c;
  font-size: 14px;
}

.fmt50x-tool__preset:hover {
  border-color: #91acd3;
  background: #f5f8fd;
}

.fmt50x-tool__preset--active,
.fmt50x-tool__preset[aria-pressed="true"] {
  border-color: #2867c7;
  background: #eaf2fd;
  color: #174b95;
}

.fmt50x-tool__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fmt50x-tool__fieldset--alarm {
  margin-top: 27px;
  padding-top: 25px;
  border-top: 1px solid #e5e9f0;
}

.fmt50x-tool__legend {
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  color: #172033;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.fmt50x-tool__duration-row {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) 12px minmax(78px, 1fr) auto;
  align-items: end;
  gap: 9px;
}

.fmt50x-tool__field {
  min-width: 0;
}

.fmt50x-tool__label {
  display: block;
  margin-bottom: 6px;
  color: #4d5b70;
  font-size: 14px;
  font-weight: 600;
}

.fmt50x-tool__label--strong {
  margin-bottom: 2px;
  color: #26344a;
  font-size: 15px;
  font-weight: 700;
}

.fmt50x-tool__number-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 9px 10px;
  border: 1px solid #cbd4e0;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.fmt50x-tool__number-input:hover {
  border-color: #9baabe;
}

.fmt50x-tool__number-input[aria-invalid="true"] {
  border-color: #bd3636;
  background: #fffafa;
}

.fmt50x-tool__duration-separator {
  align-self: end;
  height: 46px;
  color: #67758a;
  font-size: 20px;
  font-weight: 700;
  line-height: 43px;
  text-align: center;
}

.fmt50x-tool__help,
.fmt50x-tool__message {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.fmt50x-tool__help {
  color: #657287;
}

.fmt50x-tool__message {
  min-height: 19px;
}

.fmt50x-tool__message--error {
  color: #aa2929;
  font-weight: 600;
}

.fmt50x-tool__setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fmt50x-tool__setting-note {
  display: block;
  color: #66748a;
  font-size: 13px;
  line-height: 1.4;
}

.fmt50x-tool__toggle {
  display: inline-flex;
  min-width: 91px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-color: #acc4e8;
  background: #edf4ff;
  color: #174c96;
  font-size: 14px;
}

.fmt50x-tool__toggle-track {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #2867c7;
}

.fmt50x-tool__toggle-thumb {
  position: absolute;
  top: 3px;
  left: 17px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: left 150ms ease;
}

.fmt50x-tool__toggle[aria-checked="false"] {
  border-color: #cbd3de;
  background: #f4f6f8;
  color: #4d5b70;
}

.fmt50x-tool__toggle[aria-checked="false"] .fmt50x-tool__toggle-track {
  background: #8c98a8;
}

.fmt50x-tool__toggle[aria-checked="false"] .fmt50x-tool__toggle-thumb {
  left: 3px;
}

.fmt50x-tool__volume {
  display: block;
  margin-top: 20px;
}

.fmt50x-tool__volume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fmt50x-tool__volume-value {
  color: #3f4c60;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.fmt50x-tool__range-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #68768a;
  font-size: 12px;
}

.fmt50x-tool__range {
  width: 100%;
  min-width: 0;
  height: 32px;
  accent-color: #2867c7;
  cursor: pointer;
}

.fmt50x-tool__range:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.fmt50x-tool__alarm-actions {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.fmt50x-tool__alarm-feedback,
.fmt50x-tool__copy-feedback {
  color: #267044;
  font-size: 13px;
  font-weight: 700;
}

.fmt50x-tool__utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e5e9f0;
}

.fmt50x-tool__utility-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fmt50x-tool__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 320px) and (max-width: 374px) {
  .fmt50x-tool__wrapper {
    padding: 24px 10px 30px;
  }

  .fmt50x-tool__header {
    margin-bottom: 18px;
    padding-inline: 4px;
  }

  .fmt50x-tool__title {
    font-size: 23px;
    letter-spacing: -0.025em;
  }

  .fmt50x-tool__subtitle {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.45;
  }

  .fmt50x-tool__box {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .fmt50x-tool__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .fmt50x-tool__settings-panel {
    padding: 24px 0 0;
    border-top: 1px solid #e5e9f0;
    border-left: 0;
  }

  .fmt50x-tool__section-title,
  .fmt50x-tool__legend {
    font-size: 17px;
  }

  .fmt50x-tool__time {
    font-size: 58px;
  }

  .fmt50x-tool__primary-controls {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .fmt50x-tool__button {
    width: 100%;
    min-height: 46px;
    padding-inline: 11px;
  }

  .fmt50x-tool__presets {
    gap: 6px;
  }

  .fmt50x-tool__preset {
    min-height: 44px;
    padding-inline: 5px;
    font-size: 13px;
  }

  .fmt50x-tool__duration-row {
    grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr);
    gap: 6px;
  }

  .fmt50x-tool__duration-row .fmt50x-tool__button--apply {
    grid-column: 1 / -1;
    margin-top: 3px;
  }

  .fmt50x-tool__setting-row {
    align-items: flex-start;
    gap: 8px;
  }

  .fmt50x-tool__toggle {
    width: auto;
    min-width: 83px;
  }

  .fmt50x-tool__alarm-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fmt50x-tool__utility {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fmt50x-tool__utility-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (min-width: 375px) and (max-width: 429px) {
  .fmt50x-tool__wrapper {
    padding: 26px 14px 34px;
  }

  .fmt50x-tool__header {
    margin-bottom: 20px;
  }

  .fmt50x-tool__title {
    font-size: 27px;
  }

  .fmt50x-tool__subtitle {
    font-size: 16px;
  }

  .fmt50x-tool__box {
    padding: 20px 16px;
    border-radius: 13px;
  }

  .fmt50x-tool__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 27px;
  }

  .fmt50x-tool__settings-panel {
    padding: 25px 0 0;
    border-top: 1px solid #e5e9f0;
    border-left: 0;
  }

  .fmt50x-tool__time {
    font-size: 66px;
  }

  .fmt50x-tool__primary-controls {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .fmt50x-tool__button {
    min-height: 46px;
    padding-inline: 12px;
  }

  .fmt50x-tool__presets {
    gap: 7px;
  }

  .fmt50x-tool__duration-row {
    grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
    gap: 7px;
  }

  .fmt50x-tool__duration-row .fmt50x-tool__button--apply {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 3px;
  }

  .fmt50x-tool__alarm-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .fmt50x-tool__utility {
    gap: 10px;
  }

  .fmt50x-tool__utility-copy {
    flex: 1 1 auto;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  .fmt50x-tool__wrapper {
    padding: 30px 18px 38px;
  }

  .fmt50x-tool__header {
    margin-bottom: 22px;
  }

  .fmt50x-tool__title {
    font-size: 31px;
  }

  .fmt50x-tool__subtitle {
    font-size: 16px;
  }

  .fmt50x-tool__box {
    padding: 24px 21px;
  }

  .fmt50x-tool__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .fmt50x-tool__settings-panel {
    padding: 27px 0 0;
    border-top: 1px solid #e5e9f0;
    border-left: 0;
  }

  .fmt50x-tool__time {
    font-size: 76px;
  }

  .fmt50x-tool__primary-controls {
    gap: 10px;
  }

  .fmt50x-tool__duration-row {
    grid-template-columns: minmax(82px, 1fr) 12px minmax(82px, 1fr) minmax(110px, auto);
    gap: 8px;
  }

  .fmt50x-tool__button {
    min-height: 46px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .fmt50x-tool__wrapper {
    padding: 38px 24px 48px;
  }

  .fmt50x-tool__title {
    font-size: 37px;
  }

  .fmt50x-tool__box {
    padding: 27px;
  }

  .fmt50x-tool__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(310px, 0.98fr);
    gap: 25px;
  }

  .fmt50x-tool__settings-panel {
    padding-left: 25px;
  }

  .fmt50x-tool__time {
    font-size: clamp(68px, 9vw, 88px);
  }

  .fmt50x-tool__primary-controls {
    gap: 10px;
  }

  .fmt50x-tool__duration-row {
    grid-template-columns: minmax(0, 1fr) 9px minmax(0, 1fr);
    gap: 7px;
  }

  .fmt50x-tool__duration-row .fmt50x-tool__button--apply {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 3px;
  }

  .fmt50x-tool__alarm-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .fmt50x-tool__button {
    min-height: 46px;
  }
}

@media (min-width: 1024px) {
  .fmt50x-tool__wrapper {
    padding: 46px 32px 58px;
  }

  .fmt50x-tool__title {
    font-size: 42px;
  }

  .fmt50x-tool__box {
    padding: 34px 36px;
  }

  .fmt50x-tool__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
    gap: 40px;
  }

  .fmt50x-tool__settings-panel {
    padding-left: 40px;
  }

  .fmt50x-tool__time {
    font-size: clamp(92px, 9.2vw, 124px);
  }

  .fmt50x-tool__primary-controls {
    max-width: 540px;
    margin-inline: auto;
  }

  .fmt50x-tool__button {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fmt50x-tool *,
  .fmt50x-tool *::before,
  .fmt50x-tool *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}