:root {
  --green: #2e7d32;
  --red: #c62828;
  --blue: #1565c0;
  --cyan: #00acc1;
  --gold: #f9a825;
  --line: #e0e0e0;
  --ink: #222;
  --muted: #666;
  --bg: #f7f7f5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.4 system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
textarea, input[type="text"], input[type="search"], input[type="date"], input:not([type]), select {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { height: 28px; }
.who { display: flex; align-items: center; gap: 8px; }
/* Odkaz „Přehled přidaných pozemků“ (brána /interni/, nová záložka) mezi logem a přihlášeným uživatelem. */
.top-links { flex: 1 1 auto; display: flex; justify-content: flex-end; min-width: 0; }
.top-link { white-space: nowrap; text-decoration: none; }
.top-link .lbl-short { display: none; }
@media (max-width: 1180px) {
  .top-link .lbl-long { display: none; }
  .top-link .lbl-short { display: inline; }
}
@media (max-width: 600px) {
  .top-links { flex: 0 0 auto; margin-left: auto; }
}
.btn {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: 6px 10px;
  background: #455a64;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn.red { background: var(--red); }
.btn.blue { background: var(--blue); }
.btn.green { background: var(--green); }
.btn.cyan { background: var(--cyan); }
.btn.gold { background: var(--gold); color: #222; }
.btn.tiny { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.tabulator-cell[tabulator-field="map"] { padding: 2px 0; }
button.map-pin {
  width: 36px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 4px;
  cursor: pointer;
}
button.map-pin[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  color: #777;
  border-color: #999;
}
.cg-pulse { animation: cg-pulse 0.9s ease-in-out 4; }
@keyframes cg-pulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.25; }
}
.layout { display: flex; height: calc(100% - 48px); min-height: 0; }
.map-wrap { position: relative; flex: 1 1 48%; min-width: 0; }
#map { position: absolute; inset: 0; background: #e8e4d8; }
.panel {
  position: relative;
  flex: 1 1 52%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #fff;
  min-height: 0;
}
.panel { transition: flex-basis 0.25s ease, min-width 0.25s ease; }
.panel.wide { flex: 0 0 88%; }
.panel.collapsed { flex: 0 0 36px; min-width: 36px; }
.panel.collapsed .panel-wide { display: none; }
.panel-wide {
  margin-left: auto;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #333;
  padding: 5px 10px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.panel-wide:hover, .panel-wide[aria-pressed="true"] { background: #eef5ea; border-color: var(--green); }
.layout.panel-is-wide .legend,
.layout.panel-is-wide .map-tools,
.layout.panel-is-wide .zoom-label,
.layout.panel-is-wide .cg-choro { display: none; }
.panel.collapsed .tabs,
.panel.collapsed .tab-panel,
.panel.collapsed .detail-view { display: none; }
.detail-view { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px 12px; display: flex; flex-direction: column; }
.detail-view[hidden] { display: none !important; }
.detail-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--cg-bg, #fff);
  padding-bottom: 8px;
}
#detail-back { margin-right: auto; }
#detail-close { min-width: 44px; min-height: 44px; padding: 0 12px; font-size: 22px; line-height: 1; }
.panel-toggle {
  position: absolute;
  left: -14px;
  top: 8px;
  z-index: 500;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: #222;
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; }
.tab {
  border: 0;
  background: transparent;
  padding: 10px 8px;
  color: #777;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { color: var(--green); box-shadow: inset 0 -3px 0 var(--green); font-weight: 700; }
.tab-panel { flex: 1; min-height: 0; overflow: auto; padding: 8px; display: flex; flex-direction: column; }
.tab-panel[hidden] { display: none !important; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.toolbar input[type="search"] { width: 220px; }
.selection-status { display: inline-flex; align-items: center; gap: 8px; }
.selection-count { font-weight: 700; white-space: nowrap; display: inline; }
#delete-dialog { border: 1px solid var(--line); border-radius: 8px; padding: 16px; max-width: 420px; }
#delete-dialog p { margin: 0 0 12px; }
#delete-dialog form { display: flex; gap: 8px; }
.clear-selection { white-space: nowrap; }
.selection-hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--red);
  font-weight: 600;
}
.counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.count {
  border: 0;
  background: #f3f3f3;
  border-radius: 99px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
}
#table-private, #table-municipal { flex: 1; min-height: 280px; }
.muted { color: var(--muted); }
.parcel label, .muni { display: block; margin: 8px 0; }
.form-actions { margin: 12px 0 4px; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 4px; color: #fff; }
.badge.bad { background: var(--red); }
.badge.ok { background: var(--green); }
button.badge {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  min-height: 40px;
}
button.badge:hover { filter: brightness(0.95); }
.check-meta { margin: 0 0 10px; }
.avgs { padding-left: 18px; }
.history { max-width: 100%; overflow-wrap: anywhere; }
.history-note { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 100%; }
.timeline > li { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.timeline .changes { margin: 4px 0 0; padding-left: 1.1em; }
.timeline .changes li,
.history-summary { overflow-wrap: anywhere; word-break: break-word; }
.timeline .lbl { color: var(--muted); }
.deleted-parcels { max-width: 100%; }
.deleted-item { border-top: 1px solid var(--line); padding: 8px 0 12px; overflow-wrap: anywhere; }
.deleted-item form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0 0; }
.deleted-item input { width: min(100%, 220px); max-width: 100%; }
.map-tools {
  position: absolute;
  z-index: 400;
  top: 10px;
  left: 52px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(360px, 70%);
}
.map-tools form { display: flex; gap: 4px; }
.map-tools input { background: #fff; }
#search-results {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  max-height: 240px;
  overflow: auto;
}
#search-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 6px 8px;
  cursor: pointer;
}
#search-results button:hover { background: #f3f7f3; }
.legend {
  position: absolute;
  z-index: 400;
  left: 10px;
  bottom: 28px;
  max-width: 340px;
  background: rgba(255,255,255,.92);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
}
.legend div { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }
.zoom-label {
  position: absolute;
  z-index: 400;
  left: 8px;
  top: 96px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
}
/* Ukazatel zoomu je ovládací prvek Leafletu pod +/− a Reset pohledu. */
.leaflet-control.zoom-label { position: static; top: auto; left: auto; margin-top: 8px; }
.leaflet-bar a.cg-reset-view { display: flex; align-items: center; justify-content: center; color: var(--cg-navy, #00385a); }
.leaflet-bar a.cg-reset-view:hover { background: var(--cg-cream, #f4ecd8); }
.leaflet-bar a.cg-reset-view:focus-visible { outline: 2px solid var(--cg-navy, #00385a); outline-offset: -2px; }
@media (max-width: 600px) {
  .leaflet-bar a.cg-reset-view { width: 44px; height: 44px; }
}
.ctx {
  position: fixed;
  z-index: 2000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.ctx button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  padding: 8px 10px;
  min-height: 40px;
  white-space: normal;
  cursor: pointer;
}
.add-form { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.add-form h2 { margin: 0 0 4px; font-size: 18px; }
.add-form label { display: block; }
.add-form .hint { margin: 0; }
.add-form input, .add-form textarea, .add-form .btn, .add-form select {
  min-height: 40px;
  max-width: 100%;
}
.add-form .choices { display: flex; flex-direction: column; gap: 6px; }
.add-form .choices label { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.add-form .choices input { width: auto; min-height: 0; }
.suggest {
  position: relative;
}
.suggest-list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  max-height: 200px;
  overflow: auto;
}
.suggest-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 8px;
  min-height: 40px;
  cursor: pointer;
}
.preview-box { background: var(--bg); border-radius: 4px; padding: 8px; overflow-wrap: anywhere; }
.owner-preview { white-space: pre-wrap; background: #fff; border: 1px dashed #ccc; padding: 8px; min-height: 40px; }
.toast {
  position: fixed;
  z-index: 3000;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: var(--green);
  color: #fff;
  padding: 12px 14px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.toast-error { background: var(--red); }
.form-error { color: var(--red); margin: 0; }
.duplicate-banner {
  background: #fff8e1;
  border: 1px solid var(--gold);
  color: #333;
  padding: 8px 10px;
  border-radius: 4px;
}
.duplicate-banner .btn { margin-top: 8px; }
.ctx button:hover { background: #f4f4f4; }
.st-nv { color: #a02b93; font-weight: 700; }
.st-nvp { color: #ff69b4; font-weight: 700; }
.st-nvm { color: #0000ff; font-weight: 700; }
.st-nvme { color: #0288d1; font-weight: 700; }
.st-cno { color: #c58a00; font-weight: 700; }
.st-ssp { color: #3d8c2a; font-weight: 700; }
.st-u { color: #c00000; font-weight: 700; }
.st-kun { color: #444; font-weight: 700; }
/* Štítek „Schránka už oslovena (jiná parcela)“: oranžová, jinak než stavy. */
.ds-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f57c00;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
}
.ds-badge-sub { display: block; color: #8a4a00; font-size: 11px; white-space: nowrap; }
.ds-badge .ds-short { display: none; }
.tabulator-cell .ds-badge { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  /* mobil: zkratka, plný text v title; štítek i datum/dmID se zalomí do šířky sloupce */
  .ds-badge .ds-full { display: none; }
  .ds-badge .ds-short { display: inline; }
  .ds-badge-sub { white-space: normal; overflow-wrap: anywhere; }
}
.ds-contacted-box {
  background: #fff3e0;
  border: 1px solid #f57c00;
  border-left-width: 5px;
  color: #333;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.ds-contacted-box p { margin: 4px 0; }
.cg-ds-tip { font-size: 12px; }
.admin { padding: 16px; max-width: 1100px; }
.plain { width: 100%; border-collapse: collapse; }
.plain th, .plain td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: top; text-align: left; }
.inline { display: flex; gap: 8px; margin-bottom: 8px; }
.inline input { width: 280px; }
.flash { background: #fff8e1; border: 1px solid var(--gold); padding: 8px; }
code { word-break: break-all; }
canvas { width: 100% !important; max-height: 280px; }
.cg-layers { border: 0; background: transparent; }
.cg-layers-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .25);
  border-radius: 4px;
  cursor: pointer;
  color: #333;
}
.cg-layers-panel {
  position: absolute;
  top: 38px;
  right: 0;
  width: min(300px, calc(100vw - 56px));
  max-height: min(320px, 58vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.cg-group-h {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7f7f5;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}
.cg-caret {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #333;
  flex: 0 0 auto;
}
.cg-group.is-open .cg-caret { transform: rotate(90deg); }
.cg-group-title { flex: 1 1 auto; }
.cg-count {
  margin-left: auto;
  min-width: 1.5em;
  padding: 0 6px;
  border-radius: 99px;
  background: #e8f5e9;
  color: var(--green);
  text-align: center;
  font-size: 12px;
}
.cg-group-body { display: none; padding: 4px 8px 8px; }
.cg-group.is-open .cg-group-body { display: block; }
.cg-layer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 2px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.cg-layer input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.cg-swatch {
  width: 14px;
  height: 10px;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid rgba(0, 0, 0, .25);
  vertical-align: -1px;
}
.cg-swatch.is-hatch {
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0, 0, 0, .55) 2px, rgba(0, 0, 0, .55) 3px);
}
.cg-group-note, .cg-overlay-note p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.cg-overlay-note {
  position: absolute;
  z-index: 800;
  left: 8px;
  bottom: 28px;
  max-width: min(380px, calc(100% - 16px));
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cg-choro {
  position: absolute;
  z-index: 800;
  right: 8px;
  bottom: 22px;
  max-width: min(280px, calc(100% - 16px));
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cg-choro strong { display: block; margin-bottom: 4px; }
.cg-choro div { display: flex; align-items: center; gap: 6px; }
.cg-choro i { width: 14px; height: 10px; display: inline-block; border: 1px solid rgba(0, 0, 0, .15); flex: 0 0 auto; }
.cg-choro p { margin: 6px 0 0; }
.cg-choro .cg-scale { height: 8px; margin: 6px 0 2px; border-radius: 2px; opacity: .8; }
.cg-choro .cg-scale-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.cg-layer-src { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.cg-layer-classes { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.cg-layer-classes .cg-swatch { margin-right: 3px; opacity: .8; }
.cg-alpha { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px 26px; }
.cg-alpha[hidden] { display: none; }
.cg-alpha input[type="range"] { flex: 1 1 auto; min-width: 0; width: auto; height: 24px; margin: 0; padding: 0; accent-color: #2e7d32; touch-action: pan-x; }
.cg-alpha output { flex: 0 0 3.2em; font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 600px) {
  .cg-alpha { padding-left: 30px; }
  .cg-alpha input[type="range"] { height: 40px; }
}
/* ★ Oblíbené vrstvy: hvězdička vpravo u každé vrstvy, skupina nahoře v panelu. */
.cg-layer-row { display: flex; align-items: flex-start; gap: 2px; min-width: 0; }
.cg-layer-row > .cg-layer { flex: 1 1 auto; min-width: 0; }
.cg-star {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--cg-r-ctl, 8px);
  background: transparent;
  color: #7d95a8;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.cg-star:hover { background: var(--cg-cream, #f4ecd8); color: var(--cg-navy, #00385a); }
.cg-star.is-on { color: var(--cg-sand-dark, #d4b26f); text-shadow: 0 0 1px rgba(0, 56, 90, .45); }
.cg-star:focus-visible { outline: 2px solid var(--cg-navy, #00385a); outline-offset: -2px; }
.cg-fav .cg-group-h { background: var(--cg-cream, #f4ecd8); color: var(--cg-navy, #00385a); }
.cg-fav-empty { margin: 4px 2px 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
@media (max-width: 600px) {
  .cg-star { width: 44px; height: 44px; font-size: 23px; }
  .cg-layer-row > .cg-layer { padding-top: 11px; padding-bottom: 11px; }
}
.cg-sub { margin: 4px 0 2px; }
.cg-sub > summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 2px; }
.cg-sub-body { padding-left: 10px; border-left: 2px solid var(--line); margin-left: 4px; }
.cg-score-parts { margin: 4px 0; padding-left: 16px; }
.cg-score-parts li { margin: 2px 0; }
.cg-score-parts li.is-missing { color: #b00020; }
.cg-choro .muted, .muni-kvalita small { color: var(--muted); }
.muni-kvalita { list-style: none; margin: 0 0 12px; padding: 0; }
.muni-kvalita li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .btn { min-height: 40px; }
  .btn.tiny { min-height: 40px; padding: 8px 10px; }
  button.map-pin { min-height: 36px; width: 36px; height: 36px; padding: 0; }
  .tabs { flex-wrap: wrap; overflow: visible; }
  .tab { flex: 0 0 auto; }
  button.tabulator-page { min-height: 40px; }
}
@media (max-width: 480px) {
  .top, .who { flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .selection-count { display: inline; font-size: 14px; }
  .selection-status { flex-basis: 100%; }
  .detail-bar { flex-wrap: wrap; }
  #detail-back, #detail-close { min-height: 44px; }
  .tab { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 1024px) {
  .layout { flex-direction: column; height: auto; }
  .map-wrap { height: 45vh; flex: none; }
  .panel { min-height: 70vh; border-left: 0; border-top: 1px solid var(--line); }
  .panel-toggle { left: 8px; top: -14px; }
  .panel.wide { flex: none; }
  .panel-wide { display: none; }
}

/* Mobil: u skóre jen název a škála, ať legenda nezakryje mapu (váhy a zdroje jsou v popupu obce). */
@media (max-width: 600px) {
  .cg-choro.is-score > div:not(.cg-scale):not(.cg-scale-ticks), .cg-choro.is-score > p { display: none; }
  .cg-choro.is-score { min-width: 150px; }
}
/* Okno „Přidané pozemky“ (iframe přehledu z brány /interni/). */
.cg-modal { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 2vh 2vw; border: 0; background: transparent; box-sizing: border-box; }
.cg-modal[open] { display: flex; align-items: stretch; justify-content: center; }
.cg-modal::backdrop { background: rgba(0, 42, 68, .45); }
.cg-modal-card { background: #fff; width: min(1500px, 100%); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(15, 23, 42, .28); }
.cg-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.cg-modal-head strong { font-size: 17px; font-family: var(--cg-hf, inherit); color: var(--cg-navy, #002a44); }
.cg-modal-actions { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.cg-modal .linkish { display: inline-flex; align-items: center; background: none; border: 0; padding: 6px 2px; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; cursor: pointer; }
.cg-modal-actions .lbl-short { display: none; }
.cg-modal-body { position: relative; flex: 1 1 auto; min-height: 0; }
.cg-modal-loading { position: absolute; inset: 0; margin: 0; padding: 24px; color: #5b6b7a; }
.cg-modal-body iframe { position: relative; display: block; border: 0; width: 100%; height: 100%; background: transparent; }
.cg-modal.loaded .cg-modal-body iframe { background: #fff; }
@media (max-width: 600px) {
  .cg-modal { padding: 0; }
  .cg-modal-card { width: 100%; border-radius: 0; }
  .cg-modal-head { padding: 6px 12px; }
  .cg-modal-actions { gap: 12px; }
  .cg-modal-actions .lbl-long { display: none; }
  .cg-modal-actions .lbl-short { display: inline; }
  .cg-modal .linkish { min-height: 44px; }
}
