/* ==========================================================================
   DualShots — web preview
   Mirrors the native Android design system in ui/theme/Color.kt,
   ui/theme/Type.kt and ui/components/Components.kt:
   near-black studio canvas with a warm orange glow, #121522 cards with
   hairline borders, mono section labels, one orange gradient for actions.
   ========================================================================== */

:root {
  --bg: #070a10;
  --bg-top: #0c1019;
  --bg-mid: #111725;
  --bg-bottom: #070a10;

  --surface: #111725;
  --surface-2: #171e30;
  --menu: #161d2e;

  --line: rgba(38, 48, 71, .75);
  --line-strong: #263047;

  --accent: #ff6500;
  --orange: #ff6500;
  --orange-deep: #ff5000;
  --orange-light: #ff9500;
  --gold: #ff9500;
  --gold-2: #ffb020;

  --ink: #04060d;
  --text: #ffffff;
  --muted: #95a0b8;
  --faint: #6b7590;
  --record: #ff3300;

  --grad: linear-gradient(96deg, #ff6500 0%, #ff9500 100%);
  --goldgrad: linear-gradient(96deg, #ff4400 0%, #ff8800 55%, #ffaa00 100%);

  --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "Roboto Mono", "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --pad: 20px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: #05060a;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

::selection { background: rgba(255, 119, 0, .35); }

svg { display: block; }

/* ------------------------------------------------------------------ stage */

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(255, 102, 0, .16), transparent 70%),
    #05060a;
}

.device {
  position: relative;
  width: 392px;
  height: min(844px, calc(100dvh - 32px));
  border-radius: 44px;
  background: #05060a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .09),
    0 0 0 9px #0b0d14,
    0 40px 90px -40px #000;
  flex: 0 0 auto;
}

.device-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.statusbar {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  position: relative;
  z-index: 12;
}
.sb-time { font-variant-numeric: tabular-nums; }
.sb-icons { display: flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .8); }
.battery {
  width: 19px; height: 10px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 3px;
  padding: 1px;
  position: relative;
  margin-left: 2px;
}
.battery i { display: block; width: 72%; height: 100%; border-radius: 1px; background: rgba(255, 255, 255, .85); }
.battery::after {
  content: "";
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 1.5px; height: 3.5px;
  border-radius: 0 2px 2px 0;
  background: rgba(255, 255, 255, .45);
}

.app {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* -------------------------------------------------------------- bottom nav */

.bottom-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: var(--bg);
  position: relative;
  z-index: 10;
}
.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border-radius: 16px;
}
.tab-icon {
  display: grid;
  place-items: center;
  padding: 6px 20px;
  border-radius: 14px;
  color: var(--faint);
  transition: background .18s, color .18s;
}
.tab-icon svg { width: 22px; height: 22px; }
.tab.active .tab-icon { background: var(--surface-2); color: #fff; }
.tab-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  transition: color .18s;
}
.tab.active .tab-label { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------------ pages */

.page {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px var(--pad) 24px;
  scrollbar-width: none;
  animation: rise .26s var(--ease) both;
}
.page::-webkit-scrollbar { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.section-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  margin-top: 12px;
}

.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  text-align: left;
}
.card-stack { display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-label { font-size: 14px; color: var(--text); }

/* ------------------------------------------------------------------- home */

.home {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 44px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(700px 420px at 50% -40px, rgba(255, 102, 0, .22), transparent 68%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
  animation: rise .26s var(--ease) both;
}
.home::-webkit-scrollbar { display: none; }

.logo-tile {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.logo-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 60px;
  background: radial-gradient(circle, rgba(255, 102, 0, .45), transparent 70%);
}
.logo-tile-inner {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--grad);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px -18px rgba(255, 68, 0, .95);
}
.logo-tile-inner svg { width: 42px; height: 42px; }

/* Den riktiga logotypen (orange squircle + svart kamera) */
.logo-mark {
  position: relative;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  filter: drop-shadow(0 16px 30px rgba(255, 68, 0, .5));
}

.wordmark {
  margin: 20px 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.1;
  color: var(--text);
}
.wordmark span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.tagline {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
}

.menu-stack {
  width: 100%;
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-start {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--grad);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 30px -20px rgba(255, 102, 0, .95);
  transition: transform .14s var(--ease);
}
.btn-start:active { transform: scale(.985); }
.start-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(0, 0, 0, .2);
  display: grid;
  place-items: center;
}
.start-ico svg { width: 18px; height: 18px; }
.start-label { flex: 1 1 auto; font-size: 14px; font-weight: 800; letter-spacing: 1px; }
.start-chev svg { width: 18px; height: 18px; }

.menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 16px;
  background: var(--menu);
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
  transition: border-color .18s, transform .14s var(--ease);
}
.menu-btn:active { transform: scale(.988); }
.menu-btn .menu-ico { flex: 0 0 auto; color: var(--orange); display: grid; place-items: center; }
.menu-btn .menu-ico svg { width: 18px; height: 18px; }
.menu-btn .menu-label { flex: 1 1 auto; font-size: 14px; font-weight: 700; color: #e2e8f0; }
.menu-btn .menu-chev { color: var(--faint); display: grid; place-items: center; }
.menu-btn .menu-chev svg { width: 16px; height: 16px; }

.menu-btn.premium {
  background: linear-gradient(96deg, rgba(255, 102, 0, .15), rgba(255, 153, 0, .15));
  border-color: rgba(255, 102, 0, .4);
}
.menu-btn.premium .menu-ico,
.menu-btn.premium .menu-label,
.menu-btn.premium .menu-chev { color: var(--gold); }

.made-by {
  margin: 32px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--faint);
  text-align: center;
}
.made-by .credit-name { text-transform: uppercase; letter-spacing: .1em; }
.credit-link {
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--orange-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 102, 0, .4);
  padding-bottom: 1px;
}
.credit-link:active { opacity: .7; }
.credit-mail { display: inline-flex; align-items: center; gap: 8px; }
.credit-mail a {
  font-size: 11px;
  letter-spacing: .01em;
  color: var(--muted);
  text-decoration: none;
}
.copy-mail {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.copy-mail svg { width: 12px; height: 12px; }
.copy-mail:active { transform: scale(.94); color: var(--orange-light); }

/* --------------------------------------------------------------- settings */

.studio-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
}
.studio-ico { color: var(--orange); display: grid; place-items: center; }
.studio-ico svg { width: 22px; height: 22px; }
.studio-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--text);
}

.radio-row { display: flex; align-items: center; gap: 12px; }
.radio-row.selected { border-color: rgba(255, 119, 0, .45); }
.radio-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.radio-title { font-size: 15px; font-weight: 600; color: var(--text); }
.radio-sub { font-size: 12px; color: var(--muted); }
.radio-dot {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  display: grid;
  place-items: center;
}
.radio-dot::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0;
  transition: opacity .16s;
}
.radio-row.selected .radio-dot { border-color: var(--accent); }
.radio-row.selected .radio-dot::after { opacity: 1; }

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.chip {
  padding: 8px 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color .16s, background .16s, border-color .16s;
}
.chip.active {
  background: rgba(255, 119, 0, .16);
  border-color: rgba(255, 119, 0, .5);
  color: var(--text);
  font-weight: 700;
}

.seg {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
}
.seg-btn {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.seg-btn.active { background: var(--grad); color: var(--ink); font-weight: 700; }

/* premium */

.premium-card {
  margin-top: 16px;
  border-color: rgba(255, 153, 0, .45);
}
.premium-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.premium-head svg { width: 18px; height: 18px; }
.premium-list { margin-top: 10px; display: flex; flex-direction: column; }
.premium-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--muted);
}
.premium-item svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }
.premium-active { margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--gold); }
.gold-btn {
  margin-top: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: 14px;
  background: var(--goldgrad);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
}
.gold-btn svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- gallery */

.screen-header h1 {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.8px;
  color: var(--text);
}
.screen-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.clip-list { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.clip {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color .18s;
}
.clip:hover { border-color: var(--line-strong); }
.clip-tile {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--grad);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.clip-tile svg { width: 18px; height: 18px; }
.clip-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.clip-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}
.clip-meta { font-size: 12px; color: var(--muted); }
.clip-chev { flex: 0 0 auto; color: var(--faint); display: grid; place-items: center; }
.clip-chev svg { width: 18px; height: 18px; }

.empty {
  margin-top: 22px;
  height: 200px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.empty-ico { color: var(--faint); display: grid; place-items: center; margin-bottom: 6px; }
.empty-ico svg { width: 36px; height: 36px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-sub { font-size: 12px; color: var(--muted); }

/* ----------------------------------------------------------------- modals */

.modal-root {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.modal-root:empty { display: none; }

.modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 13, .78);
  backdrop-filter: blur(3px);
  pointer-events: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  width: min(340px, 100%);
  max-height: 92%;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 102, 0, .4);
  background: linear-gradient(180deg, #141724, #0d0f18);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: dialog-in .2s var(--ease);
}
.dialog::-webkit-scrollbar { display: none; }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.dlg-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--goldgrad);
  color: #000;
  display: grid;
  place-items: center;
}
.dlg-mark svg { width: 30px; height: 30px; }
.dlg-title {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--text);
}
.dlg-sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
}
.dlg-list {
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dlg-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #e2e8f0; }
.dlg-check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 102, 0, .2);
  border: 1px solid var(--orange);
  color: var(--orange-light);
  display: grid;
  place-items: center;
}
.dlg-check svg { width: 11px; height: 11px; }
.dlg-btn {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  border-radius: 16px;
  background: var(--grad);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.dlg-btn[disabled] { opacity: .55; cursor: default; }
.dlg-close {
  margin-top: 6px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* about: the native AlertDialog */

.about-dialog {
  align-items: stretch;
  width: min(320px, 100%);
  border-color: var(--line-strong);
  background: var(--surface-2);
  padding: 24px 20px 12px;
}
.about-title { font-size: 20px; font-weight: 700; color: var(--text); }
.about-version {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.about-ok {
  align-self: flex-end;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
}

/* ----------------------------------------------------------------- sheets */

.sheet-wrap { align-items: flex-end; padding: 0; }
.sheet {
  width: 100%;
  max-height: 92%;
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--line-strong);
  background: var(--bg-top);
  padding: 10px var(--pad) calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up .26s var(--ease);
}
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .5; }
  to { transform: none; opacity: 1; }
}
.grabber {
  width: 32px;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 0 auto 14px;
}
.sheet-title { font-size: 18px; font-weight: 700; color: var(--text); }
.sheet-sub { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.sheet .section-title {
  margin: 18px 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.sheet-note {
  margin-top: 12px;
  padding: 9px 11px;
  border-left: 2px solid var(--orange);
  border-radius: 8px;
  background: rgba(255, 102, 0, .1);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--orange-light);
}

.option-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}
.option.active { border-color: rgba(255, 119, 0, .5); }
.option .t { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.option .d { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.option .tick { margin-left: auto; color: var(--accent); display: none; }
.option.active .tick { display: grid; place-items: center; }
.option .tick svg { width: 16px; height: 16px; }

.mini-btn {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .16s, border-color .16s;
}
.mini-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .28); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: var(--grad);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  text-decoration: none;
}
.sheet .btn-primary { margin-top: 16px; }

/* player */

.player video {
  width: 100%;
  max-height: 46vh;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--line);
  display: block;
}
.player-meta {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-all;
}
.player-actions { display: flex; gap: 8px; margin-top: 14px; }
.player-actions .btn-primary { flex: 1 1 auto; }
.player-actions .btn-primary svg { width: 16px; height: 16px; }
.btn-secondary {
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  display: grid;
  place-items: center;
}
.btn-danger { color: #ff9d94; border-color: rgba(255, 51, 0, .35); }

/* ---------------------------------------------------------------- record */

.record {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  padding: 4px 12px 0;
  animation: rise .24s var(--ease) both;
}

.rec-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 10px;
}
.rec-top .spacer { flex: 1 1 auto; }

.icon-chip {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: background .18s, color .18s, border-color .18s;
}
.icon-chip svg { width: 18px; height: 18px; }
.icon-chip.on {
  background: var(--grad);
  border-color: transparent;
  color: var(--ink);
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.timer .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background .2s;
}
.record.recording .timer {
  background: rgba(255, 51, 0, .16);
  border-color: rgba(255, 51, 0, .5);
}
.record.recording .timer .dot {
  background: var(--record);
  box-shadow: 0 0 8px rgba(255, 51, 0, .9);
  animation: blink 1.1s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.rec-preview {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 4px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .3s, box-shadow .3s;
}
.rec-preview.recording {
  border-color: rgba(255, 51, 0, .5);
  box-shadow: 0 0 0 1px rgba(255, 51, 0, .16), 0 0 40px -18px rgba(255, 51, 0, .6);
}

.feeds {
  position: absolute;
  inset: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  --zoom: 1;
  --pip-ratio: 9 / 16;
}
.tile {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #05060a;
}
.tile video, .tile canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(var(--zoom, 1));
}
.tile.mirror > video { transform: scale(var(--zoom, 1)) scaleX(-1); }
.tile .badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .45);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--orange-light);
}

.stack-swap {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translate(-50%, 0);
  z-index: 6;
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  color: var(--text);
  background: rgba(18, 21, 34, .86);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stack-swap svg { width: 13px; height: 13px; }
.stack-swap:active { transform: translate(-50%, 0) scale(.95); }

/* Handtaget mellan de två rutorna */
.stack-split {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 7;
  width: 38px;
  height: 22px;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: row-resize;
}
.stack-split i {
  display: block;
  width: 34px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.stack-split.active i { background: var(--orange-light); }

/* Paus-/kryssknappar i en inspelningsruta */
.tile-controls {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  display: flex;
  gap: 8px;
}
.tile-controls .pip-ctl { width: 30px; height: 30px; }
.tile.paused > video, .tile.paused > canvas { opacity: .35; filter: grayscale(1); }
.tile.paused::after {
  content: "PAUSED";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .82);
  pointer-events: none;
}

.pip {
  position: absolute;
  left: 74%;
  top: 24%;
  width: 34%;
  transform: translate(-50%, -50%);
  aspect-ratio: var(--pip-ratio, 9 / 16);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .55);
  background: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .6);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.pip.active {
  cursor: grabbing;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, .4), 0 12px 26px rgba(0, 0, 0, .65);
}
.pip video, .pip canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(var(--zoom, 1));
}
.pip.mirror video { transform: scale(var(--zoom, 1)) scaleX(-1); }

.pip .zoom-tag, .tile .zoom-tag {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .5);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.pip .zoom-tag.on, .tile .zoom-tag.on { opacity: 1; }

.pip-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 26px;
  height: 26px;
  border-top-left-radius: 8px;
  border-left: 1px solid rgba(255, 255, 255, .28);
  border-top: 1px solid rgba(255, 255, 255, .28);
  background:
    linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, .9) 57%, transparent 57%),
    linear-gradient(135deg, transparent 24%, rgba(255, 255, 255, .55) 24%, rgba(255, 255, 255, .55) 31%, transparent 31%),
    rgba(0, 0, 0, .45);
  touch-action: none;
  cursor: nwse-resize;
}
.pip.resizing { border-color: var(--gold); }

.pip-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 7;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(18, 21, 34, .82);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: opacity .4s ease;
  pointer-events: none;
}
.pip-hint.hide { opacity: 0; }

.tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.tile-placeholder svg { width: 24px; height: 24px; opacity: .5; }

.rec-status {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.rec-status .formats {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}
.rec-status .saved { display: block; color: #8fa0c8; font-size: 11px; }

.rec-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px calc(26px + env(safe-area-inset-bottom));
}

.shutter {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  display: grid;
  place-items: center;
  transition: transform .16s var(--ease), border-color .2s;
}
.shutter > i {
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--record);
  transition: width .24s var(--ease), height .24s var(--ease), border-radius .24s var(--ease);
}
.shutter.on > i { width: 30px; height: 30px; border-radius: 8px; }
.shutter:active { transform: scale(.96); }
.shutter[disabled] { opacity: .35; }

.zoom-chip {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}
.zoom-chip.active { color: var(--orange-light); border-color: rgba(255, 102, 0, .55); }

.dock-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
}
.dock-btn svg { width: 20px; height: 20px; }
.dock-btn.swapped { color: var(--orange-light); border-color: rgba(255, 102, 0, .55); }

/* ------------------------------------------------------------------ toast */

.toast {
  position: absolute;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  z-index: 45;
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(18, 21, 34, .96);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 18px 40px -20px #000;
  animation: toast-in .2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* --------------------------------------------------------- media holders */

.media-sink {
  position: fixed;
  left: -10px;
  top: -10px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.media-sink video, .media-sink canvas { width: 1px; height: 1px; display: block; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 560px), (max-height: 700px) {
  .stage { padding: 0; display: block; }
  .device {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .device-inner { border-radius: 0; }
  .statusbar { display: none; }
  .bottom-nav { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .home { padding-top: calc(28px + env(safe-area-inset-top)); }
  .page { padding-top: calc(8px + env(safe-area-inset-top)); }
  .rec-top { padding-top: calc(12px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------------------------------------- lilla kamerans kontroller */

.pip-controls {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 6;
  display: flex;
  gap: 5px;
}
.pip-ctl {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  backdrop-filter: blur(6px);
}
.pip-ctl svg { width: 13px; height: 13px; }
.pip-ctl:active { transform: scale(.94); }

.pip.paused video, .pip.paused canvas { opacity: .25; filter: grayscale(1); }
.pip-paused {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  pointer-events: none;
}
.dock-btn.off { color: var(--orange-light); border-color: rgba(255, 102, 0, .55); }

/* 3x3 grid overlay + pausknapp i inspelningen */
.rec-grid {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  background-image:
    linear-gradient(to right,
      transparent calc(33.33% - .5px), rgba(255, 255, 255, .26) calc(33.33% - .5px),
      rgba(255, 255, 255, .26) calc(33.33% + .5px), transparent calc(33.33% + .5px),
      transparent calc(66.66% - .5px), rgba(255, 255, 255, .26) calc(66.66% - .5px),
      rgba(255, 255, 255, .26) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(to bottom,
      transparent calc(33.33% - .5px), rgba(255, 255, 255, .26) calc(33.33% - .5px),
      rgba(255, 255, 255, .26) calc(33.33% + .5px), transparent calc(33.33% + .5px),
      transparent calc(66.66% - .5px), rgba(255, 255, 255, .26) calc(66.66% - .5px),
      rgba(255, 255, 255, .26) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.rec-grid.on { opacity: 1; }
[hidden] { display: none !important; }

/* OnboardingScreen.kt: logotyp, tre steg och gradient-CTA. */
.onboarding {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg, #07080c);
}
.onb-top {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.onb-tile {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  background: var(--grad);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.onb-tile svg { width: 48px; height: 48px; }
.onb-tile { background: none; border-radius: 0; }
.onb-tile .logo-mark { width: 112px; height: 112px; }
.onb-title {
  margin: 30px 0 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
}
.onb-body {
  margin: 10px 0 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 21px;
  color: var(--muted);
}
.onb-foot { width: 100%; display: flex; flex-direction: column; align-items: center; }
.onb-dots { display: flex; gap: 7px; margin-bottom: 26px; }
.onb-dot {
  display: block;
  width: 8px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .22);
  transition: width .22s, background .22s;
}
.onb-dot.active { width: 22px; background: var(--text); }
.onb-cta {
  width: 100%;
  height: 56px;
  border-radius: 18px;
  background: var(--grad);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.onb-skip { margin-top: 6px; padding: 10px; font-size: 13px; color: var(--muted); }

/* Galleriets tumnagel (GalleryScreen.kt ClipThumb). */
.clip-tile { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; }
.clip-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Spelardialog + bekräftelse (GalleryScreen.kt). */
.clip-dialog {
  align-items: stretch;
  width: min(380px, 100%);
  padding: 16px;
  border-radius: 24px;
  border-color: var(--line);
  background: var(--surface-2);
}
.clip-dialog-name {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.clip-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #000;
  display: block;
}
.clip-dialog-meta {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.pill-row { display: flex; gap: 8px; margin-top: 14px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.pill svg { width: 15px; height: 15px; color: var(--orange-light); }
.pill.danger svg { color: var(--orange); }

.confirm-dialog {
  align-items: stretch;
  width: min(320px, 100%);
  padding: 20px;
  border-radius: 24px;
  border-color: var(--line);
  background: var(--surface-2);
}
.confirm-title { font-size: 17px; font-weight: 800; color: var(--text); }
.confirm-text {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.confirm-actions { display: flex; gap: 8px; margin-top: 18px; }
.confirm-delete, .confirm-cancel {
  flex: 1 1 0;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
}
.confirm-delete { background: var(--grad); color: var(--ink); }
.confirm-cancel { background: var(--surface); border: 1px solid var(--line); color: var(--text); }

/* ==========================================================================
   v5 — Home / Gallery / Stats / Settings, pixel-matched to
   design/reference/*.png. Every size below is in the reference images'
   own pixels (1024 wide); .v5, the status bar and the nav are scaled to
   the real screen with `zoom: var(--z)` (set by fitZoom() in app.js).
   ========================================================================== */

:root { --z: .383; --ph: 2000px; --o5: #ff6a10; --muted5: #8f99ad; --card5: #111724; --line5: #1f2738; }

/* device keeps the references' 2:3 shape */
.device { width: auto; height: min(940px, calc(100dvh - 32px)); aspect-ratio: 1024 / 1536; border-radius: 36px; }
.device-inner { border-radius: 36px; background: #0a0d14; }
body.ref .stage { padding: 0; display: block; background: #0a0d14; }
body.ref .device { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
body.ref .device-inner { border-radius: 0; }

/* status bar */
.statusbar {
  zoom: var(--z); height: 60px; padding: 0 56px 0 50px;
  font-family: Roboto, var(--font); font-size: 30px; font-weight: 500; color: #fff;
}
.sb-icons { gap: 16px; color: #fff; }
.sb-mute { width: 36px; height: 36px; }
.sb-5g { font-size: 25px; font-weight: 700; }
.sb-signal { width: 32px; height: 32px; }
.sb-battery {
  min-width: 62px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  background: #e9e9e9; color: #111; font-size: 22px; font-weight: 700;
}

/* bottom nav (4 tabs, as in the Stats reference) */
.bottom-nav {
  zoom: var(--z); height: 138px; padding: 0 26px; align-items: stretch;
  background: #080b11; border-top: 2px solid #161c28;
}
.tab { position: relative; display: block; padding: 0; border-radius: 0; }
.tab-icon {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  width: 167px; height: 61px; padding: 0; border-radius: 24px;
  display: grid; place-items: center; color: #8a93a8; background: transparent;
}
.tab-icon svg { width: 44px; height: 44px; stroke-width: 1.7; }
.tab.active .tab-icon { background: #3a2213; color: var(--o5); }
.tab-label {
  position: absolute; left: 0; right: 0; top: 80px; text-align: center;
  font-family: Roboto, var(--font); font-size: 25px; line-height: 30px; font-weight: 500; color: #8a93a8;
}
.tab.active .tab-label { color: var(--o5); font-weight: 500; }

/* page shell */
.v5 {
  zoom: var(--z); width: 1024px; height: var(--ph); position: relative;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding-bottom: 40px;
  font-family: Roboto, var(--font); color: #fff;
  background: radial-gradient(760px 560px at 78% 6%, rgba(255, 102, 0, .09), transparent 70%), #0a0d14;
  animation: rise .26s var(--ease) both;
}
.v5::-webkit-scrollbar { display: none; }
.v5 p, .v5 h1, .v5 h2, .v5 ul { margin: 0; padding: 0; list-style: none; }
.v5 h1, .v5 h2 { font-weight: 500; }
.v5 button { text-align: left; }
.v5 svg { stroke-width: 1.8; }
.v5 img { display: block; width: 100%; height: 100%; object-fit: cover; }

.v5-brand { position: absolute; font-weight: 700; line-height: 1; letter-spacing: -1.6px; white-space: nowrap; color: #fff; }
.v5-brand span { color: var(--o5); }
.v5-tagline { position: absolute; font-family: "Roboto Mono", var(--mono); font-size: 18px; line-height: 24px; color: #7d879c; white-space: nowrap; }
.v5-label { font-family: "Roboto Mono", var(--mono); font-size: 21px; line-height: 28px; font-weight: 500; letter-spacing: 2.1px; color: #a3abbd; }
.v5-circle {
  position: absolute; border-radius: 50%; display: grid; place-items: center;
  background: #161c2a; border: 2px solid #252d3f; color: #e8ecf4;
}
.v5-seeall { display: flex; align-items: center; gap: 14px; font-size: 23px; line-height: 30px; font-weight: 500; color: var(--o5); }
.v5-seeall svg { width: 24px; height: 24px; stroke-width: 2.6; }
.v5-dots { position: absolute; color: #9aa3b5; }
.v5-dots svg { width: 28px; height: 28px; }
.v5-dur {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 10px; border-radius: 10px;
  background: rgba(10, 12, 18, .78); font-size: 21px; font-weight: 500; color: #fff;
}

/* --------------------------------------------------------------- home */
.h-hero { position: relative; height: 513px; }
.h-art {
  position: absolute; left: 452px; top: 10px; width: 572px !important; height: 498px !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px), linear-gradient(180deg, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 48px), linear-gradient(180deg, #000 88%, transparent 100%);
  mask-composite: intersect;
}
.h-brand { left: 57px; top: 31px; font-size: 48px; }
.h-profile { left: 917px; top: 26px; width: 62px; height: 62px; }
.h-profile { background: #1c2335; border-color: #232c40; }
.h-profile svg { width: 38px; height: 38px; }
.h-kicker {
  position: absolute; left: 62px; top: 132.5px; font-family: "Roboto Mono", var(--mono);
  font-size: 22px; line-height: 35px; letter-spacing: .8px; color: #a3abbd;
}
.h-kicker span { color: var(--o5); }
.h-title { position: absolute; left: 60px; top: 223.5px; font-size: 60px !important; line-height: 59px; font-weight: 700 !important; letter-spacing: -1px; }
.h-title span { color: var(--o5); }
.h-sub { position: absolute; left: 62px; top: 416px; font-size: 28px; line-height: 34px; color: #9aa3b5; }

.h-start {
  position: relative; display: block; margin: 0 58px 0 62px; width: 904px; height: 124px; border-radius: 36px;
  background: linear-gradient(90deg, #ff5a0a 0%, #ff7410 55%, #ff9a1c 100%);
  box-shadow: 0 0 40px rgba(255, 102, 0, .3), 0 18px 40px -16px rgba(255, 90, 0, .6);
  color: #1c0d05;
}
.h-start:active { transform: scale(.99); }
.h-start-ico {
  position: absolute; left: 36px; top: 27px; width: 89px; height: 70px; border-radius: 18px;
  display: grid; place-items: center; background: rgba(140, 35, 0, .3); color: #2a0d02;
}
.h-start-ico svg { width: 54px; height: 54px; stroke-width: 2; }
.h-start-label { position: absolute; left: 160px; top: 42px; font-size: 33px; line-height: 40px; font-weight: 700; letter-spacing: 1.6px; }
.h-start-chev { position: absolute; left: 826px; top: 45px; }
.h-start-chev svg { width: 34px; height: 34px; stroke-width: 2.4; }

.h-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 21px; margin: 30px 58px 0 62px; height: 216px; }
.h-qcard {
  position: relative; border-radius: 26px;
  background: linear-gradient(180deg, #131a28, #0f1420); border: 2px solid #212a3b;
}
.h-qico { position: absolute; left: 28px; top: 31px; color: var(--o5); }
.h-qico svg { width: 48px; height: 48px; }
.h-qcard b { position: absolute; left: 28px; top: 98px; font-size: 24px; line-height: 30px; font-weight: 500; white-space: nowrap; }
.h-qsub { position: absolute; left: 28px; top: 136px; font-size: 19px; letter-spacing: -.3px; line-height: 26px; color: var(--muted5); white-space: nowrap; }
.h-qchev { position: absolute; right: 22px; top: 160px; color: var(--muted5); }
.h-qchev svg { width: 28px; height: 28px; stroke-width: 2.2; }

.h-panel {
  position: relative; margin: 27px 58px 0 62px; height: 342px; border-radius: 28px;
  background: linear-gradient(180deg, #121926, #0f1520); border: 2px solid #212a3b;
}
.h-panel h2 { position: absolute; left: 26px; top: 27px; font-size: 30px; line-height: 36px; }
.h-seeall { position: absolute; right: 33px; top: 30px; }
.h-items { position: absolute; left: 24px; right: 24px; top: 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.h-item { position: relative; display: block; height: 230px; }
.h-thumb { position: absolute; left: 0; right: 0; top: 0; display: block; height: 155px; border-radius: 14px; overflow: hidden; background: #0b0f18; }
.h-ititle { position: absolute; left: 2px; top: 168px; font-size: 22px; line-height: 26px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 85%; }
.h-idate { position: absolute; left: 2px; top: 199px; font-size: 19px; line-height: 24px; color: var(--muted5); white-space: nowrap; }
.h-item .v5-dots { right: 2px; top: 182px; }

/* ------------------------------------------------------------ gallery */
.g-head { position: relative; height: 132px; }
.g-brand { left: 50px; top: 18px; font-size: 53px; }
.g-tagline { left: 52px; top: 76px; letter-spacing: 3.8px; }
.g-search, .g-more { top: 20px; width: 70px; height: 70px; }
.g-search { left: 809px; }
.g-more { left: 907px; }
.g-search svg, .g-more svg { width: 36px; height: 36px; }

.g-chips { display: flex; gap: 14.5px; margin-left: 50px; height: 66px; }
.g-chip {
  flex: 0 0 auto; height: 66px; padding-left: 33px; display: flex; align-items: center; gap: 20px;
  border-radius: 24px; background: #121826; border: 2px solid #232b3c;
  font-size: 21px; font-weight: 500; color: #d4dae6;
}
.g-chip svg { width: 34px; height: 34px; color: #c9d0dc; }
.g-chip-all { width: 146px; }
.g-chip-videos, .g-chip-photos { width: 177px; }
.g-chip-favorites { width: 198px; }
.g-chip-deleted { width: 172px; }
.g-chip.active { border: 3px solid var(--o5); color: var(--o5); background: #1c130f; box-shadow: 0 0 24px rgba(255, 102, 0, .35); }
.g-chip.active svg { color: var(--o5); }

.g-banner {
  position: relative; margin: 25px 47px 0 47px; height: 106px; border-radius: 22px;
  border: 2px solid #4a2612; background: linear-gradient(90deg, #20140e, #15110f 60%, #1a120e);
}
.g-banner-ico {
  position: absolute; left: 21px; top: 18px; width: 98px; height: 67px; border-radius: 16px;
  display: grid; place-items: center; background: #2a1b12; color: var(--o5);
}
.g-banner-ico svg { width: 58px; height: 58px; }
.g-banner b { position: absolute; left: 149px; top: 25px; font-size: 25px; line-height: 32px; font-weight: 500; }
.g-banner-sub { position: absolute; left: 149px; top: 59px; font-size: 19px; line-height: 24px; color: #9aa3b5; }
.g-banner-btn {
  position: absolute; left: 665px; top: 22px; width: 244px; height: 59px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  border: 3px solid var(--o5); color: var(--o5); font-size: 21px; font-weight: 500;
}
.g-banner-btn svg { width: 26px; height: 26px; stroke-width: 2.4; }

.g-sechead { display: flex; align-items: center; justify-content: space-between; margin: 25px 52px 0 50px; height: 36px; }
.g-sechead h2 { font-size: 30px; line-height: 36px; }
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 20px; row-gap: 17px; margin: 17px 49px 0 50px; }
.g-card { position: relative; display: block; height: 248px; border-radius: 20px; background: var(--card5); border: 2px solid var(--line5); }
.g-thumb { position: absolute; left: 3px; right: 3px; top: 3px; height: 173px; border-radius: 18px 18px 4px 4px; overflow: hidden; background: #0b0f18; }
.g-ctitle { position: absolute; left: 15px; top: 183px; font-size: 21px; line-height: 26px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.g-cdate { position: absolute; left: 15px; top: 211px; font-size: 19px; line-height: 24px; color: var(--muted5); white-space: nowrap; }
.g-card .v5-dots { right: 12px; top: 197px; }

.g-folders-head { margin-top: 35px; }
.g-folders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 48px 0 49px; height: 111px; }
.g-folder { position: relative; border-radius: 18px; background: var(--card5); border: 2px solid var(--line5); }
.g-fico {
  position: absolute; left: 15px; top: 21px; width: 64px; height: 66px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: #1a2131; color: var(--o5);
}
.g-fico.warm { background: #2b1b13; }
.g-fico.photo { background: none; }
.g-fico svg { width: 42px; height: 42px; }
.g-folder b { position: absolute; left: 95px; top: 32px; font-size: 19px; line-height: 24px; font-weight: 500; white-space: nowrap; }
.g-fcount { position: absolute; left: 95px; top: 59px; font-size: 18px; line-height: 22px; color: var(--muted5); white-space: nowrap; }
.g-fchev { position: absolute; right: 16px; top: 48px; color: var(--muted5); }
.g-fchev svg { width: 26px; height: 26px; stroke-width: 2; }

.g-storage { position: relative; margin: 36px 49px 0 50px; height: 110px; }
.g-storage h2 { position: absolute; left: 1px; top: 0; font-size: 30px; line-height: 36px; }
.g-sused { position: absolute; right: 2px; top: 6px; font-size: 18px; line-height: 24px; color: #9aa3b5; }
.g-bar { position: absolute; left: 2px; top: 48px; width: 676px; height: 16px; border-radius: 8px; background: #283044; overflow: hidden; display: flex; }
.g-bar i { display: block; height: 100%; }
.g-bar .v { background: linear-gradient(90deg, #ff5a00, #ffa31a); border-radius: 8px; position: relative; z-index: 1; }
.g-bar .p { background: #4a5468; margin-left: -8px; padding-left: 8px; }
.g-legend { position: absolute; left: 2px; top: 84px; display: flex; gap: 28px; font-size: 18px; line-height: 22px; color: var(--muted5); white-space: nowrap; }
.g-legend span { display: flex; align-items: center; }
.g-legend .dot, .s-legend .dot, .s-store-rows .dot { display: inline-block; width: 17px; height: 17px; border-radius: 50%; margin-right: 11px; flex: 0 0 auto; }
.dot.o { background: var(--o5); }
.dot.g { background: #6b7488; }
.dot.d { background: #2f3646; }
.dot.l { background: #ffa53a; }
.dot.b { background: #4b7be0; }
.g-manage {
  position: absolute; left: 709px; top: 45px; width: 216px; height: 57px; border-radius: 20px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px 0 26px;
  border: 2px solid #39425a; font-size: 19px; color: #e3e8f0;
}
.g-manage svg { width: 24px; height: 24px; stroke-width: 2; }
.g-empty { margin-top: 90px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font-size: 22px; color: var(--muted5); }
.g-empty b { font-size: 30px; color: #fff; font-weight: 500; }
.g-empty-ico svg { width: 70px; height: 70px; color: #5b6478; }

/* -------------------------------------------------------------- stats */
.s-head { position: relative; height: 184px; }
.s-brand { left: 55px; top: 7px; font-size: 49px; }
.s-title { position: absolute; left: 55px; top: 71.5px; font-size: 54px; line-height: 60px; font-weight: 700 !important; letter-spacing: -.5px; }
.s-sub { position: absolute; left: 57px; top: 133px; font-size: 25px; line-height: 30px; color: #9aa3b5; }
.s-range {
  position: absolute; left: 680px; top: 75px; width: 293px; height: 63px; border-radius: 32px;
  display: flex; align-items: center; gap: 16px; padding: 0 26px 0 24px;
  background: #121826; border: 2px solid #252d3f; color: #e3e8f0; font-size: 22px;
}
.s-range span { flex: 1; }
.s-range svg { width: 30px; height: 30px; color: #c9d0dc; }
.s-range svg:last-child { width: 26px; height: 26px; stroke-width: 2.4; }

.s-label { font-family: "Roboto Mono", var(--mono); font-size: 18px; line-height: 24px; letter-spacing: 2px; color: #a3abbd; white-space: nowrap; }
.s-total {
  position: relative; display: block; margin: 0 49px 0 50px; height: 196px; border-radius: 26px;
  border: 2px solid #5a2c12; background: linear-gradient(90deg, #2a170d 0%, #1d140f 55%, #26160d 100%);
  box-shadow: inset 0 0 60px rgba(255, 90, 0, .08);
}
.s-total-tile {
  position: absolute; left: 29px; top: 37px; width: 93px; height: 92px; border-radius: 20px;
  display: grid; place-items: center; background: linear-gradient(135deg, #ff7a1a, #ff5a00); color: #1c0d05;
}
.s-total-tile svg { width: 52px; height: 52px; stroke-width: 2.4; }
.s-total-label { position: absolute; left: 153px; top: 38px; }
.s-total-value { position: absolute; left: 153px; top: 64px; font-size: 54px; line-height: 60px; font-weight: 700; }
.s-total-delta { position: absolute; left: 153px; top: 136px; display: flex; align-items: center; gap: 8px; font-size: 22px; line-height: 28px; color: #9aa3b5; }
.s-total-delta svg { width: 26px; height: 26px; color: #3ddc84; stroke-width: 2.6; }
.s-total-delta b { color: #3ddc84; font-weight: 600; margin-right: 6px; }
.s-total-tag { position: absolute; right: 23px; top: 22px; text-align: right; font-family: "Roboto Mono", var(--mono); font-size: 16px; line-height: 24px; letter-spacing: 2.4px; color: #a3abbd; }
.s-total-tag em { font-style: normal; color: var(--o5); }
.s-wave {
  position: absolute; left: 423px; top: 78px; width: 500px; height: 100px; overflow: visible;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%); mask-image: linear-gradient(90deg, transparent, #000 25%);
}
.s-wave path { fill: none; stroke: var(--o5); stroke-width: 4 !important; filter: drop-shadow(0 0 8px rgba(255, 106, 16, .9)); }

.s-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 21px 49px 0 50px; height: 192px; }
.s-card { position: relative; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.s-cico { position: absolute; left: 26px; top: 21px; color: var(--o5); }
.s-cico svg { width: 38px; height: 38px; }
.s-card .s-label { position: absolute; left: 26px; top: 72px; font-size: 15px; line-height: 20px; letter-spacing: 2.1px; }
.s-card b { position: absolute; left: 26px; top: 98px; font-size: 27px; line-height: 34px; font-weight: 700; }
.s-delta { position: absolute; left: 26px; top: 146px; display: flex; align-items: center; gap: 8px; font-size: 19px; line-height: 24px; font-weight: 600; color: #3ddc84; }
.s-delta svg { width: 22px; height: 22px; stroke-width: 2.6; }
.s-delta.none { color: var(--muted5); }

.s-chart { position: relative; margin: 18px 49px 0 50px; height: 314px; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.s-chart-label { position: absolute; left: 28px; top: 22px; font-size: 20px; line-height: 26px; letter-spacing: 2.6px; }
.s-seg { position: absolute; left: 556px; top: 15px; display: flex; gap: 10px; }
.s-seg button { height: 45px; border-radius: 23px; text-align: center; font-size: 20px; font-weight: 500; color: #c9d0dc; background: #1b2232; }
.s-seg button:nth-child(1) { width: 96px; }
.s-seg button:nth-child(2) { width: 115px; }
.s-seg button:nth-child(3) { width: 116px; }
.s-seg button.active { background: linear-gradient(90deg, #ff5a0a, #ff8a1c); color: #fff; }
.s-plot { position: absolute; left: 0; right: 0; top: 89px; height: 200px; }
.s-tick { position: absolute; left: 0; width: 45px; text-align: right; transform: translateY(-50%); font-size: 17px; line-height: 20px; color: var(--muted5); }
.s-grid { position: absolute; left: 60px; right: 25px; height: 1px; background: #1b2232; }
.s-bar {
  position: absolute; bottom: 48px; width: 62px; transform: translateX(-50%);
  background: linear-gradient(180deg, #ff5a0a, #ff9a2a); border-radius: 5px 5px 0 0;
}
.s-bar em { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-style: normal; font-size: 19px; line-height: 24px; color: #fff; }
.s-day { position: absolute; top: 161px; width: 120px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-size: 17px; line-height: 24px; color: #7d879c; }
.s-day b { font-size: 19px; font-weight: 400; color: #c9d0dc; }

.s-bottom { display: grid; grid-template-columns: 454px 455px; gap: 16px; margin: 16px 49px 0 50px; height: 245px; }
.s-usage, .s-store { position: relative; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.s-usage h2, .s-store h2 { position: absolute; left: 27px; top: 18px; font-size: 22px; line-height: 28px; }
.s-donut { position: absolute; left: 29px; top: 66px; width: 156px; height: 156px; border-radius: 50%; }
.s-donut::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: var(--card5); }
.s-donut span { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 18px; line-height: 22px; color: #9aa3b5; }
.s-donut b { font-size: 30px; line-height: 34px; font-weight: 700; color: #fff; }
.s-legend { position: absolute; left: 219px; top: 66px; width: 207px; }
.s-legend li, .s-store-rows li { display: flex; align-items: center; height: 48.5px; font-size: 19px; color: #c9d0dc; }
.s-legend em, .s-store-rows em { margin-left: auto; font-style: normal; color: #c9d0dc; }
.s-store-used { position: absolute; right: 21px; top: 45px; font-size: 17px; line-height: 24px; color: #9aa3b5; }
.s-store-bar { position: absolute; left: 27px; top: 79px; width: 404px; height: 19px; border-radius: 10px; background: #262d3d; overflow: hidden; }
.s-store-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #ff5200, #ffa31a); }
.s-store-rows { position: absolute; left: 27px; right: 21px; top: 119px; }
.s-store-rows li { height: 37.5px; }

.s-prem {
  position: relative; display: block; margin: 19px 49px 0 50px; height: 107px; border-radius: 22px;
  border: 3px solid var(--o5); background: linear-gradient(90deg, #24140c, #1a110d);
  box-shadow: 0 0 26px rgba(255, 106, 16, .35);
}
.s-prem-ico { position: absolute; left: 26px; top: 19px; width: 63px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: #2e1c11; color: #ffb02e; }
.s-prem-ico svg { width: 42px; height: 42px; stroke-width: 2.2; }
.s-prem b { position: absolute; left: 116px; top: 22px; font-size: 24px; line-height: 30px; font-weight: 700; color: #ffa53a; }
.s-prem-sub { position: absolute; left: 116px; top: 57px; font-size: 19px; line-height: 24px; color: #c9d0dc; }
.s-prem-btn {
  position: absolute; left: 671px; top: 15px; width: 230px; height: 66px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(90deg, #ff7a00, #ffa01e); color: #1c0d05; font-size: 21px; font-weight: 700; letter-spacing: .5px;
}
.s-prem-btn svg { width: 24px; height: 24px; stroke-width: 2.8; }
.s-prem-active { position: absolute; right: 40px; top: 36px; font-size: 22px; color: #ffa53a; }

/* ----------------------------------------------------------- settings */
.st-head { position: relative; height: 131px; }
.st-brand { left: 63px; top: 11px; font-size: 53px; }
.st-tagline { left: 63px; top: 67px; letter-spacing: 3.1px; }
.st-version { position: absolute; right: 149px; top: 27px; text-align: right; font-family: "Roboto Mono", var(--mono); font-size: 15px; line-height: 23px; letter-spacing: 3px; color: #a3abbd; }
.st-version em { font-style: normal; color: #7d879c; }
.st-gear { left: 902px; top: 14px; width: 70px; height: 70px; }
.st-gear svg { width: 38px; height: 38px; }

.st-sec { display: flex; align-items: center; justify-content: space-between; margin: 0 53px 0 63px; height: 28px; }
.st-hint { font-family: "Roboto Mono", var(--mono); font-size: 15px; letter-spacing: 1.6px; color: #7d879c; white-space: nowrap; }
.st-hint em { font-style: normal; color: var(--o5); }
.st-modes + .st-sec { margin-top: 27px; }
.st-cams + .st-sec { margin-top: 26px; }
.st-res + .st-sec, .st-fmt + .st-sec { margin-top: 22px; }

.st-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 12px 53px 0 63px; height: 159px; }
.st-mode { position: relative; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.st-mode.sel {
  border: 3px solid var(--o5); background: linear-gradient(180deg, #1d1410, #16120f);
  box-shadow: 0 0 26px rgba(255, 106, 16, .35), inset 0 0 20px rgba(255, 106, 16, .08);
}
.st-mico { position: absolute; left: 25px; top: 39px; color: #e3e8f0; }
.st-mode.sel .st-mico { color: var(--o5); }
.st-mico svg { width: 50px; height: 50px; }
.st-mode b { position: absolute; left: 101px; top: 54px; font-size: 21px; line-height: 26px; font-weight: 500; white-space: nowrap; }
.st-msub { position: absolute; left: 101px; top: 87px; font-size: 17.5px; line-height: 24px; color: var(--muted5); white-space: nowrap; }
.st-radio { position: absolute; right: 21px; top: 19px; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #4a5368; }
.st-mode.sel .st-radio { border: 3px solid var(--o5); background: radial-gradient(circle, var(--o5) 0 7.5px, transparent 8.5px); }

.st-cams { display: grid; grid-template-columns: 444px 446px; gap: 18px; margin: 11px 53px 0 63px; height: 159px; }
.st-cam { position: relative; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.st-cam-ico { position: absolute; left: 25px; top: 15px; color: var(--o5); }
.st-cam-ico svg { width: 42px; height: 42px; }
.st-cam > b { position: absolute; left: 96px; top: 23px; font-size: 21px; line-height: 26px; font-weight: 500; }
.st-chips { position: absolute; left: 17px; right: 17px; top: 71px; height: 69px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.st-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border-radius: 14px; background: #161c2a; border: 2px solid #232b3c;
}
.st-chip b { font-size: 22px; line-height: 26px; font-weight: 500; color: #c9d0dc; }
.st-chip span { font-size: 18px; line-height: 22px; color: var(--muted5); }
.st-chip.active { border: 3px solid var(--o5); background: #2a1a12; }
.st-chip.active b { color: #fff; font-weight: 700; }
.st-chip.active span { color: #e3e8f0; }

.st-row { position: relative; margin: 11px 53px 0 63px; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.st-res { height: 86px; }
.st-fmt { height: 91px; }
.st-rico { position: absolute; left: 25px; top: 23px; color: var(--o5); }
.st-rico svg { width: 42px; height: 42px; }
.st-hd {
  width: 44px; height: 38px; border: 3px solid var(--o5); border-radius: 7px;
  display: grid; place-items: center; font-size: 17px; font-weight: 700; letter-spacing: .5px;
}
.st-row > b { position: absolute; left: 105px; top: 13px; font-size: 21px; line-height: 26px; font-weight: 500; }
.st-row > .st-rsub { position: absolute; left: 105px; top: 44px; }
.st-fmt > b { top: 15px; }
.st-fmt > .st-rsub { top: 46px; }
.st-rsub { font-size: 18px; line-height: 22px; color: #9aa3b5; white-space: nowrap; }
.st-seg {
  position: absolute; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px;
  border-radius: 14px; background: #1a2131; border: 1.5px solid #232b3c;
}
.st-res .st-seg { left: 548px; top: 15px; width: 296px; height: 51px; }
.st-fmt .st-seg { left: 632px; top: 17px; width: 206px; height: 53px; }
.st-seg button { text-align: center; border-radius: 12px; font-size: 21px; color: #9aa3b5; }
.st-seg button.active { background: linear-gradient(90deg, #ff6a10, #ff8a1c); color: #2a1206; font-weight: 500; }
.st-rchev { position: absolute; left: 864px; color: #9aa3b5; }
.st-res .st-rchev { top: 27px; }
.st-fmt .st-rchev { top: 29px; }
.st-rchev svg { width: 28px; height: 28px; stroke-width: 2; }

.st-toggles { position: relative; margin: 9px 53px 0 63px; padding: 3px 0; border-radius: 22px; background: var(--card5); border: 2px solid var(--line5); }
.st-tg { position: relative; height: 70px; border-bottom: 2px solid #1a2132; }
.st-tg:last-child { border-bottom: 0; }
.st-tico { position: absolute; left: 28px; top: 12px; color: var(--o5); }
.st-tico svg { width: 44px; height: 44px; }
.st-tg > b { position: absolute; left: 105px; top: 8px; font-size: 21px; line-height: 26px; font-weight: 500; }
.st-tg > .st-rsub { position: absolute; left: 105px; top: 37px; }
.st-switch {
  position: absolute; left: 812px; top: 14px; width: 64px; height: 38px; border-radius: 19px;
  background: #1d2333; border: 2px solid #2a3245; transition: background .18s;
}
.st-switch::after {
  content: ""; position: absolute; left: 1px; top: 1px; width: 32px; height: 32px; border-radius: 50%;
  background: #fff; transition: transform .18s var(--ease);
}
.st-switch.on { background: var(--o5); border-color: var(--o5); }
.st-switch.on::after { transform: translateX(26px); }

.st-prem {
  position: relative; margin: 26px 53px 0 63px; height: 94px; border-radius: 22px;
  border: 2px solid #5a2e12; background: linear-gradient(90deg, #24160d, #1a120e 60%, #1d130e);
}
.st-prem-ico { position: absolute; left: 31px; top: 23px; color: #ffb02e; }
.st-prem-ico svg { width: 48px; height: 48px; stroke-width: 2; }
.st-prem > b { position: absolute; left: 116px; top: 18px; font-size: 25px; line-height: 30px; font-weight: 500; color: #ffa53a; }
.st-prem > .st-rsub { position: absolute; left: 116px; top: 52px; }
.st-prem-btn {
  position: absolute; left: 659px; top: 16px; width: 229px; height: 58px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 36px;
  border: 3px solid var(--o5); color: var(--o5); font-size: 21px; font-weight: 500; letter-spacing: .5px; white-space: nowrap;
}
.st-prem-btn svg { width: 24px; height: 24px; stroke-width: 2.6; }
.st-prem-active { position: absolute; right: 40px; top: 30px; font-size: 22px; color: #ffa53a; }

/* phones: show the screen at the references' shape, no fake status bar */
@media (max-width: 560px), (max-height: 700px) {
  .stage { display: grid; place-items: center; min-height: 100dvh; padding: 0; background: #000; }
  .device { width: 100vw; height: min(100dvh, calc(100vw * 1476 / 1024)); aspect-ratio: auto; border-radius: 0; }
  .device-inner { border-radius: 0; }
}

/* saved-video row (settings) and photo capture flash (record view) */
.st-save { height: 86px; }
.st-save .st-seg { left: 500px; top: 15px; width: 380px; height: 51px; }
.st-cams + .st-sec { margin-top: 26px; }
.st-save + .st-sec { margin-top: 22px; }
.rec-preview.flash::after {
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: #fff; animation: photo-flash .35s ease-out forwards;
}
@keyframes photo-flash { from { opacity: .85; } to { opacity: 0; } }
#rec-photo[disabled] { opacity: .35; }

/* paused cameras are plain black, nothing of the feed shows through */
.tile.paused { background: #000; }
.tile.paused > video, .tile.paused > canvas { opacity: 0; }
.pip.paused video, .pip.paused canvas { opacity: 0; }
.main-controls { right: auto; top: auto; left: 10px; bottom: 10px; }
.pip-ctl.on { color: var(--orange-light); border-color: rgba(255, 102, 0, .55); }

/* -------------------------------------------------- mobile APK install prompt */
.apk-dialog {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.apk-tile {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(255, 102, 0, .28);
}
.apk-tile .logo-mark {
  width: 100%;
  height: 100%;
  display: block;
}
.apk-body {
  margin: 4px 0 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.apk-dl {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.apk-dl svg {
  width: 18px;
  height: 18px;
}

/* -------------------------------------------------- pro UX additions */
.pip.circle {
  border-radius: 50%;
}
.pip.circle .pip-controls {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
}
.rec-timer-chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  width: auto;
  padding: 0 10px;
  border-radius: 20px;
}
.rec-timer-chip.on {
  color: var(--orange-light);
  border-color: var(--orange);
}
#rec-audio.muted {
  color: #ff453a;
  border-color: rgba(255, 69, 58, .6);
}
.rec-countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 84px;
  font-weight: 900;
  pointer-events: none;
}
.rec-countdown-overlay[hidden] { display: none; }
.rec-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--orange);
  background: var(--surface2);
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
}
.rec-thumb[hidden] { display: none; }
.rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.h-empty {
  margin-top: 18px;
  padding: 28px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.h-empty b { color: #fff; font-size: 24px; font-weight: 600; }
.h-empty span { color: #8f99ad; font-size: 19px; line-height: 1.4; }
.g-searchbar {
  margin: 0 50px 18px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-radius: 20px;
  background: #121826;
  border: 2px solid #ff6a10;
}
.g-searchbar svg { width: 28px; height: 28px; color: #ff6a10; flex: 0 0 auto; }
.g-searchbar input {
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-size: 20px;
  font-family: var(--font);
}
.g-searchbar button {
  background: transparent;
  border: 0;
  color: #ff6a10;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.g-fav {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #9aa3b5;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.g-fav svg { width: 28px; height: 28px; }
.g-fav.on { color: #ff6a10; }
.g-fav.on svg { fill: #ff6a10; }
.g-empty-cta {
  margin-top: 16px;
  padding: 18px 40px;
  border-radius: 24px;
  border: 0;
  background: linear-gradient(90deg, #ff5a0a, #ff9a1c);
  color: #1c0d05;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
}
.clip-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.clip-fav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}
.clip-fav-btn svg { width: 17px; height: 17px; }
.clip-fav-btn.on { color: var(--orange); border-color: var(--orange); }
.clip-fav-btn.on svg { fill: var(--orange); }
.st-timer { height: 86px; }
.st-timer .st-seg { left: 560px; top: 15px; width: 320px; height: 51px; }
.st-timer + .st-sec { margin-top: 22px; }
.v5-settings { padding-bottom: 36px; }
.v5 .st-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 28px auto 0;
  padding: 12px 0;
  text-align: center;
}
.v5 .st-footer-ver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Roboto Mono", var(--mono);
  font-size: 16px;
  letter-spacing: 1.4px;
  color: #7d879c;
}
.v5 .st-footer-link {
  color: var(--o5);
  text-decoration: none;
  font-weight: 500;
}
.v5 .st-footer-link:hover {
  text-decoration: underline;
}
.v5 .st-footer-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  font-family: "Roboto Mono", var(--mono);
  font-size: 16px;
  letter-spacing: 0.8px;
  color: #9aa3b5;
  cursor: pointer;
}
.v5 .st-footer-mail svg {
  width: 22px;
  height: 22px;
  color: var(--o5);
  flex: 0 0 auto;
}
.v5 .st-footer-mail:hover {
  background: rgba(255, 106, 16, .12);
  color: #fff;
}
.g-grid { margin-top: 22px; }
.g-card { position: relative; cursor: pointer; }
.s-range { display: inline-flex; align-items: center; justify-content: center; gap: 14px; }
