.button {
  display: inline-block;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  font-family: var(--font-light);
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
  color: var(--orange);
  background: var(--control);
  cursor: pointer;
  transition: background-color 120ms;
}
.button:hover, .button:focus-visible { background: var(--control-hover); }

@media (max-width: 859px) {
  .login-form-box .button { padding: 8px 14px; }
}

/* Pagination: first pages, last page and "next" only */
.button { font-size: 20px; line-height: 26px; margin-bottom: 12px; }
.button, .button:visited, .button:hover { color: var(--orange); text-decoration: none; }
.button.small-button { padding: 4px 8px; font-size: 16px; line-height: 22px; }
.login-form-box .button { margin-bottom: 0; }
.fluid-button { display: block; }
.two-line-button { font-size: 18px; line-height: 24px; }
.back-button { position: relative; }
.back-button::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  width: 19px;
  height: 30px;
  background: url(/img/site/grafika-dbd9cf1322.png) no-repeat top left;
}
/* == Plan akci: tabs */
.menu-tabs { display: flex; gap: 3px; list-style: none; margin: 0; padding: 0 10px 0 0; }
.menu-tabs li a {
  display: block;
  padding: 7px 10px 6px;
  border-radius: 5px 5px 0 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: var(--control);
}
.menu-tabs li a:hover { background: var(--control-hover); }
.menu-tabs li.active a, .menu-tabs li.active a:hover { background: var(--paper); color: #000; }
/* == Calendar feeds (component's own styles, unchanged) */
.argo-cal { margin-top: 30px; padding-top: 18px; border-top: 2px solid #ccc; }
.argo-cal-title { margin: 0 0 4px; }
.argo-cal-lead { margin: 0 0 16px; color: #666; }
.argo-cal-feed { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 6px; padding: 6px 10px; background: #f5f7f8; border: 1px solid #dde3e6; border-radius: 4px; }
.argo-cal-name { flex: 0 0 auto; width: 130px; font-weight: bold; }
.argo-cal-url { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: #666; font-family: monospace; font-size: 12px; padding: 2px 8px; }
.argo-cal .argo-cal-copy { flex: 0 0 auto; display: inline-block; width: auto; margin: 0; padding: 4px 16px; white-space: nowrap; }
.argo-cal-warn { background: #fff6e5; border: 1px solid #e8c98a; border-radius: 4px; padding: 10px 12px; margin: 14px 0; }
.argo-cal-warn strong { display: block; }
.argo-cal-q { margin: 14px 0 4px; font-size: 15px; }
.argo-cal-a { margin: 0 0 10px; }
.argo-cal-a p { margin: 4px 0; }
.argo-cal-a ol { margin: 6px 0; padding-left: 20px; }
.argo-cal-webcal a { display: inline-block; }
.argo-cal-note { margin-top: 16px; font-size: 13px; color: #666; }

@media (max-width: 600px) {
  .argo-cal-name { flex: 1 1 auto; width: auto; }
  .argo-cal-url { order: 3; flex: 1 0 100%; padding: 4px 0 0; }
}

.organizacky { list-style: none; margin: 0 0 16px; padding: 0; }
.organizacky li { position: relative; padding: 12px 0 12px 53px; border-bottom: 1px solid var(--water); }
/* Icon lives in its own box so a wrapped line never reveals the next sprite frame */
.organizacky li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 48px;
  background: url(/img/site/organizacky-ikony.png) no-repeat 0 5px;
}
.organizacky .navrat::before { background-position: 0 -44px; }
.organizacky .cena::before { background-position: 0 -96px; }
.organizacky .sebou::before { background-position: 0 -155px; }
.organizacky li.pozvanka { border-bottom: 0; }
.organizacky li.pozvanka::before { content: none; }
.organizacky strong { font-size: 18px; line-height: 24px; color: var(--blue); }
#map { overflow: hidden; }
#map img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* Troop chips, shared by the home notepad and the plan table */
.troop-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.troop-chips a, .troop-chips a:visited, .list-akce .col-oddil .troop-chips a, .list-akce .col-oddil .troop-chips a:visited { padding: 0 5px; border-radius: 8px; background: rgba(0, 51, 102, .14); color: var(--navy); font-size: 11px; line-height: 16px; font-weight: bold; white-space: nowrap; text-decoration: none; }
.troop-chips a:hover, .list-akce .col-oddil .troop-chips a:hover { background: var(--navy); color: #fff; text-decoration: none; }

@media (min-width: 760px) and (max-width: 899px) {
  .menu-tabs { padding: 0 7px; }
}

@media (max-width: 759px) {
  .menu-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; }
  .menu-tabs li a { padding: 9px 4px; border-radius: 6px; }
  .menu-tabs li.active a, .menu-tabs li.active a:hover { background: var(--control-on); color: var(--control-on-ink); font-weight: bold; box-shadow: none; }
  .argo-cal .argo-cal-copy { padding-block: 7px; }
  #map { height: clamp(240px, 75vw, 400px) !important; }
}

.list-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 6px; }
.list-users .item { padding: 0; border: 0; text-align: center; overflow-wrap: anywhere; }
.list-users .item img { display: block; width: 80px; height: 80px; margin: 0 auto 2px; object-fit: cover; border-radius: 50%; }
.list-users-oddelovac { grid-column: 1 / -1; border-top: 2px solid var(--orange); }
.copy-btn { margin-left: 8px; padding: 1px 8px; font: 12px var(--font-body); color: var(--blue); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }

@media (max-width: 759px) {
  .copy-btn { padding: 4px 10px; font-size: 13px; }
}

.button.small-button.icon, .button.small-button.icon:visited, .button.small-button.icon:hover {
  padding: 5px 12px 5px 40px;
  color: var(--ink);
  background: var(--orange) url(/img/site/grafika-3c30ef9817.png) no-repeat 4px 3px;
}
.button.small-button.icon.icon-galerie { background-position: 4px -32px; }
/* == Galerie: justified grid + lightbox */
.galerie { padding: 10px; }
.galerie-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 12px; }
.galerie-header h1 { order: -1; flex: 1 1 260px; }
.galerie-back { position: relative; margin: 0; padding-left: 26px !important; }
.galerie-back::before { content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: translateY(-50%) rotate(45deg); }
.galerie-grid { --row: 190px; display: flex; flex-wrap: wrap; gap: 4px; }
.galerie-grid::after { content: ""; flex-grow: 999; }
.galerie-grid a { flex: var(--r) 1 calc(var(--row) * var(--r)); height: var(--row); overflow: hidden; background: #dfe9ee; }
.galerie-grid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms; }
.galerie-grid a:hover img { transform: scale(1.04); }
#lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; background: #000; color: #fff; touch-action: none; user-select: none; }
#lightbox .lb-stage { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; }
#lightbox .lb-img { pointer-events: none; -webkit-user-drag: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; }
#lightbox .lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px 14px; font-size: 14px; }
#lightbox .lb-title { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; opacity: .85; }
#lightbox .lb-count { flex: none; font-variant-numeric: tabular-nums; opacity: .85; }
#lightbox button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font: 26px/1 var(--font-body); cursor: pointer; }
#lightbox button:hover { background: rgba(255, 255, 255, .28); }
/* The cross is drawn, not typed: a "×" glyph never sits in the middle of its circle */
#lightbox .lb-close { flex: none; position: relative; font-size: 0; }
#lightbox .lb-close::before, #lightbox .lb-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 1px; background: #fff; transform: rotate(45deg); }
#lightbox .lb-close::after { transform: rotate(-45deg); }
#lightbox .lb-prev, #lightbox .lb-next { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); }
#lightbox .lb-prev { left: 10px; }
#lightbox .lb-next { right: 10px; }
#lightbox .lb-strip { display: flex; gap: 4px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: thin; touch-action: pan-x; }
#lightbox .lb-strip img { flex: none; height: 56px; width: auto; max-width: none; opacity: .5; cursor: pointer; }
#lightbox .lb-strip img.is-active { opacity: 1; outline: 2px solid var(--orange); outline-offset: -2px; }

@media (max-width: 759px) {
  .button.small-button.icon { padding-block: 8px; background-position: 4px 6px; }
  .button.small-button.icon.icon-galerie { background-position: 4px -29px; }
  .galerie-grid { --row: 110px; gap: 3px; }
  #lightbox .lb-prev, #lightbox .lb-next { display: none; }
  #lightbox .lb-strip { display: none; }
}

@media (min-width: 560px) and (max-width: 759px) {
  .galerie-grid { --row: 140px; }
}

/* Member detail: label column on the left, value on the right, thin lines between rows as in the directory list */
.detail-list { list-style: none; margin: 0 0 16px; padding: 0; }
.detail-list li { display: flow-root; padding: 7px 6px 7px 150px; border-top: 1px solid var(--water); line-height: 22px; overflow-wrap: anywhere; }
.detail-list li:first-child { border-top: 0; }
.detail-list strong { float: left; width: 136px; margin-left: -144px; font-size: 13px; font-weight: normal; color: var(--muted); }
/* Two e-mails or phones (own, parents') go one under the other */
.detail-list li a { display: block; width: fit-content; max-width: 100%; }
.box .button { margin: 8px 0 4px; padding: 6px 8px; font-size: 16px; line-height: 20px; }

/* Label column on the left, value on the right: one line when it fits, value wraps when it does not */
@media (max-width: 759px) {
  .detail-list { margin-bottom: 0; }
  .detail-list li { padding: 6px 6px 6px 128px; font-size: 15px; line-height: 21px; }
  .detail-list strong { width: 116px; margin-left: -122px; }
  .col-1 .button { order: 2; display: block; margin: 0; }
  .col-1 .button + .button { margin-top: -8px; }
}

.sekce { border-top: 1px solid var(--water); }
.sekce:first-of-type { border-top: 0; }
.sekce summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; list-style: none; font-family: var(--font-light); font-size: 24px; line-height: 30px; color: var(--blue); }
.sekce summary::-webkit-details-marker { display: none; }
.sekce summary::before { content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 0 2px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); transition: transform 150ms; }
.sekce[open] summary::before { transform: translateY(-3px) rotate(45deg); }
.sekce summary small { margin-left: auto; font-family: var(--font-body); font-size: 13px; color: var(--muted); }
.pole-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-bottom: 12px; }
.pole { min-width: 0; margin-bottom: 12px; }
.pole-grid .pole { margin-bottom: 0; }
.pole-cele { grid-column: 1 / -1; }
.pole label { display: block; margin-bottom: 3px; font-size: 13px; font-weight: bold; color: var(--muted); }
.pole input:not([type="file"]):not([type="checkbox"]), .pole select, .pole textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font: 16px/22px var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.pole textarea { resize: vertical; }
/* iOS Safari gives date/time inputs an intrinsic width that ignores width: 100% */
.pole input[type="date"], .pole input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; -webkit-min-logical-width: 0; }
.pole input[type="date"]::-webkit-date-and-time-value, .pole input[type="time"]::-webkit-date-and-time-value { text-align: left; min-height: 22px; }
.pole input:focus, .pole select:focus, .pole textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.pole input:disabled { color: var(--muted); background: #eef3f5; }
.pole-napoveda { margin: 4px 0 0; font-size: 13px; }
.profil-fotka { display: flex; align-items: center; gap: 14px; }
.profil-fotka img { flex: none; width: 80px; height: 80px; object-fit: cover; border-radius: 50%; }
.napoveda { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.soubor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.soubor img { width: 64px; height: 64px; object-fit: cover; }
.soubor input[type="file"] { max-width: 100%; font: 14px var(--font-body); }

@media (max-width: 759px) {
  .pole-grid { grid-template-columns: minmax(0, 1fr); }
  .sekce summary { font-size: 21px; padding: 11px 0; }
  .pole input:not([type="file"]):not([type="checkbox"]), .pole select, .pole textarea { min-height: 44px; }
  /* Save stays reachable while scrolling a long form */
}

.site-form { max-width: 420px; }
.pole .form-error { margin: 4px 0 0; color: var(--red); font-size: 14px; font-weight: bold; }
.site-form > .button, .site-form > input[type="submit"] { margin: 4px 0 0; }
.site-form .form-error { margin: -6px 0 12px; color: var(--red); font-weight: bold; }
.site-status { margin: 0 0 12px; font-weight: bold; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; font-variant-numeric: tabular-nums; }
.pager-pages { display: flex; align-items: center; gap: 5px; }
.pager-page, .pager-step { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; box-sizing: border-box; border-radius: 18px; background: var(--control); color: #fff; line-height: 1; text-decoration: none; }
a.pager-page:hover, a.pager-step:hover { background: var(--control-hover); color: #fff; }
.pager-page.is-current { background: var(--control-on); color: var(--control-on-ink); font-weight: bold; }
.pager-step.is-disabled { visibility: hidden; }
.pager-gap { color: var(--blue); }
.pager-step { gap: .35em; }
/* Phones: one line, arrows without words, the outer neighbours of the current page left out */
@media (max-width: 759px) {
  .pager { flex-wrap: nowrap; gap: 6px; }
  .pager .pager-label, .pager .is-far { display: none; }
  .pager-pages { gap: 4px; }
}
.list-users .item a { color: inherit; text-decoration: none; }
.list-users .item a:hover { text-decoration: underline; }
.file-size { font-size: 12px; color: var(--muted); }
.mail-preview { margin: 8px 0 16px; padding: 12px 14px; background: #f5f7f8; border: 1px solid #dde3e6; border-radius: 4px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.mail-recipients { columns: 280px; margin: 8px 0 16px; padding-left: 18px; font-size: 14px; }
/* Simple inner pages: heading above a padded white block */
.page-block { margin-top: 10px; padding: 18px 22px 22px; }
.page-block > p { margin-bottom: 14px; }

/* == Photos in free texts: thumbnails linking to the full picture, laid out as a small gallery */
#content-main a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]):not(.galerie-grid a) { display: inline-block; margin: 0 6px 6px 0; vertical-align: top; }
#content-main a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]):not(.galerie-grid a) img { display: block; max-width: 100%; height: auto; }
/* Several such thumbnails in a row form a gallery: equal tiles side by side, as the old site sized them with inline
   styles that the text cleaner drops. A single linked picture keeps its own size. */
@media (min-width: 760px) {
  .free-page a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]):is(:has(+ a > img:only-child), a:has(> img:only-child) + a, :has(> img[src*="/nahledy/"])) { width: calc((100% - 55px) / 5); margin: 0 6px 6px 0; }
  .free-page a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]):is(:has(+ a > img:only-child), a:has(> img:only-child) + a, :has(> img[src*="/nahledy/"])) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
}
@media (max-width: 759px) {
  .free-page a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]) { width: calc((100% - 32px) / 3); margin: 0 4px 6px 0; }
  .free-page a:has(> img:only-child):is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i]) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
}

/* == People marked on gallery photos */
#lightbox .lb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; padding: 6px 10px 0; font-size: 14px; user-select: none; }
#lightbox .lb-tags-label { opacity: .7; }
#lightbox .lb-tags-error { color: #ff8a80; }
#lightbox .lb-chip { display: inline-flex; align-items: center; border-radius: 16px; background: rgba(255, 255, 255, .14); }
#lightbox .lb-chip-name { width: auto; height: 32px; padding: 0 4px 0 12px; border-radius: 16px 0 0 16px; background: none; color: inherit; font: 14px var(--font-body); }
#lightbox .lb-chip.is-lit { background: var(--orange); color: #000; }
#lightbox .lb-chip-x { width: 30px; height: 32px; border-radius: 50%; background: none; color: inherit; font: 18px/1 var(--font-body); opacity: .7; }
#lightbox .lb-mark { width: auto; height: 28px; margin-left: auto; padding: 0 12px; border-radius: 14px; background: var(--orange); color: #000; font: bold 14px var(--font-body); }
#lightbox .lb-mark:hover { background: #ffb340; }
#lightbox .lb-stage.is-marking { cursor: crosshair; }
#lightbox .lb-face { position: absolute; z-index: 1; width: 76px; height: 76px; margin: -38px 0 0 -38px; box-sizing: border-box; border: 3px solid var(--orange); border-radius: 6px; pointer-events: none; }
#lightbox .lb-face em { position: absolute; left: 50%; top: 100%; margin-top: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .75); font: bold 12px var(--font-body); white-space: nowrap; transform: translateX(-50%); }
#lightbox .lb-pick { position: absolute; z-index: 3; width: 200px; padding: 6px; box-sizing: border-box; border-radius: 6px; background: #fff; color: #000; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); user-select: text; }
#lightbox .lb-pick input { width: 100%; box-sizing: border-box; padding: 6px 8px; font: 16px var(--font-body); border: 1px solid var(--line); border-radius: 4px; }
#lightbox .lb-pick-list { max-height: 168px; margin-top: 4px; overflow-y: auto; touch-action: pan-y; }
#lightbox .lb-pick-item { display: block; width: 100%; height: auto; padding: 7px 8px; border-radius: 4px; background: none; color: #000; font: 15px var(--font-body); text-align: left; }
#lightbox .lb-pick-item:hover { background: #dfe9ee; }
.galerie-zip, .galerie-prazdno { margin: 12px 4px 4px; }
a.box-fotky, a.box-odkaz { text-decoration: none; }
.box.box-fotky span { margin-top: 10px; }
.page-block > h1 { margin-bottom: 8px; }
.box .cerne-desky-obrazek { display: block; max-width: 100%; height: auto; margin: 8px auto 6px; border-radius: 10px; }
