:root {
  --bg: #f4f5f1;
  --panel: #fff;
  --panel-2: #f2f4f0;
  --line: #dce1d9;
  --fg: #202c26;
  --muted: #647268;
  --go: #176b51;
  --warn: #936323;
  --err: #ab3f33;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a.button {
  cursor: pointer;
}
button {
  color: inherit;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 11px 16px;
  min-height: 44px;
}
button:hover,
a.button:hover {
  filter: brightness(0.97);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--go);
}
a.button {
  text-decoration: none;
  display: inline-block;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 10px;
  background: white;
}
button.primary,
.primary {
  background: var(--go);
  color: white;
  border-color: var(--go);
}
button.danger {
  color: var(--err);
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}
header {
  max-width: 680px;
  margin: auto;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand {
  text-decoration: none;
  font-weight: 800;
  font-size: 24px;
  color: var(--fg);
}
.brand span {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
  margin-left: 12px;
}
main {
  max-width: 680px;
  margin: auto;
  padding: 10px 28px 60px;
}
.intro {
  margin: 20px 0 28px;
}
.eyebrow {
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--go);
}
h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin: 8px 0 12px;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.intro > p:last-child,
.hint {
  color: var(--muted);
  font-size: 14px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.action {
  text-align: left;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 157px;
  gap: 3px;
  border-radius: 18px;
}
.action strong {
  font-size: 21px;
}
.action > span:last-child {
  font-size: 13px;
  opacity: 0.8;
}
.symbol {
  font-size: 27px;
  line-height: 1;
  margin-bottom: 15px;
}
.arrival {
  background: #dfece4;
  border-color: #cddfd3;
  color: #174d3c;
}
.journal {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-top: 24px;
  overflow: hidden;
}
.journal-head {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.month-nav button {
  border: 0;
  font-size: 22px;
  padding: 4px 12px;
}
.month-nav input {
  max-width: 180px;
}
.filters {
  display: flex;
  gap: 12px;
  padding: 0 24px;
}
.filters label {
  margin: 0;
}
.filters label > span {
  font-size: 12px;
}
.search {
  flex: 1;
}
.summary {
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.summary strong {
  font-size: 28px;
  letter-spacing: -0.6px;
}
.summary span {
  font-size: 14px;
  color: var(--muted);
}
.summary .missing {
  color: var(--warn);
}
.table-scroll {
  position: relative;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  background: #f7f8f5;
}
td,
th {
  padding: 14px 20px;
  border-top: 1px solid #e9ede6;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
td:nth-child(2) {
  min-width: 160px;
}
td:nth-child(3) {
  min-width: 150px;
}
.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge {
  font-size: 11px;
  border-radius: 6px;
  padding: 4px 7px;
  background: #edf2ec;
  color: var(--muted);
  white-space: nowrap;
}
.badge.open {
  background: #fff0d6;
  color: #8b5f22;
}
.export {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 14px;
}
.export > span {
  flex: 1;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 30px 20px 45px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--fg);
  font-size: 18px;
  margin-bottom: 8px;
}
.banner {
  padding: 16px 18px;
  background: #e8eee4;
  border: 1px solid #d6dfd0;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}
.banner > div {
  flex: 1;
}
.banner p {
  margin: 2px 0;
  font-size: 13px;
  color: var(--muted);
}
.banner button {
  flex: none;
}
.banner.draft {
  background: #fff3db;
  border-color: #eddeba;
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 22px;
  width: min(680px, calc(100% - 24px));
  max-height: 92dvh;
  box-shadow: 0 20px 80px #15322530;
  color: var(--fg);
  background: var(--panel);
}
dialog::backdrop {
  background: #16251f88;
}
#editor-body {
  padding: 26px;
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dialog-head p {
  margin: 5px 0;
}
.close {
  font-size: 24px;
  line-height: 1;
  padding: 8px 12px;
}
.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
label {
  min-width: 0;
  display: block;
  margin: 12px 0;
}
label > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  color: var(--fg);
  min-height: 46px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #94b5a4;
  outline-offset: 1px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #93b29e;
  outline-offset: 2px;
}
textarea {
  resize: vertical;
  min-height: 74px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 16px 0;
  padding: 12px 16px;
  min-width: 0;
}
legend {
  font-weight: 700;
  padding: 0 7px;
}
.photo-actions,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.photo-actions button,
.chips button {
  font-size: 13px;
  padding: 8px 11px;
}
.chips {
  margin: 10px 0;
}
.photo-status {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
  min-height: 18px;
}
.photo-preview {
  max-height: 130px;
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 10px;
}
.photo-preview[hidden] {
  display: none;
}
.inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline input {
  flex: 1;
}
.inline button {
  white-space: nowrap;
  font-size: 13px;
}
.distance {
  background: #f0f5ed;
  border: 1px solid #d6e2d1;
  border-radius: 14px;
  padding: 6px 16px 14px;
  margin: 16px 0;
}
.distance input {
  font-size: 22px;
  font-weight: 700;
}
.distance .hint {
  margin: 6px 0;
  font-size: 12px;
}
.computed {
  font-size: 13px;
  color: var(--go);
}
details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
}
summary {
  cursor: pointer;
  min-height: 40px;
  color: var(--muted);
  font-size: 14px;
}
.savebar {
  position: sticky;
  bottom: -26px;
  background: white;
  padding: 16px 0 calc(10px + var(--safe-b));
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.savebar .primary {
  flex: 1;
  font-weight: 700;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 20px;
  min-height: 20px;
}
.error {
  color: var(--err);
  font-size: 14px;
}
.choose-trip {
  display: block;
  text-align: left;
  width: 100%;
  margin: 10px 0;
}
.choose-trip small {
  display: block;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: calc(24px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  background: #20392c;
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  max-width: 90vw;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
}
#toast.on {
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 600px) {
  header {
    padding: 16px;
  }
  .brand span {
    margin-left: 6px;
  }
  main {
    padding: 0 14px 35px;
  }
  .intro {
    margin: 20px 2px;
  }
  h1 {
    font-size: 28px;
  }
  .journal-head {
    padding: 18px 14px;
    flex-wrap: wrap;
  }
  .journal-head h2 {
    font-size: 20px;
  }
  .filters {
    padding: 0 14px;
    flex-wrap: wrap;
  }
  .filters label {
    flex: 1;
    min-width: 120px;
  }
  .filters .search {
    flex-basis: 100%;
  }
  .summary {
    padding: 16px 14px;
    gap: 10px;
  }
  .summary strong {
    font-size: 26px;
  }
  td,
  th {
    padding: 12px 14px;
  }
  .export {
    padding: 16px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .export > span {
    flex-basis: 100%;
    font-size: 12px;
  }
  .banner {
    padding: 12px;
    flex-wrap: wrap;
  }
  .banner > div {
    min-width: 160px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 96dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  #editor-body {
    padding: 20px 16px;
  }
  .two {
    grid-template-columns: 1fr;
    gap: 0;
  }
  fieldset {
    padding: 10px 12px;
  }
  .savebar {
    bottom: -20px;
  }
  .photo-actions {
    gap: 6px;
  }
  .photo-actions button {
    padding: 8px;
  }
  .brand {
    font-size: 22px;
  }
}

html:has(dialog[open]) {
  overflow: hidden;
}
dialog {
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------
   Přehled: kde auto stojí, dlaždice, plynulý seznam po měsících
   --------------------------------------------------------------------- */
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
  color: var(--muted);
}
.icon.xs {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}
.icon.go {
  color: var(--go);
}
.car {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.car-state {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 96px;
}
.car-label,
.car-note {
  font-size: 14px;
  color: var(--muted);
}
.car-place {
  font-size: 20px;
  line-height: 1.25;
}
.car-km {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.car-km small {
  font-size: 19px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0;
}
.car-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.car-actions .action {
  min-height: 76px;
  padding: 14px 16px;
  gap: 2px;
  border-radius: 16px;
}
.car-actions .action strong {
  font-size: 17px;
  line-height: 1.2;
  margin-top: 4px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.tiles .tile[hidden] {
  display: none;
}
.tiles:has(.tile[hidden]) {
  grid-template-columns: 1fr;
}
.tile {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 64px;
}
.tile > span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.tile strong {
  font-size: 15px;
}
.tile > span > span {
  font-size: 13px;
  color: var(--muted);
}
#rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}
.month {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  padding-bottom: 6px;
}
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 6px 8px 18px;
}
.month-head h2 {
  font-size: 20px;
}
.month-sum {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.month-sum small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--go);
}
.trip {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 11px 18px;
  text-align: left;
  border: 0;
  border-top: 1px solid #edf0ea;
  border-radius: 0;
  background: transparent;
}
.trip-when {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 14px;
  font-weight: 600;
}
.trip-when small,
.trip-route small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.trip-route {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.trip-route small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  font-size: 16px;
  font-weight: 600;
  min-width: 0;
}
.trip-km {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.trip-km small,
.leg .km small,
.stepper small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}
.tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #edf2ec;
  color: var(--muted);
}
.tag.warn {
  background: #fff0d6;
  color: #8b5f22;
}
.gap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 12px;
  padding: 8px 8px 8px 14px;
  border: 1px dashed #c3ccbf;
  border-radius: 12px;
  background: #f7f8f5;
}
.gap > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-size: 14px;
  min-width: 0;
}
.gap small {
  font-size: 13px;
  color: var(--muted);
}
.gap button {
  color: var(--go);
  font-weight: 600;
  font-size: 14px;
  border-color: #c9dcd0;
}

/* ---------------------------------------------------------------------
   Dopsat jízdu a Doplnit kilometry
   --------------------------------------------------------------------- */
.sheet h3 {
  font-size: 16px;
  margin: 20px 0 8px;
}
.sheet .dialog-head {
  align-items: center;
}
.q-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.q-card .two label {
  margin: 4px 0;
}
.q-from-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.q-from-row strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.q-from-row .right {
  text-align: right;
}
.q-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.q-from-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #14523e;
  background: #e1ede6;
  border-radius: 999px;
  padding: 4px 10px;
}
.link {
  border: 0;
  background: transparent;
  color: var(--go);
  font-weight: 600;
  font-size: 14px;
  padding: 0 6px;
}
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice button {
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 15px;
}
.choice.small button {
  min-height: 40px;
  padding: 0 11px;
  font-size: 14px;
}
.choice button[aria-pressed="true"],
.choice button[aria-checked="true"],
.dest[aria-pressed="true"] {
  background: var(--go);
  color: white;
  border-color: var(--go);
}
.q-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
}
.q-row label {
  margin: 0;
  flex: 1 1 130px;
}
.q-arrive {
  flex: 1 1 110px;
  padding-bottom: 8px;
}
.q-arrive strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.dest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  text-align: left;
}
.dest strong {
  font-size: 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dest span {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dest[aria-pressed="true"] span {
  color: #d4eadf;
}
.dest.other {
  justify-content: flex-start;
  align-items: center;
  color: var(--go);
  font-weight: 600;
  border-style: dashed;
  border-color: #b9c9be;
  background: transparent;
}
.dest.other[aria-pressed="true"] {
  color: white;
  border-style: solid;
  background: var(--go);
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 16px;
  text-align: left;
}
.switch-row small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: #c7cfc6;
}
.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px #202c264d;
}
.switch-row[aria-checked="true"] .switch {
  background: var(--go);
}
.switch-row[aria-checked="true"] .switch span {
  left: 23px;
}
.q-back {
  margin-top: 10px;
}
.q-summary {
  margin-top: 14px;
}
.leg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #edf0ea;
}
.leg small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.leg .km,
.stepper strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.leg .km small,
.leg .stepper small {
  display: inline;
}
.full-form {
  display: block;
  margin: 8px auto 0;
  min-height: 44px;
}
#q-save:disabled,
#g-save:disabled,
#b-save:disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.warnbox {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbf6ec;
  border: 1px solid #ead9b9;
  font-size: 14px;
  color: #6b5a3a;
}
.gap-km {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gap-km small {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
  letter-spacing: 0;
}
.timeline {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid #c3ccbf;
}
.timeline li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 4px 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--go);
}
.timeline span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-size: 15px;
}
.timeline small {
  font-size: 13px;
  color: var(--muted);
}
.timeline b {
  font-variant-numeric: tabular-nums;
}
.seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  background: #e6e9e3;
  border-radius: 14px;
}
.seg button {
  border: 0;
  border-radius: 11px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
}
.seg button[aria-checked="true"] {
  background: white;
  color: var(--fg);
  box-shadow: 0 1px 2px #202c262e;
}
.legs-card {
  margin-top: 16px;
}
.legs-card > .hint {
  margin: 0 0 4px;
}
.leg-edit {
  padding-bottom: 10px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stepper button {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 20px;
}
.stepper strong {
  min-width: 64px;
  text-align: center;
}
.trip-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 10px;
}
.trip-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 64px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 14px;
}
.trip-actions button:first-child {
  background: #e1ede6;
  border-color: #c9dcd0;
  color: #14523e;
}
.trip-actions .danger {
  border-color: #ecd2cd;
}
.take-km {
  display: block;
  color: var(--go);
  font-weight: 600;
  padding-left: 0;
}
.undo-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(24px + var(--safe-b));
  width: min(560px, calc(100% - 32px));
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  border-radius: 16px;
  background: #202c26;
  color: white;
  box-shadow: 0 6px 18px #202c2640;
}
.undo-bar[hidden] {
  display: none;
}
.undo-bar button {
  border: 0;
  background: transparent;
  color: #9fd8bf;
  font-weight: 700;
}
@media (max-width: 600px) {
  .car {
    padding: 16px 16px 14px;
  }
  .car-km {
    font-size: 40px;
  }
  .trip {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    padding: 10px 14px;
  }
  .month-head {
    padding-left: 14px;
  }
  .sheet .two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
}

/* Ze fotek */
.photos {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.photo-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: start;
  padding: 12px;
}
.photo-row + .photo-row {
  border-top: 1px solid var(--line);
}
.photo-row img {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: #d9ded6;
}
.photo-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 15px;
}
.photo-main small,
.photo-km small {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}
.photo-main small.guess {
  color: var(--warn);
}
.photo-main input,
.photo-km input {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 15px;
}
.photo-km {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.photo-km input {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.photo-km .st-ok {
  color: var(--go);
}
.photo-km .st-unread,
.photo-km .st-failed {
  color: var(--err);
}
.proposal {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.proposal input {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--go);
}
.proposal .trip-route small {
  white-space: normal;
}
