/* Мегдана: приложението за хората (/megdan.html). Мобилно първо; долна лента с 4 бутона. */

:root { --t: #d8363e; --t-soft: #fbe3e1; --s: #2f9a4a; --s-soft: #e3f3e2; }
body.app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.a-main { padding-top: 22px; padding-bottom: 40px; max-width: 920px; }
.app [hidden] { display: none !important; }
.a-where { color: var(--muted); font-weight: 500; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-small { font-size: 15px; margin-top: 8px; }
.a-h1 { font-family: var(--serif); font-weight: 800; font-size: 30px; margin-bottom: 14px; }
.a-h2 { font-family: var(--serif); font-size: 22px; margin: 30px 0 12px; }
.a-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.k-f textarea { font: 400 16px 'Rubik', sans-serif; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #d9cfc0; background: #fff; color: var(--ink); width: 100%; resize: vertical; }
.k-f textarea:focus { outline: 0; border-color: var(--red); }

/* bottom navigation (desktop: in the header) */
.a-nav { display: flex; gap: 6px; }
.a-nav a { position: relative; display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--muted); font-weight: 500; padding: 9px 14px; border-radius: 999px; }
.a-nav a.on { background: var(--paper); color: var(--ink); }
.a-nav a[data-nav="nov"] { color: var(--red); }
.a-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
@media (max-width: 760px) {
  /* backdrop-filter would make the header the containing block of the fixed bottom bar */
  .app header { backdrop-filter: none; background: var(--bg); }
  .bar { height: 60px; gap: 14px; }
  .logo { font-size: 30px; }
  .a-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid rgba(29, 27, 24, .1); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .a-nav a { flex-direction: column; gap: 2px; font-size: 15px; padding: 6px 4px; flex: 1; border-radius: 12px; }
  .a-nav a .i { width: 26px; height: 26px; }
  .a-nav a.on { background: var(--bg); }
  .a-dot { right: calc(50% - 18px); }
}
@media (min-width: 761px) { body.app { padding-bottom: 0; } }

/* filters */
.a-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.a-seg { display: inline-flex; background: var(--paper); border-radius: 999px; padding: 4px; }
.a-seg button { border: 0; background: transparent; font: 500 15px 'Rubik', sans-serif; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.a-seg button.on { background: var(--ink); color: #fff; }
.a-seg button.t.on { background: var(--t); }
.a-seg button.s.on { background: var(--s); }
.a-select { font: 500 15px 'Rubik', sans-serif; padding: 9px 12px; border-radius: 999px; border: 0; background: var(--paper); color: var(--ink); }

/* Чардак cards */
.a-list { display: flex; flex-direction: column; gap: 12px; }
.a-card { background: var(--paper); border-radius: 18px; padding: 16px 18px; border-left: 6px solid var(--s); }
.a-card.tarsya { border-left-color: var(--t); }
.a-card .top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; color: var(--muted); }
.a-tag { font-weight: 700; font-size: 15px; padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--s); }
.a-card.tarsya .a-tag { background: var(--t); }
.a-urgent { font-weight: 700; font-size: 15px; padding: 3px 10px; border-radius: 999px; background: #fff1c9; color: #7a5a00; }
.a-card h3 { font-size: 19px; margin: 8px 0 4px; line-height: 1.3; }
.a-card p.body { white-space: pre-line; color: #3b362f; }
.a-card .by { font-size: 15px; color: var(--muted); margin-top: 8px; }
.a-card .act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.a-card .btn { padding: 10px 18px; font-size: 15px; }
.a-ask { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.a-ask textarea { font: 400 16px 'Rubik', sans-serif; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #d9cfc0; width: 100%; }
.a-empty { background: var(--paper); border-radius: 18px; padding: 26px; text-align: center; color: var(--muted); }
.a-empty .btn { margin-top: 14px; }

/* news from читалище / кметство */
.a-news { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.a-post { background: #fff1c9; border-radius: 16px; padding: 14px 16px; }
.a-post .from { font-size: 15px; color: #7a5a00; font-weight: 600; }
.a-post h3 { font-size: 17px; margin: 4px 0; }
.a-post p { font-size: 15px; white-space: pre-line; }
.a-post .btn { margin-top: 10px; padding: 9px 16px; font-size: 15px; }
.a-support { font-size: 15px; color: var(--muted); }

/* new Чардак form */
.a-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a-sides label { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 16px; border: 2px solid #d9cfc0; background: #fff; cursor: pointer; }
.a-sides input { position: absolute; opacity: 0; pointer-events: none; }
.a-sides b { font-size: 20px; }
.a-sides span { font-size: 15px; color: var(--muted); }
.a-sides label.t:has(input:checked) { border-color: var(--t); background: var(--t-soft); }
.a-sides label.s:has(input:checked) { border-color: var(--s); background: var(--s-soft); }
.a-sides label.t b { color: var(--t); }
.a-sides label.s b { color: #1f6e34; }
.a-sides label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.a-templates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.a-templates button { border: 1.5px solid #d9cfc0; background: #fff; border-radius: 999px; padding: 7px 13px; font: 500 14px 'Rubik', sans-serif; cursor: pointer; }
.a-templates button:hover { border-color: var(--ink); }
.a-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.a-kinds label { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #d9cfc0; border-radius: 12px; padding: 9px 14px; cursor: pointer; font-weight: 500; }
.a-kinds label:has(input:checked) { border-color: var(--ink); }
.a-kinds small { color: var(--muted); font-weight: 400; }
.a-112 { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--red-dark); }

/* Моят принос */
.a-offers { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.a-offer { display: grid; grid-template-columns: 1.1fr 2fr auto; gap: 8px; align-items: center; }
.a-offer select, .a-offer input { font: 400 15px 'Rubik', sans-serif; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #d9cfc0; background: #fff; width: 100%; min-width: 0; }
.a-offer button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 10px; }
.a-offer button:hover { background: var(--red-soft); color: var(--red-dark); }
.a-add { align-self: flex-start; border: 1.5px dashed #b9ad9b; background: transparent; border-radius: 12px; padding: 9px 14px; font: 500 15px 'Rubik', sans-serif; cursor: pointer; color: var(--ink); }
@media (max-width: 640px) { .a-offer { grid-template-columns: 1fr auto; } .a-offer select { grid-column: 1 / -1; } }

/* missions */
.a-mi { display: block; text-decoration: none; background: var(--paper); border-radius: 18px; padding: 14px 18px; }
.a-mi .top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--muted); }
.a-mi h3 { font-size: 17px; margin: 4px 0 2px; }
.a-mi .last { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-mi.wait { box-shadow: inset 0 0 0 2px var(--red); }
.a-st { font-weight: 600; font-size: 15px; padding: 2px 10px; border-radius: 999px; background: #efe8dc; color: var(--ink); white-space: nowrap; }
.a-st.active, .a-st.requested { background: #fff1c9; color: #7a5a00; }
.a-st.done { background: var(--green-soft); color: #1f6e34; }
.a-back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.a-mhead h2 { font-family: var(--serif); font-size: 22px; margin: 6px 0; }
.a-mhead .k-f { margin-top: 10px; }
.a-mhead .btn { margin-top: 10px; }
.a-hours { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.a-hours label { border: 1.5px solid #d9cfc0; background: #fff; border-radius: 999px; padding: 6px 13px; cursor: pointer; font-weight: 500; }
.a-hours input { position: absolute; opacity: 0; pointer-events: none; }
.a-hours label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.a-hours label:has(input:focus-visible) { outline: 3px solid var(--red); }
.a-chat { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.a-msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: var(--paper); white-space: pre-line; word-break: break-word; }
.a-msg.mine { align-self: flex-end; background: var(--ink); color: #fff; }
.a-msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 15px; text-align: center; padding: 2px 8px; }
.a-msg time { display: block; font-size: 15px; opacity: .8; margin-top: 2px; }
.a-say { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; gap: 8px; background: var(--bg); padding: 8px 0; }
@media (min-width: 761px) { .a-say { bottom: 0; } }
.a-say textarea { flex: 1; font: 400 16px 'Rubik', sans-serif; padding: 12px 14px; border-radius: 16px; border: 1.5px solid #d9cfc0; resize: none; max-height: 140px; }
.a-say .btn { padding: 0 18px; }

/* House */
.a-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.a-grid > div { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { .a-grid { grid-template-columns: 1fr; } }
.a-burkan .title { font-family: 'Lobster', cursive; font-size: 30px; color: var(--red); }
.a-burkan .big { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0; }
.a-burkan .big > div { flex: 1; min-width: 110px; }
.a-burkan .big b { display: block; font-family: var(--serif); font-size: 38px; line-height: 1; }
.a-burkan .big span { color: var(--muted); font-size: 15px; }
.a-co2 dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin-top: 8px; }
.a-co2 dt { color: var(--muted); }
.a-co2 dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.a-co2 .proto { font-size: 15px; color: var(--muted); margin-top: 10px; }
.a-del { margin-top: 18px; }
.a-del summary { cursor: pointer; color: var(--red-dark); font-weight: 500; }
.a-del form { margin-top: 8px; }

/* Мегданът: списък вляво, илюстрована карта вдясно (на телефон: картата отгоре) */
.a-main.wide { max-width: 1280px; }
.a-seg .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.a-seg .t .dot { background: var(--t); }
.a-seg .s .dot { background: var(--s); }
.a-seg button.on .dot { background: #fff; }
.a-near { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--paper); border-radius: 999px; padding: 9px 14px; font: 500 15px 'Rubik', sans-serif; color: var(--ink); cursor: pointer; max-width: 100%; }
.a-near span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-near .i { color: var(--red); flex: none; }
.a-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.a-cats button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #d9cfc0; background: var(--paper); border-radius: 999px; padding: 7px 13px; font: 500 14px 'Rubik', sans-serif; color: var(--ink); cursor: pointer; }
.a-cats button i { font-style: normal; font-size: 17px; line-height: 1; }
.a-cats button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-gps { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; background: #fff1c9; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.a-gps p { font-size: 15px; color: #5c4c22; margin-top: 2px; }
.a-gps .a-row { margin-top: 0; }
.a-gps .btn { padding: 10px 16px; font-size: 15px; }
.a-mapwrap { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
.a-mlist { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px; }
.a-map { position: sticky; top: 90px; height: calc(100vh - 150px); min-height: 420px; border-radius: 22px; overflow: hidden; background: #efe2c9; box-shadow: 0 1px 0 rgba(29, 27, 24, .06); }
.a-nomap { padding: 30px; text-align: center; color: var(--muted); }
.a-card { cursor: default; transition: box-shadow .15s; }
.a-card[data-card] { cursor: pointer; }
.a-card.on { box-shadow: 0 0 0 3px var(--ink); }
.a-num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--s); color: #fff; font-size: 15px; }
.a-card.tarsya .a-num { background: var(--t); }
.a-waze { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #2a6fb0; text-decoration: none; font-weight: 500; }
.a-waze:hover { text-decoration: underline; }
.a-find { margin-top: 10px; padding: 9px 16px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .a-mapwrap { grid-template-columns: 1fr; }
  .a-map { position: relative; top: 0; order: -1; height: 56vh; min-height: 320px; }
  .a-mlist { max-height: none; overflow: visible; padding-right: 0; }
  .a-filters .a-seg { max-width: 100%; overflow-x: auto; }
  .a-seg button { padding: 8px 11px; }
}

/* пинове на картата */
.a-mk { border: 0; padding: 0; cursor: pointer; font: 600 13px 'Rubik', sans-serif; }
.a-pin { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--s), 0 4px 10px rgba(40, 30, 20, .28); display: grid; place-items: center; }
.a-pin.t { box-shadow: 0 0 0 3px var(--t), 0 4px 10px rgba(40, 30, 20, .28); }
.a-pin i { font-style: normal; font-size: 22px; line-height: 1; }
.a-pin b { position: absolute; top: -8px; right: -8px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--s); color: #fff; font-size: 12px; display: grid; place-items: center; border: 2px solid #fff; }
.a-pin.t b { background: var(--t); }
.a-pin.urgent::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--t); animation: a-ring 1.6s ease-out infinite; }
@keyframes a-ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .a-pin.urgent::after { animation: none; } }
.a-pin.on { transform: scale(1.18); z-index: 2; }
.a-mk-group { display: inline-flex; align-items: center; gap: 7px; background: #fff; border-radius: 999px; padding: 5px 12px 5px 5px; box-shadow: 0 4px 10px rgba(40, 30, 20, .25); color: var(--ink); white-space: nowrap; }
.a-mk-group b { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; padding: 0 6px; }
.a-mk-group.t b { background: var(--t); }
.a-mk-group.s b { background: var(--s); }
.a-mk-group.ts b { background: linear-gradient(90deg, var(--t) 50%, var(--s) 50%); }
.maplibregl-ctrl-attrib { font-size: 11px; }
.ik { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.a-pin .ik { width: 26px; height: 26px; }
.a-cats .ik { width: 19px; height: 19px; }

/* Благодарности */
.a-thank { margin: 10px 0; padding: 10px 14px; border-left: 4px solid var(--green, #3c8a3e); background: #f7f1e3; border-radius: 0 10px 10px 0; font-size: 17px; }
.a-thank.mine { border-left-color: #c98b1a; }
.a-thank.off { opacity: .55; }
.a-thank cite { display: block; margin-top: 4px; font-style: normal; font-size: 15px; color: var(--muted); }
.a-thank .a-link { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; font: inherit; font-size: 15px; cursor: pointer; }
.a-thankform textarea { width: 100%; resize: vertical; }

/* Нива на доверие */
.a-lvl { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 99px; background: #efe6d2; color: #574830; font-size: 15px; font-weight: 600; white-space: nowrap; }
.a-lvl.ok { background: #e3f1e4; color: #1f6e34; }
.a-lvl .i, .a-only .i, .a-levels .i { width: 14px; height: 14px; }
.a-only { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 15px; color: #1f6e34; font-weight: 600; }
.a-levels { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.a-levels li { padding: 8px 12px; border-radius: 10px; border: 1px solid #e6dcc6; opacity: .85; }
.a-levels li.on { opacity: 1; border-color: #1f6e34; background: #f1f8f0; }
.a-levels b { display: flex; align-items: center; gap: 5px; }
.a-levels span { font-size: 15px; color: var(--muted); }
.a-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.a-code b { font: 700 30px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 4px; padding: 8px 14px; background: #fff; border: 2px dashed #1f6e34; border-radius: 10px; }
.a-code span { font-size: 15px; color: var(--muted); flex: 1; min-width: 160px; }
.a-vuln { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6dcc6; }

/* Едри букви (опростен режим) — бутонът в горната лента */
.a-simple { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #d9cfc0; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 500 14px 'Rubik', sans-serif; cursor: pointer; white-space: nowrap; }
.a-simple b { font: 800 17px/1 var(--serif); }
.a-simple[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 760px) { .a-simple span { display: none; } }

/* Опростен режим за възрастни хора: всичко по-едро, само най-важното.
   Скрити: картата, филтрите за км и категории, автомобилът, нивата на доверие. */
body.simple .a-main { zoom: 1.22; }
body.simple .a-nav a { font-size: 15px; }
body.simple .a-nav a .i { width: 30px; height: 30px; }
body.simple .a-map, body.simple #m-kmdrop, body.simple #m-near, body.simple #m-cat, body.simple #f-car,
body.simple .a-levels, body.simple .a-waze { display: none !important; }
body.simple .a-mapwrap, body.simple .a-board { grid-template-columns: 1fr; }
body.simple .a-mlist { max-height: none; overflow: visible; }
body.simple .btn { min-height: 52px; }
body.simple .a-card h3 { font-size: 21px; }
body.simple .a-card .by, body.simple .a-small { font-size: 15px; }
body.simple .a-msg { font-size: 18px; }
@media (max-width: 760px) {
  body.simple { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  body.simple .a-nav a { font-size: 15px; }
}

/* GPS при регистрация */
.a-found { margin-top: 8px; font-size: 15px; color: #1f6e34; font-weight: 500; }
.a-found:empty { display: none; }

/* Съвпадения */
.a-match { background: var(--paper); border-radius: 22px; padding: 16px 18px; margin-bottom: 16px; border: 2px solid #e8c766; }
.a-match h2 { font-family: var(--serif); font-size: 22px; }
.a-match .a-list { margin-top: 12px; }
.a-why { margin-top: 6px; font-size: 15px; color: #8a6412; font-weight: 600; }

/* Известия */
.a-on { display: flex; align-items: center; gap: 8px; color: #1f6e34; font-weight: 600; }
.a-on .i { width: 20px; height: 20px; }
.a-nset { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6dcc6; display: grid; gap: 8px; }
.a-nset select { font: 500 15px 'Rubik', sans-serif; padding: 4px 8px; border-radius: 8px; border: 1.5px solid #d9cfc0; background: #fff; margin-left: 4px; }
.a-quiet { font-size: 15px; }

/* Сигнал, значка 🎓, „последно помогна“, скрито от модератор */
.a-link { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.a-rep { min-height: 44px; padding: 0 6px; font-size: 15px; margin-left: auto; }
.a-mhead .a-rep { margin-left: 6px; }
.a-acad { margin-top: 6px; font-size: 15px; font-weight: 600; color: #2b4a7a; }
.a-last { white-space: nowrap; }
.a-hidden { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: #fff1c9; color: #5c4400; font-size: 15px; font-weight: 500; }
.a-acadbox .big b { font-size: 34px; }
.a-acadbox form { margin-top: 6px; }
.a-acadreg { margin-top: 22px; border: 1.5px solid #d9cfc0; border-radius: 14px; padding: 10px 14px; background: #fff; }
.a-acadreg summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.a-acadreg small { font-weight: 400; }
.a-rec { margin-top: 20px; padding-top: 14px; border-top: 1px solid #e6dcc6; }
.a-rec h3 { font-size: 18px; }

/* Здравна бележка в новия Чардак */
.a-health { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #e8f0fa; color: #1f3d66; font-size: 16px; border-left: 4px solid #2a6fb0; }

/* Речник „Какво значи?“ */
.a-gloss { background: var(--paper); border-radius: 16px; padding: 4px 16px; margin-bottom: 14px; }
.a-gloss summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.a-gloss dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 4px 0 12px; font-size: 16px; }
.a-gloss dt { font-weight: 700; }
.a-gt { color: var(--t); }
.a-gs { color: #1f6e34; }

/* Кратко съобщение долу (toast) */
.a-toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60; max-width: min(92vw, 520px);
  background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 14px; font-size: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.a-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 761px) { .a-toast { bottom: 28px; } }
@media (prefers-reduced-motion: reduce) { .a-toast { transition: none; } }

/* Няма връзка */
.a-off { position: sticky; top: 0; z-index: 40; background: #5c4400; color: #fff; text-align: center; padding: 8px 14px; font-size: 15px; font-weight: 500; }

/* Прозорци (<dialog>) */
.a-dlg { border: 0; border-radius: 20px; padding: 22px; width: min(92vw, 480px); max-height: 90vh; overflow: auto; background: var(--paper); color: var(--ink); font-size: 17px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.a-dlg[open]:not(:modal) { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 70; margin: 0; }
.a-dlg::backdrop { background: rgba(29, 27, 24, .45); }
.a-dlg h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 8px; }
.a-dlg p { margin-top: 8px; }
.a-dlg .a-row { margin-top: 16px; }
.a-dlgmsg { font-size: 18px; }
.a-rcode { font: 700 26px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; text-align: center; padding: 12px; background: #fff; border: 2px dashed #1f6e34; border-radius: 12px; word-break: break-all; user-select: all; }
.a-copied { color: #1f6e34; font-weight: 500; min-height: 1.2em; }
.a-reasons { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.a-reasons legend { margin-bottom: 4px; font-size: 15px; }
.a-reasons label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1.5px solid #d9cfc0; border-radius: 12px; background: #fff; cursor: pointer; }
.a-reasons label:has(input:checked) { border-color: var(--ink); }
.a-reasons input { width: 20px; height: 20px; accent-color: var(--red); }

/* ── Четливост: по-тъмен второстепенен текст, нищо под 15px, бутони поне 44px ── */
body.app { --muted: #524b43; }
.app .k-card h2 small, .app .k-small { font-size: 15px; }
@media (max-width: 760px) {
  .a-nav a { font-size: 15px; padding: 6px 2px; line-height: 1.15; text-align: center; }
}
.app .btn, .a-seg button, .a-cats button, .a-templates button, .a-hours label, .a-kinds label, .a-simple, .a-near, .a-add, .a-find, .a-waze, .a-back { min-height: 44px; }
.a-offer button { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.a-offer select, .a-offer input, .a-nset select { min-height: 44px; }
.a-thank .a-link { min-height: 44px; }
.app .k-agree { min-height: 44px; }
.app .k-agree input { width: 22px; height: 22px; margin-top: 1px; }
.a-del summary { min-height: 44px; display: flex; align-items: center; }

/* Форум */
.a-fhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.a-fhead .a-h1 { margin-bottom: 6px; }
.a-fnew { margin: 14px 0; }
#v-forum > .k-muted { margin-bottom: 14px; }
.a-fpost { background: var(--paper); border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; }
.a-fpost .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 15px; color: var(--muted); }
.a-fpost h2 { font-size: 22px; margin: 6px 0 8px; }
.a-fpost .txt { white-space: pre-line; word-break: break-word; }
.a-fpost .acts { display: flex; gap: 14px; margin-top: 8px; font-size: 15px; }
.a-fpost.hid { opacity: .7; }
.a-freplies { margin-left: 14px; }
.a-fint { display: inline-block; font-size: 14px; background: var(--bg); border-radius: 999px; padding: 2px 10px; }

/* Мегдан: категориите са колона отляво (5 + „Други“), разстоянието е един бутон. */
.a-board { display: grid; grid-template-columns: 228px 1fr; gap: 16px; align-items: start; }
.a-board .a-cats { position: sticky; top: 90px; flex-direction: column; overflow: visible; gap: 4px; margin: 0; padding: 10px; background: var(--paper); border-radius: 20px; box-shadow: 0 6px 18px rgba(60, 40, 20, .07); border-top: 5px solid var(--red); }
.a-board .a-cats > button, .a-catmore summary, .a-catmore button { width: 100%; justify-content: flex-start; border: 0; border-radius: 12px; padding: 9px 12px; text-align: left; background: transparent; font: 500 15px 'Rubik', sans-serif; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 9px; min-height: 44px; }
.a-board .a-cats > button:hover, .a-catmore summary:hover, .a-catmore button:hover { background: #f3eadb; }
.a-board .a-cats button.on, .a-catmore.on > summary { background: var(--ink); color: #fff; }
.a-catmore summary { list-style: none; }
.a-catmore summary::-webkit-details-marker { display: none; }
.a-catmore summary::after { content: '▾'; margin-left: auto; font-size: 13px; opacity: .7; }
.a-catmore[open] summary::after { content: '▴'; }
.a-catmore > button { padding-left: 22px; }
.a-all { font-style: normal; display: inline-grid; place-items: center; width: 19px; font-size: 16px; line-height: 1; }
.a-cats button span, .a-catmore summary span { overflow: hidden; text-overflow: ellipsis; }

.a-drop { position: relative; }
.a-drop summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 999px; padding: 9px 16px; font: 500 15px 'Rubik', sans-serif; color: var(--muted); cursor: pointer; min-height: 44px; }
.a-drop summary b { color: var(--ink); }
.a-drop summary::-webkit-details-marker { display: none; }
.a-drop summary::after { content: '▾'; font-size: 13px; }
.a-dropmenu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; display: flex; flex-direction: column; min-width: 190px; padding: 6px; background: var(--paper); border-radius: 16px; box-shadow: 0 12px 30px rgba(40, 30, 20, .18); }
.a-dropmenu button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 10px; font: 500 15px 'Rubik', sans-serif; color: var(--ink); cursor: pointer; min-height: 44px; }
.a-dropmenu button:hover { background: #f3eadb; }
.a-dropmenu button.on { background: var(--ink); color: #fff; }

.a-mk-group em { font-style: normal; display: inline-flex; gap: 2px; }
.a-mk-group em .ik { width: 18px; height: 18px; }

/* по-топъл вид: карти със сянка, филтри като пилюли със сянка */
.a-card, .a-empty, .a-seg, .a-near, .a-drop summary, .a-gloss, .a-match, .a-fpost { box-shadow: 0 4px 14px rgba(60, 40, 20, .07); }
.a-card:hover { box-shadow: 0 8px 22px rgba(60, 40, 20, .12); }
.a-map { box-shadow: 0 8px 26px rgba(60, 40, 20, .12); border: 4px solid var(--paper); }

@media (max-width: 1100px) {
  .a-board .a-mapwrap { grid-template-columns: 1fr; }
  .a-board .a-map { position: relative; top: 0; order: -1; height: 52vh; min-height: 320px; }
  .a-board .a-mlist { max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 760px) {
  .a-board { grid-template-columns: 1fr; }
  .a-board .a-cats { position: static; flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .a-board .a-cats > button, .a-catmore summary { width: auto; padding: 7px 12px; font-size: 14px; }
  .a-catmore { display: flex; flex-wrap: wrap; gap: 4px; }
  .a-catmore[open] { flex-basis: 100%; }
  .a-catmore[open] > summary { flex-basis: 100%; }
  .a-catmore[open] > button { width: auto; padding: 7px 12px; font-size: 14px; background: #f3eadb; }
  .a-dropmenu { left: auto; right: 0; }
}
