/* Pravdopis Tiskárna. Barvy a písma z pravdopis.cz (stejné jako ve Samově appce). */
:root {
  color-scheme: light;
  --paper: #f5efe4;
  --surface: #fffcf5;
  --surface-2: #ede4d3;
  --line: #1a224624;
  --line-strong: #1a224647;
  --text: #1a2246;
  --muted: #4b5170;
  --ink: #2440b3;
  --ink-deep: #1c338f;
  --ink-soft: #2a47bd17;
  --red: #c2372b;
  --red-deep: #a62d23;
  --ok: #2f6b3a;
  --warn: #8a5a00;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --gutter: 16px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .16 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper) var(--grain); color: var(--text);
  font: 400 1rem/1.5 var(--sans); font-optical-sizing: auto;
  min-height: 100vh; padding-bottom: 76px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 460; letter-spacing: -0.012em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .6em; }
a { color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.tl { font-variant-numeric: tabular-nums; }
.tlumene { color: var(--muted); }
.mala { font-size: .875rem; }
.ruka { font-family: var(--hand); font-size: 1.5em; color: var(--ink); line-height: 1; }

/* Hlavička a navigace */
.hlavicka { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter); max-width: 1180px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; }
.logo .mark { transform: rotate(-4deg); transition: transform .4s var(--ease); }
.logo:hover .mark { transform: rotate(0); }
.mark { flex: none; display: block; overflow: visible; --mark-bg: var(--red); --mark-fg: #fbf3e6; }
.mark__paper, .mark__slit, .mark__hole { fill: var(--mark-bg); }
.mark__frame { fill: none; stroke: var(--mark-fg); stroke-width: 1px; opacity: .75; }
.mark__nib { fill: var(--mark-fg); }
.mark__slit { stroke: var(--mark-bg); stroke-width: 1px; fill: none; }
.hlavicka__pravy { display: flex; align-items: center; gap: 14px; font-size: .9rem; text-align: right; }
.stav-stroje { color: var(--muted); }
.stav-stroje b { font-weight: 600; color: var(--ink); }
.stav-stroje.je-pryc b { color: var(--red); }
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; text-align: center; padding: 14px 2px 13px; font-size: .8125rem; font-weight: 500; color: var(--muted); text-decoration: none; border-top: 3px solid transparent; margin-top: -1px; }
.nav a[aria-current="page"] { color: var(--ink); border-top-color: var(--ink); font-weight: 600; }
.nav .nav__tlac { position: relative; }
.nav .nav__tlac i { position: absolute; top: 8px; right: calc(50% - 26px); width: 7px; height: 7px; background: var(--red); border-radius: 50%; }
main { max-width: 1180px; margin: 0 auto; padding: 8px var(--gutter) 40px; }
.demo-pruh { background: var(--ink); color: #fbf3e6; font-size: .8125rem; padding: 6px var(--gutter); text-align: center; }
.demo-pruh a { color: #fbf3e6; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1.15rem; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--ink); color: #fbf3e6; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: inset 0 -2px 0 #00000038; transition: background .15s, transform .08s; }
.btn:hover { background: var(--ink-deep); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--line { background: transparent; color: var(--ink); box-shadow: none; }
.btn--line:hover { background: var(--ink-soft); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-deep); }
.btn--velke { min-height: 52px; padding: .7rem 1.5rem; font-size: 1.05rem; }
.btn--plny { width: 100%; }
.odkaz { background: none; border: 0; padding: 6px 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.odkaz--cerveny { color: var(--red); }
.radek-tlacitek { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Upozornění nahoře */
.upozorneni { margin: 4px calc(var(--gutter) * -1) 18px; }
.upozorneni__v { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px var(--gutter); background: var(--red); color: #fff7ee; font-weight: 500; border-bottom: 1px solid #00000022; }
.upozorneni__v + .upozorneni__v { border-top: 1px solid #ffffff30; }
.upozorneni__v .btn { background: #fff7ee; color: var(--red-deep); border-color: #fff7ee; min-height: 38px; }
@media (min-width: 760px) { .upozorneni { margin-inline: 0; } }

/* Hlavičky stránek */
.hlava { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 14px 0 16px; }
.hlava p { margin: 0; }
.zpet { display: inline-block; margin: 14px 0 0; color: var(--ink); font-size: .9rem; }

/* Přehled: živý stroj */
.stroj { display: grid; gap: 0 18px; margin-top: 8px; grid-template-columns: 38% 1fr; grid-template-areas: "list ted" "info info"; align-items: start; }
.stroj > .list-box { grid-area: list; } .stroj > .ted { grid-area: ted; } .stroj > .info { grid-area: info; margin-top: 10px; }
@media (min-width: 860px) { .stroj { grid-template-columns: 380px 1fr; gap: 0 48px; grid-template-areas: "list ted" "list info"; } .stroj > .info { margin-top: 0; } }
.list-box { position: relative; }
.list { position: relative; width: min(calc(100% - 9px), 340px); margin: 0 0 8px; aspect-ratio: 1 / 1.414; background: var(--surface); border: 1px solid var(--line-strong); overflow: hidden;
  box-shadow: 4px 4px 0 -1px var(--surface), 4px 4px 0 0 var(--line-strong), 8px 8px 0 -1px var(--surface), 8px 8px 0 0 var(--line-strong); }
.list--obalka { aspect-ratio: 2.2 / 1; width: 100%; }
.list img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.list__stin { opacity: .16; }
.list__pis { clip-path: inset(0 0 calc(100% - var(--p, 0%)) 0); transition: clip-path 1s linear; }
.list__pero { position: absolute; left: 0; right: 0; top: var(--p, 0%); height: 0; border-top: 1px solid #2440b399; transition: top 1s linear; pointer-events: none; }
.list__pero svg { position: absolute; right: 6px; top: -22px; width: 16px; height: 24px; }
.list--ceka img.list__pis { clip-path: inset(0 0 100% 0); }
.list__prazdno { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: .95rem; }
.procenta { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 9vw, 3.4rem); line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.procenta small { font-size: 1.4rem; margin-left: 2px; }
.ted { padding: 0 0 8px; }
.ted__obec { font-family: var(--hand); font-size: clamp(2rem, 8vw, 2.6rem); overflow-wrap: anywhere; line-height: 1; color: var(--ink); margin: 4px 0 6px; }
.ted__r { color: var(--muted); font-size: .95rem; }
.ted__r b { color: var(--text); font-weight: 600; }
.cast { border-top: 1px solid var(--line-strong); padding: 16px 0 18px; }
.cast h2 { margin-bottom: 10px; }
.cast--bez { border-top: 0; padding-top: 0; }
.velka-vec { font-family: var(--display); font-size: 1.55rem; line-height: 1.2; }
.velka-vec.je-varovani { color: var(--red); }
.pod { color: var(--muted); font-size: .9rem; margin-top: 4px; }

.stoh { display: flex; gap: 2px; height: 26px; margin: 14px 0 10px; align-items: flex-end; }
.stoh i { flex: 1 1 0; min-width: 0; background: var(--line-strong); height: 40%; transition: height .4s var(--ease), background .4s; }
.stoh i.je { background: var(--ink); height: 100%; }
.stoh i.je:nth-child(10n) { background: var(--ink-deep); }
.stoh.je-prazdny i { background: var(--red); height: 20%; opacity: .5; }
.doplneni { margin-top: 12px; padding: 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.doplneni[hidden] { display: none; }
.pole { display: block; margin: 10px 0; }
.pole > span { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.vstup, .pole input, .pole textarea, .pole select { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); min-height: 44px; }
.pole textarea { resize: vertical; line-height: 1.45; min-height: 90px; }
.pole input.je-chyba, .pole textarea.je-chyba { border-color: var(--red); background: #fbeee8; }
.volba { display: flex; border: 1.5px solid var(--ink); border-radius: 3px; overflow: hidden; width: 100%; }
.volba button { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-weight: 600; cursor: pointer; }
.volba button + button { border-left: 1.5px solid var(--ink); }
.volba button[aria-pressed="true"] { background: var(--ink); color: #fbf3e6; }
.dal-radek { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dal-radek:first-of-type { border-top: 0; }
.dal-radek b { font-weight: 600; }
.dal-radek span:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Seznamy: fronta, dávky, písma … řádky s linkou, žádné karty */
.seznam { border-top: 1px solid var(--line-strong); }
.rad { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 2px 10px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rad:hover .rad__obec { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.rad__n { font-family: var(--display); color: var(--muted); font-size: 1.05rem; padding-top: 1px; font-variant-numeric: tabular-nums; }
.rad__obec { font-weight: 600; }
.rad__meta { color: var(--muted); font-size: .875rem; grid-column: 2; }
.rad__pravy { text-align: right; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; grid-row: 1; grid-column: 3; }
.rad__akce { grid-column: 1 / -1; padding: 10px 0 2px 2.2rem; display: none; }
.rad.je-otevreny { background: var(--ink-soft); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.rad.je-otevreny .rad__akce { display: flex; flex-wrap: wrap; gap: 8px; }
.rad.je-tiskne .rad__n { color: var(--ink); }
.st { font-weight: 600; }
.st--tiskne, .st--prevzato { color: var(--ink); }
.st--hotovo { color: var(--ok); }
.st--chyba, .st--zruseno { color: var(--red); }
.st--ceka { color: var(--warn); }
.zalozky { display: flex; gap: 0; margin: 4px 0 12px; border-bottom: 1px solid var(--line-strong); overflow-x: auto; }
.zalozky button { background: none; border: 0; padding: 12px 14px; color: var(--muted); font-weight: 500; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.zalozky button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.cara { height: 3px; background: var(--line); margin: 8px 0 6px; }
.cara i { display: block; height: 100%; background: var(--ink); }

.davka { padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.davka h3 { margin-bottom: 4px; }
.davka:hover h3 { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.schvaleno { color: var(--ok); font-weight: 600; }
.neschvaleno { color: var(--warn); font-weight: 600; }

.dop { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
.mini { width: 52px; aspect-ratio: 1 / 1.414; background: var(--surface); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.mini img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.dop__stavy { text-align: right; font-size: .8125rem; line-height: 1.5; }
.dop__stavy span { display: block; color: var(--muted); }

.dve { display: grid; gap: 24px; }
@media (min-width: 860px) { .dve { grid-template-columns: 380px 1fr; gap: 48px; align-items: start; } .dve__vlevo { position: sticky; top: 12px; } }
.varovani { color: var(--red); font-size: .875rem; margin-top: 4px; }
.varovani b { font-weight: 600; }
.telo-blok { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.telo-blok .odkaz { padding-top: 14px; }

/* Písma */
.ruce { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
@media (min-width: 860px) { .ruce { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.ruka-r { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ruka-r.je-vypnuta img { opacity: .4; }
.ruka-r__vzorek { grid-column: 1 / -1; height: 54px; position: relative; }
.ruka-r__vzorek img { height: 100%; width: auto; max-width: 100%; mix-blend-mode: multiply; display: block; object-fit: contain; object-position: left; }
.ruka-r__vzorek .prazdno { color: var(--muted); font-size: .875rem; line-height: 54px; }
.ruka-r b { font-weight: 600; }
.pise-ted { color: var(--ink); font-weight: 600; }
.pise-ted::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--ink); vertical-align: middle; margin-right: 6px; animation: pise 1.4s var(--ease) infinite alternate; transform-origin: left; }
@keyframes pise { from { transform: scaleX(.2); } to { transform: scaleX(1); } }

/* Obálky a párování */
.sada { padding: 18px 0; border-bottom: 1px solid var(--line-strong); }
.sada:first-of-type { border-top: 1px solid var(--line-strong); }
.instrukce { font-family: var(--display); font-size: 1.35rem; line-height: 1.25; margin: 8px 0 12px; }
.pozice { display: grid; grid-template-columns: 1.8rem 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.pozice__n { font-family: var(--display); color: var(--muted); }
.pozice .meta { color: var(--muted); font-size: .875rem; grid-column: 2; }
.zaskrt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: .875rem; grid-column: 3; grid-row: 1 / span 2; }
.zaskrt input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; }

/* Stroje */
.kod { font-family: var(--display); font-size: 3.2rem; letter-spacing: .12em; color: var(--ink); line-height: 1.1; margin: 8px 0; font-variant-numeric: tabular-nums; }
.prikaz { display: block; padding: 12px; background: var(--surface); border: 1px solid var(--line-strong); font: 500 .8125rem/1.5 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; margin: 8px 0; }
.kroky { padding-left: 1.2rem; margin: 8px 0 16px; }
.kroky li { margin-bottom: 8px; }
.udalost { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.udalost time { color: var(--muted); font-variant-numeric: tabular-nums; }
.udalost .kdo { color: var(--muted); }

/* Přihlášení */
.prihlaseni { max-width: 420px; margin: 12vh auto 0; padding: 0 var(--gutter); }
.prihlaseni h1 { margin: 24px 0 8px; }
.prihlaseni #gsi { margin: 20px 0; min-height: 44px; }

/* Okno potvrzení */
dialog { border: 2px solid var(--text); border-radius: 3px; padding: 0; background: var(--surface); color: var(--text); width: min(92vw, 460px); }
dialog::backdrop { background: #1a224699; }
.okno { padding: 22px 20px 18px; }
.okno h2 { margin-bottom: 10px; }
.okno ul { padding-left: 1.1rem; margin: 10px 0 16px; }
.okno .radek-tlacitek { justify-content: flex-end; margin-top: 16px; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: 88px; transform: translate(-50%, 20px); background: var(--text); color: #fbf3e6; padding: 11px 16px; border-radius: 3px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s var(--ease); max-width: 92vw; }
.toast.je { opacity: 1; transform: translate(-50%, 0); }
.toast.je-chyba { background: var(--red); }
.nacitani { color: var(--muted); padding: 30px 0; }
.prazdno-stav { padding: 28px 0; color: var(--muted); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .nav { position: static; max-width: 1180px; margin: 0 auto; border: 0; background: none; padding: 0 var(--gutter); border-bottom: 1px solid var(--line-strong); display: flex; gap: 6px; }
  .nav-obal { border-bottom: 1px solid var(--line-strong); }
  .nav { border-bottom: 0; }
  .nav a { flex: none; padding: 12px 16px; font-size: .95rem; border-top: 0; border-bottom: 3px solid transparent; margin: 0 0 -1px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--ink); }
  .toast { bottom: 28px; }
  h1 { font-size: 2.2rem; }
}

/* Tisk: párovací list */
.tisk-list { display: none; }
@media print {
  body { background: #fff; padding: 0; color: #000; }
  .hlavicka, .nav, .nav-obal, .demo-pruh, .toast, .bez-tisku, .upozorneni, .zpet { display: none !important; }
  main { max-width: none; padding: 0; }
  .tisk-list { display: block; }
  table.parovaci { width: 100%; border-collapse: collapse; font-size: 11pt; }
  table.parovaci th { text-align: left; border-bottom: 1.5pt solid #000; padding: 4pt 6pt; font-weight: 600; }
  table.parovaci td { border-bottom: .5pt solid #888; padding: 7pt 6pt; vertical-align: top; }
  table.parovaci tr { break-inside: avoid; }
  .box-sl { display: inline-block; width: 13pt; height: 13pt; border: 1.2pt solid #000; }
}
.parovaci-obrazovka table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.parovaci-obrazovka th { text-align: left; border-bottom: 1.5px solid var(--text); padding: 6px 8px; font-weight: 600; }
.parovaci-obrazovka td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
.parovaci-obrazovka .tab-obal { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.box-sl { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--text); }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation: none !important; } }
