:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --warn: #ffb454;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

.dot { color: var(--text-muted); }

/* ---------- header ---------- */
.app-header {
  height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-title { font-size: 18px; font-weight: 600; letter-spacing: 0.3px; }
.hdr-sub { font-size: 13px; color: var(--text-secondary); }

/* ---------- clocks ---------- */
.clocks { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; min-height: 0; }
.clock-card {
  flex: 1;
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  min-height: 0;
}
.clock-card:focus::after {
  content: '↵ change city';
  position: absolute; bottom: 8px; right: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--accent);
}
.clock-top { display: flex; align-items: center; justify-content: space-between; }
.clock-city { font-size: 22px; font-weight: 600; }
.clock-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  padding: 4px 12px; border-radius: 999px;
}
.badge-home { background: rgba(0,212,255,0.16); color: var(--accent); }
.badge-trip { background: rgba(0,255,136,0.16); color: var(--accent-secondary); }

.clock-time-row { display: flex; align-items: baseline; }
.clock-time {
  font-size: 64px; font-weight: 300; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 1px;
}
.clock-meridiem { font-size: 22px; font-weight: 500; color: var(--text-secondary); margin-left: 8px; }

.clock-sub { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-secondary); }
.daynight { font-size: 16px; line-height: 1; }

/* ---------- diff ---------- */
.diff-strip { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.diff-pill {
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 14px;
  display: flex; gap: 8px; align-items: center;
}
#diffMain { font-weight: 600; }
.diff-ahead #diffMain { color: var(--accent-secondary); }
.diff-behind #diffMain { color: var(--warn); }
.diff-same #diffMain { color: var(--text-primary); }
.diff-pill.diff-same #diffSep,
.diff-pill.diff-same #diffDay { display: none; }

/* ---------- footer ---------- */
.app-footer {
  flex: 0 0 84px; height: 84px;
  display: flex; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-primary);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.foot-btn {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 14px; font-weight: 500; font-family: inherit;
}
.foot-btn .ico { font-size: 22px; line-height: 1; color: var(--accent); }

/* ---------- picker ---------- */
.picker-list { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.city-row {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.city-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.city-name { font-size: 17px; font-weight: 600; }
.city-zone { font-size: 12px; color: var(--text-muted); }
.city-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.city-time { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.city-off { font-size: 11px; color: var(--text-muted); }
.city-row.selected { background: rgba(0,212,255,0.10); }
.city-row.selected .city-name::after { content: ' ✓'; color: var(--accent); font-weight: 700; }

.picker-list::-webkit-scrollbar { width: 6px; }
.picker-list::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 999px; }

/* ---------- settings ---------- */
.settings-list { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.setting-row {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-primary); font-family: inherit; text-align: left;
}
.setting-left { display: flex; flex-direction: column; gap: 4px; }
.setting-name { font-size: 17px; font-weight: 600; }
.setting-desc { font-size: 13px; color: var(--text-secondary); }
.setting-val { font-size: 18px; font-weight: 600; color: var(--accent); }
.btn-row { justify-content: center; gap: 12px; min-height: 64px; }
.btn-row .setting-name { color: var(--accent); }
