/* Podepisa — členská sekce /moje/. Jen to, co tokens.css (skill sn-vizual) nemá:
   shell nástroje, dlaždice dokumentů, tabulky odkazů a podpisů, drop zóna.
   Barvy, rádiusy a easing výhradně z tokenů. */

.hidden { display: none !important; }
.sprite { display: none; }

/* ── shell satelitního nástroje (sn-vizual assets/shell.html) ─────────────── */
:root { --container: 1040px; }
.topbar--tool { display: flex; align-items: center; gap: 22px; padding: 18px 28px; max-width: var(--container); margin: 0 auto; }
.topbar--tool img { height: 30px; width: auto; }
.topbar--tool h1 { font-size: 27px; font-weight: 900; letter-spacing: -0.01em; }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.tool { max-width: var(--container); margin: 0 auto; padding: 12px 28px 60px; display: grid; gap: 22px; }
.stack { display: grid; gap: 22px; }
.tool .card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.tool .card h2.display { font-size: clamp(26px, 3.4vw, 42px); overflow-wrap: anywhere; }
.tool .card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.card__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card__head h3 { margin-right: auto; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.auth--wide { max-width: 100%; }
.auth .btn, .actions .btn { justify-content: center; }
/* iOS Safari zvětší stránku při fokusu na pole pod 16 px (tokens.css má 15) */
.fld input, .fld select, .fld textarea, .copybox input { font-size: 16px; }
.fld input.code { letter-spacing: .5em; text-align: center; font-size: 26px; font-weight: 900; }
/* tokens.css dává .btn--sm 42 px; dotykový cíl musí být aspoň 44 px (HIG) */
.btn--sm { min-height: 44px; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }
.ico--lg { width: 38px; height: 38px; color: var(--muted); }
a.link { color: var(--txt); text-decoration: underline; text-underline-offset: 3px; }
.muted a, .note a, .lead a { color: var(--txt); text-decoration: underline; text-underline-offset: 3px; }

/* ── živá síť z portálu (@app.latte: .side__net), stejné parametry ───────── */
.ambient__net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .4; pointer-events: none; }

/* ── hlášky mimo topbar ───────────────────────────────────────────────────
   Pozor: v tokens.css přebíjí `body > *:not(.ambient){position:relative}`
   selektor `.flashes{position:fixed}` (vyšší specificita), takže hlášky padaly
   do toku nad topbar. Vracíme fixed stejně specifickým selektorem, dolů. */
body > .flashes { position: fixed; top: auto; bottom: 24px; left: auto; right: 24px; transform: none; width: min(92vw, 420px); }
.flash { cursor: pointer; }
@media (max-width: 720px) { body > .flashes { bottom: calc(16px + env(safe-area-inset-bottom)); right: 50%; transform: translateX(50%); } }

/* ── poznámky, stavy ─────────────────────────────────────────────────────── */
.note { padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255,255,255,.06); font-size: 14.5px; color: var(--txt); }
.note--error { border-color: rgba(230,49,99,.7); }
.note--info { border-color: rgba(19,154,215,.6); }
.note--success { border-color: rgba(3,158,73,.6); }
.note--warn { border-color: rgba(250,192,43,.6); background: rgba(250,192,43,.10); }
.err { color: #FF8FA3; font-size: 13.5px; font-weight: 700; }

.skel { display: block; border-radius: var(--r-sm); background: rgba(255,255,255,.09); height: 15px; width: 100%; }
.skel--title { height: 34px; width: 62%; }
.skel--line { height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .skel { background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.16), rgba(255,255,255,.07)); background-size: 250% 100%; animation: skelFlow 1.6s linear infinite; }
  .doc:hover { transform: translateY(-4px); background: var(--surface-2); }
  .doc { transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s; }
  .drop { transition: border-color .25s, background .25s; }
}
@keyframes skelFlow { from { background-position: 0% 0; } to { background-position: 250% 0; } }

/* ── profil ──────────────────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0; }
.kv div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv dt { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ── dlaždice dokumentů ──────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.doc {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; color: var(--txt); font-family: inherit; font-size: 15px; min-height: 44px;
}
.doc:focus-visible { border-color: var(--blue); }
.doc__head { display: flex; align-items: flex-start; gap: 12px; }
.doc__head svg { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: rgba(255,255,255,.10); flex-shrink: 0; }
.doc__title { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); }
.chip--blue { border-color: rgba(19,154,215,.55); background: rgba(19,154,215,.14); }
.chip--green { border-color: rgba(3,158,73,.6); background: rgba(3,158,73,.16); }
.chip--yellow { border-color: rgba(250,192,43,.5); background: rgba(250,192,43,.12); color: var(--yellow); }
.chip--muted { color: var(--muted); }

/* ── segmentovaný přepínač ───────────────────────────────────────────────── */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--muted); font-family: inherit; font-size: 15px; font-weight: 700;
}
.seg__btn.is-on { color: var(--txt); background: var(--surface-2); border-color: rgba(255,255,255,.28); }

/* ── drop zóna ───────────────────────────────────────────────────────────── */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 2px dashed rgba(255,255,255,.22); border-radius: var(--r-md);
  padding: 34px 18px; text-align: center; cursor: pointer;
}
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--blue); background: rgba(19,154,215,.08); }
.drop strong { font-size: 17px; font-weight: 700; }

/* ── náhled znění ────────────────────────────────────────────────────────── */
.preview { display: flex; flex-direction: column; gap: 12px; overflow-wrap: anywhere; }
.preview p { font-size: 16px; }
.preview--clip { max-height: 320px; overflow: hidden; mask-image: linear-gradient(#000 72%, transparent); -webkit-mask-image: linear-gradient(#000 72%, transparent); }
#preview-toggle { align-self: flex-start; }

/* ── formulář odkazu ─────────────────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fld--wide { grid-column: 1 / -1; }

/* ── řádky odkazů a podpisů ──────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:first-child { padding-top: 0; }
.row__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 260px; }
.row__title { font-weight: 700; overflow-wrap: anywhere; }
/* nahrazený odkaz: utlumený barvou, ne průhledností (kontrast musí zůstat) */
.row--dim .row__title { color: var(--muted); }
.row__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copybox input { flex: 1 1 260px; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--txt); font-family: inherit; }

/* ── mobil ───────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .card__head .btn { flex: 1 0 100%; }
}

@media (max-width: 720px) {
  .topbar--tool { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .topbar--tool h1 { font-size: 19px; flex: 1; }
  .topbar__actions { flex: 1 0 100%; margin-left: 0; }
  .tool { padding: 6px 18px 40px; }
  .tool .card { padding: 20px; }
  .auth .actions .btn, .seg__btn { flex: 1 0 100%; }
  .row__actions .btn { flex: 1; }
}

/* .js .reveal dostane zpoždění z --d (tokens.css řeší reduced-motion) */
.js .reveal { transition-delay: var(--d, 0s); }

/* odkaz: volba „podpis prstem“ */
.drawn-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.drawn-opt input { width: 20px; height: 20px; accent-color: #E63163; }
.drawn-opt .muted { flex-basis: 100%; font-weight: 400; font-size: 14px; }
