@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');

.tc24-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  color: #18243a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.tc24-wrap *,
.tc24-wrap *::before,
.tc24-wrap *::after {
  box-sizing: border-box;
}

.tc24-hero {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 16px;
  text-align: center;
}

.tc24-hero h1 {
  margin: 0;
  color: #11203b;
  font-size: clamp(1.44rem, 5vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.tc24-hero p {
  max-width: 650px;
  margin: 12px auto 0;
  color: #526077;
  font-size: 1rem;
}

.tc24-card {
  width: min(100%, 1300px);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 20px;
  box-shadow: 0 20px 55px rgba(19, 39, 70, 0.10), 0 3px 10px rgba(19, 39, 70, 0.05);
}

.tc24-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #dce7ec;
  border-bottom: 1px solid #dce7ec;
}

.tc24-features li {
  position: relative;
  min-height: 46px;
  padding: 12px 10px 12px 29px;
  background: #f7fafb;
  color: #405268;
  font-size: 0.79rem;
  font-weight: 700;
}

.tc24-features li::before {
  position: absolute;
  top: 18px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #175d91, #12a59b);
  content: "";
}

.tc24-direction {
  padding: 22px 16px 8px;
}

.tc24-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: #5d6c81;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tc24-segmented {
  display: flex;
  width: 100%;
  gap: 4px;
  padding: 4px;
  background: #edf2f5;
  border: 1px solid #dce5ea;
  border-radius: 12px;
}

.tc24-mode,
.tc24-ampm {
  min-height: 44px;
  flex: 1;
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #506076;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tc24-mode.is-active,
.tc24-ampm.is-active {
  background: linear-gradient(135deg, #193f75, #0c8f91);
  color: #fff;
  box-shadow: 0 3px 8px rgba(20, 69, 112, 0.22);
}

.tc24-layout {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.tc24-input-panel,
.tc24-result-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dee7ed;
  border-radius: 16px;
}

.tc24-input-panel {
  background: #fff;
}

.tc24-result-panel {
  background: linear-gradient(145deg, #f4fbfc, #f8fafc 65%);
}

.tc24-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 20px;
}

.tc24-step {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 50%;
  background: #e0f1f1;
  color: #15666d;
  font-size: 0.82rem;
  font-weight: 800;
}

.tc24-panel-heading h2 {
  margin: 0;
  color: #172640;
  font-size: 1.08rem;
  line-height: 1.25;
}

.tc24-panel-heading p {
  margin: 3px 0 0;
  color: #607087;
  font-size: 0.87rem;
}

.tc24-fields {
  display: grid;
  gap: 14px;
}

.tc24-field {
  min-width: 0;
}

.tc24-field label,
.tc24-meridiem legend {
  display: block;
  margin-bottom: 7px;
  color: #33445d;
  font-size: 0.87rem;
  font-weight: 800;
}

.tc24-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  appearance: none;
  border: 1px solid #bdcad7;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #14223a;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.tc24-field input::placeholder {
  color: #8b98a9;
  font-weight: 400;
}

.tc24-field small {
  display: block;
  margin-top: 6px;
  color: #6a798c;
  font-size: 0.76rem;
  line-height: 1.35;
}

.tc24-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7a8999;
  font-size: 0.78rem;
  font-weight: 700;
}

.tc24-or::before,
.tc24-or::after {
  height: 1px;
  flex: 1;
  background: #dce5eb;
  content: "";
}

.tc24-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 9px;
}

.tc24-colon {
  padding-bottom: 11px;
  color: #51617a;
  font-size: 1.5rem;
  font-weight: 800;
}

.tc24-meridiem {
  margin: 0;
  padding: 0;
  border: 0;
}

.tc24-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 700;
}

.tc24-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 6px;
}

.tc24-button,
.tc24-copy {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tc24-primary,
.tc24-copy {
  background: linear-gradient(135deg, #183f76, #0b8d8f);
  color: #fff;
  box-shadow: 0 7px 15px rgba(18, 83, 119, 0.18);
}

.tc24-secondary {
  border-color: #bccbd6;
  background: #fff;
  color: #263c58;
}

.tc24-quiet {
  border-color: transparent;
  background: #eef4f6;
  color: #3d5368;
}

.tc24-result-box {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid #cbe2e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 81, 94, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tc24-result-box.is-updated {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(24, 81, 94, 0.13);
}

.tc24-result-time {
  display: block;
  overflow-wrap: anywhere;
  color: #102d50;
  font-size: clamp(2rem, 9vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.tc24-result-detail,
.tc24-result-reading {
  margin: 11px 0 0;
  color: #4f6275;
  font-size: 0.9rem;
}

.tc24-result-reading {
  margin-top: 4px;
  color: #627488;
}

.tc24-copy {
  width: 100%;
  margin-top: 14px;
}

.tc24-copy-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #08726e;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.tc24-local-note {
  margin: 4px 0 0;
  color: #718094;
  font-size: 0.76rem;
  text-align: center;
}

.tc24-wrap button:hover {
  transform: translateY(-1px);
}

.tc24-wrap button:active {
  transform: translateY(0);
}

.tc24-wrap button:focus-visible,
.tc24-wrap input:focus-visible {
  outline: 3px solid rgba(15, 143, 151, 0.30);
  outline-offset: 2px;
}

.tc24-wrap input:focus {
  border-color: #168e94;
  box-shadow: 0 0 0 3px rgba(22, 142, 148, 0.12);
}

.tc24-wrap input[aria-invalid="true"] {
  border-color: #c83f35;
  background: #fff8f7;
}

@media (min-width: 320px) and (max-width: 374px) {
  .tc24-hero {
    margin-bottom: 18px;
    padding: 0 10px;
  }

  .tc24-hero h1 {
    font-size: 1.43rem;
  }

  .tc24-card {
    border-radius: 14px;
  }

  .tc24-features li {
    min-height: 43px;
    padding-left: 25px;
    font-size: 0.72rem;
  }

  .tc24-features li::before {
    left: 10px;
  }

  .tc24-direction,
  .tc24-layout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tc24-input-panel,
  .tc24-result-panel {
    padding: 16px;
    border-radius: 13px;
  }

  .tc24-mode {
    font-size: 0.76rem;
  }
}

@media (min-width: 375px) and (max-width: 429px) {
  .tc24-hero h1 {
    font-size: 1.55rem;
  }

  .tc24-layout {
    padding: 16px;
  }

  .tc24-actions {
    grid-template-columns: 1fr 1fr;
  }

  .tc24-primary {
    grid-column: 1 / -1;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  .tc24-features {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .tc24-features li {
    padding: 12px 7px 12px 22px;
    font-size: 0.68rem;
  }

  .tc24-features li::before {
    left: 9px;
  }

  .tc24-fields-24 {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
  }

  .tc24-or {
    align-self: center;
    width: 22px;
    padding-top: 2px;
  }

  .tc24-or::before,
  .tc24-or::after {
    display: none;
  }

  .tc24-actions {
    grid-template-columns: 1.2fr 1fr 0.8fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .tc24-hero {
    margin-bottom: 28px;
  }

  .tc24-features {
    grid-template-columns: repeat(4, 1fr);
  }

  .tc24-features li {
    padding-left: 28px;
    font-size: 0.76rem;
  }

  .tc24-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: stretch;
    gap: 18px;
    padding: 20px;
  }

  .tc24-fields-24 {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
  }

  .tc24-or {
    align-self: center;
    width: 22px;
  }

  .tc24-or::before,
  .tc24-or::after {
    display: none;
  }

  .tc24-actions {
    grid-template-columns: 1.15fr 0.85fr 0.75fr;
  }
}

@media (min-width: 1024px) {
  .tc24-hero {
    margin-bottom: 30px;
  }

  .tc24-card {
    border-radius: 22px;
  }

  .tc24-features {
    grid-template-columns: repeat(4, 1fr);
  }

  .tc24-features li {
    padding: 14px 16px 14px 35px;
    font-size: 0.86rem;
  }

  .tc24-features li::before {
    left: 18px;
    top: 20px;
  }

  .tc24-direction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px 8px;
  }

  .tc24-eyebrow {
    margin: 0;
  }

  .tc24-direction .tc24-segmented {
    width: min(510px, 58%);
  }

  .tc24-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
    gap: 22px;
    padding: 20px 26px 26px;
  }

  .tc24-input-panel,
  .tc24-result-panel {
    padding: 25px;
  }

  .tc24-fields-24 {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
  }

  .tc24-or {
    align-self: center;
    width: 25px;
  }

  .tc24-or::before,
  .tc24-or::after {
    display: none;
  }

  .tc24-actions {
    grid-template-columns: 1.2fr 0.9fr 0.75fr;
  }

  .tc24-result-box {
    min-height: 214px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc24-wrap *,
  .tc24-wrap *::before,
  .tc24-wrap *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}