/* Písma hostovaná u sebe (dřív Google Fonts — IP návštěvníka by šla Googlu). Licence SIL OFL 1.1. */
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.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: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin.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: "Martian Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/martian-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/martian-mono-latin.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: "Schibsted Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin.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; }

/* Odkazy — kartotéka. Papír, inkoust a červené razítko „Nezpracováno". */

:root {
  --paper: #ebe8e1;
  --paper-2: #e0dcd2;
  --card: #f8f6f1;
  --ink: #17181b;
  --ink-2: #4f5158;
  --ink-3: #87888c;
  --rule: #d5d0c5;
  --stamp: #d24321;
  --accent: #23427a;
  --ok: #2c7349;
  --grain: .5;
  --shadow: 0 1px 0 rgba(23, 24, 27, .04), 0 12px 28px -20px rgba(23, 24, 27, .5);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111214;
    --paper-2: #202125;
    --card: #1a1b1f;
    --ink: #ece9e2;
    --ink-2: #adaca6;
    --ink-3: #76767a;
    --rule: #2d2e33;
    --stamp: #ff6b47;
    --accent: #9fb9ff;
    --ok: #72cf99;
    --grain: .18;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -20px rgba(0, 0, 0, .9);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font: 15px/1.45 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* papírové zrno */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .45  0 0 0 0 .4  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, textarea { font: inherit; color: inherit; }
code { font: 12.5px var(--mono); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.kicker {
  margin: 0 0 6px;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sheet__kicker { margin-top: 22px; }

/* ------------------------------------------------------------- tlačítka */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 14px/1.1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--danger { background: transparent; color: var(--stamp); border-color: color-mix(in srgb, var(--stamp) 35%, var(--rule)); }
.btn--block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease;
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.icon-btn:active { background: color-mix(in srgb, var(--ink) 12%, transparent); }
[data-action="menu"] svg { fill: currentColor; }

.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: 600 13px var(--sans);
  cursor: pointer;
}

/* ------------------------------------------------------------ přihlášení */

.gate {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 20px;
}
.gate__card { width: 100%; max-width: 380px; }
.gate__title {
  margin: 0 0 14px;
  font: italic 400 76px/.85 var(--serif);
  letter-spacing: -.02em;
}
.gate__title::after, .wordmark::after { content: "."; color: var(--stamp); }
.gate__note { margin: 0 0 28px; color: var(--ink-2); }
.gate__form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }
.field__label {
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px;
  outline: none;
  transition: border-color .15s ease;
}
.field__input:focus { border-color: var(--ink); }
.form-error { margin: 0; color: var(--stamp); font-size: 14px; font-weight: 500; }

/* ------------------------------------------------------------ hlavička */

.app {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 48px);
}

.masthead {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  border-bottom: 1px solid var(--ink);
}
.wordmark {
  margin: 0;
  font: italic 400 clamp(48px, 14vw, 68px)/.82 var(--serif);
  letter-spacing: -.025em;
}

/* ------------------------------------------------------------ vkládání */

.composer {
  margin-top: 24px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.composer:focus-within { border-color: var(--ink); }
.composer__row { display: flex; align-items: center; gap: 4px; }
.composer__comment {
  display: none;
  margin: 2px 8px 2px 0;
  border-top: 1px dashed var(--rule);
}
.composer.is-open .composer__comment { display: block; animation: rise .25s ease both; }
.composer__note {
  display: block;
  width: 100%;
  max-height: 40vh;
  padding: 10px 0 6px;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  font: italic 400 19px/1.25 var(--serif);
  color: var(--accent);
}
.composer__note::placeholder, .note::placeholder { color: var(--ink-3); }
.composer__input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-size: 16px; /* méně by iPhone při psaní zoomoval */
  outline: none;
}
.composer__input::placeholder { color: var(--ink-3); }
.composer__paste { color: var(--ink-2); }
.composer__submit { padding: 11px 16px; }
.composer.is-busy .composer__submit { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------- filtry */

.tabs {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 10px 0 12px;
  border: 0;
  background: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease;
}
.tab[aria-current="true"] { color: var(--ink); }
.tab[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.tab__count {
  margin-left: 4px;
  font: 500 9.5px var(--mono);
  vertical-align: super;
}

.filters { display: grid; gap: 10px; margin: 12px 0 20px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-3);
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
}
.search input::placeholder { color: var(--ink-3); }

/* filtry jsou lidská slova (okruhy), ne metadata — proto obyčejné písmo, ne mono verzálky */
.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -16px;
  padding: 0 32px 2px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  /* řada pokračuje za okrajem — konec se rozplyne, ať je vidět, že jde posunout */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
.chips[hidden] { display: none; }
.chip {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  font: 500 13.5px/1.2 var(--sans);
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip--stamp { color: var(--stamp); border-color: color-mix(in srgb, var(--stamp) 40%, var(--rule)); }
.chip--stamp[aria-pressed="true"] { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.chip__n { margin-left: 2px; font: 500 10px/1 var(--mono); opacity: .6; }
.chips__sep { flex: none; width: 1px; height: 18px; margin: 0 4px; background: var(--rule); }

/* ------------------------------------------------------------- seznam */

.list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.card.is-static { animation: none; }

.card__hit {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: inherit;
  background: none;
  text-align: left;
  cursor: pointer;
}
.card__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* náhled vyplní celou výšku lístku — čistý levý sloupec bez díry pod obrázkem
   (reely jsou na výšku, ukáže se z nich víc než jen obličej) */
.thumb {
  position: relative;
  align-self: stretch;
  min-height: 80px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--paper-2);
}
.thumb img, .hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* bez obrázku jen tichý monogram — plná šedá plocha by na výšku lístku křičela */
.thumb:not(:has(img)) { background: color-mix(in srgb, var(--paper-2) 45%, transparent); }
.thumb__glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: italic 400 28px/1 var(--serif);
  color: var(--ink-3);
}
.thumb__dur {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 3px 4px 2px;
  border-radius: 3px;
  background: rgba(10, 10, 12, .84);
  color: #fff;
  font: 500 9px/1 var(--mono);
}

.card__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card__meta, .detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font: 500 9.5px/1.2 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font: 400 19.5px/1.06 var(--serif);
  overflow-wrap: anywhere;
}
.card__title.is-placeholder, .detail__title.is-placeholder {
  font: 400 12.5px/1.4 var(--mono);
  color: var(--ink-2);
}
/* dlouhé jméno autora se zkrátí, datum zůstane celé */
.card__sub {
  display: flex;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.card__by { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card__when { flex: none; }

/* komentář jako poznámka perem na okraji lístku */
.card__note {
  display: -webkit-box;
  margin: 3px 0 0;
  padding-left: 9px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font: italic 400 16.5px/1.15 var(--serif);
  color: var(--accent);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.card__topic { color: var(--accent); }
/* shrnutí z analýzy — co to je, bez otevírání */
.card__ai {
  display: -webkit-box;
  margin: 1px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--stamp); }
.status-later { color: var(--accent); }
.status-done { color: var(--ok); }

.card.is-done .card__title { color: var(--ink-2); }
.card.is-done .thumb { filter: grayscale(.75); opacity: .8; }
.card.is-loading .card__sub::after { content: " · načítám údaje…"; }

/* razítko — přesahuje přes hranu karty jako skutečné razítko */
.stamp {
  display: inline-block;
  padding: 4px 6px 3px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  outline: 1px solid currentColor;
  outline-offset: 1.5px;
  background: var(--card);
  color: var(--stamp);
  font: 500 8.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-3deg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -1.7 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -1.7 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}
.card > .stamp {
  position: absolute;
  top: -8px;
  right: 12px;
  pointer-events: none;
}
.card.is-fresh > .stamp { animation: stamp-in .55s cubic-bezier(.3, 1.4, .5, 1) .35s both; }
.stamp--lg { padding: 6px 9px 5px; font-size: 10.5px; transform: rotate(-4deg); flex: none; }

.list-end {
  padding: 26px 0 8px;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-3);
}

.empty { padding: 40px 12px; text-align: center; }
.empty__title { margin: 0 0 8px; font: italic 400 36px/1 var(--serif); }
.empty p:not(.empty__title) { max-width: 34ch; margin: 0 auto; color: var(--ink-2); }

.skeleton {
  height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--paper-2) 30%, color-mix(in srgb, var(--paper-2) 55%, var(--card)) 50%, var(--paper-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

/* ----------------------------------------------------- detail (sheet) */

.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .55);
}
.sheet[open] { animation: sheet-up .34s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(12, 12, 14, .5); }

.sheet__grip { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: var(--rule); }
.sheet__close { position: absolute; top: 6px; right: 8px; z-index: 2; color: var(--ink-2); }
.sheet__inner { padding: 12px 18px calc(env(safe-area-inset-bottom) + 24px); }
.sheet__title { margin: 0 0 14px; font: italic 400 34px/1 var(--serif); }

.hero {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-top: 30px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-2);
}
.hero__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.hero__play span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(10, 10, 12, .72);
  backdrop-filter: blur(4px);
}

.detail__meta { margin-top: 16px; }
.detail__head--bare .detail__meta { margin-top: 36px; }
.detail__title {
  margin: 8px 0 6px;
  font: 400 31px/1.02 var(--serif);
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}
.title-link { color: inherit; text-decoration: none; }
.title-link:hover, .title-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.title-link__arrow { color: var(--ink-3); font-size: .8em; }
.detail__by { margin: 0; font-size: 14px; color: var(--ink-2); }
.detail__orig { margin: 0 0 4px; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
/* shrnutí z analýzy — odpověď na „co to je a stojí to za to", hned pod názvem */
.detail__lede { margin: 14px 0 0; font: 400 21px/1.22 var(--serif); overflow-wrap: anywhere; }
.detail__desc {
  position: relative;
  max-height: 7.3em;
  margin-top: 12px;
  overflow: hidden;
  font-size: 14px;
  color: var(--ink-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.detail__desc:not(.is-open)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.4em;
  background: linear-gradient(transparent, var(--card));
}
.detail__desc.is-open { max-height: none; }

.detail__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 18px;
}

.section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.section__label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: var(--paper-2);
}
.segmented button {
  padding: 10px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.segmented button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}

.note {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  font: italic 400 19px/1.3 var(--serif);
  color: var(--accent);
  resize: vertical;
  outline: none;
  transition: border-color .15s ease;
}
.note:focus { border-color: var(--ink); }

.ai-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--stamp) 45%, var(--rule));
  border-radius: 12px;
}
.ai-box p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* hotová analýza — rozbor se čte jako text článku, bez rámečku v rámečku */
.ai-block + .ai-block { margin-top: 20px; }
.ai-block__label {
  margin: 0 0 8px;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ai-list { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.ai-list li + li { margin-top: 6px; }
.ai-list li::marker { color: var(--ink-3); }
.ai-list a { color: var(--accent); text-underline-offset: 2px; }
.ai-list--plain, .ai-list--actions { padding-left: 0; list-style: none; }
.ai-list--actions li { position: relative; padding-left: 20px; }
.ai-list--actions li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.ai-time { display: inline-block; min-width: 44px; font: 500 11px/1 var(--mono); color: var(--ink-3); }
.ai-text { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ai-verdict { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tag {
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  font: 500 12.5px/1.2 var(--sans);
  color: var(--accent);
  cursor: pointer;
}
.tag:active { transform: scale(.96); }
/* původní popis a přepis — zdroj, ne výsledek; až na požádání */
.ai-more { margin-top: 12px; }
.ai-more + .ai-more { margin-top: 8px; }
.ai-more summary {
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
}
.ai-more p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.ai-foot {
  margin: 16px 0 0;
  font: 500 9.5px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.detail__foot {
  margin: 18px 0 0;
  font: 500 9.5px/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* nabídka */
.howto h3 { margin: 18px 0 4px; font-size: 14px; }
.howto p { margin: 0; font-size: 14px; color: var(--ink-2); }
.howto .btn { margin-top: 10px; }
.bookmarklet {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1.5px dashed var(--ink);
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: grab;
}
.pw summary { padding: 6px 0 12px; font-weight: 600; cursor: pointer; }
.pw form { margin-bottom: 14px; }

/* účty */
.gate__switch { margin: 20px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.gate__switch a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  text-underline-offset: 3px;
}
.gate__done {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed var(--ok);
  border-radius: 10px;
  background: var(--card);
}
.form-note { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.section .btn--block + .pw { margin-top: 8px; }
.status-new { color: var(--stamp); }

.users { margin: 0; padding: 0; list-style: none; }
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.user-row__main { min-width: 0; }
.user-row__email { margin: 0 0 5px; font-weight: 600; overflow-wrap: anywhere; }

/* kamarádi a posílání odkazů */
.detail__actions > :first-child { grid-column: 1 / -1; }
.menu-gap { margin-top: 8px; }
.menu-group { margin-top: 22px; }
.menu-name { margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .field__input { flex: 1; min-width: 0; }
.row-actions { display: flex; flex: none; gap: 6px; }
.row-actions .btn { padding: 9px 12px; }

.inbox-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  animation: rise .4s ease both;
}
.inbox-banner[hidden] { display: none; }
.inbox-banner__kicker {
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.inbox-banner__text { flex: 1; }

.share-panel .note { min-height: 64px; margin: 10px 0; }
.friend-picks { display: grid; gap: 6px; }
.friend-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.friend-pick:has(input:checked) { border-color: var(--ink); }
.friend-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

.share-item { padding: 14px 0; border-top: 1px solid var(--rule); }
.share-item__link {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.share-item .card__note { margin-top: 10px; }
.share-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

/* ------------------------------------------------------------- toasty */

.toasts {
  position: fixed;
  inset: auto auto calc(env(safe-area-inset-bottom) + 18px) 50%;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: inherit;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55);
  animation: toast-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
.toast--error { background: var(--stamp); color: #fff; }
.toast.is-leaving { animation: toast-out .25s ease both; }

/* ------------------------------------------------------------ animace */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes sheet-up { from { opacity: .3; transform: translateY(48px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(-12deg) scale(2.2); }
  70% { opacity: 1; transform: rotate(-3deg) scale(.92); }
  100% { opacity: 1; transform: rotate(-3deg) scale(1); }
}

@media (min-width: 700px) {
  .card__hit { grid-template-columns: 172px 1fr; gap: 16px; padding: 12px; }
  .card__title { font-size: 23px; }
  /* na šířku se filtry vejdou pod sebe — nic se neschovává za okraj */
  .chips { flex-wrap: wrap; row-gap: 8px; margin: 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .sheet { margin: auto; border-radius: 18px; max-height: 88dvh; }
  .sheet[open] { animation-name: toast-in; }
}

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