    :root {
      --night: #3A4275;
      --violet: #6D4A82;
      --violetlit: #A78BBF;
      --ember: #C86A55;
      --gold: #F0AE55;
      --deep: #242A47;
      --ink: #080A10;
      --ink1: #0E1119;
      --ink2: #161A26;
      --ink3: #212636;
      --line: #262C3D;
      --bone: #E9ECF4;
      --mist: #838DA6;
      --mistd: #5A6379;
      --dsp: 'Bricolage Grotesque', sans-serif;
      --bdy: 'Inter Tight', sans-serif;
      --dat: 'IBM Plex Mono', monospace;
      --band: var(--gold);
      --headline: var(--gold);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { min-height: 100%; background: #05070C; overscroll-behavior-y: contain; }
    body { display: flex; justify-content: center; }
    button { border: 0; }

    .phone {
      width: 100%;
      max-width: 420px;
      height: 100dvh;
      background: var(--ink);
      position: relative;
      overflow: hidden;
      font-family: var(--bdy);
      color: var(--bone);
      border-radius: 34px;
    }
    .panels {
      display: flex;
      width: 100%;
      height: 100%;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
    }
    .panels::-webkit-scrollbar { display: none; }
    .panel {
      position: relative;
      flex: 0 0 100%;
      width: 100%;
      height: 100%;
      overflow: hidden;
      scroll-snap-align: start;
      scroll-snap-stop: always;
    }
    .panel.forecast-error-state {
      --band: var(--night);
      --headline: var(--bone);
    }
    .wash {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 310px;
      z-index: 0;
      background: linear-gradient(180deg, var(--band) 0%, rgba(0, 0, 0, 0) 100%);
      opacity: .17;
    }
    .status {
      position: relative;
      z-index: 2;
      height: 42px;
      padding: 15px 22px 0;
      font-family: var(--dat);
      font-size: 11px;
      color: var(--mistd);
    }
    .status .r { float: right; }
    .pad { position: relative; z-index: 2; padding: 0 22px; }
    .hair { height: 1px; background: var(--line); width: 100%; }
    .eb {
      font-family: var(--dat);
      font-size: 10px;
      letter-spacing: .15em;
      text-transform: uppercase;
      color: var(--mistd);
    }
    .mono { font-family: var(--dat); font-size: 10.5px; color: var(--mist); }
    .rt { float: right; }
    .clr { clear: both; }

    .vh {
      font-family: var(--dsp);
      font-weight: 700;
      font-size: 35px;
      line-height: 1.03;
      letter-spacing: -.035em;
      color: var(--headline);
    }
    .vp {
      font-family: var(--dsp);
      font-size: 18px;
      font-weight: 400;
      line-height: 1.33;
      letter-spacing: -.012em;
      color: var(--bone);
    }
    .sc {
      font-family: var(--dsp);
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -.04em;
      display: inline-block;
      vertical-align: baseline;
      color: var(--band);
    }
    .scl {
      font-family: var(--dat);
      font-size: 9.5px;
      letter-spacing: .11em;
      text-transform: uppercase;
      color: var(--mistd);
      display: inline-block;
      margin-left: 10px;
      vertical-align: baseline;
    }
    .loading-value { color: var(--mistd) !important; }
    .forecast-error { padding-top: 0; }
    .forecast-error-message {
      font-family: var(--dsp);
      font-size: 25px;
      font-weight: 700;
      line-height: 1.12;
      letter-spacing: -.03em;
      color: var(--bone);
    }
    .forecast-error-category {
      display: block;
      margin-top: 8px;
      font-family: var(--dat);
      font-size: 10.5px;
      line-height: 1.4;
      color: var(--mist);
    }

    .ch { color: var(--mist); font-size: 15px; line-height: 20px; }
    .empty-action {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      min-height: 44px;
      margin-top: 6px;
      padding: 12px 0;
      background: transparent;
      color: var(--bone);
      font-family: var(--bdy);
      font-size: 15px;
      line-height: 20px;
      text-align: left;
      white-space: normal;
    }
    .empty-action[hidden] { display: none; }
    .empty-action .ch { margin-left: 12px; }
    [data-ui="now-empty"] { margin-top: 0; padding: 0; align-items: flex-start; }
    .onboarding { position: absolute; inset: 0; z-index: 30; overflow: hidden; background: var(--ink); }
    .onboarding[hidden], .onboarding-screen[hidden], .onboarding-hero[hidden] { display: none; }
    .onboarding-status { position: relative; z-index: 1; height: 42px; padding: 15px 24px 0; display: flex; justify-content: space-between; font: 600 12px var(--bdy); }
    .onboarding-hero { position: absolute; top: 0; left: 0; right: 0; height: 330px; z-index: 1; }
    .onboarding-hero .hero { position: absolute; top: 0; left: 0; width: 100%; overflow: visible; }
    .onboarding-diagram-label { position: absolute; z-index: 1; color: #A9B0C3; font: 400 9px var(--dat); letter-spacing: .12em; text-transform: uppercase; }
    .onboarding-diagram-label:first-of-type { left: calc(50% - 162px); top: 112px; }
    .onboarding-diagram-label:last-of-type { right: calc(50% - 162px); top: 206px; text-align: right; }
    .onboarding-eyebrow { position: relative; z-index: 1; display: flex; justify-content: space-between; padding: 0 20px; color: #C2C8D8; font: 400 10px var(--dat); letter-spacing: .14em; text-transform: uppercase; }
    .onboarding-content { position: absolute; top: 338px; left: 20px; right: 20px; }
    .onboarding-title {
      color: var(--bone);
      font-family: var(--dsp);
      font-size: 25px;
      font-weight: 700;
      line-height: 1.12;
      letter-spacing: -.03em;
    }
    .onboarding-title:focus { outline: none; }
    .onboarding-copy {
      margin-top: 8px;
      color: var(--mist);
      font-family: var(--bdy);
      font-size: 14px;
      line-height: 1.4;
    }
    .onboarding-actions { position: absolute; left: 20px; right: 20px; bottom: 34px; display: flex; gap: 8px; }
    .onboarding-actions button { flex: 1; display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--bone); font: 600 14px/18px var(--bdy); }
    .onboarding-actions .onboarding-commit { background: var(--bone); color: var(--ink); }
    .onboarding[data-screen="1"] { background: linear-gradient(180deg, #1B203A 0%, #080A10 62%); }
    .onboarding-welcome .onboarding-mark { position: absolute; left: 28px; top: 150px; }
    .onboarding-welcome .onboarding-content { top: 250px; left: 28px; right: 28px; }
    .onboarding-welcome .onboarding-title { font-size: 40px; line-height: 1.02; letter-spacing: -.046em; }
    .onboarding-welcome .onboarding-title span { color: var(--gold); }
    .onboarding-welcome .onboarding-copy { margin-top: 14px; font-size: 15px; max-width: 240px; }
    .places-first-run {
      margin-top: 12px;
      color: var(--mist);
      font-family: var(--bdy);
      font-size: 14px;
      line-height: 1.4;
    }
    .places-first-run[hidden] { display: none; }

    .track {
      display: flex;
      height: 24px;
      border-radius: 6px;
      overflow: hidden;
      font-size: 0;
      white-space: nowrap;
      background: var(--ink3);
    }
    .track i { display: flex; flex-shrink: 0; align-items: center; overflow: hidden; font-style: normal; }
    .track i span { padding-left: 5px; font-family: var(--dat); font-size: 8.5px; letter-spacing: .03em; text-transform: uppercase; color: rgba(8,10,16,.78); white-space: nowrap; }
    .track i.conditional { opacity: .55; }
    .track i.conditional span, .track i.blue span { color: var(--bone); }
    .ticks { display: flex; justify-content: space-between; margin-top: 5px; font-family: var(--dat); font-size: 9.5px; color: var(--mist); white-space: nowrap; }
    .nowm { position: relative; height: 0; }
    .nowm i { position: absolute; top: 0; width: 2px; height: 24px; background: var(--bone); z-index: 1; }
    .nowm b {
      position: absolute;
      top: -12px;
      font-family: var(--dat);
      font-size: 8.5px;
      letter-spacing: .1em;
      color: var(--bone);
      font-weight: 500;
      white-space: nowrap;
    }
    .setup {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-top: 9px;
      padding-top: 8px;
      border-top: 1px solid var(--line);
    }
    .setup .k {
      font-family: var(--bdy);
      font-size: 13px;
      color: var(--mist);
    }
    .setup .v {
      font-family: var(--dsp);
      font-size: 24px;
      font-weight: 700;
      letter-spacing: -.03em;
      color: var(--headline);
    }

    .prov { font-family: var(--dat); font-size: 10.5px; color: var(--mistd); padding-top: 9px; }
    .prov b { color: var(--mist); font-weight: 500; }
    .pip { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
    .btn {
      display: block;
      padding: 14px;
      border-radius: 13px;
      text-align: center;
      font-size: 15px;
      font-weight: 500;
      font-family: var(--bdy);
      text-decoration: none;
      margin-top: 13px;
      background: var(--bone);
      color: var(--ink);
    }
    .btn[hidden] { display: none; }
    .nav {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: calc(14px + env(safe-area-inset-bottom));
      z-index: 9;
      display: flex;
      gap: 4px;
      padding: 5px;
      background: rgba(22,26,38,.88);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 999px;
    }
    .nav button {
      display: flex;
      align-items: center;
      gap: 6px;
      font: 600 12.5px var(--bdy);
      color: var(--mist);
      background: transparent;
      padding: 9px 14px;
      border-radius: 999px;
      min-height: 34px;
      min-width: 44px;
      cursor: pointer;
    }
    .nav button[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--bone); }
    .nav button:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
    .nav svg { width: 15px; height: 15px; }
    .fade {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(90px + env(safe-area-inset-bottom));
      background: linear-gradient(transparent,var(--ink) 65%);
      z-index: 8;
      pointer-events: none;
    }

    [data-panel="now"] > .wash { display: none; }
    [data-panel="now"] > .pad { position: static; padding: 0 20px; }
    .now-hero { position: absolute; top: 0; left: 0; right: 0; height: 330px; z-index: 1; }
    .now-hero[hidden] { display: none; }
    .now-hero .hero { position: absolute; top: 0; left: 0; width: 100%; overflow: visible; }
    .chip {
      position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px;
      padding: 0 10px 0 11px; height: 44px; border-radius: 12px;
      background: rgba(8,10,16,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(233,236,244,.18);
    }
    .chip[hidden] { display: none; }
    .chip .k { font-family: var(--dat); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #A9B0C3; }
    .chip .v { font-family: var(--dsp); font-weight: 700; font-size: 15px; letter-spacing: -.02em; color: var(--headline); }
    .chip .p { font-family: var(--dat); font-size: 10px; color: #A9B0C3; }
    .chip .c { color: var(--bone); opacity: .8; display: flex; }
    .chip[data-detail-side="above"] { left: calc(50% - 162px); top: 80px; }
    .chip[data-detail-side="toward"] { right: calc(50% - 162px); top: 170px; }
    .now-hero[data-side="left"] .chip[data-detail-side="above"] { left: auto; right: calc(50% - 162px); }
    .now-hero[data-side="left"] .chip[data-detail-side="toward"] { right: auto; left: calc(50% - 162px); }
    .now-event { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 8px; }
    .now-event .eb { color: #C2C8D8; letter-spacing: .14em; }
    .now-body, .now-no-forecast { position: absolute; top: 338px; left: 20px; right: 20px; z-index: 2; }
    .now-body .vh { font-size: 35px; line-height: 1; text-wrap: balance; }
    .now-body .vp { font-family: var(--bdy); font-size: 14.5px; line-height: 1.38; letter-spacing: normal; color: #D5D9E4; margin-top: 8px; }
    .now-meta { display: flex; gap: 10px; align-items: baseline; margin-top: 9px; font-family: var(--dat); font-size: 10.5px; color: var(--mist); white-space: nowrap; }
    .now-meta .sc { font-size: 24px; color: var(--headline); }
    .now-meta .scl { font-size: 10.5px; letter-spacing: normal; text-transform: none; color: var(--mist); margin-left: 0; }
    .now-meta .pip { width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; }
    .now-body .prov { font-size: 10px; color: var(--mist); margin-top: 3px; padding-top: 0; }
    .now-timing { margin-top: 12px; }

    .next-panel {
      --band: var(--night);
      overflow-y: auto;
      overscroll-behavior-y: contain;
      scrollbar-width: none;
    }
    .next-panel::-webkit-scrollbar { display: none; }
    .next-panel > .wash { display: none; }
    .next-panel > .pad { padding: 0 20px; }
    [data-ui="next-list"] {
      /* Bar height + bottom offset + clearance; include the device's safe area. */
      padding-bottom: calc(46px + 14px + 12px + env(safe-area-inset-bottom));
    }
    .next-title {
      margin-top: 6px;
      font-family: var(--dsp);
      font-size: 28px;
      font-weight: 700;
      line-height: 1.05;
      letter-spacing: -.03em;
    }
    .next-subhead {
      margin-top: 6px;
      font-size: 10px;
      color: var(--mistd);
      line-height: 1.5;
    }
    .next-subhead .calib {
      font-family: var(--bdy);
      font-size: 11.5px;
      letter-spacing: normal;
      color: var(--violetlit);
    }
    .seg {
      display: flex;
      gap: 16px;
      margin-top: 12px;
      border-bottom: 1px solid var(--line);
    }
    .seg button {
      display: block;
      padding: 0 0 9px;
      min-height: 30px;
      background: transparent;
      font-family: var(--bdy);
      font-size: 13px;
      font-weight: 400;
      color: var(--mist);
      cursor: pointer;
    }
    .seg button.on { color: var(--bone); border-bottom: 1.5px solid var(--bone); }
    .seg button:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
    .next-entry {
      display: grid;
      grid-template-columns: 62px minmax(0, 1fr);
      gap: 12px;
      padding: 11px 0;
      border-bottom: 1px solid var(--line);
    }
    .next-entry[hidden] { display: none; }
    .next-entry .d {
      font-family: var(--dat);
      font-size: 9.5px;
      color: var(--mist);
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .next-entry .t {
      font-family: var(--dat);
      font-size: 17px;
      font-weight: 500;
      letter-spacing: -.02em;
      margin-top: 3px;
    }
    .next-entry .vv {
      font-family: var(--dsp);
      font-size: 17px;
      font-weight: 600;
      letter-spacing: -.02em;
      line-height: 1.15;
    }
    .next-entry p {
      margin-top: 2px;
      color: var(--mist);
      font-size: 12px;
      line-height: 1.35;
    }
    .next-entry .sw {
      height: 6px;
      border-radius: 3px;
      background: var(--ink2);
      margin-top: 7px;
      position: relative;
      overflow: hidden;
    }
    .next-entry .sw i {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      border-radius: 3px;
    }
    .next-entry .s {
      display: flex;
      justify-content: space-between;
      font-family: var(--dat);
      font-size: 9.5px;
      color: var(--mist);
      margin-top: 4px;
    }
    .next-error { color: var(--bone); font-size: 13px; line-height: 1.4; padding-top: 18px; }

    .places-panel {
      --band: var(--violet);
      overflow-y: auto;
      overscroll-behavior-y: contain;
      scrollbar-width: none;
    }
    .places-panel::-webkit-scrollbar { display: none; }
    .places-panel > .wash { display: none; }
    .places-panel > .pad { padding: 0 20px; }
    [data-ui="places-list"] {
      /* Bar height + bottom offset + clearance, including the device safe area. */
      padding-bottom: calc(46px + 14px + 12px + env(safe-area-inset-bottom));
    }
    .places-title {
      margin-top: 6px;
      font-family: var(--dsp);
      font-size: 28px;
      font-weight: 700;
      line-height: 1.05;
      letter-spacing: -.03em;
    }
    .place-search-form {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 46px;
      margin-top: 10px;
      border-bottom: 1px solid var(--line);
    }
    .search-icon { color: var(--mistd); }
    .search,
    .search-submit {
      min-width: 0;
      height: 44px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      font-family: var(--bdy);
    }
    .search {
      flex: 1;
      color: var(--mist);
      font-size: 15px;
    }
    .search::placeholder { color: var(--mist); opacity: 1; }
    .search-submit {
      padding: 0 2px;
      color: var(--mist);
      font-size: 13px;
      font-weight: 600;
    }
    .search:focus-visible,
    .search-submit:focus-visible { outline: 1px solid var(--mist); outline-offset: 2px; }
    .search-submit:disabled { color: var(--mistd); }
    .search-results { margin-top: 10px; }
    .search-result {
      display: block;
      width: 100%;
      min-height: 58px;
      padding: 10px 0;
      border-top: 1px solid var(--line);
      background: transparent;
      color: inherit;
      font-family: var(--bdy);
      text-align: left;
    }
    .search-result .t {
      display: block;
      font-family: var(--dsp);
      font-size: 15px;
      font-weight: 600;
      line-height: 1.25;
      letter-spacing: -.01em;
    }
    .search-result .s {
      display: block;
      margin-top: 3px;
      color: var(--mist);
      font-size: 11.5px;
      line-height: 1.3;
    }
    .search-message {
      padding: 18px 0 8px;
      color: var(--mist);
      font-size: 13px;
      line-height: 1.45;
    }
    .search-message[hidden],
    .search-results[hidden] { display: none; }
    .search-sheet-heading { position: relative; padding-right: 64px; }
    .search-cancel {
      position: absolute;
      top: -10px;
      right: -10px;
      min-width: 64px;
      min-height: 44px;
      background: transparent;
      border: 0;
      color: var(--bone);
    }
    .search-attribution {
      padding-top: 12px;
      border-top: 1px solid var(--line);
      color: var(--mistd);
      font-family: var(--dat);
      font-size: 9px;
    }
    .search-attribution a { color: var(--mist); }
    .gps {
      position: relative;
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 52px;
      padding: 10px 0;
      border-bottom: 1px solid var(--line);
      background: transparent;
      color: inherit;
      font-family: var(--bdy);
      text-align: left;
    }
    .gps .ic {
      color: var(--gold);
      font-size: 14px;
      flex-shrink: 0;
    }
    .gps .x { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
    .gps .x .t { color: var(--gold); font-size: 14px; }
    .gps .x .s { margin-left: auto; color: var(--mist); font-size: 12px; }
    .gps .clr { display: none; }
    .gps.pending .x .s { color: var(--mist); }
    .gps.inactive { pointer-events: none; }
    .gps.inactive .ic {
      color: var(--mistd);
    }
    .gps.inactive .x .t { color: var(--mistd); }
    .place {
      position: relative;
      width: 100%;
      overflow: visible;
    }
    .place-select {
      display: flex;
      align-items: center;
      gap: 12px;
      width: calc(100% - 44px);
      min-height: 46px;
      padding: 10px 0;
      min-width: 0;
      background: transparent;
      color: inherit;
      font-family: var(--bdy);
      text-align: left;
    }
    .place-manage {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: 44px;
      min-height: 44px;
      background: transparent;
      text-align: center;
    }
    .place-thumbnail {
      position: relative;
      flex: 0 0 56px;
      width: 56px;
      height: 42px;
      border-radius: 10px;
      overflow: hidden;
      background: #121633;
    }
    .place-thumbnail::before {
      position: absolute;
      inset: 0;
      content: '';
      opacity: 0;
      background: radial-gradient(circle 36px at 40px 36px,
        color-mix(in srgb, var(--place-band, transparent) 95%, transparent),
        color-mix(in srgb, var(--place-band, transparent) 25%, transparent) 60%, transparent);
    }
    .place[data-score] .place-thumbnail::before { opacity: 1; }
    .place-thumbnail::after {
      position: absolute;
      top: 33px;
      left: 0;
      right: 0;
      height: 9px;
      border-top: 1px solid rgba(233, 236, 244, .3);
      background: var(--ink);
      content: '';
    }
    .place.sel .place-thumbnail {
      outline: 1.5px solid var(--bone);
      outline-offset: 2px;
    }
    .place .vd {
      display: block;
      margin-top: 3px;
      font-size: 12.5px;
      font-weight: 600;
      text-wrap: balance;
    }
    .place .x { display: block; flex: 1; min-width: 0; }
    .place .x .t {
      overflow: hidden;
      font-family: var(--dsp);
      font-size: 17px;
      font-weight: 600;
      line-height: 1.15;
      letter-spacing: -.02em;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .place .x .s { margin-top: 3px; color: var(--mist); font-family: var(--dat); font-size: 9.5px; letter-spacing: .03em; }
    .place .x .t, .place .x .s { display: block; }
    .place .clr { display: none; }
    .place .vd.loading-value { color: var(--mistd); }
    .place.saved .place-select { padding: 0; font-size: 14px; }
    .place.saved .x { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .place.saved .x .t { font-family: var(--bdy); font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: normal; }
    .place.saved .x .s { margin-top: 0; font-size: 10px; letter-spacing: normal; flex-shrink: 0; }
    .place .flag { display: block; color: var(--violetlit); font-size: 11.5px; line-height: 1.3; white-space: nowrap; }
    .place.saved.sel::before {
      position: absolute;
      top: 6px;
      bottom: 6px;
      left: -22px;
      width: 3px;
      background: var(--gold);
      content: '';
    }
    .sh { display: flex; justify-content: space-between; padding: 16px 0 0; overflow: hidden; font-size: 10px; }
    .sh .clr { display: none; }
    .sh .eb { color: var(--mist); letter-spacing: .14em; }
    [data-ui="places-list"] > .sh + .hair { display: none; }
    .places-error {
      padding: 8px 0 0;
      color: var(--ember);
      font-size: 12px;
      line-height: 1.4;
    }
    .places-error[hidden] { display: none; }
    .flag--single-line { margin-top: 3px; padding: 0; border: 0; border-radius: 0; background: transparent; }
    .flag--single-line .t { color: var(--violetlit); font-family: var(--bdy); font-size: 11.5px; line-height: 1.3; font-weight: 400; letter-spacing: normal; }
    .flag[hidden] { display: none; }

    .rating-overlay {
      position: absolute;
      z-index: 30;
      inset: 0;
    }
    .rating-overlay.is-dismissing { pointer-events: none; }
    .place-save-overlay { z-index: 31; }
    .rating-overlay[hidden] { display: none; }
    .rating-scrim {
      position: absolute;
      inset: 0;
      background: #000;
      opacity: .55;
      transition: opacity 220ms ease-out;
    }
    .rating-sheet {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      max-height: 100%;
      overflow-y: auto;
      padding: 10px 22px 22px;
      border-top: 1px solid var(--line);
      border-radius: 22px 22px 0 0;
      background: var(--ink1);
      animation: rating-sheet-up 220ms ease-out;
      transition: transform 220ms ease-out;
    }
    @keyframes rating-sheet-up {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }
    .rating-grab {
      position: relative;
      z-index: 1;
      display: block;
      width: 44px;
      height: 44px;
      margin: -10px auto -15px;
      padding: 0;
      background: transparent;
    }
    .rating-grab::before {
      content: '';
      position: absolute;
      top: 10px;
      left: 5px;
      width: 34px;
      height: 4px;
      border-radius: 2px;
      background: var(--ink3);
    }
    .rating-sheet h2 {
      font-family: var(--dsp);
      font-size: 23px;
      font-weight: 700;
      line-height: 1.12;
      letter-spacing: -.03em;
    }
    .detail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .detail-title-row h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .detail-answer {
      display: inline-flex; align-items: baseline; gap: 7px; flex: none; white-space: nowrap;
      border: 1px solid rgba(233,236,244,.18); border-radius: 12px; padding: 7px 11px;
      background: rgba(8,10,16,.35); line-height: 1.12;
    }
    .detail-answer .v { font-family: var(--dsp); font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
    .detail-answer .p { font-family: var(--dat); font-size: 10px; color: #A9B0C3; }
    .rating-subhead {
      margin-top: 6px;
      color: var(--mistd);
      font-family: var(--dat);
      font-size: 10px;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .detail-lead {
      margin-top: 14px;
      font-family: var(--dsp);
      font-size: 16px;
      font-weight: 400;
      line-height: 1.38;
      letter-spacing: -.01em;
    }
    .detail-layers { margin-top: 16px; }
    .lay { padding: 12px 0; overflow: hidden; }
    .lay .x { margin-right: 118px; }
    .lay .x .t { font-size: 14px; letter-spacing: -.005em; }
    .lay .x .g {
      margin-top: 2px;
      color: var(--mistd);
      font-size: 11.5px;
      line-height: 1.3;
    }
    .lay .m {
      float: right;
      width: 64px;
      height: 6px;
      margin-top: 11px;
      overflow: hidden;
      border-radius: 3px;
      background: var(--ink3);
    }
    .lay .m i { display: block; height: 6px; border-radius: 3px; }
    .lay .pc {
      float: right;
      width: 38px;
      margin-top: 8px;
      color: var(--mist);
      font-family: var(--dat);
      font-size: 12px;
      text-align: right;
    }
    .layer-meter--gold { background: var(--gold); }
    .layer-meter--ember { background: var(--ember); }
    .layer-meter--night { background: var(--night); }
    .layer-meter--violet { background: var(--violet); }
    .layer-meter--mistd { background: var(--mistd); }
    .ft {
      margin-top: 14px;
      color: var(--mist);
      font-family: var(--bdy);
      font-size: 11.5px;
      line-height: 1.3;
    }
    .rating-options { margin-top: 14px; }
    .rating-fields[hidden] { display: none; }
    .rating-option {
      display: block;
      width: 100%;
      min-height: 54px;
      padding: 10px 0;
      overflow: hidden;
      background: transparent;
      color: var(--bone);
      font-family: var(--bdy);
      text-align: left;
    }
    .rating-chip {
      float: left;
      width: 34px;
      height: 34px;
      border: 1px solid transparent;
      border-radius: 10px;
      font-family: var(--dsp);
      font-size: 16px;
      font-weight: 700;
      line-height: 33px;
      text-align: center;
    }
    .rating-option .x { display: block; margin-left: 46px; }
    .rating-option .t { display: block; font-size: 14.5px; font-weight: 400; letter-spacing: -.008em; }
    .rating-option .g { display: block; margin-top: 2px; color: var(--mistd); font-size: 11.5px; }
    .rating-option[data-rating="1"] .rating-chip { border-color: #3A4275; background: #1B2039; color: #7681B4; }
    .rating-option[data-rating="2"] .rating-chip { border-color: #6D4A82; background: #241E33; color: #A483BC; }
    .rating-option[data-rating="3"] .rating-chip { border-color: #C86A55; background: #2A1D1B; color: #D08A76; }
    .rating-option[data-rating="4"] .rating-chip { border-color: #E8894A; background: #2D2019; color: #E8894A; }
    .rating-option[data-rating="5"] .rating-chip { border-color: #F0AE55; background: #2E2517; color: #F0AE55; }
    .rating-option[data-rating="1"].selected .rating-chip { background: #3A4275; color: var(--bone); }
    .rating-option[data-rating="2"].selected .rating-chip { background: #6D4A82; color: var(--bone); }
    .rating-option[data-rating="3"].selected .rating-chip { background: #C86A55; color: var(--ink1); }
    .rating-option[data-rating="4"].selected .rating-chip { background: #E8894A; color: var(--ink1); }
    .rating-option[data-rating="5"].selected .rating-chip { background: #F0AE55; color: var(--ink1); }
    .rating-option.selected .t { font-weight: 600; }
    .rating-option[data-rating="unseen"] .rating-chip {
      border: 1px dashed var(--line);
      background: transparent;
      color: var(--mistd);
      font-size: 15px;
    }
    .rating-option[data-rating="unseen"] .t { color: var(--mist); }
    .rating-option[data-rating="unseen"].selected .rating-chip {
      border-color: var(--mist);
      background: transparent;
      color: var(--mist);
    }
    .rating-note-add,
    .rating-backup {
      display: block;
      width: 100%;
      min-height: 44px;
      background: transparent;
      color: var(--mistd);
      font-family: var(--bdy);
      text-align: left;
    }
    .rating-note-add { padding: 11px 0; font-size: 13px; }
    .rating-note {
      display: block;
      width: 100%;
      min-height: 70px;
      margin-bottom: 10px;
      padding: 11px 12px;
      resize: vertical;
      border: 1px solid var(--line);
      border-radius: 11px;
      outline: none;
      background: var(--ink2);
      color: var(--bone);
      font: 13px/1.4 var(--bdy);
    }
    .rating-note[hidden],
    .rating-note-add[hidden] { display: none; }
    .rating-note:focus { border-color: var(--mistd); }
    .place-name {
      min-height: 44px;
      margin-top: 14px;
      resize: none;
    }
    .place-management-overlay { z-index: 32; }
    .management-form { margin-top: 14px; }
    .management-label {
      display: block;
      margin-bottom: 6px;
      color: var(--mistd);
      font-family: var(--dat);
      font-size: 10px;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .management-rename-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 72px;
      gap: 8px;
    }
    .management-name { min-width: 0; margin: 0; }
    .management-rename,
    .management-cancel,
    .management-confirm {
      min-height: 44px;
      border: 1px solid rgba(233,236,244,.3);
      border-radius: 999px;
      background: transparent;
      color: var(--bone);
    }
    .management-actions { margin-top: 14px; }
    .management-action {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      min-height: 52px;
      padding: 0 2px;
      background: transparent;
      color: var(--bone);
      font: 14px var(--bdy);
      text-align: left;
    }
    .management-action .ch { color: var(--mist); font-size: 18px; }
    .management-action.destructive { color: var(--ember); }
    .management-copy {
      margin-top: 14px;
      color: var(--mist);
      font-size: 13px;
      line-height: 1.45;
    }
    .management-drop-list { margin-top: 12px; }
    .management-drop {
      display: block;
      width: 100%;
      min-height: 52px;
      padding: 0 2px;
      border-top: 1px solid var(--line);
      background: transparent;
      color: var(--bone);
      font: 14px var(--bdy);
      text-align: left;
    }
    .management-prompt-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 14px;
    }
    .management-prompt-actions.single { grid-template-columns: 1fr; }
    .management-confirm.destructive {
      border-color: rgba(200,106,85,.5);
      color: var(--ember);
    }
    .rating-backup {
      padding: 11px 0 0;
      border-top: 1px solid var(--line);
      font-family: var(--dat);
      font-size: 10px;
    }
    .rating-backup b { color: var(--mist); font-weight: 500; }
    .rating-backup-actions { display: flex; gap: 8px; padding-top: 8px; }
    .rating-backup-actions[hidden] { display: none; }
    .rating-backup-actions button {
      flex: 1;
      border: 1px solid rgba(233,236,244,.3);
      border-radius: 999px;
      background: transparent;
      color: var(--bone);
    }
    .rating-backup-error,
    .rating-state-warning { padding-top: 7px; color: var(--ember); font-size: 11.5px; }
    .rating-export-copy { padding-top: 10px; }
    .rating-export-copy[hidden] { display: none; }
    .rating-export-copy .t {
      color: var(--bone);
      font-family: var(--dsp);
      font-size: 14px;
      font-weight: 600;
    }
    .rating-export-copy p { margin-top: 3px; color: var(--mistd); font-size: 11.5px; line-height: 1.4; }
    .rating-export-json {
      display: block;
      width: 100%;
      height: 116px;
      margin-top: 8px;
      padding: 10px;
      resize: vertical;
      border: 1px solid var(--line);
      border-radius: 10px;
      outline: none;
      background: var(--ink2);
      color: var(--mist);
      font: 10px/1.45 var(--dat);
    }
    .rating-export-json:focus { border-color: var(--violet); }
    .rating-export-copy button {
      width: 100%;
      margin-top: 8px;
      border: 1px solid rgba(233,236,244,.3);
      border-radius: 999px;
      background: transparent;
      color: var(--bone);
    }
    .rating-export-status { min-height: 16px; padding-top: 6px; color: var(--mistd); font-size: 11px; }
    .rating-save,
    .management-rename,
    .management-cancel,
    .management-confirm,
    .rating-backup-actions button,
    .rating-export-copy button,
    .search-cancel {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 44px;
      padding: 0 12px;
      font: 600 14px/1.4 var(--bdy);
    }
    .rating-save { width: 100%; border: 0; border-radius: 999px; background: var(--bone); color: var(--ink); line-height: 18px; }
    .rating-unseen-check { margin-bottom: 8px; color: var(--mist); font: 13px/1.4 var(--bdy); }
    .rating-unseen-check[hidden] { display: none; }
    .rating-save[hidden] { display: none; }
    .rating-save:disabled { background: transparent; border: 1px solid rgba(233,236,244,.18); color: var(--mistd); }

    @media (prefers-reduced-motion: reduce) {
      .rating-sheet { animation: none; transition: none; }
      .rating-scrim { transition: none; }
    }

    @media (min-width: 600px) {
      body { padding: 24px; }
      .phone { height: calc(100dvh - 48px); }
    }
