@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-background: #f5efe8;
  --color-a: #60afa7;
  --color-b: #ee8886;
  --color-c: #e9662e;
  --color-d: #bf942e;
  --color-e: #e6b535;
  --color-f: #838522;
  --color-h: #be9c7b;
  --color-n: #a08761;
  --color-x: #ad7fc3;
  --color-y: #7d9249;
  --color-primary-dark: #286e68;
}

:root {
  --ink: #273d3a;
  --muted: #777b72;
  --green: var(--color-primary-dark);
  --line: #e5d9cd;
  --cream: var(--color-background);
  --white: #fff;
  --category-color: var(--color-a);
  font-family: Poppins,ui-sans-serif,sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  outline: none;
}

body {
  margin: 0;
}

button,input,select {
  font: inherit;
}

button,a,input,select,summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  color: inherit;
}

button:disabled {
  cursor: default;
  opacity: .5;
}

h1, h2 { 
  margin: 0;
  margin-bottom: 1rem;
}

[hidden] {
  display: none!important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  z-index: 2000;
  padding: 0.9375rem;
  background: white;
  color: var(--green);

  &:focus {
    top: 12px;
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 46px;
  background: var(--green);
  border-radius: 14px 14px 14px 4px;
  color: white;
  line-height: 1;
  font-weight: 400;
}

.brand strong {
  display: block;
  font-weight: 720;
  letter-spacing: -1px;
}

.brand-dot {
  color: #70a087;
}

.brand small {
  display: block;
  letter-spacing: 1.65px;
  margin-top: 5px;
  color: #7a8680;
  font-weight: 650;
}



.package-state {
  background: #faf2df;
  border: 1px solid #ede1c4;
  border-radius: 22px;
  padding: 0.5625rem 0.9375rem;
  color: #796334;
  white-space: nowrap;

  &:before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: 1px;
  }

  &.ready {
    color: #346856;
    background: #eef5ed;
    border-color: #d8e6d7;
  }
}

.workspace {
  display: grid;
  grid-template-columns: 392px 1fr;
  height: calc(100dvh - 91px);
  min-height: 520px;
}

.sidebar {
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  z-index: 5;
}

.search-panel {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
}

.eyebrow {
  letter-spacing: 1.75px;
  font-weight: 700;
  color: #72877a;
  margin: 0 0 11px;
}

h1 {
  letter-spacing: -1.2px;
  line-height: 1.2;
  font-weight: 650;
  margin: 0 0 12px;
}

.intro {
  line-height: 1.75;
  margin: 0 0 21px;
  color: #7a847e;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe2da;
  background: var(--cream);
  border-radius: 9px;
  padding: 0 0.75rem;
  height: 45px;

  &:focus-within {
    border-color: #458a77;
    box-shadow: 0 0 0 2px #458a7725;
  }

  svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #789083;
    stroke-width: 1.6;
  }

  input {
    width: 100%;
    border: 0;
    background: none;
    color: var(--ink);
    height: 100%;
    min-width: 0;
  }

  input::placeholder {
    color: #89928b;
  }
}

.select-label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 650;
}

select {
  width: 100%;
  height: 41px;
  background: white;
  border: 1px solid #dbe2da;
  border-radius: 8px;
  padding: 0 0.6875rem;
  color: #4b5e53;
}

.category-fieldset {
  border: 0;
  padding: 0;
  margin: 19px 0 0;
  min-width: 0;

  legend {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    font-weight: 650;
    margin-bottom: 10px;
  }

  legend span {
    color: #8c948e;
    font-weight: 400;
  }
}

.category-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.category-option {
  border: 1px solid #e2e7e0;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 0.25rem 0.5rem;
  transition: background .12s,border-color .12s;

  &:hover {
    background: #f3f6f0;
    border-color: #aebfb2;
  }

  &[aria-pressed=true] {
    background: #edf4eb;
    border-color: #688d77;
    color: var(--green);
    box-shadow: inset 0 0 0 .5px #688d77;
  }
}

.chip-symbol {
  color: white;
  background: var(--category-color);
  border-radius: 5px;
  font-weight: 750;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.text-button {
  border: 0;
  background: none;
  padding: 0.3125rem 0;
  color: #5e7567;
  min-height: 30px;
}

.reset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.0625rem 1.6875rem 0.8125rem;

  h2 {
    margin: 0;
    font-weight: 650;
  }

  h2 span {
    padding: 0.1875rem 0.375rem;
    background: #eef2eb;
    border-radius: 4px;
    color: #667c6c;
    margin-left: 7px;
  }
}

#mapped-count {
  color: #89928b;
}

.result-scroll {
  overflow: auto;
  flex: 1;
  min-height: 100px;
  scrollbar-width: thin;
  scrollbar-color: #d8e1d6 transparent;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-item {
  padding: 0 1.0625rem;
}

.result-button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  border-bottom-color: #eef0eb;
  background: white;
  padding: 1.0625rem 0.625rem;
  min-height: 104px;
  border-radius: 7px;

  &:hover {
    background: #f7f9f4;
  }

  &.selected {
    background: #edf4eb;
    border-color: #b9cdbb;
  }
}

.category-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 33px;
  height: 35px;
  background: var(--category-color);
  color: white;
  border: 1px solid var(--category-color);
  border-radius: 9px;
  font-weight: 700;
}

.result-copy {
  display: block;
  flex: 1;
  min-width: 0;
}

.result-municipality {
  display: block;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #788d7d;
  margin: 0 0 5px;
}

.result-name {
  display: block;
  font-weight: 650;
  line-height: 1.55;
  margin-bottom: 4px;
}

.result-address {
  display: block;
  line-height: 1.6;
  color: #7a847d;
}

.pending-label {
  display: block;
  color: #947e50;
  margin-top: 7px;
}

.result-arrow {
  color: #a2afa3;
  margin-top: 16px;
}

.sidebar-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0.875rem 0.625rem;
  border-top: 1px solid var(--line);
  color: #849180;
}

.small-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  background: #88a581;
}

.map-panel {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  background: #eef1e9;
}

#map {
  height: 100%;
  width: 100%;
  background-color: #eef1e9;
}

.map-top {
  position: absolute;
  inset: 28px 28px auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  gap: 15px;
  z-index: 500;
}

.map-home {
  margin-left: auto;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 0.8125rem;

  &:disabled {
    background: #ffffff8c;
  }
}

.map-empty {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  width: min(430px,80%);
  z-index: 450;
}

.map-empty-icon {
  display: grid;
  place-items: center;
  width: 77px;
  height: 77px;
  margin: 0 auto 24px;
  color: #7a9580;
  background: #e2e9db;
  border: 1px solid #d4dfce;
  border-radius: 24px;
}

.map-empty h2 {
  letter-spacing: -.8px;
  font-weight: 550;
  margin: 0 0 16px;
}

.map-empty>p:not(.eyebrow) {
  line-height: 1.9;
  color: #788572;
  margin: 0 auto;
  max-width: 365px;
}

.preparation-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 28px auto 24px;

  &>span {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #829078;
  }

  &>span+span {
    border-left: 1px solid #d8e1d2;
    padding-left: 2rem;
  }

  strong {
    font-weight: 500;
    letter-spacing: -1px;
    color: #516d54;
  }
}

.map-empty .map-empty-note {
  color: #91a086!important;
}

.map-bottom {
  position: absolute;
  inset: auto 28px 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  z-index: 500;
  pointer-events: none;
}

.legend {
  pointer-events: auto;
  background: white;
  border: 1px solid #dce4d8;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 9px #2b473407;
  min-width: 128px;

  summary {
    cursor: pointer;
    padding: 0.8125rem;
    white-space: nowrap;
  }

  summary>span {
    margin-right: 4px;
  }
}

#legend-items {
  padding: 0 0.9375rem 0.625rem;
  max-height: 280px;
  overflow: auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.125rem 0;
  white-space: nowrap;
}

.map-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0.5625rem;
  background: #ffffffc9;
  color: #788572;
  z-index: 500;
  display: none;
}

.map-notice {
  position: absolute;
  top: 146px;
  left: 28px;
  right: 28px;
  background: #fffbec;
  border: 1px solid #e8dec0;
  border-radius: 6px;
  padding: 0.75rem 0.9375rem;
  line-height: 1.5;
  z-index: 500;
  color: #78683e;
}

.maplibregl-ctrl-top-right {
  top: 84px;
  right: 18px;
}

.maplibregl-ctrl-bottom-left {
  bottom: 12px;
  left: 20px;
}

.offline-panel {
  padding: 0.625rem 1.75rem;
  border-top: 1px solid var(--line);
  background: #f6f8f2;

  p {
    margin: 7px 0;
    line-height: 1.5;
  }

  progress {
    width: 100%;
  }
}

.map-marker {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.pin-shape {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--category-color);
  color: white;
  border: 3px solid white;
  border-radius: 13px 13px 13px 3px;
  box-shadow: 0 3px 8px #203d4240;
  font-weight: 700;
  line-height: 1;
  position: relative;

  &:after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 10px;
    width: 9px;
    height: 9px;
    background: var(--category-color);
    transform: rotate(45deg);
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    z-index: -1;
  }
}

.pin-categories {
  gap: 4px;
  padding: 0.25rem;
  border-radius: 13px;

  &:after {
    left: calc(50% - 4.5px);
  }
}

.pin-category {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--category-color);
  color: white;
  font-weight: 750;
}

.shared-location h3 {
  margin: 5px 0 12px;
}

.shared-button {
  display: block;
  width: 100%;
  text-align: left;
  background: #f2f6ee;
  border: 1px solid #d8e5d5;
  border-radius: 5px;
  padding: 0.625rem;
  margin: 6px 0;
  font: inherit;
  line-height: 1.5;
}

.details-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: 410px;
  max-width: 100%;
  max-height: 100dvh;
  height: 100dvh;
  background: white;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 1.75rem;
  overflow: auto;
  box-shadow: -8px 0 40px #173d3a12;
  color: var(--ink);

  &::backdrop {
    background: transparent;
  }
}

.details-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;

  .eyebrow {
    margin: 0;
  }
}

.close-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: white;
  font-weight: 300;
}

.detail-symbol {
  display: grid;
  place-items: center;
  width: 54px;
  height: 56px;
  border-radius: 15px;
  background: var(--category-color);
  color: white;
  font-weight: 650;
  margin-bottom: 24px;
}

#detail-title {
  line-height: 1.4;
  letter-spacing: -.7px;
  font-weight: 600;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag {
  background: #eef3e9;
  border: 1px solid #dfe8da;
  border-radius: 5px;
  padding: 0.375rem 0.5625rem;
  color: #677c60;
}

.detail-fields {
  margin: 30px 0;
}

.detail-field {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;

  dt {
    color: #81907c;
    margin-bottom: 8px;
  }

  dd {
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
}

.call-button {
  width: 100%;
}

.detail-footnote {
  line-height: 1.7;
  color: #899582;
  text-align: center;
}

.location-note {
  background: #faf5e8;
  color: #8a7645;
  padding: 0.8125rem;
  border-radius: 7px;
  line-height: 1.8;
  margin-top: 26px;

  &.verified {
    background: #eef5e9;
    color: #638052;
  }
}

.empty-results {
  text-align: center;
  padding: 1.875rem 1.6875rem;
  color: #7d8c76;

  h3 {
    color: var(--ink);
    font-weight: 600;
  }

  p {
    line-height: 1.7;
    margin-bottom: 22px;
  }
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: white;
  padding: 1.875rem;
  z-index: 9999;
}

@media(min-width:1600px) {
  .workspace {
    grid-template-columns: 430px 1fr;
  }


  .category-option {
    min-height: 34px;
  }

  .results-heading {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .result-button {
    padding: 1.25rem 0.9375rem;
  }

  .map-empty {
    width: 470px;
  }
}

@media(max-height:850px) and (min-width:761px) {
  .header {
    height: 76px;
  }

  .workspace {
    height: calc(100dvh - 76px);
  }


  .intro {
    display: none;
  }

  h1 {
    margin-bottom: 17px;
  }

  .category-fieldset {
    margin-top: 14px;
  }

  .select-label {
    margin-top: 12px;
  }

  .category-option {
    min-height: 29px;
  }

  .reset {
    margin-top: 5px;
  }

  .results-heading {
    padding-top: 0.8125rem;
  }

  .map-empty-icon {
    margin-bottom: 16px;
  }

  .map-empty {
    top: 50%;
  }

  .preparation-stats {
    margin-top: 20px;
  }
}

@media(max-width:1050px) and (min-width:761px) {
  .workspace {
    grid-template-columns: 350px 1fr;
  }



  .map-top {
    inset: 20px 20px auto;
  }

  .map-home>span:last-child {
    display: none;
  }

  .map-bottom {
    left: 20px;
    right: 20px;
  }

  .map-notice {
    left: 20px;
    right: 20px;
  }

  .map-empty {
    top: 53%;
  }
}

@media(max-width:760px) {

  .brand {
    gap: 9px;
  }

  .brand small {
    letter-spacing: 1.15px;
  }


  .package-state {
    padding: 0.4375rem 0.625rem;
  }

  .workspace {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .sidebar {
    display: contents;
  }

  .search-panel {
    order: 0;
    background: white;
    border-bottom: 0;
  }

  .intro {
    margin-bottom: 18px;

    br {
      display: none;
    }
  }

  .category-options {
    gap: 7px;
  }

  .category-option {
    min-height: 35px;
  }

  .search-box {
    height: 48px;
  }

  select {
    height: 44px;
  }

  .reset {
    margin-top: 8px;
  }

  .map-panel {
    order: 1;
    flex: 1 0 18rem;
    height: auto;
    min-height: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .map-top {
    inset: 16px 16px auto;
  }

  .map-home>span:last-child {
    display: none;
  }

  .map-home {
    padding: 0 0.5625rem;
  }

  .map-empty {
    top: 55%;
    width: 86%;
  }

  .map-empty-icon {
    width: 53px;
    height: 53px;
    border-radius: 17px;
    margin-bottom: 16px;
  }

  .map-empty h2 {
    margin-bottom: 11px;
  }

  .preparation-stats {
    margin: 17px auto;
    gap: 22px;

    &>span+span {
      padding-left: 1.375rem;
    }
  }

  .map-bottom {
    left: 16px;
    right: 16px;
    bottom: 28px;
    gap: 10px;
  }

  .legend {
    min-width: 100px;

    summary {
      padding: 0.625rem;
    }
  }

  #legend-items {
    position: absolute;
    bottom: 40px;
    left: 0;
    background: white;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: 240px;
  }

  .map-notice {
    top: 118px;
    left: 16px;
    right: 16px;
  }

  .results-heading {
    order: 2;
    background: white;
    padding: 1.375rem 1.25rem 0.75rem;
  }

  .result-scroll {
    order: 3;
    overflow: visible;
    background: white;
  }

  .result-item {
    padding: 0 0.625rem;
  }

  .result-button {
    padding: 1.125rem 0.75rem;
  }

  .sidebar-footer {
    order: 4;
    padding: 1.125rem;
  }

  .details-dialog {
    width: 100%;
    padding: 1.5rem;
    max-height: 90dvh;
    height: auto;
    inset: auto 0 0;
    border-radius: 18px 18px 0 0;
    border-left: 0;
  }

  .details-top {
    margin-bottom: 22px;
  }

  .detail-symbol {
    margin-bottom: 18px;
  }

  .detail-fields {
    margin-top: 20px;
  }

  .detail-field {
    padding: 0.8125rem 0;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    scroll-behavior: auto!important;
    transition: none!important;
    animation: none!important;
  }
}

@media(max-width:760px) {
  .offline-panel {
    order: 4;
    padding: 0.75rem 1.25rem;
  }

  .maplibregl-ctrl-top-right {
    top: 80px;
    right: 6px;
  }
}

/* Białe ikony PNG na kolorach z category-styles.js. */

.category-icon {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
}

.pin-shape>.category-icon {
  width: 28px;
  height: 28px;
}

.mobile-tabs {
  display: none;
}

.points-panel {
  display: contents;
}

@media(max-width:760px) and (orientation:portrait) {
  .mobile-tabs {
    order: 1;
    display: flex;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 0 1.25rem;
    gap: 24px;

    button {
      flex: 1;
      border: 0;
      border-bottom: 3px solid transparent;
      background: none;
      padding: 0.875rem 0.5rem;
      font-weight: 650;
      color: var(--muted);
    }

    button[aria-selected=true] {
      color: var(--green);
      border-bottom-color: var(--green);
    }
  }

  .map-panel {
    order: 2;
  }

  .results-heading {
    order: 2;
  }

  .result-scroll {
    order: 3;
  }

  .workspace[data-mobile-view="map"] .points-panel,.workspace[data-mobile-view="points"] .map-panel {
    display: none;
  }
}

.result-group h3 {
  margin: 0;
  padding: 1rem;
  color: #647d6e;
  background: #f7f9f5;
}

.mobile-category {
  display: none;
}

@media(max-width:760px) {
  .category-fieldset {
    display: none;
  }

  .mobile-category {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
  }

  .mobile-category-label {
    font-weight: 650;
  }

  .category-select {
    position: relative;
    flex: 1;
    min-width: 0;

    summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 44px;
      padding: 0.4375rem 0.75rem;
      border: 1px solid #dbe2da;
      border-radius: 8px;
      background: white;
      cursor: pointer;
      list-style: none;
    }

    summary::-webkit-details-marker {
      display: none;
    }
  }

  #category-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .category-menu {
    position: absolute;
    z-index: 900;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    background: white;
    border: 1px solid #dbe2da;
    border-radius: 8px;
    box-shadow: 0 6px 18px #203c3526;
    padding: 0.25rem;
  }

  .category-menu-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0.4375rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
  }

  .category-menu-option:hover,.category-menu-option:has(input:checked) {
    background: #edf4eb;
  }

  .category-menu-option input {
    accent-color: var(--green);
    margin: 0;
  }

  .result-group h3 {
    padding-left: 1.375rem;
  }
}

.mobile-search-button {
  display: none;
}

@media(max-width:760px) {
  .search-row {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 18px;

    .search-box {
      flex: 1;
      min-width: 0;
    }
  }

  .search-panel.search-open .search-row {
    display: flex;
  }

  .search-panel.search-open .mobile-category {
    display: none;
  }

  .mobile-search-button {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    line-height: 1;

    svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
    }
  }
}

.tab-result-count {
  padding: 0.1875rem 0.375rem;
  background: #eef2eb;
  border-radius: 4px;
  color: #667c6c;
  margin-left: 5px;
}

@media(max-width:760px) and (orientation:portrait) {
  .results-heading {
    display: none;
  }
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;

  .detail-symbol {
    flex-shrink: 0;
    margin: 0;
  }

  #detail-title {
    margin: 0;
  }
}

.show-map-button,.detail-close {
  width: 100%;
  margin-top: 10px;
}

@media(max-width:760px) {
  .details-dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
}

.shared-button {
  display: flex;
  align-items: center;
  gap: 9px;
}

.shared-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  flex-shrink: 0;
}

/* Paleta i przyciski projektu Tulimy Mamy. */

.brand-icon {
  background: var(--color-a);
  color: #173f3b;
}

.brand-dot {
  color: var(--color-b);
}

.search-box,.result-group h3,.offline-panel {
  background: var(--color-background);
}

.search-box,.category-select summary,.mobile-search-button,select {
  border-color: #d7c9bb;
}

.category-option:hover,.result-button:hover,.shared-button {
  background: #f8f2ec;
}

.category-option[aria-pressed=true],.result-button.selected,.category-menu-option:hover,.category-menu-option:has(input:checked) {
  background: #e2f1ee;
  border-color: var(--color-a);
  color: #245a55;
}

.mobile-tabs button[aria-selected=true] {
  border-bottom-color: var(--color-a);
  color: #245a55;
}

.tab-result-count,.results-heading h2 span,.detail-tag {
  background: var(--color-background);
  color: #49635b;
}

.shared-button {
  border-color: #e5d9cd;
  color: #273d3a;

  &:hover {
    background: #e2f1ee;
    border-color: var(--color-a);
  }
}

.location-note {
  background: #fbefe3;
  color: #765e39;
}

/* Klasy kolorów zgodne z paletą Tulimy Mamy. */

.fg-a {
  color: var(--color-a)!important;
}

.bg-a {
  color: #fff;
  background-color: var(--color-a)!important;
}

.fg-b {
  color: var(--color-b)!important;
}

.bg-b {
  color: #fff;
  background-color: var(--color-b)!important;
}

.fg-c {
  color: var(--color-c)!important;
}

.bg-c {
  color: #fff;
  background-color: var(--color-c)!important;
}

.fg-d {
  color: var(--color-d)!important;
}

.bg-d {
  color: #fff;
  background-color: var(--color-d)!important;
}

.fg-e {
  color: var(--color-e)!important;
}

.bg-e {
  color: #fff;
  background-color: var(--color-e)!important;
}

.fg-f {
  color: var(--color-f)!important;
}

.bg-f {
  color: #fff;
  background-color: var(--color-f)!important;
}

.fg-h {
  color: var(--color-h)!important;
}

.bg-h {
  color: #fff;
  background-color: var(--color-h)!important;
}

.fg-n {
  color: var(--color-n)!important;
}

.bg-n {
  color: #fff;
  background-color: var(--color-n)!important;
}

.fg-x {
  color: var(--color-x)!important;
}

.bg-x {
  color: #fff;
  background-color: var(--color-x)!important;
}

.fg-y {
  color: var(--color-y)!important;
}

.bg-y {
  color: #fff;
  background-color: var(--color-y)!important;
}

.category-option[aria-pressed=true],.result-button.selected {
  border-color: transparent;
  box-shadow: none;
}

.shared-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;

  h3 {
    margin: 0;
  }
}

.maplibregl-popup-close-button.shared-close {
  position: static;
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1/1;
  padding: 0;
  line-height: 1;
}

.maplibregl-popup-content,.shared-button {
  font-family: Poppins,ui-sans-serif,sans-serif;
}

/* Przyciski akcji: wspólny wygląd, kolor z klasy bg-*. */

.action-button,.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: calc(.5rem + 0.125rem) calc(2rem + 0.0625rem);
  border: 0;
  border-radius: .5rem;
  font: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 #00000088;
}

.action-button:hover,.primary-button:hover {
  filter: brightness(.96);
}

.call-button,.show-map-button,.detail-close {
  width: 100%;
}

.show-map-button,.detail-close {
  margin-top: 10px;
}

.offline-panel .action-button {
  padding: 0.4375rem 0.625rem;
}

.map-home.action-button {
  padding: 0 0.8125rem;
}

.mobile-search-button.action-button {
  display: none;
}

@media(max-width:760px) {
  .mobile-search-button.action-button {
    display: grid;
    padding: 0;
  }

  .map-home.action-button {
    padding: 0 0.5625rem;
  }
}

.maplibregl-popup-close-button.shared-close {
  padding: 0;
}

input:focus,select:focus,textarea:focus {
  outline: none;
}

.ui-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Tekst dziedziczy rozmiar podstawowy; nagłówki i symbole mają skalę względną. */

h1 {
  font-size: 1.875rem;
}

h2,#detail-title {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.125rem;
}

.brand {
  width: 100%;
  overflow: hidden;
  background: var(--color-b);
  color: #fff;
  padding: 0.5rem;

  .logo {
    width: 2em;
    height: 2em;
  }
}

.brand-icon,.map-empty-icon {
  font-size: 2rem;
}

.empty-results>span {
  font-size: 1.75rem;
}

.map-home>span:first-child,.detail-symbol {
  font-size: 1.5rem;
}

.mobile-search-button,.maplibregl-popup-close-button.shared-close {
  font-size: 1.5rem;
}

.maplibregl-popup-content {
  font-size: 1rem;
}

@media(max-width:760px) {
  .brand small {
    display: none;
  }

  .header {
    height: auto;
  }

  .brand {
    min-width: 0;

    strong {
      line-height: 1.2;
    }
  }

  .package-state {
    white-space: normal;
    text-align: center;
  }

  .category-select summary {
    min-height: 3rem;
  }

  .detail-header #detail-title {
    font-size: 1.5rem;
  }
}

/* Menu główne */
.main-nav {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  align-self: stretch;
  background: #fff;

  .main-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border: 0;
    background: transparent;
    color: #000;
    font: inherit;
  }

  svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (min-width: 761px) {
  .header .brand {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .main-nav {
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--line);

    .main-nav-item {
      flex: 1 1 0;
      min-width: 0;
      flex-direction: column;
      gap: .25rem;
      padding: .625rem .25rem;
    }
  }
}

.app-page {
  min-height: calc(100dvh - 91px);
  background: var(--color-background);
  max-width: 600px;
  justify-self: center;

  .offline-panel {
    max-width: 60rem;
    padding: 0;
    border: 0;
  }

  .panel {
    padding: 1rem;
  }
}

.main-nav-item[aria-current="page"] {
  box-shadow: inset 0 -3px var(--color-a);
}

@media (max-width: 760px) {
  .app-page {
    min-height: calc(100dvh - 10rem);
  }
}

.main-nav .main-nav-item.update-available {

  span:after {
    content: "!";
    display: inline-flex;
    font-weight: 700;
    color: #fff;
    background: #f00;
    margin-left: 0.25rem;
    aspect-ratio: 1/1;
    height: 1.2rem;
    justify-content: center;
    align-items: center;
    border-radius: 2px;

  }
}


.app-page .offline-panel p {
  margin: 0 0 1rem;
}

.app-page .offline-panel #offline-state {
  margin-top: 1rem;
}

.info-section {
  max-width: 60rem;
}

.info-section img {
  display: block;
  max-width: 100%;
  height: auto;
}

.info-logo {
}

.info-grant-logo {
  width: 100%;
}

ui-row {
  display: flex;
  gap: 1rem;
  flex-direction: row;
}

ui-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}