/* sangha.pl — warm paper, saffron and robe colours. No framework; one file. */

:root {
  --bg: #f5efe4;
  --bg-2: #efe6d6;
  --surface: #fffdf9;
  --ink: #2a221d;
  --ink-2: #4a3f37;
  --muted: #7a6e63;
  --line: #e5d9c6;
  --line-2: #d8c8af;
  --saffron: #d9822b;
  --saffron-2: #c06a17;
  --saffron-soft: #fbe9d3;
  --robe: #7a2e1f;
  --robe-2: #5e2216;
  --forest: #4f7a5a;
  --ok: #3f7a4f;
  --ok-soft: #e3f0e4;
  --warn: #9a6a12;
  --warn-soft: #fbefcf;
  --bad: #9b2f22;
  --bad-soft: #f8e0dc;
  --focus: #1f6feb;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 4px 14px rgba(60, 40, 20, .06);
  --shadow-2: 0 2px 6px rgba(60, 40, 20, .08), 0 12px 32px rgba(60, 40, 20, .12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --top: 64px;
  color-scheme: light;
}

/* Self-hosted Inter: subset to Latin, Latin Extended-A and Additional (Polish and Pali diacritics).
   SIL OFL 1.1, see public/assets/fonts/. */
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--fs-body, 16px)/1.55 var(--sans);
  background-image: var(--bg-image, radial-gradient(circle at 20% -10%, #fbf3e3 0, transparent 40%), radial-gradient(circle at 110% 10%, #f6e6d0 0, transparent 35%));
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; }
a { color: var(--robe); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--saffron-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: var(--fs-xl, clamp(1.6rem, 2.6vw, 2.1rem)); margin: 0 0 .4em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-focus, 4px); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-fill, #fff); padding: 8px 14px; border-radius: var(--r-ctl, 8px); }
.skip:focus { top: 8px; color: var(--on-fill, #fff); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }

/* ---- Buttons, chips, badges ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 40px; padding: .5em 1.05em; border-radius: var(--r-pill, 999px); border: 1px solid var(--robe);
  background: var(--robe); color: var(--on-fill, #fff); font-weight: 600; font-size: var(--fs-m, .95rem); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { background: var(--robe-2); border-color: var(--robe-2); color: var(--on-fill, #fff); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-2); }
.btn--dark { background: var(--ink); border-color: var(--ink); }
.btn--small { min-height: 32px; padding: .3em .85em; font-size: var(--fs-s, .86rem); }
.btn--block { width: 100%; }
.btn--danger { background: var(--bad); border-color: var(--bad); }
.btn--dangertext { color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--robe); text-decoration: underline; cursor: pointer; }

.chip {
  display: inline-flex; align-items: center; gap: .35em; padding: .32em .8em; border-radius: var(--r-pill, 999px);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: var(--fs-m, .88rem);
}
.chip:hover { border-color: var(--saffron); color: var(--ink); }
.chip.is-on { background: var(--saffron); border-color: var(--saffron); color: var(--on-fill, #fff); }
.chip__n { font-size: .78em; opacity: .7; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: .3em; padding: .12em .6em; border-radius: var(--r-pill, 999px); font-size: var(--fs-s, .74rem); font-weight: 600;
  letter-spacing: .01em; background: var(--bg-2); color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.badge--pin { background: var(--saffron-soft); color: var(--saffron-2); }
.badge--now { background: var(--ok); color: var(--on-fill, #fff); }
.badge--new { background: var(--saffron); color: var(--on-fill, #fff); }
.badge--cancel { background: var(--bad); color: var(--on-fill, #fff); }
.badge--src { background: var(--src-bg, #e8eef4); color: var(--src-ink, #3f5a73); }
.badge--count { background: var(--saffron); color: var(--on-fill, #fff); margin-left: 2px; }
.mobilebar .badge:empty { display: none; }

.verified { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border-radius: 50%; background: var(--saffron); color: var(--on-fill, #fff); font-size: .7em; vertical-align: .1em; }
.avatar {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--avatar-bg, linear-gradient(135deg, var(--saffron), var(--robe))); color: var(--avatar-ink, #fff); font-family: var(--serif); font-weight: 700; font-size: var(--fs-m, 1.05rem);
}
.avatar--lg { width: 56px; height: 56px; font-size: var(--fs-l, 1.5rem); }

/* Category colours (one class per slug; also used as dots). */
.cat-medytacja    { --c: #b8742a; }
.cat-mowa-dhammy  { --c: #7a3b2e; }
.cat-odosobnienie { --c: #4f7a5a; }
.cat-warsztat     { --c: #3f6d8c; }
.cat-ceremonie    { --c: #a8892b; }
.cat-wsparcie     { --c: #8c4f7a; }
.cat-inne         { --c: #6f6a60; }
.badge[class*="cat-"] { background: var(--cat-bg, color-mix(in srgb, var(--c) 14%, #fff)); color: var(--cat-ink, color-mix(in srgb, var(--c) 85%, #000)); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--line-2)); }
.dot--all { background: var(--dot-all, conic-gradient(#b8742a 0 25%, #4f7a5a 0 50%, #7a3b2e 0 75%, #3f6d8c 0)); }

/* ---- Top bar ------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar-bg, rgba(255, 252, 246, .92)); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { max-width: 1440px; margin: 0 auto; height: var(--top); padding: 0 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand__name { font-family: var(--serif); font-size: var(--fs-brand, 1.5rem); font-weight: 700; letter-spacing: -.01em; }
.brand__name span { color: var(--saffron); }
.brand__tag { font-size: var(--fs-s, .78rem); color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; }
.topsearch { flex: 1; max-width: 520px; display: flex; position: relative; }
.topsearch input {
  width: 100%; height: 42px; border-radius: var(--r-pill, 999px); border: 1px solid var(--line-2); background: var(--surface);
  padding: 0 46px 0 18px;
}
.topsearch input:focus { border-color: var(--saffron); outline: none; box-shadow: 0 0 0 3px var(--saffron-soft); }
.topsearch button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--saffron); color: var(--on-fill, #fff); cursor: pointer; display: grid; place-items: center; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: var(--fs-m, .94rem); }
.topnav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.topnav a:not(.btn):hover { color: var(--robe); }
.topnav__login { border: 1px solid var(--line-2); border-radius: var(--r-pill, 999px); padding: .38em .95em; }

/* ---- Family strip (sites of the sangha.pl family) ---- */
.family { background: var(--family-bg, var(--bg-2)); color: var(--family-ink, var(--ink-2)); font-size: var(--fs-s, .78rem); line-height: 1.3; border-bottom: 1px solid var(--family-line, var(--line)); }
.family__in { max-width: 1440px; margin: 0 auto; padding: 4px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 18px; }
.family ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.family a { color: inherit; text-decoration: none; }
.family a:hover { color: var(--family-hover, var(--ink)); text-decoration: underline; }
.family [aria-current] { color: var(--family-current, var(--ink)); font-weight: 600; }

/* ---- Wall layout ---------------------------------------------------------- */
.wall {
  max-width: 1440px; margin: 0 auto; padding: 22px 20px 40px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr) 360px; gap: 26px; align-items: start;
}
.col--left, .col--right { position: sticky; top: calc(var(--top) + 18px); max-height: calc(100vh - var(--top) - 30px); overflow: auto; scrollbar-width: thin; }
.col--right { display: flex; flex-direction: column; gap: 16px; padding-bottom: 6px; }
.col--main { min-width: 0; }
.mobilebar, .sheet-backdrop, .sheet-close, .sheet-foot { display: none; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 18px; padding-right: 4px; }
.sidesearch input { width: 100%; height: 40px; padding: 0 14px; border-radius: var(--r-ctl, 10px); border: 1px solid var(--line-2); background: var(--surface); }
.sidesearch { display: none; }
.facet__title { font-family: var(--sans); font-size: var(--fs-s, .74rem); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.facet__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.facet__opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-ctl, 9px); color: var(--ink-2); text-decoration: none; }
.facet__opt:hover { background: var(--bg-2); color: var(--ink); }
.facet__opt.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--c, var(--saffron)), var(--shadow); }
.facet__opt.is-empty { opacity: .45; }
.facet__label { flex: 1; }
.facet__n { font-size: var(--fs-s, .8rem); color: var(--muted); font-variant-numeric: tabular-nums; }
.where { display: grid; grid-template-columns: 1fr; gap: 6px; }
.where select { height: 38px; border-radius: var(--r-ctl, 9px); border: 1px solid var(--line-2); background: var(--surface); padding: 0 8px; min-width: 0; }
.range { margin-top: 8px; }
.range summary { cursor: pointer; font-size: var(--fs-s, .86rem); color: var(--ink-2); padding: 2px 0; width: max-content; }
.range summary:hover { color: var(--ink); }
.range__form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.range__field { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-s, .78rem); color: var(--muted); min-width: 0; }
.range__field input { height: 36px; border-radius: var(--r-ctl, 9px); border: 1px solid var(--line-2); background: var(--surface); padding: 0 6px; min-width: 0; width: 100%; font: inherit; font-size: var(--fs-s, .86rem); color: var(--ink); }
.range__go { grid-column: 1 / -1; justify-self: start; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-m, .9rem); }
.links span { display: block; color: var(--muted); font-size: var(--fs-s, .82rem); }

/* Feed head */
.feedhead { margin-bottom: 16px; }
.feedhead__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feedhead__count { margin: 0; color: var(--ink-2); }
.feedhead__count strong { font-family: var(--serif); font-size: var(--fs-l, 1.25rem); color: var(--ink); }
.sort { display: inline-flex; background: var(--bg-2); border-radius: var(--r-pill, 999px); padding: 3px; }
.sort__opt { padding: .3em .9em; border-radius: var(--r-pill, 999px); color: var(--ink-2); text-decoration: none; font-size: var(--fs-m, .88rem); }
.sort__opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.activechips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.activechip { display: inline-flex; align-items: center; gap: 6px; padding: .3em .55em .3em .85em; border-radius: var(--r-pill, 999px); background: var(--ink-2); color: var(--on-fill, #fff); text-decoration: none; font-size: var(--fs-s, .86rem); }
.activechip:hover { background: var(--robe); color: var(--on-fill, #fff); }
.activechip span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--activechip-x, rgba(255, 255, 255, .2)); font-size: .9em; }
.activechip--clear { background: transparent; color: var(--robe); border: 1px dashed var(--line-2); }
.activechip--clear:hover { background: var(--bg-2); color: var(--robe); }
.orghead { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.orghead__name { margin: 0 0 4px; font-size: var(--fs-l, 1.3rem); }
.orghead__bio { margin: 0 0 4px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line, #ecd9a3); padding: 12px 16px; border-radius: var(--radius-s); }
.section-title { font-size: var(--fs-l, 1.15rem); margin: 26px 0 12px; color: var(--ink-2); }

/* Focus (permalink) */
.focus { margin-bottom: 8px; }
.focus__bar { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-s, .8rem); letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-2); font-weight: 700; margin-bottom: 8px; }
.focus__close { text-decoration: none; font-size: 1.4rem; line-height: 1; color: var(--muted); padding: 0 6px; }
.focus .card { box-shadow: 0 0 0 2px var(--saffron), var(--shadow-2); }

/* ---- Cards --------------------------------------------------------------- */
.cards { display: flex; flex-direction: column; gap: 22px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 16px; overflow: hidden; }
.card.is-pinned { box-shadow: inset 0 3px 0 var(--saffron), var(--shadow); }
.card.is-cancelled .card__title a, .card.is-cancelled .card__facts strong { text-decoration: line-through; text-decoration-color: var(--cancel-strike, rgba(155, 47, 34, .5)); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card__org { display: flex; align-items: center; gap: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-m, .94rem); min-width: 0; }
.card__org:hover .card__orgname { text-decoration: underline; }
.card__badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card__title { margin: 0 0 12px; font-size: var(--fs-l, clamp(1.25rem, 2vw, 1.5rem)); }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--robe); }
.card__main { display: flex; align-items: flex-start; gap: 18px; }
.card__text { flex: 1 1 auto; min-width: 0; }
.card__thumb { flex: 0 0 clamp(96px, 27%, 180px); display: block; aspect-ratio: 1; border-radius: var(--r-ctl, 12px); overflow: hidden; background: var(--bg-2); }
.card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__thumb--lg { flex-basis: clamp(120px, 36%, 240px); }
.card.is-cancelled .card__thumb img { filter: grayscale(.85); opacity: .7; }
.card__facts { margin: 0 0 12px; display: grid; gap: 6px; }
.fact { display: flex; gap: 10px; align-items: baseline; }
.fact dt { flex: none; color: var(--saffron-2); transform: translateY(2px); }
.fact dd { margin: 0; color: var(--ink-2); }
.fact dd a { color: inherit; }
.card__cancel { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.card__body { color: var(--ink-2); }
.card__body p { margin: 0 0 .7em; }
.card__body ul { margin: 0 0 .7em; padding-left: 1.2em; }
.card__body a { word-break: break-word; }
.js .card__body.is-long:not(.is-open) { max-height: 7.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.card__more { background: none; border: 0; padding: 4px 0; color: var(--robe); font-weight: 600; cursor: pointer; }
.card__more:hover { color: var(--saffron-2); text-decoration: underline; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn--edit { margin-left: auto; }
.more { text-align: center; margin: 26px 0 0; }
.more__n { font-weight: 400; color: var(--muted); }
.empty { text-align: center; background: var(--surface); border-radius: var(--radius); padding: 40px 20px; box-shadow: var(--shadow); }
.empty img { opacity: .6; }
.empty h2 { margin: 10px 0 6px; }
.empty p { color: var(--muted); margin: 0 0 16px; }

/* ---- Right column panels ------------------------------------------------- */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 16px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.panel__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-l, 1.08rem); }
.forum { background: var(--forum-bg, linear-gradient(160deg, #5a4135, #433932)); color: var(--forum-ink, #f3e9dc); } /* 10 points lighter than the first design (O-09) */
.forum .panel__title { color: var(--forum-title, #fff); margin-bottom: 10px; }
.forum :focus-visible { outline-color: var(--forum-focus, #fff); } /* the default ring is too faint on the dark box */
.forum__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.forum__room { padding: 8px 0; border-top: 1px solid var(--forum-line, rgba(255, 255, 255, .1)); }
.forum__room:first-child { border-top: 0; padding-top: 0; }
.forum__name { color: var(--forum-accent, #f6c48a); font-weight: 700; text-decoration: none; font-size: var(--fs-m, .92rem); }
.forum__name:hover { color: var(--forum-title, #fff); }
.forum__latest { display: block; color: var(--forum-ink, #f3e9dc); text-decoration: none; margin-top: 1px; }
.forum__latest:hover .forum__thread { text-decoration: underline; }
.forum__thread { display: block; font-size: var(--fs-m, .88rem); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum__meta { display: block; font-size: var(--fs-s, .76rem); color: var(--forum-meta, #c8b8a7); margin-top: 1px; } /* ≥ 4.5:1 on the gradient */
.map__tools { display: flex; gap: 6px; }
.pill { font-size: var(--fs-s, .78rem); padding: .25em .7em; border-radius: var(--r-pill, 999px); border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; background: var(--surface); white-space: nowrap; }
.pill:hover, .pill[aria-current] { border-color: var(--saffron); color: var(--saffron-2); }
.pill[aria-current] { background: var(--saffron-soft); }
.map__canvas {
  --sea: #d9e3e1; --sea-line: #b7cac8; --land: #ebe4d6; --land-line: #d3c7b3;
  --pl: #fffaf1; --pl-line: #a8835f; --woj: #d9c6a8; --river: #a9c3c4;
  --mk-fill: #d9822b; --mk-stroke: #ffffff; --mk-fill-on: #7a2e1f; --mk-stroke-on: #5e2216; --mk-opacity: .82; --mk-ring: #7a2e1f; /* markers (app.js) */
  height: 300px; border-radius: var(--r-ctl, 10px); overflow: hidden; background: var(--sea); position: relative; z-index: 0;
}
.map__noscript { padding: 16px; color: var(--muted); }
.map__canvas.leaflet-container { font: inherit; background: var(--sea); } /* leaflet.css loads later */
/* Vector basemap (public/assets/map/poland.json); CSS wins over Leaflet's SVG attributes. */
.bm-land { fill: var(--land); fill-opacity: 1; stroke: var(--land-line); stroke-width: .7; }
.bm-pl { fill: var(--pl); fill-opacity: 1; stroke: var(--pl-line); stroke-width: 1.3; stroke-linejoin: round; }
.bm-woj { fill: none; stroke: var(--woj); stroke-width: .8; stroke-dasharray: 3 2; }
.bm-lake { fill: var(--sea); fill-opacity: 1; stroke: var(--sea-line); stroke-width: .5; }
.bm-river { fill: none; stroke: var(--river); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.bm-name, .bm-city { background: none; border: 0; }
.bm-name span, .bm-city span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
}
.bm-name span { font: italic 12px/1 var(--serif); letter-spacing: .06em; color: #9c8c79; }
.bm-city span {
  transform: translate(-50%, calc(var(--r, 3px) + 3px)); font: 600 11px/1 var(--sans); color: var(--ink-2);
  text-shadow: 0 0 2px var(--pl), 0 0 2px var(--pl), 0 0 3px var(--pl);
}
.bm-city:not(.bm-city--ev)::before {
  content: ""; position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--pl-line);
}
.map__canvas:not(.map--near) .bm-city, .bm-city.is-dup { display: none; }
.bm-name.is-clipped, .bm-city.is-clipped span { visibility: hidden; }
.map-label { background: transparent; border: 0; box-shadow: none; font-weight: 700; font-size: 11px; color: var(--on-fill, #fff); text-shadow: 0 0 2px rgba(0,0,0,.6); }
.leaflet-tooltip.map-tip { font: 600 12px/1.3 var(--sans); border-radius: var(--r-ctl, 8px); border: 0; box-shadow: var(--shadow-2); padding: 4px 8px; }

/* Calendar */
.cal__nav { display: flex; align-items: center; gap: 2px; }
.cal__nav a { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: var(--r-ctl, 8px); text-decoration: none; color: var(--ink-2); font-size: 1.15rem; }
.cal__nav a.cal__today { font-size: var(--fs-s, .8rem); padding: 0 8px; border: 1px solid var(--line-2); }
.cal__nav a:hover { background: var(--bg-2); }
.cal__grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal__grid th { font-size: var(--fs-xs, .7rem); color: var(--muted); font-weight: 600; padding: 2px 0 4px; }
.cal__grid td { padding: 0; height: 44px; vertical-align: top; border-radius: var(--r-ctl, 7px); background: var(--bg); position: relative; }
.cal__grid td.cal__pad { background: transparent; }
.cal__day > a, .cal__day > .cal__no { display: block; height: 100%; min-height: 44px; border-radius: var(--r-ctl, 7px); text-decoration: none; color: var(--ink-2); position: relative; overflow: hidden; }
.cal__no { font-size: var(--fs-s, .78rem); font-weight: 600; padding: 3px 5px; position: relative; z-index: 2; display: inline-block; }
.cal__day > .cal__no { padding: 3px 5px; }
.cal__day.is-past { opacity: .55; }
.cal__thumb { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cal__thumb::after { content: ""; position: absolute; inset: 0; background: var(--cal-thumb-shade, linear-gradient(180deg, rgba(30,18,10,.55), rgba(30,18,10,.15) 45%, rgba(30,18,10,.6))); }
.cal__day.has-ev a .cal__no { color: var(--on-fill, #fff); }
.cal__day.has-ev:not(:has(.cal__thumb)) a { background: var(--saffron-soft); }
.cal__day.has-ev:not(:has(.cal__thumb)) a .cal__no { color: var(--saffron-2); }
.cal__n { position: absolute; left: 4px; right: 4px; bottom: 2px; z-index: 2; font-size: var(--fs-xs, .62rem); color: var(--on-fill, #fff); font-weight: 700; white-space: nowrap; overflow: hidden; }
.cal__day.is-multi a { box-shadow: inset 0 -3px 0 var(--forest); }
.cal__day.is-today { box-shadow: 0 0 0 2px var(--saffron); }
.cal__day.is-on a { box-shadow: 0 0 0 3px var(--robe); }
.cal__day a:hover .cal__thumb { transform: scale(1.06); transition: transform .2s; }
.cal__hint { margin: 8px 0 0; font-size: var(--fs-s, .78rem); color: var(--muted); }

/* ---- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__in { max-width: 1440px; margin: 0 auto; padding: 22px 20px 30px; color: var(--ink-2); font-size: var(--fs-m, .9rem); }
.footer__in p { margin: 0 0 6px; }
.footer__small { color: var(--muted); font-size: var(--fs-s, .8rem); }

/* ---- Pages, forms, panel ------------------------------------------------- */
.page { max-width: 1180px; margin: 0 auto; padding: 26px 20px 50px; }
.page--narrow { max-width: 520px; }
.page--flash { padding-bottom: 0; }
.page--flash + .page { padding-top: 6px; }
.page--flash .alert { margin: 0; }
.page--prose { max-width: 900px; }
.lead { font-size: var(--fs-l, 1.12rem); color: var(--ink-2); }
.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 22px 0 30px; }
.prose-grid section { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.prose-grid h2 { font-size: var(--fs-l, 1.15rem); margin: 0 0 6px; }
.prose-grid p { margin: 0; color: var(--ink-2); }
.orglist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.orgcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: var(--r-ctl, 12px); padding: 10px 12px 12px; box-shadow: var(--shadow); min-width: 0; }
.orgcard__head { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.orgcard__bio { margin: 0; color: var(--ink-2); font-size: var(--fs-m, .94rem); white-space: pre-line; overflow-wrap: anywhere; }
.orgcard__web { font-size: var(--fs-s, .82rem); overflow-wrap: anywhere; }
.orglist small { color: var(--muted); }
.profilebox { max-width: 640px; }
/* Security page (two-step login, D-19) */
.box.secbox { max-width: 720px; margin: 0 0 16px; gap: 10px; }
.box.secbox > p { margin: 0; }
.box.secbox h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-l, 1.12rem); margin: 0 0 8px; }
.secbox__form { max-width: 280px; margin-top: 10px; }
.secbox__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.secbox__manual { margin-top: 10px; }
.secbox__manual summary, .authbox__more summary { cursor: pointer; color: var(--link, var(--ink)); text-decoration: underline; }
.authbox__more { margin-top: 18px; font-size: var(--fs-m, .94rem); }
.authbox__more .form { margin: 10px 0; }
.steps { padding-left: 1.4em; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.steps h3 { font-size: var(--fs-m, 1rem); margin: 0 0 4px; }
.steps p { margin: 0 0 6px; }
.qrbox { display: inline-block; background: #fff; padding: 12px; border-radius: 8px; margin: 6px 0; line-height: 0; }
.qrbox svg { display: block; width: min(220px, 62vw); height: auto; }
.keylist { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0; }
.keylist dt { color: var(--muted); }
.keylist dd { margin: 0; }
.secretkey { font-size: 1.05rem; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.recovery { columns: 2; column-gap: 24px; padding-left: 1.6em; margin: 12px 0; font-size: 1.05rem; }
.recovery li { margin: 0 0 6px; }
.recovery code { letter-spacing: .06em; }
.input--code { font-size: 1.3rem; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
@media print {
  .panelbar, .pagehead a, .secbox__actions, .topbar, .footer { display: none !important; }
}
.profilebox__name { margin: 4px 0 8px; }
.hint--count { margin: -10px 0 0; text-align: right; }
.authbox { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 28px; margin-top: 20px; }
.authbox__note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-m, .94rem); }
.authbox__note h2 { font-size: var(--fs-m, 1.05rem); margin: 0 0 4px; }
.authbox__forgot { margin: 12px 0 0; font-size: var(--fs-m, .94rem); }
.errorbox { text-align: center; background: var(--surface); border-radius: var(--radius); padding: 40px 28px; box-shadow: var(--shadow); margin-top: 30px; }
.trace { text-align: left; white-space: pre-wrap; font-size: var(--fs-s, .75rem); background: var(--bg); padding: 12px; border-radius: var(--r-ctl, 8px); overflow: auto; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: var(--fs-m, .9rem); color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
.field input:not([type=radio]):not([type=checkbox]):not([type=file]), .field select, .field textarea, .copyrow input {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: var(--r-ctl, 10px); border: 1px solid var(--line-2); background: var(--field-bg, #fff);
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--saffron); outline: none; box-shadow: 0 0 0 3px var(--saffron-soft); }
.field [aria-invalid="true"] { border-color: var(--bad) !important; background: var(--bad-field, #fff8f7) !important; }
.field__err { margin: -8px 0 0; color: var(--bad); font-size: var(--fs-s, .86rem); font-weight: 600; }
.field--inline { margin-top: 10px; }
.hint { margin: -6px 0 0; font-size: var(--fs-s, .82rem); color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { padding: 12px 16px; border-radius: var(--radius-s); margin: 0 0 16px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 1.2em; }
.alert--ok { background: var(--ok-soft); border-color: var(--ok-line, #c4dfc8); color: var(--ok-ink, #234d2e); }
.alert--info { background: var(--warn-soft); border-color: var(--warn-line, #ecd9a3); color: var(--warn-ink, #5b430e); }
.alert--error { background: var(--bad-soft); border-color: var(--bad-line, #eebfb7); color: var(--bad-ink, #6e2117); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; margin: 0; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.box > legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; font-family: var(--serif); font-size: var(--fs-l, 1.15rem); font-weight: 600; }
.box > legend + * { clear: both; }

.panelbar { background: var(--panelbar-bg, var(--ink)); color: var(--panelbar-ink, #e9ddcd); }
.panelbar__in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 48px; }
.panelnav { display: flex; gap: 4px; flex-wrap: wrap; }
.panelnav a { color: var(--panelbar-ink, #e9ddcd); text-decoration: none; padding: 12px 12px; font-size: var(--fs-m, .92rem); border-bottom: 3px solid transparent; }
.panelnav a:hover { color: var(--on-fill, #fff); }
.panelnav a[aria-current] { color: var(--on-fill, #fff); border-bottom-color: var(--saffron); }
.panelbar__out { display: flex; gap: 12px; align-items: center; font-size: var(--fs-s, .86rem); }
.panelbar__out .muted { color: var(--panelbar-muted, #b8a998); }
.panelbar .linkbtn { color: var(--forum-accent, #f6c48a); }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead p { margin: 0; }

.mylist, .modlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.myrow, .modrow { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.myrow__img { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-ctl, 9px); background: var(--bg-2); display: block; }
.myrow__img--none { background: repeating-linear-gradient(45deg, var(--bg-2) 0 8px, var(--bg) 8px 16px); }
.myrow__main, .modrow__main { flex: 1; min-width: 0; }
.myrow__title { font-family: var(--serif); font-size: var(--fs-l, 1.1rem); font-weight: 600; color: var(--ink); text-decoration: none; }
.myrow__title:hover { color: var(--robe); }
.myrow__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: var(--fs-s, .86rem); color: var(--muted); margin-top: 4px; }
.myrow__reason { margin: 6px 0 0; font-size: var(--fs-m, .88rem); color: var(--bad); }
.myrow__actions, .modrow__actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; }
.myrow__actions form, .modrow__actions form { margin: 0; }
.status { display: inline-block; padding: .1em .55em; border-radius: 6px; font-size: var(--fs-s, .76rem); font-weight: 700; }
.status--ok { background: var(--ok-soft); color: var(--ok); }
.status--warn { background: var(--warn-soft); color: var(--warn); }
.status--bad { background: var(--bad-soft); color: var(--bad); }
.status--muted { background: var(--bg-2); color: var(--muted); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl, 12px); padding: 12px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 10px; }
.modrow__img { flex: none; width: 200px; aspect-ratio: 16/10; height: auto; object-fit: cover; border-radius: var(--r-ctl, 10px); display: block; }
.modrow__title { margin: 6px 0 4px; font-size: var(--fs-l, 1.2rem); }
.modrow__title a { color: var(--ink); text-decoration: none; }
.modrow__facts { margin: 0 0 6px; font-size: var(--fs-m, .9rem); color: var(--ink-2); }
.modrow__excerpt { margin: 0; color: var(--muted); font-size: var(--fs-m, .9rem); }
.modrow__log { margin-top: 8px; font-size: var(--fs-s, .84rem); color: var(--muted); }
.modrow__log ul { margin: 6px 0 0; padding-left: 1.1em; }
.modrow__actions { flex-direction: column; align-items: stretch; width: 150px; }
.modrow__actions .btn { width: 100%; }
.tabsbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; overflow-x: auto; }
.tabsbar a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabsbar a[aria-current] { color: var(--ink); border-bottom-color: var(--saffron); font-weight: 600; }
.tabsbar__n { display: inline-block; min-width: 22px; text-align: center; font-size: var(--fs-s, .76rem); background: var(--bg-2); border-radius: var(--r-pill, 999px); padding: 0 6px; }

.evform__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.evform__main, .evform__side { display: flex; flex-direction: column; gap: 18px; }
.evform__submit { display: flex; flex-direction: column; gap: 8px; }
.upload { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: center; }
.upload input[type="file"] { max-width: 100%; }
.upload .hint { margin-top: 6px; }
.upload__preview { aspect-ratio: 1; border-radius: var(--r-ctl, 10px); overflow: hidden; background: repeating-linear-gradient(45deg, var(--bg-2) 0 8px, var(--bg) 8px 16px); display: grid; place-items: center; color: var(--muted); font-size: var(--fs-s, .8rem); }
.upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.upload__square { width: 100%; height: 100%; background-repeat: no-repeat; }
.js .nojs-only, html:not(.js) .js-only { display: none; }
/* Square crop widget (D-18) */
.cropper { margin-top: 12px; display: grid; gap: 10px; }
.cropper[hidden] { display: none; }
.cropper__help { margin: 0; font-size: var(--fs-s, .82rem); color: var(--muted); }
.cropper__stage { position: relative; justify-self: start; max-width: 100%; overflow: hidden; border-radius: var(--r-ctl, 10px); touch-action: none; user-select: none; cursor: crosshair; background: var(--bg-2); }
.cropper__stage img { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; pointer-events: none; }
.cropper__box { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, .55); box-shadow: 0 0 0 9999px rgba(20, 8, 8, .55); cursor: move; touch-action: none; }
.cropper__box:focus-visible { outline: 3px solid var(--focus, #c2410c); outline-offset: 2px; }
.cropper__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cropper__size { display: flex; align-items: center; gap: 10px; font-size: var(--fs-s, .85rem); flex: 1 1 220px; }
.cropper__size input { flex: 1; min-width: 120px; accent-color: var(--c-rust, #a0522d); }
.seg { display: flex; background: var(--bg-2); border-radius: var(--r-ctl, 12px); padding: 3px; gap: 2px; }
.seg__opt { flex: 1; position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg__opt span { display: block; text-align: center; padding: 7px 6px; border-radius: var(--r-ctl, 9px); font-size: var(--fs-m, .88rem); color: var(--ink-2); }
.seg__opt input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--focus); }
.weekdays { display: flex; gap: 4px; }
.weekdays label { flex: 1; position: relative; }
.weekdays input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.weekdays span { display: block; text-align: center; padding: 7px 0; border-radius: var(--r-ctl, 8px); border: 1px solid var(--line-2); font-size: var(--fs-s, .84rem); background: var(--field-bg, #fff); }
.weekdays input:checked + span { background: var(--saffron); border-color: var(--saffron); color: var(--on-fill, #fff); font-weight: 700; }
.weekdays input:focus-visible + span { outline: 3px solid var(--focus); }
.js [data-show-kind], .js [data-show-mode] { display: none; }
.js [data-show-kind].is-shown, .js [data-show-mode].is-shown { display: flex; }
.js .row2[data-show-mode].is-shown { display: grid; }
.js [data-show-mode] > .field { margin-bottom: 14px; }
[data-show-mode] { flex-direction: column; }

.twocol { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: var(--fs-m, .9rem); }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { font-size: var(--fs-s, .74rem); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.table__actions { text-align: right; }
.invitebox { background: var(--ok-soft); border: 1px solid var(--ok-line, #c4dfc8); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.invitebox p { margin: 0 0 8px; }
.outbox { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.outbox__name { font-size: var(--fs-m, .9rem); margin: 0 0 6px; color: var(--muted); }
.outbox__text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: var(--fs-m, .88rem); }
.copyrow { display: flex; gap: 8px; }
.copyrow input { font-family: var(--mono); font-size: var(--fs-s, .82rem); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--on-fill, #fff); padding: 10px 18px; border-radius: var(--r-pill, 999px); box-shadow: var(--shadow-2); z-index: 80; font-size: var(--fs-m, .92rem); }
.is-loading [data-region="feed"] { opacity: .55; transition: opacity .15s; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1260px) {
  .wall { grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 20px; }
  .brand__tag { display: none; }
}

@media (max-width: 1060px) {
  .wall { grid-template-columns: minmax(0, 1fr) 320px; }
  .col--left {
    position: fixed; inset: auto 0 0 0; top: auto; z-index: 60; max-height: 86vh; background: var(--bg);
    border-radius: 18px 18px 0 0; box-shadow: var(--shadow-2); padding: 10px 18px 0; transform: translateY(105%); transition: transform .22s ease;
    visibility: hidden;
  }
  .is-sheet-open .col--left { transform: none; visibility: visible; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; background: var(--backdrop, rgba(30, 20, 12, .4)); z-index: 55; }
  .sheet-close { display: block; margin-left: auto; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
  .sidebar__head { display: flex; align-items: center; }
  .sheet-foot { display: block; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 16px; }
  .mobilebar { display: flex; position: sticky; top: var(--top); z-index: 30; gap: 10px; align-items: center; padding: 8px 20px; background: var(--bar-bg, rgba(245, 239, 228, .94)); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
  .mobilebar__filters { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill, 999px); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 600; }
  .mobilebar .tabs { display: none; }
  .col--right { top: calc(var(--top) + 70px); max-height: calc(100vh - var(--top) - 80px); }
}

@media (max-width: 760px) {
  :root { --top: 56px; }
  body { font-size: var(--fs-body-sm, 15.5px); }
  .topbar__in { padding: 0 12px; gap: 10px; }
  .family__in { padding: 4px 12px; }
  .brand img { width: 28px; height: 28px; }
  .brand__name { font-size: var(--fs-brand, 1.2rem); }
  .topsearch { display: none; }
  .sidesearch { display: block; }
  .topnav { gap: 8px; font-size: var(--fs-s, .86rem); }
  .topnav > a:first-child { display: none; }
  .wall { display: block; padding: 14px 12px 30px; }
  .mobilebar { padding: 8px 12px; }
  .mobilebar .tabs { display: flex; margin-left: auto; background: var(--bg-2); border-radius: var(--r-pill, 999px); padding: 3px; }
  .tabs button { border: 0; background: none; padding: 6px 11px; border-radius: var(--r-pill, 999px); font-size: var(--fs-s, .85rem); cursor: pointer; color: var(--ink-2); }
  .tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
  .col--right { position: static; max-height: none; overflow: visible; margin-top: 20px; }
  .wall[data-view="lista"] .col--right .map, .wall[data-view="lista"] .col--right .cal { display: none; }
  .wall[data-view="mapa"] .col--main, .wall[data-view="kalendarz"] .col--main,
  .wall[data-view="mapa"] .col--right .forum, .wall[data-view="kalendarz"] .col--right .forum,
  .wall[data-view="mapa"] .col--right .cal, .wall[data-view="kalendarz"] .col--right .map { display: none; }
  .wall[data-view="mapa"] .col--right, .wall[data-view="kalendarz"] .col--right { margin-top: 0; }
  .wall[data-view="mapa"] .map__canvas { height: min(68vh, 560px); }
  .cal__grid td, .cal__day > a, .cal__day > .cal__no { height: 52px; min-height: 52px; }
  .card { padding: 14px 14px 12px; border-radius: var(--radius-phone, 12px); }
  .card__main { gap: 12px; }
  .card__actions .btn { flex: 1 1 auto; }
  .btn--edit { margin-left: 0; }
  .page { padding: 18px 12px 40px; }
  .evform__grid, .twocol { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .upload { grid-template-columns: 110px minmax(0, 1fr); }
  .myrow, .modrow { flex-wrap: wrap; }
  .myrow__actions, .modrow__actions { width: 100%; justify-content: flex-start; flex-direction: row; }
  .modrow__actions .btn { width: auto; }
  .modrow__img { width: 100%; }
  .menu[open] { flex: 1 0 100%; }
  .menu__pop { position: static; width: auto; margin-top: 6px; box-shadow: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line-2); padding: 6px 0; }
  .table td { border: 0; padding: 4px 12px; }
  .table td.table__actions { text-align: left; }
  .panelbar__out .muted { display: none; }
}

/* ---- Admin: import sources ---- */
.importsrc { margin-bottom: 24px; }
.importsrc__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.importsrc__head .section-title, .importsrc__head p { margin: 0; }
.importsrc__actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
.importsrc__actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.importsrc__run input { width: 8.5em; }
.importsrc__sub { margin: 8px 0 0; font-size: 1rem; }
.importlog pre { white-space: pre-wrap; word-break: break-word; font-size: .82rem; line-height: 1.45; max-height: 28em; overflow: auto; margin: 6px 0 0; }
.importlog summary { cursor: pointer; font-size: .85rem; }
.datelist { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* ---- Place type-ahead (panel form) ---- */
.combo { position: relative; display: flex; flex-direction: column; gap: 10px; }
.js [data-show-mode] > .combo { margin-bottom: 14px; }
.combo .hint { margin: 0; }
.combo__list {
  position: absolute; z-index: 30; left: 0; right: 0; top: 72px; margin: 0; padding: 4px; list-style: none;
  max-height: 300px; overflow-y: auto; background: var(--field-bg, var(--surface)); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-ctl, 10px); box-shadow: var(--shadow-2, 0 8px 24px rgba(0, 0, 0, .18));
}
.combo__list [role=option] { padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.combo__list [role=option] small { display: block; color: var(--muted); font-size: var(--fs-s, .8rem); }
.combo__list [role=option]:hover, .combo__list [aria-selected=true] { background: var(--bg-2); }
.combo__note { padding: 8px 10px; color: var(--muted); font-size: var(--fs-s, .8rem); }
.placechoices { gap: 8px; margin: 0 0 14px; }
.placechoices .check { align-items: flex-start; }
.placechoices .check small { display: block; color: var(--muted); }
@media (max-width: 760px) {
  .importruns td[data-label] { display: inline-block; width: auto; padding-right: 4px; }
  .importruns td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

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

@media print {
  .topbar, .col--left, .col--right, .mobilebar, .card__actions, .footer { display: none !important; }
  .wall { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
