:root {
  --bg: #0e1016;
  --surface: #171a23;
  --surface-2: #20242f;
  --line: #2a2f3c;
  --text: #eceef3;
  --muted: #9aa2b1;
  --accent: #ffb547;
  --accent-ink: #1b1305;
  --chip-off: .38;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #eceef2;
    --line: #dde0e6;
    --text: #151821;
    --muted: #5c6474;
    --accent: #b86e00;
    --accent-ink: #ffffff;
    --chip-off: .45;
    --shadow: 0 10px 30px rgba(20, 24, 33, .15);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* záhlaví a záložky */
.top { background: var(--bg); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.updated { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  appearance: none; background: none; border: 0; cursor: pointer; white-space: nowrap;
  padding: 10px 12px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* filtry */
.filters { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filters-in { padding-top: 10px; padding-bottom: 10px; display: grid; gap: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; cursor: pointer;
  padding: 4px 11px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600;
}
.chip img { width: 24px; height: 24px; border-radius: 6px; }
.chip[aria-pressed="false"] { opacity: var(--chip-off); }
.chip[aria-pressed="false"] img { filter: grayscale(1); }
.chip.all { padding-left: 11px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { appearance: none; border: 0; background: none; cursor: pointer; padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.search { flex: 1 1 200px; display: flex; }
.search input {
  width: 100%; min-width: 0; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px;
}

/* seznam */
main { padding-top: 6px; padding-bottom: 32px; min-height: 60vh; }
.day { margin-top: 22px; }
.day h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.day h2 .rel { color: var(--accent); }
.day h2 .cnt { color: var(--muted); font-weight: 500; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px 14px; align-items: start; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; } body { font-size: 14px; } }
@media (max-width: 360px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { appearance: none; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; display: block; width: 100%; min-width: 0; }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card:hover .poster img { transform: scale(1.04); }
.poster .noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.badge {
  position: absolute; left: 6px; top: 6px; max-width: calc(100% - 12px);
  padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
  background: var(--accent); color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge.gone { background: #6b7280; color: #fff; }
.rate { position: absolute; right: 6px; bottom: 7px; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .72); color: #fff; }
.logos { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; }
.logos img { width: 22px; height: 22px; border-radius: 5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.c-title { margin: 8px 0 0; font-size: 14px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.more { display: block; margin: 28px auto 0; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }

/* patička */
.foot { color: var(--muted); font-size: 12.5px; padding-top: 18px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 8px; max-width: 900px; }
.foot strong { color: var(--text); font-weight: 600; }

/* detail */
dialog {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: auto; overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(5, 6, 10, .7); backdrop-filter: blur(3px); }
.d-hero { position: relative; aspect-ratio: 16 / 7; background: var(--surface-2); }
.d-hero img { width: 100%; height: 100%; object-fit: cover; }
.d-rest { padding: 0 22px 22px; }
.d-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 35%, var(--surface)); }
.d-close {
  position: absolute; right: 10px; top: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; line-height: 1;
}
.d-main { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 0 22px 22px; margin-top: -70px; position: relative; z-index: 1; }
.d-main.noh { margin-top: 0; padding-top: 22px; }
.d-poster { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 2 / 3; background: var(--surface-2); }
.d-poster img { width: 100%; height: 100%; object-fit: cover; }
.d-info { min-width: 0; padding-top: 74px; }
.d-main.noh .d-info { padding-top: 0; }
.d-info h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.d-orig { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.d-meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.d-meta b { color: var(--text); }
.d-events { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.d-events li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.d-events img { width: 22px; height: 22px; border-radius: 5px; }
.d-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.d-ov { margin: 16px 0 0; font-size: 14.5px; line-height: 1.55; }
.d-ov .lang { color: var(--muted); font-size: 12px; }
.d-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.d-links a {
  text-decoration: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; font-weight: 600;
}
.d-links a.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 560px) {
  .d-main { grid-template-columns: 96px 1fr; gap: 14px; padding: 0 16px 18px; margin-top: -40px; }
  .d-info { padding-top: 44px; }
  .d-info h3 { font-size: 18px; }
  .d-rest { padding: 0 16px 18px; }
}
@media (prefers-reduced-motion: reduce) { .poster img { transition: none; } .card:hover .poster img { transform: none; } }
