:root {
  --bg: #0b0d10;
  --sidebar-bg: #000000;
  --panel: #15181d;
  --panel-border: #262b33;
  --text: #e8eaed;
  --text-dim: #9aa1ab;
  --accent: #4fa8ff;
  --accent-dim: #2c6dab;
  --danger: #ff6b6b;
  --success: #4caf7d;
  --warning: #e0b84f;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 0;
}

.sidebar-logo {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0 24px 24px;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  padding: 12px 24px;
  color: var(--text-dim);
  font-size: 0.95rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: #131313;
  color: var(--text);
}

.sidebar-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: #101418;
}

.sidebar-bottom {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-link {
  padding: 8px 0;
  font-size: 0.85rem;
}

.sidebar-link-divider {
  margin-top: 12px;
  border-top: 1px solid #1a1a1a;
  padding-top: 16px;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-username {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #04101c;
}

.btn-primary:hover {
  background: #6cb6ff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid #5c2b2b;
}

.btn-danger:hover {
  background: #2a1414;
  border-color: var(--danger);
}

.btn-block {
  width: 100%;
}

/* Content */
.content {
  flex: 1;
  padding: 40px 48px;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content > *:not(.site-footer) {
  flex-shrink: 0;
}

.site-footer {
  margin-top: auto;
  padding-top: 32px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
}

.page-subtitle {
  color: var(--text-dim);
  margin: 0 0 32px;
}

.page-subtitle a {
  color: var(--accent);
}

.page-header .btn {
  margin-top: 8px;
}

.empty-state {
  color: var(--text-dim);
  padding: 48px 0;
}

/* Sestavy (teleskopy, fotoaparáty/kamery, jejich kombinace) */
.setups-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.setups-section {
  margin-top: 32px;
}

.setups-section h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px 16px;
}

.item-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-row-name {
  font-weight: 600;
}

.item-row-detail {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.item-row-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.suggestions-row-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
  /* Žádná pevná max-width — se dvěma tlačítky (Návrhy bez přihlášení) i se
     čtyřmi (K focení přihlášeného) se má seskupení samo přirozeně rozložit
     na jeden řádek, pokud se vejde; zalomení zůstává jen pro případ, že by
     se karta zúžila natolik, že by se to nevešlo (viz i mobilní přepis níž). */
}

.item-row-edit {
  flex-wrap: wrap;
}

/* .item-row nastavuje display:flex přímo na prvku, což by jinak přebilo
   výchozí [hidden]{display:none} — musí se to vynutit explicitně
   (stejný důvod, proč existuje i .modal-overlay[hidden] o kus výš). */
.item-row[hidden] {
  display: none;
}

.item-row-edit input,
.item-row-edit select {
  flex: 1;
  min-width: 120px;
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.9rem;
}

/* Polar alignment tool */
.polar-tool {
  max-width: 520px;
}

.polar-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.polar-dial-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.polar-dial {
  width: 100%;
  height: auto;
  display: block;
}

.dial-ring-outer,
.dial-ring-inner {
  fill: none;
  stroke: #c0392b;
  stroke-width: 2;
}

.tick-major {
  stroke: #c0392b;
  stroke-width: 2.5;
}

.tick-minor {
  stroke: #c0392b;
  stroke-width: 1;
  opacity: 0.6;
}

.dial-label {
  fill: #e05a45;
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.dial-center {
  fill: #c0392b;
}

.dial-pointer-line {
  stroke: #e8a33d;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.dial-pointer-mark line {
  stroke: #ff8c1a;
  stroke-width: 4;
  stroke-linecap: round;
}

#polar-pointer {
  transition: transform 0.4s ease;
  transform-origin: 200px 200px;
}

.polar-readout {
  text-align: center;
  margin-top: 16px;
}

.polar-readout #polar-ha-value {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.polar-readout-label {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.polar-disclaimer {
  margin-top: 28px;
  max-width: 480px;
}

.magnitude-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 32px;
}

.magnitude-form label {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.magnitude-form input {
  width: 90px;
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.9rem;
}

.magnitude-form select {
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.9rem;
  max-width: 220px;
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Home catalog cards */
.catalog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.catalog-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
}

.catalog-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.catalog-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.catalog-card p {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.catalog-card-progress {
  height: 6px;
  border-radius: 3px;
  background: #23272e;
  overflow: hidden;
}

.catalog-card-progress-bar {
  height: 100%;
  background: var(--accent);
}

/* Filter toggles (catalog page) */
.filter-toggles {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.filter-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.gallery-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
}

.gallery-card-photo {
  display: block;
  aspect-ratio: 4 / 3;
}

.gallery-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-entries {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-card-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.8rem;
}

.gallery-card-entry + .gallery-card-entry {
  padding-top: 8px;
  border-top: 1px solid var(--panel-border);
}

.gallery-card-code {
  font-weight: 700;
  color: var(--text);
}

.gallery-card-catalog {
  color: var(--accent);
}

.gallery-card-name {
  color: var(--text-dim);
  flex-basis: 100%;
}

/* Locations */
.location-photos-heading {
  margin: 32px 0 4px;
  font-size: 1.1rem;
  color: var(--text);
}

.location-card-body {
  padding: 16px 18px;
}

.location-card-name {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--text);
}

.location-card-coords {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.location-card-coords-missing {
  color: var(--text-dim);
}

.seeing-box {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px 4px;
  margin: 0 0 8px;
  position: relative;
}

.seeing-box-title {
  position: absolute;
  top: -9px;
  left: 10px;
  background: var(--panel);
  padding: 0 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.location-card-seeing {
  margin: 0 0 8px;
  font-size: 0.8rem;
}

.seeing-good {
  color: var(--success);
}

.seeing-ok {
  color: var(--warning);
}

.seeing-bad {
  color: var(--danger);
}

.location-card-seeing-unknown {
  color: var(--text-dim);
}

.seeing-timeline-label {
  margin: 4px 0 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.seeing-timeline {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.seeing-timeline-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.seeing-dot-wrap {
  height: 24px;
  width: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.seeing-dot {
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
}

.seeing-dot.seeing-good {
  background: var(--success);
}

.seeing-dot.seeing-ok {
  background: var(--warning);
}

.seeing-dot.seeing-bad {
  background: var(--danger);
}

.seeing-timeline-arcsec,
.seeing-timeline-value {
  font-size: 0.6rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Dvojsloupečky větru — stálý vítr a poryv vedle sebe, oba barvou podle
   vlastní závažnosti (klid/mírný/silný); poryv navíc s nižší krycností, ať
   je na první pohled jasné, který ze dvou sloupečků je který (viz legenda
   nad časovou osou ve wind-box.ejs). Jiný tvar než kulaté tečky u seeingu
   a jiné seskupení než čtyři pásma u oblačnosti. */
.wind-bar-group {
  height: 24px;
  width: 20px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.wind-bar {
  display: block;
  flex: 1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
}

.wind-bar-gust {
  opacity: 0.55;
}

.wind-bar.seeing-good {
  background: var(--success);
}

.wind-bar.seeing-ok {
  background: var(--warning);
}

.wind-bar.seeing-bad {
  background: var(--danger);
}

.wind-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--text-dim);
}

.wind-swatch-gust {
  opacity: 0.55;
}

.cloud-now-breakdown {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Rozpad oblačnosti po vrstvách (mlha/nízká/střední/vysoká) — barva podle
   vrstvy (identita), ne podle závažnosti, aby šlo od sebe rozeznat čtyři
   sloupečky vedle sebe v jedné hodině. Výška každého = jeho vlastní %. */
.band-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.band-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.band-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.band-swatch.fog,
.band-bar.fog {
  background: #7dd3fc;
}

.band-swatch.low,
.band-bar.low {
  background: #4ade80;
}

.band-swatch.mid,
.band-bar.mid {
  background: #fbbf24;
}

.band-swatch.high,
.band-bar.high {
  background: #c084fc;
}

.band-bar-group {
  height: 24px;
  width: 32px;
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
}

.band-bar {
  display: block;
  flex: 1;
  min-height: 2px;
  border-radius: 1px 1px 0 0;
}

.seeing-timeline-hour {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.location-card-notes {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.location-gps-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.location-gps-fields label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.location-gps-fields input {
  width: 180px;
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 0.9rem;
}

#location-notes {
  width: 100%;
  max-width: 600px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin: 16px 0;
}

.location-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.location-locate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal.modal-wide {
  max-width: 640px;
  width: 90vw;
}

.map-picker-canvas {
  width: 100%;
  height: 420px;
  border-radius: 8px;
  margin: 4px 0 16px;
}

label[for="location-notes"] {
  display: block;
  margin-top: 4px;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Tile grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile:hover {
  border-color: var(--accent-dim);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-plus {
  font-size: 2.2rem;
  color: var(--text-dim);
  line-height: 1;
}

.tile.empty:hover .tile-plus {
  color: var(--accent);
}

.tile-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
}

.tile-code {
  font-weight: 700;
}

.tile-name {
  color: var(--text-dim);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-magnitude {
  color: var(--text-dim);
  font-size: 0.65rem;
  opacity: 0.8;
}

/* Object page */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent);
}

.object-name {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1.2rem;
}

.object-photo-wrap {
  max-width: 900px;
}

.object-photo {
  width: 100%;
  border-radius: 10px;
  display: block;
  border: 1px solid var(--panel-border);
}

.object-photo-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  border: 1px dashed var(--panel-border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
}

.upload-form {
  margin-top: 16px;
}

.upload-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.object-description {
  max-width: 900px;
  margin-top: 28px;
}

.object-description label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.object-description textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
}

.description-text {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
}

.form-hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 8px;
}

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
}

/* Settings page */
.settings-panel {
  max-width: 480px;
}

.settings-form {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 24px;
}

.settings-form + .settings-form {
  margin-top: 24px;
}

.settings-form label {
  display: block;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.settings-form label:first-child {
  margin-top: 0;
}

.settings-form input[type="number"],
.settings-form input[type="password"] {
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.settings-form input[type="number"] {
  width: 140px;
}

.settings-form input.is-disabled-look {
  opacity: 0.5;
}

.settings-form select,
.settings-form input[type="date"] {
  display: block;
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  margin-bottom: 8px;
  max-width: 320px;
  width: 100%;
}

.suggestions-form {
  max-width: 480px;
}

.suggestions-error {
  margin-top: 16px;
}

.suggestions-fov-info {
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.suggestions-list {
  margin-top: 16px;
}

.suggestions-row {
  justify-content: flex-start;
}

.suggestions-row .item-row-main {
  flex: 1;
}

.suggestions-row .item-row-name a {
  color: var(--accent);
}

.suggestions-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.suggestions-thumb-empty {
  background: #23272e;
}

.suggestions-credit {
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.suggestions-credit a {
  color: var(--accent);
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 8px;
}

.field-heading label {
  margin: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #2a2f38;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.15s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--accent);
}

.settings-form input[type="password"] {
  width: 100%;
  max-width: 280px;
}

.settings-form .form-hint,
.settings-form .form-error {
  margin: 0 0 16px;
}

/* Login modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 340px;
}

.modal h2 {
  margin: 0 0 20px;
}

.modal label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.modal input,
.modal select {
  width: 100%;
  background: #0d0f12;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

/* 404 */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.not-found h1 {
  font-size: 3rem;
  margin: 0;
}

@media (max-width: 760px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    overflow-x: auto;
  }

  .sidebar-top {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .sidebar-nav {
    flex-direction: row;
  }

  .sidebar-bottom {
    padding: 0 0 0 16px;
    margin-left: auto;
  }

  .content {
    padding: 24px 20px;
  }

  /* Karty s tlačítky (Návrhy, Sestavy, K focení) — na úzké obrazovce se
     tlačítka vedle náhledu/textu prostě nevejdou a přetékají mimo kartu.
     Nechá se řádek zalomit, tlačítka spadnou pod text na vlastní řádek. */
  .item-row {
    flex-wrap: wrap;
  }

  .suggestions-row-buttons {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }
}
