/* Hanken Grotesk — self-hosted (OFL). latin + latin-ext, weights 400/500/600/700.
   Replaces the former Google Fonts load — no external font requests. */
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin-ext-700-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}

  :root{
    --paper:#F4F1EA; --panel:#FCFBF7; --panel-2:#EFEAE0; --ink:#2C2A24; --muted:#8B857A;
    --line:#E6E0D4; --accent:#7B9E84; --accent-soft:#7B9E8422;
    --sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;
    --serif:"Hanken Grotesk", system-ui, sans-serif;
    --display:"Hanken Grotesk", system-ui, sans-serif;
    --shadow:0 6px 28px rgba(70,58,35,.05);
    --radius:20px;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){ --paper:#19160F; --panel:#221E16; --panel-2:#14110B; --ink:#EFEADF; --muted:#9C9486;
           --line:#322D23; --accent:#86A98E; --accent-soft:#86A98E26; --shadow:0 6px 28px rgba(0,0,0,.26); }
  }
  :root[data-theme="dark"]{ --paper:#19160F; --panel:#221E16; --panel-2:#14110B; --ink:#EFEADF; --muted:#9C9486;
           --line:#322D23; --accent:#86A98E; --accent-soft:#86A98E26; --shadow:0 6px 28px rgba(0,0,0,.26); }
  *{ box-sizing:border-box; }
  html,body{ margin:0; }
  body{
    background:var(--paper); color:var(--ink);
    font-family:var(--sans); font-weight:400; line-height:1.55; -webkit-font-smoothing:antialiased;
    min-height:100vh; padding:clamp(18px,4vw,46px); transition:background .8s ease;
  }
  @media (display-mode: standalone){
    body{ padding-top:calc(clamp(18px,4vw,46px) + env(safe-area-inset-top));
          padding-left:calc(clamp(18px,4vw,46px) + env(safe-area-inset-left));
          padding-right:calc(clamp(18px,4vw,46px) + env(safe-area-inset-right)); }
  }
  .wrap{ max-width:780px; margin:0 auto; }

  /* ---- top bar ---- */
  .topbar{ display:flex; flex-wrap:wrap; gap:16px 24px; align-items:flex-start;
    justify-content:space-between; padding-bottom:22px; border-bottom:1px solid var(--line); }
  .mark{ font-size:12px; font-weight:600; letter-spacing:.22em; text-transform:uppercase; color:var(--muted); }
  .place{ font-family:var(--display); font-size:clamp(24px,4.2vw,32px); font-weight:500;
    line-height:1.12; letter-spacing:-.01em; margin:0 0 7px; }
  .meta{ font-size:13px; color:var(--muted); display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; }
  .meta .m-item{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
  .meta svg{ opacity:.85; }
  .controls{ display:flex; gap:8px; align-items:center; }
  button.geo{ font-family:var(--sans); font-size:13px; font-weight:500; cursor:pointer; color:var(--ink);
    background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:10px 16px;
    display:inline-flex; align-items:center; gap:7px; transition:border-color .2s, background .2s, transform .1s; white-space:nowrap; }
  button.geo:hover{ border-color:var(--accent); }
  button.geo:active{ transform:scale(.97); }
  .search{ position:relative; }
  input.search{ font-family:var(--sans); font-size:13px; color:var(--ink); background:var(--panel);
    border:1px solid var(--line); border-radius:999px; padding:10px 16px; width:140px; outline:none;
    transition:border-color .2s, width .2s; }
  input.search:focus{ border-color:var(--accent); width:176px; }
  .results{ position:absolute; top:calc(100% + 6px); right:0; min-width:240px; z-index:20;
    background:var(--panel); border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:var(--shadow); display:none; }
  .results.show{ display:block; }
  .results button{ display:block; width:100%; text-align:left; border:0; cursor:pointer; background:transparent;
    color:var(--ink); font-family:var(--sans); font-size:14px; padding:11px 15px; border-bottom:1px solid var(--line); }
  .results button:last-child{ border-bottom:0; }
  .results button:hover{ background:var(--accent-soft); }
  .results .r-sub{ display:block; font-size:12px; color:var(--muted); margin-top:1px; }

  /* ---- hero gauge ---- */
  .hero{ display:flex; flex-wrap:wrap; align-items:center; gap:clamp(20px,5vw,56px);
    padding:clamp(28px,5.5vw,48px) 0 6px; }
  .gauge-wrap{ position:relative; width:clamp(200px,42vw,238px); aspect-ratio:1; flex:0 0 auto; }
  .gauge-wrap svg{ width:100%; height:100%; overflow:visible; display:block; }
  .glow{ position:absolute; inset:14%; border-radius:50%; background:var(--accent);
    filter:blur(44px); opacity:.22; z-index:-1; transition:background .8s ease; }
  @media (prefers-reduced-motion: no-preference){
    .glow{ animation:breathe 7s ease-in-out infinite; }
    @keyframes breathe{ 0%,100%{ transform:scale(1); opacity:.2 } 50%{ transform:scale(1.05); opacity:.3 } }
  }
  .track{ fill:none; stroke:var(--line); stroke-width:11; stroke-linecap:round; }
  .value{ fill:none; stroke:var(--accent); stroke-width:13; stroke-linecap:round;
    transition:stroke .8s ease, stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1); }
  .gauge-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center;
    justify-content:center; text-align:center; pointer-events:none; }
  .uv-num{ font-family:var(--display); font-weight:400; font-size:clamp(62px,16vw,92px); line-height:.88;
    letter-spacing:-.03em; font-variant-numeric:tabular-nums; color:var(--accent); transition:color .8s ease; }
  .uv-cat{ font-family:var(--sans); font-weight:700; font-size:12.5px; letter-spacing:.16em; text-transform:uppercase;
    color:var(--accent); margin-top:11px; transition:color .8s ease; }
  .uv-alt{ font-size:12px; color:var(--muted); margin-top:6px; }

  .hero-text{ flex:1 1 230px; min-width:220px; }
  .toggle{ display:inline-flex; border:1px solid var(--line); border-radius:999px; padding:3px;
    background:var(--panel); margin-bottom:16px; }
  .toggle button{ font-family:var(--sans); font-size:12.5px; font-weight:600; cursor:pointer; border:0;
    background:transparent; color:var(--muted); border-radius:999px; padding:8px 15px; transition:background .25s, color .25s; }
  .toggle button.sel{ background:var(--ink); color:var(--paper); }
  .advice{ font-family:var(--display); font-size:clamp(17px,2.5vw,21px); font-weight:400; line-height:1.5; letter-spacing:-.005em; }
  /* hero burn-time headline */
  .burn{ display:flex; flex-direction:column; gap:1px; }
  .burn-big{ font-family:var(--display); font-size:clamp(30px,6vw,40px); font-weight:500; line-height:1;
    letter-spacing:-.02em; color:var(--accent); font-variant-numeric:tabular-nums; transition:color .8s ease; }
  .burn-sub{ font-size:13px; color:var(--muted); }
  .burn-hint{ font-family:var(--display); font-size:16px; color:var(--muted); line-height:1.4; }
  .peak{ font-size:13px; color:var(--muted); margin-top:12px; }
  .peak b{ color:var(--ink); font-weight:600; }
  .src-note{ font-size:12px; color:var(--muted); margin-top:10px; opacity:.9; }
  .src-fallback{ color:#B26A00; opacity:1; font-weight:500; }

  /* ---- sections + tiles ---- */
  section.block{ margin-top:clamp(28px,5.5vw,46px); }
  h2{ font-family:var(--sans); font-weight:600; font-size:12px; letter-spacing:.16em; text-transform:uppercase;
    color:var(--muted); margin:0 0 15px; }
  .tiles{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
  .tiles-2{ grid-template-columns:repeat(2,1fr); }
  @media (max-width:520px){ .tiles{ gap:9px; } }
  .tile{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:17px 16px; box-shadow:var(--shadow); }
  .tile .t-lbl{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);
    display:flex; align-items:center; gap:5px; }
  .tile .t-val{ font-family:var(--display); font-size:clamp(19px,4.4vw,24px); font-weight:400; margin-top:10px;
    line-height:1.12; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
  .tile .t-sub{ font-size:12px; color:var(--muted); margin-top:4px; }
  .sun-times{ display:flex; flex-direction:column; gap:6px; margin-top:9px; }
  .sun-t{ display:flex; align-items:center; gap:7px; font-family:var(--display); font-size:clamp(18px,4vw,22px);
    font-weight:400; line-height:1; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
  .sun-t svg{ width:16px; height:16px; color:var(--muted); flex:0 0 auto; }

  .chart-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:18px 16px 10px; box-shadow:var(--shadow); }
  .chart-card svg{ width:100%; height:auto; display:block; }
  .legend{ display:flex; gap:18px; padding:2px 4px 8px; font-size:12px; color:var(--muted); }
  .legend i{ display:inline-block; width:16px; height:0; border-top-width:2.5px; border-top-style:solid; vertical-align:middle; margin-right:6px; }
  .legend i.dashed{ border-top-style:dashed; }
  .chart-readout{ padding:0 4px 8px; font-size:15px; font-weight:500; color:var(--ink); line-height:1.3;
    min-height:20px; font-variant-numeric:tabular-nums; }
  .chart-readout .cr-hint{ font-size:12.5px; font-weight:400; color:var(--muted); }
  .chart-readout b{ font-weight:700; }
  .scale{ display:flex; flex-wrap:wrap; gap:7px 13px; padding:8px 4px 10px; font-size:11.5px; color:var(--muted); }
  .sc-item{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
  .sc-item i{ width:11px; height:11px; border-radius:3px; display:inline-block; flex:0 0 auto; }

  /* ---- skin panel ---- */
  .panel{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px 18px; box-shadow:var(--shadow); }
  .swatches{ display:flex; gap:9px; }
  .swatch{ flex:1; aspect-ratio:1; border-radius:14px; border:2px solid transparent; cursor:pointer; padding:0;
    position:relative; transition:transform .12s ease, border-color .2s, box-shadow .2s; }
  .swatch span{ position:absolute; left:0; right:0; bottom:6px; text-align:center; font-size:11px; font-weight:700; font-family:var(--sans); }
  .swatch:hover{ transform:translateY(-2px); }
  .swatch.sel{ border-color:var(--accent); transform:translateY(-3px); box-shadow:0 6px 18px rgba(0,0,0,.16); }
  .chips{ display:flex; gap:8px; margin-top:13px; flex-wrap:wrap; }
  .sub-lbl{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:17px 0 0; }
  .sub-lbl + .chips{ margin-top:9px; }
  .chip{ font-family:var(--sans); font-size:13px; font-weight:500; cursor:pointer; color:var(--muted);
    background:transparent; border:1px solid var(--line); border-radius:999px; padding:8px 16px;
    transition:background .2s, color .2s, border-color .2s; }
  .chip:hover{ border-color:var(--accent); color:var(--ink); }
  .chip.sel{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
  /* tap-to-cycle controls (skin / environment) */
  .me-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
  .me-row-2{ grid-template-columns:repeat(2,1fr); }
  .me-pill{ cursor:pointer; text-align:left; background:var(--panel-2); border:1px solid var(--line);
    border-radius:12px; padding:8px 10px; transition:border-color .15s, transform .08s; }
  .me-pill:hover{ border-color:var(--accent); }
  .me-pill:active{ transform:scale(.98); }
  .me-lbl{ display:block; font-size:9.5px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); white-space:nowrap; }
  .me-val{ display:flex; align-items:center; gap:6px; margin-top:3px; font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap; }
  .me-val-muted{ color:var(--muted); font-weight:500; }
  .me-dot{ width:12px; height:12px; border-radius:50%; flex:0 0 auto; box-shadow:inset 0 0 0 1px rgba(0,0,0,.18); }
  .me-ico{ font-size:14px; line-height:1; }
  .me-val-env{ font-size:13.5px; gap:5px; }
  .sk-readout{ margin-top:16px; }
  .sk-time{ font-family:var(--display); font-size:clamp(40px,9vw,52px); font-weight:500; line-height:1;
    letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--accent); transition:color .8s ease; }
  .sk-time-lbl{ font-size:13px; color:var(--muted); margin-top:5px; max-width:48ch; line-height:1.5; }
  .sk-line{ font-size:14px; margin-top:11px; line-height:1.55; }
  .sk-line b{ font-weight:600; }
  .sk-behaviour{ color:var(--ink); font-weight:500; }
  .sk-hint{ font-family:var(--display); font-size:15px; color:var(--muted); line-height:1.55; }
  .sk-note{ font-size:11.5px; color:var(--muted); margin-top:18px; opacity:.88; line-height:1.55; }

  /* ---- timer ---- */
  .timer{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px 18px; box-shadow:var(--shadow); }
  .t-btn{ font-family:var(--sans); font-size:15px; font-weight:600; cursor:pointer; border:0; border-radius:999px;
    padding:14px 24px; transition:transform .1s, opacity .2s, filter .2s; display:inline-flex; align-items:center; gap:8px; }
  .t-btn:active{ transform:scale(.97); }
  .t-start{ background:var(--accent); color:#fff; }
  .t-start:hover{ filter:brightness(.96); }
  .t-stop{ background:transparent; color:var(--ink); border:1px solid var(--line); }
  /* reapply-reminder control */
  .reapply-box{ margin-top:14px; }
  .t-btn2{ font-family:var(--sans); font-size:14px; font-weight:600; cursor:pointer; width:100%;
    background:transparent; color:var(--ink); border:1px solid var(--line); border-radius:999px;
    padding:12px 16px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
    transition:border-color .2s, background .2s; }
  .t-btn2:hover{ border-color:var(--accent); }
  .t-btn2:active{ transform:scale(.98); }
  .reapply-set{ display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:var(--panel-2); border:1px solid var(--line); border-radius:14px; padding:12px 14px; }
  .reapply-set .rs-main{ font-size:13.5px; line-height:1.5; }
  .reapply-set .rs-main b{ font-weight:600; }
  .reapply-set .rs-warn{ font-size:11.5px; color:#F0392A; margin-top:3px; }
  .reapply-cancel{ font-family:var(--sans); font-size:12.5px; font-weight:600; cursor:pointer;
    background:transparent; border:0; color:var(--muted); text-decoration:underline; padding:4px; flex:0 0 auto; }
  .reapply-cancel:hover{ color:var(--ink); }
  .t-running .t-top{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
  .t-elapsed{ font-family:var(--display); font-size:clamp(40px,9.5vw,54px); font-weight:300; line-height:1;
    letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
  .t-remain{ font-size:13px; color:var(--muted); text-align:right; }
  .t-remain b{ color:var(--ink); font-weight:600; }
  .t-bar-wrap{ height:9px; border-radius:99px; background:var(--panel-2); border:1px solid var(--line);
    overflow:hidden; margin:16px 0 10px; }
  .t-bar{ height:100%; width:0%; border-radius:99px; background:var(--accent); transition:width 1s linear, background .6s ease; }
  .t-reapply{ font-size:14px; line-height:1.55; }
  .t-reapply.due{ color:#F0392A; font-weight:600; }
  .t-idle-line{ font-size:14px; color:var(--muted); margin-top:12px; line-height:1.55; }
  .t-idle-line b{ color:var(--ink); font-weight:600; }
  .t-budget{ margin-bottom:18px; }
  .t-budget-top{ display:flex; justify-content:space-between; align-items:baseline; font-size:13px; color:var(--muted); }
  .t-budget-top b{ font-family:var(--display); font-size:21px; color:var(--ink); font-weight:400; font-variant-numeric:tabular-nums; }
  .t-budget .t-bar-wrap{ margin:9px 0 0; }
  .t-cap{ font-size:12px; color:var(--muted); margin-top:10px; }
  .t-cap2{ font-size:11px; color:var(--muted); margin-top:3px; }
  .reapply-intro{ font-size:14px; color:var(--ink); line-height:1.5; margin-bottom:14px; }
  .t-note{ font-size:11.5px; color:var(--muted); margin-top:15px; opacity:.88; line-height:1.55; }

  /* ---- next hours blocks ---- */
  .hours{ display:flex; gap:10px; }
  .hr-block{ flex:1 1 0; }
  @media (max-width:520px){ .hours{ gap:7px; } }
  .hr-block{ border:1px solid var(--line); border-radius:16px; padding:14px 6px; text-align:center; }
  .hr-time{ font-size:12px; font-weight:600; color:var(--muted); font-variant-numeric:tabular-nums; }
  .hr-uv{ font-family:var(--display); font-size:clamp(20px,5vw,26px); font-weight:500; margin:7px 0 6px;
    letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
  .hr-dot{ width:26px; height:5px; border-radius:99px; margin:0 auto; }

  /* ---- forecast strip ---- */
  .forecast{ display:grid; grid-template-columns:repeat(5,1fr); gap:11px; }
  @media (max-width:520px){ .forecast{ gap:8px; } }
  .fc-card{ background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:15px 6px; text-align:center; box-shadow:var(--shadow); }
  .fc-day{ font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
  .fc-num{ font-family:var(--display); font-size:clamp(24px,6vw,30px); font-weight:400; margin:7px 0 5px;
    letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
  .fc-dot{ width:30px; height:5px; border-radius:99px; margin:0 auto; }
  .fc-cat{ font-size:10.5px; color:var(--muted); margin-top:7px; }

  /* ---- alert ---- */
  .alert{ display:flex; gap:12px; align-items:flex-start; border:1px solid; border-radius:18px; padding:15px 17px; margin:20px 0 -4px; }
  .alert svg{ flex:0 0 auto; margin-top:1px; }
  .a-text{ font-size:14.5px; line-height:1.55; }
  .a-head{ font-weight:700; }

  /* ---- status + footer ---- */
  .status{ text-align:center; padding:64px 20px; color:var(--muted); font-size:15px; }
  .status .big{ font-family:var(--display); font-size:21px; font-weight:500; color:var(--ink); margin-bottom:8px; }
  .spinner{ width:28px; height:28px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; margin:0 auto 18px; animation:spin .8s linear infinite; }
  @keyframes spin{ to{ transform:rotate(360deg) } }
  footer{ margin-top:42px; padding-top:20px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); line-height:1.65; text-align:center; }
  footer a{ color:var(--muted); }
  .about-btn{ margin-top:12px; cursor:pointer; display:inline-flex; align-items:center; gap:6px;
    background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:6px 13px 6px 11px;
    font-family:var(--sans); font-size:12.5px; font-weight:500; color:var(--muted); }
  .about-btn:hover{ color:var(--ink); border-color:var(--accent); }
  .about-btn svg{ width:15px; height:15px; }
  .foot-links{ text-align:center; margin-top:12px; color:var(--muted); font-size:13px; }
  .foot-links a{ color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
  .foot-links a:hover{ color:var(--ink); }

  /* ---- about sheet ---- */
  .sheet-bg{ position:fixed; inset:0; z-index:80; background:rgba(20,16,10,.42);
    display:flex; align-items:flex-end; justify-content:center; padding:0; }
  .sheet-bg[hidden]{ display:none; }
  @media (min-width:560px){ .sheet-bg{ align-items:center; padding:20px; } }
  .sheet{ background:var(--paper); width:100%; max-width:480px; max-height:88vh; overflow-y:auto;
    border:1px solid var(--line); border-radius:20px 20px 0 0; padding:20px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow:0 -12px 40px rgba(0,0,0,.22); animation:sheetUp .28s cubic-bezier(.2,.7,.2,1); }
  @media (min-width:560px){ .sheet{ border-radius:20px; } }
  @keyframes sheetUp{ from{ transform:translateY(28px); opacity:.6 } to{ transform:none; opacity:1 } }
  .sheet-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
  .sheet-head h2{ font-family:var(--display); font-size:20px; font-weight:500; letter-spacing:-.01em; margin:0; }
  .sheet-x{ flex:0 0 auto; cursor:pointer; width:32px; height:32px; border-radius:999px; border:1px solid var(--line);
    background:var(--panel); color:var(--muted); font-size:19px; line-height:1; }
  .sheet-x:hover{ color:var(--ink); }
  .sheet-body p{ font-size:14px; line-height:1.6; color:var(--ink); margin:12px 0 0; }
  .sheet-body a{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
  .sheet-body b{ font-weight:600; }
  .sheet-fine{ font-size:12px; color:var(--muted); margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }

  /* ---- sticky condensed header ---- */
  .stickybar{ position:fixed; top:0; left:0; right:0; z-index:40; display:flex; align-items:center;
    gap:11px; padding:11px clamp(16px,4vw,28px); padding-top:calc(11px + env(safe-area-inset-top));
    background:color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px); border-bottom:1px solid var(--line);
    transform:translateY(-101%); transition:transform .28s ease; }
  .stickybar.show{ transform:translateY(0); }
  .sb-dot{ width:11px; height:11px; border-radius:50%; background:var(--accent); flex:0 0 auto; }
  .sb-uv{ font-family:var(--display); font-weight:500; font-size:17px; color:var(--ink); font-variant-numeric:tabular-nums; }
  .sb-cat{ font-size:13px; color:var(--accent); font-weight:600; }
  .sb-place{ font-size:13px; color:var(--muted); margin-left:auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

  /* ---- offline / stale pill ---- */
  .pill{ display:none; align-items:center; gap:7px; margin-top:12px; padding:8px 13px; border-radius:999px;
    font-size:12.5px; font-weight:500; background:#D6A53F22; color:#9A6E1B; border:1px solid #D6A53F55; width:fit-content; }
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .pill{ color:#E3C275; } }
  :root[data-theme="dark"] .pill{ color:#E3C275; }
  .pill.show{ display:flex; }
  .pill svg{ flex:0 0 auto; }

  /* ---- theme toggle ---- */
  button.iconbtn{ font-family:var(--sans); cursor:pointer; color:var(--ink); background:var(--panel);
    border:1px solid var(--line); border-radius:999px; width:38px; height:38px; display:inline-flex;
    align-items:center; justify-content:center; transition:border-color .2s, transform .1s; flex:0 0 auto; }
  button.iconbtn:hover{ border-color:var(--accent); }
  button.iconbtn:active{ transform:scale(.95); }

  /* ---- update toast ---- */
  .toast{ position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); transform:translateX(-50%) translateY(140%);
    z-index:70; display:flex; align-items:center; gap:14px; background:var(--ink); color:var(--paper);
    padding:13px 16px; border-radius:999px; box-shadow:0 8px 30px rgba(0,0,0,.25); font-size:14px;
    transition:transform .3s cubic-bezier(.2,.7,.2,1); max-width:calc(100vw - 32px); }
  .toast.show{ transform:translateX(-50%) translateY(0); }
  .toast button{ cursor:pointer; background:var(--paper); color:var(--ink); border:0; border-radius:999px;
    padding:8px 15px; font-family:var(--sans); font-size:13px; font-weight:600; white-space:nowrap; }

  /* ---- add-to-home-screen nudge ---- */
  .install-bar{ position:fixed; left:50%; bottom:calc(16px + env(safe-area-inset-bottom)); transform:translateX(-50%) translateY(180%);
    z-index:66; display:flex; align-items:center; gap:11px; width:max-content; max-width:calc(100vw - 24px);
    background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:16px;
    padding:10px 10px 10px 13px; box-shadow:0 10px 34px rgba(0,0,0,.18); font-size:14px; line-height:1.35;
    transition:transform .38s cubic-bezier(.2,.7,.2,1); }
  .install-bar.show{ transform:translateX(-50%) translateY(0); }
  .ib-ico{ display:inline-flex; color:var(--accent); flex:0 0 auto; }
  .ib-ico svg{ width:22px; height:22px; }
  .ib-txt{ flex:1 1 auto; }
  .ib-txt b{ font-weight:600; }
  .ib-txt svg{ width:16px; height:16px; vertical-align:-3px; }
  .ib-add{ flex:0 0 auto; cursor:pointer; background:var(--ink); color:var(--paper); border:0; border-radius:999px;
    padding:8px 16px; font-family:var(--sans); font-size:14px; font-weight:600; white-space:nowrap; }
  .ib-x{ flex:0 0 auto; cursor:pointer; background:transparent; border:0; color:var(--muted); font-size:20px; line-height:1; padding:2px 5px; }

  .fade{ opacity:0; transform:translateY(10px); animation:rise .7s ease forwards; }
  #content.noanim .fade{ animation:none; opacity:1; transform:none; }
  @keyframes rise{ to{ opacity:1; transform:none } }
  @media (prefers-reduced-motion: reduce){ .fade{ animation:none; opacity:1; transform:none } }
  .d1{ animation-delay:.04s } .d2{ animation-delay:.1s } .d3{ animation-delay:.17s }
  .d4{ animation-delay:.24s } .d5{ animation-delay:.3s } .d6{ animation-delay:.36s }

  /* ============ mobile-first refinements (compact, single-screen) ============ */
  @media (max-width: 560px){
    body{ padding:12px 13px calc(22px + env(safe-area-inset-bottom));
      padding-top:calc(12px + env(safe-area-inset-top));
      padding-left:calc(13px + env(safe-area-inset-left));
      padding-right:calc(13px + env(safe-area-inset-right)); }
    .topbar{ padding-bottom:12px; gap:10px 14px; }
    .place{ font-size:21px; margin:0 0 5px; }
    .meta{ font-size:12px; gap:3px 12px; }
    .controls{ gap:7px; }
    .geo-lbl{ display:none; }
    button.geo{ padding:9px 11px; }

    /* hero: compact centered column */
    .hero{ flex-direction:column; text-align:center; gap:9px; padding:10px 0 2px; }
    .gauge-wrap{ width:min(46vw,164px); }
    .track,.value{ stroke-width:14; }
    .uv-num{ font-size:clamp(44px,12.5vw,56px); }
    .uv-cat{ margin-top:7px; }
    .hero-text{ flex-basis:auto; width:100%; min-width:0; }
    .advice{ font-size:15px; line-height:1.4; }
    .toggle{ margin:1px auto 0; }
    .toggle button{ padding:7px 14px; }
    .src-note{ margin-top:7px; font-size:11px; }

    /* tight vertical rhythm */
    section.block{ margin-top:14px; }
    h2{ margin-bottom:8px; font-size:11px; }
    .tiles{ gap:8px; }
    .tile{ padding:11px 11px; border-radius:15px; }
    .tile .t-val{ font-size:18px; margin-top:6px; }
    .hours{ gap:6px; }
    .hr-block{ padding:10px 3px; border-radius:13px; }
    .hr-uv{ margin:5px 0 5px; }
    .hr-dot{ width:24px; height:4px; }
    .panel,.timer,.chart-card{ padding:15px 14px; border-radius:17px; }
    .me-row{ gap:7px; }
    .me-pill{ padding:9px 9px; border-radius:12px; }
    .sk-readout{ margin-top:13px; }
    .sk-time{ font-size:clamp(30px,7vw,38px); }
    .sk-note,.t-note{ margin-top:11px; }
    .t-budget{ margin-bottom:13px; }
    .forecast{ gap:7px; }
    .fc-card{ padding:12px 5px; border-radius:14px; }
    footer{ margin-top:26px; padding-top:16px; }
  }
  @media (max-width: 380px){
    .hr-uv{ font-size:19px; }
    .hr-time{ font-size:10.5px; }
    .tile .t-val{ font-size:17px; }
    .me-val{ font-size:14px; }
  }
