:root {
  --bg: #0F1729;
  --surface: #161F35;
  --surface-2: #1E2A47;
  --line: rgba(236, 239, 246, 0.08);
  --text: #ECEFF6;
  --text-muted: #8D96AC;
  --sun: #F2A649;
  --moon: #7C93FF;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}

#local-now {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  font-size: 13px;
  color: var(--text-muted);
}

#local-now .local-now-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--sun);
  font-weight: 600;
  font-size: 14px;
}

#app {
  width: 100%;
  max-width: 640px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sun);
  text-transform: uppercase;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sub {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 32px;
  max-width: 52ch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

input[type="text"], input[type="time"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  outline: none;
}

input[type="text"]:focus, input[type="time"]:focus {
  border-color: var(--moon);
}

button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--sun);
  color: #1A1206;
  width: 100%;
  margin-top: 14px;
}

.btn-primary:hover { filter: brightness(1.08); }

.link-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.link-row input {
  flex: 1;
}

.btn-copy {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.btn-copy:hover { border-color: var(--moon); }

.result-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

.clocks {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.clock-panel {
  flex: 1;
  text-align: center;
  padding: 8px;
}

.clock-divider {
  width: 1px;
  background: var(--line);
  margin: 4px 0;
}

.clock-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: clamp(30px, 9vw, 44px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.clock-zone {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.daybar-group {
  margin-top: 22px;
}

.daybar-row {
  margin-bottom: 14px;
}

.daybar-row:last-child { margin-bottom: 0; }

.daybar-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.daybar {
  position: relative;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(
    to right,
    var(--moon) 0%, var(--moon) 25%,
    var(--sun) 25%, var(--sun) 75%,
    var(--moon) 75%, var(--moon) 100%
  );
  opacity: 0.85;
}

.daybar-marker {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
}

.daybar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.convert-result {
  margin-top: 12px;
  font-size: 15px;
}

.convert-result strong {
  font-family: var(--font-mono);
  color: var(--sun);
}

p.copy {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--moon);
  font-size: 14px;
  text-decoration: none;
}

.footer-link:hover { text-decoration: underline; }

.footer-link.subtle {
  color: var(--text-muted);
  font-size: 12px;
}

.footer-link.subtle:hover {
  color: var(--text);
}

.combo {
  position: relative;
}

.combo-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.combo-list[hidden] { display: none; }

.combo-option {
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
}

.combo-option-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 1px;
}

.combo-option:hover, .combo-option.active {
  background: rgba(124, 147, 255, 0.16);
}

.combo-empty {
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.faq {
  margin-top: 28px;
}

.faq h2 {
  font-size: 15px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  font-weight: 700;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.faq summary::after {
  content: "+";
  color: var(--sun);
  font-size: 20px;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.start-over {
  margin-top: 4px;
}

.email-share {
  margin-top: 16px;
}

@media (max-width: 420px) {
  .clocks { flex-direction: column; }
  .clock-divider { display: none; }
  .clock-panel { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
  .clock-panel:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
}
