/* Základní reset (původně inline v <head>) */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

/* Styly aplikace */
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}

/* Layout: one app shell per role — senior as a phone column with bottom tabs, school with top tabs, staff with a sidebar. Tokens below. */
:root {
  --bg: #f4f6ef;
  --surface: #ffffff;
  --surface-2: #e9eee0;
  --ink: #1d2716;
  --ink-2: #4c5843;
  --line: #d3dbc6;
  --leaf: #3d7000;
  --on-leaf: #ffffff;
  --leaf-soft: #e1eecb;
  --sun: #b4530a;
  --on-sun: #ffffff;
  --sun-soft: #fbe6d3;
  --sky: #1c6670;
  --sky-soft: #d4eaec;
  --sos: #c0261c;
  --on-sos: #ffffff;
  --sos-soft: #fbdfdc;
  --warn: #8a5a00;
  --warn-soft: #fbefcf;
  --map-water: #b9d3dc;
  --map-land: #fbfcf8;
  --map-out: #e4e9dc;
  --shadow: 0 1px 2px rgba(29, 39, 22, .08), 0 6px 20px rgba(29, 39, 22, .08);
  --f-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --f-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --scale: 1;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11160d; --surface: #1a2114; --surface-2: #242d1c; --ink: #e8efdf; --ink-2: #a8b59b; --line: #35412b;
    --leaf: #93c94a; --on-leaf: #0f1a05; --leaf-soft: #2a3a17; --sun: #f0904a; --on-sun: #231001; --sun-soft: #3d2513;
    --sky: #66bcc6; --sky-soft: #173538; --sos: #ff6d60; --on-sos: #2a0300; --sos-soft: #401714; --warn: #e8b64c; --warn-soft: #3a2e10;
    --map-water: #23424c; --map-land: #1f2818; --map-out: #151b10; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11160d; --surface: #1a2114; --surface-2: #242d1c; --ink: #e8efdf; --ink-2: #a8b59b; --line: #35412b;
  --leaf: #93c94a; --on-leaf: #0f1a05; --leaf-soft: #2a3a17; --sun: #f0904a; --on-sun: #231001; --sun-soft: #3d2513;
  --sky: #66bcc6; --sky-soft: #173538; --sos: #ff6d60; --on-sos: #2a0300; --sos-soft: #401714; --warn: #e8b64c; --warn-soft: #3a2e10;
  --map-water: #23424c; --map-land: #1f2818; --map-out: #151b10; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f-body);
  font-size: calc(16px * var(--scale)); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.75em; font-weight: 700; }
h2 { font-size: 1.3em; font-weight: 600; }
h3 { font-size: 1.08em; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-2); }
.small { font-size: .875em; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .78em; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* ---------- shell ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px;
}
.topbar-in { display: flex; align-items: center; gap: 12px; max-width: var(--shell-w, 1180px); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 1.15em; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand small { font-family: var(--f-body); font-weight: 500; font-size: .7em; color: var(--ink-2); }
.demo-tag { font-size: .72em; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name { font-size: .85em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.main {
  flex: 1; width: 100%; max-width: var(--shell-w, 1180px); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 28px;
}
.role-senior { --shell-w: 560px; }
.role-school { --shell-w: 1180px; }
.role-staff { --shell-w: 1280px; }

.tabbar {
  position: sticky; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); padding-top: 6px;
}
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin: 0 auto; gap: 2px; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 12px;
  font-size: .78em; font-weight: 500; color: var(--ink-2); cursor: pointer; min-height: 56px; justify-content: center;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--leaf); background: var(--leaf-soft); font-weight: 600; }
.tab .dot { position: relative; }
.tab .dot[data-n]::after { content: attr(data-n); position: absolute; top: -6px; right: -12px; background: var(--sun); color: var(--on-sun); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.toptabs { display: flex; gap: 4px; overflow-x: auto; max-width: var(--shell-w); margin: 10px auto 0; scrollbar-width: none; }
.toptabs::-webkit-scrollbar { display: none; }
.toptab { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.toptab[aria-current="page"] { background: var(--sun-soft); color: var(--sun); font-weight: 600; }
.role-staff .toptab[aria-current="page"] { background: var(--leaf-soft); color: var(--leaf); }
.toptab .cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sos); color: var(--on-sos); font-size: .72em; margin-left: 6px; padding: 0 5px; }

.staff-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 960px) {
  .staff-layout { grid-template-columns: 230px 1fr; }
  .staff-nav { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
  .staff-nav .toptab { text-align: left; border-radius: 10px; }
  .role-staff .toptabs.mobile-only { display: none; }
}
@media (max-width: 959px) { .staff-nav { display: none; } }

/* ---------- elements ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.flat { border: 0; background: var(--surface-2); }
.card.accent { border-color: var(--leaf); box-shadow: inset 4px 0 0 var(--leaf); }
.card.warn { background: var(--warn-soft); border-color: transparent; }
.card.sos { background: var(--sos-soft); border-color: transparent; }
.card.sky { background: var(--sky-soft); border-color: transparent; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--leaf); color: var(--on-leaf); border-color: var(--leaf); }
.btn.sun { background: var(--sun); color: var(--on-sun); border-color: var(--sun); }
.btn.sky { background: var(--sky); color: var(--surface); border-color: var(--sky); }
.btn.danger { background: var(--sos); color: var(--on-sos); border-color: var(--sos); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: .9em; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn svg { width: 22px; height: 22px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8em; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.free { background: var(--leaf-soft); color: var(--leaf); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.confirmed { background: var(--sky-soft); color: var(--sky); }
.pill.done { background: var(--surface-2); color: var(--ink-2); }
.pill.declined, .pill.cancelled, .pill.help { background: var(--sos-soft); color: var(--sos); }
.pill.sun { background: var(--sun-soft); color: var(--sun); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: .88em; cursor: pointer; min-height: 38px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--leaf-soft); border-color: var(--leaf); color: var(--leaf); font-weight: 600; }
.chip.static { cursor: default; min-height: 0; padding: 3px 10px; background: var(--surface-2); border-color: transparent; }
.chip.match { background: var(--sun-soft); color: var(--sun); border-color: transparent; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: .92em; }
.field small { color: var(--ink-2); }
.input, select.input, textarea.input {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 48px; width: 100%;
}
textarea.input { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--leaf); flex: none; margin-top: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch input { width: 52px; height: 30px; accent-color: var(--leaf); flex: none; }

.list { display: flex; flex-direction: column; }
.li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li > .grow { flex: 1 1 180px; }
.li:last-child { border-bottom: 0; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 1.05em;
  background: var(--leaf-soft); color: var(--leaf);
}
.avatar.lg { width: 72px; height: 72px; font-size: 1.5em; }
.avatar.sun { background: var(--sun-soft); color: var(--sun); }
.avatar.sky { background: var(--sky-soft); color: var(--sky); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi b { display: block; font-family: var(--f-display); font-size: 1.9em; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { border-collapse: collapse; width: 100%; font-size: .92em; }
table.t th, table.t td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: .8em; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* week grid */
.week { display: grid; grid-template-columns: 64px repeat(5, minmax(0, 1fr)); gap: 6px; }
.week .h { font-size: .8em; text-align: center; color: var(--ink-2); font-weight: 600; padding-bottom: 2px; line-height: 1.2; }
.week .h b { display: block; color: var(--ink); font-size: 1.1em; }
.week .t { font-size: .75em; color: var(--ink-2); display: flex; align-items: center; line-height: 1.2; font-variant-numeric: tabular-nums; }
.slot {
  min-height: 56px; border-radius: 10px; border: 1.5px dashed var(--line); background: transparent; cursor: pointer; font-size: .72em; font-weight: 600;
  display: grid; place-items: center; padding: 2px; color: var(--ink-2); text-align: center; line-height: 1.15; hyphens: manual; overflow-wrap: anywhere;
}
.slot.free { background: var(--leaf-soft); border: 1.5px solid var(--leaf); color: var(--leaf); }
.slot.unconfirmed { background: var(--surface-2); border: 1.5px solid var(--line); color: var(--ink-2); }
.slot.pending { background: var(--warn-soft); border: 1.5px solid var(--warn); color: var(--warn); }
.slot.confirmed { background: var(--sky); border: 1.5px solid var(--sky); color: var(--surface); }
.slot.blockedDay { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); border: 1.5px solid var(--line); cursor: not-allowed; }
.slot.hidden { background: var(--surface-2); border: 1.5px solid transparent; cursor: not-allowed; }
.slot.pick { cursor: pointer; }
.slot.off.pick { cursor: not-allowed; opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .8em; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* segmented */
.seg { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--ink-2); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* super button */
.super {
  width: 100%; border: 0; cursor: pointer; border-radius: 18px; padding: 18px; text-align: left; display: flex; gap: 14px; align-items: center;
  background: var(--sun); color: var(--on-sun); font-family: var(--f-display); font-size: 1.25em; font-weight: 600; min-height: 84px;
}
.super svg { width: 40px; height: 40px; flex: none; }
.super small { display: block; font-family: var(--f-body); font-size: .62em; font-weight: 400; opacity: .92; margin-top: 2px; }
.super.on { background: var(--sun-soft); color: var(--sun); box-shadow: inset 0 0 0 2px var(--sun); }

/* SOS */
.sos-btn {
  position: relative; border: 0; cursor: pointer; background: var(--sos); color: var(--on-sos); font-family: var(--f-display); font-weight: 700; letter-spacing: .04em;
  height: 44px; min-width: 70px; padding: 0 14px; border-radius: 12px; font-size: 1em; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.sos-btn .fill { position: absolute; inset: 0; background: rgba(0,0,0,.28); transform-origin: left; transform: scaleX(0); }
.sos-btn.holding .fill { transition: transform 2s linear; transform: scaleX(1); }
.sos-btn span { position: relative; }
.sos-screen { display: flex; flex-direction: column; gap: 14px; }
.sos-opt { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 16px; border: 0; cursor: pointer; text-align: left; font-family: var(--f-display); font-size: 1.25em; font-weight: 600; min-height: 84px; }
.sos-opt small { display: block; font-family: var(--f-body); font-size: .62em; font-weight: 400; }
.sos-opt.a { background: var(--sos); color: var(--on-sos); }
.sos-opt.b { background: var(--sos-soft); color: var(--sos); }
.sos-opt.c { background: var(--sky-soft); color: var(--sky); }
.countdown { font-family: var(--f-display); font-size: 2.6em; font-weight: 700; color: var(--sos); font-variant-numeric: tabular-nums; }

/* overlay sheet */
.overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 14, 6, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg); width: 100%; max-width: 640px; max-height: 92%; overflow-y: auto; border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  padding: 8px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
.sheet.wide { max-width: 820px; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 12px; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { flex: 1; min-width: 0; }
@media (min-width: 720px) { .overlay { align-items: center; } .sheet { border-radius: 22px; padding-top: 18px; } .sheet-grab { display: none; } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 1100; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); max-width: min(92vw, 480px); text-align: center;
}
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .25s ease-out; } .sheet { animation: rise .22s ease-out; } }
@keyframes rise { from { transform: translate(var(--tx, 0), 12px); opacity: 0; } to { opacity: 1; } }
.toast { --tx: -50%; }

/* map */
.map { height: 420px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; background: var(--map-out); z-index: 0; }
.map.tall { height: min(62vh, 560px); }
.leaflet-container { background: var(--map-out) !important; font-family: var(--f-body) !important; }
.map-prague { fill: var(--map-land); fill-opacity: 1; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.map-river { stroke: var(--map-water); fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.map-radius { fill: var(--sun); fill-opacity: .07; stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 6 5; }
.map-area { fill: var(--sky); fill-opacity: .14; stroke: var(--sky); stroke-width: 1.5; }
.district-label { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; text-align: center; opacity: .8; pointer-events: none; letter-spacing: .02em; }
.pin { position: relative; display: grid; place-items: center; }
.pin svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pin .badge {
  position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--sos); color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; font-family: var(--f-body);
}
.cluster { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: var(--on-leaf); font-weight: 700; border: 3px solid var(--surface); box-shadow: var(--shadow); font-family: var(--f-body); }
.leaflet-control-attribution { font-size: 10px !important; background: var(--surface) !important; color: var(--ink-2) !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 20px !important; }

.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8em; color: var(--ink-2); margin-top: 8px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend svg { width: 18px; height: 18px; }

.split { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .split.even { grid-template-columns: 1fr 1fr; } }

/* login */
.login { max-width: 980px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1fr; padding-block: 24px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 860px) { .login { grid-template-columns: 1.1fr 1fr; align-items: start; padding-top: 56px; } }
.login-hero h1 { font-size: clamp(2em, 5vw, 3em); line-height: 1.05; }
.login-hero h1 em { font-style: normal; color: var(--leaf); }
.acct { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.acct:hover { border-color: var(--leaf); }
.acct .grow b { display: block; font-family: var(--f-display); font-size: 1.08em; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--sky); color: var(--surface); border-color: var(--sky); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg time { display: block; font-size: .72em; opacity: .75; margin-top: 2px; }
.sys { align-self: center; font-size: .8em; color: var(--ink-2); background: var(--surface-2); padding: 6px 12px; border-radius: 999px; text-align: center; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.quick .chip { white-space: nowrap; }
.guardian-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--sky-soft); color: var(--sky); padding: 10px 14px; border-radius: 12px; font-size: .88em; font-weight: 500; }
.guardian-banner svg { width: 22px; height: 22px; flex: none; }

.login-card { border: 2px dashed var(--ink-2); border-radius: 16px; padding: 20px; background: var(--surface); font-variant-numeric: tabular-nums; }
.login-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 0; }
.login-card dt { color: var(--ink-2); }
.login-card dd { margin: 0; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.05em; }

.empty { text-align: center; padding: 28px 16px; color: var(--ink-2); }
.empty svg { width: 44px; height: 44px; opacity: .6; margin-bottom: 8px; }
.textsize { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.textsize button { border: 0; background: var(--surface); padding: 0 10px; height: 41px; cursor: pointer; font-weight: 700; font-family: var(--f-display); }
.textsize button[aria-pressed="true"] { background: var(--leaf-soft); color: var(--leaf); }
.menu-pop { position: absolute; right: 0; top: 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 240px; z-index: 60; }
.menu-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.menu-pop button:hover { background: var(--surface-2); }
.rel { position: relative; }
pre.code { background: var(--surface-2); padding: 12px; border-radius: 10px; overflow: auto; max-height: 300px; font-size: .8em; white-space: pre-wrap; word-break: break-word; }
.stars { color: var(--sun); letter-spacing: 1px; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--leaf); }
.bar-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: .9em; }
.bar-row .bar { height: 14px; border-radius: 4px; background: var(--leaf); }

@media (max-width: 520px) {
  .brand-txt { display: none; }
  .demo-tag { font-size: .66em; padding: 3px 6px; }
  .who-name { display: none; }
  h1 { font-size: 1.5em; }
  .week { grid-template-columns: 46px repeat(5, minmax(0, 1fr)); gap: 4px; }
  .slot { min-height: 50px; font-size: .66em; }
}

