:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --white: #fffefb;
  --ink: #20202a;
  --muted: #686574;
  --pink: #ff78bd;
  --pink-soft: #ffd9ec;
  --blue: #6c63ff;
  --cyan: #75e8ef;
  --lime: #c9f75d;
  --yellow: #ffdc5e;
  --orange: #ff985f;
  --lavender: #c5b7ff;
  --line: #20202a;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

button, input { font: inherit; }
button { color: inherit; }

.site-header,
main,
footer {
  width: min(1220px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

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

.brand-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 13px 13px 5px 13px;
  background: var(--pink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 27px;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: 0.12em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: 0.22em; }

.local-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  padding: 9px 13px;
  border: 2px solid var(--ink);
  border-radius: 12px 12px 12px 4px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}

.live-dot,
.auto-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #51dc91;
}

.clock-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.clock-stack { min-width: 0; margin-left: auto; text-align: right; }
.clock-stack time { display: block; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock-stack small { display: block; max-width: 118px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; color: #605421; font-size: 8px; white-space: nowrap; }

.status-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  margin: 12px 0 30px;
  padding: 14px 22px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 15px 5px 15px 5px;
  background: var(--blue);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.status-ribbon i { color: var(--lime); font-size: 17px; font-style: normal; }

.location-browser { margin-bottom: 58px; }

.browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 18px 18px 7px 18px;
  background: var(--white);
  box-shadow: 7px 7px 0 var(--ink);
}

.tabs { display: flex; gap: 10px; }

.tab {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 14px 14px 6px 14px;
  background: #f1edf8;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.tab > span:first-child { font-size: 23px; }
.tab:hover { transform: translateY(-2px); box-shadow: 3px 4px 0 var(--ink); }
.tab:active { transform: translateY(1px); box-shadow: none; }
.tab.is-active[data-tab="hotspots"] { background: var(--pink); box-shadow: 4px 4px 0 var(--ink); }
.tab.is-active[data-tab="timezones"] { background: var(--cyan); box-shadow: 4px 4px 0 var(--ink); }

.tab-count {
  min-width: 27px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--white);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.search-box {
  width: min(410px, 100%);
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 2px solid var(--ink);
  border-radius: 12px 4px 12px 12px;
  background: #f9f5ff;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.search-box:focus-within { background: var(--pink-soft); box-shadow: 4px 4px 0 var(--ink); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #827d8c; }
kbd { padding: 3px 7px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); font: 10px ui-monospace, monospace; }

.list-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 13px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.list-meta p { margin: 0; }
.list-meta p:last-child { display: flex; align-items: center; gap: 8px; }
.auto-dot { width: 8px; height: 8px; background: var(--lime); }

.location-groups { min-height: 360px; display: grid; gap: 18px; }

.offset-group {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 15px 7px 15px 15px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
}

.group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 51px;
  padding: 10px 18px;
  border-bottom: 2px solid var(--ink);
  background: var(--cyan);
}

.offset-group:nth-child(4n + 2) .group-heading { background: var(--lime); }
.offset-group:nth-child(4n + 3) .group-heading { background: var(--pink); }
.offset-group:nth-child(4n) .group-heading { background: var(--yellow); }

.offset-badge {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 2px solid var(--ink);
  border-radius: 8px 8px 3px 8px;
  background: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.035em;
  font-variant-numeric: tabular-nums;
}

.group-heading p { margin: 0; font-size: 11px; font-weight: 900; }
.group-heading .group-range { margin-left: auto; color: #413d48; }

.location-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(155px, 0.68fr) minmax(0, 0.9fr) minmax(270px, 0.9fr);
  align-items: center;
  gap: 22px;
  min-height: 88px;
  padding: 14px 18px;
  border-top: 1px solid #d9d1c5;
  background: var(--white);
}

.location-row:first-of-type { border-top: 0; }
.location-row:nth-of-type(odd) { background: #fffaf2; }
.location-row:hover { background: #f2edff; }

.place,
.time-cell,
.zone-cell,
.coordinate-cell { min-width: 0; }

.place {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.place > div { min-width: 0; overflow: hidden; }

.flag {
  width: 44px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 9px 9px 3px 9px;
  background: var(--lavender);
  box-shadow: 2px 2px 0 var(--ink);
}

.flag-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.flag-fallback { font-size: 22px; }

.place-name,
.zone-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-name { font-size: 14px; font-weight: 900; }

.location-time { display: block; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.location-date, .zone-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-family: Inter, system-ui, sans-serif; white-space: nowrap; }
.zone-name { font-size: 12px; font-weight: 800; }
.zone-detail { overflow: hidden; text-overflow: ellipsis; }

.coordinate-cell { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.coordinates { flex: 0 0 auto; overflow: visible; color: #4d4857; font: 700 13.5px ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; text-overflow: clip; white-space: nowrap; }

.copy-button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 9px 9px 3px 9px;
  background: var(--lime);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.copy-button:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
.copy-button:active { transform: translateY(1px); box-shadow: none; }
.copy-button.is-copied,
.copy-button.is-copied:hover {
  background: var(--pink);
  color: var(--ink);
  opacity: 1;
  transform: none;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: default;
}

.loading-state,
.empty-state,
.error-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
  color: var(--muted);
}

.loading-pin { color: var(--pink); font-size: 36px; animation: pulse 1.4s ease-in-out infinite; }
.empty-state strong, .error-state strong { color: var(--ink); }
.empty-state p, .error-state p { max-width: 460px; margin: 8px 0 0; line-height: 1.6; }

footer {
  display: flex;
  justify-content: center;
  padding: 0 0 38px;
  font: 11px Inter, system-ui, sans-serif;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 2px solid var(--ink);
  border-radius: 11px 11px 4px 11px;
  background: var(--lavender);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}

.discord-link:hover { background: var(--cyan); transform: translateY(-2px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  transform: translate(-50%, 20px);
  padding: 11px 15px;
  border: 2px solid var(--ink);
  border-radius: 10px 10px 4px 10px;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  font-weight: 900;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 20px; text-align: center; color: var(--white); background: #a62f68; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes pulse { 50% { opacity: 0.38; transform: scale(0.92); } }

@media (max-width: 1020px) {
  .location-row { grid-template-columns: minmax(0, 1.35fr) minmax(155px, 0.7fr) minmax(270px, 0.9fr); }
  .zone-cell { display: none; }
}

@media (max-width: 820px) {
  .status-ribbon { justify-content: flex-start; overflow: hidden; }
  .browser-toolbar { align-items: stretch; flex-direction: column; }
  .tabs, .search-box { width: 100%; }
  .tab { flex: 1; }
}

@media (max-width: 650px) {
  .site-header, main, footer { width: min(100% - 20px, 1220px); }
  .site-header { min-height: 76px; gap: 10px; }
  .brand { gap: 9px; }
  .brand small { display: block; font-size: 7px; letter-spacing: 0.14em; }
  .brand-mark { width: 40px; height: 40px; }
  .local-clock { min-width: 130px; display: block; padding: 6px 8px; text-align: center; }
  .clock-label { display: block; font-size: 8px; }
  .local-clock .live-dot, .clock-stack small { display: none; }
  .clock-stack { margin-left: 0; text-align: center; }
  .clock-stack time { font-size: 14px; }
  .status-ribbon { justify-content: space-between; gap: 7px; margin-top: 5px; padding: 11px 12px; box-shadow: 4px 4px 0 var(--ink); font-size: 8.5px; }
  .browser-toolbar { padding: 11px; box-shadow: 4px 4px 0 var(--ink); }
  .tab { min-height: 53px; padding: 0 10px; font-size: 14px; }
  .tab > span:first-child { font-size: 19px; }
  .search-box kbd { display: none; }
  .list-meta { padding-inline: 2px; }
  .list-meta p:last-child { display: none; }
  .group-heading { padding-inline: 12px; }
  .group-range { display: none; }
  .location-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; min-height: 112px; padding: 14px 12px; }
  .time-cell { text-align: right; }
  .coordinate-cell { grid-column: 1 / -1; justify-content: space-between; padding-left: 0; }
  .coordinates { font-size: 13px; }
  footer { flex-direction: column; line-height: 1.6; }
}

@media (max-width: 360px) {
  .status-ribbon { flex-wrap: wrap; justify-content: center; white-space: normal; }
  .status-ribbon i { display: none; }
  .tabs { flex-direction: column; }
}

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