:root {
  --brand: #8c301f;
  --brand-2: #a7422d;
  --bg: #fbf7f0;
  --card: #ffffff;
  --text: #1a1614;
  --muted: #6b625c;
  --line: #e7ded3;
  --tag-bg: #f4e7e2;
  --shadow: 0 1px 2px rgba(60, 30, 20, .06), 0 4px 16px rgba(60, 30, 20, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e0836e;
    --brand-2: #f09a86;
    --bg: #141110;
    --card: #1e1a18;
    --text: #f1ebe6;
    --muted: #a99d95;
    --line: #342d29;
    --tag-bg: #3a2621;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; }
a { color: var(--brand); }

/* ---------- horní lišta ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: #8c301f; color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { border-radius: 50%; background: #fbf7f0; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 20px; letter-spacing: .01em; }
.brand small { font-size: 12px; opacity: .8; }
body.detail .brand { display: none; }
.actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer;
}
.iconbtn:active { background: rgba(255,255,255,.15); }
#bellBtn[aria-pressed="true"] .slash { display: none; }
#bellBtn[aria-pressed="true"] svg path:first-child { fill: currentColor; }
.pill {
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  background: #fff; color: #8c301f; font-weight: 700; font-size: 14px;
}
.pill.wide { width: 100%; padding: 12px; font-size: 16px; background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .pill.wide { color: #141110; } }

.notice { background: #3b3330; color: #fff; text-align: center; font-size: 14px; padding: 6px 12px; }
.newbanner { position: sticky; top: calc(env(safe-area-inset-top) + 64px); z-index: 9; display: flex; justify-content: center; height: 0; }
.newbanner button {
  margin-top: 10px; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

main { max-width: 680px; margin: 0 auto; padding: 8px 16px 40px; }

/* ---------- seznam (časová osa jako na webu) ---------- */
.day {
  margin: 22px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.timeline { list-style: none; margin: 0; padding: 0; }
.item { position: relative; padding: 0 0 4px 20px; border-left: 2px solid var(--line); margin-left: 5px; }
.item::before {
  content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--bg);
}
.item a {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border-radius: 14px; padding: 12px 14px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.item a:active { transform: scale(.99); }
.meta { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.time { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.tag {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand); background: var(--tag-bg); border-radius: 6px; padding: 2px 7px;
}
.item h2 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; font-weight: 700; }
.item p {
  margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item.unread h2::after {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); margin-left: 8px; vertical-align: middle;
}
.more { text-align: center; padding: 16px; color: var(--muted); font-size: 14px; }
.more button { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }

/* ---------- detail zprávy ---------- */
article { padding-top: 12px; }
article .meta { margin-bottom: 10px; }
article .date { color: var(--muted); }
article h1 { font-size: 27px; line-height: 1.22; margin: 0 0 18px; letter-spacing: -.01em; }
.content { font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.content p { margin: 0 0 1em; }
.content a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.content img, .content iframe { max-width: 100%; height: auto; border-radius: 10px; }
.content iframe { aspect-ratio: 16 / 9; width: 100%; border: 0; }
.content figure { margin: 1em 0; }
.content figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }
.content blockquote { margin: 1em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--brand); color: var(--muted); }
.content table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.tools a, .tools button {
  flex: 1 1 140px; text-align: center; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600;
}
.tools .primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .tools .primary { color: #141110; } }

/* ---------- stavy ---------- */
.skeleton { height: 108px; border-radius: 14px; margin: 0 0 10px 27px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(140,48,31,.06), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty button { margin-top: 12px; }

/* ---------- dialog a toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-card {
  background: var(--card); color: var(--text); width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet-card h2 { margin: 0 0 10px; font-size: 20px; }
.sheet-card ol { padding-left: 22px; margin: 0 0 18px; }
.sheet-card li { margin-bottom: 8px; }
.sheet-card p { margin: 0 0 14px; color: var(--muted); }
.ico { display: inline-block; vertical-align: -4px; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #2b2522; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px; z-index: 60;
  max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
/* ---------- lišta „Nainstalovat / Zapnout upozornění" ---------- */
.promo {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px 8px 12px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  animation: promoIn .35s ease-out;
}
@keyframes promoIn { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.promo img { border-radius: 12px; background: #fbf7f0; flex: none; }
.promo-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.promo-text b { font-size: 16px; }
.promo-text span { font-size: 13px; color: var(--muted); }
.promo-go {
  flex: none; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 15px;
}
@media (prefers-color-scheme: dark) { .promo-go { color: #141110; } }
.promo-close { flex: none; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
body.has-promo main { padding-bottom: 120px; }
@media (max-width: 360px) { .promo-text span { display: none; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
