/* refine.css: typographic + layout refinement pass (Oct 26). Loaded last.
   Intent: the map is the hero. Chrome is quiet: hairlines, a tight type scale
   (body 13-14, labels 11 small caps, one heading size ~16), weight 400/500/600,
   peek-first sheets on phones. Visual only: no JS hooks renamed. */
:root{
  --rf-hair:rgba(26,26,26,.12); --rf-hair-2:rgba(26,26,26,.22); --rf-ink-3:#8A8A8A;
  --rf-label:10.5px; --rf-shadow:0 1px 2px rgba(0,0,0,.05),0 6px 20px rgba(0,0,0,.08);
  --rd-fs-xs:11px; --rd-fs-sm:13px; --rd-fs-md:14px; --rd-fs-lg:16px; --rd-fs-xl:18px; --rd-fs-score:22px;
  --rd-title-size:10.5px; --rd-title-weight:600; --rd-title-tracking:.14em;
  --rd-fw-bold:600; --rd-fw-heavy:600;
  --rd-tap:40px; --rd-topbar-h:48px; --rd-run-h:40px;
  --rd-radius-md:6px; --rd-radius-lg:10px; --rd-shadow-1:none; --rd-shadow-2:var(--rf-shadow);
  --dock-h:92px;
}
@media (max-width:899px){:root{--rd-sheet-default:164px;--rd-sheet-peek:40px;--rd-topbar-h:46px}}

html,body{font-size:13.5px;line-height:1.4;font-feature-settings:"ss01","cv11"}
/* section labels: letter-spaced small caps, one grey */
.panel-title,.tray__head,.sheet__head .panel-title,.water-key__title,.onboard__kicker,.info-card h4,
.score-card__head,.metric__label,.tray__group > :is(h3,h4,.panel-title,header),
details.advanced > summary,.score-card__details > summary,.score-table th{
  font-family:var(--rd-font)!important;font-size:var(--rf-label)!important;font-weight:600!important;letter-spacing:.14em!important;
  text-transform:uppercase;color:var(--rd-ink-2)!important;font-style:normal!important;line-height:1.3}
/* undo the 13px floor for captions; 11-12px is the caption size here */
.small,small,.piece-card__hint,.dock__readout,.dock__readout small,.metric__note,.score-card__level,.score-list__note,
.water-key__row,.time-picker__btn small,.compare__thumbs figcaption,.score-table,.chip,.unit,.tool-sheet__readout,
.piece-card__count,.play-wet,.score-card__warn,.opt-list__body,.progress,.score-card .metric--scores > .metric__label small,
.piece-card__hint .tag,.maplibregl-ctrl-attrib,.score-card footer,.score-card > p:last-child{font-size:11.5px!important}
.tag,.teach-label{font-size:10px!important;letter-spacing:.1em!important;font-weight:500;border:0!important;background:none!important;padding:0!important;color:var(--rf-ink-3)!important;text-transform:uppercase}
button{font-weight:500}
:where(b,strong){font-weight:600}

/* ---------- top bar ---------- */
.topbar{height:var(--rd-topbar-h);min-height:var(--rd-topbar-h);border-bottom:1px solid var(--rf-hair)!important;padding-top:0;padding-bottom:0;box-shadow:none}
.topbar__name{font-size:14px!important;font-weight:600!important;letter-spacing:-.005em}
.topbar__mode{font-size:var(--rf-label)!important;letter-spacing:.14em;font-weight:500;color:var(--rf-ink-3)}
.topbar .teach-label{align-self:center}
.icon-btn{font-size:12.5px;font-weight:500;color:var(--rd-ink);border:0!important;background:none;min-height:40px;padding:0 8px}
.topbar .seg,.topbar .seg--view{border:1px solid var(--rf-hair-2)!important;border-radius:999px;padding:2px;background:#fff;min-height:0;height:30px;align-self:center}
.topbar .seg .seg__btn,.topbar .seg button{min-height:0!important;height:24px;font-size:12px;font-weight:500;padding:0 10px;border:0;border-radius:999px;color:var(--rd-ink-2);position:relative}
.topbar .seg .seg__btn::after,.topbar .seg button::after{content:"";position:absolute;inset:-8px -2px}
.topbar .seg .is-on{background:var(--rd-ink)!important;color:#fff!important}
@media (max-width:599px){.topbar__pre{display:none}.topbar{gap:4px;padding-left:12px;padding-right:4px}.icon-btn{padding:0 7px}}

/* teaching-model badge on the map: quiet small caps, no box */
@media (max-width:899px){
  .stage::after{font-size:9.5px!important;font-weight:500!important;letter-spacing:.14em!important;color:var(--rd-ink-2)!important;
    background:rgba(255,255,255,.82)!important;border:0!important;border-radius:2px!important;padding:2px 6px!important;top:8px!important;left:8px!important}
}

/* ---------- segmented controls (general) ---------- */
.seg{border:1px solid var(--rf-hair-2)!important;border-radius:999px!important;background:#fff;padding:2px;gap:0}
.seg .seg__btn,.seg button{font-size:12px!important;font-weight:500!important;border:0!important;border-radius:999px!important;color:var(--rd-ink-2);padding:0 10px;background:none}
.seg .is-on{background:var(--rd-ink)!important;color:#fff!important}

/* ---------- dock ---------- */
#dock.dock{border-top:1px solid var(--rf-hair)!important;background:rgba(255,255,255,.97);box-shadow:none;
  grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:"picker picker event event" "play scrub scrub run" "read read read read";
  gap:2px 8px;padding:6px 10px calc(4px + env(safe-area-inset-bottom))}
#dock .time-picker{grid-area:picker;border:1px solid var(--rf-hair-2)!important;border-radius:999px;padding:2px;height:32px;align-self:center;justify-self:start;background:#fff;box-shadow:none}
#dock .time-picker__btn{min-height:0!important;height:26px;border-radius:999px;font-size:12px!important;font-weight:500!important;padding:0 11px!important;min-width:0!important;
  color:var(--rd-ink-2);border:0;background:none;letter-spacing:0;display:inline-flex;align-items:center;gap:5px;position:relative;overflow:visible}
#dock .time-picker__btn::after{content:"";position:absolute;inset:-7px -1px}
#dock .time-picker__btn b{font-weight:500}
#dock .time-picker__btn.is-on{background:var(--rd-ink)!important;color:#fff!important}
#dock .time-picker__btn small{display:none}
#dock .seg--event{grid-area:event;height:32px;align-self:center;justify-self:end;border-color:var(--rf-hair-2)!important}
#dock .seg--event button{min-height:0!important;height:26px;font-size:12px!important;padding:0 9px!important;position:relative}
#dock .seg--event button::after{content:"";position:absolute;inset:-7px -1px}
#dock .play-btn{grid-area:play;width:32px;height:32px;min-height:0;border:1px solid var(--rf-hair-2)!important;border-radius:50%;font-size:10px;padding:0 0 0 2px;position:relative;background:#fff}
#dock .play-btn::after{content:"";position:absolute;inset:-5px}
#dock .time-scrub{grid-area:scrub;height:40px;margin:0;accent-color:var(--rd-ink)}
#dock .dock__readout{grid-area:read;font-size:11px!important;color:var(--rd-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;min-height:0}
#dock .dock__readout b{font-weight:600;color:var(--rd-ink)}
#dock .progress{grid-area:read}
#dock .run-btn{grid-area:run;min-width:0!important;min-height:0!important;height:36px;padding:0 14px 0 10px!important;border-radius:999px!important;font-size:12.5px!important;font-weight:500!important;
  box-shadow:none!important;gap:7px;letter-spacing:.01em;position:relative;align-self:center}
#dock .run-btn::after{content:"";position:absolute;inset:-3px 0}
#dock .run-btn__icon{width:auto;height:auto;background:none;color:#fff;font-size:9px;padding:0}
#dock .run-btn--busy{background:#4a4a4a}
@media (max-width:374px){#dock .time-picker__btn{padding:0 8px!important}#dock .seg--event button{padding:0 7px!important}}
@media (min-width:900px){
  #dock.dock{left:var(--rd-tray-w);grid-template-columns:auto auto auto minmax(120px,1fr) auto;grid-template-areas:"play picker event scrub run" "read read read read run";gap:2px 12px;padding:8px 16px 6px}
  #dock .time-picker,#dock .seg--event{justify-self:start}
  #dock .run-btn{height:38px;padding:0 18px 0 14px!important;font-size:13px!important}
}

/* stage / tray / sheets sit on the measured dock height (js/refine.js sets --dock-h) */
.stage{bottom:var(--dock-h)!important}
@media (max-width:899px){
  .tray,.tray[data-height]{bottom:var(--dock-h)!important}
  .tray[data-height=full]{height:calc(100% - var(--rd-topbar-h) - var(--dock-h))!important}
  .toast{bottom:calc(var(--dock-h) + var(--rd-sheet-default) + 12px)!important}
}
@media (min-width:900px){.toast{bottom:calc(var(--dock-h) + 16px)!important}}

/* ---------- tray ---------- */
.tray{border-top:1px solid var(--rf-hair)!important;box-shadow:0 -4px 18px rgba(0,0,0,.06)}
@media (min-width:900px){.tray,.tray[data-height]{border-right:1px solid var(--rf-hair)!important;padding:12px 14px}}
.tray__head{margin:2px 0 6px}
.tray__tabs{border-bottom:1px solid var(--rf-hair)!important;margin-bottom:8px;scrollbar-width:none}
.tray__tabs::-webkit-scrollbar{display:none}
.tray__tab{font-size:12px!important;font-weight:500!important;color:var(--rd-ink-2);padding:0 8px!important;border-bottom-width:1.5px!important;min-height:36px!important}
.tray__tab.is-on{font-weight:500!important;color:var(--rd-ink)}
.tray__cards{gap:4px!important;min-height:0!important}
.piece-card{border:1px solid transparent!important;background:none!important;border-radius:6px;padding:6px 6px 8px!important;min-height:0!important;box-shadow:none!important}
.piece-card:hover{border-color:var(--rf-hair-2)!important}
.piece-card.is-armed{border-color:var(--rd-ink)!important;box-shadow:none!important;background:#fff!important}
.piece-card.is-armed::after{font-weight:500;font-size:10px!important;bottom:-7px;letter-spacing:.02em}
.piece-card.is-explain{border-style:dashed!important;border-color:var(--rf-hair-2)!important;background:none!important}
.piece-card__icon{height:44px!important}
.piece-card__icon img,.piece-card img{width:44px!important;height:44px!important}
.piece-card__name{font-size:12.5px!important;font-weight:500!important;line-height:1.25;margin-top:2px}
.piece-card__blurb{font-family:var(--rd-font-serif);font-size:12px!important;line-height:1.35;color:var(--rd-ink-2);-webkit-line-clamp:2!important;line-clamp:2}
.piece-card__hint,.piece-card__hint .tag{font-size:11px!important;color:var(--rf-ink-3)!important}
.piece-card__info{width:22px!important;height:22px!important;min-height:22px!important;border:1px solid var(--rf-hair-2)!important;font-size:11px;font-weight:500;top:4px!important;right:4px!important}
.piece-card__count{font-size:10px!important;font-weight:500}
.tray__tools{font-size:11.5px}
.tray__tools button{border:1px solid var(--rf-hair-2)!important;border-radius:999px;font-weight:500;font-size:12px;min-height:34px!important;padding:0 12px}
.tray__hint{font-size:13px!important;background:none!important;border-left:1.5px solid var(--rd-ink)!important;padding:2px 0 2px 10px!important;color:var(--rd-ink-2)}
.placed__item{border-color:var(--rf-hair)!important}
.placed__name{font-size:13px;font-weight:500}
.editor{border:1px solid var(--rf-hair-2)!important;box-shadow:var(--rf-shadow)}
body.is-3d .tray__cards::before,.tray:has(.piece-card.is-disabled) .tray__cards::before{background:none!important;color:var(--rd-ink-2)!important;font-weight:500!important;font-size:12px!important;
  height:24px!important;justify-content:flex-start!important;font-style:italic;font-family:var(--rd-font-serif)}
body.is-3d .tray__cards,.tray:has(.piece-card.is-disabled) .tray__cards{padding-top:28px!important}
@media (max-width:899px){
  .tray{padding:0 12px}
  /* default sheet = one row of quiet cards; blurbs appear when the sheet is pulled up */
}
@media (min-width:900px){.tray__cards{gap:6px!important}.piece-card__blurb{-webkit-line-clamp:2!important}}

/* ---------- map overlays ---------- */
.water-key{border:0!important;border-radius:6px!important;box-shadow:var(--rf-shadow)!important;padding:7px 10px 8px!important;background:rgba(255,255,255,.94)!important}
.water-key__title{margin-bottom:3px!important}
.water-key__row{font-size:11.5px!important;line-height:1.45!important}
.maplibregl-ctrl-group{border:1px solid var(--rf-hair-2)!important;box-shadow:none!important;border-radius:6px!important;overflow:hidden}
.maplibregl-ctrl-group button{width:36px!important;height:36px!important}
.maplibregl-ctrl-attrib{font-size:10px!important;opacity:.8}
.ctx-toolbar{border:1px solid var(--rf-hair-2)!important;box-shadow:var(--rf-shadow)!important}
.ctx-toolbar button{font-size:12px;font-weight:500!important}
.ctx-toolbar__name{font-size:12.5px!important;font-weight:600}
.hint{font-weight:500}
.elev-chip{font-weight:500;font-size:11.5px!important}
@media (max-width:899px){
  /* legend collapses to a small "Legend" pill near the top; tap to open */
  .water-key{top:30px;bottom:auto!important;left:8px!important;max-width:210px;cursor:pointer;padding:5px 9px!important}
  .water-key:not(.is-open) .water-key__row{display:none}
  .water-key:not(.is-open) .water-key__title{margin:0!important}
  .water-key .water-key__title::after{content:" +";letter-spacing:0}
  .water-key.is-open .water-key__title::after{content:" −"}
  .water-key::before{content:"";position:absolute;inset:-8px -4px}
}

/* ---------- score card ---------- */
.score-card{border:1px solid var(--rf-hair)!important;box-shadow:var(--rf-shadow)!important;border-radius:8px!important;padding:9px 12px 10px!important;gap:6px!important;background:rgba(255,255,255,.97)}
.score-card__head{display:flex;align-items:center;flex-wrap:wrap;gap:2px 8px;color:var(--rd-ink)!important}
.score-card__head small{font-size:inherit!important;letter-spacing:inherit;color:var(--rf-ink-3);font-weight:500}
.score-card__toggle{margin-left:auto;min-height:32px!important;border:0!important;background:none!important;font-size:12px!important;letter-spacing:0;text-transform:none;font-weight:500;color:var(--rd-ink);
  padding:0 2px!important;text-decoration:underline;text-decoration-color:var(--rf-hair-2);text-underline-offset:3px;position:relative}
.score-card__toggle::after{content:"";position:absolute;inset:-4px -8px}
.score-card__takeaway{font-size:13px!important;line-height:1.4!important;color:var(--rd-ink)}
.score-card .metric--scores{margin-top:0!important}
.score-card .metric--scores > .metric__label{font-size:0!important;justify-content:flex-start!important}
.score-card .metric--scores > .metric__label small{border:0!important;padding:0!important;font-weight:500!important;letter-spacing:.1em;color:var(--rf-ink-3)!important}
.score-card .score-list{grid-auto-flow:row!important;grid-template-columns:repeat(var(--n,2),minmax(0,1fr));gap:0!important;margin-top:4px}
.score-card .score-list__item{border:0!important;border-left:1px solid var(--rf-hair)!important;border-radius:0!important;padding:2px 10px!important;display:flex;flex-direction:column;gap:1px}
.score-card .score-list__item:first-child{border-left:0!important;padding-left:0!important}
.score-card .score-list__label{font-size:11px!important;font-weight:500!important;color:var(--rd-ink-2);line-height:1.25;display:flex;align-items:center;gap:4px}
.score-card .score-list__value{font-size:17px!important;font-weight:600!important;letter-spacing:-.01em;line-height:1.15}
.score-card .score-list__value b{font-weight:600}
.score-card .score-tile__unit{font-size:11.5px;font-weight:500;color:var(--rd-ink-2)}
.score-card .vs-base{font-size:11px;color:var(--rf-ink-3)}
.score-card .score-list__item--coming_soon .score-list__value,.score-card .score-list__item--na .score-list__value,.score-card .score-list__item--no_rule .score-list__value{font-size:13px!important}
.explain-q{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;font-size:10px!important;border-color:var(--rf-hair-2)!important}
.explain-q::after{inset:-12px!important}
.metric{border-top:1px solid var(--rf-hair);padding-top:6px}
.metric--scores{border-top:0;padding-top:0}
.metric__value{font-size:14px!important;font-weight:500}
.metric__value small{color:var(--rf-ink-3)}
.bar{height:3px!important}
.score-card__warn{border-left:1.5px solid var(--rd-accent)!important;background:none!important;padding:2px 0 2px 10px!important;font-size:12px!important}
.callout{border-left-width:1.5px!important;background:none!important;padding:2px 0 2px 10px!important;font-size:13px!important}
.score-card .seg button{min-height:28px!important}
.score-card summary{font-size:var(--rf-label)!important;font-weight:600!important;letter-spacing:.14em!important;text-transform:uppercase;color:var(--rd-ink-2);min-height:34px!important}
.score-card__more{border:0!important;background:none!important;min-height:0!important;margin-left:0!important}
.score-card details{border-top:1px solid var(--rf-hair)}
.score-card .teach-label{display:block}
.score-table td{font-size:11.5px}
@media (min-width:900px){.score-card{width:300px!important}}
@media (max-width:899px){
  .score-card{left:8px;right:8px;max-height:min(44vh,calc(100% - var(--rd-sheet-default) - 56px))!important}
  /* collapsed = header line + one row of scores + one-line takeaway */
  .score-card.is-collapsed > .metric--scores{display:block!important}
  .score-card.is-collapsed > .score-card__takeaway{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;font-size:12px!important;color:var(--rd-ink-2)}
  .score-card.is-collapsed .metric--scores > .metric__label,.score-card.is-collapsed .score-list__note,
  .score-card.is-collapsed .vs-base,.score-card.is-collapsed .eco-breakdown{display:none!important}
  .score-card.is-collapsed .score-list__label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  .score-card.is-collapsed .score-list__label .explain-q{display:none}
  .score-card.is-collapsed{gap:3px!important;padding:7px 12px 8px!important}
  .score-card.is-collapsed .score-card__head small{display:none}
}

/* ---------- info card ---------- */
#infoCard.info-card{border:1px solid var(--rf-hair)!important;box-shadow:0 8px 32px rgba(0,0,0,.14)!important;padding:14px 16px 0!important;gap:8px!important}
#infoCard h3,.info-card h3{font-family:var(--rd-font)!important;font-size:16px!important;font-weight:600!important;line-height:1.25;letter-spacing:-.005em;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
#infoCard .info-card__body > p:first-of-type{font-family:var(--rd-font-serif);font-size:14px!important;line-height:1.45!important;max-width:62ch}
#infoCard .info-card__meta{font-size:13px;line-height:1.45;max-width:62ch}
#infoCard .info-card__meta p{margin:4px 0}
#infoCard h4{margin-top:12px!important;margin-bottom:2px}
#infoCard .info-card__model{background:none!important;border-left:1.5px solid #6FA3D6;border-radius:0!important;padding:1px 0 1px 10px!important;font-size:12.5px}
#infoCard .info-card__fig img{width:72px!important;height:72px!important}
#infoCard .info-card__close{background:#fff!important;color:var(--rd-ink)!important;border-top:1px solid var(--rf-hair)!important;font-weight:500!important;font-size:13px;
  min-height:44px!important;margin:4px -16px 0!important;width:calc(100% + 32px)!important;box-shadow:none!important;border-radius:0}
#infoCard .info-card__more{align-self:flex-start;border:0;background:none;padding:0;min-height:32px;font-size:12.5px;font-weight:500;color:var(--rd-ink);
  text-decoration:underline;text-decoration-color:var(--rf-hair-2);text-underline-offset:3px;display:none}
@media (max-width:899px){
  #infoCard.info-card{bottom:var(--dock-h)!important;max-height:min(60vh,calc(100vh - var(--rd-topbar-h) - var(--dock-h) - 24px))!important;border-radius:12px 12px 0 0!important;border-bottom:0!important}
  #infoCard .info-card__more{display:inline-block}
  /* peek: title + 3-line summary; the rest is one tap away ("More") */
  #infoCard.is-peek .info-card__fig{display:none}
  #infoCard.is-peek .info-card__body > p:first-of-type{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
  #infoCard.is-peek .info-card__meta > :not(.info-card__close){display:none!important}
  #infoCard:not(.is-peek) .info-card__more{display:none}
  #infoCard.is-peek{max-height:none!important}
  body:has(.piece-card.is-armed) #infoCard.info-card:not(.is-peek){max-height:30vh!important}
}
@media (min-width:900px){#infoCard.info-card{width:360px!important;max-height:calc(100vh - var(--rd-topbar-h) - var(--dock-h) - 24px)!important}}

/* ---------- onboarding ---------- */
.onboard{background:rgba(26,26,26,.18)!important;align-items:flex-start!important;padding:calc(var(--rd-topbar-h) + 48px) 12px 12px!important}
.onboard__card{width:min(340px,100%)!important;border:0!important;border-radius:10px!important;padding:14px 16px 8px!important;box-shadow:0 10px 36px rgba(0,0,0,.2)!important}
.onboard__title{font-size:16px!important;font-weight:600!important;margin:4px 0 4px!important;letter-spacing:-.005em}
.onboard__text{font-size:13.5px!important;line-height:1.45!important;margin:0 0 10px!important;color:var(--rd-ink)}
.onboard__dots i{width:5px!important;height:5px!important}
.onboard__foot{margin-top:2px}
.onboard__skip{font-size:12.5px;font-weight:500!important;padding:0 4px}
.onboard__next{font-size:12.5px;font-weight:500!important;border-radius:999px!important;min-height:32px!important;padding:0 16px!important;position:relative}
.onboard__next::after{content:"";position:absolute;inset:-4px 0}
.onboard-spot{box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--rd-accent)!important}
@media (min-width:900px){.onboard{align-items:center!important;padding:16px!important}}

/* ---------- popovers, sheets, options, compare ---------- */
.popover,.sheet{border:1px solid var(--rf-hair)!important;box-shadow:var(--rf-shadow)!important}
.popover label,.sheet label{font-size:13px}
.popover h3,.sheet h3,.sheet__head h3{font-size:16px;font-weight:600}
.sheet button,.popover button{font-weight:500}
.sheet button.is-primary,.popover button.is-primary,#compareBtn{border-radius:999px;font-weight:500!important;min-height:36px!important}
#compareBtn{border:1px solid var(--rf-hair-2)!important}
.compare__body{border:1px solid var(--rf-hair)!important;padding:16px 18px!important;box-shadow:var(--rf-shadow)}
.compare__body > .panel-title{font-size:var(--rf-label)!important;margin-bottom:10px!important}
.compare__card{border:1px solid var(--rf-hair)!important}
.compare__card h4{font-family:var(--rd-font)!important;font-style:normal!important;font-size:15px!important;font-weight:600!important}
.compare__card h4::before{width:8px!important;height:8px!important;flex-basis:8px!important;border-radius:50%}
.compare__thumbs img{border:1px solid var(--rf-hair)!important}
.compare__thumbs figcaption{font-weight:500!important}
.score-table th,.score-table td{border-color:var(--rf-hair)!important;padding-top:4px;padding-bottom:4px}
.opt-list__thumb{border:1px solid var(--rf-hair)!important}
.toast{font-weight:500!important;font-size:12.5px;border-radius:999px!important;padding:6px 14px!important;box-shadow:var(--rf-shadow)!important}
.mode-bar{border-bottom:1px solid var(--rf-hair)!important}
.tool-sheet{border:1px solid var(--rf-hair)!important;box-shadow:var(--rf-shadow)}
.topbar .icon-btn[aria-label]:is(:hover,:focus-visible)::after,#btnReset:is(:hover,:focus-visible)::after{font-size:11.5px!important;font-weight:500!important}

/* fixed chrome keeps its place while the tour spotlights it */
.onboard-spot:is(.tray,.dock,.topbar,.score-card,.water-key){position:fixed!important}
.onboard-spot:is(.score-card,.water-key){position:absolute!important}
.score-table,.score-table td{font-size:11.5px!important;line-height:1.35}
.score-table small{font-size:10.5px!important;color:var(--rf-ink-3)}
@media (max-width:899px){.compare__body{padding:12px 12px!important}.compare__card{padding:10px!important}}
/* lift the bar that holds a spotlighted control above the tour scrim */
:is(.dock,.tray,.topbar):has(.onboard-spot){z-index:91!important}
@media (min-width:900px){#dock .time-picker{width:auto!important}#dock .time-picker__btn{flex:0 0 auto!important;padding:0 14px!important}}

/* ================= pass 2 (Oct 26): bottom sheet + quiet Run ================= */
/* Run: a compact pill ("▶ Run"), primary by colour not size; 34px visual, >=42px hit area */
#dock .run-btn{height:34px!important;padding:0 14px 0 12px!important;font-size:13px!important;gap:6px}
#dock .run-btn::after{inset:-4px -3px!important}
#dock .run-btn__short{display:none}
@media (max-width:899px){
  #dock .run-btn__label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  #dock .run-btn__short{display:inline}
}
@media (min-width:900px){#dock .run-btn{height:34px!important;padding:0 16px 0 13px!important;font-size:12.5px!important}}

@media (max-width:899px){
  /* pass 3: heights come from JS (window.innerHeight via --sh-*), never 100vh; dvh only as a fallback.
     The sheet is fixed to the bottom bar; FULL covers the bottom bar and reaches the top bar (~93% of the screen). */
  :root{--rd-sheet-peek:186px;--sh-peek:186px;--sh-half:50vh;--sh-full:calc(100vh - var(--rd-topbar-h))}
  @supports (height:100dvh){:root{--sh-half:50dvh;--sh-full:calc(100dvh - var(--rd-topbar-h))}}
  html,body{overscroll-behavior:none}
  .tray,.tray[data-height]{position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:var(--dock-h,102px)!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;max-height:none!important;min-height:0!important;padding-bottom:0!important;
    transition:height .28s cubic-bezier(.2,.8,.2,1)!important}
  .tray[data-height=peek]{height:var(--sh-peek)!important}
  .tray[data-height=default]{height:var(--sh-half)!important}
  .tray[data-height=full]{height:var(--sh-full)!important;bottom:0!important;z-index:28!important;border-radius:14px 14px 0 0}
  .tray.is-sheet-dragging,.tray.is-sheet-dragging[data-height]{bottom:0!important;height:var(--drag-h)!important;transition:none!important;user-select:none;-webkit-user-select:none}
  /* in full the bottom bar slides away under the sheet (Close brings it back) */
  #dock{transition:transform .25s ease,visibility .25s}
  body.rd-sheet-full #dock{transform:translateY(110%);visibility:hidden}
  /* sheet header (handle + label + See all/Close): never inside a scroll container, so iOS cannot claim the touch to scroll */
  #grab.tray__grab{position:relative!important;top:auto!important;flex:none!important;z-index:4;display:flex!important;align-items:center;justify-content:space-between;
    height:48px!important;min-height:48px!important;margin:0 -12px!important;width:calc(100% + 24px)!important;padding:10px 12px 0 16px!important;box-sizing:border-box;
    background:#fff;touch-action:none!important;-webkit-touch-callout:none;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:14px 14px 0 0}
  #grab.tray__grab::after{content:""!important;position:absolute!important;left:50%!important;top:6px!important;width:40px!important;height:5px!important;margin-left:-20px!important;background:var(--rd-ink)!important;opacity:.3!important;border-radius:3px}
  #grab *{pointer-events:none}
  .tray__grab-title{font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--rd-ink-2)}
  .tray__grab-more{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:15px;background:var(--rd-ink);color:#fff;font-size:12.5px;font-weight:600}
  .tray__grab-more i{width:6px;height:6px;border-left:1.6px solid currentColor;border-top:1.6px solid currentColor;transform:translateY(2px) rotate(45deg);transition:transform .2s}
  .tray[data-height=full] .tray__grab-more{background:#fff;color:var(--rd-ink);box-shadow:inset 0 0 0 1px var(--rd-ink)}
  .tray[data-height=full] .tray__grab-more i{transform:translateY(-2px) rotate(225deg)}
  .tray__tabs{position:relative!important;top:auto!important;flex:none!important;z-index:3;background:#fff;touch-action:pan-x;margin:0 -12px!important;padding:0 6px!important}
  /* the only vertical scroller: cards, info, placed list, editor */
  .tray__scroll{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;
    margin:0 -12px;padding:8px 12px calc(20px + env(safe-area-inset-bottom))}
  .tray[data-height=peek] .tray__scroll{overflow-y:hidden;padding-top:6px}
  /* peek: one row, swipe sideways; a vertical drag on a card is a piece drag */
  .tray[data-height=peek] .tray__cards{display:flex!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  .tray[data-height=peek] .piece-card{flex:0 0 92px!important;width:92px;touch-action:pan-x}
  .tray[data-height=peek] .piece-card__blurb,.tray[data-height=peek] .piece-card__hint{display:none!important}
  /* half / full: a vertical list in two columns with descriptions; drag a piece by its icon */
  .tray:not([data-height=peek]) .tray__cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:4px 8px!important;overflow:visible!important}
  .tray:not([data-height=peek]) .piece-card{width:auto!important;flex:none!important;touch-action:pan-y;padding:8px 6px 10px!important}
  .tray:not([data-height=peek]) .piece-card__icon{touch-action:none}
  .tray[data-height=default] .piece-card__blurb{display:-webkit-box!important;-webkit-line-clamp:3!important}
  .tray[data-height=full] .piece-card__blurb{display:block!important;-webkit-line-clamp:unset!important;overflow:visible}
  /* results card: small handle; swipe the header up/down to open/close details */
  .score-card::before{content:"";order:-1;flex:none;align-self:center;width:28px;height:3px;border-radius:2px;background:var(--rd-ink);opacity:.2;margin:-3px 0 1px}
  .score-card__head{touch-action:none}
  /* info sheet: handle at the top; swipe up for more, down to shrink or close */
  #infoCard .sheet-handle{order:-1;flex:none;position:sticky;top:-14px;z-index:2;height:22px;margin:-14px -16px -8px;background:#fff;touch-action:none;cursor:grab;border-radius:12px 12px 0 0}
  #infoCard .sheet-handle::after{content:"";position:absolute;left:50%;top:8px;width:36px;height:4px;margin-left:-18px;border-radius:2px;background:var(--rd-ink);opacity:.28}
  #infoCard.is-sheet-dragging{transition:none!important}
}
@media (min-width:900px){.tray__grab-title,.tray__grab-more,#infoCard .sheet-handle{display:none}.tray__scroll{display:contents}}
/* phones: toasts sit just under the top bar, clear of the sheet and of a finger dropping a piece */
@media (max-width:899px){.toast{top:calc(var(--rd-topbar-h) + 34px)!important;bottom:auto!important}}
/* build string at the foot of the menu */
.menu__build{margin:12px 0 0;padding-top:8px;border-top:1px solid var(--rd-hair,#ddd);font-size:11px;color:var(--rd-ink-2,#555);font-variant-numeric:tabular-nums}
/* pass 3: FULL = one readable list, every strategy with its whole description; drag a piece by its icon */
@media (max-width:899px){
  .tray[data-height=full] .tray__cards{grid-template-columns:1fr!important;gap:0!important}
  .tray[data-height=full] .piece-card{display:grid!important;grid-template-columns:60px 1fr;grid-template-areas:"icon name" "icon blurb" "icon hint";
    column-gap:12px;row-gap:3px;align-items:start;text-align:left!important;padding:12px 40px 12px 4px!important;border:0!important;border-bottom:1px solid var(--rd-hair,#e2e2e2)!important;border-radius:0!important;min-height:0!important}
  .tray[data-height=full] .piece-card__icon{grid-area:icon;width:56px!important;margin:2px 0 0!important;justify-self:center}
  .tray[data-height=full] .piece-card__name{grid-area:name;text-align:left!important;margin:0!important}
  .tray[data-height=full] .piece-card__blurb{grid-area:blurb;text-align:left!important;margin:0!important}
  .tray[data-height=full] .piece-card__hint{grid-area:hint;text-align:left!important;margin:2px 0 0!important}
  .tray[data-height=full] .piece-card__info{position:absolute!important;top:10px!important;right:6px!important}
}
/* live site: Netlify's injected "Powered by Netlify" badge (bottom-right iframe) must not hide the end of the list */
@media (max-width:899px){body:has(#nl-badge-frame) .tray__scroll{padding-bottom:calc(84px + env(safe-area-inset-bottom))}}

/* ---------- pass 4: compact non-modal Layers popover (phone first) ---------- */
#layersPanel.layers-pop{padding:0!important;width:min(268px,calc(100vw - 16px))!important;max-height:min(40svh,40vh,340px)!important;
  display:flex;flex-direction:column;overflow:hidden!important;border-radius:10px!important;background:rgba(255,255,255,.97)!important;
  right:8px!important;top:calc(var(--rd-topbar-h) + 4px)!important;z-index:55}
#layersPanel.layers-pop.hidden{display:none!important}
@media (min-width:900px){#layersPanel.layers-pop{width:280px!important;max-height:min(62vh,520px)!important}}
.lp-head{display:flex;align-items:center;justify-content:space-between;padding:6px 6px 4px 12px;border-bottom:1px solid var(--rf-hair);flex:0 0 auto}
.lp-head .panel-title{margin:0!important;font-size:var(--rf-label)!important}
.lp-x{border:0;background:none;width:32px;height:32px;border-radius:999px;font-size:18px;line-height:1;color:var(--rd-ink-2);cursor:pointer;padding:0}
.lp-x:hover,.lp-x:focus-visible{background:var(--rd-surface-2)}
.lp-body{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:2px 12px 8px;flex:1 1 auto}
.layers-pop .lp-group{font-size:9.5px!important;font-weight:600!important;letter-spacing:.14em!important;text-transform:uppercase;color:var(--rf-ink-3)!important;
  margin:8px 0 1px!important;font-style:normal!important;list-style:none}
.layers-pop details.more-layers{display:block;gap:0}
.layers-pop details.more-layers > summary.lp-group{cursor:pointer;display:flex;align-items:center;gap:4px;margin-bottom:0!important}
.layers-pop details.more-layers > summary::-webkit-details-marker{display:none}
.layers-pop details.more-layers > summary::after{content:"+";font-size:12px;letter-spacing:0;color:var(--rf-ink-3)}
.layers-pop details.more-layers[open] > summary::after{content:"\2212"}
.layers-pop label,.layers-pop .lp-row{display:flex!important;align-items:center;gap:10px;min-height:32px!important;margin:0!important;font-size:13px!important;
  line-height:1.25;flex-wrap:nowrap!important;cursor:pointer;color:var(--rd-ink)}
.layers-pop label > span{flex:1 1 auto;min-width:0}
.layers-pop label em{font-style:normal;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-ink-3);margin-left:3px}
/* toggle: a slim switch, not a chunky checkbox */
.layers-pop input[type=checkbox]{-webkit-appearance:none;appearance:none;flex:0 0 auto;width:28px!important;height:16px!important;margin:0;border-radius:999px;
  background:#D9D8D4;position:relative;cursor:pointer;transition:background .15s;order:2}
.layers-pop input[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.layers-pop input[type=checkbox]:checked{background:var(--rd-ink)}
.layers-pop input[type=checkbox]:checked::after{transform:translateX(12px)}
.layers-pop input[type=checkbox]:focus-visible{outline:2px solid var(--rd-ink);outline-offset:2px}
.layers-pop select{width:100%;font-size:12px;margin:0 0 4px;min-height:30px}
.layers-pop #wmsLayers .small{font-size:9.5px!important;letter-spacing:.14em;text-transform:uppercase;color:var(--rf-ink-3);margin:8px 0 1px}

/* ---------- pass 4: Dorchester Bay City (proposed) context layer ---------- */
.dbc-cap{display:none;position:absolute;z-index:6;right:8px;top:8px;max-width:min(230px,calc(100vw - 150px));margin:0;padding:4px 8px 5px;border-radius:6px;
  background:rgba(255,255,255,.92);box-shadow:var(--rf-shadow);font-size:10.5px;line-height:1.3;color:var(--rd-ink-2);pointer-events:none}
.dbc-cap b{display:block;font-size:9.5px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--rd-ink)}
body.dbc-on .dbc-cap{display:block}
.dbc-card{position:absolute;z-index:7;right:8px;top:52px;width:min(272px,calc(100vw - 16px));padding:10px 12px 9px;border-radius:10px;
  background:rgba(255,255,255,.97);box-shadow:var(--rf-shadow);border:1px solid var(--rf-hair);font-size:12px;line-height:1.35;color:var(--rd-ink)}
.dbc-card.hidden{display:none}
.dbc-card__x{position:absolute;top:4px;right:4px;border:0;background:none;width:28px;height:28px;border-radius:999px;font-size:17px;line-height:1;color:var(--rd-ink-2);cursor:pointer}
.dbc-card__kicker{margin:0 0 2px;font-size:9.5px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--rf-ink-3)}
.dbc-card__name{margin:0 0 6px;font-size:15px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--rd-ink)!important}
.dbc-card__name span{font-size:11px;font-weight:400;color:var(--rf-ink-3);margin-left:4px}
.dbc-card__dl{display:grid;grid-template-columns:44px 1fr;gap:3px 8px;margin:0 0 6px}
.dbc-card__dl dt{font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--rf-ink-3);padding-top:2px}
.dbc-card__dl dd{margin:0}
.dbc-card__src{margin:0;font-size:10.5px;color:var(--rf-ink-3)}
.dbc-card__src a{color:var(--rd-ink);text-decoration:underline;text-underline-offset:2px}
@media (max-width:899px){.dbc-cap{top:6px}.dbc-card{top:50px;overflow:auto;overscroll-behavior:contain}}

/* ---------- pass 5: Ecology panel (Plants / Trees / Birds), informational only ---------- */
.eco-btn{display:inline-flex;align-items:center;gap:5px}
.eco-btn__leaf{flex:0 0 auto;color:var(--rd-ink-2)}
.eco-btn[aria-expanded=true] .eco-btn__leaf,.eco-btn[aria-expanded=true]{color:var(--rd-ink)}
@media (max-width:599px){.eco-btn__txt{display:none}.eco-btn{padding:0 6px!important;min-width:32px;justify-content:center}.eco-btn__leaf{width:17px;height:17px}}
#ecoPanel.eco-pop{padding:0!important;width:min(320px,calc(100vw - 16px))!important;max-height:min(48svh,48vh,440px);gap:0!important;
  display:flex;flex-direction:column;overflow:hidden!important;border-radius:10px!important;background:rgba(255,255,255,.97)!important;
  right:8px!important;top:calc(var(--rd-topbar-h) + 4px)!important;z-index:56}
#ecoPanel.eco-pop.hidden{display:none!important}
@media (min-width:900px){#ecoPanel.eco-pop{width:360px!important;max-height:min(70vh,600px)}}
.eco-head{gap:6px}
.eco-head .panel-title{flex:0 0 auto}
.eco-tabs{display:flex;gap:0;border:1px solid var(--rf-hair-2);border-radius:999px;padding:2px;margin-left:auto}
.eco-tab{border:0;background:none;height:24px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:500;color:var(--rd-ink-2);cursor:pointer;position:relative}
.eco-tab::after{content:"";position:absolute;inset:-8px -1px}
.eco-tab.is-on{background:var(--rd-ink);color:#fff}
.eco-body{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 12px 10px;flex:1 1 auto;font-size:12.5px;line-height:1.35;color:var(--rd-ink)}
.eco-chips{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0 4px}
.eco-chip{border:1px solid var(--rf-hair-2);background:#fff;border-radius:999px;height:24px;padding:0 9px;font-size:11px;font-weight:500;color:var(--rd-ink-2);cursor:pointer;position:relative}
.eco-chip::after{content:"";position:absolute;inset:-6px -2px}
.eco-chip.is-on{background:var(--rd-ink);border-color:var(--rd-ink);color:#fff}
.eco-count{margin:2px 0 2px;font-size:10.5px;color:var(--rf-ink-3)}
.eco-group{font-size:9.5px!important;font-weight:600!important;letter-spacing:.14em;text-transform:uppercase;color:var(--rf-ink-3)!important;margin:10px 0 0!important;list-style:none}
.eco-row{display:flex;flex-direction:column;gap:1px;padding:6px 0;border-bottom:1px solid var(--rf-hair)}
.eco-row > summary{display:flex;flex-direction:column;gap:1px;cursor:pointer;list-style:none;padding-right:16px;position:relative}
.eco-row > summary::-webkit-details-marker{display:none}
.eco-row > summary::after{content:"+";position:absolute;right:0;top:0;font-size:12px;color:var(--rf-ink-3)}
.eco-row[open] > summary::after{content:"\2212"}
.eco-row.is-hit{background:linear-gradient(90deg,rgba(26,26,26,.06),transparent)}
.eco-name{font-size:12.5px;font-weight:500}
.eco-name i{font-weight:500}
.eco-common{font-weight:400;color:var(--rd-ink-2)}
.eco-status{font-size:9.5px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-ink-3);margin-left:3px}
.eco-line{font-size:11.5px;color:var(--rd-ink-2)}
.eco-by{color:var(--rf-ink-3)}
.eco-facts{display:grid;grid-template-columns:72px 1fr;gap:2px 8px;margin:5px 0 3px;font-size:11.5px}
.eco-facts dt{font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--rf-ink-3);padding-top:1px}
.eco-facts dd{margin:0}
.eco-caution{margin:2px 0;font-size:11px;color:var(--rd-ink-2)}
.eco-note,.eco-label{margin:8px 0 2px;font-size:10.5px;color:var(--rf-ink-3)}
.eco-label{margin-top:6px;font-style:italic}
.eco-src{margin:2px 0 0;font-size:10px;color:var(--rf-ink-3)}
.eco-src a,.eco-note a,.eco-credits a{color:var(--rd-ink-2);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.eco-empty{margin:10px 0;color:var(--rf-ink-3);font-size:12px}
.eco-dont > summary{cursor:pointer;display:flex;gap:4px;align-items:center}
.eco-dont > summary::-webkit-details-marker,.eco-credits > summary::-webkit-details-marker{display:none}
.eco-dont > summary::after,.eco-credits > summary::after{content:"+";font-size:12px;letter-spacing:0}
.eco-dont[open] > summary::after,.eco-credits[open] > summary::after{content:"\2212"}
.eco-credits > summary{cursor:pointer;display:flex;gap:4px;align-items:center}
.eco-credits ul{margin:4px 0 0;padding-left:14px;font-size:10px;color:var(--rf-ink-3)}
.eco-calls{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.eco-play{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--rf-hair-2);background:#fff;border-radius:999px;height:24px;padding:0 9px 0 6px;font-size:11px;color:var(--rd-ink);cursor:pointer;position:relative}
.eco-play::after{content:"";position:absolute;inset:-6px -2px}
.eco-play__i{width:0;height:0;border-left:7px solid var(--rd-ink);border-top:4.5px solid transparent;border-bottom:4.5px solid transparent}
.eco-play.is-playing{border-color:var(--rd-ink)}
.eco-play.is-playing .eco-play__i{width:7px;height:8px;border:0;border-left:2px solid var(--rd-ink);border-right:2px solid var(--rd-ink)}
.eco-noaudio{font-size:10.5px;color:var(--rf-ink-3)}
.eco-tip{margin-top:6px;padding:6px 0 2px;border-bottom:1px solid var(--rf-hair)}
.eco-tip p{margin:2px 0;font-size:11.5px;color:var(--rd-ink-2)}
.eco-plant-link{border:0;background:none;padding:2px 0;font:inherit;color:inherit;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:var(--rf-hair-2);text-underline-offset:3px}
.eco-tab,.eco-chip,.eco-play,.eco-plant-link{min-height:0!important;min-width:0!important}
.eco-tab{border:0!important}
@media (max-width:599px){.topbar .icon-btn{padding:0 5px}.topbar .seg .seg__btn,.topbar .seg button{padding:0 9px}.topbar{gap:3px}}
#btnEco::after{display:none!important}
#ecoPanel.eco-pop{background:#fff!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;z-index:70!important}

/* ---------- pass 6: strategies sheet can close fully (phones); a small pill reopens it ---------- */
.tray__hide,.sheet-pill{display:none}
@media (max-width:899px){
  .tray[data-height=closed]{height:0!important;border-top-color:transparent!important;box-shadow:none!important;visibility:hidden;pointer-events:none;
    transition:height .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear .28s!important}
  .tray.is-sheet-dragging[data-height=closed]{visibility:visible}
  .tray__hide{display:flex;position:absolute;top:22px;right:10px;z-index:5;width:28px;height:28px;min-height:0!important;min-width:0!important;padding:0!important;
    align-items:center;justify-content:center;border:1px solid var(--rf-hair,#e3e3e3)!important;border-radius:50%!important;background:#fff!important;color:var(--rd-ink-2,#555)!important;box-shadow:none!important}
  .tray__hide:active{background:#f4f4f2!important}
  .tray:has(.tray__hide) #grab.tray__grab{padding-right:46px!important}
  .sheet-pill{position:fixed;left:12px;bottom:calc(var(--dock-h,102px) + 10px);z-index:26;align-items:center;gap:6px;height:32px;min-height:0!important;padding:0 12px 0 11px!important;
    border:1px solid var(--rf-hair-2,#d6d6d2)!important;border-radius:999px!important;background:rgba(255,255,255,.97)!important;color:var(--rd-ink,#1a1a1a)!important;
    font:500 12.5px/1 var(--rd-font-ui,inherit);letter-spacing:.01em;box-shadow:0 1px 6px rgba(0,0,0,.08)!important;touch-action:none}
  .sheet-pill svg{flex:none;color:var(--rd-ink-2,#555)}
  .sheet-pill__up{margin-left:1px}
  body.rd-sheet-closed .sheet-pill{display:inline-flex}
  body.rd-sheet-closed .score-card{bottom:52px!important;max-height:min(42vh,calc(100% - 64px))!important}
}
@media (max-width:899px){body.rd-sheet-closed #layersPanel.layers-pop{max-height:min(62svh,62vh,460px)!important}}
@media (max-width:899px){body.rd-sheet-closed .maplibregl-ctrl-bottom-left,body.rd-sheet-closed .maplibregl-ctrl-bottom-right{bottom:46px!important}}

/* ---- pass 7: Terrain group (topo / bathy) inline legends; design/layers-topo-bathy.md ---- */
#layersPanel .lp-row--sub span small{display:block;font-size:12px;line-height:1.2;color:var(--rd-ink-3,#767676);font-weight:400}
#layersPanel .lg-ramp{margin:-2px 0 8px 30px;padding:0 4px 0 0;font-size:12px;color:var(--rd-ink-2,#4A4A4A)}
#layersPanel .lg-ramp[hidden]{display:none!important}
#layersPanel .lg-subs{display:flex;flex-wrap:wrap;gap:2px 12px;margin:0 0 6px;font-size:13px}
#layersPanel .lg-subs label{display:inline-flex;align-items:center;gap:5px;min-height:28px;cursor:pointer}
#layersPanel .lg-subs input{width:15px;height:15px;margin:0;min-height:0!important}
#layersPanel .lg-ramp__bar{width:160px;height:8px;border-radius:1px;outline:1px solid rgba(26,26,26,.3);outline-offset:-1px}
#layersPanel .lg-ramp__bar--topo{background:linear-gradient(90deg,#F2EFE8 0%,#E6DFD2 16.7%,#D9CDB8 33.3%,#C9B89C 50%,#B5A080 66.7%,#9C8566 100%)}
#layersPanel .lg-ramp__bar--bathy{background:linear-gradient(90deg,#E9ECEE 0%,#D5DADE 12.5%,#BFC6CC 25%,#A3ADB6 50%,#87939E 75%,#6E7B87 100%)}
#layersPanel .lg-ramp__ticks{position:relative;width:160px;height:15px;margin-top:2px}
#layersPanel .lg-ramp__ticks span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap;line-height:15px}
#layersPanel .lg-ramp__ticks span:first-child{transform:none}
#layersPanel .lg-ramp__ticks span:last-child{transform:translateX(-100%)}
#layersPanel .lg-ramp__ticks span::before{content:"";position:absolute;left:50%;top:-3px;width:1px;height:3px;background:rgba(26,26,26,.45)}
#layersPanel .lg-ramp__ticks span:first-child::before{left:0}
#layersPanel .lg-ramp__ticks span:last-child::before{left:auto;right:0}
#layersPanel .lg-ramp__ends{display:flex;justify-content:space-between;width:160px;font-size:10px;letter-spacing:.08em;color:var(--rd-ink-3,#767676)}
#layersPanel .lg-ramp__line{display:flex;align-items:center;gap:4px;margin-top:4px}
#layersPanel .lg-ramp__line i{display:inline-block;width:14px;height:0;border-top:.5px solid rgba(74,74,74,.6)}
#layersPanel .lg-ramp__line i.b{border-top:1.5px solid #4A4A4A;margin-right:4px}
#layersPanel .lg-ramp__line--dash i{border-top:1px dashed #87939E;width:18px;margin-right:4px}
#layersPanel .lg-ramp__source{margin:4px 0 0;font-size:12px;line-height:1.3;color:var(--rd-ink-3,#767676)}

/* ---- pass 8: Ecology species images (40 px list thumbnails, 140 px detail tile, thin-line placeholders) ---- */
.eco-row > summary{display:grid!important;grid-template-columns:40px minmax(0,1fr);column-gap:10px;align-items:center}
.eco-row > summary > .eco-thumb{grid-row:1 / span 3;align-self:center}
.eco-row > summary > :not(.eco-thumb){grid-column:2}
.eco-bird{display:grid!important;grid-template-columns:40px minmax(0,1fr);column-gap:10px;row-gap:2px}
.eco-bird > .eco-thumb-btn{grid-row:1 / span 6;align-self:start}
.eco-bird > :not(.eco-thumb-btn){grid-column:2}
.eco-thumb{width:40px;height:40px;border-radius:50%;background:#FBFAF7;box-shadow:inset 0 0 0 .5px rgba(26,26,26,.16);display:grid;place-items:center;overflow:hidden;flex:none}
.eco-thumb img{display:block;max-width:31px;max-height:31px;width:auto;height:auto;object-fit:contain}
.eco-thumb.is-ph svg{width:20px;height:20px;color:#A3A39B}
.eco-thumb-btn{border:0;background:none;padding:0;margin:0;cursor:zoom-in;border-radius:50%;min-height:0!important;min-width:0!important;line-height:0}
.eco-thumb-btn:focus-visible{outline:2px solid var(--rd-ink,#1A1A1A);outline-offset:2px}
.eco-bird.is-open .eco-thumb-btn{cursor:zoom-out}
.eco-eg{font-size:11px;color:var(--rf-ink-3,#767676)}
.eco-fig{margin:8px 0 6px;display:flex;flex-wrap:wrap;gap:6px 10px;align-items:flex-end}
.eco-fig__img{width:140px;height:140px;border-radius:14px;background:#FBFAF7;box-shadow:inset 0 0 0 .5px rgba(26,26,26,.16);display:grid;place-items:center;flex:none}
.eco-fig__img img{display:block;max-width:122px;max-height:122px;width:auto;height:auto;object-fit:contain}
.eco-fig.is-ph .eco-fig__img svg{width:48px;height:48px;color:#A3A39B}
.eco-fig figcaption{flex:1 1 120px;min-width:0;font-size:11px;line-height:1.35;color:var(--rf-ink-3,#767676)}
.eco-fig figcaption a{color:inherit}
.eco-fig__eg{display:block;color:var(--rd-ink-2,#4A4A4A);margin-bottom:2px}
.eco-photo-credits ul{padding-left:16px;margin:4px 0;font-size:11px;line-height:1.4}
.eco-bird__fig[hidden]{display:none!important}
#layersPanel .lg-subs{gap:0 12px;flex-wrap:wrap;margin:0 0 6px}
#layersPanel .lg-subs label{gap:5px!important;min-height:26px!important;font-size:12px!important;color:var(--rd-ink-2,#4A4A4A)}
#layersPanel .lg-subs input[type=checkbox]{width:22px!important;height:12px!important}
#layersPanel .lg-subs input[type=checkbox]::after{top:2px;left:2px;width:8px;height:8px}
#layersPanel .lg-subs input[type=checkbox]:checked::after{transform:translateX(10px)}
/* pass 9: Home button (back to the study zone). 44px touch target around a 36px face; phone: under the legend chip, left edge (clear of the popovers, pill, Run bar and map controls) */
.map-home{position:absolute;z-index:6;left:4px;top:var(--home-top,70px);width:44px!important;height:44px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0;
  display:flex;align-items:center;justify-content:center;background:none!important;border:0!important;box-shadow:none!important;color:var(--rd-ink,#1A1A1A);cursor:pointer;-webkit-tap-highlight-color:transparent}
.map-home__face{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.94);border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:6px;box-shadow:var(--rf-shadow)}
.map-home svg{pointer-events:none}
.map-home:active .map-home__face{background:#F1EFEA}
.map-home:focus-visible{outline:none}.map-home:focus-visible .map-home__face{outline:2px solid var(--rd-ink,#1A1A1A);outline-offset:2px}
@media (hover:hover){.map-home:hover .map-home__face{background:#F6F4EF}}
body.is-tour .map-home,body.rd-sheet-full .map-home{visibility:hidden}
@media (min-width:900px){.map-home{top:8px;left:auto;right:6px}}
/* ---- pass 10: Sculpt terrain (thin line, warm neutrals; blue stays for water) ---- */
.map-sculpt{top:calc(var(--home-top,70px) + 46px)}
@media (min-width:900px){.map-sculpt{top:54px}}
body.is-sculpt .map-sculpt,body.is-tour .map-sculpt,body.rd-sheet-full .map-sculpt{visibility:hidden}
body.is-sculpt #panel,body.is-sculpt #dock,body.is-sculpt #results,body.is-sculpt #sheetPill,body.is-sculpt .water-key,body.is-sculpt #ctxToolbar,body.is-sculpt #infoCard,body.is-sculpt #layersPanel,body.is-sculpt #ecoPanel,body.is-sculpt .stage::after{display:none!important}
@media (max-width:899px){body.is-sculpt .map-home{top:calc(var(--sc-hint-b,96px) + 4px)}}
body.is-sculpt .maplibregl-canvas-container{touch-action:none!important;cursor:crosshair}
body.is-sculpt .maplibregl-ctrl-bottom-right,body.is-sculpt .maplibregl-ctrl-bottom-left{display:none}
.sc-bar,.sc-hint{display:none}
body.is-sculpt .sc-bar{display:flex}
body.is-sculpt .sc-hint{display:flex}
.sc-bar{position:fixed;z-index:40;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));flex-direction:column;gap:6px;padding:8px 10px;background:rgba(255,255,255,.97);border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:8px;box-shadow:var(--rf-shadow,0 2px 10px rgba(0,0,0,.08));font-size:12px;color:var(--rd-ink,#1A1A1A);-webkit-user-select:none;user-select:none}
@media (min-width:900px){.sc-bar{left:50%;right:auto;width:560px;transform:translateX(-50%);bottom:16px}}
.sc-row{display:flex;align-items:center;gap:8px;min-height:32px}
.sc-row[hidden]{display:none}
.sc-lbl{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#6B6257;white-space:nowrap}
.sc-seg{display:flex;border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:6px;overflow:hidden}
.sc-seg button{appearance:none;background:none;border:0;border-left:1px solid var(--rf-hair-2,rgba(0,0,0,.14));color:inherit;font:inherit;cursor:pointer;min-height:44px;padding:0 8px;display:flex;align-items:center;justify-content:center;gap:4px}
.sc-seg button:first-child{border-left:0}
.sc-seg button[aria-checked="true"]{background:#1A1A1A;color:#fff}
.sc-seg--tools{flex:1}
.sc-seg--tools button{flex:1;flex-direction:column;gap:1px;padding:4px 2px;font-size:11px;min-height:46px}
.sc-seg--size button{width:36px;min-height:36px;font-size:12px}
.sc-hist{display:flex;gap:2px}
.sc-icon{appearance:none;background:none;border:1px solid transparent;border-radius:6px;width:40px;height:44px;display:flex;align-items:center;justify-content:center;color:inherit;cursor:pointer}
.sc-icon:disabled,.sc-text:disabled{opacity:.32;cursor:default}
.sc-strength{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
.sc-strength input{flex:1;min-width:60px;accent-color:#1A1A1A;height:32px}
.sc-row--foot{justify-content:flex-end;gap:6px}
.sc-row--stats{gap:6px;min-height:28px}
.sc-row--stats .sc-text{min-height:36px}
.sc-ghost{appearance:none;background:#fff;color:#1A1A1A;border:1px solid #1A1A1A;border-radius:22px;font:inherit;font-weight:600;min-height:44px;padding:0 14px;cursor:pointer;white-space:nowrap}
.sc-ghost:disabled{opacity:.4;cursor:default}
.sc-run{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.sc-run span{font-size:10px}
.sc-row--foot .sc-run{flex:1;justify-content:center;max-width:160px}
/* a toast never blocks taps on what is under it (e.g. the More menu); only its action button is tappable */
.toast{pointer-events:none}
.toast .toast__action{pointer-events:auto}
/* in-app Save option sheet (no window.prompt) */
.save-sheet{position:fixed;inset:0;z-index:70;display:none;align-items:flex-end;justify-content:center;background:rgba(26,26,26,.24);padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px))}
.save-sheet.is-open{display:flex}
.save-sheet__card{width:100%;max-width:360px;background:#fff;border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:10px;padding:14px 16px 12px;box-shadow:0 8px 30px rgba(0,0,0,.18);font-size:13px;color:#1A1A1A;margin:0}
.save-sheet__card h3{margin:0 0 8px;font-size:15px}
.save-sheet__lbl{display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#6B6257;margin-bottom:4px}
.save-sheet__card input{width:100%;box-sizing:border-box;font:inherit;font-size:16px;min-height:44px;padding:0 10px;border:1px solid var(--rf-hair-2,rgba(0,0,0,.24));border-radius:6px;background:#fff;color:#1A1A1A}
.save-sheet__card input:focus{outline:2px solid #1A1A1A;outline-offset:1px}
.save-sheet__what{margin:8px 0 10px;color:#6B6257;font-size:12px;line-height:1.4}
.save-sheet__note{color:#7A5B3A}
.save-sheet__btns{display:flex;justify-content:flex-end;gap:8px}
@media (min-width:900px){.save-sheet{align-items:center}}
@media (orientation:landscape) and (max-height:500px){.save-sheet{align-items:flex-start;padding-top:max(8px,env(safe-area-inset-top,0px))}.save-sheet__card{padding:10px 14px}.save-sheet__what{margin:6px 0 8px}}
.sc-stats{flex:1;min-width:0;color:#6B6257;font-size:11.5px;line-height:1.3}
.sc-stats b{color:#1A1A1A;font-weight:600}
.sc-text{appearance:none;background:none;border:0;font:inherit;color:inherit;text-decoration:underline;text-underline-offset:2px;min-height:44px;padding:0 6px;cursor:pointer;white-space:nowrap}
.sc-done{appearance:none;background:#1A1A1A;color:#fff;border:0;border-radius:22px;font:inherit;font-weight:600;min-height:44px;padding:0 18px;cursor:pointer}
.sc-step{appearance:none;width:36px;height:36px;border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:6px;background:#fff;font-size:16px;line-height:1;color:inherit;cursor:pointer}
#scFlatVal{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}
.sc-tag{display:inline-block;border:1px solid #1A1A1A;border-radius:3px;font-size:10px;padding:0 3px;margin-left:2px;letter-spacing:.03em}
.sc-link{appearance:none;background:none;border:0;font:inherit;text-decoration:underline;text-underline-offset:2px;color:inherit;min-height:44px;padding:0 2px;cursor:pointer;white-space:nowrap;margin-left:auto}
.sc-hint{position:fixed;z-index:40;left:8px;right:8px;top:calc(var(--rd-topbar-h,46px) + 8px);flex-wrap:wrap;align-items:baseline;gap:2px 10px;padding:6px 10px;background:rgba(255,255,255,.95);border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:6px;font-size:11.5px;color:#6B6257;pointer-events:none}
.sc-hint b{color:#1A1A1A;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.sc-hint__key{display:flex;gap:4px 8px;align-items:center;flex-wrap:wrap}
.sc-hint__key i{display:inline-block;width:12px;height:8px;margin-right:2px;vertical-align:-1px}
.k-raise{background:#C9B89C}
.k-low{background:repeating-linear-gradient(135deg,#E6DFD2 0 2px,#8E8578 2px 3px)}
.k-dfe{height:0!important;border-top:2px solid #1A1A1A}
@media (min-width:900px){.sc-hint{left:50%;right:auto;transform:translateX(-50%);max-width:640px}}
.sc-ring{position:absolute;left:0;top:0;z-index:5;border:1px solid #1A1A1A;border-radius:50%;box-shadow:0 0 0 1px rgba(255,255,255,.9),inset 0 0 0 1px rgba(255,255,255,.6);pointer-events:none;will-change:transform}
.sc-ring::after{content:"";position:absolute;left:50%;top:50%;width:3px;height:3px;margin:-1.5px;border-radius:50%;background:#1A1A1A}
.sc-ring.is-edge{border:1.5px dashed #9C8566;box-shadow:0 0 0 1px rgba(255,255,255,.9)}
.sc-read{position:absolute;left:0;top:0;z-index:6;display:flex;flex-direction:column;gap:1px;padding:5px 8px;background:rgba(255,255,255,.97);border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:6px;box-shadow:var(--rf-shadow,0 2px 10px rgba(0,0,0,.08));font-size:11.5px;line-height:1.3;color:#6B6257;pointer-events:none;white-space:nowrap;font-variant-numeric:tabular-nums}
.sc-read b{color:#1A1A1A;font-size:13px}
.sc-read__z{color:#1A1A1A}
.sc-cue{font-style:normal}
.sc-cue.is-above{color:#1A1A1A;font-weight:600}
.sc-read__w{color:#7A5B3A}
.sc-ring[hidden],.sc-read[hidden]{display:none}
.sc-intro{position:fixed;inset:0;z-index:60;background:rgba(26,26,26,.28);display:flex;align-items:center;justify-content:center;padding:16px}
.sc-intro__card{max-width:340px;background:#fff;border:1px solid var(--rf-hair-2,rgba(0,0,0,.14));border-radius:10px;padding:18px 18px 16px;box-shadow:0 8px 30px rgba(0,0,0,.18);font-size:13.5px;line-height:1.45;color:#1A1A1A}
.sc-intro__card h3{margin:6px 0 8px;font-size:17px}
.sc-intro__card p{margin:0 0 8px}
.sc-intro__how{color:#6B6257;font-size:12.5px}
.sc-intro__fig{color:#1A1A1A}
.sc-intro .sc-done{width:100%;margin-top:6px}
.compare__sculpt{color:inherit}

/* ---- pass 11: phone landscape (short screens). Portrait is untouched: every rule sits behind this one query.
   Layout: slim top bar; Strategies = a left side panel (closed / narrow / standard / wide); the map fills the rest;
   time + Run bar under the map; score card top-right of the map; popovers on the right, scrolling inside. ---- */
@media (orientation:landscape) and (max-height:500px) and (max-width:899px){
  :root{--rd-topbar-h:40px;--ls-sl:env(safe-area-inset-left,0px);--ls-sr:env(safe-area-inset-right,0px);--ls-sb:env(safe-area-inset-bottom,0px);--ls-pw:300px}
  body{--ls-w:calc(var(--ls-pw) + var(--ls-sl))}
  body:has(#panel[data-height=peek]){--ls-pw:236px}
  body:has(#panel[data-height=full]){--ls-pw:min(420px,56vw)}
  body.rd-sheet-closed,body.is-sculpt{--ls-pw:0px;--ls-w:0px}
  /* top bar: slimmer, clear of the notch on either side */
  .topbar{height:40px!important;min-height:40px!important;padding-left:max(12px,var(--ls-sl))!important;padding-right:max(4px,var(--ls-sr))!important}
  .topbar .icon-btn{min-height:36px}
  /* map: right of the panel, above the time bar */
  .stage{left:var(--ls-w)!important;right:0!important;top:40px!important;bottom:var(--dock-h)!important}
  body.is-sculpt .stage{left:0!important;bottom:0!important}
  /* strategies: a left side panel, full height under the top bar */
  .tray,.tray[data-height]{left:0!important;right:auto!important;top:40px!important;bottom:var(--dock-h)!important;width:var(--ls-w)!important;height:auto!important;
    padding-left:calc(12px + var(--ls-sl))!important;border-top:0!important;border-right:1px solid var(--rf-hair)!important;border-radius:0!important;
    box-shadow:4px 0 18px rgba(0,0,0,.05)!important;z-index:27!important;transition:width .22s cubic-bezier(.2,.8,.2,1)!important}
  .tray[data-height=closed]{width:0!important;height:auto!important;padding:0!important;border-right-color:transparent!important;overflow:hidden!important}
  .tray.is-sheet-dragging,.tray.is-sheet-dragging[data-height]{height:auto!important;bottom:var(--dock-h)!important}
  #grab.tray__grab{border-radius:0;margin-left:calc(-12px - var(--ls-sl))!important;width:calc(100% + 24px + var(--ls-sl))!important;padding-left:calc(16px + var(--ls-sl))!important;height:42px!important;min-height:42px!important;padding-top:4px!important}
  #grab.tray__grab::after{left:auto!important;right:-1px!important;top:50%!important;width:4px!important;height:28px!important;margin:-14px 0 0!important}
  .tray__hide{top:7px!important}
  .tray__hide svg{transform:rotate(90deg)}
  .tray__tabs{margin-left:calc(-12px - var(--ls-sl))!important;padding-left:calc(6px + var(--ls-sl))!important;overflow-x:auto;scrollbar-width:none}
  .tray__scroll{margin-left:calc(-12px - var(--ls-sl))!important;padding-left:calc(12px + var(--ls-sl))!important;padding-bottom:16px!important}
  /* every open state scrolls vertically; narrow = icon tiles in two columns */
  .tray[data-height=peek] .tray__scroll{overflow-y:auto!important}
  .tray[data-height=peek] .tray__cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px!important;overflow:visible!important}
  .tray[data-height=peek] .piece-card{width:auto!important;flex:none!important;touch-action:pan-y}
  .tray[data-height=peek] .piece-card__icon{touch-action:none}
  .tray[data-height=default] .tray__cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  /* the time + Run bar: one row across the whole width, visible in every state */
  #dock.dock{left:0!important;right:0!important;padding:4px max(10px,var(--ls-sr)) calc(4px + var(--ls-sb)) max(10px,var(--ls-sl))!important;
    grid-template-columns:auto auto auto minmax(60px,1fr) auto!important;grid-template-areas:"picker event play scrub run"!important;gap:2px 8px!important}
  body.rd-sheet-full #dock{transform:none!important;visibility:visible!important}
  #dock .dock__readout,#dock .progress:empty{display:none!important}
  #dock .time-scrub{height:34px}
  /* reopen pill: bottom-left of the map */
  .sheet-pill{left:max(10px,calc(var(--ls-sl) + 6px))!important;bottom:calc(var(--dock-h,48px) + 8px)!important}
  body.rd-sheet-closed .maplibregl-ctrl-bottom-left,body.rd-sheet-closed .maplibregl-ctrl-bottom-right{bottom:0!important}
  body.rd-sheet-closed .maplibregl-ctrl-bottom-left{left:150px}
  /* Home / Sculpt stay visible next to a wide panel */
  body.rd-sheet-full .map-home,body.rd-sheet-full .map-sculpt{visibility:visible}
  body.is-tour .map-home,body.is-tour .map-sculpt,body.is-sculpt .map-sculpt{visibility:hidden}
  /* score card: top-right of the map, scrolls inside */
  .score-card,body.rd-sheet-closed .score-card,body:has(.tray[data-height]) .score-card{left:auto!important;right:56px!important;top:8px!important;bottom:auto!important;
    width:min(300px,calc(100% - 112px))!important;max-height:calc(100% - 16px)!important;overflow-y:auto!important}
  .score-card .score-tile{min-width:0!important}
  .score-card .score-tile__label{white-space:normal!important;overflow-wrap:anywhere}
  /* teaching-model badge: bottom centre of the map (the score card takes the top right) */
  .stage::after{top:auto!important;bottom:8px!important;left:50%!important;transform:translateX(-50%);white-space:nowrap}
  .score-card.hidden{display:none!important}
  /* toasts: top centre of the map */
  .toast{top:calc(40px + 8px)!important;bottom:auto!important;left:calc(var(--ls-w) + (100vw - var(--ls-w)) / 2)!important;transform:translateX(-50%)!important;max-width:calc(100vw - var(--ls-w) - 24px)}
  /* popovers on the right, short and scrolling inside */
  #layersPanel.layers-pop,body.rd-sheet-closed #layersPanel.layers-pop{right:max(8px,var(--ls-sr))!important;left:auto!important;top:44px!important;max-height:min(85vh,calc(100vh - 52px - var(--dock-h)))!important;width:min(280px,calc(100vw - 16px))!important}
  #ecoPanel.eco-pop{right:max(8px,var(--ls-sr))!important;left:auto!important;top:44px!important;bottom:auto!important;max-height:min(85vh,calc(100vh - 52px - var(--dock-h)))!important;width:min(340px,calc(100vw - 16px))!important;overflow-y:auto!important}
  /* strategy details: a card on the right, full height, scrolls inside */
  #infoCard.info-card{left:auto!important;right:max(8px,var(--ls-sr))!important;top:44px!important;bottom:calc(var(--dock-h) + 6px)!important;width:min(360px,calc(100vw - var(--ls-w) - 16px))!important;
    max-height:none!important;border-radius:10px!important;border-bottom:1px solid var(--rf-hair)!important;overflow-y:auto!important}
  #infoCard .sheet-handle{display:none}
  /* compare, onboarding and the sculpt explainer fit the short screen and scroll */
  .compare{padding:6px max(8px,var(--ls-sr)) 6px max(8px,var(--ls-sl))!important;align-items:center!important}
  .compare > *{max-height:calc(100vh - 12px)!important;max-width:100%!important;overflow-y:auto!important}
  .onboard{align-items:center!important;padding:8px!important}
  .onboard__card{max-height:calc(100vh - 16px)!important;overflow-y:auto!important;width:min(420px,100%)!important}
  .sc-intro{padding:46px max(8px,var(--ls-sr)) 6px max(8px,var(--ls-sl))!important}
  .sc-intro__card{max-width:600px!important;max-height:calc(100vh - 54px);overflow-y:auto;padding:12px 16px 12px!important}
  .sc-intro__card h3{margin:2px 0 6px!important}
  /* Sculpt: the tools become a strip on the right; the hint sits top-left; the map takes the full width */
  .sc-bar{left:auto!important;right:max(6px,var(--ls-sr))!important;top:46px!important;bottom:auto!important;max-height:calc(100vh - 52px - var(--ls-sb));width:276px;transform:none!important;overflow-y:auto;overscroll-behavior:contain;gap:4px!important;padding:6px 8px!important}
  .sc-row{flex-wrap:wrap}
  .sc-strength{flex:1 1 100%!important}
  .sc-hist{margin-left:auto}
  .sc-seg--tools button{min-height:44px!important}
  .sc-hint{left:max(8px,var(--ls-sl))!important;right:calc(276px + 14px + var(--ls-sr))!important;top:46px!important;transform:none!important;max-width:none!important}
}
/* Aerial photo opacity (Oct 30): one thin ink slider, compact, inside the layer's legend block */
#layersPanel .lg-opacity{display:flex;align-items:center;gap:8px;min-height:32px;margin:0 0 2px;font-size:12px;color:var(--rd-ink-2,#4A4A4A)}
#layersPanel .lg-opacity input[type=range]{flex:1;min-width:0;max-width:170px;height:28px;margin:0;accent-color:var(--rd-ink,#1A1A1A);background:transparent}
#layersPanel .lg-opacity output{width:34px;text-align:right;font-variant-numeric:tabular-nums;color:var(--rd-ink-3,#767676)}
#layersPanel .lg-opacity > span{flex:0 0 auto;margin:0}
#layersPanel .lg-opacity input[type=range]{flex:1 1 120px;width:auto}
#layersPanel .lg-opacity output{flex:0 0 34px}
/* first-run coach: the primary button is the same filled ink pill on every stage, whatever the hover/focus/active state */
.onboard__next,.onboard__next:is(:hover,:focus,:focus-visible,:active){background:var(--rd-ink)!important;color:#fff!important;border:0!important;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}
.onboard__next:focus-visible{outline:2px solid var(--rd-ink);outline-offset:2px}
.onboard__next:active{transform:scale(.97)}
