:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1e2c3d;
  background: #f4f6f9;
  --blue: #2869bd;
  --blue-dark: #215795;
  --blue-pale: #ecf3fc;
  --line: #d4dce6;
  --soft-line: #e3e8ef;
  --muted: #53647a;
  --work: #14745f;
  --work-soft: #e5f3ec;
  --soft: #8d6125;
  --soft-bg: #fcf3e2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
select {
  appearance: none; border: 1px solid #c9d4e1; border-radius: 4px; color: #293f59;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2357687e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 10px auto;
  padding: 6px 30px 6px 9px; cursor: pointer;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 660; letter-spacing: -.6px; line-height: 1.3; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 18px; font-weight: 620; }
.wrap { width: min(100% - 64px, 1040px); margin-inline: auto; }
.header { background: white; border-bottom: 1px solid var(--line); }
.masthead, .page-title, .section-heading, .location-heading, .dialog-head, .map-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead { min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #192e48; font-size: 20px; font-weight: 680; letter-spacing: .5px; text-decoration: none; }
.brand img { flex: none; }
.brand-suffix { color: var(--muted); font-size: 14px; font-weight: 450; letter-spacing: normal; padding-left: 10px; border-left: 1px solid var(--line); }
.home-clock { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 14px; }
.home-clock label { color: var(--muted); }
#home-time { font-size: 19px; font-weight: 650; color: #273e5b; font-variant-numeric: tabular-nums; }
.workspace { padding-block: clamp(24px, 4vh, 40px) 0; }
.page-title { margin-bottom: 15px; }
.search-launch, .search-field { display: flex; align-items: center; gap: 10px; color: var(--muted); border: 1px solid #cbd5e0; background: white; border-radius: 4px; }
.search-launch { padding: 8px 11px; font-size: 15px; min-height: 38px; }
.search-launch:hover, .close:hover { color: var(--blue); border-color: #92afd3; }
.search-icon { display: inline-block; position: relative; width: 14px; height: 14px; border: 1.6px solid currentColor; border-radius: 50%; margin: -3px 3px 0 0; flex: none; }
.search-icon::after { content: ''; position: absolute; width: 6px; height: 1.6px; background: currentColor; transform: rotate(45deg); right: -4px; bottom: -2px; }
kbd { margin-left: 10px; padding: 0 5px; line-height: 18px; border: 1px solid var(--line); border-radius: 3px; font: 13px/18px monospace; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 2px 9px; margin-bottom: -1px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 16px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: 640; }
#favorite-count { font-size: 13px; background: #e5eaf1; padding: 0 6px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.tabs [aria-selected="true"] #favorite-count { color: var(--blue-dark); background: #dceafa; }
.panel, .focus-card, .city-card { background: white; border: 1px solid var(--line); border-radius: 6px; }
.quick-cities, .region-filters, .map-region-nav, .map-city-options { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.quick-cities { margin-bottom: 12px; }
.quick-cities button, .region-filters button, .map-region-nav button, .map-city-options button {
  min-height: 33px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 4px; color: #384d65; background: white; font-size: 14px;
}
.quick-cities button:hover, .region-filters button:hover, .map-region-nav button:hover, .map-city-options button:hover,
.quick-cities button.active, .region-filters button.active, .map-region-nav button[aria-pressed="true"], .map-city-options button[aria-pressed="true"] {
  color: var(--blue-dark); background: var(--blue-pale); border-color: #91b2da;
}
.quick-cities [data-search] { background: transparent; border-style: dashed; }
.focus-card { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; scroll-margin-top: 12px; }
.time-panel, .contact-panel { padding: clamp(20px, 2.5vw, 28px); min-width: 0; }
.time-panel { display: flex; flex-direction: column; background: #eff5fc; border-right: 1px solid #d3dfed; }
.location-heading { align-items: flex-start; gap: 10px; }
.country, .english-city { color: #445c77; font-size: 15px; }
.city-names { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; margin-top: 2px; overflow-wrap: anywhere; }
.city-names h2 { color: #213a58; font-size: 27px; letter-spacing: -.5px; }
.favorite-button { flex: none; padding: 0; width: 38px; height: 38px; border-radius: 4px; border: 1px solid #c2d3e7; font-size: 23px; color: var(--blue-dark); background: white; }
.favorite-button:hover { border-color: var(--blue); background: #f8fbff; }
.big-time, .map-current-time, .card-time, .map-peek strong { font-variant-numeric: tabular-nums; }
.big-time { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 4px; margin: 12px 0 5px; color: #184b87; line-height: 1.08; }
#focus-time { font-size: clamp(58px, 6.7vw, 85px); font-weight: 550; letter-spacing: -.046em; }
#focus-seconds { color: #507195; font-size: clamp(25px, 2.7vw, 34px); font-weight: 480; }
#focus-seconds::before { content: ':'; }
.date-line, .time-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 11px; color: #384d65; }
.day-label { font-size: 14px; color: #52677f; }
.time-meta { margin-top: auto; padding-top: 18px; color: #49617d; font-size: 14px; overflow-wrap: anywhere; }
.time-meta span + span { border-left: 1px solid #b5c7da; padding-left: 10px; }
.contact-panel { display: flex; flex-direction: column; align-items: stretch; }
.contact-panel h2 { color: #44566d; font-size: 15px; font-weight: 550; }
.status-heading { display: flex; gap: 9px; align-items: center; color: var(--blue-dark); margin: 8px 0 3px; }
.status-heading[data-kind="work"] { color: var(--work); }
.status-heading[data-kind="soft"] { color: var(--soft); }
.status-heading h3 { font-size: 21px; }
.status-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; font-size: 17px; }
#status-description, .next-window span, .next-window small { font-size: 14px; color: var(--muted); }
.next-window { display: grid; gap: 1px; margin-top: 13px; }
.next-window strong { color: #263b55; font-weight: 600; font-variant-numeric: tabular-nums; }
.rules-button { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; margin-top: 14px; padding: 10px 0 0; border-top: 1px solid var(--soft-line); color: var(--blue-dark); font-size: 14px; text-align: left; }
#rule-summary { color: var(--muted); font-variant-numeric: tabular-nums; }
.rules-button svg { margin-left: auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rules-button:hover { text-decoration: underline; }
.day-section { margin-top: 16px; padding: 17px 23px 15px; }
.legend, .map-legend, .legend span, .map-legend span { display: flex; align-items: center; }
.legend { gap: 13px; font-size: 13px; color: var(--muted); }
.legend span, .map-legend span { gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend .rest, .hour-blocks > div { background: #dde5ef; }
.legend .work, .hour-blocks > .work { background: #408f82; }
.legend .lunch, .hour-blocks > .lunch { background: #deb674; }
.timeline { margin: 27px 0 4px; position: relative; }
.hour-blocks { display: grid; grid-template-columns: repeat(24,minmax(0,1fr)); gap: 2px; height: 13px; border-radius: 3px; overflow: hidden; }
.now-marker { position: absolute; top: 0; bottom: -1px; transform: translateX(-50%); width: 2px; background: var(--blue-dark); pointer-events: none; }
.now-marker span { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); white-space: nowrap; color: var(--blue-dark); font-size: 12px; font-weight: 640; }
.hour-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.favorites-section { margin-top: 19px; }
.favorites-section .section-heading { margin-bottom: 10px; }
.text-button { color: var(--blue-dark); font-size: 15px; padding: 4px 0 4px 8px; }
.text-button:hover { text-decoration: underline; }
.favorites-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.city-card { min-width: 0; padding: 14px 16px; display: grid; gap: 6px; text-align: left; }
.city-card:hover, .city-card.selected { border-color: #88acd8; }
.card-top, .card-time, .card-bottom { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; justify-content: space-between; }
.card-top strong, .card-top small { overflow-wrap: anywhere; }
.card-top strong { font-weight: 610; font-size: 16px; }
.card-top small, .card-bottom { font-size: 13px; color: var(--muted); }
.card-time { align-items: center; font-size: 30px; font-weight: 550; letter-spacing: -.5px; }
.status-pill { display: inline-block; background: #edf1f6; color: #4f6075; border-radius: 4px; padding: 2px 7px; font-size: 13px; font-weight: 500; letter-spacing: normal; }
.status-pill.work { background: var(--work-soft); color: var(--work); }
.status-pill.soft { background: var(--soft-bg); color: var(--soft); }
.empty-favorites { grid-column: 1/-1; padding: 18px; border: 1px dashed var(--line); border-radius: 5px; color: var(--muted); font-size: 15px; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 20px; margin-top: 25px; padding: 14px 0 23px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--blue); text-decoration: underline; }
.data-credit { width: 100%; }
#map-panel { overflow: hidden; }
.map-topbar, .map-region-nav { padding: 15px 20px 0; }
.map-country-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.map-country-select select { width: min(200px, 45vw); }
.map-region-nav { padding-top: 12px; padding-bottom: 14px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; border-block: 1px solid var(--line); }
.map-canvas-wrap { position: relative; min-width: 0; background: #eef4fa; }
.map-canvas { height: 100%; min-height: 400px; overflow: hidden; }
.map-canvas svg { display: block; width: 100%; height: 100%; min-height: 400px; touch-action: none; user-select: none; }
.map-loading { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; color: var(--muted); }
.map-loading button, .load-more { color: var(--blue-dark); border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 5px 11px; }
.map-grid { fill: none; stroke: #cedde9; stroke-width: .6; vector-effect: non-scaling-stroke; }
.map-country-path { fill: #d8e3ee; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
.map-country-path.covered { fill: #b9cfe2; }
.map-country-path:hover { fill: #94b7d5; }
.map-country-path.active { fill: #87afd4; stroke: #537fa9; }
.map-country-label, .map-pin text { fill: #385775; paint-order: stroke; stroke: #f4f8fc; stroke-width: 3px; stroke-linejoin: round; font-size: 12px; pointer-events: none; }
.map-country-label { text-anchor: middle; }
.map-ocean-label { fill: #687f95; font-size: 12px; pointer-events: none; }
.map-pin { cursor: pointer; }
.pin-hit { fill: transparent; }
.pin-dot { fill: #2967a5; stroke: #fff; stroke-width: 1.5; }
.pin-ring { fill: #245d91; opacity: 0; }
.map-pin.selected .pin-ring, .map-pin:focus-visible .pin-ring, .map-pin:hover .pin-ring { opacity: .2; }
.map-pin.selected .pin-dot { fill: #8a581c; stroke: #fff3d3; stroke-width: 2; }
.map-pin:not(.selected) text { display: none; }
.map-pin:hover text, .map-pin:focus-visible text { display: block; }
.map-controls { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; border: 1px solid #bdcddf; background: white; border-radius: 4px; overflow: hidden; }
.map-controls button { padding: 1px 8px; min-height: 32px; width: 34px; color: #355676; font-size: 19px; }
.map-controls button + button { border-top: 1px solid var(--line); }
.map-controls button:hover:enabled, .map-detail-button:hover { background: var(--blue-pale); }
.map-hover-label, .map-legend, .map-peek { position: absolute; background: #fffffff2; border: 1px solid #c6d4e1; border-radius: 4px; }
.map-hover-label { opacity: 0; left: 12px; top: 12px; padding: 4px 8px; pointer-events: none; font-size: 13px; }
.map-hover-label.visible { opacity: 1; }
.map-legend { left: 12px; bottom: 12px; gap: 14px; padding: 4px 7px; font-size: 12px; color: #52667d; pointer-events: none; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; background: #2967a5; }
.map-legend i.selected { background: #8a581c; }
.map-peek { display: none; }
.map-detail { padding: 17px; border-left: 1px solid var(--line); }
.map-detail h3 { color: #243d5b; font-size: 20px; }
.map-detail p, .map-current-date, .map-current-zone, .map-current-head span { font-size: 14px; color: var(--muted); }
.map-zone-note { margin-top: 6px; }
.map-city-options { margin-top: 10px; max-height: 135px; overflow: auto; padding: 3px; gap: 5px; }
.map-city-options button { padding: 2px 8px; min-height: 30px; }
#map-selected-city { margin-top: 13px; border-top: 1px solid var(--soft-line); padding-top: 12px; }
.map-current-head { display: grid; overflow-wrap: anywhere; }
.map-current-time { display: inline-block; font-size: 38px; line-height: 1.35; color: #234f82; letter-spacing: -.04em; margin-right: 8px; }
.map-detail-button { margin-top: 11px; color: var(--blue-dark); border: 1px solid #a7bdd9; border-radius: 4px; padding: 6px 12px; font-size: 14px; }
.map-footnote { padding: 9px 17px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
#explore-panel { padding: 17px 20px; }
.region-filters { margin-bottom: 12px; }
.explore-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 23px; }
.result { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; min-width: 0; padding: 10px 8px; text-align: left; background: white; border-top: 1px solid var(--soft-line); }
.result:hover { background: #f1f6fd; }
.result > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.result strong { font-size: 16px; font-weight: 610; }
.result .result-country, .result small, .result > span:last-child { font-size: 13px; font-weight: 450; color: var(--muted); }
.result small { display: block; }
.result > span:last-child { flex: none; color: var(--blue-dark); }
.load-more { display: block; margin: 12px auto 2px; grid-column: 1/-1; font-size: 14px; }
dialog { padding: 21px 23px; width: min(480px,calc(100% - 32px)); max-height: min(82svh,660px); overflow: auto; color: #263b53; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 10px 35px #213e5e2e; }
dialog::backdrop { background: #192a4055; }
.dialog-head { margin-bottom: 15px; }
.dialog-head h2 { font-size: 21px; }
.dialog-head p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.close { align-self: flex-start; flex: none; border-radius: 4px; width: 34px; height: 34px; color: var(--muted); font-size: 24px; }
.search-field { padding: 0 12px; }
.search-field:focus-within { border-color: var(--blue); }
.search-field input { outline: none; border: 0; background: none; min-width: 0; width: 100%; min-height: 42px; color: #253c56; }
.search-caption, .form-note { margin: 13px 0 6px; font-size: 13px; color: var(--muted); }
.search-results { max-height: min(47svh,380px); overflow: auto; overscroll-behavior: contain; }
.no-results { color: var(--muted); padding: 13px 0; }
.field-label { margin: 15px 0 7px; font-size: 15px; font-weight: 600; }
.hours-inputs, .hours-inputs label, .weekdays, .lunch-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hours-inputs { flex-wrap: wrap; }
.weekdays { flex-wrap: wrap; gap: 6px; }
.weekdays label { position: relative; cursor: pointer; }
.weekdays input { position: absolute; width: 100%; height: 100%; left: 0; top: 0; margin: 0; opacity: 0; cursor: pointer; }
.weekdays span { display: grid; place-items: center; min-width: 34px; min-height: 34px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.weekdays input:checked + span { border-color: #83a9d7; background: var(--blue-pale); color: var(--blue-dark); }
.weekdays input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.lunch-check { margin-top: 16px; }
.lunch-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.form-error { color: #a23d30; font-size: 14px; }
.save-button { margin-top: 11px; padding: 7px 15px; background: var(--blue); color: #fff; font-size: 15px; border-radius: 4px; }
.save-button:hover { background: var(--blue-dark); }
.toast { opacity: 0; pointer-events: none; position: fixed; z-index: 10; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: 85%; background: #243d57; color: white; padding: 7px 15px; border-radius: 4px; font-size: 15px; }
.toast.show { opacity: 1; }
@media (max-width: 860px) {
  .wrap { width: calc(100% - 40px); }
  .time-panel, .contact-panel { padding: 18px; }
  .map-layout { grid-template-columns: minmax(0,1fr) 238px; }
  .favorites-grid { gap: 9px; }
}
@media (max-width: 680px) {
  .workspace { padding-top: 21px; }
  .masthead { min-height: 57px; }
  .brand { gap: 7px; font-size: 18px; }
  .brand img { width: 29px; height: 29px; }
  .brand-suffix { display: none; }
  .home-clock { gap: 6px; }
  .home-clock select { max-width: 100px; padding-block: 4px; }
  #home-time { font-size: 17px; }
  h1 { font-size: 25px; }
  .search-launch { font-size: 14px; padding: 7px 9px; }
  .search-launch kbd { display: none; }
  .tabs { gap: 20px; margin-bottom: 12px; }
  .focus-card { grid-template-columns: 1fr; }
  .time-panel { border-right: 0; border-bottom: 1px solid #d3dfed; }
  #focus-time { font-size: clamp(56px, 12vw, 72px); }
  #focus-seconds { font-size: 29px; }
  .city-names h2 { font-size: 24px; }
  .time-meta { padding-top: 9px; }
  .contact-panel { padding-block: 14px; }
  .status-heading { margin-top: 6px; }
  .next-window { margin-top: 9px; }
  .rules-button { margin-top: 10px; }
  .day-section { padding: 14px 16px 12px; }
  .favorites-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-layout { grid-template-columns: 1fr; }
  .map-canvas, .map-canvas svg { height: 330px; min-height: 0; }
  .map-detail { border-left: 0; border-top: 1px solid var(--line); }
  .map-peek { display: grid; right: 10px; top: 10px; max-width: 48%; text-align: left; padding: 5px 9px; color: #34536f; font-size: 13px; }
  .map-peek strong { font-size: 23px; font-weight: 580; }
  .map-peek small { font-size: 12px; }
  .explore-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 28px); }
  .home-clock label { display: none; }
  .page-title { gap: 9px; margin-bottom: 10px; }
  .search-launch { min-height: 36px; }
  .tabs { gap: 17px; }
  .tabs button { font-size: 15px; }
  .favorites-grid { grid-template-columns: 1fr; }
  .city-card { grid-template-columns: minmax(0,1fr) auto; column-gap: 12px; }
  .card-top, .card-time { align-items: center; }
  .card-top { justify-content: flex-start; }
  .card-time { gap: 8px; font-size: 24px; }
  .card-bottom { grid-column: 1/-1; justify-content: flex-start; gap: 12px; }
  .card-time .status-pill { font-size: 12px; }
  .map-topbar { flex-wrap: wrap; gap: 6px; }
  .map-topbar, .map-region-nav, #explore-panel { padding-inline: 13px; }
  .legend { gap: 8px; }
  footer { justify-content: flex-start; }
}
@media (max-width: 360px) {
  .page-title { align-items: stretch; flex-direction: column; }
  .home-clock select { max-width: 83px; }
  .tabs { gap: 12px; }
  .section-heading { gap: 6px; flex-wrap: wrap; }
  .card-time { flex-wrap: wrap; }
  .card-top { display: block; }
  .card-top small { display: block; }
}
