/* Lysi Doc demo: guide layer over static snapshots of the app screens (no app code runs here). */
#app { display: contents; }
#app textarea { caret-color: transparent; }

/* frosted glass: only behind centred popups */
.lg-glass { position: fixed; inset: 0; z-index: 8998; pointer-events: none; opacity: 0; visibility: hidden;
  background: rgba(244, 242, 237, .45); -webkit-backdrop-filter: blur(5px) saturate(.85); backdrop-filter: blur(5px) saturate(.85);
  transition: opacity .6s ease, visibility 0s linear .6s; }
.lg-glass.on { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }

.lg-ring { position: fixed; z-index: 9000; pointer-events: none; border-radius: 14px;
  box-shadow: 0 0 0 3px var(--lysi-doc, #00a3a3), 0 0 0 8px color-mix(in srgb, var(--lysi-doc, #00a3a3) 25%, transparent);
  transition: all .35s cubic-bezier(.2,.8,.2,1); animation: lg-pulse 1.6s ease-in-out infinite; }
.lg-ring[hidden] { display: none; }
@keyframes lg-pulse { 50% { box-shadow: 0 0 0 3px var(--lysi-doc, #00a3a3), 0 0 0 16px transparent; } }

/* coach card: bright, set apart by a teal top band, a badge and a strong shadow */
.lg-card { position: fixed; z-index: 9001; width: min(580px, calc(100vw - 32px)); background: #ffffff; border-radius: 20px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 35%, #e3e0d9);
  box-shadow: 0 30px 80px rgba(20, 40, 38, .28), 0 4px 14px rgba(20, 40, 38, .10); font-family: Geist, -apple-system, sans-serif;
  transition: top .35s cubic-bezier(.2,.8,.2,1), left .35s cubic-bezier(.2,.8,.2,1); animation: lg-in .35s ease both; }
.lg-card[hidden] { display: none; }
.lg-card::before { content: ""; display: block; height: 6px; background: var(--lysi-doc, #00a3a3); }
.lg-card .in { padding: 22px 30px 22px; }
.lg-card .lg-step { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.lg-card .badge { font: 600 13px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #007f7f;
  background: color-mix(in srgb, var(--lysi-doc, #00a3a3) 12%, #fff); padding: 7px 10px; border-radius: 7px; }
.lg-card .lg-step button { all: unset; cursor: pointer; color: #7b8582; font: 500 14px Geist, sans-serif; }
.lg-card .lg-step button:hover { color: #1d2524; }
.lg-card .lg-text p { margin: 0 0 10px; color: #3b4644; font-size: 19px; line-height: 1.5; }
.lg-card .lg-text p.lead { font-size: 27px; line-height: 1.25; font-weight: 600; color: #141b1a; letter-spacing: -.01em; margin-bottom: 12px; }
.lg-card .lg-text b { color: #141b1a; font-weight: 600; }
.lg-acts { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.lg-btn { font: 600 17px Geist, -apple-system, sans-serif; border-radius: 12px; padding: 13px 22px; cursor: pointer; border: 1px solid #007f7f; background: #007f7f; color: #fff; }
.lg-btn:hover { background: #006b6b; }
.lg-btn.ghost { background: transparent; color: #007f7f; }
.lg-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 45%, transparent); outline-offset: 2px; }
.lg-dots { display: flex; gap: 7px; margin-top: 18px; }
.lg-dots i { width: 28px; height: 4px; border-radius: 2px; background: #e3e0d9; }
.lg-dots i.on { background: var(--lysi-doc, #00a3a3); }

/* scan: logo left (sharp, above the glass), steps right */
.lg-sclogo { position: fixed; z-index: 9001; width: 240px; display: flex; flex-direction: column; align-items: center; gap: 22px; pointer-events: none; }
.lg-sclogo[hidden] { display: none; }
.lg-sclogo .lysi-loader-logo { width: 200px; }
.lg-sclogo p { margin: 0; font: 500 16px Geist, -apple-system, sans-serif; color: #6b716f; }
.lg-scan { position: fixed; z-index: 9001; width: min(640px, calc(100vw - 32px)); background: #fff; border-radius: 20px; padding: 16px 24px 14px;
  border: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 30%, #e3e0d9); box-shadow: 0 30px 80px rgba(20,40,38,.22);
  font-family: Geist, -apple-system, sans-serif; color: #1d2524; max-height: calc(100vh - 32px); overflow: auto; }
.lg-scan[hidden] { display: none; }
.lg-sc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.lg-sc-step { font: 600 13px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #007f7f; }
.lg-scan .safe { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #6b716f; border: 1px solid #dcd8d0; border-radius: 999px; padding: 4px 11px; }
.lg-scan .safe i { width: 7px; height: 7px; border-radius: 50%; background: #2f9e5f; }
.lg-scan .stg { padding: 8px 0; border-top: 1px solid #ece9e3; animation: lg-in .5s cubic-bezier(.2,.8,.2,1) both; }
.lg-scan .stg:first-child { border-top: 0; }
.lg-scan .stg-h { display: flex; align-items: center; gap: 10px; }
.lg-scan .stg-h b { font-size: 17px; font-weight: 600; flex: none; }
.lg-scan .stg-h .ds { flex: 1; min-width: 0; font-size: 14px; color: #6b716f; line-height: 1.35; }
.lg-scan .ix { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px "Geist Mono", monospace; background: #dff2f1; color: #007f7f; flex: none; }
.lg-scan .st { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #bfe3e1; border-top-color: #00a3a3; animation: lg-spin .8s linear infinite; flex: none; }
.lg-scan .stg.done .st { animation: none; border: 0; width: auto; height: auto; }
.lg-scan .stg.done .st::before { content: "✓"; color: #2f9e5f; font-weight: 700; font-size: 16px; }
.lg-scan .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 34px; }
.lg-scan .chips span { font-size: 13.5px; padding: 4px 9px; border-radius: 7px; background: #f3f1ec; animation: lg-chip .55s cubic-bezier(.2,.8,.2,1) both; }
.lg-scan .chips i { font-style: normal; color: #6b716f; margin: 0 2px; }
.lg-scan .chips em { font: 500 12.5px "Geist Mono", ui-monospace, monospace; font-style: normal; color: #007f7f; background: #dff2f1; padding: 1px 6px; border-radius: 5px; }
.lg-sc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid #ece9e3; }
.lg-scan .sub { font-size: 15px; color: #6b716f; }
.lg-scan .sub b { font: 600 17px "Geist Mono", ui-monospace, monospace; color: #007f7f; }
.lg-scan .lg-btn[hidden] { display: none; }
.lg-scan .lg-btn { animation: lg-in .4s ease both; }

/* placeholder swap animation on the snapshot tokens */
.lg-flip { animation: lg-flip .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lg-flip { 0% { opacity: .2; transform: translateY(4px) scale(.96); } 100% { opacity: 1; transform: none; } }


/* end card */
.lg-end { position: fixed; inset: 0; z-index: 9002; display: grid; place-items: center; }
.lg-end[hidden] { display: none; }
.lg-end .box { background: #fff; border-radius: 22px; overflow: hidden; width: min(580px, calc(100vw - 32px));
  border: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 35%, #e3e0d9); box-shadow: 0 30px 80px rgba(20,40,38,.28); font-family: Geist, -apple-system, sans-serif; animation: lg-in .4s ease both; }
.lg-end .box::before { content: ""; display: block; height: 6px; background: var(--lysi-doc, #00a3a3); }
.lg-end .in { padding: 26px 30px 26px; }
.lg-end h3 { margin: 0 0 10px; font-size: 28px; color: #141b1a; }
.lg-end p, .lg-end li { color: #3b4644; font-size: 18px; line-height: 1.5; margin: 0 0 6px; }
.lg-end ol { margin: 8px 0 14px; padding-left: 24px; }
.lg-end a.lg-btn { text-decoration: none; display: inline-block; }

@keyframes lg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lg-chip { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes lg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .lg-ring, .lg-card, .lg-scan .stg, .lg-scan .chips span, .lg-end .box, .lg-scan .st, .lg-flip { animation: none; }
  .lg-ring, .lg-card, .lg-glass { transition: none; }
}

/* explanation cards: same card, amber band + badge so they read as "about this part", not as the next tour step */
.lg-card.is-info::before { background: #d39a3a; }
.lg-card .badge.info { color: #8a5a12; background: #fbf0dc; }

/* «Alle maskieren»: each confirmed row and hit flashes once */
.wst-row.lg-row-done { animation: lg-rowdone 1.1s ease both; }
@keyframes lg-rowdone { 0% { background: color-mix(in srgb, var(--lysi-doc, #00a3a3) 22%, transparent); } 100% { background: transparent; } }
.wst-row.lg-row-done .wst-fill { transition: width .6s ease; }
.ws-mark.lg-mark-done { outline: 2px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 55%, transparent); outline-offset: 1px; transition: outline-color 1.2s ease; }

/* explore mode bar */
.lg-explore { position: fixed; z-index: 9002; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 35%, #e3e0d9); border-radius: 16px; padding: 10px 12px 10px 20px;
  box-shadow: 0 18px 50px rgba(20,40,38,.22); font: 16px Geist, -apple-system, sans-serif; color: #3b4644; max-width: calc(100vw - 32px); flex-wrap: wrap; }
.lg-explore[hidden] { display: none; }
.lg-explore b { color: #141b1a; }
.lg-explore .lg-btn { font-size: 15px; padding: 9px 14px; text-decoration: none; }

/* scan: the "stays on this Mac" message is the headline of the panel */
.lg-local { display: flex; align-items: center; gap: 16px; margin: 2px 0 8px; padding: 12px 16px; border-radius: 14px;
  background: #e6f5f3; border: 1.5px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 55%, transparent); color: #007f7f; animation: lg-in .5s ease both; }
.lg-local svg { flex: none; }
.lg-local .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lg-local .lt b { font-size: 22px; line-height: 1.2; color: #0d3b39; font-weight: 650; }
.lg-local .lt span { font-size: 15px; color: #2f5f5c; }
.lg-local .bytes { flex: none; text-align: right; display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 35%, transparent); }
.lg-local .bytes small { font: 600 11px "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #2f5f5c; }
.lg-local .bytes b { font: 600 22px "Geist Mono", ui-monospace, monospace; color: #007f7f; }
.lg-sclogo p { text-align: center; line-height: 1.4; }

/* the mask: original on top, placeholder below */
.lg-mask { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.lg-mask .mrow { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 12px; background: #f3f1ec; border: 1px solid #e3e0d9; }
.lg-mask .mrow small { font: 600 11.5px "Geist Mono", ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; color: #6b716f; }
.lg-mask .mrow b { font-size: 20px; font-weight: 600; color: #141b1a; overflow-wrap: anywhere; }
.lg-mask .mrow.ph { background: #e6f5f3; border-color: color-mix(in srgb, var(--lysi-doc, #00a3a3) 45%, transparent); }
.lg-mask .mrow.ph small { color: #2f5f5c; }
.lg-mask .mrow.ph b { font-family: "Geist Mono", ui-monospace, monospace; color: #007f7f; }
.lg-mask .marr { text-align: center; color: #00a3a3; font-size: 18px; line-height: 1; }
.lg-card .lg-text p.mnote { font-size: 16px; color: #6b716f; margin-top: 10px; }
/* the three "no" promises, big enough to read at a glance */
.lg-local .nos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lg-local .nos span { display: inline-flex; align-items: center; gap: 7px; font: 650 16px Geist, -apple-system, sans-serif; color: #fff; background: #007f7f; padding: 7px 13px 7px 10px; border-radius: 999px; }
.lg-local .nos i { font-style: normal; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 12px; }
.lg-local .nos span:nth-child(1) { animation: lg-chip .5s .3s cubic-bezier(.2,.8,.2,1) both; }
.lg-local .nos span:nth-child(2) { animation: lg-chip .5s .7s cubic-bezier(.2,.8,.2,1) both; }
.lg-local .nos span:nth-child(3) { animation: lg-chip .5s 1.1s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .lg-local .nos span { animation: none !important; } }
/* app CSS colours spans globally; the chips must stay white on teal */
.lg-local .nos span { color: #fff !important; }

/* ===== phone layout (body.lg-m, set below 700 px) ===== */
.lg-mhead { display: none; }
body.lg-m .lg-mhead { display: flex; flex: none; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: var(--lysi-rail, #efece6); border-bottom: 1px solid var(--lysi-rail-border, #e3e0d9); font-family: Geist, -apple-system, sans-serif; }
body.lg-m .lg-mhead[hidden] { display: none; }
.lg-mlogo { font-size: 17px; letter-spacing: .03em; color: #1d2524; }
.lg-mlogo b { color: var(--lysi-doc, #00a3a3); font-weight: 500; }
.lg-mstep { flex: 1; font: 600 12px "Geist Mono", ui-monospace, monospace; letter-spacing: .04em; color: #6b716f; text-transform: uppercase; }
.lg-mpanes { display: flex; background: #e3e0d9; border-radius: 9px; padding: 2px; }
.lg-mpanes[hidden] { display: none; }
.lg-mpanes button { all: unset; cursor: pointer; font: 600 13px Geist, sans-serif; padding: 6px 10px; border-radius: 7px; color: #3b4644; }
.lg-mpanes button.on { background: #fff; color: #141b1a; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* app grid → one column; rail hidden; the list only when its pane is chosen.
   !important: the app sets these with id/data-step selectors of higher specificity */
body.lg-m .ws { grid-template-columns: minmax(0, 1fr) !important; }
body.lg-m .ws-rail, body.lg-m .ws-mask-grip { display: none !important; }
body.lg-m .ws-mask { display: none !important; }
body.lg-m.lg-pane-mask .ws-mask { display: flex !important; visibility: visible !important; border-left: 0; }
body.lg-m.lg-pane-mask .ws-main { display: none !important; }
body.lg-m .ws-head { height: auto; min-height: 48px; padding: 8px 14px; flex-wrap: wrap; gap: 6px 10px; }
body.lg-m .ws-head > * { min-width: 0; }
body.lg-m .ws-safety { overflow-x: auto; }
body.lg-m .ws-safety > * { flex-wrap: wrap; }
body.lg-m .ws-review > *, body.lg-m .ws-re, body.lg-m .ws-input { padding-left: 12px !important; padding-right: 12px !important; }
body.lg-m .ws-re .split-view { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: none !important; grid-auto-rows: auto; overflow: auto; }
body.lg-m .ws-re .split-header, body.lg-m .ws-re .split-col { grid-row: auto !important; grid-column: 1 !important; }
body.lg-m .ws-re .split-col { min-height: 220px; }

/* sheets: full width, at the top or the bottom */
body.lg-m .lg-card, body.lg-m .lg-end .box { left: 10px !important; right: 10px; width: auto; border-radius: 18px; }
body.lg-m .lg-card .in { padding: 16px 18px 16px; }
body.lg-m .lg-card .lg-text p { font-size: 17px; }
body.lg-m .lg-card .lg-text p.lead { font-size: 22px; }
body.lg-m .lg-btn { font-size: 16px; padding: 11px 16px; }
body.lg-m .lg-acts { margin-top: 12px; gap: 8px; }
body.lg-m .lg-dots { margin-top: 12px; }
body.lg-m .lg-mask .mrow b { font-size: 18px; }
body.lg-m .lg-end .box { position: relative; left: 0 !important; width: calc(100vw - 20px); }
body.lg-m .lg-end .in { padding: 20px; }
body.lg-m .lg-end h3 { font-size: 24px; }
body.lg-m .lg-end p, body.lg-m .lg-end li { font-size: 16px; }

/* scan: full-screen panel, newest step scrolls into view, button stays at the bottom */
body.lg-m .lg-sclogo { display: none !important; }
body.lg-m .lg-scan { left: 10px !important; right: 10px; top: 10px !important; width: auto; max-height: calc(100vh - 20px); padding: 12px 14px 0; }
body.lg-m .lg-local { flex-wrap: wrap; gap: 10px; padding: 12px; }
body.lg-m .lg-local svg { width: 26px; height: 26px; }
body.lg-m .lg-local .lt b { font-size: 19px; }
body.lg-m .lg-local .bytes { flex-direction: row; align-items: baseline; gap: 8px; border-left: 0; padding-left: 0; width: 100%; text-align: left; }
body.lg-m .lg-local .bytes b { font-size: 18px; }
body.lg-m .lg-local .nos span { font-size: 14px; padding: 5px 10px 5px 8px; }
body.lg-m .lg-scan .stg-h { flex-wrap: wrap; }
body.lg-m .lg-scan .stg-h .ds { flex-basis: 100%; order: 3; padding-left: 34px; }
body.lg-m .lg-scan .chips { margin-left: 0; }
body.lg-m .lg-sc-foot { position: sticky; bottom: 0; background: #fff; padding: 10px 0 12px; margin-top: 4px; }
body.lg-m .lg-explore { left: 10px; right: 10px; transform: none; bottom: 10px; font-size: 14px; gap: 8px; padding: 10px; }
/* phone: restore step shows one paper at a time (the answer before, the restored text after) */
body.lg-m .ws-re .split-view { display: flex !important; flex-direction: column; overflow: hidden; }
body.lg-m .ws-re .split-view > .split-header:nth-child(2),
body.lg-m .ws-re .split-scroll-outer > .split-col:nth-child(2) { display: none; }
body.lg-m.lg-re-out .ws-re .split-view > .split-header:nth-child(1),
body.lg-m.lg-re-out .ws-re .split-scroll-outer > .split-col:nth-child(1) { display: none; }
body.lg-m.lg-re-out .ws-re .split-view > .split-header:nth-child(2),
body.lg-m.lg-re-out .ws-re .split-scroll-outer > .split-col:nth-child(2) { display: flex; }
body.lg-m .ws-re .split-col { flex: 1; min-height: 0; overflow: auto; }
body.lg-m .ws-re-grip, body.lg-m .ws-re-left { display: none !important; }
body.lg-m .ws-re-foot { justify-content: flex-end; }
/* phone: text fields without the desktop side padding */
body.lg-m #inputText, body.lg-m #remapInput, body.lg-m .ws-re .split-header, body.lg-m #remapResult { padding-left: 16px !important; padding-right: 16px !important; }

/* desktop: switch to preview the phone layout in a 9:16 frame */
.lg-view { position: fixed; z-index: 9004; top: 10px; left: 50%; transform: translateX(-50%); font: 600 14px Geist, -apple-system, sans-serif;
  background: #fff; color: #007f7f; border: 1px solid color-mix(in srgb, var(--lysi-doc, #00a3a3) 45%, #e3e0d9); border-radius: 999px; padding: 7px 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(20,40,38,.12); }
.lg-view[hidden] { display: none; }
.lg-phone { position: fixed; inset: 0; z-index: 9010; background: #e9e6df; display: flex; flex-direction: column; align-items: center; }
.lg-phone[hidden] { display: none; }
.lg-ph-bar { display: flex; align-items: center; gap: 16px; padding: 14px; font: 600 14px Geist, -apple-system, sans-serif; color: #3b4644; }
.lg-ph-bar .lg-btn { font-size: 14px; padding: 8px 14px; }
.lg-ph-dev { width: 390px; height: 844px; flex: none; transform-origin: top center; border-radius: 44px; border: 12px solid #1d2524; overflow: hidden;
  box-shadow: 0 30px 80px rgba(20,40,38,.3); background: #fff; box-sizing: content-box; }
.lg-ph-dev iframe { width: 390px; height: 844px; border: 0; display: block; }
