/* ============================================================
   Orthologik — Klickdummy-Rahmen (Bühne, Seitenleiste, Hotspots)
   Basis: tokens.css + app.css
   ============================================================ */

body.proto {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(28,95,168,.18), transparent 60%),
    var(--o-navy-900);
  color: var(--o-blue-200);
}

.proto-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  grid-template-areas:
    "side  stage"
    "nav   stage";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 32px 56px;
  align-items: start;
}

.proto-side  { grid-area: side; }
.proto-nav   { grid-area: nav; }
.proto-stage { grid-area: stage; }

@media (max-width: 940px) {
  /* Einspaltig: Einleitung, dann das Gerät, dann die Screen-Liste. */
  .proto-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "side" "stage" "nav";
    grid-template-rows: auto auto auto;
    row-gap: 28px;
    padding: 24px 20px 48px;
  }
}

/* ---------- Seitenleiste ---------- */

@media (min-width: 941px) {
  .proto-side { position: sticky; top: 32px; }
}

.proto-side__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--o-text-sm);
  color: var(--o-blue-200);
  text-decoration: none;
  margin-bottom: 22px;
}
.proto-side__back:hover { color: #fff; }

.proto-side h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #fff;
}
.proto-side__lede {
  margin: 12px 0 0;
  font-size: var(--o-text-sm);
  line-height: 1.6;
  color: var(--o-blue-200);
  text-wrap: pretty;
}

.proto-flow { margin: 0; padding: 0; list-style: none; }
.proto-flow__item { margin-bottom: 6px; }
.proto-flow__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: var(--o-text-sm);
  color: var(--o-blue-200);
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  border-radius: var(--o-radius-md);
  padding: 11px 14px;
  min-height: var(--o-touch-min);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.proto-flow__btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.proto-flow__btn[aria-current="true"] {
  background: rgba(28,95,168,.42);
  border-color: var(--o-blue-400);
  color: #fff;
  font-weight: var(--o-weight-semibold);
}
.proto-flow__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--o-weight-semibold);
  background: rgba(255,255,255,.12);
  color: var(--o-blue-200);
}
.proto-flow__btn[aria-current="true"] .proto-flow__num { background: var(--o-blue-500); color: #fff; }

.proto-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.proto-tools button {
  font: inherit;
  font-size: var(--o-text-xs);
  color: var(--o-blue-200);
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--o-radius-pill);
  padding: 9px 15px;
  min-height: 40px;
  cursor: pointer;
}
.proto-tools button:hover { background: rgba(255,255,255,.1); color: #fff; }
.proto-tools button[aria-pressed="true"] {
  background: var(--o-teal-700);
  border-color: var(--o-teal-700);
  color: #fff;
}

.proto-side__note {
  margin-top: 24px;
  font-size: var(--o-text-xs);
  line-height: 1.55;
  color: var(--o-blue-300);
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 16px;
}

/* ---------- Bühne ---------- */

.proto-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.proto-stage__caption {
  font-size: var(--o-text-xs);
  color: var(--o-blue-300);
  text-align: center;
  max-width: 42ch;
  line-height: 1.55;
}

/* ---------- Screen-Router ---------- */

/* Muss die display-Regeln von .tabbar / .statusbar überstimmen. */
.phone__screen [hidden] { display: none !important; }

.screen { display: none; flex: 1; min-height: 0; flex-direction: column; }
.screen[data-active="true"] { display: flex; animation: o-screen-in .22s ease both; }

@keyframes o-screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Hotspots ---------- */

body.proto[data-hotspots="on"] [data-go],
body.proto[data-hotspots="on"] [data-action] {
  outline: 2px dashed rgba(21, 204, 182, .95);
  outline-offset: 2px;
  border-radius: var(--o-radius-sm);
}

/* Alle klickbaren App-Elemente brauchen einen sichtbaren Fokus */
.phone__screen :focus-visible {
  outline: 2px solid var(--o-blue-500);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------- App-spezifische Klickdummy-Ergänzungen ---------- */

.app-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--o-blue-600);
  padding: 6px 16px 0;
  cursor: pointer;
  align-self: flex-start;
  flex: none;
}

.app-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.app-scroll::-webkit-scrollbar { display: none; }

.done-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 20px;
  text-align: center;
}
.done-panel h2 {
  margin: 0;
  font-size: 20px;
  color: var(--o-navy-900);
  letter-spacing: -.01em;
}
.done-panel p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--o-slate-500); max-width: 30ch; }

.pain-panel { padding: 16px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pain-panel h2 { margin: 0; font-size: 17px; color: var(--o-navy-900); letter-spacing: -.01em; }
.pain-panel p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--o-slate-500); }

.plan-diff {
  margin-top: 14px;
  background: var(--o-teal-50);
  border: 1px solid var(--o-teal-100);
  border-radius: var(--o-radius-md);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--o-teal-700);
  display: none;
}
.plan-diff[data-visible="true"] { display: block; }
