/* Kids Supercar dashboard as an app - styles for /app and the dashboard card.
   Uses the console tokens from /static/styles.css; nothing here redefines them. */

/* Browser tab vs installed app. The media query covers Android and iOS
   when launched from the home screen; .in-app is set by dashboard-app.js
   from navigator.standalone as well, for older iOS that lacks the query. */
.only-in-app { display: none; }
@media (display-mode: standalone) {
  .only-in-browser { display: none !important; }
  .only-in-app { display: block; }
  .ks-app-card.only-in-app { display: flex; }
}
html.in-app .only-in-browser { display: none !important; }
html.in-app .only-in-app { display: block; }
html.in-app .ks-app-card.only-in-app { display: flex; }

/* ---------------------------------------------------------------- card on /dashboard */
.ks-app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-console);
}
.ks-app-card.only-in-app { display: none; }
.ks-app-card[hidden] { display: none !important; }
.ks-app-card-text { min-width: 0; flex: 1 1 16rem; }
.ks-app-card-title { margin: 0 0 0.2rem; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.ks-app-card-desc { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.ks-app-card-actions { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.ks-app-card-actions .console-btn { text-decoration: none; }
.ks-app-card-hide {
  background: none; border: 0; padding: 0.4rem 0.2rem; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
}
.ks-app-card-hide:hover { color: var(--ink); }

/* ---------------------------------------------------------------- /app page */
.ks-app-intro { margin: -0.4rem 0 1.25rem; color: var(--muted); max-width: 44rem; line-height: 1.5; }
.ks-app-inapp { margin: 0 0 1.25rem; color: var(--success); font-weight: 700; }
.ks-app-section { margin: 0 0 1.5rem; }
.ks-app-section h3 { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; margin: 0 0 0.6rem; }
.ks-app-desc { margin: -0.4rem 0 1rem; color: var(--muted); font-size: 0.85rem; line-height: 1.5; max-width: 44rem; }
.ks-app-platform[hidden] { display: none; }
.ks-app-steps { margin: 0 0 0.9rem; padding-left: 1.2rem; font-size: 0.85rem; line-height: 1.55; }
.ks-app-steps li { margin: 0 0 0.35rem; }
.ks-app-qr img { display: block; margin: 0 0 0.7rem; border-radius: 8px; background: #fff; max-width: 100%; height: auto; }
.ks-app-qr p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.ks-app-qr p.ks-app-note { margin: 0.6rem 0 0; }
.ks-app-note { margin: 1rem 0 0; font-size: 0.8rem; color: var(--muted); }
.ks-app-status { margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 600; }
.ks-app-status.is-on { color: var(--success); }
.ks-app-status.is-warn { color: var(--accent-2); }
.ks-app-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ks-app-subhead { margin: 1.4rem 0 0.6rem !important; }
.ks-app-kinds { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; font-size: 0.85rem; }
.ks-app-kinds label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.ks-app-kinds input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.ks-app-meta { color: var(--muted); font-size: 0.75rem; }
.ks-app-list { list-style: none; margin: 0; padding: 0; }
.ks-app-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.85rem;
}
.ks-app-list li:first-child { border-top: 0; }
.ks-app-list li > span { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.ks-app-empty { padding: 0 !important; text-align: left !important; }
.ks-app-test { margin: 0.75rem 0 0; }
.ks-app-ok { color: var(--success); font-weight: 600; font-size: 0.85rem; margin: 0 0 0.75rem; }
.ks-app-warn { color: var(--accent-2); font-weight: 600; font-size: 0.85rem; margin: 0 0 0.75rem; }
.ks-app-hint { display: block; max-width: 44rem; margin: 0.6rem 0 0; line-height: 1.45; }

/* ---------------------------------------------------------------- "Face ID from now on?" page */
.ks-offer { max-width: 26rem; margin: 1.5rem auto; padding: 2rem 1.5rem 1.6rem; text-align: center; }
.ks-offer-icon { width: 4.25rem; height: 4.25rem; margin: 0 auto 1.1rem; display: grid; place-items: center; border-radius: 1.2rem; background: var(--ground); border: 1px solid var(--line); }
.ks-offer-icon svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ks-offer-title { margin: 0 0 0.6rem; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; text-wrap: balance; }
.ks-offer-desc { margin: 0 0 1.4rem; color: var(--muted); line-height: 1.5; }
.ks-offer .ks-offer-yes { width: 100%; padding: 0.85rem 1rem; font-size: 0.95rem; }
.ks-offer .ks-app-status { margin: 0.9rem 0 0; }
.ks-offer-later { display: inline-block; margin: 1rem 0 0; padding: 0.4rem 0.8rem; color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.ks-offer-hint { margin: 1.4rem 0 0; padding: 0.8rem 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; line-height: 1.5; text-align: left; }

/* ---------------------------------------------------------------- install demo */
.ks-demo { margin: 0 0 1.5rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-console); background: var(--surface-2); }
.ks-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.ks-demo-head h3 { margin: 0 !important; }
.ks-demo-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); }
.ks-demo-tabs button { border: 0; background: none; color: var(--muted); font: 700 0.78rem var(--font-body); padding: 0.4rem 0.95rem; border-radius: 999px; cursor: pointer; }
.ks-demo-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.ks-demo-tabs button:focus-visible, .ks-demo-steps button:focus-visible, .ks-demo-replay:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
/* Phone on the left with its steps right next to it; anything extra (the
   QR code) takes the room at the far right. On a narrow screen it all
   stacks, phone first. */
.ks-demo-body { display: flex; gap: 2rem 2.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-start; }
/* Capped: on a wide screen the highlighted step otherwise becomes a bar
   stretching far away from the phone it belongs to. */
.ks-demo-side { flex: 0 1 24rem; min-width: 0; }
.ks-demo-aside { flex: 0 1 17rem; min-width: 0; margin-left: auto; padding-left: 2rem; border-left: 1px solid var(--line); }
@media (max-width: 1180px) {
  .ks-demo-aside { flex-basis: 100%; margin-left: 0; padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .ks-demo-body { justify-content: center; }
}
.ks-demo-steps { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.ks-demo-steps[hidden] { display: none; }
.ks-demo-steps button {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; text-align: left; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 10px; padding: 0.55rem 0.7rem;
  color: var(--muted); font: 600 0.88rem var(--font-body);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.ks-demo-steps li.is-active button { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ks-step-nr {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ground); color: var(--muted); font-weight: 800; font-size: 0.78rem; transition: background 0.25s, color 0.25s;
}
.ks-demo-steps li.is-active .ks-step-nr { background: var(--accent); color: var(--accent-ink); }
.ks-demo-replay { background: none; border: 0; padding: 0.3rem 0.7rem; color: var(--muted); font: 600 0.8rem var(--font-body); cursor: pointer; text-decoration: underline; }
/* the page's own text and button, under the steps */
.ks-demo-extra { margin: 1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line); }
.ks-demo-extra .ks-app-steps { margin-bottom: 0.4rem; }
.ks-demo-extra .ks-app-hint { margin-top: 0.8rem; }

/* The phone. Sizes inside are fixed pixels on purpose: the tap marks are
   positioned against this exact layout. */
.ks-phone { position: relative; flex: none; width: 230px; height: 470px; border-radius: 40px; background: #0b0a10; padding: 9px; box-shadow: 0 0 0 2px #2a2735, 0 24px 50px -20px rgba(0, 0, 0, 0.7); }
.ks-phone[hidden] { display: none; }
.ks-phone-screen { position: relative; width: 212px; height: 452px; border-radius: 32px; overflow: hidden; background: #fff; color: #111; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.ks-phone-android { border-radius: 30px; }
.ks-phone-android .ks-phone-screen { border-radius: 22px; font-family: Roboto, "Segoe UI", sans-serif; }
.ks-island { position: absolute; z-index: 7; top: 17px; left: 50%; width: 64px; height: 18px; margin-left: -32px; border-radius: 12px; background: #000; }
.ks-camera { position: absolute; z-index: 7; top: 17px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #000; }

.ks-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
.ks-scene.is-active { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }

/* the dashboard behind the browser chrome */
.ks-demo-page { position: absolute; inset: 0; background: #14122a; padding: 34px 12px 0; }
.ks-phone-android .ks-demo-page { top: 68px; padding-top: 10px; }
.ks-demo-page-top { display: flex; align-items: center; justify-content: space-between; height: 26px; margin: 0 0 12px; padding: 0 8px; background: #1f1b3d; border-radius: 8px; }
.ks-demo-logo { color: #fff; font-size: 7px; font-weight: 900; letter-spacing: 0.12em; }
.ks-demo-burger { width: 12px; height: 8px; border-top: 2px solid #9089b5; border-bottom: 2px solid #9089b5; }
.ks-demo-line { height: 9px; border-radius: 4px; background: #332c5c; margin: 0 0 10px; }
.ks-demo-line.is-title { width: 55%; background: #f5f3ff; opacity: 0.85; }
.ks-demo-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 8px; }
.ks-demo-tiles span { height: 38px; border-radius: 7px; background: #1f1b3d; border: 1px solid #332c5c; }
.ks-demo-block { height: 70px; border-radius: 8px; background: #1f1b3d; border: 1px solid #332c5c; margin: 0 0 8px; }
.ks-demo-block.is-short { height: 46px; }

/* iPhone, Safari (iOS 26: back, address and ··· float at the bottom) */
.ks-lock { flex: none; width: 6px; height: 6px; border: 1.4px solid currentColor; border-radius: 1.5px; opacity: 0.6; }
.ks-ios26-bar { position: absolute; left: 8px; right: 8px; bottom: 12px; height: 38px; display: flex; align-items: center; gap: 6px; }
.ks-ios26-btn, .ks-ios26-url { background: rgba(250, 250, 252, 0.95); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); color: #1c1c1e; }
.ks-ios26-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.ks-ios26-btn svg { width: 17px; height: 17px; fill: none; stroke: #1c1c1e; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ks-ios26-more svg { fill: #1c1c1e; stroke: none; }
.ks-ios26-url { flex: 1; min-width: 0; height: 38px; border-radius: 19px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; font-size: 9px; white-space: nowrap; overflow: hidden; }
.ks-ios26-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ks-ios-menu { position: absolute; right: 8px; bottom: 58px; width: 158px; padding: 5px 0; background: rgba(250, 250, 252, 0.97); border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transform-origin: bottom right; transform: scale(0.6); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.15s, opacity 0.2s ease 0.15s; }
.is-active .ks-ios-menu { transform: none; opacity: 1; }
.ks-ios-menu div { height: 32px; display: flex; align-items: center; gap: 9px; padding: 0 12px; font-size: 10px; color: #1c1c1e; white-space: nowrap; }
.ks-ios-menu span { overflow: hidden; text-overflow: ellipsis; }
.ks-ios-row svg, .ks-and-menu svg, .ks-ios-menu svg { width: 17px; height: 17px; fill: none; stroke: #0a7aff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ks-ios-menu svg { flex: none; width: 15px; height: 15px; stroke: #1c1c1e; }
.ks-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); }
.ks-ios-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px 18px; background: #f2f2f7; border-radius: 14px 14px 0 0; transform: translateY(105%); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s; }
.is-active .ks-ios-sheet { transform: none; }
.ks-ios-sheet-head { height: 58px; display: flex; align-items: center; gap: 9px; padding: 0 4px; }
.ks-ios-sheet-head img { width: 38px; height: 38px; border-radius: 9px; }
.ks-ios-sheet-head strong { display: block; font-size: 10px; }
.ks-ios-sheet-head span { display: block; margin-top: 2px; font-size: 8.5px; color: #8a8a8e; }
.ks-ios-rows { margin-top: 10px; background: #fff; border-radius: 11px; overflow: hidden; }
.ks-ios-row { height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px; font-size: 10.5px; border-top: 1px solid #e5e5ea; white-space: nowrap; }
.ks-ios-row:first-child { border-top: 0; }
.ks-ios-row svg { flex: none; stroke: #111; }
.ks-ios-add { position: absolute; inset: 0; padding-top: 30px; background: #f2f2f7; }
.ks-ios-nav { height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.ks-ios-nav strong { min-width: 0; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.ks-ios-nav .ks-blue { flex: none; }
.ks-blue { color: #0a7aff; }
.ks-blue.is-bold { font-weight: 700; }
.ks-ios-card { display: flex; align-items: center; gap: 10px; margin: 14px 10px; padding: 10px; background: #fff; border-radius: 11px; }
.ks-ios-card img { width: 46px; height: 46px; border-radius: 11px; }
.ks-field { display: block; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid #e5e5ea; font-size: 11px; }
.ks-url { display: block; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; color: #8a8a8e; }
.ks-ios-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; margin: 0 10px; padding: 0 10px; background: #fff; border-radius: 11px; font-size: 10px; white-space: nowrap; }
.ks-ios-toggle span { overflow: hidden; text-overflow: ellipsis; }
.ks-switch { flex: none; position: relative; width: 30px; height: 18px; border-radius: 9px; background: #34c759; }
.ks-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }

/* Android, Chrome */
.ks-and-bar { position: absolute; left: 0; right: 0; top: 0; height: 68px; display: flex; align-items: center; gap: 8px; padding: 24px 6px 0 10px; background: #fff; border-bottom: 1px solid #e3e3e3; }
.ks-and-url { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-radius: 14px; background: #f1f3f4; font-size: 8.5px; white-space: nowrap; overflow: hidden; }
.ks-and-tabs { flex: none; width: 14px; height: 14px; display: grid; place-items: center; border: 1.8px solid #444; border-radius: 3px; font-size: 7px; font-weight: 700; }
.ks-and-more { flex: none; width: 22px; height: 22px; display: grid; place-items: center; }
.ks-and-dots { flex: none; width: 22px; height: 22px; fill: #444; }
.ks-and-menu { position: absolute; top: 30px; right: 6px; width: 62%; padding: 6px 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); transform-origin: top right; transform: scale(0.85); opacity: 0; transition: transform 0.3s ease 0.15s, opacity 0.3s ease 0.15s; }
.is-active .ks-and-menu { transform: none; opacity: 1; }
.ks-and-menu div { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 10px; white-space: nowrap; }
.ks-and-menu hr { margin: 4px 0; border: 0; border-top: 1px solid #e8e8e8; }
.ks-and-menu svg { flex: none; width: 15px; height: 15px; stroke: #444; }
/* Centred with a fixed height, not translateY(-50%): the tap mark is placed
   from offsets, which don't see transforms. */
.ks-and-dialog { position: absolute; left: 11%; right: 11%; top: 50%; height: 176px; margin-top: -88px; padding: 16px; background: #fff; border-radius: 18px; transform: scale(0.92); opacity: 0; transition: transform 0.3s ease 0.15s, opacity 0.3s ease 0.15s; }
.is-active .ks-and-dialog { transform: none; opacity: 1; }
.ks-and-dialog img { display: block; width: 44px; height: 44px; margin: 0 0 8px; border-radius: 50%; }
.ks-and-dialog strong { display: block; height: 18px; font-size: 12px; }
.ks-and-dialog span { display: block; height: 16px; font-size: 9.5px; }
.ks-and-dialog .ks-url { height: 14px; max-width: none; }
.ks-and-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 6px; height: 30px; margin-top: 14px; }
.ks-and-buttons span { height: auto; padding: 6px 8px; border-radius: 15px; font-size: 9.5px; font-weight: 600; color: #0b57d0; }
.ks-and-buttons .is-primary { padding: 7px 12px; background: #0b57d0; color: #fff; }

/* home screens */
.ks-home { background: linear-gradient(160deg, #3b2f7a 0%, #7a3b6e 55%, #e0663f 100%); }
.ks-home-android { background: linear-gradient(170deg, #1d3557 0%, #3a6ea5 60%, #9cc5e8 100%); }
.ks-home-grid { position: absolute; left: 14px; right: 14px; top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 10px; row-gap: 14px; }
.ks-home-app { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ks-home-app i, .ks-home-app img { display: block; width: 38px; height: 38px; border-radius: 9px; background: rgba(255, 255, 255, 0.22); }
.ks-home-android .ks-home-app i, .ks-home-android .ks-home-app img { border-radius: 50%; }
.ks-home-app span { display: block; height: 10px; font-size: 7px; color: #fff; white-space: nowrap; }
.ks-home-app > span:empty { width: 26px; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
.ks-home-app.is-new img { transform: scale(0); transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.35s; }
.is-active .ks-home-app.is-new img { transform: none; }
.ks-home-dock { position: absolute; left: 10px; right: 10px; bottom: 12px; height: 56px; display: flex; justify-content: space-around; align-items: center; border-radius: 20px; background: rgba(255, 255, 255, 0.2); }
.ks-home-dock i { width: 36px; height: 36px; border-radius: 9px; background: rgba(255, 255, 255, 0.3); }
.ks-home-android .ks-home-dock { background: none; }
.ks-home-android .ks-home-dock i { border-radius: 50%; }

/* ---------------------------------------------------------------- Face ID / fingerprint demo */
.ks-phone.is-app .ks-demo-page, .ks-scene.is-app .ks-demo-page { top: 0; padding-top: 34px; }
.ks-phone-android.is-app .ks-demo-page, .ks-phone-android .ks-scene.is-app .ks-demo-page { padding-top: 30px; }
.ks-demo-offer { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 18px 0 0; padding: 18px 12px 14px; background: #1f1b3d; border: 1px solid #332c5c; border-radius: 10px; }
.ks-demo-offer-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #14122a; border: 1px solid #332c5c; }
.ks-demo-offer-icon svg { width: 28px; height: 28px; fill: none; stroke: #ff5a36; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ks-demo-offer .ks-demo-line, .ks-demo-login .ks-demo-line { margin: 0; }
.ks-demo-offer .ks-demo-line.is-title { width: 80%; }
.ks-demo-line.is-text { width: 62%; height: 6px; }
.ks-demo-button { display: block; width: 100%; padding: 9px 8px; border-radius: 7px; background: #ff5a36; color: #2a0e05; font-size: 9.5px; font-weight: 800; line-height: 1.25; text-align: center; }
.ks-demo-login { display: flex; flex-direction: column; gap: 9px; margin: 40px 0 0; padding: 18px 12px; background: #1f1b3d; border: 1px solid #332c5c; border-radius: 10px; }
.ks-demo-login-logo { align-self: center; margin: 0 0 4px; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: 0.14em; }
.ks-demo-login .ks-demo-line.is-text { align-self: center; width: 45%; margin: 3px 0; }
.ks-demo-field { height: 22px; border-radius: 6px; background: #14122a; border: 1px solid #332c5c; }
.ks-demo-field.is-button { background: #332c5c; border: 0; }
.ks-demo-done { position: absolute; z-index: 5; left: 50%; top: 44%; width: 120px; margin-left: -60px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 16px; background: rgba(38, 38, 42, 0.94); color: #fff; font-size: 10px; font-weight: 700; opacity: 0; transform: scale(0.85); }
.ks-demo-done svg { width: 26px; height: 26px; fill: none; stroke: #34c759; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.is-active .ks-demo-done { animation: ks-pop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) 2.5s forwards; }
@keyframes ks-pop { to { opacity: 1; transform: none; } }

/* "where do you want to save the passkey?" */
.ks-key-sheet { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 14px 12px 12px; display: flex; flex-direction: column; align-items: center; background: #f2f2f7; border-radius: 24px; color: #111; transform: translateY(110%); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s; }
.is-active .ks-key-sheet { transform: none; }
.ks-key-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff; }
.ks-key-icon svg, .ks-provider svg { width: 18px; height: 18px; fill: none; stroke: #0a7aff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ks-key-title { margin: 8px 0 10px; font-size: 10.5px; line-height: 1.3; text-align: center; }
.ks-key-label { align-self: flex-start; margin: 0 0 4px 4px; font-size: 8px; color: #8a8a8e; text-transform: uppercase; letter-spacing: 0.04em; }
.ks-key-rows { width: 100%; background: #fff; border-radius: 11px; overflow: hidden; }
.ks-key-row { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-top: 1px solid #e5e5ea; font-size: 10px; line-height: 1.2; transition: background 0.25s ease; }
.ks-key-row:first-child { border-top: 0; }
.ks-provider { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: #0a7aff; }
.ks-provider svg { width: 13px; height: 13px; stroke: #fff; }
.ks-provider.is-other { background: #8e8e93; }
.ks-key-name { flex: 1; min-width: 0; max-height: 2.4em; overflow: hidden; }
.ks-key-row.is-bad .ks-key-name { color: #8a8a8e; text-decoration: line-through; }
.ks-key-mark { flex: none; width: 16px; height: 16px; fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transform: scale(0); transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.is-good .ks-key-mark { stroke: #34c759; }
.is-bad .ks-key-mark { stroke: #ff3b30; }
.is-active .ks-key-row.is-good { background: #eaf7ee; transition-delay: 0.8s; }
.is-active .is-good .ks-key-mark { transform: none; transition-delay: 0.8s; }
.is-active .is-bad .ks-key-mark { transform: none; transition-delay: 1.1s; }
.ks-key-cta { width: 100%; height: 34px; margin: 10px 0 0; display: grid; place-items: center; border-radius: 17px; background: #0a7aff; color: #fff; font-size: 10.5px; font-weight: 700; }
.ks-key-scene.is-active .ks-tap { animation-delay: 2s; }
.ks-phone-android .ks-key-sheet { left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; }
.ks-phone-android .ks-key-icon { background: #e8f0fe; }
.ks-phone-android .ks-key-icon svg { stroke: #0b57d0; }
.ks-phone-android .ks-key-rows { background: #f1f3f4; }
.ks-phone-android .ks-key-row { border-top-color: #e3e3e3; }
.ks-phone-android .ks-provider { border-radius: 50%; background: #0b57d0; }
.ks-phone-android .ks-provider.is-other { background: #8e8e93; }
.ks-phone-android .ks-key-cta { background: #0b57d0; }

/* Face ID / fingerprint being read, then the tick */
.ks-faceid { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 22px; background: rgba(38, 38, 42, 0.92); color: #fff; opacity: 0; transform: scale(0.9); transition: opacity 0.25s ease 0.2s, transform 0.25s ease 0.2s; }
.is-active .ks-faceid { opacity: 1; transform: none; }
.ks-faceid svg { position: absolute; left: 26px; top: 16px; width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ks-faceid span { position: absolute; left: 0; right: 0; bottom: 13px; font-size: 8.5px; font-weight: 600; text-align: center; }
.ks-fp-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 12px 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; background: #fff; border-radius: 18px 18px 0 0; color: #111; transform: translateY(105%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s; }
.is-active .ks-fp-sheet { transform: none; }
.ks-fp-sheet strong { font-size: 11px; text-align: center; }
.ks-fp { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #e8f0fe; }
.is-active .ks-fp { animation: ks-fp-ok 0.25s ease 1.65s forwards; }
@keyframes ks-fp-ok { to { background: #0b57d0; } }
.ks-fp svg { position: absolute; left: 11px; top: 11px; width: 30px; height: 30px; fill: none; stroke: #0b57d0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ks-fp .ks-scan-ok { stroke: #fff; stroke-width: 2.6; }
.ks-scan-ok path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.is-active .ks-scan-glyph { animation: ks-scan 0.55s ease-in-out 0.45s 2, ks-scan-out 0.2s ease 1.6s forwards; }
.is-active .ks-scan-ok path { animation: ks-draw 0.35s ease 1.75s forwards; }
@keyframes ks-scan { 50% { opacity: 0.35; } }
@keyframes ks-scan-out { to { opacity: 0; } }
@keyframes ks-draw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- notifications in the demo */
/* The phone's own permission question. Centred with a fixed height, like
   the install dialog: tap marks are placed from offsets. */
.ks-ios-alert { position: absolute; left: 22px; right: 22px; top: 50%; height: 130px; margin-top: -65px; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: rgba(242, 242, 247, 0.97); color: #111; text-align: center; opacity: 0; transform: scale(1.12); transition: opacity 0.25s ease 0.2s, transform 0.25s ease 0.2s; }
.is-active .ks-ios-alert { opacity: 1; transform: none; }
.ks-ios-alert-text { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 12px; }
.ks-ios-alert-text strong { font-size: 9.5px; line-height: 1.25; }
.ks-ios-alert-text span { font-size: 7.5px; line-height: 1.3; color: #3c3c43; }
.ks-ios-alert-buttons { flex: none; height: 34px; display: flex; border-top: 1px solid rgba(60, 60, 67, 0.29); }
.ks-ios-alert-buttons span { flex: 1; min-width: 0; display: grid; place-items: center; padding: 0 4px; font-size: 9.5px; color: #0a7aff; }
.ks-ios-alert-buttons span + span { border-left: 1px solid rgba(60, 60, 67, 0.29); font-weight: 700; }
.ks-and-perm { position: absolute; left: 16px; right: 16px; top: 50%; height: 172px; margin-top: -86px; padding: 16px 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 20px; background: #f3f1f8; color: #1c1b1f; text-align: center; opacity: 0; transform: scale(0.92); transition: opacity 0.25s ease 0.2s, transform 0.25s ease 0.2s; }
.is-active .ks-and-perm { opacity: 1; transform: none; }
.ks-and-perm svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #0b57d0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ks-and-perm strong { flex: 1; min-height: 0; margin: 2px 0 4px; font-size: 10px; line-height: 1.3; }
.ks-and-perm span { flex: none; align-self: stretch; height: 28px; display: grid; place-items: center; border-radius: 14px; font-size: 9.5px; font-weight: 600; color: #0b57d0; }
.ks-and-perm span.is-allow { background: #0b57d0; color: #fff; }
.ks-ios-alert .is-allow { transition: background 0.2s ease 1.65s; }
.is-active .ks-ios-alert .is-allow { background: rgba(0, 0, 0, 0.07); }
/* ... and what it was for: the first notification sliding in. */
.ks-notif { position: absolute; z-index: 5; left: 8px; right: 8px; top: 34px; display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 16px; background: rgba(245, 245, 247, 0.97); color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transform: translateY(-170%); transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) 0.6s; }
.is-active .ks-notif { transform: none; }
.ks-phone-android .ks-notif { top: 28px; border-radius: 18px; background: #f3f1f8; }
.ks-notif img { flex: none; width: 26px; height: 26px; border-radius: 6px; }
.ks-phone-android .ks-notif img { border-radius: 50%; }
.ks-notif > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ks-notif strong { display: flex; justify-content: space-between; gap: 6px; font-size: 8px; font-weight: 600; color: #6b6b70; }
.ks-notif em { font-style: normal; font-weight: 500; }
.ks-notif span { font-size: 8.5px; line-height: 1.3; color: #222; }
.ks-notif span.ks-notif-title { font-size: 9.5px; font-weight: 700; color: #111; }

/* the tap - dashboard-app.js puts it on the centre of the scene's data-tap */
.ks-tap { position: absolute; z-index: 6; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 90, 54, 0.28); border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; }
.is-active .ks-tap { animation: ks-tap 1.3s ease-out 1.1s both; }
.ks-home.is-active .ks-tap { animation-delay: 1.7s; }
@keyframes ks-tap {
  0% { opacity: 0; transform: scale(1.5); }
  30% { opacity: 1; transform: scale(1); }
  45% { transform: scale(0.82); box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35); }
  75% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 16px rgba(255, 90, 54, 0), 0 4px 10px rgba(0, 0, 0, 0.35); }
  100% { opacity: 0; transform: scale(1); }
}
.ks-ios-row.is-target, .ks-and-menu .is-target, .ks-ios-menu .is-target { transition: background 0.2s ease 1.65s; }
.is-active .ks-ios-row.is-target, .is-active .ks-ios-menu .is-target { background: #e5e5ea; }
.is-active .ks-and-menu .is-target { background: #eeeeee; }

/* Face ID / fingerprint demo on the "Face ID from now on?" page, folded away */
.ks-offer-how { margin: 1rem 0 0; text-align: left; }
.ks-offer-how summary { cursor: pointer; padding: 0.4rem 0; color: var(--ink); font-weight: 700; font-size: 0.85rem; }
.ks-offer-how .ks-demo { margin: 0.6rem 0 0; padding: 0.8rem; }
.ks-offer-how .ks-demo-head { justify-content: center; }
.ks-offer-how .ks-demo-body { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .ks-scene, .ks-ios-sheet, .ks-and-menu, .ks-and-dialog, .ks-home-app.is-new img, .ks-demo-steps button,
  .ks-ios-row.is-target, .ks-and-menu .is-target, .ks-ios-menu, .ks-ios-menu .is-target,
  .ks-key-sheet, .ks-key-row, .ks-key-mark, .ks-faceid, .ks-fp-sheet,
  .ks-ios-alert, .ks-ios-alert .is-allow, .ks-and-perm, .ks-notif { transition: none !important; }
  .is-active .ks-tap { animation: none; opacity: 1; }
  .is-active .ks-scan-glyph, .is-active .ks-scan-ok path, .is-active .ks-demo-done, .is-active .ks-fp { animation: none; }
  .ks-demo-replay { display: none; }
}
