:root {
  --bg: #000000;
  --sheet: #1c1c1e;
  --sheet-2: #2c2c2e;
  --ink: #ffffff;
  --muted: #98989f;
  --blue: #0a84ff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 0.85rem 0.85rem 2.75rem;
}

@media (min-width: 520px) {
  body { padding: 1.25rem 0 2rem; }
}

.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0 0.85rem;
}

.head__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.head__title h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.head__sun {
  width: 1.05rem;
  height: 1.05rem;
  color: #ffd60a;
}

.head__place {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.head__place-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.head__place svg {
  width: 0.65rem;
  height: 0.45rem;
  opacity: 0.85;
}

.head__locate {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.head__locate svg {
  width: 1rem;
  height: 1rem;
}

.head__locate:hover,
.head__locate:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.search-panel { margin: 0 0 0.75rem; }

.search input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  background: var(--sheet-2);
  color: var(--ink);
}

.search input::placeholder { color: var(--muted); }

.suggestions {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.25rem;
  border-radius: 12px;
  background: var(--sheet-2);
}

.suggestions__empty {
  padding: 0.75rem 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.suggestions li button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.suggestions li button:hover,
.suggestions li button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.sheet {
  margin-bottom: 0.75rem;
  padding: 1rem 0.9rem 1.1rem;
  border-radius: 22px;
  background: var(--sheet);
}

.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.sheet__label {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet__head .sheet__label { margin-bottom: 0; }

.sheet__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.sheet__note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.sheet--prose p {
  margin: 0 0 0.85rem;
  color: rgba(235, 235, 245, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
}

.sheet--prose h3 {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sheet--prose ul {
  margin: 0 0 0.85rem;
  padding: 0 0 0 1.15rem;
  color: rgba(235, 235, 245, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
}

.sheet--prose li { margin: 0.25rem 0; }

.sheet--prose .sheet__note { margin-top: 0.35rem; }

.world__lede {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.world__controls {
  margin: 0 0 1.1rem;
}

.world__slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.world__slider-label span:last-child {
  font-weight: 500;
  color: var(--muted);
}

.world__slider {
  width: 100%;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.world__months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

.world {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.world__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.95fr) 7.75rem minmax(0, 1.15fr);
  align-items: center;
  gap: 0.55rem 0.65rem;
}

.world__row.is-you {
  margin: 0.1rem -0.35rem;
  padding: 0.45rem 0.35rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.world__angle {
  position: relative;
  height: 3.1rem;
}

.world__angle svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.world__uv {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.world__uv-value {
  margin: 0;
  flex: 0 0 3.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.world__uv-level {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.world__place {
  margin: 0;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.world__place-lat {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

@media (max-width: 400px) {
  .world__row {
    grid-template-columns: minmax(6.2rem, 0.9fr) 6.9rem minmax(0, 1fr);
    gap: 0.4rem 0.45rem;
  }
  .world__uv-value {
    flex-basis: 2.95rem;
    font-size: 1.55rem;
  }
  .world__place { font-size: 0.8rem; }
}

.extremes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .extremes { grid-template-columns: 1fr; }
}

.extremes__card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: var(--sheet-2);
}

.extremes__card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.extremes__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.35rem 0;
  font-size: 0.88rem;
}

.extremes__kind {
  color: var(--muted);
  font-weight: 500;
}

.extremes__val {
  text-align: right;
  font-weight: 650;
}

.extremes__place {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.map-link {
  margin: 0.75rem 0 0;
}

.map-link a {
  display: inline-block;
  color: #64d2ff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.map-link a:hover {
  text-decoration: underline;
}

.status { margin-bottom: 0.25rem; }

.status__row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.status__value {
  margin: 0;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.status__level {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.status__who {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-wrap {
  width: 100%;
  margin: 0.35rem 0 0;
}

.chart-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

.chart-wrap--scrub canvas {
  cursor: ew-resize;
  touch-action: none;
}

.advice {
  margin-top: 0.45rem;
  padding: 0 0.05rem;
}

.advice__now {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.advice__body {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.advice__meta {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.credit {
  margin: 0.85rem 0.15rem 0;
  font-size: 0.72rem;
  color: rgba(152, 152, 159, 0.85);
  line-height: 1.4;
}

.credit a { color: #64d2ff; text-decoration: none; }

.error {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 55, 95, 0.15);
  color: #ff375f;
  font-size: 0.9rem;
}
