/* Ticket pages: /tipy, /tipy/novy, /tipy/:id. Only tokens from app.css; custom classes use the tk- prefix. */

/* [hidden] must win over component display rules (.field, .btn, .input-group .addon …) */
.tk-page [hidden], .tk-form [hidden], .tk-modal-body [hidden] { display: none !important; }

.tk-mobile { display: none; }
@media (max-width: 1099px) {
  .tk-desktop { display: none !important; }
  .tk-mobile { display: block; }
}

.tk-eyebrow {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3);
}
.tk-fg { color: var(--fg); }
.tk-dim { opacity: 0.62; }

/* odds drift vs the ticket's odds */
.tk-drift { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-drift.down, .tk-odds-down { color: var(--warn); }
.tk-drift.up, .tk-odds-up { color: var(--pos); }
.tk-odds-down .tk-drift, .tk-odds-up .tk-drift { font-size: inherit; }

/* ---------- /tipy/novy: picker ---------- */
.tk-picker { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.tk-dropzone { min-height: 280px; }
.tk-dropzone:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-dz-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.tk-dz-title { font-size: 17px; font-weight: 700; color: var(--fg); }
.tk-dz-text { color: var(--fg-2); }
.tk-dz-hint { font-size: 13px; color: var(--fg-3); }
.tk-picker-alt { display: flex; justify-content: center; }
@media (max-width: 600px) { .tk-dropzone { min-height: 230px; } }

/* ---------- /tipy/novy: preview + form ---------- */
.tk-new { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tk-new:not(.with-image) { max-width: 820px; }
.tk-new-main { min-width: 0; }
.tk-status:empty { display: none; }
.tk-busy { align-items: center; }
.tk-busy .spinner { flex: none; color: var(--info); }
.tk-busy-main { flex: 1; min-width: 0; }

.tk-shot {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.tk-shot summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 14px;
  cursor: pointer; list-style: none; user-select: none;
}
.tk-shot summary::-webkit-details-marker { display: none; }
.tk-shot summary > svg { margin-left: auto; color: var(--fg-3); transition: transform 0.15s; }
.tk-shot[open] summary > svg { transform: rotate(180deg); }
.tk-shot-sum-text { display: flex; flex-direction: column; line-height: 1.3; }
.tk-shot-thumb {
  width: 40px; height: 56px; flex: none;
  object-fit: cover; object-position: top;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface-3);
}
.tk-shot[open] .tk-shot-thumb { display: none; }
.tk-shot-body { padding: 0 12px 12px; }
.tk-shot-full {
  width: 100%; max-height: 72vh; object-fit: contain;
  border-radius: var(--radius); background: var(--surface-3);
}
@media (min-width: 901px) {
  .tk-new.with-image { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); align-items: start; }
  .tk-new-aside { position: sticky; top: 16px; }
  .tk-shot summary { pointer-events: none; min-height: 0; padding: 12px 14px 10px; }
  .tk-shot summary > svg, .tk-shot-thumb, .tk-shot-toggle { display: none; }
  .tk-shot-full { max-height: calc(100vh - 110px); }
}

/* ---------- ticket form ---------- */
.tk-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tk-form-busy .tk-fieldset > :not(.tk-slip) { opacity: 0.5; }

.tk-slip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.tk-slip-main { min-width: 0; }
.tk-slip-pick { font-size: 22px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; margin-top: 2px; }
.tk-slip-pick.muted { font-weight: 600; }
.tk-slip-market { color: var(--fg-2); font-weight: 600; margin-top: 2px; }
.tk-slip-oddsbox { text-align: right; }
.tk-slip-odds {
  font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 2px;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.tk-slip-meta {
  grid-column: 1 / -1;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-strong);
  color: var(--fg-3); font-size: 13px; overflow-wrap: anywhere;
}

.tk-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tk-choice {
  display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 8px 12px;
  text-align: left; cursor: pointer;
  background: var(--surface); color: var(--fg);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  transition: border-color 0.12s, background 0.12s;
}
.tk-choice:hover { border-color: var(--fg-3); }
.tk-choice.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tk-choice:disabled { cursor: not-allowed; }
.tk-choice-check {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); color: transparent;
}
.tk-choice.active .tk-choice-check { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.tk-choice-text { display: flex; flex-direction: column; min-width: 0; }
.tk-choice-main { font-size: 15px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.tk-choice-sub { font-size: 12px; color: var(--fg-3); }
.tk-invalid > .tk-choices .tk-choice { border-color: var(--neg); }

.tk-sel-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-sel-extra > .field { margin-top: 6px; }
@media (max-width: 600px) { .tk-sel-extra { grid-template-columns: minmax(0, 1fr); } }
.tk-label-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; font-size: 13px; }
.tk-label-value { overflow-wrap: anywhere; }
.tk-linkbtn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px;
  background: none; border: 0; cursor: pointer;
  color: var(--accent-text); font-weight: 600;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.tk-linkbtn:hover { color: var(--accent-hover); }

.tk-no-addon .input { border-radius: var(--radius-sm); }
.tk-sign-btn { min-width: 46px; cursor: pointer; font-size: 18px; color: var(--fg); }
.tk-sign-btn:hover { background: var(--surface-3); }
.tk-odds-input { font-size: 18px !important; font-weight: 700; }
.tk-odds-input::placeholder, .tk-pair .input::placeholder { font-weight: 400; font-size: 15px; color: var(--fg-3); }
.tk-dot-only { gap: 0; }

/* fields the screenshot parse left empty */
.tk-check .input, .tk-check .select, .tk-check .textarea, .tk-check .tk-choice { border-color: var(--warn); }
.tk-check .input, .tk-check .select { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.tk-check > .field-label::after { content: "dopl\0148"; margin-left: 6px; color: var(--warn); font-weight: 700; }

.tk-submit-bar { display: flex; justify-content: flex-end; margin-top: 18px; }
.tk-submit { min-width: 220px; }
@media (max-width: 900px) {
  .tk-submit-bar {
    position: sticky; z-index: 5;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
    margin: 18px -6px 0; padding: 6px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
  }
  .tk-submit { width: 100%; }
}

.tk-dup-box {
  min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}

/* ---------- /tipy/:id ---------- */
.tk-head { align-items: flex-start; }
.tk-head-main { min-width: 0; }
.tk-head-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-head-title h1 { overflow-wrap: anywhere; }

.tk-detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tk-detail > * { min-width: 0; }
@media (min-width: 1100px) {
  .tk-detail {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "hero entry" "list list";
    align-items: start;
  }
  .tk-detail:has(> .tk-area-entry[hidden]) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "list"; }
  .tk-area-hero { grid-area: hero; }
  .tk-area-entry { grid-area: entry; }
  .tk-area-list { grid-area: list; }
}

.tk-hero-body { display: flex; flex-direction: column; gap: 12px; }
.tk-hero-slip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "pick odds thumb";
  gap: 8px 16px; align-items: start;
}
.tk-hero-pick { grid-area: pick; min-width: 0; }
.tk-hero-odds { grid-area: odds; text-align: right; }
.tk-thumb { grid-area: thumb; }
.tk-pick-big { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; overflow-wrap: anywhere; margin-top: 2px; }
.tk-pick-market { color: var(--fg-2); font-weight: 600; margin-top: 4px; }
.tk-hero-meta { color: var(--fg-3); font-size: 12px; margin-top: 8px; }
.tk-odds-big {
  font-size: 36px; font-weight: 800; line-height: 1.05; margin-top: 2px;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.tk-thumb {
  width: 64px; height: 96px; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-3);
}
.tk-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tk-thumb:hover { border-color: var(--border-strong); }
.tk-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.tk-note svg { flex: none; margin-top: 2px; color: var(--fg-3); }
@media (max-width: 600px) {
  .tk-hero-slip { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "pick odds" "pick thumb"; }
  .tk-thumb { justify-self: end; width: 52px; height: 78px; }
  .tk-pick-big { font-size: 24px; }
  .tk-odds-big { font-size: 30px; }
}

.tk-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  border-top: 1px solid var(--border); padding: 0 4px;
}
.tk-stat { padding: 12px 14px; min-width: 0; }
.tk-stat .kpi-value { font-size: 20px; }
.tk-stat .kpi-label { font-size: 11px; }
.tk-stat .progress { margin-top: 8px; }
@media (max-width: 600px) {
  .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-stat { padding: 10px 14px; }
  .tk-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tk-stat .kpi-value { font-size: 18px; }
}

.tk-settle { display: flex; flex-direction: column; gap: 10px; }
.tk-settle:has(> .tk-settle-result) { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.tk-settle-note { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.tk-settle-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tk-settle-btns .btn { padding-left: 8px; padding-right: 8px; }
.tk-settle-result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-settle-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-current { outline: 2px solid var(--focus); outline-offset: 2px; }

.tk-dl-num dd { text-align: right; font-variant-numeric: tabular-nums; }
.tk-big-profit { font-size: 18px; font-weight: 750; }

/* placement entry */
.tk-entry .card-head h2 { font-size: 16px; }
.tk-remaining { font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.tk-entry-form { display: flex; flex-direction: column; gap: 14px; }
.tk-acc-select { min-height: 48px; font-weight: 600; }
.tk-acc-info { font-size: 12px; color: var(--fg-2); font-weight: 500; line-height: 1.5; }
.tk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-partial .tk-pair > :last-child { grid-column: 1 / -1; }
.tk-pair .input { min-height: 48px; font-size: 18px; font-weight: 650; }
.tk-entry-drift { margin-top: -6px; }
.tk-entry-drift .tk-drift { font-size: 13px; }
.tk-seg-full { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.tk-seg-full button { min-height: 40px; padding: 4px 6px; }
.tk-entry .btn-lg { min-height: 52px; font-size: 16px; }

/* placements table + list */
.tk-acc { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.tk-acc a { font-weight: 600; color: var(--fg); }
.tk-acc a:hover { color: var(--accent-text); }
.tk-acc .tk-pl-note { flex-basis: 100%; }
.tk-pl-status { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tk-actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.tk-rejected td:not(.tk-actions-cell) { color: var(--fg-3); }
.tk-rejected .tk-acc a { color: var(--fg-2); }

.tk-pl-item { align-items: flex-start; min-height: 60px; }
.tk-pl-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-pl-title .platform-tag { font-size: 12px; color: var(--fg-2); }
.tk-pl-item .meta { margin-top: 2px; font-size: 13px; }
.tk-pl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.tk-pl-total { background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.tk-rejected.tk-pl-item .title { color: var(--fg-2); }

.tk-pl-modal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tk-full-shot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tk-full-shot img { width: auto; max-width: 100%; max-height: 75vh; border-radius: var(--radius); background: var(--surface-3); }
.tk-full-shot a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }

/* ---------- /tipy ---------- */
.tk-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.tk-toolbar .toolbar { margin-bottom: 0; }
.tk-status-seg { align-self: flex-start; }
.tk-status-seg button { min-height: 36px; }
.tk-seg-warn, .tk-seg-warn .count { color: var(--warn) !important; }
.tk-dates { display: flex; gap: 8px; }
.tk-date-field { display: flex; align-items: center; gap: 6px; }
.toolbar .tk-date { width: 160px; min-width: 0; }
.tk-date-toggle { display: none; }
.tk-date-toggle.tk-on { color: var(--accent-text); border-color: var(--accent); }
@media (max-width: 600px) {
  .tk-status-seg { align-self: stretch; }
  .tk-filters .search { flex: 1 1 0; min-width: 0; }
  .tk-date-toggle { display: inline-flex; flex: none; }
  .tk-dates { flex: 1 1 100%; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tk-show-dates .tk-dates, .tk-has-dates .tk-dates { display: grid; }
  .tk-date-field { flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; }
  .toolbar .tk-date { width: 100%; min-width: 0; }
  .tk-filters > .btn:not(.tk-date-toggle) { flex: 1 1 100%; }
}

.tk-tickets-table td { vertical-align: middle; }
.tk-match-cell { min-width: 180px; }
.tk-match-link { color: var(--fg); font-weight: 650; }
.tk-tickets-table tr.clickable:hover .tk-match-link { color: var(--accent-text); }
.tk-placed { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tk-mini { display: block; width: 76px; height: 4px; }

.tk-ti { align-items: flex-start; }
.tk-ti:hover { text-decoration: none; }
.tk-ti-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-ti-pick { margin-top: 2px; overflow-wrap: anywhere; }
.tk-ti-odds { color: var(--accent-text); font-weight: 650; }
.tk-ti-meta { margin-top: 4px; }
.tk-ti-meta .tk-placed { display: inline; }
.tk-ti-progress { margin-top: 8px; max-width: 220px; }
.tk-ti-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; text-align: right; }
.tk-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) { .tk-more .btn { flex: 1; } }

/* quick links to the bookmaker sites (manual placement happens there) */
.tk-site-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-site-links .small { margin-right: 4px; }

/* ---------- home: upload hero ---------- */
.tk-upload {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  margin-bottom: 20px; padding: 22px 24px;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--border-strong));
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.tk-upload:hover, .tk-upload.over { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.tk-upload:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-upload-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg);
}
.tk-upload-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tk-upload-sub { color: var(--fg-2); margin-top: 2px; }
.tk-upload-hint { color: var(--fg-3); font-size: 12px; margin-top: 6px; }
@media (max-width: 720px) {
  .tk-upload { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 12px 14px; }
  .tk-upload-icon { width: 48px; height: 48px; }
  .tk-upload-title { font-size: 17px; }
  .tk-upload-btn { grid-column: 1 / -1; width: 100%; }
}

/* ---------- match links ---------- */
.tk-matches .card-head { gap: 8px; }
.tk-match-row .main-col { display: flex; flex-direction: column; gap: 2px; }
.tk-match-found { border-color: color-mix(in srgb, var(--pos) 55%, var(--border-strong)); color: var(--pos); }
.tk-match-inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }

/* ---------- /tipy/:id/podat ---------- */
.tk-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; flex-wrap: wrap; counter-reset: step; }
.tk-steps li {
  counter-increment: step; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-3);
  color: var(--fg-3); font-size: 12px; font-weight: 650;
}
.tk-steps li::before {
  content: counter(step); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--fg-3); font-size: 11px;
}
.tk-steps li.done { color: var(--pos); }
.tk-steps li.done::before { content: "✓"; background: var(--pos-soft); color: var(--pos); }
.tk-steps li.current { background: var(--accent-soft); color: var(--accent-text); }
.tk-steps li.current::before { background: var(--accent); color: var(--accent-fg); }

.tk-place-slip { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 18px; }
.tk-place-shot { flex: none; display: block; line-height: 0; }
.tk-place-thumb { width: 72px; height: 108px; object-fit: cover; object-position: top; border-radius: 8px;
  border: 1px solid var(--border); flex: none; transition: transform .12s ease; }
.tk-place-shot:hover .tk-place-thumb { transform: scale(1.03); }
.tk-place-slip-main { flex: 1; min-width: 0; }
.tk-place-pick { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.tk-place-odds { display: flex; flex-direction: column; align-items: flex-end; }
.tk-place-odds .num { font-size: 26px; font-weight: 800; color: var(--accent-text); line-height: 1.1; }
.tk-place-head { margin-bottom: 14px; }

.tk-plan-bulk { margin-bottom: 14px; }
.tk-plan-bulk .card-body { gap: 10px; padding: 12px 16px; }
.tk-plan-bulk-in { width: 150px; }
.tk-plan-group .card-head { padding-top: 12px; padding-bottom: 12px; }
.tk-plan-rows { display: flex; flex-direction: column; }
.tk-plan-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 4px 16px;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
}
.tk-plan-row:last-child { border-bottom: none; }
.tk-plan-row.on { background: var(--accent-soft); }
.tk-plan-pick { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; min-width: 0; flex-wrap: wrap; }
.tk-plan-pick input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.tk-plan-acc { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tk-plan-stake .input { font-size: 16px; font-weight: 650; }
.tk-plan-warn { grid-column: 1 / -1; color: var(--warn); display: flex; align-items: center; gap: 4px; }
.tk-plan-warn:empty { display: none; }
.tk-plan-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .tk-plan-bar { bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); }
  .tk-plan-bar .btn { width: 100%; }
}
@media (max-width: 600px) {
  .tk-plan-row { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
  .tk-plan-bulk-in { flex: 1; width: auto; }
  .tk-place-pick { font-size: 16px; }
}

.tk-place-rows { display: flex; flex-direction: column; }
.tk-place-row { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.tk-place-row:last-child { border-bottom: none; }
.tk-place-row.done { background: var(--surface-2); }
.tk-place-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-place-inputs { display: grid; grid-template-columns: 170px 120px minmax(0, 1fr); gap: 10px; align-items: end; }
.tk-place-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-place-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-place-finish { border-color: color-mix(in srgb, var(--pos) 45%, var(--border)); margin-bottom: 16px; }
.tk-place-finish svg { color: var(--pos); }
@media (max-width: 600px) {
  .tk-place-row { padding: 12px 14px; }
  .tk-place-inputs { grid-template-columns: 1fr 1fr; }
  .tk-place-inputs > span { grid-column: 1 / -1; }
  .tk-place-actions .btn { flex: 1; }
}
@media (max-width: 600px) {
  .tk-plan-row:not(.on) .tk-plan-stake { display: none; }
}
.tk-timing .strong { font-size: 15px; }
.tk-timing-host:not(:empty) { margin-bottom: 16px; }
.callout.error.tk-timing { border: 1px solid color-mix(in srgb, var(--neg) 45%, transparent); }
@media (max-width: 600px) {
  .tk-plan-bulk .card-body > .small { width: 100%; }
  .tk-plan-bulk-in { flex: 1; min-width: 0; }
}

/* ---------- rozdelenie sumy a účtov (krok „Účty a sumy“) ---------- */
.tk-dist { margin-top: 12px; }
.tk-dist .card-head { align-items: flex-start; }
.tk-dist .card-head h2 { margin: 0; font-size: 17px; }
.tk-dist .card-head .sub { margin-top: 3px; }
.tk-dist-form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.tk-dist-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-dist-field .input-group { width: 150px; }
.tk-dist-field > .input { width: 96px; }
.tk-dist-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.tk-dist-info {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.tk-dist-info:empty { display: none; }
.tk-dist-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--fg-2); white-space: nowrap;
}
.tk-dist-chip.strong { font-weight: 700; color: var(--fg); }
.tk-dist-chip.pos { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, var(--border)); background: var(--pos-soft); }
.tk-dist-chip.warn-text { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.tk-dist-rows { display: flex; flex-direction: column; }
.tk-dist-row {
  display: grid; grid-template-columns: minmax(150px, 1.4fr) 104px 74px minmax(150px, 1fr);
  gap: 8px 16px; align-items: center; padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.tk-dist-row:first-child { border-top: none; }
.tk-dist-broker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tk-dist-weight { display: flex; align-items: center; gap: 6px; }
.tk-dist-w-input { width: 58px; text-align: right; }
.tk-dist-count { font-weight: 650; white-space: nowrap; }
.tk-dist-share { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; }
.tk-dist-share .strong { font-variant-numeric: tabular-nums; }
.tk-dist-empty { padding: 12px 16px; }
@media (max-width: 760px) {
  .tk-dist-form { align-items: stretch; }
  .tk-dist-field { flex: 1 1 130px; }
  .tk-dist-field .input-group, .tk-dist-field > .input { width: 100%; }
  .tk-dist-actions { margin-left: 0; width: 100%; }
  .tk-dist-actions .btn { flex: 1 1 auto; }
  .tk-dist-actions .btn-ghost { flex: 0 1 auto; margin-left: auto; }
  .tk-dist-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .tk-dist-broker { grid-column: 1 / -1; }
  .tk-dist-count { justify-self: start; }
  .tk-dist-share { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}
