.civic-viewer { --rail: clamp(338px, 27vw, 402px); --inset: 18px; --sheet: min(55dvh, 550px); --header-h: 66px; }
.civic-viewer [hidden] { display: none !important; }
.civic-viewer .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.civic-viewer .site-header { height: var(--header-h); padding-inline: clamp(18px, 2vw, 32px); }
.civic-viewer .identity img { width: 57px; height: 43px; }
.civic-viewer .viewer-layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: calc(100dvh - var(--header-h)); min-height: 0; }
.civic-viewer .viewer-layout[data-panel=closed] { grid-template-columns: minmax(0, 1fr); }
.civic-viewer .map-sidebar { position: static; width: auto; height: 100%; max-height: none; min-width: 0; border: 0; border-right: 1px solid var(--atlas-line); border-radius: 0; box-shadow: none; }
.civic-viewer #map[data-live=true][data-basemap=ortho] .municipal-basemap { filter: saturate(.72) brightness(.88); }
.civic-viewer .map-stage { min-height: 0; height: 100%; }
.civic-viewer .map-stage .map-toolbar, .civic-viewer .map-stage .map-bottom-tools, .civic-viewer .map-stage .map-notice, .civic-viewer .map-stage .ol-scale-line { left: var(--inset); }
.civic-viewer .map-toolbar { right: var(--inset); top: var(--inset); }
.civic-viewer .map-tools { margin-left: auto; }
.civic-viewer .map-bottom-tools { right: var(--inset); }
.civic-viewer .viewer-layout[data-panel=open] #toggle-sidebar { display: none; }
.civic-viewer #toggle-sidebar { min-height: 44px; }
.civic-viewer .sidebar-top { padding: 16px 20px 10px; gap: 10px; }
.civic-viewer .sidebar-top h1 { color: var(--atlas-light); font-size: clamp(22px, 2vw, 27px); line-height: 1.15; }
.civic-viewer button { cursor: pointer; }
.civic-viewer button:disabled { cursor: default; }
.panel-fold, .live-entry button, #live-nearby button, .live-links button { min-height: 44px; padding: 0 9px; border: 0; border-radius: 5px; color: var(--atlas-cyan); background: transparent; font: inherit; font-size: 12px; font-weight: 700; }
.panel-fold:hover, .live-entry button:hover, #live-nearby button:hover, .live-links button:hover { background: var(--atlas-line); }
.civic-viewer .viewer-tabs { margin: 0; padding: 0 16px; gap: 0; border-radius: 0; background: none; border-bottom: 1px solid var(--atlas-line); }
.civic-viewer .viewer-tabs button { flex: 1 0 auto; border-radius: 0; border-bottom: 3px solid transparent; background: none; font-size: 12px; white-space: nowrap; padding-inline: 5px; gap: 4px; }
.civic-viewer .viewer-tabs button[aria-selected=true] { background: none; color: var(--atlas-light); border-bottom-color: var(--dm-lime); }
.civic-viewer .viewer-tabs span { min-width: 17px; line-height: 17px; height: 17px; }
.civic-viewer .map-sidebar [role=tabpanel] { padding: 16px 20px 22px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.civic-viewer .map-sidebar-footer { padding: 0 20px; }
.civic-viewer .map-sidebar-footer a { min-height: 40px; color: var(--atlas-cyan); }
.civic-viewer .map-sidebar input[type=search], .civic-viewer .map-sidebar select { width: 100%; margin-top: 6px; background-color: #10212a; color-scheme: dark; }
.civic-viewer .map-sidebar label, #live-panel > label { font-weight: 700; }
.civic-viewer .map-recorridos { margin: 20px 0 14px; }
.civic-viewer .map-recorridos h2, .civic-viewer .live-block h2 { font-size: 17px; letter-spacing: -.035em; color: var(--atlas-light); line-height: 1.25; margin: 0 0 10px; }
.route-hero { display: grid; align-content: end; justify-items: start; gap: 2px; width: 100%; min-height: 116px; margin-bottom: 8px; padding: 14px 15px; border: 1px solid #52716e; border-radius: 7px; text-align: left; color: #fff; background: linear-gradient(90deg, #0c2525f2, #1026268c 72%, #13222215), url('assets/arvi-ortofoto.jpg') center 49% / cover; font: inherit; }
.route-hero:hover { border-color: var(--atlas-cyan); }
.route-hero span { font-size: 11px; color: #dbeddf; }
.route-hero strong { font-size: 30px; letter-spacing: -.055em; line-height: 1.12; }
.route-hero small { margin-top: 3px; font-size: 12px; color: #eef4bd; }
.civic-viewer .map-recorrido img { height: 47px; }
.civic-viewer .map-recorridos > div { gap: 8px; }
.civic-viewer .map-shortcuts { margin: 14px 0; }
.civic-viewer .map-shortcuts button { min-height: 44px; padding-block: 10px; }
.catalog-disclosure { border-block: 1px solid var(--atlas-line); margin: 16px 0 4px; }
.catalog-disclosure > summary { min-height: 46px; align-content: center; color: var(--atlas-cyan); cursor: pointer; font-size: 14px; font-weight: 700; }
#place-results h2 { margin: 10px 0 3px; font-size: 15px; color: var(--atlas-light); }
.live-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 14px 0 12px; margin: 6px 0 0; border-bottom: 1px solid var(--atlas-line); }
.live-overview > section + section { padding-left: 14px; border-left: 1px solid var(--atlas-line); }
.live-overview h2 { margin: 0 0 5px; font-size: 14px; letter-spacing: -.02em; line-height: 1.35; }
.live-overview .source-time { margin: 6px 0 0; font-size: 11px; }
.live-overview .rain-measure { margin: 0; }
#live-panel > .live-details { border-bottom: 1px solid var(--atlas-line); }
#place-results { display: grid; margin: 10px 0; }
#place-results button { min-height: 44px; border: 0; border-bottom: 1px solid var(--atlas-line); background: transparent; color: var(--atlas-cyan); text-align: left; font: inherit; font-weight: 700; font-size: 13px; }
#place-results button:hover { background: var(--atlas-ground); }
#live-panel { color: var(--atlas-light); font-size: 13px; line-height: 1.5; }
#live-panel a, .civic-viewer .map-filters a { color: var(--atlas-cyan); text-underline-offset: 3px; }
#live-panel select { display: block; }
.journey-line { position: relative; display: flex; justify-content: space-between; margin-top: 16px; padding-top: 13px; gap: 4px; text-align: center; color: #d4efe7; font-size: 11px; }
.journey-line::before { content: ''; position: absolute; top: 4px; left: 5px; right: 5px; border-top: 2px dotted #73e5db; }
.journey-line > * { position: relative; font-weight: 700; }
.journey-line > :not(i)::before { content: ''; position: absolute; left: calc(50% - 4px); top: -12px; width: 8px; height: 8px; border: 1.5px solid #6cddd1; border-radius: 50%; background: var(--atlas-panel); }
.journey-line i { top: -16px; padding-inline: 5px; line-height: 15px; height: 15px; font-style: normal; color: #73fff1; background: var(--atlas-panel); }
.journey-line i:nth-of-type(2) { color: #f4d2ff; }
.journey-line > :first-child::before { left: 1px; }
.journey-line > :last-child::before { left: auto; right: 1px; }
#route-instruction, #rain-distance, .source-time { color: var(--atlas-muted); font-size: 12px; line-height: 1.5; margin: 5px 0; }
#route-instruction { margin-top: 7px; }
.live-block { padding: 16px 0 12px; border-bottom: 1px solid var(--atlas-line); }
#live-status { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.line-report { display: inline-block; padding: 3px 8px; background: #313a3b; border: 1px solid #64736c; border-radius: 4px; font-size: 12px; font-weight: 700; }
.line-report[data-normal=true] { border-color: #476c5b; background: #233c33; color: #b8ecc9; }
.live-details summary, .map-live-key summary { cursor: pointer; min-height: 40px; align-content: center; }
.live-details summary { color: var(--atlas-cyan); font-size: 12px; }
#line-list, #live-nearby { padding: 0; margin: 0; list-style: none; }
#line-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 3px 0 8px; }
#line-list li, #live-nearby li { font-size: 12px; }
#rain-periods { display: flex; padding: 2px; margin: 3px 0 7px; gap: 3px; border: 1px solid var(--atlas-line); border-radius: 6px; background: var(--atlas-ground); }
#rain-periods label { position: relative; flex: 1; margin: 0; }
#rain-periods input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
#rain-periods span { display: grid; place-items: center; min-height: 39px; border-radius: 4px; font-size: 12px; cursor: pointer; color: var(--atlas-muted); }
#rain-periods input:checked + span { background: var(--atlas-line); color: white; }
#rain-periods input:focus-visible + span { outline: 2px solid var(--dm-lime); }
.rain-measure { margin: 8px 0 0; color: var(--atlas-muted); font-size: 17px; line-height: 1.15; }
#rain-mm { margin-right: 3px; font-size: 41px; line-height: 1; color: #d9f5ed; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.rain-block > label { display: block; margin-top: 14px; }
.source-warning { background: #443d26; color: #ffe7a5; padding: 7px 9px; border-radius: 5px; font-size: 12px; }
#live-nearby li { display: grid; padding-block: 7px; }
#live-nearby small { color: var(--atlas-muted); font-size: 12px; }
#live-nearby button { justify-self: start; margin-left: -8px; }
.live-links, .live-entry { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-links { justify-content: space-between; margin-top: 6px; font-size: 12px; }
.live-links button { margin-left: -8px; }
.live-entry { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--atlas-line); }
.live-entry strong { margin-right: auto; font-size: 14px; }
.civic-viewer .map-live-key { position: absolute; z-index: 6; right: var(--inset); bottom: 76px; padding: 0 12px; max-width: min(300px, calc(100% - 28px)); color: #fff; background: #152831f2; border: 1px solid #778b89; border-radius: 7px; box-shadow: var(--shadow-1); font-size: 12px; }
.map-live-key > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 9px; }
.map-live-key strong { display: block; margin: 2px 0 4px; }
.map-live-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-live-key span::before { content: ''; width: 10px; height: 10px; border: 1px solid white; border-radius: 50%; background: #253a44; }
.map-live-key .symbol-rail::before, .map-live-key .symbol-b::before, .map-live-key .symbol-cable::before, .map-live-key .symbol-cable-l::before { width: 15px; height: 0; border: 0; border-top: 3px solid #e1e753; border-radius: 0; }
.map-live-key .symbol-b::before { border-top: 3px dashed #ffba76; }
.map-live-key .symbol-cable::before { border-top: 3px dotted #73fff1; }
.map-live-key .symbol-cable-l::before { border-top: 3px dashed #f4d2ff; }
.map-live-key .symbol-stop::before { width: 8px; height: 8px; border-radius: 0; background: #e1e753; }
.map-live-key .r1::before { background: #65dacb; }
.map-live-key .r2::before { background: #44a7ff; }
.map-live-key .r3::before { background: #a78bfa; }
.map-live-key .r4::before { background: #737b81; border-style: dashed; }
.civic-viewer #map:focus-visible::after { content: '+'; position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid white; border-radius: 50%; background: #11242edb; color: white; line-height: 1; pointer-events: none; }
@media (max-width: 800px) {
  .civic-viewer { --header-h: 56px; --inset: 10px; }
  .civic-viewer .site-header { padding-inline: 12px; }
  .civic-viewer .identity img { width: 46px; height: 36px; }
  .civic-viewer .viewer-layout { display: block; }
  .civic-viewer .viewer-layout[data-panel=open] #map:focus-visible::after { top: calc((100% - var(--sheet)) / 2); }
  .civic-viewer .map-sidebar { position: absolute; inset: auto 0 0; width: 100%; height: var(--sheet); border-radius: 14px 14px 0 0; border-top: 1px solid #6f8581; }
  .civic-viewer .sidebar-top { padding: 6px 16px 0; }
  .civic-viewer .viewer-tabs { padding-inline: 12px; }
  .civic-viewer .map-sidebar [role=tabpanel] { padding: 12px 16px; }
  .civic-viewer .map-sidebar-footer { padding-inline: 16px; }
  .civic-viewer .map-sidebar-footer a { min-height: 38px; }
  .civic-viewer .map-live-key { bottom: 73px; }
  .civic-viewer .viewer-layout[data-panel=open] .map-live-key { bottom: calc(var(--sheet) + 29px); }
  .civic-viewer .viewer-layout[data-panel=open] .map-bottom-tools { visibility: hidden; }
  .civic-viewer .ortho-dates { display: none; }
  .civic-viewer .ol-attribution { right: 4px; max-width: calc(100% - 118px); background: #fffffff0; }
  .civic-viewer .ol-attribution ul { font: 500 10px/1.35 var(--font-sans); padding: 2px 5px; }
  .civic-viewer .ol-attribution a { color: #243238; }
  .civic-viewer .viewer-layout[data-panel=open] .ol-attribution, .civic-viewer .viewer-layout[data-panel=open] .ol-scale-line { bottom: calc(var(--sheet) + 5px); }
  .civic-viewer .viewer-layout[data-panel=open] .feature-panel { bottom: calc(var(--sheet) + 4px); max-height: calc(100% - var(--sheet) - 50px); }
}
@media (max-width: 800px) and (max-height: 480px) {
  .civic-viewer { --sheet: 52dvh; }
  .civic-viewer .map-sidebar-footer { display: none; }
}
@media (max-width: 365px) {
  .civic-viewer .viewer-tabs button { font-size: 11px; }
  .civic-viewer .viewer-layout[data-panel=closed] #mobile-count { display: none; }
}

.civic-viewer { --rail: clamp(360px, 29vw, 428px); }
.civic-viewer .sidebar-top { padding-top: 19px; }
.civic-viewer .sidebar-top h1 { font-size: clamp(23px, 2.1vw, 30px); letter-spacing: -.05em; }
.civic-viewer .viewer-tabs button { font-size: 13px; }
.search-head, .search-entry { display: flex; align-items: center; gap: 8px; }
.search-head { justify-content: space-between; margin-bottom: 6px; }
.search-head label, .work-tasks h2 { font-size: 15px; font-weight: 700; letter-spacing: -.025em; color: var(--atlas-light); }
.civic-viewer .map-sidebar #location-kind { width: auto; max-width: 53%; margin: 0; min-height: 36px; padding: 5px 25px 5px 8px; border: 1px solid var(--atlas-control); font-size: 12px; }
.civic-viewer .map-sidebar #map-search { flex: 1; min-width: 0; height: 46px; margin: 0; padding-inline: 11px; font-size: 14px; border: 1px solid #6c8289; border-radius: 5px; }
.search-entry button, .feature-actions button { flex: none; min-height: 46px; padding: 0 15px; background: var(--dm-lime); color: #13202a; font: 700 14px var(--font-sans); border: 1px solid transparent; border-radius: 5px; }
.search-entry button:hover, .feature-actions button:hover { background: #e6eb53; }
.search-tip, .search-feedback { margin: 7px 0 0; color: #c6d4d8; font-size: 13px; line-height: 1.45; }
.search-feedback:empty { display: none; }
#location-results { display: grid; margin-top: 7px; }
#location-results button { min-height: 46px; display: grid; gap: 3px; text-align: left; padding: 8px 5px; font: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--atlas-line); color: var(--atlas-light); }
#location-results strong { color: var(--atlas-cyan); font-size: 14px; }
#location-results span { color: #b6c9d1; font-size: 12px; }
.work-tasks { margin-top: 23px; }
.work-tasks h2 { margin: 0 0 10px; line-height: 1.3; }
.work-task { position: relative; display: grid; gap: 3px; padding: 13px 6px 13px 36px; border-bottom: 1px solid var(--atlas-line); text-decoration: none; color: var(--atlas-light); }
.work-task strong { font-size: 15px; line-height: 1.25; letter-spacing: -.024em; }
.work-task span { font-size: 12px; line-height: 1.45; color: #bbced3; }
.work-task:hover strong, .work-task:focus-visible strong { text-decoration: underline; text-underline-offset: 3px; }
.work-task::before { content: ''; position: absolute; left: 7px; top: 20px; width: 15px; height: 13px; border: 2px solid #84d6db; border-radius: 2px; transform: rotate(-18deg); }
.task-territorio::before { border-style: dashed; }
.task-equipamientos::before { width: 12px; height: 12px; left: 9px; border-radius: 50%; background: var(--dm-lime); border-color: #172b32; outline: 1px solid var(--dm-lime); }
.work-task.task-catastro { isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: 92px; padding: 13px 32% 13px 15px; border: 1px solid #57716d; border-radius: 6px; background: #203734; }
.task-catastro::before { display: none; }
.task-catastro::after { content: ''; z-index: -1; position: absolute; inset: 0 0 0 38%; background: linear-gradient(90deg,#203734 0%,#20373444 55%,transparent),url('assets/catastro-pot.webp') 55% 54% / cover; }
.work-task.task-catastro strong { color: #fff; font-size: 21px; }
.work-task.task-catastro span { color: #e5eee6; max-width: 165px; }
.civic-viewer .catalog-disclosure { margin: 0; border-top: 0; }
.civic-viewer .catalog-disclosure > summary { min-height: 46px; }
#examples { margin-bottom: 7px; }
#examples .map-recorridos { margin: 3px 0 10px; }
#live-panel .route-hero { margin: 15px 0 4px; min-height: 90px; }
.active-guidance { font-size: 13px; line-height: 1.5; color: #c5d8d8; border-left: 2px solid var(--atlas-cyan); margin: 0 0 14px; padding: 2px 0 2px 10px; }
.civic-viewer #share-map { color: #172825; background: var(--dm-lime); border-color: #535b32; display: inline-block; }
.civic-viewer .feature-panel { width: min(365px, calc(100% - 30px)); border-radius: 9px; border-top: 4px solid #cad300; padding: 15px 18px 16px; background: #f8faf7; color: #17272c; }
.civic-viewer .feature-panel .dialog-top { margin: 0 0 5px; }
.civic-viewer .feature-panel .dialog-top > span { font-size: 13px; color: #405851; font-weight: 700; }
.civic-viewer .feature-panel .dialog-top button { min-height: 40px; }
.civic-viewer #feature-title { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }
.civic-viewer #feature-coordinates { margin: 6px 0 12px; font-size: 12px; color: #435c61; font-variant-numeric: tabular-nums; }
.civic-viewer #feature-layer-label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.civic-viewer #feature-layers { margin: 0; width: 100%; min-height: 44px; font-size: 14px; }
.feature-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.feature-actions button { min-height: 42px; font-size: 13px; }
.feature-actions a { font-size: 13px; font-weight: 700; color: #245968; }
.civic-viewer #feature-content { padding-top: 6px; border-top: 1px solid #c7d1ce; overflow-wrap: anywhere; }
.civic-viewer #feature-content table { margin-bottom: 0; }
.civic-viewer #feature-content tr:nth-child(even) { background: #edf2ef; }
@media (max-width: 800px) {
  .civic-viewer .sidebar-top { padding-top: 5px; }
  .civic-viewer .sidebar-top h1 { font-size: 23px; }
  .civic-viewer .viewer-tabs button { font-size: 12px; }
  .work-tasks { margin-top: 15px; }
  .work-task.task-catastro { min-height: 72px; }
  .work-task { padding-block: 9px; }
  .civic-viewer .map-sidebar #location-kind { min-height: 44px; }
  .tool-extra { display: none; }
  .civic-viewer .feature-panel { right: var(--inset); left: auto; bottom: 8px; width: min(400px, calc(100% - 20px)); max-height: min(58%, 500px); }
  .civic-viewer .viewer-layout[data-panel=open] .feature-panel { bottom: 8px; max-height: min(58%, 500px); z-index: 22; }
}
@media (max-width: 380px) {
  .civic-viewer .map-tools .button, .civic-viewer #toggle-sidebar { padding-inline: 7px; }
}
@media (max-width: 365px) {
  .civic-viewer #toggle-sidebar svg { display: none; }
  .civic-viewer .viewer-layout[data-panel] .map-stage .map-toolbar { left: 8px; right: 8px; }
}
.civic-viewer .feature-panel { display: flex; flex-direction: column; }
.civic-viewer .feature-panel > :not(#feature-content) { flex-shrink: 0; }
.civic-viewer .feature-panel .dialog-top { min-height: 36px; }
.point-cross { align-self: flex-start; min-height: 40px; padding: 3px 0; border: 0; background: transparent; color: #195e6b; font: 700 13px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; }
.civic-viewer #feature-content { margin-top: 7px; padding: 7px 2px 2px; min-height: 44px; overflow-y: auto; overscroll-behavior: contain; }
.feature-actions { flex-wrap: nowrap; justify-content: space-between; gap: 6px; border-top: 1px solid #c7d1ce; padding-top: 8px; margin: 8px 0 0; }
.feature-actions button { margin-left: auto; }
.feature-actions a { display: inline-flex; align-items: center; min-height: 42px; }
.feature-summary { margin: 0; }
.feature-summary > div { display: grid; grid-template-columns: minmax(74px,.8fr) minmax(95px,1.25fr); gap: 8px; padding: 6px 1px; }
.feature-summary dt { font-size: 12px; color: #405954; }
.feature-summary dd { margin: 0; font-size: 14px; color: #162c30; font-weight: 700; }
.feature-all summary { min-height: 40px; align-content: center; cursor: pointer; font-size: 13px; font-weight: 700; color: #245968; }
@media (max-width: 800px) {
  .civic-viewer .feature-panel, .civic-viewer .viewer-layout[data-panel=open] .feature-panel { max-height: min(53%, 490px); }
  .civic-viewer .feature-panel, .civic-viewer .viewer-layout[data-panel=open] .feature-panel { padding: 10px 14px; }
}
@media (max-height: 520px) {
  .civic-viewer .feature-panel, .civic-viewer .viewer-layout[data-panel=open] .feature-panel { max-height: calc(100% - 62px); overflow-y: auto; }
  .civic-viewer #feature-content { flex-shrink: 0; overflow: visible; }
}
.point-location { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 5px; }
.civic-viewer .point-location #feature-coordinates { margin: 2px 0; }
#refocus-point { flex: none; min-height: 40px; padding: 0 2px; font: 700 12px var(--font-sans); color: #245968; background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 800px) and (min-height: 521px) {
  .civic-viewer .feature-panel, .civic-viewer .viewer-layout[data-panel=open] .feature-panel { max-height: min(47%, 490px); }
}
