/* Kde se soudí - vzhled podle Áďova motivu (teal #449D8B, zelená #57AB27, růžová #E75294) */
:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-2: #f8faf9;
  --text: #1b1e24;
  --muted: #616875;
  --line: #d7dedb;
  --line-2: #e7ecea;
  --brand: #449d8b;
  --brand-d: #2f7266;
  --brand-soft: #eaf5f2;
  --green: #57ab27;
  --green-soft: #eaf5e0;
  --pink: #e75294;
  --pink-soft: #fbe9f1;
  --blue: #666cab;
  --orange: #f39c59;
  --shadow: 0 1px 2px rgba(27, 30, 36, 0.05), 0 4px 16px rgba(27, 30, 36, 0.05);
  --radius: 14px;

  --c-civilni: #449d8b;
  --c-rodinne: #57ab27;
  --c-obchodni: #666cab;
  --c-insolvence: #005233;
  --c-trestni: #e75294;
  --c-spravni: #f39c59;
  --c-dedictvi: #a9cd82;
  --c-ostatni: #8a93a0;

  --font: "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412;
    --panel: #151d1a;
    --panel-2: #1a2320;
    --text: #e4ebe8;
    --muted: #9aa6a2;
    --line: #2b3733;
    --line-2: #222d29;
    --brand: #5cb8a5;
    --brand-d: #8fd3c4;
    --brand-soft: #18302a;
    --green-soft: #1d2d15;
    --pink-soft: #33192a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --c-insolvence: #3fa37e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412;
  --panel: #151d1a;
  --panel-2: #1a2320;
  --text: #e4ebe8;
  --muted: #9aa6a2;
  --line: #2b3733;
  --line-2: #222d29;
  --brand: #5cb8a5;
  --brand-d: #8fd3c4;
  --brand-soft: #18302a;
  --green-soft: #1d2d15;
  --pink-soft: #33192a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --c-insolvence: #3fa37e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-d); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- horní lišta ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--font-display); font-size: 19px; letter-spacing: -0.01em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.btn-plan {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 7px 12px 7px 10px; font-weight: 600;
}
.btn-plan:hover { border-color: var(--brand); }
.btn-plan svg { width: 18px; height: 18px; color: var(--brand); }
.pill { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.pill:empty, .pill[data-n="0"] { background: var(--line); color: var(--muted); }

/* ---------- rozvržení ---------- */
.layout { max-width: 1280px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
@media (min-width: 960px) {
  .layout { grid-template-columns: 350px minmax(0, 1fr); align-items: start; padding: 20px 24px; gap: 24px; }
  .filters { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
  .filters-toggle, .filters-apply { display: none !important; }
  .filters-body { display: block !important; }
}

/* ---------- panel filtrů ---------- */
.filters {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); scrollbar-width: thin;
}
.filters-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 0; background: none; padding: 14px 16px;
}
.filters-toggle .souhrn { flex: 1; min-width: 0; }
.filters-toggle .souhrn b { display: block; font-size: 15px; }
.filters-toggle .souhrn span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filters-toggle .chev { width: 20px; height: 20px; transition: transform 0.2s; color: var(--muted); }
.filters.open .filters-toggle .chev { transform: rotate(180deg); }
.filters-body { display: none; padding: 4px 16px 16px; }
.filters.open .filters-body { display: block; border-top: 1px solid var(--line-2); }
@media (min-width: 960px) { .filters-body { padding: 16px; } }

.f-block { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.f-block:last-child { border-bottom: 0; }
.f-block h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  font-family: var(--font); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.f-block h2 .clear { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; border: 0; background: none; color: var(--brand-d); padding: 0; font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 5px 11px; font-size: 13.5px; line-height: 1.25; user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--dot, var(--brand)); box-shadow: 0 0 0 1.5px var(--panel); }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 1.5px #fff; }
.chip .n { font-size: 12px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.chip.soud { background: var(--brand-soft); border-color: transparent; color: var(--brand-d); font-weight: 600; }
.chip.soud button { border: 0; background: none; padding: 0; margin-right: -4px; color: inherit; opacity: 0.6; line-height: 1; font-size: 16px; }
.chip.soud button:hover { opacity: 1; }
.chip.more { background: none; border-style: dashed; color: var(--muted); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.row label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.field {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px;
  padding: 6px 8px; min-height: 36px; font-variant-numeric: tabular-nums;
}
.field:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
input[type="date"].field { min-width: 140px; }
input[type="time"].field { width: 108px; }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.weekdays .chip { justify-content: center; padding: 5px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 10px;
  padding: 8px 14px; font-weight: 600; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--brand-d); border-color: var(--brand-d); }
:root[data-theme="dark"] .btn:hover { color: #0e1412; }
.btn.ghost { background: var(--panel); color: var(--brand-d); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-d); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }

.switch { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 21px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background 0.15s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(14px); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.filters-apply { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line-2); border-radius: 0 0 var(--radius) var(--radius); display: none; }
.filters.open .filters-apply { display: block; }
.filters-apply .btn { width: 100%; padding: 12px; font-size: 16px; }

/* ---------- výsledky ---------- */
.results { min-width: 0; }
.search {
  position: relative; margin-bottom: 12px;
}
.search input {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  padding: 11px 14px 11px 40px; box-shadow: var(--shadow);
}
.search input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

.status { font-size: 13.5px; color: var(--muted); margin: 0 2px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.status .bar { flex: 1 1 160px; height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden; max-width: 260px; }
.status .bar i { display: block; height: 100%; background: var(--brand); transition: width 0.3s; }
.status .err { color: var(--pink); }
.status button { border: 0; background: none; color: var(--brand-d); text-decoration: underline; padding: 0; font-size: inherit; }
.notice { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); color: var(--text); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.notice.warn { background: var(--pink-soft); border-color: color-mix(in srgb, var(--pink) 35%, transparent); }
.notice .row { margin-top: 8px; }

/* Kam vyrazit */
.suggest { margin-bottom: 14px; }
.suggest h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-family: var(--font); margin: 0 2px 8px; display: flex; gap: 8px; align-items: baseline; }
.suggest h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.sug-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.sug-row::-webkit-scrollbar { display: none; }
@media (min-width: 960px) {
  .sug-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
  .sug-row .sug { width: auto; }
  .sug-row .sug:nth-child(n + 7) { display: none; }
}
.sug {
  flex: 0 0 auto; width: 232px; scroll-snap-align: start; text-align: left;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow);
}
.sug:hover { border-color: var(--brand); }
.sug[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.sug b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug .big { font-family: var(--font-display); font-size: 22px; color: var(--brand-d); font-weight: 700; line-height: 1.1; }
.sug .big small { font-size: 13px; font-weight: 500; color: var(--muted); font-family: var(--font); }
.sug .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug .bars { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 7px; background: var(--line-2); }
.sug .bars i { display: block; height: 100%; }
.sug.room .big { font-size: 16px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 2px 10px; }
.toolbar .count { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-right: auto; }
.toolbar .count small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.view { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.view button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted); }
.view button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-d); font-weight: 600; }
.focus-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; border: 0; }
.focus-chip span { opacity: .8; font-size: 16px; line-height: 1; }

.day { margin: 18px 0 8px; display: flex; align-items: baseline; gap: 10px; position: sticky; top: calc(var(--topbar, 56px) - 1px); z-index: 5; background: var(--bg); padding: 6px 2px; }
.day:first-child { margin-top: 0; }
.day h2 { font-size: 17px; }
.day span { color: var(--muted); font-size: 13px; }

.list { display: grid; gap: 8px; }
.card {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 4px 12px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px 11px 10px;
  box-shadow: var(--shadow); position: relative; cursor: pointer;
  border-left: 4px solid var(--kat, var(--brand));
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line-2)); border-left-color: var(--kat, var(--brand)); }
.card .time { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; padding-top: 1px; }
.card .time small { display: block; font-family: var(--font); font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.card .main { min-width: 0; }
.card .l1 { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.spzn { font-weight: 700; font-size: 16px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.tag.hl { color: var(--brand-d); background: var(--brand-soft); border-color: transparent; font-weight: 600; }
.tag.warn { color: var(--pink); background: var(--pink-soft); border-color: transparent; font-weight: 600; }
.card .predmet { margin-top: 3px; font-size: 14.5px; }
.card .where { margin-top: 4px; font-size: 13.5px; display: flex; gap: 4px 10px; flex-wrap: wrap; color: var(--muted); }
.card .where b { color: var(--text); font-weight: 600; }
.card .where .sin { color: var(--text); }
.card .ico { display: inline-flex; align-items: center; gap: 4px; }
.card .ico svg { width: 14px; height: 14px; flex: none; opacity: 0.75; }
.loading-text { display: inline-block; min-width: 110px; height: 0.9em; border-radius: 4px; background: linear-gradient(90deg, var(--line-2), var(--panel-2), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; vertical-align: -1px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.star {
  align-self: start; border: 0; background: none; padding: 4px; margin: -4px -4px 0 0; border-radius: 8px; color: var(--muted);
}
.star svg { width: 22px; height: 22px; }
.star:hover { color: var(--brand); background: var(--brand-soft); }
.star[aria-pressed="true"] { color: var(--pink); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.card.off { opacity: 0.62; }
.card.off .time { text-decoration: line-through; text-decoration-thickness: 2px; }
.card.past .time { color: var(--muted); }

.more-btn { display: block; width: 100%; margin: 12px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; font-family: var(--font-display); }

/* podle soudů a síní */
.court { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.court > header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.court > header h3 { font-size: 16px; }
.court > header .n { color: var(--muted); font-size: 13px; margin-right: auto; }
.rooms { display: grid; gap: 0; }
.room { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.room:last-child { border-bottom: 0; }
.room h4 { margin: 0 0 6px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.room h4 small { color: var(--muted); font-weight: 400; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--kat); border-radius: 8px; padding: 4px 8px; background: var(--panel); font-size: 13px; cursor: pointer; }
.slot:hover { border-color: var(--brand); border-left-color: var(--kat); }
.slot b { font-variant-numeric: tabular-nums; }
.slot.off { opacity: 0.55; text-decoration: line-through; }
.slot .star-mini { color: var(--pink); }

/* ---------- dialogy ---------- */
dialog {
  border: 0; padding: 0; border-radius: 18px; background: var(--panel); color: var(--text);
  width: min(720px, calc(100vw - 24px)); max-height: min(88vh, 900px); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(15, 20, 18, 0.45); backdrop-filter: blur(2px); }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
}
.dlg { display: flex; flex-direction: column; max-height: inherit; }
.dlg > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.dlg > header h2 { font-size: 18px; margin-right: auto; }
.dlg > .body { padding: 14px 16px; overflow: auto; }
.dlg > footer { display: flex; gap: 8px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.dlg > footer .info { margin-right: auto; color: var(--muted); font-size: 13.5px; }
.x { border: 0; background: var(--panel-2); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.x:hover { color: var(--text); background: var(--line-2); }
.x svg { width: 18px; height: 18px; }

/* výběr soudů */
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.court-search { width: 100%; margin-bottom: 10px; }
.grp { border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.grp > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; background: var(--panel-2); }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary .t { flex: 1; font-weight: 600; font-size: 14px; }
.grp > summary .n { color: var(--muted); font-size: 12.5px; }
.grp > summary .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.grp[open] > summary .chev { transform: rotate(180deg); }
.grp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 12px; padding: 6px 12px 10px; }
.check { display: flex; align-items: center; gap: 9px; padding: 6px 2px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.check small { color: var(--muted); }

/* detail */
.det-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.det-spzn { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.kv { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 6px 12px; font-size: 14.5px; margin: 10px 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; font-family: var(--font); font-weight: 700; }
.tl { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 3px 0 7px 14px; font-size: 14px; }
.tl li::before { content: ""; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brand); }
.tl li.now::before { background: var(--brand); }
.tl li.zrus { color: var(--muted); text-decoration: line-through; }
.tl li .d { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.hear { display: grid; gap: 6px; }
.hear div { display: flex; gap: 10px; align-items: baseline; font-size: 14px; padding: 7px 10px; border-radius: 10px; background: var(--panel-2); }
.hear div.cur { background: var(--brand-soft); }
.hear div b { font-variant-numeric: tabular-nums; min-width: 118px; }

/* plán */
.plan-day { margin: 4px 0 12px; }
.plan-day h3 { font-size: 15px; margin-bottom: 6px; }
.plan-item { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; align-items: start; }
.plan-item .time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.plan-item .t2 { font-size: 13px; color: var(--muted); }
.plan-item.off { opacity: .6; }
.conflict { font-size: 12.5px; color: var(--pink); margin: -2px 0 8px 62px; }

/* patička */
.foot { max-width: 1280px; margin: 8px auto 40px; padding: 0 24px; color: var(--muted); font-size: 13px; }
.foot details { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.foot summary { cursor: pointer; color: var(--text); font-weight: 600; }
.foot p { margin: 8px 0; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------- úpravy pro telefon ---------- */
.room-day { padding: 8px 14px; font-weight: 700; font-size: 13.5px; background: var(--panel-2); border-bottom: 1px solid var(--line-2); }
.room-day small { color: var(--muted); font-weight: 400; }
.btn-plan { white-space: nowrap; }
@media (max-width: 559px) {
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .brand small { display: none; }
  .brand b { font-size: 18px; }
  .btn-plan { padding: 6px 10px 6px 9px; font-size: 14px; }
  .layout { padding: 12px; gap: 12px; }
  .card { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 10px 10px 8px; }
  .card .time { font-size: 17px; }
  .spzn { font-size: 15px; }
  .card .predmet { font-size: 14px; }
  .card .where { font-size: 13px; gap: 2px 10px; }
  .suggest h3 { flex-wrap: wrap; gap: 0 8px; }
  .sug { width: 200px; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
}
