@font-face {
  font-family: "Inter Local";
  src: url("/fonts/inter-latin-var.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono Local";
  src: url("/fonts/jetbrains-mono-latin-var.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-quiet: #fbfcfd;
  --ink: #101217;
  --body: #414756;
  --muted: #707789;
  --tertiary: #8a919f;
  --line: #e7eaf0;
  --line-strong: #d7dce5;
  --accent: #2563f6;
  --accent-hover: #174fd2;
  --accent-soft: #eef3ff;
  --success: #3e8a55;
  --success-soft: #eff7f1;
  --success-line: #b8d8c2;
  --warning: #a76813;
  --warning-soft: #fff7e7;
  --danger: #c53d43;
  --danger-soft: #fff2f3;
  --focus: rgba(37, 99, 246, 0.22);
  --shadow-popover: 0 18px 48px rgba(22, 29, 44, 0.14);
  --radius: 8px;
  --sans: "Inter Local", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono Local", "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #101217;
  --surface: #101217;
  --surface-soft: #171a21;
  --surface-quiet: #13161c;
  --ink: #f5f7fb;
  --body: #d1d6df;
  --muted: #a1a9b7;
  --tertiary: #818a99;
  --line: #292f39;
  --line-strong: #3a424f;
  --accent: #6d9cff;
  --accent-hover: #91b5ff;
  --accent-soft: #172442;
  --success: #6cc28a;
  --success-soft: #14261c;
  --success-line: #2e5e3e;
  --warning: #e4b96d;
  --warning-soft: #2b2112;
  --danger: #ff858a;
  --danger-soft: #31191b;
  --focus: rgba(109, 156, 255, 0.28);
  --shadow-popover: 0 20px 54px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
summary {
  font: inherit;
}

button,
summary {
  color: inherit;
}

button {
  border: 0;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--focus);
}

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

.app {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 34px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.brand-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 27px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sync-button,
.icon-button,
.primary-button,
.segmented,
.segmented button {
  min-height: 44px;
}

.sync-button {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--body);
  cursor: pointer;
}

.sync-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.sync-button.is-syncing .status-icon {
  animation: spin 900ms linear infinite;
}

.sync-button.is-error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
}

.status-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.edge-label {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.segmented {
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.segmented button {
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.icon-button {
  width: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.ui-icon {
  object-fit: contain;
  opacity: 0.72;
}

[data-theme="dark"] .ui-icon,
[data-theme="dark"] .status-icon:not([src*="green"]) {
  filter: invert(1);
}

.primary-button {
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(37, 99, 246, 0.18);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.primary-button img {
  filter: invert(1);
}

main {
  min-width: 0;
}

.overview {
  min-height: 278px;
  padding: 38px 0 28px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 55px;
  align-items: start;
}

.local-panel {
  min-width: 0;
}

.section-label {
  padding: 0;
  background: transparent;
  color: var(--body);
  font-size: 17px;
  font-weight: 650;
}

.baseline-reset {
  min-height: 32px;
  border-radius: 5px;
  cursor: pointer;
}

.baseline-reset:hover {
  color: var(--accent);
}

.main-time {
  margin-top: 12px;
  font-size: clamp(52px, 4.4vw, 68px);
  font-weight: 730;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

[data-hour-mode="12"] .main-time {
  font-size: clamp(43px, 3.8vw, 58px);
}

.main-date-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-variant-numeric: tabular-nums;
}

.main-date-row strong {
  font-size: 19px;
  font-weight: 650;
}

.offset-pill {
  min-height: 30px;
  padding: 4px 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.zone-row {
  min-width: 0;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.zone-row > span {
  white-space: nowrap;
}

.zone-id {
  min-width: 0;
  overflow: hidden;
  color: var(--tertiary);
  text-overflow: ellipsis;
}

.timeline-panel {
  min-width: 0;
}

.timeline-heading {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.timeline-heading h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 680;
}

.timeline-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.timeline-insight {
  max-width: 420px;
  color: var(--success);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.timeline-canvas {
  min-width: 0;
  padding-top: 1px;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.timeline-track {
  --marker-position: 30%;
  --window-start: 30%;
  --window-width: 40%;
  height: 96px;
  margin-top: 16px;
  position: relative;
  border-top: 1px solid var(--line-strong);
}

.phase {
  position: absolute;
  top: 50px;
  height: 46px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.phase-night-a {
  left: 0;
  width: 25%;
}

.phase-morning {
  left: 25%;
  width: 25%;
  background: var(--surface-quiet);
}

.phase-afternoon {
  left: 50%;
  width: 25%;
  background: var(--surface-quiet);
}

.phase-night-b {
  right: 0;
  width: 25%;
}

.contact-window {
  position: absolute;
  left: var(--window-start);
  top: 0;
  width: var(--window-width);
  min-width: 88px;
  height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--success-line);
  border-radius: 7px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.contact-window::before,
.contact-window::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--success);
}

.contact-window::before {
  left: -1px;
}

.contact-window::after {
  right: -1px;
}

.current-marker {
  position: absolute;
  left: var(--marker-position);
  top: -8px;
  width: 2px;
  height: 104px;
  background: var(--accent);
  transform: translateX(-1px);
  z-index: 2;
}

.current-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 49px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.current-marker span {
  position: absolute;
  left: 50%;
  top: -30px;
  min-width: 54px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}

.phase-labels {
  display: grid;
  grid-template-columns: repeat(4, 25%);
  color: var(--muted);
  font-size: 13px;
}

.phase-labels span {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.cities-section {
  min-width: 0;
  padding-top: 5px;
}

.cities-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cities-header > div:first-child {
  order: 2;
  margin-left: auto;
}

.cities-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.cities-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.searchbar {
  width: min(664px, 62vw);
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.search-wrap {
  min-width: 0;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

#searchInput {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
}

#searchInput::placeholder {
  color: var(--tertiary);
}

#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.search-submit {
  display: none;
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 330px;
  display: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
  z-index: 20;
}

.suggestions.open {
  display: block;
}

.suggestion {
  min-height: 62px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion[aria-selected="true"] {
  background: var(--accent-soft);
}

.suggestion strong,
.suggestion span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion strong {
  font-size: 14px;
}

.suggestion .suggestion-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.suggestion .suggestion-offset {
  color: var(--muted);
  font-size: 12px;
}

.suggestion.empty {
  display: flex;
  color: var(--muted);
  cursor: default;
}

.feedback {
  min-height: 26px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--danger);
}

.table-wrap {
  min-width: 0;
}

.city-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.city-table th,
.city-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.city-table th {
  height: 48px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 540;
  white-space: nowrap;
}

.city-table td {
  height: 73px;
  padding: 9px 6px 9px 0;
}

.city-table th:nth-child(1),
.city-table td:nth-child(1) { width: 31.5%; }
.city-table th:nth-child(2),
.city-table td:nth-child(2) { width: 14.5%; }
.city-table th:nth-child(3),
.city-table td:nth-child(3) { width: 13.5%; }
.city-table th:nth-child(4),
.city-table td:nth-child(4) { width: 13.5%; }
.city-table th:nth-child(5),
.city-table td:nth-child(5) { width: 13.5%; }
.city-table th:nth-child(6),
.city-table td:nth-child(6) { width: 11%; }
.city-table th:nth-child(7),
.city-table td:nth-child(7) { width: 2.5%; padding-right: 0; text-align: right; }

.city-table tbody tr {
  transition: background-color 140ms ease;
}

.city-table tbody tr:hover {
  background: var(--surface-quiet);
}

.city-table tbody tr[data-baseline="true"] {
  background: var(--accent-soft);
}

.city-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.baseline-button,
.remove-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.baseline-button:hover,
.remove-button:hover {
  background: var(--surface-soft);
}

.baseline-button img,
.remove-button img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

[data-theme="dark"] .baseline-button img[src$="star.png"],
[data-theme="dark"] .remove-button img {
  filter: invert(1);
}

.remove-button {
  opacity: 0;
  transition: opacity 140ms ease, background-color 140ms ease;
}

tr:hover .remove-button,
.remove-button:focus-visible {
  opacity: 0.72;
}

.remove-button:hover {
  opacity: 1;
  background: var(--danger-soft);
}

.city-copy {
  min-width: 0;
}

.city-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  font-weight: 680;
  white-space: nowrap;
}

.baseline-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 620;
}

.city-meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-time {
  font-size: 25px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

[data-hour-mode="12"] .row-time {
  font-size: 20px;
}

.diff-label,
.date-value,
.status-label,
.recommendation {
  color: var(--body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.date-value span {
  display: block;
}

.date-value small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 550;
}

.status-label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--tertiary);
}

.status-label.work::before { background: var(--success); }
.status-label.morning::before { background: #e0b32a; }
.status-label.evening::before { background: var(--accent); }

.recommendation {
  font-weight: 620;
}

.recommendation.good { color: var(--success); }
.recommendation.okay { color: var(--accent); }
.recommendation.wait { color: var(--muted); }

.empty-state {
  min-height: 230px;
  padding: 40px 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state strong {
  color: var(--ink);
  font-size: 17px;
}

.empty-state button {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 650;
}

.trust-footer {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.trust-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  font-variant-numeric: tabular-nums;
}

.technical-details {
  position: relative;
}

.technical-details summary {
  min-height: 44px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 620;
  list-style: none;
}

.technical-details summary::-webkit-details-marker {
  display: none;
}

.technical-content {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(480px, calc(100vw - 40px));
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
  color: var(--muted);
}

.technical-content strong {
  margin-left: 5px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 560;
}

.technical-content nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
}

.technical-content a {
  color: var(--accent);
  text-decoration: none;
}

.technical-content a:hover {
  text-decoration: underline;
}

.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  min-width: min(360px, calc(100vw - 32px));
  min-height: 52px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-popover);
  color: var(--body);
  transform: translateX(-50%);
  z-index: 30;
}

.undo-toast[hidden] {
  display: none;
}

.undo-toast button {
  min-width: 62px;
  min-height: 36px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .brand-copy span,
  .edge-label {
    display: none;
  }

  .overview {
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 36px;
  }

  .city-table th:nth-child(6),
  .city-table td:nth-child(6) {
    display: none;
  }

  .city-table th:nth-child(1),
  .city-table td:nth-child(1) { width: 34%; }
  .city-table th:nth-child(2),
  .city-table td:nth-child(2) { width: 16%; }
  .city-table th:nth-child(3),
  .city-table td:nth-child(3) { width: 15%; }
  .city-table th:nth-child(4),
  .city-table td:nth-child(4) { width: 15%; }
  .city-table th:nth-child(5),
  .city-table td:nth-child(5) { width: 16.5%; }
  .city-table th:nth-child(7),
  .city-table td:nth-child(7) { width: 3.5%; }
}

@media (max-width: 900px) {
  .app {
    padding: 0 24px;
  }

  .topbar {
    min-height: 82px;
  }

  .sync-button,
  .segmented {
    display: none;
  }

  .overview {
    padding-top: 30px;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .local-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .baseline-reset,
  .main-time {
    grid-column: 1;
  }

  .main-date-row,
  .zone-row {
    grid-column: 2;
  }

  .main-date-row {
    grid-row: 1 / span 2;
    align-self: end;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
  }

  .zone-row {
    margin-top: 12px;
  }

  .cities-header {
    align-items: flex-start;
  }

  .searchbar {
    width: 100%;
  }

  .cities-header > div:first-child {
    display: none;
  }

  .city-table,
  .city-table tbody,
  .city-table tr,
  .city-table td {
    display: block;
    width: 100% !important;
  }

  .city-table thead {
    display: none;
  }

  .city-table tr {
    min-height: 122px;
    padding: 14px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(120px, 0.8fr) 44px;
    grid-template-rows: auto auto;
    column-gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .city-table td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .city-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .city-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .city-table td:nth-child(3) { grid-column: 1; grid-row: 2; padding-left: 44px; }
  .city-table td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .city-table td:nth-child(5) { grid-column: 1; grid-row: 2; padding-left: min(42%, 180px); }
  .city-table td:nth-child(6) { display: block; grid-column: 2; grid-row: 2; padding-left: 92px; }
  .city-table td:nth-child(7) { grid-column: 3; grid-row: 1 / span 2; }

  .remove-button {
    opacity: 0.7;
  }

  .trust-summary span:nth-of-type(2),
  .trust-summary span:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 0 16px;
  }

  .topbar {
    min-height: 132px;
    padding: 14px 0;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-copy strong {
    font-size: 22px;
  }

  .toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .primary-button {
    flex: 1;
  }

  .overview {
    padding-top: 26px;
  }

  .local-panel {
    display: block;
  }

  .main-time {
    font-size: clamp(48px, 15vw, 62px);
  }

  [data-hour-mode="12"] .main-time {
    font-size: clamp(40px, 12vw, 50px);
  }

  .main-date-row {
    margin-top: 16px;
    flex-direction: row;
    align-items: center;
  }

  .zone-row {
    margin-top: 16px;
  }

  .timeline-heading {
    display: block;
  }

  .timeline-insight {
    max-width: none;
    margin-top: 7px;
    text-align: left;
    white-space: normal;
  }

  .axis-labels span:nth-child(even) {
    display: none;
  }

  .contact-window {
    padding: 0 7px;
    font-size: 11px;
  }

  .feedback {
    min-height: 30px;
  }

  .city-table tr {
    min-height: 154px;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    grid-template-rows: auto auto auto;
    column-gap: 10px;
  }

  .city-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .city-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .city-table td:nth-child(3) { grid-column: 1; grid-row: 2; padding-left: 44px; }
  .city-table td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .city-table td:nth-child(5) { grid-column: 1; grid-row: 3; padding-left: 44px; }
  .city-table td:nth-child(6) { grid-column: 2; grid-row: 3; padding-left: 0; }
  .city-table td:nth-child(7) { grid-column: 3; grid-row: 1 / span 3; }

  .row-time {
    font-size: 22px;
  }

  .trust-footer {
    min-height: 88px;
  }

  .trust-summary {
    gap: 9px;
  }

  .technical-content {
    grid-template-columns: 1fr;
  }
}

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