:root {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #111;
  background: #fafafa;
  font-synthesis: none;
  --border: #e8e8e8;
  --muted: #6f6f6f;
  --faint: #a3a3a3;
  --surface: #fff;
  --subtle: #f6f6f6;
  --ink: #111;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--subtle); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--subtle); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(14px);
}
.header-inner, .page, .site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 650; letter-spacing: -.015em; text-decoration: none; }
.mark { width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 50%; position: relative; display: inline-block; }
.mark::before, .mark i { content: ""; position: absolute; left: 9px; top: 4px; width: 1.5px; height: 6px; background: var(--ink); border-radius: 2px; transform-origin: bottom center; }
.mark i { top: 8px; height: 5px; transform: rotate(118deg); }
.header-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px color-mix(in srgb, #22a06b 12%, transparent); }
.header-separator { width: 1px; height: 12px; margin: 0 3px; background: var(--border); }

.page { padding: 38px 0 72px; }
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 206px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
}
.overview-main { padding: 28px 30px 26px; }
.kicker { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.local-line { display: flex; align-items: flex-start; margin-top: 14px; min-height: 82px; }
.local-time { font-size: clamp(64px, 8.2vw, 92px); line-height: .88; font-weight: 540; letter-spacing: -.065em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seconds { margin: 3px 0 0 9px; color: var(--faint); font-size: 19px; font-weight: 520; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.local-details { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.middot { color: #c9c9c9; }
.utc-panel { display: flex; flex-direction: column; justify-content: center; padding: 28px 30px; border-left: 1px solid var(--border); background: #fcfcfc; }
.utc-time { margin-top: 14px; font-size: 36px; line-height: 1; font-weight: 560; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.utc-date { margin-top: 10px; color: var(--muted); font-size: 12px; }

.cities { margin-top: 42px; }
.section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.section-top h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 620; letter-spacing: -.035em; }
.section-top p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.controls { display: flex; align-items: center; gap: 8px; }
.search { width: 210px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.search svg { width: 15px; height: 15px; flex: none; stroke: var(--faint); fill: none; stroke-width: 1.6; }
.search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search input::placeholder { color: var(--faint); }
.format-toggle { height: 34px; min-width: 48px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 12px; cursor: pointer; }
.format-toggle:hover { background: var(--subtle); color: var(--ink); }

.timezone-table { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.table-head, .zone-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(140px, .7fr) minmax(120px, .55fr) minmax(270px, 1.25fr);
  align-items: center;
  column-gap: 24px;
}
.table-head { min-height: 40px; padding: 0 20px; border-bottom: 1px solid var(--border); color: var(--faint); background: #fcfcfc; font-size: 10px; font-weight: 650; letter-spacing: .055em; text-transform: uppercase; }
.zone-row { min-height: 82px; padding: 14px 20px; border-bottom: 1px solid var(--border); transition: background .12s ease; }
.zone-row:last-child { border-bottom: 0; }
.zone-row:hover { background: #fcfcfc; }
.zone-row[hidden] { display: none; }
.place, .row-time, .difference { min-width: 0; }
.place strong, .row-time strong, .difference strong { display: block; }
.place strong { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.place span { display: block; margin-top: 5px; color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time strong { font-size: 23px; line-height: 1; font-weight: 560; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.row-time span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.difference strong { font-size: 13px; font-weight: 560; }
.difference span { display: block; margin-top: 6px; color: var(--faint); font-size: 11px; }

.day-track { min-width: 0; }
.track { position: relative; height: 8px; border-radius: 999px; overflow: visible; background: linear-gradient(90deg, #ededed 0 25%, #f6f6f6 25% 75%, #ededed 75% 100%); }
.workday { position: absolute; left: 37.5%; top: 0; width: 37.5%; height: 8px; border-radius: 999px; background: #d9d9d9; }
.track i { position: absolute; top: -4px; left: var(--marker, 0%); width: 2px; height: 16px; border-radius: 2px; background: #111; box-shadow: 0 0 0 2px var(--surface); transform: translateX(-1px); }
.track-labels { display: flex; justify-content: space-between; margin-top: 7px; color: #b2b2b2; font-size: 9px; font-variant-numeric: tabular-nums; }
.no-results { padding: 28px 20px; color: var(--muted); text-align: center; font-size: 13px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 34px; color: var(--faint); font-size: 11px; }
.site-footer div { display: flex; gap: 14px; }
.site-footer div span:first-child { color: var(--muted); font-weight: 600; }

@media (max-width: 860px) {
  .overview { grid-template-columns: 1fr; }
  .utc-panel { border-left: 0; border-top: 1px solid var(--border); }
  .table-head, .zone-row { grid-template-columns: 1fr 140px 110px; }
  .table-head span:last-child, .day-track { display: none; }
}

@media (max-width: 620px) {
  .header-inner, .page, .site-footer { width: calc(100% - 26px); }
  .page { padding-top: 22px; }
  .overview-main { padding: 24px 20px; }
  .local-time { font-size: clamp(54px, 18vw, 76px); }
  .utc-panel { padding: 22px 20px; }
  .section-top { align-items: stretch; flex-direction: column; gap: 14px; }
  .controls, .search { width: 100%; }
  .search { flex: 1; }
  .table-head { display: none; }
  .zone-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 74px; padding: 14px 16px; column-gap: 18px; }
  .difference { display: none; }
  .row-time { text-align: right; }
  .row-time strong { font-size: 21px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .site-footer div { flex-direction: column; gap: 4px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --border: #292929;
    --muted: #a1a1a1;
    --faint: #737373;
    --surface: #111;
    --subtle: #0a0a0a;
    --ink: #ededed;
  }
  html, body { background: #0a0a0a; }
  .site-header { background: color-mix(in srgb, #0a0a0a 93%, transparent); }
  .utc-panel, .table-head { background: #0d0d0d; }
  .zone-row:hover { background: #0d0d0d; }
  .track { background: linear-gradient(90deg, #242424 0 25%, #191919 25% 75%, #242424 75% 100%); }
  .workday { background: #303030; }
  .track i { background: #ededed; }
  .track-labels { color: #525252; }
}
