/* SpeedUI Studio — control room shell themed to match lauvee.art (187 shared themes). */

:root {
  --bg: #eeebe2;
  --main: #080909;
  --sub: #5c584a;
  --sub-alt: #d3cfc1;
  --sub-alt-2: #c5c1b3;
  --text: #080909;
  --error: #c87e74;

  --bg-raise: #d3cfc1;
  --pop: #d3cfc1;
  --face: #080909;
  --muted: #5c584a;
  --dim: #545044;
  --faint: #757061;
  --faint-raise: #656051;
  --accent: #080909;
  --accent-ink: #eeebe2;
  --accent-bg: #080909;
  --accent-raise: #080909;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --line-2: color-mix(in srgb, var(--text) 18%, transparent);
  --line-raise: color-mix(in srgb, var(--face) 12%, transparent);
  --line-raise-2: color-mix(in srgb, var(--face) 20%, transparent);
  --hover: color-mix(in srgb, var(--text) 7%, transparent);
  --hover-raise: color-mix(in srgb, var(--face) 7%, transparent);
  --track: color-mix(in srgb, var(--face) 16%, transparent);
  --dot: color-mix(in srgb, var(--text) 9%, transparent);
  --mon-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 28px 68px -26px rgba(0, 0, 0, 0.36);
  --pop-shadow: 0 22px 54px -14px rgba(0, 0, 0, 0.24);
  --ok: #3ecf6e;
  --info: #4b96ff;

  --display: 'Lexend Deca', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

/* Flag emojis for systems without them (Windows). Only downloaded when a flag is shown. */
@font-face {
  font-family: 'Twemoji Country Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url('/fonts/TwemojiCountryFlags.woff2') format('woff2');
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: auto; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  font: 400 12.5px/1.4 var(--sans);
  transition: background-color 0.25s, color 0.25s;
  -webkit-font-smoothing: antialiased;
}
.studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 54px minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 520px;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-bg); outline-offset: 2px; border-radius: 7px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ bar */
.bar {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  min-width: 0;
  transition: background-color 0.25s, border-color 0.25s;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  white-space: nowrap;
  color: var(--text);
}
.brand b {
  color: var(--accent-bg);
  font-weight: 400;
}
.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-home {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--muted);
  transition: color 0.15s;
}
.brand-home i {
  font-style: normal;
  display: inline-block;
  transition: transform 0.15s var(--ease), color 0.15s;
}
.brand:hover .brand-home {
  color: var(--text);
}
.brand:hover .brand-home i {
  transform: translateX(-2px);
  color: var(--accent-bg);
}
/* The mark is a live gauge: it fills with the current download. */
.brand-mark {
  --p: 0.72;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--accent-bg) calc(var(--p) * 360deg), color-mix(in srgb, var(--text) 16%, transparent) 0);
  -webkit-mask: radial-gradient(circle, transparent 4.4px, #000 4.8px);
  mask: radial-gradient(circle, transparent 4.4px, #000 4.8px);
}

.plat {
  position: relative;
  display: flex;
  align-self: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.plat::-webkit-scrollbar { display: none; }
.plat button {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.15s;
}
.plat button:hover { color: var(--text); }
.plat button.on { color: var(--text); font-weight: 500; }
.plat-ink {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2.5px;
  background: var(--accent-bg);
  border-radius: 3px 3px 0 0;
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), background-color 0.25s;
}
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.flag { font-family: 'Twemoji Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 17px; line-height: 1; }
.online-wrap, .tools-wrap { position: relative; display: flex; }
.tools-btn[aria-expanded='true'] { color: var(--face); background: var(--bg-raise); }
.tools-badge {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; font-size: 10.5px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent-bg) 16%, var(--bg-raise)); color: var(--accent-bg);
}
.tools-pop {
  position: absolute; z-index: 36; top: calc(100% + 8px); right: 0; width: 340px;
  padding: 10px; border-radius: 15px; background: var(--pop); color: var(--face);
  border: 1px solid var(--line-raise); box-shadow: var(--pop-shadow);
  animation: tm-in 0.18s var(--ease);
}
.tools-pop::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.tools-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px 8px; font-size: 11px; color: var(--faint-raise); text-transform: uppercase; letter-spacing: 0.08em;
}
.tools-pop-head a { color: var(--accent-raise); text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 12px; }
.tools-pop-head a:hover { text-decoration: underline; }
.tools-pop-list { display: flex; flex-direction: column; gap: 4px; }
.tp-item {
  display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px;
  padding: 8px; border-radius: 11px; text-decoration: none; color: var(--face);
  transition: background-color 0.15s;
}
.tp-item:hover { background: var(--bg); color: var(--text); }
.tp-item.is-here { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.tp-art {
  width: 42px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--bg); color: var(--text); overflow: hidden;
}
.tp-item:hover .tp-art { background: var(--bg-raise); }
.tp-art svg { width: 36px; height: 30px; transition: transform 0.25s var(--ease); }
.tp-item:hover .tp-art svg { transform: rotate(-4deg) scale(1.06); }
.tp-soon {
  margin-top: 2px; border: 1.5px dashed color-mix(in srgb, var(--dim) 45%, transparent);
  background: transparent; cursor: default;
}
.tp-soon:hover { background: transparent; color: var(--face); }
.tp-soon .tp-title { color: var(--dim); font-weight: 400; }
.tp-art-soon { background: transparent !important; color: var(--dim); font-size: 18px; }
.tp-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tp-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: inherit; }
.tp-sub { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-item:hover .tp-sub { color: var(--muted); }
.tp-tag, .tp-here {
  font-style: normal; font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 5px; line-height: 1.3;
}
.tp-tag { background: var(--accent); color: var(--accent-ink); }
.tp-here { background: color-mix(in srgb, var(--face) 12%, transparent); color: var(--dim); }
.tp-arrow { font-size: 13px; color: var(--dim); padding-right: 4px; transition: color 0.15s, transform 0.15s var(--ease); }
.tp-item:hover .tp-arrow { color: var(--accent-bg); transform: translateX(2px); }
.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.online-chip:hover, .online-chip[aria-expanded='true'] { color: var(--face); background: var(--bg-raise); }
.online-chip b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; transition: color 0.15s; }
.online-chip:hover b, .online-chip[aria-expanded='true'] b { color: var(--face); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.online-pop {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: 8px;
  border-radius: 14px;
  background: var(--pop);
  color: var(--face);
  border: 1px solid var(--line-raise);
  box-shadow: var(--pop-shadow);
  animation: tm-in 0.18s var(--ease);
}
.online-pop::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.online-pop-head { display: flex; justify-content: space-between; padding: 6px 8px 6px; font-size: 11px; color: var(--faint-raise); text-transform: uppercase; letter-spacing: 0.08em; }
.online-pop-head b { color: var(--face); font-weight: 500; }
.online-sub-head { padding: 8px 8px 4px; font-size: 10px; color: var(--faint-raise); text-transform: uppercase; letter-spacing: 0.08em; border-top: 1px solid var(--line-raise); margin-top: 4px; }
.online-pages .online-sub-head:first-child { margin-top: 0; padding-top: 6px; }
.op-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 12px; text-decoration: none; color: var(--face); }
.op-row:hover { background: var(--bg); color: var(--text); }
.op-row.is-zero { opacity: 0.55; }
.op-name i { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--face) 12%, transparent); color: var(--dim); margin-left: 4px; }
.op-flags { display: inline-flex; gap: 3px; }
.op-flags .flag { font-size: 14px; }
.op-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.online-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.online-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; color: var(--face); }
.online-list li:hover { background: var(--bg); color: var(--text); }
.online-list .c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-list b { font-weight: 500; font-variant-numeric: tabular-nums; }
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--dim);
  background: var(--bg-raise);
  transition: color 0.15s, background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-text:hover { color: var(--face); background: var(--sub-alt-2); }
.btn-text:active { transform: scale(0.97); }
.btn-nav,
.btn-theme {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.btn-nav:hover,
.btn-theme:hover { color: var(--face); background: var(--bg-raise); }
.btn-theme span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.btn-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
  transition: color 0.15s, background-color 0.15s;
}
.btn-icon:hover { color: var(--face); background: var(--bg-raise); }

/* ---------------------------------------------------------------- stage */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 20px 32px 16px;
  min-height: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  transition: background-color 0.25s;
}
.monitor-wrap { display: flex; flex-direction: column; gap: 10px; }
.monitor-cap, .readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font: 400 12px var(--mono);
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}
.monitor-cap b { color: var(--text); font-weight: 500; font-family: var(--display); font-size: 14px; }
.monitor-cap i { font-style: normal; color: var(--faint); margin-left: 10px; }
.monitor-cap i::before { content: '/'; margin-right: 10px; color: var(--line-2); }
.cap-dim { color: var(--faint); }

.monitor {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  box-shadow: var(--mon-shadow);
  transition: box-shadow 0.25s;
}
.monitor-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
.screens {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  transition: transform 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}
.screens.still { transition: none; }
.slot { position: absolute; inset: 0; display: none; }
.slot.on { display: block; }
/* Focus spotlight: everything outside the framed readouts sinks back. */
.spot {
  position: absolute;
  z-index: 50;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.55);
  transition: opacity 0.6s ease, left 0.9s cubic-bezier(0.25, 0.8, 0.25, 1), top 0.9s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.9s cubic-bezier(0.25, 0.8, 0.25, 1), height 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.spot.on { opacity: 1; }
.screens.still .spot { transition: opacity 0.6s ease; }
.tick { position: absolute; width: 12px; height: 12px; border: 0 solid var(--faint); pointer-events: none; opacity: 0.7; }
.tick.tl { left: -9px; top: -9px; border-left-width: 1.5px; border-top-width: 1.5px; }
.tick.tr { right: -9px; top: -9px; border-right-width: 1.5px; border-top-width: 1.5px; }
.tick.bl { left: -9px; bottom: -9px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.tick.br { right: -9px; bottom: -9px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

.readout { justify-content: flex-start; gap: 22px; overflow: hidden; }
.readout em { font-style: normal; color: var(--faint); margin-right: 7px; }
.readout b { color: var(--text); font-weight: 500; }
.readout small { font-size: 12px; color: var(--muted); margin-left: 5px; }
.readout small:empty { display: none; }
body[data-platform='youtube'] .timeline { opacity: 0.28; pointer-events: none; }
.ro-grow { flex: 1; }
.ro-state { display: inline-flex; align-items: center; gap: 8px; min-width: 112px; }
.ro-state b { font-family: var(--display); font-weight: 400; font-size: 13px; }
#roDot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
#roDot.downloading { background: var(--accent-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bg) 24%, transparent); animation: pulse 1.6s ease-in-out infinite; }
#roDot.preparing { background: var(--muted); animation: pulse 0.8s ease-in-out infinite; }
#roDot.finalizing { background: var(--info); animation: pulse 1.2s ease-in-out infinite; }
#roDot.done { background: var(--ok); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ----------------------------------------------------------------- dock */
.dock {
  position: relative;
  z-index: 2;
  background: var(--bg-raise);
  color: var(--face);
  padding: 10px 22px 14px;
  transition: background-color 0.25s, color 0.25s;
}
.timeline {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.tl-time { font: 400 12px var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.tl-time.right { text-align: right; }
.tl-track { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.tl-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: var(--bg);
}
.tl-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: var(--accent-bg);
}
.tl-head {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--bg-raise);
  box-shadow: 0 0 0 3px transparent;
  transform: scale(0.85);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tl-track:hover .tl-head, .tl-track.drag .tl-head, .tl-track:focus-visible .tl-head {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-bg) 28%, transparent);
}

.controls { display: flex; align-items: stretch; min-width: 0; }
.group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 18px;
  border-left: 1px solid var(--line-raise);
  min-width: 0;
}
.group:first-child { border-left: 0; padding-left: 0; }
.g-label { display: block; font-size: 10.5px; color: var(--faint-raise); line-height: 1.25; }

.btn-round {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
  background: var(--bg);
  transition: background-color 0.15s, color 0.15s, transform 0.1s, filter 0.15s;
}
.btn-round:hover { color: var(--text); }
.btn-round:active { transform: scale(0.95); }
.btn-round.primary {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-round.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn-round .i-play, .btn-round.is-paused .i-pause { display: none; }
.btn-round.is-paused .i-play { display: block; }

.speed { display: grid; grid-template-columns: auto 220px; grid-template-rows: auto auto; column-gap: 14px; row-gap: 3px; }
.speed .g-label { grid-column: 1; }
.speed-row { grid-column: 1; display: flex; align-items: center; gap: 6px; }
.speed-input {
  width: 7.5ch;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: 500 18px/1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: box-shadow 0.15s, background-color 0.15s;
}
.speed-input:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.speed-input:focus { box-shadow: 0 0 0 2px var(--accent-bg); }
.unit {
  height: 32px;
  font: 400 11.5px var(--mono);
  color: var(--muted);
  padding: 0 8px;
  border-radius: 9px;
  background: var(--bg);
  transition: color 0.15s, background-color 0.15s;
}
.unit:hover { color: var(--text); }

.ruler {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  height: 40px;
  cursor: ew-resize;
  touch-action: none;
  margin: 0 8px;
}
.ruler::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  height: 1.5px;
  background: var(--line-raise-2);
}
.ruler-ticks i {
  position: absolute;
  bottom: 10px;
  width: 1px;
  height: 5px;
  background: color-mix(in srgb, var(--face) 22%, transparent);
}
.ruler-ticks i.mid { height: 8px; }
.ruler-ticks i.major { height: 12px; background: color-mix(in srgb, var(--face) 48%, transparent); }
.ruler-ticks b {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font: 400 9.5px var(--mono);
  color: var(--faint-raise);
}
.ruler-needle {
  position: absolute;
  bottom: 3px;
  width: 2px;
  height: 26px;
  margin-left: -1px;
  background: var(--accent-raise);
  border-radius: 1px;
  transition: left 0.12s var(--ease);
}
.ruler.drag .ruler-needle { transition: none; }
.ruler-needle::after {
  content: '';
  position: absolute;
  left: -3.5px;
  bottom: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-raise);
}

.pick {
  gap: 11px;
  text-align: left;
  border-radius: 10px;
  transition: background-color 0.15s;
  max-width: 280px;
}
.pick:hover .pick-txt b { color: var(--accent-raise); }
.pick img { width: 30px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg); }
.pick-txt { display: flex; flex-direction: column; min-width: 0; }
.pick-txt b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--face); transition: color 0.15s; }
.pick-txt em { font: 400 11px var(--mono); color: var(--dim); font-style: normal; white-space: nowrap; }
.chev { color: var(--faint-raise); transform: rotate(180deg); transition: transform 0.2s var(--ease), color 0.15s; flex: none; }
.pick.open .chev { transform: rotate(0); color: var(--accent-raise); }

.net-glyph { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.net-glyph i { width: 3px; border-radius: 1.5px; background: var(--face); }
.net-glyph i:nth-child(1) { height: 4px; }
.net-glyph i:nth-child(2) { height: 7px; }
.net-glyph i:nth-child(3) { height: 10px; }
.net-glyph i:nth-child(4) { height: 14px; }
.net-glyph[data-bars='1'] i:nth-child(n + 2),
.net-glyph[data-bars='2'] i:nth-child(n + 3),
.net-glyph[data-bars='3'] i:nth-child(n + 4) { opacity: 0.22; }
#btnNet .net-glyph { width: 30px; justify-content: center; }

.yt-only { display: none; }
.yt-only.show { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
.select {
  background: var(--bg);
  color: var(--text);
  border: 0;
  border-radius: 8px;
  padding: 5px 8px;
  font: 400 12px var(--mono);
}
.select option { background: var(--bg); color: var(--text); }

.view { margin-left: auto; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.warp { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding-right: 0; }
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: var(--bg);
}
.seg button {
  padding: 5px 10px;
  border-radius: 7px;
  font: 400 11.5px var(--mono);
  color: var(--muted);
  transition: color 0.15s, background-color 0.15s, transform 0.1s;
}
.seg button:hover { color: var(--text); }
.seg button:active { transform: scale(0.96); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.seg button.on:hover { color: var(--accent-ink); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; }

/* -------------------------------------------------------------- popovers */
.pop {
  position: fixed;
  z-index: 20;
  width: 440px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 14px;
  background: var(--pop);
  color: var(--face);
  border: 1px solid var(--line-raise);
  border-radius: 16px;
  box-shadow: var(--pop-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s, transform 0.2s var(--ease), visibility 0s 0.2s;
}
.pop.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.16s, transform 0.2s var(--ease); }
#popNet { width: 360px; }
.pop-h { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint-raise); margin: 2px 2px 8px; }
.pop-h:not(:first-child) { margin-top: 16px; }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 340px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 10px;
  text-align: left;
  min-width: 0;
  transition: background-color 0.15s;
}
.game:hover { background: var(--bg); }
.game:hover b { color: var(--text); }
.game:hover em { color: var(--muted); }
.game.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-raise); }
.game.on:hover em { color: var(--accent-bg); }
.game img { width: 34px; height: 46px; object-fit: cover; border-radius: 6px; flex: none; background: var(--bg); }
.game span { display: flex; flex-direction: column; min-width: 0; }
.game b { font-weight: 500; font-size: 12px; line-height: 1.25; color: var(--face); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.game em { font: 400 11px var(--mono); color: var(--dim); font-style: normal; margin-top: 2px; }
.game.on em { color: var(--accent-raise); font-weight: 500; }

.custom { display: grid; grid-template-columns: 1fr 72px auto; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-raise); }
.pop-tabs { margin-bottom: 12px; }
.pop-pane { display: block; }
.opt-tag { text-transform: none; letter-spacing: 0; opacity: 0.72; margin-left: 4px; }
.size-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 12px; }
.size-presets button {
  height: 31px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: 400 11.5px var(--mono);
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.size-presets button:hover { color: var(--text); }
.size-presets button:active { transform: scale(0.96); }
.size-presets button.on { background: var(--accent); color: var(--accent-ink); font-weight: 500; }

.custom-panel { display: flex; flex-direction: column; }
.custom-size-row { display: flex; align-items: center; gap: 8px; }
.custom-size-row input, .custom-name {
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 0;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.15s;
}
.custom-size-row input {
  flex: 1;
  min-width: 0;
  font: 500 16px var(--display);
  font-variant-numeric: tabular-nums;
}
.custom-name { width: 100%; font-size: 12px; }
.custom-size-row input::placeholder, .custom-name::placeholder { color: var(--faint); }
.custom-size-row input:focus, .custom-name:focus { box-shadow: 0 0 0 2px var(--accent-bg); }
.custom-est {
  margin-top: 12px;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
  font: 400 11.5px var(--mono);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.custom-est b { color: var(--accent-bg); font-weight: 500; }
.custom-go {
  margin-top: 10px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 12.5px;
  transition: filter 0.15s, transform 0.1s;
}
.custom-go:hover { filter: brightness(1.08); }
.custom-go:active { transform: scale(0.98); }

.recent-wrap { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-raise); }
.recent-list { display: flex; flex-wrap: wrap; gap: 5px; }
.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 9px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  max-width: 100%;
  transition: background-color 0.15s;
}
.recent-chip.on { box-shadow: inset 0 0 0 1.5px var(--accent-bg); }
.recent-chip em { font-style: normal; color: var(--muted); }
.recent-chip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.recent-del { color: var(--faint); font-size: 11px; padding: 0 2px; line-height: 1; }
.recent-del:hover { color: var(--text); }

.opt-list { display: flex; flex-direction: column; gap: 3px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-align: left; transition: background-color 0.15s; }
.opt:hover { background: var(--bg); }
.opt:hover b { color: var(--text); }
.opt:hover em { color: var(--muted); }
.opt:hover .net-glyph i { background: var(--text); }
.opt.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-raise); }
.opt.on .net-glyph i { background: var(--accent-raise); }
.opt.on:hover .net-glyph i { background: var(--accent-bg); }
.opt span:last-child { display: flex; flex-direction: column; }
.opt b { font-weight: 500; color: var(--face); }
.opt em, .pop-row em { font-style: normal; font-size: 11px; color: var(--dim); }
.pop-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-raise); }
.pop-row > span:first-child { display: flex; flex-direction: column; color: var(--face); }
.mini { display: flex; align-items: center; gap: 8px; }
.mini b { font: 400 12px var(--mono); width: 3ch; text-align: right; color: var(--face); }
.mini input { width: 110px; accent-color: var(--accent-raise); }
.toggle { cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; width: 36px; height: 22px; border-radius: 11px; background: var(--bg); flex: none; transition: background-color 0.2s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 0.2s var(--ease), background-color 0.2s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(14px); background: var(--accent-ink); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent-raise); outline-offset: 2px; }

/* ----------------------------------------------------------- time table */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0s 0.2s;
}
.sheet.open { opacity: 1; visibility: visible; transition: opacity 0.2s; }
.sheet-card {
  width: min(640px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 22px 24px 18px;
  background: var(--bg);
  color: var(--text);
  border-radius: 18px;
  box-shadow: var(--pop-shadow);
  transform: translateY(8px);
  transition: transform 0.25s var(--ease);
}
.sheet.open .sheet-card { transform: none; }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-h h1, .sheet-h h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 400; letter-spacing: -0.02em; }
.sheet-h p { margin: 4px 0 0; color: var(--muted); font: 400 12px var(--mono); }
.about-sec {
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.about-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}
.about-head { margin-bottom: 18px; }
.about-head h1 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: -0.02em; color: var(--text); }
.about-head p { margin: 6px 0 0; color: var(--muted); font: 400 12.5px var(--mono); }
.about-h2 { margin: 28px 0 10px; font-family: var(--display); font-size: 16px; font-weight: 500; letter-spacing: -0.015em; color: var(--text); }
.about-table-wrap { overflow-x: auto; margin: 10px 0 18px; }
.about-list { margin: 0 0 18px; padding-left: 18px; color: var(--muted); }
.about-list li { margin: 6px 0; }
.info-body { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.info-body p { margin: 0 0 12px; }
.info-body b { color: var(--text); font-weight: 500; }
.info-body a { color: var(--accent-bg); text-decoration: underline; text-underline-offset: 3px; }
.info-ref { margin: 8px 0 14px; }
.info-ref caption { text-align: left; padding-bottom: 6px; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.info-body details { border-top: 1px solid var(--line); }
.info-body summary {
  cursor: pointer; padding: 11px 0; color: var(--text); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500;
}
.info-body summary::-webkit-details-marker { display: none; }
.info-body summary::after { content: '+'; color: var(--faint); font-weight: 400; transition: transform 0.2s var(--ease); }
.info-body details[open] summary::after { transform: rotate(45deg); }
.info-body details p { margin: 0 0 12px; }
.info-body a.more-tool {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 16px;
  margin: 22px 0 8px; padding: 16px 20px; border-radius: 16px;
  background: var(--bg-raise); color: var(--face); text-decoration: none;
  border: 1px solid var(--line-raise);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.info-body a.more-tool:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-raise) 45%, transparent);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.35);
}
.more-art {
  width: 76px; height: 64px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg);
}
.more-art svg { width: 64px; transition: transform 0.3s var(--ease); }
.more-tool:hover .more-art svg { transform: rotate(-4deg) scale(1.06); }
.more-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.more-eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint-raise); }
.more-title { display: flex; align-items: center; gap: 7px; font-size: 15.5px; font-weight: 500; color: var(--face); font-family: var(--display); }
.more-desc { font-size: 12px; line-height: 1.5; color: var(--dim); }
.more-go {
  padding: 8px 14px; border-radius: 10px; background: var(--bg); color: var(--muted);
  font-size: 12.5px; white-space: nowrap; transition: background-color 0.15s, color 0.15s;
}
.more-tool:hover .more-go { background: var(--accent); color: var(--accent-ink); }
.info-legal { margin: 14px 0 0 !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.tt { width: 100%; border-collapse: collapse; font: 400 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.tt th { text-align: left; font: 400 11px var(--sans); color: var(--faint); padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.tt td { padding: 9px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.tt td:first-child { color: var(--text); }
.tt td:last-child { color: var(--text); }
.tt tbody tr { transition: background-color 0.12s; }
#ttBody tr { cursor: pointer; }
#ttBody tr:hover { background: var(--bg-raise); }
#ttBody tr:hover td { color: var(--dim); }
#ttBody tr:hover td:first-child, #ttBody tr:hover td:last-child { color: var(--face); }
#ttBody tr.on td { color: var(--accent-bg); font-weight: 500; }
#ttBody tr.on:hover td { color: var(--accent-raise); }
#ttBody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--accent-bg); }
.sheet-foot { margin: 14px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.5; }

.hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  padding: 9px 16px;
  border-radius: 99px;
  background: var(--pop);
  border: 1px solid var(--line-raise);
  color: var(--face);
  box-shadow: var(--pop-shadow);
  font-size: 12px;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.hint.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; }
kbd { font: 500 11px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--bg); color: var(--text); }

/* ------------------------------------------- instant themed tooltips */
.tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  max-width: 260px;
  pointer-events: none;
  padding: 7px 10px;
  border-radius: 9px;
  font: 400 12px/1.4 var(--sans);
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
  animation: tip-in 0.12s var(--ease);
}
.tip::after {
  content: '';
  position: absolute;
  left: var(--ax, 50%);
  bottom: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}
.tip.below::after { bottom: auto; top: -5px; }
@keyframes tip-in { from { opacity: 0; } }

/* ------------------------------------------- shared lauvee theme modal */
.theme-modal {
  width: min(960px, calc(100% - 32px));
  max-height: min(86vh, 880px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.theme-modal[open] { display: flex; flex-direction: column; animation: tm-in 0.25s var(--ease); }
.theme-modal::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px); }
@keyframes tm-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.tm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px; border-bottom: 1px solid var(--bg-raise); }
.tm-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-raise);
  color: var(--dim);
}
.tm-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--face); font: inherit; outline: none; }
.tm-search input::placeholder { color: var(--dim); }
.tm-filter { background: var(--bg-raise); }
.tm-filter button { color: var(--dim); }
.tm-filter button:hover { color: var(--face); }
.tm-rand { height: 34px; }
.tm-count { font-size: 12px; color: var(--muted); }
.tm-x { margin-left: auto; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 16px; overflow-y: auto; }
.tm-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--tbg);
  color: var(--tmain);
  transition: transform 0.12s var(--ease), box-shadow 0.12s;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.18);
}
.tm-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-item:hover { transform: translateY(-2px); }
.tm-item .dots { position: absolute; right: 10px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.15s; }
.tm-item .dots i { width: 7px; height: 7px; border-radius: 50%; }
.tm-item:hover .dots, .tm-item.on .dots { opacity: 1; }
.tm-item.on { box-shadow: 0 0 0 3px var(--text); }
.tm-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px; }

/* ------------------------------------------------------- recording mode */
body.clean { background: #000; overflow: hidden; }
body.clean .studio-shell { grid-template-rows: minmax(0, 1fr); height: 100dvh; min-height: 0; }
body.clean .bar, body.clean .dock, body.clean .monitor-cap, body.clean .readout, body.clean .tick, body.clean .about-sec { display: none; }
body.clean .stage { padding: 0; background: #000; place-items: center; }
body.clean .monitor { border-radius: 0; box-shadow: none; }

/* ---------------------------------------------------------------- small */
@media (max-width: 1360px) {
  .bar { gap: 12px; padding: 0 16px; }
  .plat button { padding: 0 8px; }
  .speed { grid-template-columns: auto 130px; column-gap: 10px; }
  .pick { max-width: 160px; }
  .group { padding: 2px 10px; gap: 8px; }
  .seg button { padding: 5px 8px; }
}
@media (max-width: 1140px) {
  .btn-theme span, .online-chip .hide-sm { display: none; }
}
@media (max-width: 1180px) {
  .controls { flex-wrap: wrap; row-gap: 10px; }
  .transport { padding-left: 0; flex: none; }
  .speed { flex: 1 1 calc(100% - 130px); grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
  .ruler { margin: 0 4px; }
  .pick { flex: 1 1 40%; max-width: none; padding-left: 0; border-left: 0; }
  #btnNet { border-left: 1px solid var(--line-raise); padding-left: 12px; }
  .view, .warp { margin-left: 0; flex-direction: row; align-items: center; gap: 10px; padding: 2px 0; border-left: 0; }
  .view { flex: 1 1 auto; }
  .yt-only.show { flex-basis: 100%; flex-direction: row; align-items: center; gap: 10px; padding-left: 0; border-left: 0; }
}
@media (max-width: 1080px) {
  .studio-shell { grid-template-rows: auto minmax(0, 1fr) auto; }
  .bar { flex-wrap: wrap; gap: 0 8px; padding: 8px 16px 0; }
  .brand { height: 36px; font-size: 17.5px; }
  .brand-home { font-size: 10.5px; }
  .bar-end { height: 34px; gap: 4px; }
  #btnTable { width: 32px; padding: 0; justify-content: center; background: none; color: var(--muted); }
  #btnTable:hover { background: var(--bg-raise); color: var(--face); }
  #btnTable .btn-label { display: none; }
  .plat { order: 3; flex-basis: 100%; height: 40px; margin: 0 -16px; padding: 0 10px; }
  .stage { padding: 18px 16px 14px; place-items: start center; }
  .readout { gap: 14px; flex-wrap: wrap; row-gap: 2px; }
  .readout span:nth-child(4), .ro-grow { display: none; }
  .monitor-cap .cap-dim { display: none; }
  .dock { padding: 10px 16px 14px; }
  .timeline { grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 10px; }
  .group { padding: 2px 10px; }
  .view, .warp { padding: 2px 0; }
}
@media (max-width: 640px) {
  .bar { padding: 8px 12px 0; }
  .bar-end { gap: 2px; }
  .btn-nav { padding: 0 7px; }
  .btn-nav .hide-xs { display: none; }
  .online-chip { padding: 0 7px; gap: 5px; }
  .online-pop, .tools-pop { position: fixed; top: 50px; right: 12px; left: auto; max-width: calc(100vw - 24px); }
  .info-body a.more-tool { grid-template-columns: 60px 1fr; padding: 14px; gap: 12px; }
  .more-art { width: 60px; height: 54px; }
  .more-art svg { width: 52px; }
  .more-go { grid-column: 2; justify-self: start; padding: 6px 12px; font-size: 12px; }
  .about-inner { padding: 28px 16px 44px; }
}
@media (max-width: 420px) {
  .brand { font-size: 16.5px; gap: 7px; }
  .brand-home { font-size: 10px; }
  .btn-icon, .btn-text { width: 30px; height: 30px; }
  .btn-nav, .btn-theme { padding: 0 6px; height: 30px; }
  .speed { grid-template-columns: auto minmax(80px, 1fr); column-gap: 8px; }
  .speed-input { width: 6.2ch; font-size: 16px; padding: 0 7px; }
  .unit { padding: 0 6px; font-size: 11px; }
  .seg button { padding: 5px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
