/* Keep the glass at the workspace boundary so long sections scroll as one page. */
.sheet,.rail {
  min-height:0;
  /* The entire glass panel owns input, including tabs, pickers and empty space. */
  pointer-events:auto;
  border:1px solid var(--highlight);
  border-radius:var(--radius);
  background:linear-gradient(135deg,#ffffff20,transparent 45%),var(--glass);
  backdrop-filter:blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter:blur(var(--blur)) saturate(150%);
  box-shadow:var(--shadow),inset 0 1px 1px var(--highlight);
  overflow:hidden;
}
.sheet-scroll,.rail-scroll { flex:1 1 auto;min-height:0;gap:0;padding:0 0 16px;scrollbar-gutter:stable; }
.sheet-scroll>*,.rail-scroll>* { flex:0 0 auto;min-width:0; }
.sheet-scroll>.glass,.rail-scroll>.glass {
  margin:0 16px;padding:18px 2px;border:0;border-radius:0;border-top:1px solid var(--line);
  background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
.sheet-scroll>.glass::before,.rail-scroll>.glass::before { display:none; }
.sheet-scroll>.glass:first-child,.rail-scroll>.glass:first-child,
body.has-plan .sheet-scroll>[data-card="location"] { border-top:0; }
.sheet-scroll>.welcome-card { padding-top:22px; }
.rail-head { flex:none;pointer-events:auto;padding:14px 18px 12px;border-bottom:1px solid var(--line); }
.rail-head h2 { font-size:19px;line-height:1.5;margin:0; }
.rail-head #plan-source { padding:0;min-height:18px;background:none;border:0;font-size:10px; }
.rail-head-actions { display:flex;align-items:center;gap:5px; }
.rail-head-actions .icon-btn { width:36px;height:36px; }
.rail-scroll>[data-card="plan"] { padding-top:4px; }
.rail-hidden .rail { visibility:hidden; }
.plan-summary { display:grid;grid-template-columns:1fr 1fr;gap:0 14px;padding-bottom:10px; }
.summary-item { min-width:0;padding:12px 0;border-bottom:1px solid var(--line-soft); }
.summary-item>span { display:block;font-size:11px;color:var(--ink-3);margin-bottom:5px; }
.summary-item strong { display:block;font-size:14px;font-weight:600;line-height:1.6;overflow-wrap:anywhere; }
.summary-item small { display:block;font-size:10px;line-height:1.6;color:var(--ink-3);margin-top:3px; }
.summary-item:nth-child(3),.summary-next { grid-column:1/-1; }
.summary-next { border:0;padding-bottom:0; }
.summary-next p { font-size:12px;line-height:1.8;overflow-wrap:anywhere; }
.plan-section>summary { display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;min-height:44px;font-size:13px;font-weight:600; }
.plan-section>summary::-webkit-details-marker { display:none; }
.plan-section>summary>svg { width:16px;height:16px;margin-left:auto;color:var(--ink-3);transition:transform .15s; }
.plan-section>summary>.mini,.plan-section>summary>.conf { margin-left:auto;max-width:55%;white-space:normal; }
.plan-section>summary>.mini+svg,.plan-section>summary>.conf+svg { margin-left:0; }
.plan-section[open]>summary>svg { transform:rotate(180deg); }
.rail-scroll>details.plan-section { padding-top:3px;padding-bottom:3px; }
.rail-scroll>details.plan-section[open] { padding-bottom:16px; }
.plan>.plan-section { border-top:1px solid var(--line); }
.plan-section .plan-text { display:block;overflow:visible;-webkit-line-clamp:unset; }
.plan-section .card-head { margin-top:8px;margin-bottom:8px; }
.plan-section .ai-panel { padding:8px 0 14px;border:0;margin:0;border-radius:0;background:none; }
.plan-section .action-steps { margin:0 0 12px; }
.plan-section .action-step { border-radius:8px; }
.layer-verdict { display:flex;flex-direction:column;align-items:flex-start;gap:5px; }
.layer-verdict strong { font-size:15px;overflow-wrap:anywhere; }
.layer-verdict span { max-width:100%; }
.wx-rows { display:grid;grid-template-columns:minmax(0,1fr); }
.wx-row { width:100%;min-width:0; }
.spot-layer { white-space:normal;overflow-wrap:anywhere;flex-shrink:1; }
.header-shortcuts { display:flex;gap:4px;align-items:center; }
.header-context { min-width:0; }
.mobile-trip-tools { display:flex;gap:8px;margin-top:10px; }
.topbar,.sheet,.rail,.eyebrow,.brand-type strong,.brand-type em { letter-spacing:0; }

@media(min-width:901px) {
  .topbar { display:grid;grid-template-columns:auto minmax(210px,min(30vw,520px)) auto minmax(230px,1fr) auto;gap:12px; }
  .search { min-width:0;max-width:none;width:100%; }
  .brand { min-width:0;gap:9px; }
  .brand-type strong { font-size:23px; }
  .brand-type em { font-size:9px; }
  .header-actions { gap:4px; }
  .header-context { display:flex;flex-direction:column;justify-content:center;gap:5px;padding:0 8px; }
  .header-context .map-context,.header-context .weather-chip {
    position:static;border:0;box-shadow:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;
    min-height:0;padding:0;border-radius:0;gap:16px;font-size:11px;
  }
  .header-context .glass::before { display:none; }
  .header-context .map-context { gap:7px; }
  .context-hint,.header-context .map-context>i,.header-context .wx-time { display:none; }
  .header-context .weather-chip { justify-content:space-between;max-width:500px;width:100%;min-height:24px; }
  .header-context .wx-item { font-size:14px;gap:5px; }
  .header-context .wx-item svg { width:16px;height:16px; }
  .header-context .wx-item small,.header-context .wx-item em { font-size:11px; }
  .flow-legend { top:calc(var(--top) + 94px); }
  .map-locate { bottom:188px;right:calc(var(--side) + var(--rail-w) + 16px); }
  .leaflet-control-zoom { margin:0 !important; }
  .leaflet-bottom.leaflet-right { bottom:88px; }
}
@media(min-width:901px) and (max-width:1180px) {
  .topbar { grid-template-columns:auto minmax(170px,1fr) auto minmax(185px,1fr) auto;gap:8px;padding-left:10px;padding-right:10px; }
  .header-context { padding:0; }
  .header-context .weather-chip { gap:8px; }
  .header-context .wx-item { font-size:12px;gap:3px; }
  .header-context .wx-item small { font-size:10px; }
  .header-link { display:none; }
  .brand-type em { display:none; }
  .brand-type strong { font-size:18px; }
  .brand-mark,.brand-mark img { width:38px;height:38px; }
  .header-shortcuts .icon-btn,.header-actions .icon-btn,.header-link { width:34px;height:36px;min-height:36px; }
  .header-context .map-context { max-width:180px; }
  #analysis-status { overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
  .search input::placeholder { font-size:11px; }
  .search kbd { display:none; }
}
@media(min-width:901px) and (max-height:680px) {
  :root { --top:10px;--side:14px; }
  .topbar { height:64px; }
  .sheet,.rail { top:84px;bottom:82px; }
  .sheet-scroll>.glass { padding-top:12px;padding-bottom:12px; }
  .rail-head { padding:9px 16px; }
  .rail-head h2 { font-size:17px; }
  .card-head { margin-bottom:10px; }
  .place { font-size:21px; }
  .locate-row { margin-top:10px; }
  .method-row { margin-top:10px;padding-top:10px; }
  .decision-row { margin-top:10px; }
  .trip-settings { margin-top:10px; }
  .trip-settings>summary { display:flex;align-items:center;justify-content:space-between;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;font-size:12px;cursor:pointer; }
  .trip-settings>summary svg { width:14px;height:14px; }
  .trip-settings[open]>summary svg { transform:rotate(180deg); }
  body:not(.has-plan) .trip-settings>summary { display:none; }
  .dock { bottom:12px;padding:6px; }
  .flow-legend { top:84px; }
}
@media(max-width:900px) {
  .sheet-scroll>.welcome-card { padding-top:4px;padding-bottom:12px; }
  .header-shortcuts { display:flex;grid-column:1/-1;grid-row:2;justify-self:end; }
  .header-shortcuts #btn-select-region { display:none; }
  .header-shortcuts #btn-photo { width:44px;height:44px;min-height:44px; }
  .topbar .search { width:calc(100% - 48px);justify-self:start; }
  .header-context { position:absolute;top:118px;left:0;right:0;display:flex;justify-content:space-between;gap:8px;pointer-events:none; }
  .header-context .map-context,.header-context .weather-chip { position:static;pointer-events:auto; }
  .header-context .map-context { min-width:0; }
  .header-context #analysis-status { max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
  .header-context .weather-chip { flex:none; }
  .rail-hidden .rail.is-open { visibility:visible; }
  .rail-head { padding:0 18px 10px; }
  .rail-head-actions .icon-btn { width:40px;height:40px; }
  .rail-scroll>[data-card="plan"] { margin:0 16px;padding:0; }
  .rail-scroll>details.plan-section { margin:0 16px;padding:3px 0; }
  .plan-section>summary { min-height:46px; }
  .summary-item { padding:10px 0; }
  .summary-item strong { font-size:13px; }
  .mobile-trip-tools { display:flex;gap:8px;margin-top:10px; }
  .mobile-trip-tools .pill { flex:1; }
}
@media(max-width:374px) {
  .header-context { gap:4px; }
  .header-context .map-context { padding:6px 8px;gap:6px; }
  .header-context #analysis-status { max-width:116px; }
  .header-context .weather-chip { padding:6px 8px;gap:6px; }
  .header-context .wx-item svg { display:none; }
  .header-context .wx-dir svg { display:block;width:14px;height:14px; }
  .summary-item strong { font-size:12px; }
  .rail-head { padding-left:16px;padding-right:16px; }
}
@media(orientation:landscape) and (max-height:540px) and (max-width:900px) {
  .header-context { top:68px;left:auto;right:0; }
  .header-context .weather-chip { display:none; }
}
/* Desktop panels extend toward the bottom beside the central navigation. */
@media(min-width:1181px) {
  .sheet,.rail { bottom:max(14px,env(safe-area-inset-bottom)); }
  .dock { max-width:calc(100vw - var(--sheet-w) - var(--rail-w) - 2 * var(--side) - 28px);bottom:max(14px,env(safe-area-inset-bottom));gap:2px; }
  .dock-btn { min-width:0;flex:1;padding:9px 11px;white-space:nowrap; }
}
/* Selected recommendations use a glass edge without a grey side gradient. */
.spot-item,.spot-item.is-top {
  background:linear-gradient(135deg,#ffffff16,transparent 75%);
  border-color:var(--line);box-shadow:inset 0 1px 0 var(--highlight);
}
.spot-item:hover,.spot-item.is-active,.spot-item.is-top.is-active {
  background:linear-gradient(135deg,#ffffff30,#ffffff08);
  border-color:color-mix(in srgb,var(--c) 42%,var(--highlight));
  box-shadow:inset 0 1px 0 var(--highlight),0 3px 12px #00000008;transform:none;
}
.access-screening { font-size:11px;color:var(--ink-2);margin:0 0 10px; }
.access-screening summary,.score-explanation summary { cursor:pointer;min-height:32px;padding:6px 0; }
.score-explanation { border-top:1px solid var(--line-soft);margin-top:10px;font-size:12px; }
.access-screening-body,.score-explanation-body { line-height:1.7;padding:5px 0 10px;overflow-wrap:anywhere; }
.access-exclusions { max-height:200px;overflow:auto;margin:8px 0; }
.access-exclusions li { padding:6px 0;border-bottom:1px solid var(--line-soft); }
.access-exclusions strong,.access-exclusions span { display:block; }
.access-exclusions span,.explanation-note { color:var(--ink-3);font-size:11px; }
.score-breakdown { margin:6px 0; }
.score-breakdown>div { display:flex;justify-content:space-between;gap:10px;padding:3px 0; }
.score-breakdown dt { color:var(--ink-3); }.score-breakdown dd { margin:0; }
.score-formula,.score-base,.score-field,.score-caps { margin:8px 0; }
