:root {
  color-scheme: dark;
  --bg: #181c20;
  --panel: #25292e;
  --line: #3a4149;
  --text: #edf0f3;
  --muted: #a1a8b2;
  --pink: #ed72ad;
  --purple: #be94ed;
  --accent: #e65899;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
}
button,
a {
  transition:
    background 0.18s,
    transform 0.18s,
    color 0.18s;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:hover:not(:disabled) {
  filter: brightness(1.1);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -1.2px;
  line-height: 1.25;
  margin-bottom: 12px;
  font-weight: 600;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
h3 {
  font-weight: 500;
}
p {
  color: var(--muted);
}
a {
  color: var(--pink);
  text-decoration: none;
}
.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1.4px;
  white-space: nowrap;
}
.logo {
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 0;
  font-size: 25px;
  margin-right: 10px;
}
.muted {
  color: var(--muted);
  font-weight: 400;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 600;
  color: #89929d;
  margin-bottom: 14px;
}
.pink {
  color: var(--pink);
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 235px;
  background: #202429;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
}
aside > .eyebrow {
  margin-top: 40px;
  font-size: 9px;
}
nav {
  display: grid;
  gap: 8px;
}
.nav {
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  border-radius: 8px;
  padding: 13px;
  font-size: 17px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav span {
  font-size: 13px;
}
.nav.active {
  background: #39303b;
  color: #ffabd0;
}
.sidebar-bottom {
  margin-top: auto;
  color: var(--muted);
  font-size: 11px;
}
.sidebar-bottom small {
  display: block;
  margin-top: 20px;
  color: #69727f;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80c5a9;
  margin-right: 6px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
  display: block;
  margin-top: 12px;
}
main {
  margin-left: 235px;
  padding: 0 42px;
  max-width: 1600px;
}
header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 40px;
}
.badge {
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 9px;
  letter-spacing: 1px;
}
.intro {
  font-size: 15px;
  margin-bottom: 32px;
}
.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 27px;
  margin-bottom: 24px;
}
.card-heading {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}
.card-heading p {
  font-size: 12px;
  margin: 0;
}
.number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  border: 1px solid #685064;
  color: var(--pink);
  font-size: 12px;
  flex-shrink: 0;
}
label {
  display: block;
  font-size: 12px;
  color: #cad0d6;
  margin-bottom: 18px;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  border: 1px solid #48515b;
  background: #1b1f24;
  color: var(--text);
  padding: 11px 13px;
  border-radius: 8px;
  margin-top: 7px;
  min-width: 0;
}
input::placeholder {
  color: #757f8c;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hint {
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
.input-action {
  display: flex;
  gap: 8px;
}
.input-action button {
  margin-top: 7px;
  background: #303740;
  border: 1px solid #48515b;
  border-radius: 8px;
  color: var(--text);
  width: 44px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 22px 0 12px;
}
.switch-row strong {
  display: block;
  font-size: 13px;
}
.switch-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
input[type="checkbox"] {
  appearance: none;
  width: 38px;
  height: 22px;
  background: #4e5560;
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}
input[type="checkbox"]:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #e5e8ec;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
input[type="checkbox"]:checked {
  background: var(--accent);
}
input[type="checkbox"]:checked:before {
  transform: translateX(16px);
}
.primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f282b7;
  border-radius: 8px;
  background: linear-gradient(100deg, #d54f90, #b268af);
  color: white;
  padding: 12px 17px;
  font-weight: 600;
}
.primary span {
  font-size: 19px;
}
.danger {
  width: 100%;
  background: #713347;
  color: #ffd4df;
  border: 1px solid #a65067;
  border-radius: 8px;
  padding: 13px;
}
.deck {
  background: radial-gradient(ellipse at 50% 35%, #42404b, #262a31 75%);
  padding: 24px 28px 20px;
  overflow: hidden;
  box-shadow: 0 12px 32px #0003;
}
.deck-top,
.deck-bottom {
  display: flex;
  justify-content: space-between;
  color: #aeb1bd;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.deck-top {
  margin-bottom: 32px;
}
.reels {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 145px;
  gap: 52px;
}
.reel {
  height: 132px;
  width: 132px;
  border-radius: 50%;
  position: relative;
  border: 9px solid #a4a1b0;
  background: conic-gradient(
    #36333f 0deg 50deg,
    #afabb9 50deg 75deg,
    #36333f 75deg 170deg,
    #afabb9 170deg 195deg,
    #36333f 195deg 290deg,
    #afabb9 290deg 315deg,
    #36333f 315deg
  );
  box-shadow:
    inset 0 0 0 3px #656071,
    0 6px 18px #0005;
  flex-shrink: 0;
}
.reel i {
  position: absolute;
  border: 7px solid #9893a5;
  background: #26232c;
  width: 43px;
  height: 43px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.reel b {
  position: absolute;
  inset: 10px;
  border: 2px solid #65616e;
  border-radius: 50%;
}
.tape-line {
  position: absolute;
  left: 15%;
  right: 15%;
  height: 90px;
  border-bottom: 4px solid #65586a;
  bottom: 0;
}
.recording .reel {
  animation: spin 6s linear infinite;
}
.recording .reel:last-child {
  animation-duration: 8s;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.deck-name {
  text-align: center;
  font-size: 13px;
  color: #dad4e0;
  margin: 30px 0 16px;
}
.transport {
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 25px;
  letter-spacing: 1px;
  color: #f4d8e8;
}
.transport span:last-child {
  font-size: 18px;
  align-self: center;
  color: #beb3c5;
}
.meter {
  height: 6px;
  background: #171920;
  border-radius: 3px;
  margin: 19px 0 9px;
  overflow: hidden;
}
.meter > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #78bb9c 0%, #edd47d 80%, #eb7689 95%);
  transition: width 0.06s;
}
.guidance .number {
  margin-bottom: 15px;
}
.guidance h2 {
  margin-bottom: 14px;
}
.guidance p {
  font-size: 12px;
}
.tip {
  background: #302b39;
  border: 1px solid #504052;
  border-radius: 8px;
  padding: 13px;
  color: #cfb8d5;
  font-size: 11px;
  margin-top: 20px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.count {
  font-size: 12px;
  color: var(--pink);
  background: #493344;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 6px;
}
.empty {
  text-align: center;
  padding: 40px 10px;
  font-size: 25px;
  color: #8b8092;
}
.empty h3 {
  font-size: 16px;
  color: var(--text);
  margin: 13px 0 6px;
}
.empty p {
  font-size: 12px;
  margin: 0;
}
.button {
  display: inline-block;
  border: 1px solid #515964;
  border-radius: 7px;
  color: #e5d5e0;
  padding: 7px 14px;
  font-size: 12px;
  background: #2e333a;
}
.track-row {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.track-row:first-child {
  margin-top: 20px;
}
.track-row .track-index {
  color: #89909d;
  font-family: monospace;
}
.track-row strong {
  font-weight: 500;
}
.track-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.track-row .position {
  font-family: monospace;
  text-align: right;
  color: #d9bace;
  font-size: 12px;
}
.search-label {
  max-width: 500px;
}
.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  color: var(--text);
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
}
.archive-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.archive-row .tag {
  font-size: 10px;
  color: var(--pink);
  border: 1px solid #594152;
  border-radius: 15px;
  padding: 4px 9px;
}
.settings-card {
  max-width: 680px;
}
details {
  max-width: 680px;
}
summary {
  cursor: pointer;
  font-weight: 500;
}
details[open] summary {
  margin-bottom: 22px;
}
.stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.stats strong {
  display: block;
  font:
    24px ui-monospace,
    monospace;
  color: #e4bfd4;
}
.stats small {
  color: var(--muted);
}
#sources a {
  display: block;
  font-size: 12px;
  margin: 10px 0;
}
.notice {
  border: 1px solid #835469;
  background: #3e2c38;
  padding: 13px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: radial-gradient(ellipse at 60% 0%, #413344, transparent 65%);
}
.auth-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 38px;
  border-radius: 18px;
}
.auth-card .brand {
  margin-bottom: 30px;
}
.auth-card h1 {
  font-size: 29px;
}
.auth-card p {
  font-size: 12px;
}
#auth-error {
  color: #ffa7b9;
  margin-top: 15px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #78818c;
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}
footer span {
  letter-spacing: 0;
}
#detail .button {
  margin: 6px 6px 6px 0;
}
#detail audio {
  width: 100%;
  margin: 8px 0;
}
.page {
  animation: enter 0.25s ease-out;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1100px) {
  aside {
    width: 195px;
    padding: 28px 15px;
  }
  .brand {
    font-size: 14px;
  }
  main {
    margin-left: 195px;
    padding: 0 25px;
  }
  .reels {
    gap: 20px;
  }
  .reel {
    width: 105px;
    height: 105px;
  }
  .card {
    padding: 22px;
  }
}
@media (max-width: 800px) {
  aside {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside > .eyebrow,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 18px;
    gap: 5px;
  }
  .nav {
    padding: 10px;
    font-size: 14px;
  }
  .nav span {
    font-size: 11px;
  }
  main {
    margin-left: 0;
    padding: 0 18px;
  }
  header {
    height: 60px;
    margin-bottom: 28px;
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .right-column {
    order: -1;
  }
  .guidance {
    display: none;
  }
  .deck {
    padding: 20px;
  }
  .reels {
    height: 110px;
  }
  .deck-top {
    margin-bottom: 16px;
  }
  .deck-name {
    margin: 20px 0 10px;
  }
  .transport {
    font-size: 22px;
  }
  h1 {
    font-size: 28px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .track-row {
    grid-template-columns: 24px 1fr;
  }
  .track-row .position {
    grid-column: 2;
    text-align: left;
  }
  .auth-card {
    padding: 27px;
  }
  .stats {
    gap: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  .recording .reel {
    animation: none !important;
    transition: none !important;
  }
}

 dialog { background: #25292e; color: #e6e9ec; border: 1px solid #525d68; border-radius: 16px; padding: 24px; width: min(560px, 90vw); max-height: 85vh; overflow: auto; }
 dialog::backdrop { background: #0009; }
 dialog label { display: block; margin: 12px 0; }
 dialog audio { width: 100%; margin-bottom: 12px; }
 dialog button { margin: 6px 4px 6px 0; }
 [hidden] { display: none !important; }
