/* Archeopolis – přihlašovací stránka (návrh). Bere tokeny z style.css (barvy, písma, bubliny, kurzor streamu). */
:root { --lg-w: 420px; --lg-pad: 1.6rem; --lg-r: 18px; --lg-fr: 10px; }
:root[data-bubr="ostre"], :root[data-bubr="hranate"] { --lg-r: 4px; --lg-fr: 3px; }
:root[data-bubr="oble"], :root[data-bubr="kapsle"] { --lg-r: 24px; --lg-fr: 14px; }
html { scroll-padding-top: 0; }
body { display: grid; min-height: 100vh; min-height: 100dvh; }

.lg-main { width: 100%; min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 1.4rem; padding: 3rem 16px; }
:root[data-formpos="left"] .lg-main { justify-items: start; padding-left: clamp(16px, 8vw, 140px); }
:root[data-formpos="right"] .lg-main { justify-items: end; padding-right: clamp(16px, 8vw, 140px); }
.lg-main > * { width: min(var(--lg-w), 100%); }

/* značka */
.lg-brand { justify-self: center; width: auto; }
:root[data-formpos="left"] .lg-brand { justify-self: start; }
:root[data-formpos="right"] .lg-brand { justify-self: end; }
.lg-brand .brand-n { font-size: calc(1.9rem * var(--dscale, .62) / .62); }
.lg-brand .lg { width: calc(44px * var(--lgs, 1)); height: calc(44px * var(--lgs, 1)); }
:root[data-brandpos="roh"] .lg-brand { position: fixed; top: 22px; left: 26px; justify-self: auto; z-index: 5; }
:root[data-brandpos="roh"] .lg-brand .brand-n { font-size: 1.45rem; }
:root[data-brandpos="roh"] .lg-brand .lg { width: 34px; height: 34px; }
:root[data-brandpos="skryta"] .lg-brand { display: none; }

/* karta */
.lg-card { position: relative; display: grid; gap: .9rem; padding: var(--lg-pad); border-radius: var(--lg-r); }
:root[data-formcard="sklo"] .lg-card { background: color-mix(in srgb, var(--sheet) calc(var(--lg-op, .55) * 100%), transparent); backdrop-filter: blur(var(--lg-blur, 18px)) saturate(1.4); -webkit-backdrop-filter: blur(var(--lg-blur, 18px)) saturate(1.4); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: var(--shadow-lg), inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent); }
:root[data-formcard="plna"] .lg-card { background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow-lg); }
:root[data-formcard="pruhledna"] .lg-card { background: color-mix(in srgb, var(--bg) calc(var(--lg-op, .55) * 60%), transparent); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-formcard="zadna"] .lg-card { background: none; border: 0; padding-inline: 0; }
:root[data-formcard="linka"] .lg-card { background: none; border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding-inline: 0; }

.view { display: grid; gap: .95rem; }
.view h1 { margin: 0 0 .2rem; font: 600 1.25rem/1.25 var(--body); }
:root[data-formtitle="display"] .view h1 { font: var(--dw) calc(1.9rem * var(--dscale, .62) / .62)/1.1 var(--display); letter-spacing: var(--dtrack); text-transform: var(--dcase); }
.view p { margin: 0; }
.note { color: var(--muted); font-size: .92rem; }
.note b { color: var(--ink); font-weight: 600; }
form { display: grid; gap: .9rem; }
label { display: grid; gap: .38rem; font: 500 .88rem/1.3 var(--body); }
.hint { color: var(--muted); font-weight: 400; }

/* pole */
.fld { width: 100%; min-width: 0; font: 400 1rem/1.2 var(--body); padding: .78rem .9rem; color: var(--ink); border-radius: var(--lg-fr);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); background: color-mix(in srgb, var(--bg) 55%, transparent); transition: border-color .2s, background .2s, box-shadow .2s; }
.fld::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.fld:focus { outline: none; border-color: color-mix(in srgb, var(--ink) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
:root[data-formfield="vypln"] .fld { border-color: transparent; background: color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-formfield="podtrzeni"] .fld { border: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 0; background: none; padding-inline: 0; }
:root[data-formfield="podtrzeni"] .fld:focus { box-shadow: 0 1px 0 0 var(--ink); }
.fld.wrong { border-color: var(--bad); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* tlačítka (vzhled bublin z rozcestníku: .btn, data-bubr/bubstyle/btnmain) */
.view .btn { justify-content: center; width: 100%; margin-top: .25rem; height: 48px; }
.view .btn.ghost { width: auto; justify-self: start; height: 40px; }
.links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .9rem; }
.links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); transition: color .2s, border-color .2s; }
.links a:hover { color: var(--ink); border-color: var(--ink); }

/* captcha */
.cap { display: grid; gap: .4rem; font: 500 .88rem/1.3 var(--body); }
.screen { border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: var(--lg-fr); overflow: hidden; background: #0d0d0d; }
#noise { display: block; width: 100%; aspect-ratio: 5 / 2; image-rendering: pixelated; }
.cap-row { display: flex; gap: .5rem; }
#guess { font: 500 1.05rem/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.cap-row .btn { width: 48px !important; height: auto !important; margin: 0 !important; padding: 0; flex: none; font-size: 1.1rem; }

.msg { margin: 0; font-size: .9rem; font-weight: 500; }
.msg:empty { display: none; }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* tlačítko návrhu vpravo nahoře */
.lg-tools { position: fixed; top: 18px; right: 20px; z-index: 30; display: flex; gap: .5rem; }
:root.pv-open .lg-open { opacity: 0; pointer-events: none; }
.toast { z-index: 120; }

/* ---------------------------------------------------------------- stream textu (tokeny .tk, kurzor .st-cur ze style.css) */
.lg-card .tk { transition: opacity var(--stfade) ease-out, filter var(--stfade) ease-out, transform var(--stfade) var(--ease), color calc(var(--stfade) * 4) ease-out, text-shadow calc(var(--stfade) * 4) ease-out; }
.lg-card .tk:not(.on) { opacity: 0; }
.lg-card .tk.sx-blur:not(.on) { filter: blur(6px); }
.lg-card .tk.sx-rise { display: inline-block; white-space: pre; }
.lg-card .tk.sx-rise:not(.on) { transform: translateY(.45em); }
.lg-card .tk.sx-glow:not(.on) { color: var(--accent); text-shadow: 0 0 .6em color-mix(in srgb, var(--accent) 80%, transparent); }
.lg-card .tk.sx-type { transition: none; }
.lg-card .tk.sx-ghost:not(.on) { opacity: .14; }
/* pole, tlačítka a captcha se objeví, když je stream dojde */
.lg-card .bx { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.lg-card .bx:not(.on) { opacity: 0; transform: translateY(4px); pointer-events: none; }
/* tlačítko: rámeček se objeví hned, text se dopíše streamem */
.lg-card .btn.bx:not(.on) { opacity: 0; }

/* ---------------------------------------------------------------- objevení karty */
.lg-card.tr-mask { -webkit-mask-image: paint(trmask); mask-image: paint(trmask); }
.lg-card.tr-fade { animation: lgFade .7s var(--ease) both; }
.lg-card.tr-rise { animation: lgRise .8s var(--ease) both; }
.lg-card.tr-blur { animation: lgBlur .8s var(--ease) both; }
.lg-card.tr-wait { visibility: hidden; }
@keyframes lgFade { from { opacity: 0; } }
@keyframes lgRise { from { opacity: 0; transform: translateY(26px); } }
@keyframes lgBlur { from { opacity: 0; filter: blur(14px); transform: scale(.98); } }

@media (prefers-reduced-motion: reduce) { :root:not([data-motion="force"]) .lg-card .tk, :root:not([data-motion="force"]) .lg-card .bx { opacity: 1 !important; transform: none !important; filter: none !important; } }
@media (max-width: 520px) { .lg-main { padding-top: 4.5rem; } :root[data-brandpos="roh"] .lg-brand { top: 16px; left: 16px; } }
/* podtržení odkazu až s jeho textem */
.lg-card .links a:has(.tk):not(:has(.tk.on)) { border-bottom-color: transparent; }
