:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #fcfaf7;
  --text: #181716;
  --muted: #6c655d;
  --line: #e8e1d8;
  --line-strong: #ddd2c5;
  --shadow: 0 18px 45px rgba(24, 23, 22, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --uv-low: #61a83b;
  --uv-moderate: #d9a406;
  --uv-high: #ea7b12;
  --uv-very-high: #d64534;
  --uv-extreme: #9050c8;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 225, 166, 0.25), transparent 32%),
    linear-gradient(180deg, #fbf8f2 0%, #f5f1ea 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 4px 22px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: #f5b326;
  box-shadow: 0 0 0 7px rgba(245, 179, 38, 0.15);
  position: relative; flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 2px dashed rgba(245, 179, 38, 0.5);
}
.brand-mark::after { inset: -14px; border-width: 1px; opacity: 0.55; }
.brand-title { font-size: clamp(28px, 4vw, 33px); font-weight: 760; letter-spacing: -0.045em; line-height: 1; }
.brand-sub { margin-top: 4px; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-btn {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,0.82);
  border-radius: 999px; padding: 11px 15px; min-height: 44px; color: var(--text);
  display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 12px rgba(24,23,22,0.03);
}
.pill-btn .muted { color: var(--muted); }
.pill-btn .value { max-width: min(360px, 54vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.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;
}
.card {
  background: rgba(255,255,255,0.86); backdrop-filter: blur(10px);
  border: 1px solid rgba(232,225,216,0.95); border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.hero { padding: clamp(20px, 4vw, 34px); background: linear-gradient(180deg, #fffaf1 0%, #fff 100%); overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 16px; }
.eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.page-title { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.05; letter-spacing: -0.05em; }
.hero-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 22px; align-items: center; }
.uv-number { font-size: clamp(80px, 12vw, 118px); line-height: .88; font-weight: 820; letter-spacing: -0.07em; margin-bottom: 12px; }
.hero-status { font-size: clamp(29px, 4vw, 42px); line-height: 1.02; letter-spacing: -0.055em; font-weight: 780; margin-bottom: 8px; }
.hero-copy { max-width: 45ch; font-size: 16px; line-height: 1.55; color: var(--muted); }
.hero-stats { display: grid; gap: 12px; }
.stat-row {
  background: rgba(255,255,255,0.78); border: 1px solid var(--line); border-radius: 20px;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.stat-row .label { font-size: 15px; color: var(--muted); }
.stat-row .value { font-size: 24px; font-weight: 760; letter-spacing: -0.045em; text-align: right; }
.scale { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.scale-track { position: relative; height: 10px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, var(--uv-low) 0 18%, var(--uv-moderate) 18% 45%, var(--uv-high) 45% 64%, var(--uv-very-high) 64% 90%, var(--uv-extreme) 90% 100%); }
.scale-marker { position: absolute; top: -7px; width: 0; height: 24px; border-left: 3px solid #111; transform: translateX(-1px); transition: left .25s ease; }
.scale-marker::before { content: ""; position: absolute; left: -5px; top: -1px; width: 10px; height: 10px; background: #111; border-radius: 50%; }
.scale-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.scale-labels strong { display: block; font-size: 13px; margin-bottom: 3px; }
.scale-low strong { color: var(--uv-low); } .scale-moderate strong { color: var(--uv-moderate); } .scale-high strong { color: var(--uv-high); } .scale-very-high strong { color: var(--uv-very-high); } .scale-extreme strong { color: var(--uv-extreme); }
.source-line { margin: 14px 4px 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.source-line a { text-decoration-color: rgba(108,101,93,.45); text-underline-offset: 3px; }
.main-content { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.chart-card, .tips-card { padding: clamp(18px, 3vw, 24px); }
.chart-card { order: 1; } .tips-card { order: 2; }
.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 13px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-note { font-size: 14px; color: var(--muted); }
.chart-wrap {
  position: relative; height: 235px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(to top, rgba(0,0,0,.025) 1px, transparent 1px) 0 0 / 100% 25%, #fff;
  padding: 18px 16px 14px; display: flex; align-items: end; gap: 10px; overflow: hidden;
}
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; position: relative; height: 100%; }
.bar { width: min(25px, 100%); border-radius: 999px 999px 8px 8px; min-height: 4px; background: #ddd; box-shadow: inset 0 -1px 0 rgba(255,255,255,.25); }
.bar-col.current::before { content: "Nu"; position: absolute; top: 6px; font-size: 11px; color: var(--muted); background: #fff; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.bar-hour { font-size: 12px; color: var(--muted); }
.bar-value { position: absolute; top: calc(100% - var(--bar-height, 0%)); transform: translateY(-8px); font-size: 11px; font-weight: 700; background: rgba(255,255,255,.96); border: 1px solid var(--line); padding: 2px 6px; border-radius: 999px; opacity: 0; transition: opacity .18s ease; pointer-events: none; white-space: nowrap; }
.bar-col:hover .bar-value, .bar-col.current .bar-value { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tip-item { min-height: 164px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; }
.tip-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: #fff; border: 1px solid var(--line); }
.tip-title { font-size: 18px; font-weight: 740; letter-spacing: -0.04em; margin-bottom: 4px; }
.tip-copy { font-size: 14px; color: var(--muted); line-height: 1.55; }
.footer { text-align: center; padding: 22px 6px 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer a { text-decoration-color: rgba(108,101,93,.45); text-underline-offset: 3px; }
.banner { display: none; padding: 14px 16px; margin-bottom: 18px; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); align-items: start; justify-content: space-between; gap: 12px; }
.banner.show { display: flex; }
.banner-title { font-weight: 700; margin-bottom: 5px; }
.banner-copy { font-size: 14px; line-height: 1.5; color: var(--muted); }
.text-btn { appearance: none; background: none; border: 0; color: var(--muted); padding: 0; font-size: 14px; cursor: pointer; }
.overlay { position: fixed; inset: 0; background: rgba(21,19,17,.42); backdrop-filter: blur(8px); display: none; align-items: end; justify-content: center; padding: 16px; z-index: 30; }
.overlay.open { display: flex; }
.sheet { width: min(760px, 100%); max-height: min(86dvh, 840px); overflow: hidden; background: #fff; border-radius: 28px; box-shadow: 0 30px 60px rgba(20,18,16,.24); border: 1px solid rgba(232,225,216,.95); display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 22px; font-weight: 760; letter-spacing: -0.04em; }
.sheet-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.icon-btn { appearance: none; border: 1px solid var(--line); background: #fff; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; font-size: 18px; }
.sheet-body { padding: 16px 18px 18px; overflow: auto; }
.search-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 14px; }
.search-input { width: 100%; min-height: 48px; border-radius: 16px; border: 1px solid var(--line); padding: 0 16px; background: #fcfaf7; font-size: 16px; color: var(--text); }
.ghost-btn { appearance: none; min-height: 48px; border-radius: 16px; border: 1px solid var(--line); background: #fff; padding: 0 14px; color: var(--text); }
.search-results { display: grid; gap: 10px; }
.result-btn { appearance: none; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.result-name { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.result-sub, .result-meta { color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.45; }
.result-arrow { color: var(--muted); font-size: 24px; line-height: 1; padding-top: 3px; }
.hint { border: 1px dashed var(--line); border-radius: 18px; padding: 18px; color: var(--muted); background: #fcfaf7; font-size: 15px; line-height: 1.5; }
@media (max-width: 760px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .topbar { align-items: start; flex-direction: column; gap: 14px; padding-bottom: 18px; }
  .pill-btn { width: 100%; justify-content: space-between; }
  .hero-main { grid-template-columns: 1fr; }
  .hero-stats { gap: 10px; }
  .scale-labels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tips-card { order: 1; } .chart-card { order: 2; }
  .tips-grid { grid-template-columns: 1fr; }
  .tip-item { min-height: 0; }
  .chart-wrap { height: 190px; gap: 8px; padding: 16px 10px 12px; }
  .bar-hour { font-size: 11px; }
  .search-input-row { grid-template-columns: 1fr; }
  .sheet { border-radius: 24px; }
  .stat-row .value { font-size: 21px; }
}
@media (max-width: 420px) {
  .hero { padding: 17px; }
  .scale-labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { align-items: start; flex-direction: column; gap: 6px; }
  .stat-row .value { text-align: left; }
}
