/* ═══════════════════════════════════════════════════════════
   PROJECT VIEW — Workstation & Swipe Engine
   GeniusHub v21 — Redesign
   Ruhig, kein Glassmorphism, kein Neon-Grün im Editor.
   ═══════════════════════════════════════════════════════════ */

/* ── Container ── */
#pv {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
#pv.on { display: flex; }


/* ── Project Bar ── */
.pv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-0);
  flex-shrink: 0;
  overflow-x: auto;
}
.pv-bar::-webkit-scrollbar { display: none; }
.pv-bar h2 {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--fg);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ── Page Indicator Dots ── */
.pv-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  flex-shrink: 0;
  background: var(--bg-0);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.pv-d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  transition: all var(--dur-1) var(--ease);
  cursor: pointer;
  flex-shrink: 0;
}
.pv-d.on {
  background: var(--accent);
  width: 20px;
  border-radius: 4px;
}
.pv-lbl {
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-left: 8px;
  font-family: var(--f-mono);
}


/* ── Swipe Engine ── */
.pv-swipe {
  flex: 1;
  overflow: hidden;
  position: relative;
  touch-action: pan-y pinch-zoom;
}
.pv-track {
  display: flex;
  height: 100%;
  transition: transform .3s cubic-bezier(.25, .8, .25, 1);
  will-change: transform;
}
.pv-track.drag { transition: none; }
.pv-pg {
  flex: 0 0 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-b));
}


/* ── Code Sandbox Wrapper ── */
.code-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--fg);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.code-ed {
  font-family: var(--f-mono);
  font-size: clamp(11px, 2.5vw, 13px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  color: var(--fg);
  line-height: 1.7;
  width: 100%;
  min-height: clamp(150px, 30vh, 250px);
  resize: vertical;
  outline: none;
  -webkit-text-size-adjust: none;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.code-ed:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.code-out {
  font-family: var(--f-mono);
  font-size: clamp(10px, 2.2vw, 12px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  color: var(--fg-muted);
  line-height: 1.7;
  min-height: 50px;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}


/* ── Code Briefing Panels ── */
.code-briefing {
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: 12px;
}
.code-briefing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.code-briefing-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.code-briefing-body {
  margin-top: 10px;
  display: none;
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.7;
}
.code-briefing-body.open { display: block; }

.code-ki-panel {
  padding: 12px 14px;
  background: var(--accent-weak);
  border: 1px solid var(--accent-ring);
  border-radius: var(--r-md);
  margin-top: 12px;
}
