:root {
  --p: #625df5;
  --p-dark: #4b46d6;
  --ink: #12131a;
  --mut: #6b7080;
  --bg: #f6f6fb;
  --card: #ffffff;
  --line: #e6e6f0;
  --red: #e5484d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 90px;
}

header {
  padding: 20px 18px 6px;
  max-width: 760px;
  margin: 0 auto;
}
.logo { font-size: 24px; font-weight: 800; color: var(--p); }
.tagline { color: var(--mut); font-size: 13px; margin-top: 2px; }

main { max-width: 760px; margin: 0 auto; padding: 14px 16px; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(20, 20, 43, .07);
}

/* tabs */
.tabs {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  color: var(--mut);
  cursor: pointer;
}
.tab.active { background: #fff; color: var(--p); box-shadow: 0 1px 4px rgba(20,20,43,.1); }
.tab:disabled { opacity: .4; cursor: not-allowed; }

.mode-hint { color: var(--mut); font-size: 13px; margin: 12px 2px 4px; }

/* overlay mode setup */
.overlay-setup { margin: 14px 2px 4px; }
.file-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 22px 14px;
  color: var(--mut);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.file-pick:hover { border-color: var(--p); color: var(--p); }
#overlayThumbWrap { position: relative; margin-top: 10px; border-radius: 12px; overflow: hidden; }
#overlayThumb { width: 100%; max-height: 220px; object-fit: cover; display: block; background: #000; }
#overlayClear {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: rgba(18,19,26,.7); color: #fff;
  font-size: 14px; cursor: pointer;
}
.overlay-setup .field { margin-top: 12px; }
.overlay-setup .field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.overlay-setup .field input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit; font-size: 14px;
  background: var(--bg);
}
#overlayAudioWrap { margin-top: 12px; }

/* toggles */
.toggles { display: flex; gap: 18px; margin: 14px 2px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle input { display: none; }
.slider {
  width: 40px; height: 24px;
  background: #d4d4e2;
  border-radius: 99px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.slider::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.toggle input:checked + .slider { background: var(--p); }
.toggle input:checked + .slider::after { left: 19px; }

/* record button */
.record-btn {
  width: 100%;
  border: 0;
  background: var(--p);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s, transform .1s;
  margin-top: 6px;
}
.record-btn:active { transform: scale(.98); }
.record-btn:hover { background: var(--p-dark); }
.record-btn .dot { width: 12px; height: 12px; background: #ff6b6b; border-radius: 50%; }
.record-btn:disabled { opacity: .5; cursor: not-allowed; }

.unsupported { color: var(--mut); font-size: 13px; margin-top: 10px; }

/* library */
.library { margin-top: 26px; }
.library h2 { font-size: 18px; margin-bottom: 12px; }
.library h2 span { color: var(--mut); font-weight: 500; font-size: 14px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.rec-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(20,20,43,.07);
  cursor: pointer;
  transition: transform .12s;
}
.rec-card:active { transform: scale(.97); }
.thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #625df5, #a29bfe);
  object-fit: cover;
  display: block;
  position: relative;
}
.thumb-wrap { position: relative; }
.dur {
  position: absolute;
  right: 6px; bottom: 6px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
}
.rec-info { padding: 9px 11px 11px; }
.rec-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-date { font-size: 11px; color: var(--mut); margin-top: 2px; }
.cloud-badge { font-size: 10px; color: var(--p); font-weight: 600; }
.empty { color: var(--mut); font-size: 14px; padding: 18px 4px; }

/* countdown */
.countdown {
  position: fixed; inset: 0;
  background: rgba(18, 19, 26, .85);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
}
.countdown span {
  font-size: 120px;
  font-weight: 800;
  color: #fff;
  animation: pop .9s ease infinite;
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 30% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: .9; } }

/* recording bar */
.rec-bar {
  position: fixed;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  z-index: 50;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.rec-dot { width: 10px; height: 10px; background: var(--red); border-radius: 50%; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 44px; }
.rec-bar button {
  border: 0; background: rgba(255,255,255,.14);
  color: #fff; font: inherit; font-size: 15px;
  padding: 8px 12px; border-radius: 99px; cursor: pointer;
}
.rec-bar button.stop { background: var(--red); font-weight: 700; }

/* pop-out prompt — shown the moment Screen recording starts so the tools/
   bubble panel is one tap away instead of something you have to remember */
.popout-prompt {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 59;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--p);
  color: #fff;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  max-width: min(94vw, 560px);
  animation: pp-in .3s ease;
}
@keyframes pp-in { from { opacity: 0; transform: translate(-50%, -12px); } }
.pp-text { font-size: 13.5px; font-weight: 600; line-height: 1.35; flex: 1; }
.pp-go {
  border: 0; background: #fff; color: var(--p);
  font: inherit; font-size: 13.5px; font-weight: 800;
  padding: 9px 14px; border-radius: 10px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.pp-dismiss {
  border: 0; background: rgba(255,255,255,.2); color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; cursor: pointer; flex-shrink: 0;
}

/* Fixed icon-button size — never lets content wrap and balloon into a blob
   the way a text label did on narrow phones. */
.rec-bar button#retakeBtn {
  width: 40px; height: 40px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.rec-bar button#retakeBtn.confirm { background: #f5a623; color: #1a1300; }

/* studio */
.studio {
  position: fixed; inset: 0;
  background: #0c0d12;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
body.in-studio header, body.in-studio main { display: none; }
.stage-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px 10px 132px;
}
#stage {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.studio-hint { color: var(--mut); font-size: 12px; margin-top: 12px; line-height: 1.5; }

/* studio toolbar */
.toolbar {
  position: fixed;
  left: 50%; bottom: 72px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(28, 29, 40, .95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 99px;
  padding: 7px 10px;
  z-index: 56;
  max-width: 96vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 17px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.toolbar button:hover { background: rgba(255,255,255,.12); }
.toolbar button.active { background: var(--p); }
.toolbar #ccBtn { font-size: 13px; font-weight: 800; }
.toolbar input[type="color"] {
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  padding: 0; background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.toolbar input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.toolbar input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 2px solid rgba(255,255,255,.5); }
.tb-sep { width: 1px; height: 24px; background: rgba(255,255,255,.18); margin: 0 4px; flex-shrink: 0; }

/* style popover */
.popover {
  position: fixed;
  left: 50%; bottom: 132px;
  transform: translateX(-50%);
  background: rgba(28, 29, 40, .97);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 14px;
  z-index: 57;
  width: min(340px, 92vw);
  color: #fff;
}
.popover h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #9aa0b4; margin: 10px 0 8px; }
.popover h3:first-child, .popover div:first-child h3 { margin-top: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ring-chip, .ring-custom {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ring-chip.active { border-color: #fff; box-shadow: 0 0 0 2px var(--p); }
.ring-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.ring-custom::-webkit-color-swatch-wrapper { padding: 0; opacity: 0; }
.filter-chip {
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 11px;
  border-radius: 99px;
  cursor: pointer;
}
.filter-chip.active { background: var(--p); border-color: var(--p); }
.shape-chip {
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.shape-chip.active { background: var(--p); border-color: var(--p); }
.size-slider { width: 100%; accent-color: var(--p); margin: 2px 0 4px; }
.shadow-toggle { margin: 10px 0 2px; font-size: 13px; }

.pop-close {
  position: absolute;
  top: 10px; right: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
}

/* editor */
.editor {
  position: fixed; inset: 0;
  background: #0c0d12;
  z-index: 65;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.ed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 700;
}
.ed-head .close { background: rgba(255,255,255,.1); color: #fff; }
.ed-stage-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 10px;
}
#edStage {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.ed-panel { padding: 10px 14px 16px; }
.ed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  flex-wrap: wrap;
}
.ed-play {
  border: 0;
  background: var(--p);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.ed-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.mut { color: #9aa0b4; font-size: 12.5px; }
.ed-btn {
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  color: #fff;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
}
.ed-btn.active, .ed-btn.primary { background: var(--p); border-color: var(--p); }
.ed-btn:disabled { opacity: .5; }
.ed-select {
  font: inherit; font-size: 13px;
  background: #1c1d28; color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 8px;
}
.vol input[type="range"] { vertical-align: middle; width: 110px; accent-color: var(--p); }

/* timeline */
.timeline {
  position: relative;
  height: 44px;
  margin: 6px 2px;
  touch-action: none;
  cursor: pointer;
}
.tl-track {
  position: absolute;
  left: 0; right: 0; top: 14px;
  height: 16px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
}
.tl-trim {
  position: absolute;
  top: 14px; height: 16px;
  background: rgba(98,93,245,.45);
  border-radius: 8px;
  pointer-events: none;
}
.tl-zooms { position: absolute; inset: 0; pointer-events: none; }
.tl-zoom {
  position: absolute;
  top: 6px; height: 5px;
  background: #ffd400;
  border-radius: 3px;
}
.tl-playhead {
  position: absolute;
  top: 4px; bottom: 4px;
  width: 3px;
  background: #fff;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(255,255,255,.7);
}
.tl-handle {
  position: absolute;
  top: 8px;
  width: 14px; height: 28px;
  background: var(--p);
  border: 2px solid #fff;
  border-radius: 6px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 2;
  touch-action: none;
}
.zoom-chip {
  border: 1px solid rgba(255,212,0,.5);
  background: rgba(255,212,0,.12);
  color: #ffd400;
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 6px 10px;
  border-radius: 99px;
  cursor: pointer;
  margin: 2px;
}
.zoom-chip b { color: #fff; margin-left: 4px; }

/* floating note input */
.note-input {
  position: fixed;
  z-index: 58;
  width: 210px;
  border: 2px solid var(--p);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit; font-size: 14px;
  background: #1c1d28;
  color: #fff;
  outline: none;
}

/* modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(18,19,26,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 70;
  padding: 14px;
}
.modal-box {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 94vh;
  overflow-y: auto;
  padding: 16px;
}
.modal-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.name-input {
  flex: 1;
  border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 16px;
  padding: 6px 8px; border-radius: 8px;
  background: transparent;
}
.name-input:focus { border-color: var(--line); background: var(--bg); outline: none; }
.close { border: 0; background: var(--bg); border-radius: 8px; width: 34px; height: 34px; font-size: 15px; cursor: pointer; flex-shrink: 0; }
#player { width: 100%; border-radius: 12px; background: #000; max-height: 55vh; }
.player-row { display: flex; justify-content: space-between; align-items: center; margin: 10px 2px; font-size: 13px; color: var(--mut); }
.player-row select { font: inherit; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); margin-left: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action {
  border: 1px solid var(--line);
  background: var(--card);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 13px;
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
}
.action.primary { background: var(--p); border-color: var(--p); color: #fff; }
.action.danger { color: var(--red); }

/* entire-screen block */
.es-box { max-width: 460px; text-align: center; }
.es-icon { font-size: 42px; margin-bottom: 4px; }
.es-box h2 { font-size: 19px; margin-bottom: 12px; }
.es-box p { font-size: 14px; color: var(--mut); line-height: 1.5; margin-bottom: 10px; text-align: left; }
.es-box p b { color: var(--ink); }
.es-list { text-align: left; list-style: none; margin: 0 0 16px; padding: 0; }
.es-list li { font-size: 14.5px; padding: 8px 10px; background: var(--bg); border-radius: 10px; margin-bottom: 6px; }

/* toast */
.toast {
  position: fixed;
  left: 50%; bottom: 84px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 90;
  max-width: 90vw;
  text-align: center;
  animation: rise .25s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

[hidden] { display: none !important; }

/* 2026 desktop control-bay refresh */
:root {
  --p: #22c7d6;
  --p-dark: #119aa8;
  --ink: #f5f3ea;
  --mut: #aaa99f;
  --bg: #111310;
  --card: #1a1d19;
  --line: #343832;
  --red: #ff5a36;
  --signal: #ff6a3d;
  --signal-dark: #d94723;
  --paper: #f5f3ea;
  --console: #1a1d19;
  --console-raised: #232721;
  --cyan: #22c7d6;
}

html { background: var(--bg); color-scheme: dark; }
body {
  min-height: 100vh;
  padding: 0 0 72px;
  background:
    radial-gradient(circle at 72% 0%, rgba(34, 199, 214, .08), transparent 34rem),
    var(--bg);
  color: var(--paper);
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: .55;
}
::selection { color: #0b1110; background: var(--cyan); }
* { scrollbar-color: #596057 #171a16; }
button, input, select, summary { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.app-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--paper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 760 22px/1 "Aptos Display", "Segoe UI", sans-serif;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--signal);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(255, 90, 54, .22);
}
.brand-mark svg { width: 23px; fill: #171411; }
.app-header > p { color: var(--mut); font-size: 13px; }
.astra-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #d9fff9;
  background: rgba(89, 229, 210, .09);
  border: 1px solid rgba(89, 229, 210, .28);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.astra-credit span { color: var(--cyan); }
.astra-credit strong { color: var(--paper); font-weight: 700; }
.privacy-state {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c9c8bd;
  font-size: 12px;
  letter-spacing: .02em;
}
.privacy-state span, .status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #69da78;
  box-shadow: 0 0 0 4px rgba(105,218,120,.1);
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, .8fr);
  gap: 22px;
  min-width: 0;
}
.recorder-card, .desktop-readiness {
  background: var(--console);
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(0,0,0,.24);
  min-width: 0;
}
.recorder-card { padding: 30px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.section-heading h1 {
  max-width: 18ch;
  color: var(--paper);
  font: 720 clamp(30px, 4vw, 48px)/.98 "Aptos Display", "Segoe UI", sans-serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-heading p { max-width: 56ch; margin-top: 12px; color: var(--mut); font-size: 14px; line-height: 1.55; }
.format-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #4f554c;
  border-radius: 6px;
  color: #b7bab0;
  font: 700 10px/1.1 ui-monospace, monospace;
  letter-spacing: .09em;
}

.tabs {
  padding: 0;
  gap: 1px;
  background: var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.tab {
  min-height: 78px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 0;
  background: var(--console-raised);
  color: #c2c1b7;
  text-align: left;
  min-width: 0;
}
.tab:hover { background: #2a2e27; }
.tab.active { background: var(--paper); color: #171914; box-shadow: none; }
.tab-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 15px;
  opacity: .8;
}
.tab strong, .tab small { display: block; }
.tab strong { font-size: 14px; }
.tab small { margin-top: 3px; font-size: 11px; opacity: .68; font-weight: 500; }
.mode-hint { margin: 16px 2px 0; color: #c0bfb5; font-size: 13px; }

.toggles {
  margin: 18px 0;
  gap: 8px;
}
.toggle {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #d4d3c9;
  font-size: 13px;
  background: #20231e;
  position: relative;
}
.toggle input {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.toggle:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 3px; }
.slider { width: 32px; height: 18px; background: #5a5f56; }
.slider::after { width: 12px; height: 12px; top: 3px; left: 3px; box-shadow: none; }
.toggle input:checked + .slider { background: var(--cyan); }
.toggle input:checked + .slider::after { left: 17px; background: #0e1918; }

.capture-rule {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 10px;
  background: #26271f;
  color: #c8c7bc;
}
.capture-rule p { font-size: 12.5px; line-height: 1.48; }
.capture-rule strong { color: #fff5d6; }
.rule-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffd166;
  color: #181914;
  font-weight: 900;
}
.record-btn {
  min-height: 62px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--signal);
  color: #1b120f;
  box-shadow: 0 14px 34px rgba(255,90,54,.18);
  font-size: 16px;
  text-transform: none;
}
.record-btn:hover { background: #ff805b; }
.record-btn .dot { background: #40140a; box-shadow: 0 0 0 5px rgba(64,20,10,.12); }
.record-key {
  margin-left: auto;
  min-width: 26px;
  padding: 5px;
  border: 1px solid rgba(27,18,15,.3);
  border-radius: 6px;
  font: 750 11px/1 ui-monospace, monospace;
}
.studio-hint { margin: 13px 3px 0; color: #85877f; }
.unsupported { color: #ffb29e; }

.desktop-readiness { padding: 24px; align-self: stretch; }
.readiness-head { display: flex; gap: 13px; align-items: flex-start; }
.status-light { flex: 0 0 auto; margin-top: 6px; background: #ffd166; box-shadow: 0 0 0 4px rgba(255,209,102,.1); }
.status-light.ready { background: #69da78; box-shadow: 0 0 0 4px rgba(105,218,120,.1); }
.status-light.limited { background: var(--signal); box-shadow: 0 0 0 4px rgba(255,90,54,.11); }
.readiness-head h2 { font-size: 17px; letter-spacing: -.015em; }
.readiness-head p { margin-top: 4px; color: var(--mut); font-size: 12px; line-height: 1.4; }
.dock-demo {
  height: 150px;
  margin: 23px 0;
  border-radius: 12px;
  background: #0d0f0d;
  position: relative;
  overflow: hidden;
}
.dock-screen { position: absolute; inset: 18px 18px 36px; background: #2c302a; border-radius: 5px; padding: 13px; }
.dock-screen span { display: block; width: 58%; height: 5px; background: #50564c; margin-bottom: 8px; border-radius: 3px; }
.dock-screen span:nth-child(2) { width: 76%; }
.dock-screen span:nth-child(3) { width: 42%; }
.dock-rail {
  position: absolute;
  left: 32px;
  right: 10px;
  bottom: 14px;
  min-height: 38px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 26px rgba(0,0,0,.44);
  transform: rotate(-1.5deg);
}
.dock-rail i { width: 20px; height: 20px; border-radius: 5px; background: #d4d3ca; }
.dock-rail i:first-child { border-radius: 50%; background: var(--signal); }
.dock-rail b { color: #20221e; font: 700 9px/1 ui-monospace, monospace; }
.dock-rail em { margin-left: auto; width: 34px; height: 20px; border-radius: 5px; background: var(--signal); }
.desktop-steps { list-style: none; }
.desktop-steps li { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.desktop-steps li > span { color: var(--cyan); font: 700 11px/1.4 ui-monospace, monospace; }
.desktop-steps strong, .desktop-steps small { display: block; }
.desktop-steps strong { color: #e8e6dd; font-size: 13px; }
.desktop-steps small { margin-top: 4px; color: #8d9088; font-size: 11.5px; line-height: 1.42; }
.desktop-readiness details { padding-top: 14px; border-top: 1px solid var(--line); color: #aaa99f; }
.desktop-readiness summary { color: #cfcec4; font-size: 12px; cursor: pointer; }
.desktop-readiness details p { margin-top: 9px; font-size: 11.5px; line-height: 1.5; }

.library { grid-column: 1 / -1; margin-top: 14px; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 14px; }
.library h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.library-heading > p { color: var(--mut); font-size: 12px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.rec-card { background: var(--console); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.rec-info { padding: 12px 13px 14px; }
.empty {
  min-height: 116px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed #3b4038;
  border-radius: 12px;
  color: var(--mut);
}
.empty > span { width: 42px; height: 42px; display: grid; place-items: center; background: #242820; border-radius: 10px; color: #6f756b; }
.empty strong, .empty small { display: block; }
.empty strong { color: #d8d7cd; font-size: 14px; }
.empty small { margin-top: 4px; font-size: 12px; }

.popout-prompt {
  inset: 0;
  transform: none;
  max-width: none;
  padding: 20px;
  justify-content: center;
  background: rgba(8,10,8,.8);
  color: var(--paper);
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
.pp-panel {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 16px;
  background: #20231e;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.pp-signal { color: #8d9489; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.pp-signal span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #69da78; }
.pp-panel h2 { max-width: 13ch; margin-top: 17px; font: 720 34px/1 "Aptos Display", "Segoe UI", sans-serif; letter-spacing: -.035em; }
.pp-text { margin-top: 13px; color: #aaa99f; font-size: 14px; font-weight: 450; line-height: 1.55; }
.pp-layout { height: 118px; margin: 22px 0; background: #111310; border-radius: 10px; position: relative; overflow: hidden; }
.pp-layout > div { position: absolute; inset: 16px 16px 34px; background: #353a32; border-radius: 5px; }
.pp-layout > span { position: absolute; left: 48px; right: 8px; bottom: 11px; display: flex; gap: 6px; padding: 8px; background: var(--paper); border-radius: 8px; box-shadow: 0 9px 24px rgba(0,0,0,.4); }
.pp-layout i { width: 20px; height: 20px; display: block; background: #c9c8bf; border-radius: 5px; }
.pp-layout i:first-child { background: var(--signal); border-radius: 50%; }
.pp-layout b { margin-left: auto; width: 44px; background: var(--signal); border-radius: 5px; }
.pp-go, .pp-dismiss { width: 100%; border-radius: 10px; }
.pp-go { padding: 14px 18px; background: var(--signal); color: #1b120f; font-size: 14px; }
.pp-dismiss { margin-top: 8px; height: 40px; background: transparent; color: #aaa99f; font-size: 12px; }

.rec-bar { background: var(--paper); color: #171914; border-radius: 12px; }
.rec-bar button { background: #dcdad1; color: #171914; border-radius: 8px; }
.rec-bar button.stop { background: var(--signal); color: #1b120f; }
.toolbar { border-radius: 12px; background: #20231e; }
.toolbar button { border-radius: 8px; }
.toolbar button.active { background: var(--cyan); color: #101614; }

@media (max-width: 860px) {
  .app-header { padding-inline: 18px; }
  .app-header > p { display: none; }
  .astra-credit { margin-left: auto; }
  .privacy-state { margin-left: 0; }
  .app-shell { grid-template-columns: 1fr; padding: 24px 18px; }
  .desktop-readiness { order: 2; }
  .library { grid-column: 1; order: 3; }
}
@media (max-width: 600px) {
  body { padding-bottom: 84px; }
  .app-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .astra-credit { font-size: 0; padding: 7px 9px; }
  .astra-credit::after { content: 'Astra rebuild'; font-size: 11px; }
  .astra-credit strong { display: none; }
  .privacy-state { font-size: 0; }
  .privacy-state::after { content: 'Local'; font-size: 11px; }
  .app-shell { padding: 18px 12px; gap: 14px; }
  .recorder-card, .desktop-readiness { border-radius: 14px; }
  .recorder-card { padding: 20px 16px; }
  .section-heading h1 { font-size: 34px; }
  .format-badge { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab { min-height: 74px; padding: 11px 6px; flex-direction: column; justify-content: center; gap: 7px; text-align: center; }
  .tab span:last-child { min-width: 0; max-width: 100%; }
  .capture-rule p, .studio-hint { min-width: 0; overflow-wrap: anywhere; }
  .tab-icon { width: 27px; height: 27px; }
  .tab small { display: none; }
  .toggles { display: grid; grid-template-columns: 1fr; }
  .toggle { justify-content: flex-start; }
  .desktop-readiness { display: none; }
  .library-heading { display: block; }
  .library-heading > p { margin-top: 5px; line-height: 1.45; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-panel { padding: 22px 18px; }
  .pp-panel h2 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
