/* Click-through prototype: one phone, stacked views. */
body.proto-page { margin: 0; min-height: 100vh; background: var(--page, #eef2f7); color: var(--fg); }
html.dark body.proto-page { background: #05080f; }
.proto { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 32px; box-sizing: border-box; flex-wrap: wrap; }
.proto-side { max-width: 360px; }
.proto-side .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--p600); margin: 0 0 6px; }
.proto-side h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
.proto-side .muted { color: var(--muted); font-size: 15px; line-height: 1.45; }
.proto-side .small { font-size: 12.5px; margin-top: 18px; }
.tries { padding: 0; margin: 18px 0; list-style: none; counter-reset: t; display: flex; flex-direction: column; gap: 8px; }
.tries li { counter-increment: t; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: background .3s, border-color .3s; }
.tries li::before { content: counter(t); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--sunken); color: var(--muted); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tries li.done { background: var(--ok-bg); border-color: transparent; }
.tries li.done::before { content: '✓'; background: var(--ok); color: #fff; }
.proto-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.proto-head .eyebrow { margin: 0; }
.langsw { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--border); }
.langsw button { height: 26px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; cursor: pointer; transition: background .2s, color .2s; }
.langsw button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
html.dark .langsw button[aria-pressed="true"] { background: #232b37; }
.proto-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.proto-tools button, .proto-tools a { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; }

.proto-screen .view { position: absolute; inset: 0; padding-top: 54px; display: flex; flex-direction: column; background: var(--bg); visibility: hidden; z-index: 1; will-change: transform; }
.proto-screen .view.on { visibility: visible; z-index: 2; }
.proto-screen .view.under { visibility: visible; z-index: 1; }
.proto-screen .view .scroll { flex: 1; }
.proto-screen .status { position: absolute; top: 0; left: 0; right: 0; }
.proto-screen .row[data-person], .proto-screen .kcard[data-person] { cursor: pointer; }
.proto-screen .row[data-person]:active, .proto-screen .kcard[data-person]:active { background: var(--sunken); }
.proto-screen .tabbar .tab { cursor: pointer; }
.proto-screen .gone { animation: proto-gone .35s ease forwards; }
@keyframes proto-gone { to { opacity: 0; height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; border-width: 0; } }
.proto-screen .lesson.done-now { border-left-color: var(--ok) !important; }
/* On a real phone the prototype is the whole screen: no frame, no fake status bar;
   the try-list opens from a slim top bar. */
.proto-bar, .proto-side-close { display: none; }
@media (max-width: 600px) {
  html, body.proto-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .proto { display: block; min-height: 0; padding: 0; }
  .proto-bar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: calc(44px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 14px; box-sizing: border-box; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--fg); font-size: 13.5px; font-weight: 600; }
  .proto-bar .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
  .proto-bar button { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--p600, #2563eb); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
  .proto .phone { position: fixed; top: calc(44px + env(safe-area-inset-top)); left: 0; right: 0; bottom: 0; width: auto; height: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .proto .phone .screen { width: 100%; height: 100%; border-radius: 0; }
  .proto .phone .island, .proto .phone .home-ind, .proto-screen > .status { display: none; }
  .proto-screen .view { padding-top: 0; }
  .proto-screen .tabbar { bottom: calc(12px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
  .proto-side { position: fixed; inset: 0; z-index: 120; max-width: none; padding: calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--bg); transform: translateY(100%); visibility: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s; }
  .proto-side.open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  .proto-side-close { display: flex; position: sticky; top: 0; margin: 0 0 -36px auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--fg); align-items: center; justify-content: center; cursor: pointer; z-index: 1; }
  .proto-side .proto-head { padding-right: 46px; }
  .proto-side h1 { font-size: 24px; }
}
.dotic.warn { background: var(--warn-bg); color: var(--warn); }
