/* ---------- Heart (Oblíbené) ---------- */
/* The sprite heart is an outline; --icon-fill fills it when saved. Long press must not pop the system menu. */
.heart { display: inline-flex; align-items: center; flex: none; border-radius: var(--radius-pill); -webkit-touch-callout: none; user-select: none; }
.heart__toggle, .heart__more { display: grid; place-items: center; min-width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: inherit; background: none; color: var(--text-2); cursor: pointer; touch-action: manipulation; -webkit-touch-callout: none; }
.heart__toggle svg { width: 24px; height: 24px; transition: transform var(--dur-2) var(--ease-spring), color var(--dur-2); }
.heart__toggle:hover { color: var(--text); }
.heart__toggle[aria-pressed="true"] { color: var(--accent); }
.heart__toggle[aria-pressed="true"] svg { --icon-fill: currentColor; filter: drop-shadow(0 0 6px var(--glow)); }
.heart__toggle:active svg { transform: scale(0.82); }
.heart__toggle:focus-visible, .heart__more:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -3px; }
.heart__more { min-width: 36px; color: var(--text-3); }
.heart__more svg { width: 18px; height: 18px; }
.heart--split { border: 1px solid var(--line-strong); background: var(--surface-2); }
.heart--split .heart__toggle { min-width: 46px; height: 44px; }
.heart--split .heart__more { height: 44px; border-left: 1px solid var(--line); border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.heart--overlay { position: absolute; top: 6px; right: 6px; z-index: 1; background: color-mix(in oklab, var(--bg-raised) 80%, transparent); backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgb(0 0 0 / 0.3); }
.heart--overlay:not(.heart--split) .heart__toggle { min-width: 42px; height: 42px; }
.detail-hero > .heart--overlay { top: 12px; right: 12px; }
/* Phones: the tin spans the card, so the heart sits in the card's bottom corner, clear of the printed name. */
@media (max-width: 639px) {
    .detail-hero > .heart--overlay { top: auto; bottom: var(--space-4); right: var(--space-4); }
    .detail-hero:has(> .heart--overlay) > .stack > .row:last-child { min-height: 44px; padding-right: 96px; }
}

/* A catalogue card with its heart (or a remove button) as a sibling on the top-right corner, never inside the link. */
.saveable { position: relative; display: grid; min-width: 0; }
.saveable > .card { min-width: 0; }
.saveable > .tobacco-tile .tobacco-tile__head { padding-right: 38px; }
.saveable:has(> a.card:hover) > .heart--overlay { translate: 0 -2px; }
.saveable__remove { position: absolute; top: 6px; right: 6px; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: color-mix(in oklab, var(--bg-raised) 85%, transparent); backdrop-filter: blur(6px); color: var(--text-2); cursor: pointer; }
.saveable__remove svg { width: 20px; height: 20px; }
.saveable__remove:hover { color: var(--danger); border-color: color-mix(in oklab, var(--danger) 45%, transparent); }
.saveable__remove:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Icon buttons kept on the title's line (page.head tools). */
.page-head__main:has(> .page-head__tools) { flex-wrap: nowrap; align-items: flex-start; }
.page-head__tools { display: flex; flex: none; gap: var(--space-2); }

/* ---------- Tabs with counts under the labels on phones ---------- */
@media (max-width: 479px) {
    /* Labels start at the same height whether a count sits under them or not. */
    .tabs--stacked .tabs__tab { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 10px 2px 4px; font-size: 0.9375rem; line-height: 1.1; }
    .tabs--stacked .tabs__tab .count { margin: 0; padding: 0 6px; font-size: 11px; line-height: 16px; }
}

/* ---------- Tappable badge cards and rank ---------- */
.badge__open { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.badge__open:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.badge:has(> .badge__open) { transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2); }
.badge:has(> .badge__open:hover) { box-shadow: 0 0 0 1px var(--line-strong); }
.badge:has(> .badge__open:active) { transform: scale(0.985); }
.zar-summary__main { position: relative; }
.zar-summary__open { position: absolute; inset: -6px; z-index: 1; padding: 0; border: 0; border-radius: var(--radius-m); background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.zar-summary__open:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.zar-summary__main:has(> .zar-summary__open:hover) .rank-ring__fill { filter: drop-shadow(0 0 8px var(--rank)); }

/* ---------- Ladders: a track's tiers, the ranks ---------- */
.ladder-hero { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-3); border-radius: var(--radius-l); background: radial-gradient(80% 100% at 50% 0%, color-mix(in oklab, var(--frame, var(--badge, var(--rank, var(--accent)))) 18%, transparent), transparent 72%), var(--bg-sunken); text-align: center; }
.ladder-hero__hint { margin: 0; max-width: 34ch; color: var(--text-2); }
.ladder-hero__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ladder-hero__chips .icon { width: 14px; height: 14px; }
.ladder-hero--rank .rank-ring { width: 80px; height: 80px; }
.ladder-hero--mystery .ladder-hero__hint { font-style: italic; }
.ladder-hero__mark { display: grid; place-items: center; width: 84px; height: 84px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: radial-gradient(closest-side, var(--accent-soft), transparent), var(--bg-raised); color: var(--accent-2); font-family: var(--font-display); font-size: 44px; font-weight: 800; animation: mystery 3.2s ease-in-out infinite; }

.ladder-emblem, .ladder__emblem { position: relative; display: grid; place-items: center; }
.ladder-emblem .emblem { width: 88px; height: 88px; }
.ladder-emblem--on .emblem { filter: drop-shadow(0 0 12px color-mix(in oklab, var(--frame, var(--badge)) 55%, transparent)); }
:is(.ladder-emblem--on, .ladder__emblem) .emblem__plate { stroke: var(--frame, var(--badge)); stroke-width: 2.2; }
.ladder-emblem:not(.ladder-emblem--on) .emblem__plate { fill: var(--bg-sunken); stroke: var(--line-strong); stroke-dasharray: 3 2.4; }
.ladder-emblem:not(.ladder-emblem--on) :is(.emblem__ring, .emblem__facet) { opacity: 0; }
.ladder-emblem:not(.ladder-emblem--on) .emblem__glyph { color: var(--text-3); }
:is(.ladder-emblem__roman, .ladder__roman) { position: absolute; bottom: -5px; left: 50%; translate: -50% 0; min-width: 22px; padding: 0 5px; border-radius: var(--radius-pill); border: 1.5px solid var(--frame, var(--line-strong)); background: var(--bg); color: var(--frame, var(--text-2)); font-family: var(--font-display); font-size: 11px; font-weight: 800; line-height: 1.35; text-align: center; }

.ladder { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ladder__row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-m); }
.ladder__row--current { background: color-mix(in oklab, var(--accent) 8%, var(--bg-raised)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent); }
.ladder__emblem { width: 48px; height: 48px; }
.ladder__emblem .emblem { width: 44px; height: 44px; }
.ladder__row--ahead :is(.ladder__emblem, .ladder__level) { opacity: 0.4; filter: grayscale(0.85); }
.ladder__row--ahead .ladder__emblem .emblem { animation: none; filter: none; }
.ladder__main { display: grid; gap: 5px; min-width: 0; }
.ladder__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.ladder__top .rank { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; }
.ladder__goal { font-family: var(--font-display); font-size: var(--step-2); font-weight: var(--display-weight); line-height: 1; color: var(--text); }
.ladder__reward { flex: none; font-size: var(--step--1); font-weight: 800; color: var(--accent-2); }
.ladder__row--ahead :is(.ladder__goal, .ladder__reward) { color: var(--text-3); }
.ladder__state { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.ladder__state .icon { width: 14px; height: 14px; }
.ladder__state--done { justify-content: flex-start; gap: 4px; color: var(--ok); }
.ladder__state--done time { color: var(--text-2); }
.ladder .meter { height: 8px; }
.ladder__level { display: grid; place-items: center; justify-self: center; width: 40px; height: 40px; border: 2.5px solid var(--rank); border-radius: 50%; color: var(--rank); font-family: var(--font-display); font-weight: 800; box-shadow: 0 0 10px color-mix(in oklab, var(--rank) 35%, transparent); }
.ladder__row--ahead .ladder__level { border-style: dashed; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .ladder-hero__mark { animation: none; } }

/* ---------- Kolekce: list cards, a list, the save sheet ---------- */
.kolekce-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.list-cards { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .list-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.list-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); height: 100%; padding: var(--space-3); }
.list-card .cover-tile { --tile: 64px; }
.list-card__heart { display: grid; place-items: center; color: var(--accent); background: radial-gradient(closest-side, var(--accent-soft), transparent), var(--bg-sunken); }
.list-card__heart .icon { width: 30px; height: 30px; --icon-fill: currentColor; }
.list-card__body { display: grid; gap: 4px; min-width: 0; }
.list-card__name { display: flex; align-items: center; gap: 6px; font-size: var(--step-1); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.list-card__mark { flex: none; width: 18px; height: 18px; color: var(--accent); --icon-fill: currentColor; }
.list-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--step--1); font-weight: 700; color: var(--text-3); }
.list-card__meta b { color: var(--text); }
.list-card__privacy { display: inline-flex; align-items: center; gap: 4px; }
.list-card__privacy .icon { width: 14px; height: 14px; }
.list-card__go { width: 20px; height: 20px; color: var(--text-3); }
.list-card--default { border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--bg-raised); }

.list-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.list-head__art { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: var(--radius-l); background: radial-gradient(closest-side, var(--accent-soft), transparent), var(--bg-raised); color: var(--accent); }
.list-head__art .icon { width: 28px; height: 28px; --icon-fill: currentColor; }
.list-head__text { display: grid; gap: 2px; min-width: 0; }
.list-head h1 { font-size: var(--step-3); overflow-wrap: anywhere; }
.list-head__meta { margin: 0; font-size: var(--step--1); font-weight: 700; color: var(--text-3); }
.list-head__meta b { color: var(--text); }
.list-head__tools { display: flex; gap: var(--space-2); }
.list-privacy { align-self: flex-start; font-weight: 700; }
.list-privacy .icon { width: 18px; height: 18px; color: var(--text-3); }

.save-sheet { display: grid; gap: var(--space-3); }
.save-sheet__what { display: flex; align-items: center; gap: var(--space-3); margin: 0; color: var(--text); }
.save-sheet__what .cover-tile { --tile: 48px; }
.save-sheet__lists { display: grid; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.save-sheet__lists > li + li { border-top: 1px solid var(--line); }
.save-sheet__row { min-height: 52px; }
.save-sheet__icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.save-sheet__icon .icon { width: 18px; height: 18px; }
.save-sheet__row:has(input:checked) .save-sheet__icon { background: var(--accent-soft); color: var(--accent); --icon-fill: currentColor; }
.save-sheet__name { flex: 1; min-width: 0; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); }

/* Public profile section titles with their icon. */
.section-title-icon { display: flex; align-items: center; gap: var(--space-2); }
.section-title-icon > .icon { width: 20px; height: 20px; color: var(--accent-2); }

/* ---------- Sbírka: club mixes ---------- */
.mix-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .mix-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .mix-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mix-shelf > li[hidden] { display: none; }
.mix-tile { display: grid; justify-items: center; align-content: start; gap: 6px; height: 100%; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-raised); color: inherit; text-align: center; text-decoration: none; }
.mix-tile:hover { border-color: var(--line-strong); }
.mix-tile--tasted { border-color: color-mix(in oklab, var(--ok) 30%, var(--line)); }
.mix-tile:not(.mix-tile--tasted) .cover-tile { filter: grayscale(0.5); opacity: 0.75; }
.mix-tile__pic { position: relative; }
.mix-tile__name { display: -webkit-box; overflow: hidden; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.mix-tile .tasted { justify-self: center; }
.mix-tile__todo { font-size: 12px; font-weight: 700; color: var(--text-3); }
