/* Písmo Fira Sans (SIL OFL) – stejné jako na webu K-MET. */
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(fonts/fira-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(fonts/fira-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url(fonts/fira-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url(fonts/fira-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url(fonts/fira-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url(fonts/fira-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Barvy z katalogu: černé záhlaví, grafit (přední obálka), vínová (linky) a žlutá (hlavičky tabulek). */
:root {
  --black: #000;
  --wine: #902047;
  --graphite: #2d313a;
  --graphite-dark: #15171b;
  --yellow: #fec92a;
  --bg: var(--graphite-dark);
  --stage: radial-gradient(ellipse 80% 90% at 50% 45%, #3d424d 0%, var(--graphite) 45%, var(--graphite-dark) 100%);
  --bar: var(--black);
  --field: #161618;
  --text: #f2f2f2;
  --muted: #a7a7ad;
  --accent: var(--wine);
  --accent-soft: rgba(144, 32, 71, .45);
  --panel: #0e0e10;
  --bar-line: #26262a;
  --hover: rgba(255, 255, 255, .08);
  --radius: 6px;
  --bar-h: 56px;
  --drawer-w: 340px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; } /* bez „obnovení tahem dolů“ */
/* Aplikace přesně ve viditelné ploše: v Safari na iPhonu jinak spodní lišta prohlížeče
   zakryje naši spodní lištu a stránka se dá posouvat. */
html { overflow: hidden; }
body { position: fixed; inset: 0; height: auto; }
button, a, input { touch-action: manipulation; } /* bez zpoždění klepnutí a zoomu dvojklepem */
/* Na ploše s knihou zpracovává všechna gesta aplikace (listování, dvojí klepnutí, dva prsty).
   Jinak by prohlížeč vodorovný tah vyložil jako „zpět na předchozí stránku“, přiblížil celou
   stránku nebo ji obnovil. */
.stage { touch-action: none; }
/* Dlouhé podržení na stránce nemá vybírat obsah ani nabízet „Uložit obrázek“. */
#book, .zoom-inner { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- lišty ---------- */
.bar {
  height: var(--bar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--bar);
  border-bottom: 3px solid var(--wine);
  position: relative;
  z-index: 30;
  /* Lišta nesmí být nikdy širší než displej – mobilní prohlížeč by jinak celou stránku
     oddálil a ovládací prvky by se rozjely a překrývaly. */
  min-width: 0; max-width: 100vw; overflow-x: clip;
}
header.bar { height: calc(var(--bar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
.bar.bottom { border-bottom: 0; border-top: 3px solid var(--wine); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
.btn {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--radius);
  background: transparent; cursor: pointer; color: var(--text);
}
.btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn:focus-visible, .lang button:focus-visible, .tabs button:focus-visible, .nav:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; color: #fff; text-decoration: none; flex: none; }
.brand .logo { width: 104px; height: auto; fill: #fff; stroke: none; display: block; }
.brand span { color: var(--yellow); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
/* Žlutá linka přes záhlaví jako v katalogu. */
.rule { flex: 1 1 0; height: 2px; background: var(--yellow); margin: 0 12px; min-width: 0; }

/* Vyhledávání – bílé pole, aby bylo v černém záhlaví hned vidět. */
.search {
  display: flex; align-items: center; gap: 8px;
  flex: 0 1 380px; min-width: 150px;
  background: #fff; color: #111; border: 0; border-radius: 999px;
  padding: 0 14px; height: 40px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2);
  transition: box-shadow .15s;
}
.search svg { width: 18px; height: 18px; color: #55555c; flex: none; stroke-width: 2.4; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #111; font-weight: 500; }
.search input::placeholder { color: #6b6b72; font-weight: 400; opacity: 1; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.search { position: relative; }
header.bar { z-index: 45; } /* našeptávač a nabídka jazyků nad bočním panelem */

/* Našeptávač */
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  width: max(100%, 380px); max-height: min(70vh, 520px); overflow-y: auto;
  list-style: none; margin: 0; padding: 6px;
  background: #111113; border: 1px solid #333; border-top: 3px solid var(--wine); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.suggest[hidden] { display: none; }
.sg-head { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.sg:hover, .sg.active { background: rgba(255, 255, 255, .1); }
.sg svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sg .main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6d6db; }
.sg .main b { color: #fff; font-weight: 700; }
.sg-code .main { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sg .meta { color: var(--muted); font-size: 13px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.sg-clear { justify-content: center; }
.sg-clear .main { flex: none; color: var(--muted); font-size: 13px; text-decoration: underline; }

.actions { display: flex; align-items: center; gap: 4px; flex: none; }
/* Užší obrazovky: texty tlačítek nahradit ikonami / kódy, ať se záhlaví vždy vejde. */
@media (max-width: 1150px) {
  .download span { display: none; }
  .download { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 980px) {
  .brand span { display: none; }
  .lang-name, .lang-btn .chev { display: none; }
  .lang-code { display: inline; }
}
/* Stažení PDF – hlavní akce, žluté tlačítko jako hlavičky tabulek v katalogu. */
.download {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px; margin: 0 4px;
  background: var(--yellow); color: #000; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s;
}
.download svg { width: 20px; height: 20px; stroke-width: 2.5; }
.download:hover { background: #fff; }
.download:active { transform: translateY(1px); }
.download:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Objednávka tištěného katalogu – vedlejší akce: bílý obrys (žluté je jen hlavní tlačítko PDF). */
.order {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; margin-left: 4px;
  border: 2px solid #fff; border-radius: var(--radius); color: #fff;
  font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.order svg { width: 20px; height: 20px; }
.order:hover { background: #fff; color: #000; }
.order:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.order[hidden], .order-card[hidden] { display: none; }
@media (max-width: 1439px) { .order { display: none; } }

.order-card {
  flex: none; display: flex; align-items: center; gap: 14px; margin: 8px; padding: 14px 16px;
  background: var(--wine); border-radius: var(--radius); color: #fff; text-decoration: none;
  border-left: 4px solid #fff; transition: background .15s;
}
.order-card:hover { background: #a42752; }
.order-card svg { width: 28px; height: 28px; color: #fff; flex: none; }
.order-card strong { display: block; font-size: 15px; }
.order-card small { display: block; color: #f1d5df; font-size: 13px; }
.lang { display: flex; background: var(--field); border-radius: var(--radius); padding: 3px; margin-right: 4px; }
.lang { position: relative; padding: 0; background: none; }
.lang[hidden] { display: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px;
  background: var(--field); border: 1px solid #333; border-radius: var(--radius);
  color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: #fff; }
.lang-btn svg { width: 18px; height: 18px; color: var(--muted); }
.lang-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-code { display: none; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 180px;
  list-style: none; margin: 0; padding: 6px;
  background: #111113; border: 1px solid #333; border-top: 3px solid var(--wine); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 4px; background: none; color: var(--text); text-align: left; cursor: pointer; font-weight: 500;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--hover); outline: 0; }
.lang-menu .code { width: 28px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.lang-menu [aria-selected="true"] { background: var(--accent-soft); }
.lang-menu [aria-selected="true"] .code { color: #fff; }

#slider { flex: 1; accent-color: #fff; min-width: 0; }
.pageno { display: flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.pageno input {
  width: 64px; text-align: center; padding: 6px 4px;
  background: var(--field); border: 1px solid #333; border-radius: 6px;
}
.pageno input:focus { outline: 0; border-color: #fff; }

/* ---------- plocha s knihou ---------- */
.stage {
  flex: 1; min-height: 0; position: relative;
  background: var(--stage);
  display: flex; align-items: center; justify-content: center;
  padding: 20px 64px;
}
.book-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
#book { width: 100%; height: 100%; }
/* Bez bílého podkladu – na tmavých obálkách by na okraji prosvítal jako linka. */
#book .page { background: transparent; overflow: hidden; }
#book .page img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
#book .page.blank { background: #fff; }
/* Klikací odkazy a zvýraznění hledaného výrazu nad stránkou. */
.layer { position: absolute; inset: 0; pointer-events: none; }
.hot { position: absolute; pointer-events: auto; border-radius: 3px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.hot:hover, .hot:focus-visible { background: rgba(144, 32, 71, .1); box-shadow: 0 0 0 2px var(--wine); outline: 0; }
.hl { position: absolute; inset: 0; }
.hl-mark { position: absolute; background: rgba(254, 201, 42, .4); outline: 2px solid var(--wine); outline-offset: 1px; border-radius: 2px; mix-blend-mode: multiply; animation: hl-in .4s ease-out; }
@keyframes hl-in { from { outline-offset: 6px; opacity: 0; } }
.zpage { position: relative; flex: none; }

.stf__parent { filter: drop-shadow(0 20px 36px rgba(0, 0, 0, .55)); }

.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 96px; border: 0; border-radius: var(--radius);
  background: rgba(0,0,0,.35); color: #fff; cursor: pointer; z-index: 5;
  display: grid; place-items: center; transition: background .15s, opacity .15s;
}
.nav:hover { background: #000; color: #fff; }
.nav:disabled { opacity: 0; pointer-events: none; }
.nav svg { width: 28px; height: 28px; }
.prev { left: calc(8px + env(safe-area-inset-left)); } .next { right: calc(8px + env(safe-area-inset-right)); }

.loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity .3s; }
.loading.done { opacity: 0; }
.loading.failed { pointer-events: auto; }
.loading.failed p { padding: 16px; background: var(--bar); }
.loading.failed a { color: var(--text); }
.loading span { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- boční panel ---------- */
.catalog-picker { flex: none; padding: 12px 16px; border-bottom: 1px solid var(--bar-line); }
.catalog-picker[hidden] { display: none; }
.catalog-picker label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.catalog-switch { position: relative; }
#catalog-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; padding: 8px 12px; color: var(--text); background: var(--field); border: 1px solid #333; border-radius: var(--radius); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
#catalog-select:hover, #catalog-select[aria-expanded="true"] { border-color: #fff; }
#catalog-select:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
#catalog-select svg { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
#catalog-select[aria-expanded="true"] svg { transform: rotate(180deg); }
.catalog-menu { left: 0; right: 0; min-width: 0; }
.catalog-menu button { white-space: normal; overflow-wrap: anywhere; }
.catalog-picker > a { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--text); text-underline-offset: 3px; }
.catalog-picker > a:hover { color: var(--yellow); }
.drawer {
  position: fixed; z-index: 40; top: calc(var(--bar-h) + env(safe-area-inset-top)); bottom: 0; left: 0;
  width: min(360px, 88vw);
  background: var(--panel); border-right: 1px solid var(--bar-line);
  display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .25s ease;
}
.drawer.open { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.4); }
.scrim { position: fixed; inset: calc(var(--bar-h) + env(safe-area-inset-top)) 0 0 0; z-index: 35; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: auto; }

.tabs { display: flex; height: 52px; flex: none; border-bottom: 1px solid var(--bar-line); padding: 0 8px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: none; cursor: pointer; color: #c9c9cf; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; border-bottom: 3px solid transparent; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
.panel { flex: 1; overflow-y: auto; padding: 8px; display: none; overscroll-behavior: contain; }
.panel.active { display: block; }

.toc-item, .result {
  display: flex; gap: 12px; align-items: baseline; width: 100%;
  text-align: left; border: 0; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 6px;
}
.toc-item:hover, .result:hover { background: var(--hover); }
.toc-item.current { background: var(--accent-soft); box-shadow: inset 3px 0 0 #fff; color: #fff; }
.toc-item .name { flex: 1; }
.toc-item .num, .result .num { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.result { flex-direction: column; gap: 2px; }
.result .snip { color: var(--muted); font-size: 13px; }
.result mark { background: var(--yellow); color: #000; border-radius: 2px; padding: 0 2px; }
.empty { color: var(--muted); padding: 16px 12px; }

.thumbs.active { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.thumb { border: 0; padding: 0; background: none; cursor: pointer; text-align: center; color: var(--muted); font-size: 12px; }
.thumb img { width: 100%; aspect-ratio: 1 / 1.414; display: block; background: #333; border-radius: 3px; border: 2px solid transparent; margin-bottom: 3px; }
.thumb.current img { border-color: #fff; }
.thumb:hover img { border-color: #fff6; }

/* ---------- lupa ---------- */
.zoom { position: fixed; inset: 0; z-index: 50; background: var(--graphite-dark); }
.zoom-scroll { position: absolute; inset: 0; overflow: auto; cursor: grab; overscroll-behavior: none; touch-action: pan-x pan-y; }
.zoom-scroll.dragging { cursor: grabbing; }
.zoom-inner { display: flex; margin: 0 auto; padding: 16px; width: max-content; }
.zoom-inner img { display: block; background: #fff; user-select: none; -webkit-user-drag: none; }
.zoom-tools { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 6px; background: rgba(0,0,0,.9); border-bottom: 3px solid var(--wine); padding: 6px; border-radius: 10px; }

/* ---------- oznámení, nápověda ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 20px); z-index: 70;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: #000; color: #fff; padding: 10px 18px; border-radius: var(--radius);
  border-left: 4px solid var(--wine); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  font-weight: 600; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.help {
  width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-top: 3px solid var(--wine);
  border-radius: var(--radius); background: #111113; color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.help::backdrop { background: rgba(0, 0, 0, .6); }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.help h2 { margin: 0; font-size: 17px; text-transform: uppercase; letter-spacing: .05em; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; padding: 12px 20px 22px; align-items: center; }
.help dt { white-space: nowrap; }
.help dd { margin: 0; color: #c9c9cf; }
kbd {
  display: inline-block; min-width: 26px; padding: 2px 7px; text-align: center;
  font: 600 13px/1.4 "Fira Sans", system-ui, sans-serif; color: #000;
  background: #ececef; border-radius: 4px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}

/* ---------- tisk: jen vybrané strany, každá na celý list A4 ---------- */
#print { display: none; }
@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { height: auto; overflow: visible; background: #fff; display: block; }
  body > *:not(#print) { display: none !important; }
  #print { display: block; }
  /* Výška o kousek menší než A4 – obrázek jinak přeteče a vznikne prázdný list. */
  #print img { display: block; width: 100%; height: 296mm; object-fit: contain; break-after: page; }
  #print img:last-child { break-after: auto; }
}

/* ---------- velké displeje: panel ukotvený vedle knihy ---------- */
@media (min-width: 1200px) {
  .drawer { width: var(--drawer-w); bottom: var(--bar-h); transform: none; box-shadow: none; }
  body.panel-hidden .drawer { transform: translateX(-102%); }
  .scrim { display: none; }
  .stage { margin-left: var(--drawer-w); }
  body.panel-hidden .stage { margin-left: 0; }
}

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .brand span, .hide-sm, .rule { display: none; }
  .brand .logo { width: 72px; }
  .stage { padding: 10px 8px; }
  .nav { width: 36px; height: 72px; background: rgba(0,0,0,.18); }
  .prev { left: 2px; } .next { right: 2px; }
  .bar { gap: 4px; padding: 0 6px; }
  .search { width: auto; flex: 1; min-width: 0; padding: 0 10px; position: static; }
  .suggest { position: fixed; top: calc(var(--bar-h) + 4px); left: 8px; right: 8px; width: auto; }
  .brand { margin-right: 4px; }
  /* Na mobilu jen aktivní jazyk – klepnutím se přepíná dál. */
  .lang { margin-right: 0; }
  .lang-name, .lang-btn .chev, .lang-btn svg:first-child { display: none; }
  .lang-code { display: inline; }
  .lang-btn { padding: 0 10px; font-size: 13px; }
  .actions { gap: 0; }
  .download { padding: 0; width: 38px; justify-content: center; margin: 0 0 0 4px; }
  .download span { display: none; }
}
/* Nízké displeje (telefon na šířku): užší lišty, ať zbude víc místa na knihu. */
@media (max-height: 500px) {
  :root { --bar-h: 44px; }
  .stage { padding: 6px 56px; }
  .btn { width: 36px; height: 36px; }
  .search, .lang-btn, .download, .order { height: 34px; }
  .brand .logo { width: 80px; }
  .nav { height: 72px; }
  .tabs { height: 42px; }
}
@media (max-width: 420px) {
  #slider { display: none; }
  .bar.bottom { justify-content: space-between; }
}
