:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --ink: #2d353f;
  --muted: #617081;
  --blue: #0076b7;
  --light-blue: #f1f9ff;
  --border: #e6eaed;
  --background: #fff;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #54b8f5; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .35; }
[hidden] { display: none !important; }
.page { max-width: 1250px; margin: 0 auto; padding: 0 28px 26px; }
.topbar { min-height: 90px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 2px solid #e8edf0; }
.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 20px; letter-spacing: -.6px; font-weight: 700; }
.brand-symbol { color: var(--blue); font-size: 34px; font-weight: 400; }
.brand-accent { color: var(--blue); }
.actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.action { background: #fff; color: #344b5b; border: 1px solid #d3dce2; border-radius: 6px; padding: 10px 15px; font-size: 14px; font-weight: 600; min-height: 42px; white-space: nowrap; }
.action:hover { background: #f3f7fa; border-color: #abc4d5; }
.action-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.action-primary:hover { color: #fff; background: #00649e; }
.action-now { display: inline-flex; align-items: center; gap: 9px; }
.live-dot { background: #49b89b; width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.action-now:not(.active) .live-dot { background: #aeb9c2; }
.clock-list { width: 100%; }
.clock-row { display: grid; grid-template-columns: minmax(275px, 1.5fr) minmax(205px, .95fr) minmax(180px, .75fr); align-items: center; min-height: 136px; gap: 20px; border-bottom: 1px solid var(--border); padding: 23px 16px; }
.clock-row:hover { background: #fbfcfd; }
.clock-row.editing { background: var(--light-blue); box-shadow: inset 4px 0 var(--blue); }
.place { display: flex; align-items: center; gap: 21px; min-width: 0; }
.flag { display: inline-block; flex: none; width: 64px; text-align: center; font-size: 48px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.place-name { color: #2b3440; font-weight: 700; font-size: clamp(19px, 2.4vw, 25px); line-height: 1.23; overflow-wrap: anywhere; letter-spacing: -.5px; }
.date-cell, .time-cell { display: flex; align-items: center; justify-content: center; min-width: 0; }
.time-cell { justify-content: flex-end; }
.datetime-button { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 10px 7px; color: inherit; }
.datetime-button:hover { color: var(--blue); background: #f1f7fc; }
.date-button { font-size: 19px; white-space: nowrap; }
.time-button { font-size: clamp(31px, 3.8vw, 47px); letter-spacing: -1.1px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.editing .time-button { color: var(--blue); }
.editor-date { width: 100%; max-width: 260px; padding: 11px 10px; color: var(--blue); border: 2px solid #a8d4ec; background: #fff; border-radius: 6px; font-size: 17px; font-weight: 600; }
.editor-time { width: 184px; max-width: 100%; font-size: clamp(27px, 3.5vw, 38px); font-weight: 700; letter-spacing: -.7px; border: 2px solid #a8d4ec; border-radius: 6px; padding: 6px 8px; background: #fff; color: var(--blue); text-align: center; }
.editor-time:focus, .editor-date:focus { border-color: var(--blue); }
.editor-date::-webkit-calendar-picker-indicator, .editor-time::-webkit-calendar-picker-indicator { cursor: pointer; }
.edit-panel { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 13px; margin-top: -5px; }
.edit-message { flex: 1; min-width: 240px; color: #a2571a; font-size: 14px; line-height: 1.5; }
.fold-picker { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #855b23; flex-wrap: wrap; }
.fold-picker select { border: 1px solid #bb9d74; padding: 7px; border-radius: 5px; background: white; }
.done-button { border: 1px solid #b5cee0; color: #006daa; background: #fff; border-radius: 5px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.done-button:hover { background: #e4f3fe; }
.manage-panel { margin: 20px 0 15px; padding: 22px; background: #f8fbfd; border: 1px solid #d7e4eb; border-radius: 8px; }
.manage-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.manage-top h2 { font-size: 22px; margin: 0 0 6px; }
.manage-top p { color: var(--muted); font-size: 14px; margin: 0; }
.search-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
#zone-search { width: 100%; padding: 11px 13px; border: 1px solid #c6d4dd; border-radius: 6px; font-size: 15px; min-height: 44px; background: #fff; }
.search-results { overflow-y: auto; max-height: 270px; border: 1px solid #e2e8ec; background: #fff; margin: 5px 0 22px; border-radius: 6px; }
.search-row { display: flex; align-items: center; gap: 13px; text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: #fff; padding: 11px 14px; }
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: #f0f7fc; }
.search-main { flex: 1; min-width: 0; }
.search-flag { font-size: 23px; }
.search-city { font-size: 15px; font-weight: 600; display: block; }
.search-id { font-size: 12px; color: var(--muted); display: block; padding-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.search-add { color: var(--blue); font-size: 13px; font-weight: 600; }
.search-empty { color: var(--muted); font-size: 14px; padding: 13px; }
.saved-heading { font-size: 14px; font-weight: 700; border-bottom: 1px solid #d7e4eb; padding-bottom: 9px; }
.saved-heading span { color: var(--muted); font-weight: 400; }
.saved-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e3e9ed; }
.saved-number { color: var(--muted); width: 22px; font-size: 13px; }
.saved-flag { font-size: 25px; }
.saved-name { flex: 1; min-width: 0; }
.saved-name strong { display: block; font-size: 15px; }
.saved-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.saved-controls { display: flex; gap: 5px; }
.icon-button { border: 1px solid #c9d7e1; background: white; border-radius: 5px; color: #42586a; min-width: 34px; height: 34px; font-size: 18px; }
.icon-button:hover { background: #edf4fa; }
.icon-button.remove:hover { color: #bb3333; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin: 25px 0 0; padding: 16px 4px; font-size: 13px; color: #7b8993; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 13px 19px; border-radius: 6px; background: #20394a; color: white; box-shadow: 0 8px 22px #0003; font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px); text-align: center; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 850px) {
  .topbar { padding: 15px 0; min-height: 78px; }
  .clock-row { grid-template-columns: minmax(210px, 1.3fr) minmax(160px, 1fr) minmax(135px, .75fr); gap: 10px; padding: 20px 8px; }
  .flag { width: 54px; font-size: 40px; }
  .place { gap: 12px; }
  .place-name { font-size: 20px; }
  .date-button { font-size: 17px; }
  .time-button { font-size: 37px; }
  .editor-time { width: 145px; font-size: 29px; }
  .editor-date { font-size: 15px; }
}
@media (max-width: 650px) {
  .page { padding: 0 13px 20px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 13px; }
  .actions { width: 100%; justify-content: flex-start; gap: 6px; padding-bottom: 3px; }
  .action { padding: 9px 11px; font-size: 13px; min-height: 38px; }
  .clock-row { min-height: 125px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 7px; padding: 15px 5px; }
  .place { grid-column: 1 / -1; }
  .flag { width: 47px; font-size: 35px; }
  .place-name { font-size: 20px; }
  .date-cell { grid-column: 1; justify-content: flex-start; padding-left: 57px; }
  .time-cell { grid-column: 2; justify-content: flex-end; }
  .date-button { font-size: 16px; padding: 8px 0; }
  .time-button { font-size: 34px; padding: 6px 2px; }
  .editor-date { max-width: 195px; font-size: 13px; min-width: 0; padding: 8px 5px; }
  .editor-time { width: 138px; font-size: 27px; padding: 7px 5px; }
  .edit-panel { grid-column: 1 / -1; }
  .manage-panel { padding: 15px 12px; }
}
@media (max-width: 390px) {
  .date-cell { padding-left: 0; }
  .date-button { font-size: 14px; }
  .time-button { font-size: 31px; }
  .editor-date { max-width: 160px; }
  .editor-time { width: 125px; font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}