/* Hitcut: warm studio dark. Tokens mirror the brand sheet (Breu, Carvão, Luz REC, Brasa, Fumaça). */
:root {
  --bg: #110D0B;
  /* Breu */
  --panel: #1A1411;
  /* Carvão */
  --panel-2: #221A16;
  --line: #2E241E;
  --line-2: #3A2C24;
  --text: #F3ECE6;
  /* Fumaça */
  --text-2: #D8CCC2;
  --muted: #A89A8F;
  /* Cinza quente */
  --faint: #6E625A;
  --rec: #FF3B2F;
  /* Luz REC: symbol, cut marks */
  --brasa: #D9361E;
  /* primary action */
  --brasa-hover: #E8452C;
  --on-brasa: #FFF6F0;
  --danger: #FF7A6B;

  /* sections of the song: warm for hooks, muted for the rest */
  --refrao: #FF4A36;
  --pre: #F5A524;
  --drop: #FFD166;
  --verso: #6FB5A8;
  --ponte: #B98CC9;
  --interludio: #8C9DB0;
  --edge: #6B5E55;

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* decorative pieces that bleed past the edge (tilted hero cards) never make the page scroll sideways;
     "clip" (unlike "hidden") keeps the sticky header working */
  overflow-x: clip;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* no blue/grey box over whatever a finger taps (Android Chrome, iOS Safari): the press below is the feedback */
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--pre);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.mono,
.clock,
.song-meta,
.when {
  font-family: var(--mono);
}

/* ---------- atmosphere: stage-light glow + film grain ---------- */
.glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(45% 100% at 12% 0%, rgba(194, 65, 12, .32) 0%, transparent 70%),
    radial-gradient(35% 90% at 90% 0%, rgba(110, 23, 48, .32) 0%, transparent 70%);
  transition: height .4s ease;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}

body[data-view="home"] .glow {
  height: 100vh;
  background:
    radial-gradient(55% 60% at 18% 8%, #C2410C 0%, transparent 62%),
    radial-gradient(40% 45% at 86% 18%, #6E1730 0%, transparent 66%),
    radial-gradient(70% 55% at 50% 80%, #3B1B0F 0%, transparent 72%);
}

body[data-view="home"] .glow::after {
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

/* ---------- scrollbar: thin, warm, REC on hover ---------- */
html {
  scrollbar-width: thin;
  scrollbar-color: #3A2C24 var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #3A2C24;
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brasa);
}

::-webkit-scrollbar-thumb:active {
  background: var(--rec);
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* inner scroll areas (lyrics list, menus) sit on panels: match the panel color */
.lyric-lines::-webkit-scrollbar-track,
.lyric-lines::-webkit-scrollbar-corner {
  background: transparent;
}

.lyric-lines::-webkit-scrollbar-thumb {
  border-color: var(--panel);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid rgba(243, 236, 230, .07);
  background-color: #00000050;
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* in the studio the bar runs edge to edge: logo and path left, actions right */
body:not([data-view="home"]) .topbar {
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 70px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}

/* the symbol: REC light above the cut bracket */
.symbol {
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
}

.symbol .rec {
  position: absolute;
  left: 7.5px;
  top: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 10px 2px rgba(255, 59, 47, .7);
}

.symbol .cut {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 3px;
  height: 7px;
  border: 2.5px solid var(--text);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.crumb a:hover {
  color: var(--text);
}

.crumb span:last-child {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* page language: flag button + small menu */
.lang {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(243, 236, 230, .16);
  background: rgba(243, 236, 230, .04);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  background: rgba(243, 236, 230, .1);
}

.lang-btn svg:last-child {
  color: var(--muted);
}

.flag {
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.lang-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.lang-menu button:hover {
  background: var(--panel-2);
}

.lang-menu button[aria-current="true"] {
  background: var(--line);
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 17px;
  font-weight: 500;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .88;
}

.site-nav a:hover {
  color: #FF6B4A;
  opacity: 1;
}

/* one header, two roles: marketing nav on the home, breadcrumb in the studio */
body:is([data-view="home"], [data-view="legal"]) .studio-only,
body:not([data-view="home"]):not([data-view="legal"]) .home-only {
  display: none !important;
}

body[data-view="home"] .topbar {
  border-bottom-color: transparent;
}

main {
  padding: 0 clamp(16px, 3vw, 40px) 80px;
  max-width: 1360px;
  margin: 0 auto;
}

/* ---------- home ---------- */
/* typewriter headline: characters keep their final place and just turn visible */
.tw-char { visibility: hidden; }
.tw-char.on { visibility: visible; }
.tw-break { display: block; height: 0; }
.tw-rest { color: var(--text-2); }
.tw-caret { position: relative; display: inline-block; width: 0; height: 0; }
.tw-caret::after {
  content: ""; position: absolute; left: .04em; top: -.8em; width: .07em; height: .9em;
  border-radius: 2px; background: var(--rec); box-shadow: 0 0 14px rgba(255, 59, 47, .8);
  animation: caret-blink 1.05s steps(1) infinite;
}
.tw-caret.typing::after { animation: none; }
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.home {
  display: grid;
  /* minmax(0, …): wide children (the example waveform, the marquee) must not widen the page */
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.demo {
  margin: 64px auto 0;
  width: 100%;
  max-width: 1200px;
  background: rgba(26, 20, 17, .92);
  border: 1px solid #2E241E;
  border-radius: var(--radius-xl);
  padding: 18px 20px 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .5);
}

.demo-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.demo-file {
  color: var(--text);
  font-weight: 600;
}

.demo-meta {
  font-family: var(--mono);
}

.demo-lane {
  position: relative;
  height: 22px;
}

.demo-lane span {
  position: absolute;
  top: 0;
  height: 22px;
  border-radius: 6px;
  padding-left: 7px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.demo-lane span.edge {
  color: var(--text);
}

.demo-wave {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.demo-wave b {
  flex: 1;
  border-radius: 1px;
}

.demo-playhead {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  width: 2px;
  background: var(--text);
  box-shadow: 0 0 12px rgba(243, 236, 230, .7);
  animation: playhead 26s linear infinite;
}

@keyframes playhead {
  from {
    left: 0;
  }

  to {
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-playhead {
    animation: none;
    left: 61%;
  }
}

.demo-cuts {
  position: relative;
  height: 18px;
}

.demo-cuts span {
  position: absolute;
  top: 0;
  height: 10px;
  border: 2px solid var(--rec);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.demo-cuts span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 59, 47, .8);
}

.demo-ruler {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.home-section {
  max-width: 1200px;
  width: 100%;
  margin: 96px auto 0;
  display: grid;
  gap: 28px;
  scroll-margin-top: 24px;
}

.home-section h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.035em;
}

.home-section h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.home-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps li,
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.step-n {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--rec);
  border: 1px solid rgba(255, 59, 47, .45);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* the footer: brand, three columns of links and the social icons; a thin line with the year below */
.site-footer {
  max-width: 1200px;
  width: 100%;
  margin: 96px auto 0;
  padding: 48px 0 8px;
  border-top: 1px solid var(--line);
}

/* only on the landing and on the legal pages (in the studio the side menu does this job) */
body:not([data-view="home"]):not([data-view="legal"]) .site-footer {
  display: none;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(0, 3fr) auto;
  gap: 40px 56px;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
}

.footer-brand p {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-cols div {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-cols h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.footer-cols a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--text);
}

.footer-social {
  display: flex;
  gap: 6px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-2);
}

.footer-social a:hover {
  color: var(--text);
  background: rgba(243, 236, 230, .07);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- terms of use, privacy ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 40px;
}

.legal-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 32px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.legal-tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.legal-tabs a[aria-current="page"] {
  background: var(--text);
  color: var(--bg);
}

.legal-doc h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.legal-lang {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

html[lang="pt-BR"] .legal-lang {
  display: none;
}

.legal-body .legal-updated {
  color: var(--faint);
  font-size: 13px;
}

.legal-body h2 {
  margin: 36px 0 10px;
  font-size: 19px;
}

.legal-body p,
.legal-body li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.65;
}

.legal-body ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.legal-body a {
  color: var(--text);
}

/* ---------- home: sections in the Suno rhythm ---------- */
.home {
  position: relative;
}

.hero {
  position: relative;
  z-index: 1;
}

/* tilted example clips beside the hero */
.hero-cards {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  pointer-events: none;
}

.hero-card {
  position: absolute;
  top: 170px;
  width: 200px;
  aspect-ratio: 9 / 16;
  animation: card-in .9s cubic-bezier(.2, .7, .2, 1) .35s both;
}

.hc-left { left: -60px; --r: -7deg; --from: -40px; }
.hc-right { right: -60px; top: 140px; --r: 6deg; --from: 40px; }

.hc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  transform: rotate(var(--r));
  border: 1px solid rgba(243, 236, 230, .1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  background:
    radial-gradient(60% 40% at 50% 38%, rgba(255, 160, 90, .42) 0%, transparent 70%),
    linear-gradient(160deg, #5B2A1A 0%, #1E120D 55%, #0E0A08 100%);
}

.hc-right .hc-inner {
  background:
    radial-gradient(55% 35% at 55% 30%, rgba(190, 90, 140, .4) 0%, transparent 70%),
    linear-gradient(200deg, #2A1B30 0%, #150E14 60%, #0B0809 100%);
}

.hc-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 13, 11, .72);
  font-size: 11px;
  font-weight: 600;
}

.rec-dot.amber { background: var(--pre); box-shadow: 0 0 10px rgba(245, 165, 36, .8); }

.hc-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 54px;
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.hc-caption span { color: #FF6B4A; }
.hc-caption.big { font-size: 28px; letter-spacing: -0.02em; color: var(--drop); }

.hc-time {
  position: absolute;
  left: 14px;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(243, 236, 230, .7);
}

@keyframes card-in {
  from { opacity: 0; translate: var(--from) 20px; }
  to { opacity: 1; translate: 0 0; }
}

/* press-strip style marquee of sources and formats */
.marquee {
  margin: 110px auto 0;
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: rgba(243, 236, 230, .42);
  white-space: nowrap;
}

.marquee-track span::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 59, 47, .55);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.home-section.centered {
  justify-items: center;
  text-align: center;
}

.home-section.centered .demo {
  margin-top: 8px;
  text-align: left;
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 44em;
}

.section-head p {
  font-size: 17px;
  text-wrap: balance;
}

/* feature grid: every card carries a small illustration built from the brand's parts */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.fcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 22px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.fcard p {
  font-size: 14px;
}

.fart {
  position: relative;
  height: 118px;
  margin-top: 10px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.art-lane {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
}

.art-lane span {
  flex: 1;
  height: 20px;
  border-radius: 6px;
  background: var(--c);
  opacity: .45;
}

.art-lane span.hit { flex: 1.4; opacity: 1; box-shadow: 0 0 18px rgba(255, 74, 54, .35); }

.art-bracket {
  position: absolute;
  left: 39%;
  width: 22%;
  top: 72px;
  height: 10px;
  border: 2px solid var(--rec);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.art-bracket::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 59, 47, .8);
}

.art-lyric {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 0 16px;
}

.art-lyric p {
  margin: 0;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  line-height: 1.2;
}

.art-lyric .sung { color: var(--refrao); }
.art-lyric .dim { color: rgba(243, 236, 230, .35); font-size: 14px; }

.art-ruler .ticks {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 34px;
  height: 26px;
  background: repeating-linear-gradient(90deg, rgba(243, 236, 230, .35) 0 1px, transparent 1px 12.5%),
    repeating-linear-gradient(90deg, rgba(243, 236, 230, .12) 0 1px, transparent 1px 3.125%);
}

.art-ruler .art-bracket.wide { left: calc(16px + 25%); width: 37.5%; top: 66px; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.art-ruler .mono { position: absolute; left: 16px; bottom: 12px; }

.art-frame .scene {
  position: absolute;
  inset: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(160deg, #6B3A22, #22140E);
}

.art-frame .face {
  position: absolute;
  left: 62%;
  top: 28%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(243, 236, 230, .75);
}

.art-frame .crop {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: calc(62% + 13px - 26px);
  width: 52px;
  border: 2px solid var(--rec);
  border-radius: 6px;
  box-shadow: 0 0 0 999px rgba(17, 13, 11, .55);
}

.art-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}

.art-strip span {
  flex: 1;
  height: 54px;
  border-radius: 6px;
  background: linear-gradient(160deg, #3B2A45, #140F18);
  opacity: .5;
}

.art-strip span.on { opacity: 1; outline: 2px solid var(--rec); outline-offset: 2px; background: linear-gradient(160deg, #7A4424, #26150D); }
.art-strip b { position: absolute; right: 16px; bottom: 10px; font-weight: 500; }

.art-hook .bars {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 22px;
  height: 56px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 18%, rgba(17, 13, 11, .62) 18%),
    repeating-linear-gradient(90deg, var(--refrao) 0 3px, transparent 3px 7px);
}

.art-hook .mono { position: absolute; left: 16px; bottom: 12px; color: var(--rec); }

/* warm glow band, like the app section on the reference */
.glow-band {
  position: relative;
  justify-items: center;
  text-align: center;
  padding: 72px 0 8px;
}

.glow-band::before {
  content: "";
  position: absolute;
  inset: 0 -10% -10%;
  z-index: -1;
  background:
    radial-gradient(45% 55% at 30% 60%, rgba(194, 65, 12, .38) 0%, transparent 70%),
    radial-gradient(40% 50% at 72% 45%, rgba(110, 23, 48, .45) 0%, transparent 70%);
  filter: blur(10px);
}

.glow-band h2 {
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.glow-band .features {
  width: 100%;
  text-align: left;
}

.glow-band .feature {
  background: rgba(26, 20, 17, .78);
  backdrop-filter: blur(6px);
}

/* who it's for: one compact card per kind of customer, one line each */
.audiences {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}

.aud {
  background: rgba(26, 20, 17, .8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.aud .aud-icon {
  margin-bottom: 6px;
}

.aud-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(255, 59, 47, .12);
  color: var(--rec);
}

.aud-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 980px) {
  .audiences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .audiences {
    grid-template-columns: 1fr;
  }
}

/* promo videos: the narrated minute (16:9) over three vertical loops in phone frames */
.promo-main {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 59, 47, .06);
}

.promo-main video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.promo-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at 50% 50%, rgba(17, 13, 11, .15), rgba(17, 13, 11, .55));
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.promo-play-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brasa);
  color: var(--on-brasa);
  box-shadow: 0 10px 40px rgba(217, 54, 30, .55);
  transition: transform .15s;
}

.promo-play-icon svg {
  margin-left: 3px;
}

/* on a phone the card is ~360 px wide: a smaller button keeps the poster's logo and slogan clear */
@media (max-width: 560px) {
  .promo-play-icon {
    width: 46px;
    height: 46px;
  }
}

.promo-play:hover .promo-play-icon {
  transform: scale(1.06);
}

/* plans: two toggles (audience, billing), three cards a row, one-off packs under the artists' row */
#planos {
  /* arriving by #planos (menu, account menu): the title clears the sticky header */
  scroll-margin-top: 88px;
}

.plan-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.plan-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel);
}

.plan-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
}

.plan-toggle button:hover {
  color: var(--text);
}

.plan-toggle button[aria-pressed="true"],
.plan-toggle button[aria-pressed="true"]:hover {
  background: var(--text);
  color: var(--bg);
}

.plan-toggle-save {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 59, 47, .16);
  color: var(--rec);
}

.plan-toggle button[aria-pressed="true"] .plan-toggle-save {
  background: var(--brasa);
  color: var(--on-brasa);
}

.plans {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.plan.featured {
  border-color: rgba(255, 59, 47, .55);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(217, 54, 30, .16), transparent 70%),
    var(--panel);
  box-shadow: 0 20px 60px rgba(217, 54, 30, .14);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--brasa);
  color: var(--on-brasa);
  font-size: 12px;
  font-weight: 700;
}

.home-section .plan-for {
  font-size: 14px;
}

.home-section .plan-price {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text);
}

.plan-price .cur {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
}

.plan-price b {
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-price .per {
  font-size: 15px;
  color: var(--muted);
}

.home-section .plan-price-text {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 44px;
}

.home-section .plan-bill {
  font-size: 13px;
  color: var(--faint);
}

.plan-feats {
  list-style: none;
  margin: 12px 0 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
  flex: 1;
}

.plan-feats li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.plan-feats li::before {
  content: "";
  width: 14px;
  height: 8px;
  margin-top: 5px;
  border-left: 2px solid var(--rec);
  border-bottom: 2px solid var(--rec);
  transform: rotate(-45deg) translate(1px, -2px);
}

.plan .btn {
  width: 100%;
}

.home-section .plan-contact {
  font-size: 13px;
  text-align: center;
}

.plan-contact a {
  color: var(--text);
}

.plan-contact-main {
  display: grid;
  gap: 8px;
}

.plan-contact-main a {
  text-decoration: none;
}

.plan-once {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 20px 24px;
  border: 1px dashed var(--line-2);
  border-radius: 20px;
  text-align: left;
}

.plan-once div:first-child {
  display: grid;
  gap: 4px;
}

.plan-once dl {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.plan-once dl div {
  display: grid;
  gap: 2px;
}

.plan-once dt {
  font-size: 13px;
  color: var(--muted);
}

.plan-once dd {
  margin: 0;
  font-size: 13px;
  color: var(--faint);
}

.plan-once dd b {
  font-size: 20px;
  color: var(--text);
  margin-right: 6px;
}

.home-section .plan-note {
  font-size: 14px;
  max-width: 44em;
}

.plan-note .tag-status {
  margin-right: 6px;
  color: var(--pre);
  background: rgba(245, 165, 36, .12);
}

@media (max-width: 980px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin: 0 auto;
  }

  .plans .plan.featured {
    order: -1;
  }
}

/* FAQ accordion */
.faq {
  width: 100%;
  max-width: 720px;
  text-align: left;
  display: grid;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 2px;
  font-weight: 600;
  font-size: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  padding: 0 2px 18px;
  max-width: 62ch;
}

.final-cta {
  margin: 96px auto 0;
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.035em;
}

/* scroll reveal: fade and rise, staggered inside [data-stagger] groups (only when JS is on) */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .hero-card { animation: none; }
}

@media (max-width: 1180px) {
  .hero-cards { display: none; }
}

.song-notice {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(245, 165, 36, .12);
  color: #FBC15E;
  font-size: 13px;
  max-width: 62ch;
}

/* ---------- accounts: sign-in modal over the page ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 7, 6, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: auth-fade .2s ease-out;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: 12px;
  padding: 44px 32px 32px;
  background: #1E1916;
  border: 1px solid rgba(243, 236, 230, .1);
  border-radius: 32px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: auth-in .25s cubic-bezier(.2, .7, .2, 1);
}

.auth-card h1 {
  margin: 0;
  padding-inline: 28px;
  text-align: center;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

.auth-sub {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  text-wrap: balance;
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.auth-close:hover {
  color: var(--text);
  background: rgba(243, 236, 230, .06);
}

.auth-fields {
  display: grid;
  gap: 10px;
}

.auth-field input {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #292320;
  color: var(--text);
  font-size: 16px; /* 16px keeps iPhone from zooming into the field */
  transition: border-color .15s, background .15s;
}

.auth-ask {
  margin: 2px 0 0;
  text-align: center;
}

.auth-ask a {
  color: var(--text);
}

.auth-field input::placeholder {
  color: #8E8178;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(255, 107, 74, .6);
  background: #2E2723;
}

.auth-card .form-error {
  min-height: 0;
  text-align: center;
}

.auth-card .form-error:empty {
  display: none;
}

.auth-primary,
.auth-secondary {
  height: 56px;
  border: 0;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.auth-primary:active,
.auth-secondary:active {
  transform: translateY(1px);
}

.auth-primary {
  margin-top: 4px;
  background: var(--brasa);
  color: var(--on-brasa);
  box-shadow: 0 8px 28px rgba(217, 54, 30, .35);
}

.auth-primary:hover:not(:disabled) {
  background: var(--brasa-hover);
}

.auth-primary:disabled {
  opacity: .6;
  cursor: default;
}

.auth-secondary {
  background: #292320;
  color: var(--text);
}

.auth-secondary:hover {
  background: #332B27;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(243, 236, 230, .12);
}

@keyframes auth-fade {
  from { opacity: 0; }
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-backdrop,
  .auth-card {
    animation: none;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 40px 20px 22px;
    border-radius: 26px;
  }
}

/* "Suas músicas deste mês acabaram": the two ways on, side by side (stacked on a phone) */
.limit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .limit-actions {
    grid-template-columns: 1fr;
  }
}

/* the page behind the modal does not scroll */
body.modal-open {
  overflow: hidden;
}

.account {
  position: relative;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brasa), #6E1730);
  color: var(--on-brasa);
  font-size: 13px;
  font-weight: 700;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  z-index: 30;
  display: grid;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.account-who {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  font-size: 14px;
}

.account-who span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu button {
  border: 0;
  background: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.account-menu button:hover {
  background: var(--panel-2);
}

.invite-pop {
  position: fixed;
  left: 50%;
  top: 120px;
  transform: translateX(-50%);
  z-index: 40;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.invite-pop h2,
.invite-pop p {
  margin: 0;
}

.invite-code {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: .08em;
  color: var(--text);
}

.invite-pop input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- studio: my songs ---------- */
.studio {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.studio .start-form {
  max-width: none;
  margin: 0;
}

.recent ul {
  grid-template-columns: minmax(0, 1fr);
}

.studio-head h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.035em;
}

.studio-head .hint {
  margin: 0;
  font-size: 15px;
}

.studio .recent {
  margin-top: 8px;
  max-width: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--panel-2);
  color: var(--text);
  transition: background .15s, border-color .15s, transform .1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: .5;
  cursor: default;
}

.btn-rec {
  background: var(--brasa);
  color: var(--on-brasa);
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(217, 54, 30, .4);
}

.btn-rec:hover:not(:disabled) {
  background: var(--brasa-hover);
}

.btn-light {
  background: var(--text);
  color: var(--bg);
}

.btn-light:hover {
  background: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(243, 236, 230, .2);
}

.btn-ghost:hover {
  background: rgba(243, 236, 230, .06);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
}

.btn-block {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
}

.btn-round {
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--text);
  color: var(--bg);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.icon-btn:hover {
  background: var(--panel-2);
}

.rec-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 10px rgba(255, 59, 47, .8);
  flex: none;
}

.rec-dot.light {
  background: var(--on-brasa);
  box-shadow: none;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--pre);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--text);
}

/* ---------- start ---------- */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: clamp(40px, 11vh, 120px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(243, 236, 230, .78);
}

.hero-title {
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 20ch;
  text-wrap: balance;
}

.hero-sub {
  font-size: 18px;
  color: rgba(243, 236, 230, .78);
  max-width: 34em;
  margin: 0 auto 36px;
  text-wrap: balance;
}

.start-form {
  display: grid;
  gap: 14px;
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

/* Suno-like composer: one input, "+" and "Avançado" on the left, the action on the right */
.composer {
  display: grid;
  gap: 14px;
  padding: 18px 14px 14px 20px;
  background: rgba(30, 22, 18, .72);
  border: 1px solid rgba(243, 236, 230, .1);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(217, 72, 15, .16);
  backdrop-filter: blur(8px);
  transition: border-color .15s, box-shadow .15s;
}

.composer.over,
.composer:focus-within {
  border-color: rgba(255, 107, 74, .55);
  box-shadow: 0 0 70px rgba(217, 72, 15, .3);
}

.composer.has-file {
  border-color: rgba(245, 165, 36, .6);
}

.composer input[type=text] {
  background: transparent;
  border: 0;
  outline: none;
  font-size: 17px;
  padding: 4px 0;
  width: 100%;
}

.composer input::placeholder {
  color: rgba(243, 236, 230, .45);
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.composer-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-row .btn-rec {
  margin-left: auto;
}

.composer-tools {
  align-items: center;
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  cursor: pointer;
  background: rgba(243, 236, 230, .08);
  color: var(--text);
  transition: background .15s;
}

.round-btn:hover {
  background: rgba(243, 236, 230, .15);
}

.round-btn:focus-within {
  outline: 2px solid var(--pre);
  outline-offset: 2px;
}

.round-btn.has-file {
  background: rgba(245, 165, 36, .18);
  color: #FBC15E;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(243, 236, 230, .08);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s;
}

.pill-btn:hover,
.pill-btn[aria-expanded="true"] {
  background: rgba(243, 236, 230, .15);
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  max-width: 240px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  background: rgba(245, 165, 36, .14);
  color: #FBC15E;
  font-size: 13px;
  font-weight: 500;
}

.file-pill #dropText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-pill button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.file-pill button:hover {
  background: rgba(245, 165, 36, .2);
}

.btn-create {
  height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

/* advanced options: open inside the composer, below the row */
.advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 16px 6px 4px 0;
  border-top: 1px solid rgba(243, 236, 230, .08);
}

.adv-field {
  display: grid;
  gap: 8px;
  align-content: start;
  font-size: 13px;
  color: var(--muted);
}

.adv-field legend {
  margin-bottom: 8px;
}

.adv-field .hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.adv-select select {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg);
}

.adv-checks {
  gap: 10px;
  color: var(--text);
}

.seg-radio label {
  flex: 1 1 0;
  display: grid;
  cursor: pointer;
}

.seg-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-radio span {
  text-align: center;
  padding: 7px 6px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.seg-radio label:hover span {
  color: var(--text);
}

.seg-radio input:checked + span {
  background: var(--line);
  color: var(--text);
  font-weight: 600;
}

.seg-radio input:focus-visible + span {
  outline: 2px solid var(--pre);
  outline-offset: 1px;
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

select {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.check input {
  accent-color: var(--rec);
  width: 16px;
  height: 16px;
}

.check.disabled {
  opacity: .45;
  cursor: default;
}

.form-error {
  color: var(--danger);
  margin: 0;
  min-height: 1.2em;
  font-size: 14px;
  text-align: center;
}

.recent {
  margin: 56px auto 0;
  max-width: 720px;
  text-align: left;
}

.recent h2 {
  font-size: 16px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}

.recent ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 2px;
}

/* one song: cover · title + status · mini arrangement · when · actions. The title link stretches over
   the whole row; the buttons sit above it. */
.song {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 168px 76px 36px;
  grid-template-areas: "art main wave end actions";
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background .15s;
}

.song:hover,
.song:focus-within,
.song.playing {
  background: rgba(26, 20, 17, .85);
}

.song-art {
  grid-area: art;
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  /* no cover: a warm gradient of its own per song */
  background:
    radial-gradient(circle at 30% 25%, hsl(var(--hue) 70% 55% / .55), transparent 60%),
    linear-gradient(135deg, hsl(calc(var(--hue) + 40) 45% 22%), var(--panel-2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.song-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.song.is-error .song-art img {
  filter: grayscale(1) brightness(.55);
}

.song-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--on-brasa);
  background: rgba(17, 13, 11, .45);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s;
}

.song-play svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6));
}

.song:hover .song-play,
.song-play:focus-visible,
.song.playing .song-play {
  opacity: 1;
}

.song.playing .song-play {
  background: rgba(217, 54, 30, .7);
}

.song-main {
  grid-area: main;
  min-width: 0;
  display: grid;
  gap: 5px;
}

/* rows without the arrangement (processing, failed) give the status line the room */
.song:not(.is-ready) .song-main {
  grid-column: main-start / wave-end;
}

.song-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.song-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.song-link:focus-visible {
  outline: none;
}

.song:has(.song-link:focus-visible) {
  outline: 2px solid var(--pre);
  outline-offset: 2px;
}

.recent .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 500;
}

.recent .artist {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1000;
  min-width: 4ch;
}

.song-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.song-chip {
  white-space: nowrap;
}

.song-chip + .song-chip::before {
  content: "·";
  margin-right: 6px;
  color: var(--faint);
}

.song-chip.hot {
  color: var(--text-2);
}

.song-chip.hot::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--rec);
  vertical-align: 1px;
}

.song-chip.live {
  color: var(--pre);
}

.song-chip.dim {
  color: var(--faint);
}

.song-stage {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.song-progress {
  flex: 1;
  min-width: 60px;
  max-width: 220px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.song-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brasa), var(--pre));
  transition: width .6s ease;
}

.song-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.song-err {
  position: relative;
  z-index: 1;
  color: var(--danger);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.song-btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
}

.song-btn:hover {
  border-color: var(--muted);
}

.song-btn:disabled {
  opacity: .5;
  cursor: default;
}

.song-wave {
  grid-area: wave;
  position: relative;
  height: 28px;
}

.song-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.song-wave rect {
  fill: var(--line-2);
  transition: fill .15s;
}

.song-wave rect.on {
  fill: var(--brasa);
}

.song:hover .song-wave rect:not(.on) {
  fill: var(--edge);
}

.song:hover .song-wave rect.on,
.song.playing .song-wave rect.on {
  fill: var(--rec);
}

.song-ph {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--text);
  display: none;
}

.song.playing .song-ph {
  display: block;
}

.song-end {
  grid-area: end;
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.song-end .when {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--muted);
}

.song-dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.song-actions {
  grid-area: actions;
  position: relative;
  z-index: 2;
}

/* an open menu stays above the next rows' buttons */
.song-actions:has(.song-menu:not([hidden])) {
  z-index: 3;
}

.song-more {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.song:hover .song-more,
.song-more[aria-expanded="true"] {
  color: var(--text);
}

.song-more:hover,
.song-more[aria-expanded="true"] {
  background: var(--panel-2);
}

.song-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 200px;
  max-height: min(60vh, 360px); /* an account with many artists: the list of folders scrolls */
  overflow-y: auto;
  display: grid;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.song-menu [role="menuitem"] {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.song-menu [role="menuitem"]:hover,
.song-menu [role="menuitem"]:focus-visible {
  background: var(--panel-2);
  outline: none;
}

.song-menu .danger {
  color: var(--danger);
}

.tag-status {
  font-family: var(--font);
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--panel-2);
  color: var(--muted);
}

.tag-status.error {
  color: var(--danger);
  background: rgba(255, 122, 107, .12);
}

/* ---------- processing ---------- */
.processing {
  max-width: 520px;
  margin: 16vh auto 0;
  text-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* a long word never widens the column past the screen */
  gap: 18px;
  justify-items: center;
}

.processing-title {
  max-width: 100%;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere; /* long titles and links break instead of running off the side */
}

.processing-stage {
  color: var(--muted);
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
}

.progress {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--brasa);
  box-shadow: 0 0 12px rgba(255, 59, 47, .6);
  transition: width .4s;
}

/*
 * Processing equalizer: one look per pipeline phase (set on data-phase by the script).
 *   queue    grey, slow breathing
 *   download bars light up left to right as the file arrives, a wave runs across
 *   analyze  each bar takes its song-section color as the structure is found
 *   lyrics   all colored; a karaoke glow fills left to right with the transcription
 *   cuts     bars stop and the cut bracket with the REC light appears
 * ".lit" marks the bars already reached inside the current phase.
 */
.eq {
  position: relative;
  display: flex;
  gap: 5px;
  height: 56px;
  align-items: center;
  padding-bottom: 14px;
  box-sizing: content-box;
}

.eq i {
  --c: var(--verso);
  --h: 60%;
  width: 7px;
  height: var(--h);
  border-radius: 4px;
  background: var(--edge);
  opacity: .5;
  animation: eq 1.1s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transition: background-color .45s, opacity .3s, box-shadow .3s;
}

.eq i:nth-child(1) { --c: var(--edge); --d: -.3s; --h: 34%; --n: 0; }
.eq i:nth-child(2) { --c: var(--verso); --d: -.7s; --h: 52%; --n: 1; }
.eq i:nth-child(3) { --c: var(--pre); --d: -.1s; --h: 66%; --n: 2; }
.eq i:nth-child(4) { --c: var(--refrao); --d: -.5s; --h: 92%; --n: 3; }
.eq i:nth-child(5) { --c: var(--refrao); --d: -.2s; --h: 100%; --n: 4; }
.eq i:nth-child(6) { --c: var(--refrao); --d: -.8s; --h: 86%; --n: 5; }
.eq i:nth-child(7) { --c: var(--ponte); --d: -.4s; --h: 58%; --n: 6; }
.eq i:nth-child(8) { --c: var(--verso); --d: -.6s; --h: 48%; --n: 7; }
.eq i:nth-child(9) { --c: var(--edge); --d: -.15s; --h: 30%; --n: 8; }

/* queue: waiting its turn */
.eq[data-phase="queue"] i {
  animation-duration: 2.4s;
  opacity: .35;
}

/* download: a wave runs left to right, reached bars turn light */
.eq[data-phase="download"] i {
  animation-delay: calc(var(--n) * .09s - 1.2s);
  animation-duration: .9s;
}

.eq[data-phase="download"] i.lit {
  background: var(--text);
  opacity: .9;
}

/* analyze: the arrangement shows up bar by bar */
.eq[data-phase="analyze"] i.lit {
  background: var(--c);
  opacity: 1;
}

/* lyrics: colored arrangement, karaoke glow follows the transcription */
.eq[data-phase="lyrics"] i {
  background: var(--c);
  opacity: .38;
}

.eq[data-phase="lyrics"] i.lit {
  opacity: 1;
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent);
}

/* cuts: the bars settle and the cut appears */
.eq[data-phase="cuts"] i {
  animation: none;
  background: var(--c);
  opacity: .45;
}

.eq[data-phase="cuts"] i:nth-child(n+4):nth-child(-n+6) {
  opacity: 1;
}

.eq::before,
.eq::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity .4s;
}

/* bracket under bars 4–6 (the chorus) */
.eq::before {
  left: calc(3 * 12px - 2px);
  width: calc(3 * 12px - 1px);
  bottom: 2px;
  height: 7px;
  border: 2px solid var(--rec);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  box-sizing: border-box;
}

.eq::after {
  left: calc(4 * 12px);
  bottom: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 59, 47, .9);
}

.eq[data-phase="cuts"]::before,
.eq[data-phase="cuts"]::after {
  opacity: 1;
}

@keyframes eq {

  0%,
  100% {
    height: 22%;
  }

  50% {
    height: 100%;
  }
}

/* pipeline steps under the progress bar */
.proc-steps {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--faint);
}

.proc-steps li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .3s;
}

.proc-steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
}

.proc-steps li.done {
  color: var(--muted);
}

.proc-steps li.done::before {
  border: 0;
  background: var(--muted);
}

.proc-steps li.current {
  color: var(--text);
  font-weight: 600;
}

.proc-steps li.current::before {
  border: 0;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 59, 47, .9);
}

@media (prefers-reduced-motion: reduce) {
  .eq i {
    animation: none;
  }
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#procActions {
  justify-content: center;
}

/* ---------- editor: song head ---------- */
.song-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 26px 0 18px;
}

.song-id {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.song-thumb {
  width: 100px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  flex: none;
  background: linear-gradient(160deg, #6B3A22, #22140E) center / cover no-repeat;
}

.song-title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.song-meta {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
  min-width: 7.5em;
  text-align: right;
}

/* the arrangement: the product's signature object */
.arrangement {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 20px 12px;
  margin-bottom: 28px;
}

#waveCanvas {
  width: 100%;
  height: 220px;
  display: block;
  cursor: pointer;
  touch-action: none;
}

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend .hint {
  margin-left: auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: start;
}

.col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* ---------- clip cards ---------- */
.clip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.clip {
  --c: var(--edge);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}

.clip.selected {
  background: var(--panel-2);
  border-color: var(--line-2);
}

.clip.playing {
  border-color: var(--c);
}

.clip input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: var(--rec);
  cursor: pointer;
}

.clip-thumb {
  width: 112px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  background: var(--bg) center / cover no-repeat;
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.clip-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  transition: background .15s;
}

.clip-thumb:hover::before {
  background: rgba(0, 0, 0, .1);
}

.clip-thumb svg {
  position: relative;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 2px #000);
}

.clip.playing .clip-thumb {
  box-shadow: 0 0 0 2px var(--c);
}

.clip-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.clip-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-chip {
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--c);
  color: var(--bg);
}

.section-chip.edge {
  color: var(--text);
}

.clip-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.clip-reason {
  color: var(--text-2);
  font-size: 14px;
}

.clip-score {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.clip-score b {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.meter {
  width: 64px;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--c);
}

.clip-times {
  grid-column: 3 / 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
}

.nudge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nudge button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  color: var(--muted);
}

.nudge button:hover {
  background: var(--line);
  color: var(--text);
}

.nudge output {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 4.6em;
  text-align: center;
  font-size: 12px;
}

.clip .remove {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

.empty-clips {
  color: var(--muted);
  padding: 18px;
  background: var(--panel);
  border-radius: var(--radius);
}

/* ---------- style panel ---------- */
.style-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 16px;
}

.style-col .col-head {
  margin: 0;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

legend {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0;
}

.seg {
  display: flex;
  gap: 3px;
  background: var(--bg);
  padding: 3px;
  border-radius: 12px;
}

.seg button {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  padding: 7px 6px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.seg button:hover {
  color: var(--text);
}

.seg button.on {
  background: var(--line);
  color: var(--text);
  font-weight: 600;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.swatches {
  display: flex;
  gap: 8px;
}

.swatches button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}

.swatches button.on {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text);
}

input[type=color] {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.range {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.range input {
  accent-color: var(--rec);
}

.text-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.text-field input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
}

.style-presets,
.style-save {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.style-presets select {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 7px 12px;
}

.style-save input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 12px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.media-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
  position: relative;
}

.media-item.on {
  border-color: var(--text);
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-item.generated {
  background: linear-gradient(160deg, #110D0B, color-mix(in srgb, var(--accent, var(--rec)) 48%, #110D0B), #2A1410);
}

.media-item .tag {
  position: absolute;
  bottom: 3px;
  left: 3px;
  font-size: 10px;
  background: rgba(0, 0, 0, .6);
  padding: 1px 5px;
  border-radius: 4px;
}

/* compact panel, as on the canvas: 9:16 preview beside the main choices */
.style-col > .col-head {
  gap: 10px;
}

.style-quick {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* square and landscape previews do not fit beside the controls: stack them */
.style-quick:has(.phone[data-aspect="1:1"]),
.style-quick:has(.phone[data-aspect="16:9"]) {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.style-quick:has(.phone[data-aspect="1:1"]) .quick-controls,
.style-quick:has(.phone[data-aspect="16:9"]) .quick-controls,
.style-quick:has(.phone[data-aspect="1:1"]) .phone-wrap,
.style-quick:has(.phone[data-aspect="16:9"]) .phone-wrap {
  /* full width: centred, the wrap would shrink to its content, and the preview's width is a share of it (0) */
  width: 100%;
}

.quick-controls {
  display: grid;
  gap: 12px;
}

.quick-controls legend {
  margin-bottom: 6px;
}

.quick-controls fieldset {
  gap: 0;
}

.seg-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* an odd last option spans the full row */
.seg-2 button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.seg-2 button {
  padding: 6px 4px;
  font-size: 12px;
}

.quick-controls .swatches {
  flex-wrap: wrap;
  gap: 6px;
}

.quick-controls .swatches button {
  width: 20px;
  height: 20px;
}

.quick-controls input[type=color] {
  width: 22px;
  height: 22px;
}

.pill-select select {
  appearance: none;
  border-radius: 999px;
  padding: 7px 28px 7px 12px;
  font-size: 13px;
  font-weight: 500;
  background-color: rgba(243, 236, 230, .07);
  border: 0;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 11px) 52%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  max-width: 170px;
}

.pill-select select option {
  background: var(--panel);
}

.icon-btn.icon-sm {
  width: 30px;
  height: 30px;
}

.media-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.media-row .media-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.media-row .media-item {
  width: 52px;
  height: 52px;
  aspect-ratio: auto;
}

.media-add {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  border: 1.5px dashed var(--line-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}

.media-add:hover {
  color: var(--text);
  border-color: var(--muted);
}

.quick-checks {
  display: grid;
  gap: 10px;
}

/* brand images: logo watermark and closing art */
.brand-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.brand-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.brand-head .field-label {
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
}

.brand-head .hint {
  font-size: 12px;
}

.brand-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.brand-cell {
  position: relative;
}

.brand-item {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 5px;
  cursor: pointer;
  /* checkerboard so transparent logos read as transparent */
  background: repeating-conic-gradient(#2A221D 0 25%, #1F1916 0 50%) 0 0 / 12px 12px;
  display: grid;
  place-items: center;
}

.brand-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.brand-item.none {
  background: none;
  border: 1.5px dashed var(--line-2);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1.15;
}

.brand-item.on {
  border: 2px solid var(--text);
  color: var(--text);
}

.brand-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}

.brand-cell:hover .brand-del,
.brand-del:focus-visible {
  opacity: 1;
}

.brand-del:hover {
  background: var(--brasa);
  border-color: var(--brasa);
  color: var(--on-brasa);
}

@media (pointer: coarse) {
  .brand-del {
    opacity: 1;
  }
}

.brand-add {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px dashed var(--line-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}

.brand-add:hover {
  color: var(--text);
  border-color: var(--muted);
}

#logoStatus:empty,
#endStatus:empty {
  display: none;
}

.wm-controls {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
}

.wm-controls[hidden] {
  display: none;
}

.seg-corners {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 3px;
}

.seg-corners button {
  width: 30px;
  height: 24px;
  padding: 0;
  position: relative;
}

/* a small square in the corner the button stands for */
.seg-corners button i {
  position: absolute;
  width: 8px;
  height: 6px;
  border-radius: 1.5px;
  background: currentColor;
  opacity: .7;
}

.seg-corners [data-v="tl"] i { top: 5px; left: 6px; }
.seg-corners [data-v="tr"] i { top: 5px; right: 6px; }
.seg-corners [data-v="bl"] i { bottom: 5px; left: 6px; }
.seg-corners [data-v="br"] i { bottom: 5px; right: 6px; }

.seg-corners button.on i {
  opacity: 1;
}

.card-art,
.card-auto {
  display: grid;
  gap: 12px;
}

.card-art[hidden],
.card-auto[hidden] {
  display: none;
}

/* the logo on the preview (positioned from app.js, like brand.watermark() in the video) */
.phone-wm {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
}

.phone-wm[hidden] {
  display: none;
}

.phone-card.art > :not(.pc-art) {
  display: none;
}

.pc-art {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
}

.pc-art[hidden] {
  display: none;
}

.phone-card.art-full {
  padding: 0;
  background: #000;
}

.phone-card.art-full .pc-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

@media (max-width: 520px) {
  .wm-controls {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .wm-controls .range {
    grid-column: 1 / -1;
  }
}

/* release end card */
.end-card-box {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.end-card-fields {
  display: grid;
  gap: 12px;
}

.end-card-fields[hidden] {
  display: none;
}

.card-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-presets button {
  border: 1px solid var(--line-2);
  background: none;
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.card-presets button:hover {
  border-color: var(--muted);
  color: var(--text);
}

.card-presets button.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.card-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-inputs input {
  min-width: 0;
}

.card-cover {
  display: grid;
  gap: 6px;
}

.cover-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cover-item {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
}

.cover-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-item.none {
  border: 1.5px dashed var(--line-2);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1.15;
}

.cover-item.on {
  border: 2px solid var(--text);
  color: var(--text);
}

.cover-grid .hint {
  flex: 1 1 140px;
  font-size: 12px;
}

/* the card on the preview: same stacking as card_layout() in backend/app/render.py */
.phone-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  padding: 12% 7% 14%;
  text-align: center;
  background: linear-gradient(rgba(11, 13, 17, .62), rgba(11, 13, 17, .8));
  animation: card-in .35s ease-out;
}

.phone-card[hidden] {
  display: none;
}

.phone[data-aspect="9:16"][data-safe="true"] .phone-card {
  padding: 13% 15% 24% 6%;
}

.phone.card-on .phone-caption,
.phone.card-on .phone-title,
.phone.card-on .phone-wave {
  visibility: hidden;
}

@keyframes card-in {
  from { opacity: 0; }
}

.pc-cover {
  max-width: 66%;
  max-height: 46%;
  border-radius: 5.5%/5.5%;
  object-fit: cover;
  box-shadow: 0 3cqw 6cqw rgba(0, 0, 0, .55);
  margin-bottom: 3cqw;
}

.pc-cover[hidden] {
  display: none;
}

.phone[data-aspect="16:9"] .pc-cover,
.phone[data-aspect="1:1"] .pc-cover {
  max-height: 40%;
}

.pc-main {
  color: var(--accent);
  font-weight: 900;
  font-size: 7.6cqw;
  line-height: 1.15;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px #000;
}

.pc-sub,
.pc-handle {
  color: #fff;
  font-weight: 700;
  font-size: 3.7cqw;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pc-handle {
  opacity: .88;
  font-size: 4.4cqw;
}

.pc-handle:empty,
.pc-sub:empty,
.pc-main:empty {
  display: none;
}

.phone[data-aspect="16:9"] .pc-main,
.phone[data-aspect="1:1"] .pc-main {
  font-size: 7.6cqh;
}

.phone[data-aspect="16:9"] .pc-sub,
.phone[data-aspect="16:9"] .pc-handle,
.phone[data-aspect="1:1"] .pc-sub,
.phone[data-aspect="1:1"] .pc-handle {
  font-size: 3.8cqh;
}

@media (max-width: 520px) {
  .card-inputs {
    grid-template-columns: 1fr;
  }
}

.more-opts {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.more-grid {
  display: grid;
  gap: 14px;
}

.hint.rights {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

/* safe area of the social apps on 9:16 (same numbers as SAFE_9x16 in backend/app/render.py) */
.phone-wrap {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.guide-btn {
  border: 0;
  background: none;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-btn:hover,
.guide-btn[aria-pressed="true"] {
  color: var(--text);
}

.phone-safe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.phone[data-guides="on"] .phone-safe {
  opacity: 1;
}

.phone:not([data-aspect="9:16"]) .phone-safe {
  display: none;
}

.phone-safe i {
  position: absolute;
  background: repeating-linear-gradient(135deg, rgba(255, 59, 47, .28) 0 4px, rgba(255, 59, 47, .08) 4px 9px);
  border: 1px dashed rgba(255, 59, 47, .7);
}

.phone-safe .z-top { left: 0; right: 0; top: 0; height: 13%; border-top: 0; border-left: 0; border-right: 0; }
.phone-safe .z-bottom { left: 0; right: 0; bottom: 0; height: 24%; border-bottom: 0; border-left: 0; border-right: 0; }
.phone-safe .z-right { right: 0; top: 13%; bottom: 24%; width: 15%; border-right: 0; border-top: 0; border-bottom: 0; }

/* centred text keeps the same margin on both sides, the right one (render.py: ml = mr) */
.phone[data-aspect="9:16"][data-safe="true"] .phone-caption {
  left: 15%;
  right: 15%;
  bottom: 24%;
}

.phone[data-aspect="9:16"][data-safe="true"] .phone-caption[data-pos="top"] {
  top: 13%;
  bottom: auto;
}

.phone[data-aspect="9:16"][data-safe="true"] .phone-caption[data-pos="center"] {
  top: 44.5%;
  bottom: auto;
}

.phone[data-aspect="9:16"][data-safe="true"] .phone-title {
  top: 13%;
  left: 15%;
  right: 15%;
}

/* live preview */
.phone {
  --accent: #FF4A36;
  --fs: 1;
  position: relative;
  width: 158px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(170deg, #6B3A22 0%, #2A1810 55%, #110D0B 100%);
  /* size, not inline-size: the square and landscape texts are sized in cqh, which without a height to go by
     falls back to the window's height (a 75 px lyric on a 1000 px screen). Width and aspect ratio fix its size. */
  container-type: size;
}

.phone[data-aspect="1:1"] {
  width: 240px;
  aspect-ratio: 1;
}

.phone[data-aspect="16:9"] {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.phone-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .55)),
    linear-gradient(160deg, #110D0B 5%, color-mix(in srgb, var(--accent) 48%, #110D0B) 50%, #2A1410 95%);
}

.phone-bg img,
.phone-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-bg.blur {
  background: #000;
}

.phone-bg.blur .bgfill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) brightness(.8);
  transform: scale(1.1);
}

.phone-bg.blur .fg {
  position: absolute;
  inset: 0;
  object-fit: contain;
}

/* a tap on the preview plays / pauses: the icon of what it did flashes in the middle */
#phone {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#phone:focus-visible {
  outline: 2px solid var(--rec);
  outline-offset: 3px;
}

.phone-tap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  opacity: 0;
  pointer-events: none;
}

.phone-tap.show {
  animation: phone-tap .7s ease-out forwards;
}

@keyframes phone-tap {
  0% { opacity: 1; transform: scale(.85); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-tap.show {
    animation-duration: .5s;
    animation-timing-function: steps(1, end);
  }
}

.phone-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .2);
}

.phone-title {
  position: absolute;
  top: 6%;
  left: 6%;
  right: 6%;
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: calc(5cqw * var(--fs));
  text-shadow: 0 1px 3px #000;
}

.phone-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 51%;
  height: 9%;
  display: flex;
  align-items: flex-end;
  gap: 1%;
  padding: 0 2%;
  -webkit-box-reflect: below 0 linear-gradient(transparent, rgba(0, 0, 0, .35));
}

.phone[data-aspect="1:1"] .phone-wave,
.phone[data-aspect="16:9"] .phone-wave {
  top: 37%;
  height: 13%;
}

.phone[data-aspect="9:16"][data-fit-blur="true"] .phone-wave {
  top: 67%;
  height: 6%;
}

.phone-wave i {
  flex: 1;
  background: var(--accent);
  border-radius: 1px 1px 0 0;
  min-height: 2px;
  transition: height .08s;
}

.phone-caption {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 14%;
  text-align: center;
  display: grid;
  gap: 1.5cqw;
}

.phone-caption[data-pos="center"] {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
}

.phone-caption[data-pos="top"] {
  bottom: auto;
  top: 16%;
}

.phone-lyric,
.phone-trans {
  color: #fff;
  line-height: 1.15;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 4px rgba(0, 0, 0, .6);
}

.phone-lyric {
  font-weight: 800;
  font-size: calc(7.5cqw * var(--fs));
}

.phone[data-aspect="1:1"] .phone-lyric,
.phone[data-aspect="16:9"] .phone-lyric {
  font-size: calc(7.5cqh * var(--fs));
}

.phone-lyric[data-style="word"] {
  font-size: calc(12cqw * var(--fs));
}

.phone-trans {
  font-weight: 700;
  font-style: italic;
  opacity: .92;
  font-size: calc(4.5cqw * var(--fs));
}

.phone[data-aspect="1:1"] .phone-trans,
.phone[data-aspect="16:9"] .phone-trans {
  font-size: calc(4.5cqh * var(--fs));
}

.phone-trans:empty {
  display: none;
}

.phone-lyric .sung {
  color: var(--accent);
}

.phone-lyric.upper {
  text-transform: uppercase;
}

/* ---------- lyrics ---------- */
.lyrics {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
}

.lyrics summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.lyric-lines {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 4px;
  max-height: 440px;
  overflow: auto;
}

.lyric-lines li {
  display: grid;
  grid-template-columns: 4.8em auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.lyric-lines.with-trans li {
  grid-template-columns: 4.8em auto minmax(0, 1fr) minmax(0, 1fr);
}

.time-btn {
  background: none;
  border: 0;
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.time-btn:hover {
  color: var(--text);
}

.line-nudge button {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

.lyric-lines input {
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  min-width: 0;
}

.lyric-lines input:focus {
  border-color: var(--line-2);
  outline: none;
}

.lyric-lines .trans-input {
  font-style: italic;
  color: var(--muted);
}

.lyric-lines li.now input {
  border-color: var(--rec);
}

.lyrics-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 12px 0 4px;
}

.lyrics-tools .nudge button {
  width: auto;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.translate-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

/* ---------- renders ---------- */
.renders {
  margin-top: 36px;
}

.render-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.render {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  align-self: start; /* a 16:9 video next to 9:16 ones keeps its own height instead of stretching */
}

.render video {
  width: 100%;
  max-height: 420px;
  background: #000;
  display: block;
}

/* a video still being made: same frame as the finished one, so nothing jumps when it arrives */
.render-wait {
  --accent: var(--rec);
  --p: 0;
  position: relative;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  padding: 14px 12px 16px;
  text-align: center;
  color: var(--text);
  isolation: isolate;
  /* the clip's own still, blurred; without an original video, the accent gradient of generated backgrounds */
  background: linear-gradient(160deg, #110D0B 5%, color-mix(in srgb, var(--accent) 38%, #110D0B) 55%, #1C100C 95%);
}

.render-wait::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: -2;
  background: var(--still, none) center / cover no-repeat;
  filter: blur(14px) brightness(.55) saturate(1.1);
}

/* a slow light sweep: something is being made */
.render-wait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%) -150% 0 / 200% 100% no-repeat,
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .45));
  animation: rw-sweep 2.6s ease-in-out infinite;
}

@keyframes rw-sweep {
  to { background-position: 250% 0, 0 0; }
}

.rw-badge {
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(10, 8, 7, .55);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.rw-badge .rec-dot {
  animation: rw-rec 1.2s steps(1) infinite;
}

@keyframes rw-rec {
  50% { opacity: .25; }
}

.render-wait.queued .rw-badge .rec-dot {
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

.rw-ring {
  position: relative;
  width: clamp(64px, 42%, 104px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.rw-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rw-ring circle {
  fill: none;
  stroke-width: 3.5;
}

.rw-track {
  stroke: rgba(255, 255, 255, .14);
}

.rw-arc {
  stroke: var(--rec);
  stroke-linecap: round;
  stroke-dasharray: calc(var(--p) * 1px) 100px;
  transition: stroke-dasharray .6s ease-out;
  filter: drop-shadow(0 0 4px rgba(255, 59, 47, .6));
}

/* nothing measurable yet: a short arc going round */
.render-wait.spin .rw-arc {
  stroke-dasharray: 22px 100px;
  transition: none;
}

.render-wait.spin .rw-ring svg {
  animation: rw-spin 1.1s linear infinite;
}

@keyframes rw-spin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

.render-wait.queued .rw-arc {
  stroke: var(--muted);
  stroke-dasharray: 2px 6px;
  filter: none;
}

.rw-pct {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.rw-eta {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.render-wait.wide {
  padding: 10px 12px 10px;
}

.render-wait.wide .rw-ring {
  width: 54px;
}

.render-wait.wide .rw-pct {
  font-size: 15px;
}

.render-wait.failed {
  grid-template-rows: auto;
  align-content: center;
  gap: 8px;
  background: var(--bg);
}

.render-wait.failed .rw-label {
  font-weight: 700;
}

.render-wait.failed .err {
  font-size: 13px;
  line-height: 1.4;
  color: var(--danger);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .render-wait::after,
  .rw-badge .rec-dot,
  .render-wait.spin .rw-ring svg {
    animation: none;
  }
}

.render-info {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.render-info .clip-time {
  display: block;
}

.render-info a {
  color: var(--text);
  font-weight: 600;
}

.render-info .err {
  color: var(--danger);
}

.render-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* the phone's share sheet: "Salvar vídeo", TikTok, Instagram */
.render-share {
  border: 0;
  background: none;
  padding: 0;
  color: var(--rec);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.render-share:disabled {
  color: var(--muted);
  cursor: progress;
}

/* "Me avise quando ficar pronto" while a song or its videos are being made */
.notify-nudge {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 0 0 14px;
}

.processing .notify-nudge {
  justify-items: center;
  margin: 0;
}

.notify-nudge p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.notify-nudge p svg {
  vertical-align: -3px;
  margin-right: 6px;
}

.notify-nudge .link-btn {
  margin-left: 4px;
}

.notify-nudge .btn svg {
  flex: none;
}

.notify-nudge .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.install-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .style-col {
    position: static;
  }
}

@media (max-width: 980px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .features,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .crumb {
    display: none !important;
  }

  .features,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .demo-wave {
    height: 100px;
  }

  .song-head {
    flex-direction: column;
    align-items: start;
  }

  .transport {
    align-self: stretch;
    justify-content: space-between;
  }

  .advanced {
    grid-template-columns: 1fr;
  }

  /* clip card: checkbox, preview, text and score on one row; the time controls get the full width below */
  .clip {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px;
  }

  .clip-thumb {
    width: 72px;
  }

  .clip-score b {
    font-size: 20px;
  }

  .clip-score .meter {
    width: 44px;
  }

  .clip-times {
    grid-column: 1 / -1;
    gap: 8px 14px;
  }

  .clips-col .col-head {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .clips-col .col-head h2 {
    flex: 1 0 100%;
  }

  /* phones: no colour key or how-to under the wave (the cut's chip already names its part); it took the room */
  .legend {
    display: none;
  }

  /* lyrics: time and nudge on top, the line gets the whole width */
  .lyric-lines li,
  .lyric-lines.with-trans li {
    grid-template-columns: auto auto minmax(0, 1fr);
    row-gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  .lyric-lines li input,
  .lyric-lines .trans-input {
    grid-column: 1 / -1;
  }

  .translate-tools {
    margin-left: 0;
  }

  /* header: flag without the code, "new song" as an icon */
  .topbar {
    gap: 10px;
    padding-inline: 14px;
  }

  .topbar-right {
    gap: 6px;
  }

  .brand {
    font-size: 18px;
  }

  .lang-code {
    display: none;
  }

  #newSongBtn .btn-text {
    display: none;
  }

  #newSongBtn {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  /* my songs: no arrangement; long titles wrap to two lines, the artist and the date go under them */
  .song {
    grid-template-columns: 52px minmax(0, 1fr) 32px;
    grid-template-areas: "art main actions" "art end actions";
    row-gap: 4px;
    column-gap: 12px;
    padding: 10px 6px;
  }

  .song-art {
    width: 52px;
    height: 52px;
    align-self: start;
  }

  .song-actions {
    align-self: start;
  }

  .song-wave {
    display: none;
  }

  .song:not(.is-ready) .song-main {
    grid-column: auto;
  }

  .song-link {
    flex-direction: column;
    gap: 0;
  }

  .recent .title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .recent .artist {
    font-size: 13px;
    max-width: 100%;
  }

  .song-sub {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .song-err {
    white-space: normal;
  }

  .song-end {
    display: flex;
    gap: 8px;
    justify-items: start;
  }

  /* touch: the play button is always visible */
  .song-play {
    opacity: 1;
    background: rgba(17, 13, 11, .35);
  }

  /* example arrangement: half the bars, so the gaps fit a phone */
  .demo-wave {
    gap: 1px;
  }

  .demo-wave b:nth-child(even) {
    display: none;
  }

  /* section names do not fit a phone: the colors carry them (same colors as the legend in the studio) */
  .demo-lane span {
    font-size: 0;
    height: 12px;
  }

  .demo-lane {
    height: 12px;
  }

  .demo {
    padding: 14px 12px 12px;
  }
}

/* video look panel on narrow phones: preview on top, choices below at full width */
@media (max-width: 520px) {
  .style-quick {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .style-quick .quick-controls {
    width: 100%;
  }

  .phone {
    width: 180px;
  }
}

/* touch screens: every control gets a finger-sized target */
@media (pointer: coarse) {
  .nudge button {
    width: 34px;
    height: 34px;
  }

  .lyrics-tools .nudge button {
    height: 34px;
    min-width: 44px;
  }

  .check {
    min-height: 40px;
  }

  .check input,
  .clip input[type=checkbox] {
    width: 22px;
    height: 22px;
  }

  .swatches button,
  .quick-controls .swatches button {
    width: 30px;
    height: 30px;
  }

  .quick-controls input[type=color] {
    width: 30px;
    height: 30px;
  }

  .seg button,
  .seg-2 button {
    padding-block: 10px;
  }

  .link-btn,
  .guide-btn {
    padding-block: 8px;
  }

  .icon-btn,
  .icon-btn.icon-sm {
    width: 40px;
    height: 40px;
  }

  .media-row .media-item,
  .media-add {
    width: 56px;
    height: 56px;
  }

  .faq summary {
    padding-block: 20px;
  }

  .footer-cols a {
    padding-block: 6px;
  }
}
/* ---------- forgot password (login) ---------- */
.auth-forgot {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-forgot[hidden] {
  display: none;
}

/* ---------- testers' feedback ---------- */
.feedback-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.feedback-fab:hover {
  border-color: var(--muted);
}

.feedback-fab[hidden] {
  display: none;
}

.feedback-pop {
  top: auto;
  bottom: 72px;
  left: auto;
  right: 20px;
  transform: none;
}

.feedback-pop textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.feedback-ctx:empty {
  display: none;
}

@media (max-width: 640px) {
  .feedback-fab {
    right: 16px;
    bottom: 16px;
  }

  .feedback-pop {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 68px;
  }
}

/* ---------- admin panel ---------- */
.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.admin-card h2 {
  margin: 0;
  font-size: 18px;
}

.admin-card .hint {
  margin: 0;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.admin-list:empty {
  display: none;
}

.adm-msg {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 4px;
}

.adm-msg:first-child {
  border-top: 0;
  padding-top: 0;
}

.adm-msg p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.adm-msg .hint {
  font-size: 12px;
}

.adm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}

.adm-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.adm-user:first-child {
  border-top: 0;
  padding-top: 0;
}

.adm-user > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.adm-user .hint {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-reset {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.adm-reset[hidden] {
  display: none;
}

.adm-reset input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}

#admBackupInfo {
  overflow-wrap: anywhere;
}

/* ======================================================================
   Studio (signed in): side menu, home, songs, styles, brand
   ====================================================================== */
:root {
  --nav-w: 248px;
  --nav-w-closed: 76px;
}

.appnav {
  display: none;
}

.appnav a,
.appnav button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.appnav a svg,
.appnav button svg {
  flex: none;
}

.appnav a:hover,
.appnav button:hover {
  background: rgba(243, 236, 230, .06);
  color: var(--text);
}

.appnav a[aria-current="page"] {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.appnav a[aria-current="page"] svg {
  color: var(--rec);
}

.appnav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 26px;
  padding-left: 10px;
}

.appnav .appnav-brand {
  width: auto;
  height: 40px;
  padding: 0;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.appnav .appnav-brand:hover {
  background: none;
}

.appnav .appnav-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  color: var(--muted);
}

.appnav-links,
.appnav-bottom {
  display: grid;
  gap: 4px;
}

.appnav-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* desktop: a fixed column; the header and the page move right of it */
@media (min-width: 861px) {
  body.in-app .appnav {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 25;
    width: var(--nav-w);
    padding: 22px 14px 20px;
    background: #0C0908;
    border-right: 1px solid var(--line);
  }

  body.in-app .topbar,
  body.in-app main {
    margin-left: var(--nav-w);
  }

  body.in-app main {
    max-width: none;
  }

  body.in-app .topbar {
    background-color: rgba(17, 13, 11, .72);
    border-bottom-color: transparent;
  }

  /* on the studio pages the header is just language and account, over the page (no band) */
  body.in-app:is([data-view="studio"], [data-view="library"], [data-view="styles"], [data-view="brand"], [data-view="credits"], [data-view="plans"]) .topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    pointer-events: none;
  }

  body.in-app:is([data-view="studio"], [data-view="library"], [data-view="styles"], [data-view="brand"], [data-view="credits"], [data-view="plans"]) .topbar > * {
    pointer-events: auto;
  }

  body.in-app:is([data-view="studio"], [data-view="library"], [data-view="styles"], [data-view="brand"], [data-view="credits"], [data-view="plans"]) main {
    padding-top: 8px;
  }

  /* the logo and "Nova música" live in the menu now */
  body.in-app .topbar .brand,
  body.in-app #newSongBtn {
    display: none !important;
  }

  body.in-app .feedback-fab {
    display: none;
  }

  /* collapsed: icons only (always so while editing a song, which needs the width) */
  body.in-app.nav-collapsed .appnav,
  body[data-view="editor"].in-app .appnav,
  body[data-view="processing"].in-app .appnav {
    width: var(--nav-w-closed);
  }

  body.in-app.nav-collapsed .topbar,
  body.in-app.nav-collapsed main,
  body[data-view="editor"].in-app .topbar,
  body[data-view="editor"].in-app main,
  body[data-view="processing"].in-app .topbar,
  body[data-view="processing"].in-app main {
    margin-left: var(--nav-w-closed);
  }

  body.in-app.nav-collapsed .appnav-label,
  body.in-app.nav-collapsed .appnav-word,
  body[data-view="editor"].in-app .appnav-label,
  body[data-view="editor"].in-app .appnav-word,
  body[data-view="processing"].in-app .appnav-label,
  body[data-view="processing"].in-app .appnav-word {
    display: none;
  }

  body.in-app.nav-collapsed .appnav-top,
  body[data-view="editor"].in-app .appnav-top,
  body[data-view="processing"].in-app .appnav-top {
    flex-direction: column;
    padding-left: 0;
    gap: 14px;
  }

  body.in-app.nav-collapsed .appnav a,
  body.in-app.nav-collapsed .appnav button,
  body[data-view="editor"].in-app .appnav a,
  body[data-view="editor"].in-app .appnav button,
  body[data-view="processing"].in-app .appnav a,
  body[data-view="processing"].in-app .appnav button {
    justify-content: center;
    padding: 0;
  }

  body[data-view="editor"].in-app .appnav-toggle,
  body[data-view="processing"].in-app .appnav-toggle {
    display: none !important;
  }
}

/* phone: the menu is a bar at the bottom (the header keeps the logo, language and account) */
@media (max-width: 860px) {
  body.in-app .appnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(12, 9, 8, .94);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body.in-app .appnav-top,
  body.in-app .appnav-bottom {
    display: none;
  }

  body.in-app .appnav-links {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }

  body.in-app .appnav-links a {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 54px;
    padding: 0 4px;
    font-size: 11px;
  }

  body.in-app .appnav-links a[aria-current="page"] {
    background: none;
    box-shadow: none;
  }

  body.in-app main {
    padding-bottom: 110px;
  }

  /* above the bottom bar, icon only, out of the way of the cards */
  body.in-app .feedback-fab {
    bottom: 84px;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  body.in-app .feedback-fab span {
    display: none;
  }
}

/* the breadcrumb shows only on the pages of one song: elsewhere the menu says where you are */
body[data-view="studio"] .crumb,
body[data-view="library"] .crumb,
body[data-view="styles"] .crumb,
body[data-view="brand"] .crumb,
body[data-view="credits"] .crumb,
body[data-view="plans"] .crumb {
  display: none;
}

/* ---------- studio pages ---------- */
.studio-home,
#viewLibrary,
#viewStyles,
#viewBrand {
  max-width: 1180px;
  padding-top: 28px;
}

#viewLibrary,
#viewStyles,
#viewBrand {
  max-width: 980px;
}

.studio-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(12px, 3vh, 36px) 0 clamp(24px, 4vh, 40px);
  text-align: center;
}

.studio-hello {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.studio-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.studio-hero .composer-slot {
  width: 100%;
  max-width: 900px;
  text-align: left;
}

/* two highlights, side by side */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  isolation: isolate;
}

.feature-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-hue {
  background:
    radial-gradient(circle at 25% 20%, hsl(var(--hue) 70% 55% / .55), transparent 60%),
    linear-gradient(135deg, hsl(calc(var(--hue) + 40) 45% 22%), var(--panel-2));
}

/* the text needs a dark floor under it, whatever the picture */
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 13, 11, .05) 10%, rgba(17, 13, 11, .62) 55%, rgba(17, 13, 11, .94) 100%);
}

/* the singer stands right of centre: keep him in frame, the text sits on the left */
.minute-card .feature-bg {
  object-position: 72% center;
}

.feature-body {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 24px 26px 26px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(17, 13, 11, .7);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.feature-body h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  max-width: 52ch;
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.feature-actions .btn svg {
  margin-right: 6px;
}

/* latest songs, as covers */
.home-recent {
  margin-top: 44px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.row-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.row-head a {
  color: var(--text-2);
  font-size: 15px;
  white-space: nowrap;
}

.row-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  width: min(320px, 100%);
  padding: 0 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.app-search:focus-within {
  border-color: rgba(255, 107, 74, .6);
}

.app-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.app-search input::placeholder {
  color: #8E8178;
}

.song-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px 18px;
}

.song-card a {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.song-card-art {
  position: relative;
  aspect-ratio: 1;
  margin-bottom: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, hsl(var(--hue) 70% 55% / .55), transparent 60%),
    linear-gradient(135deg, hsl(calc(var(--hue) + 40) 45% 22%), var(--panel-2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: transform .15s;
}

.song-card a:hover .song-card-art {
  transform: translateY(-2px);
}

.song-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.song-card-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 13, 11, .78);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

.song-card-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.song-card.is-error .song-card-art {
  opacity: .55;
}

/* my songs: title and search on one line */
.lib-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* saved styles */
.style-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.style-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}

/* a tiny frame in the style's format and color */
.style-mini {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
}

.style-mini::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}

.style-mini.tall::before { width: 36px; height: 64px; }
.style-mini.square::before { width: 52px; height: 52px; }
.style-mini.wide::before { width: 64px; height: 36px; }

.style-mini i {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  height: 4px;
  border-radius: 2px;
}

.style-mini i:first-child { bottom: 22px; width: 24px; background: var(--accent); }
.style-mini i:last-child { bottom: 15px; width: 16px; background: var(--text-2); }
.style-mini.wide i:first-child { bottom: 26px; }
.style-mini.wide i:last-child { bottom: 20px; }

.style-name {
  display: block;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.style-name[hidden] {
  display: none;
}

.style-rename {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.style-rename[hidden] {
  display: none;
}

.style-rename input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

.style-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.style-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.style-actions {
  display: flex;
  gap: 8px;
}

.btn.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 122, 107, .4);
}

.empty-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-2);
  text-align: center;
}

.empty-panel p {
  margin: 0 0 6px;
}

.empty-panel[hidden] {
  display: none;
}

/* brand images */
.brand-page {
  display: grid;
  gap: 36px;
}

.brand-section .row-head {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
}

.brand-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.brand-tile {
  margin: 0;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.brand-tile-img {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 16px;
  /* a checkerboard, so transparent logos read as transparent */
  background: repeating-conic-gradient(#221A16 0 25%, #1A1411 0 50%) 0 0 / 18px 18px;
}

.brand-tile.end .brand-tile-img {
  aspect-ratio: 9 / 12;
  padding: 0;
}

.brand-tile-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.brand-tile.end .brand-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-tile figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px 10px 14px;
  font-size: 14px;
}

.brand-tile figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-tile-del {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.brand-tile-del:hover {
  color: var(--danger);
  background: rgba(255, 122, 107, .08);
}

.brand-tile-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 160px;
  border-style: dashed;
  border-color: var(--line-2);
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.brand-tile-add:hover {
  color: var(--text);
  border-color: rgba(255, 107, 74, .5);
}

/* "Veja em 1 minuto", played over the page */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.video-modal[hidden] {
  display: none;
}

.video-box {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-box .auth-close {
  z-index: 2;
}

@media (max-width: 860px) {
  .feature-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card {
    min-height: 240px;
  }

  .row-head {
    flex-wrap: wrap;
  }

  .row-tools {
    width: 100%;
    justify-content: space-between;
  }

  .song-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .style-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .style-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* ======================================================================
   Studio: credits, notifications, "Mais" and upgrade (bottom of the menu)
   ====================================================================== */
.appnav .appnav-notif,
.top-bell {
  position: relative;
}

.notif-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--rec);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 12px rgba(255, 59, 47, .55);
}

.appnav .notif-badge {
  margin-left: auto;
}

/* "Fazer upgrade": the pill at the very bottom */
.appnav .appnav-upgrade {
  margin-top: 12px;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-weight: 600;
}

.appnav .appnav-upgrade svg {
  width: 18px;
  height: 18px;
  color: var(--rec);
}

.appnav .appnav-upgrade:hover {
  background: var(--rec);
  border-color: var(--rec);
  color: #fff;
}

.appnav .appnav-upgrade:hover svg {
  color: #fff;
}

.appnav .appnav-upgrade[aria-current="page"] {
  background: var(--panel-2);
  box-shadow: none;
}

/* "Mais": a menu beside the column */
.appnav-more {
  position: relative;
}

.more-menu {
  position: absolute;
  left: calc(100% + 26px);
  bottom: -8px;
  z-index: 40;
  width: 270px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
}

.appnav .more-menu a,
.appnav .more-menu button {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
}

.appnav .more-menu .more-phone {
  display: none;
}

.more-who {
  display: grid;
  gap: 2px;
  margin: 4px 12px 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.more-who b,
.more-who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-who b {
  font-size: 15px;
}

.more-who span {
  color: var(--muted);
  font-size: 13px;
}

.more-lang {
  display: flex;
  gap: 6px;
  margin: 4px 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.appnav .more-lang button {
  flex: 1;
  width: auto;
  height: 32px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.appnav .more-lang button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* the notices: a panel beside the column (under the header on a phone) */
.notif-panel {
  position: fixed;
  z-index: 45;
  left: calc(var(--nav-w) + 12px);
  bottom: 16px;
  width: min(400px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  overflow: hidden;
}

body.nav-collapsed .notif-panel,
body[data-view="editor"] .notif-panel,
body[data-view="processing"] .notif-panel {
  left: calc(var(--nav-w-closed) + 12px);
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 8px 20px;
}

.notif-head h2 {
  font-size: 18px;
}

.notif-head .auth-close {
  position: static;
}

.notif-list {
  flex: 1;
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}

a.notif-item:hover {
  background: rgba(243, 236, 230, .05);
}

.notif-list li.unread .notif-item {
  background: rgba(255, 59, 47, .07);
}

.notif-list li.unread .notif-text b::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--rec);
  vertical-align: middle;
}

.notif-ic {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text-2);
}

.notif-ic.ok { color: #6FB5A8; background: rgba(111, 181, 168, .14); }
.notif-ic.err { color: var(--rec); background: rgba(255, 59, 47, .14); }
.notif-ic.gift { color: #F5A524; background: rgba(245, 165, 36, .14); }

.notif-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-text b {
  font-size: 15px;
  font-weight: 600;
}

.notif-text span {
  color: var(--text-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.notif-text small {
  color: var(--muted);
  font-size: 12px;
}

.notif-empty {
  padding: 24px 28px 34px;
  text-align: center;
}

.notif-empty p {
  margin: 0 0 6px;
}

.notif-push {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
}

.notif-push p {
  margin: 0;
}

.notif-push p svg {
  margin-right: 6px;
  vertical-align: -3px;
}

.top-bell {
  display: none;
}

/* ---------- "Ganhar créditos" ---------- */
#viewCredits,
#viewPlans {
  max-width: 980px;
  padding-top: 28px;
}

#viewPlans {
  max-width: 1180px;
}

.credits-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 16px;
}

.credits-stat {
  display: grid;
  gap: 4px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.credits-stat:first-child {
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 59, 47, .2), transparent 60%), var(--panel);
}

.credits-stat span {
  color: var(--muted);
  font-size: 14px;
}

.credits-stat b {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.credits-stat small {
  color: var(--muted);
  font-size: 13px;
}

.credits-link {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.credits-link h2 {
  font-size: 18px;
}

.credits-copy {
  display: flex;
  gap: 10px;
}

.credits-copy input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.credits-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.credits-share .hint {
  margin: 0 0 0 auto;
}

.credits-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.credits-steps li {
  display: grid;
  align-content: start;
  gap: 4px;
  counter-increment: step;
}

.credits-steps li::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-size: 14px;
  font-weight: 700;
}

.credits-steps li:last-child::before {
  background: var(--rec);
  border-color: var(--rec);
  color: #fff;
}

.credits-steps b {
  font-size: 16px;
}

.credits-steps span {
  color: var(--muted);
  font-size: 14px;
}

.credits-friends ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.credits-friends li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.credits-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 700;
}

.credits-who {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.credits-who span {
  color: var(--muted);
  font-size: 13px;
}

.credits-friends em {
  color: #F5A524;
  font-style: normal;
  font-weight: 700;
}

.credits-beta {
  margin-top: 26px;
}

/* ---------- plans inside the studio ---------- */
#plansSlot #planos {
  margin-top: 24px;
}

body.in-app #planos .section-head {
  display: none !important;
}

#planos .plan-current {
  height: 44px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.plans-status {
  margin: 18px 0 0;
  text-align: center;
  color: var(--text-2);
}

/* ---------- desktop: the badge on the bell when the column is icons only ---------- */
@media (min-width: 861px) {
  body.in-app.nav-collapsed .appnav .notif-badge,
  body[data-view="editor"].in-app .appnav .notif-badge,
  body[data-view="processing"].in-app .appnav .notif-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10.5px;
    line-height: 18px;
  }

  body.in-app.nav-collapsed .appnav .appnav-upgrade,
  body[data-view="editor"].in-app .appnav .appnav-upgrade,
  body[data-view="processing"].in-app .appnav .appnav-upgrade {
    border-radius: 14px;
  }
}

/* ---------- phone: five in the bottom bar, the bell in the header ---------- */
@media (max-width: 860px) {
  body.in-app .appnav {
    justify-content: space-around;
  }

  body.in-app .appnav-links,
  body.in-app .appnav-bottom {
    display: contents;
  }

  body.in-app .appnav-bottom > a,
  body.in-app .appnav-bottom > .appnav-notif {
    display: none;
  }

  body.in-app .appnav-links a,
  body.in-app .appnav-more {
    flex: 1;
    min-width: 0;
  }

  /* "Enviar feedback" is in "Mais" now */
  body.in-app .feedback-fab {
    display: none;
  }

  body.in-app .feedback-pop {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  body.in-app .appnav-more > button {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 54px;
    padding: 0 4px;
    font-size: 11px;
  }

  body.in-app .more-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }

  body.in-app .appnav .more-menu .more-phone {
    display: flex;
  }

  body.in-app .top-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-2);
    cursor: pointer;
  }

  .top-bell .notif-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10.5px;
    line-height: 18px;
  }

  .notif-panel {
    left: 12px;
    right: 12px;
    top: 66px;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - 160px);
  }

  body.nav-collapsed .notif-panel,
  body[data-view="editor"] .notif-panel,
  body[data-view="processing"] .notif-panel {
    left: 12px;
  }

  .credits-steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .credits-stat b {
    font-size: 34px;
  }

  .credits-share .hint {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* ---------- the account in the side menu (the header loses it, and the language, in the studio) ---------- */
body.in-app #langSwitch,
body.in-app #account {
  display: none !important;
}

.appnav-user {
  position: relative;
  margin-top: 4px;
}

.appnav #appNavUser {
  min-width: 0;
}

.appnav-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0 -4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brasa), #6E1730);
  color: var(--on-brasa);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.appnav-username {
  overflow: hidden;
  text-overflow: ellipsis;
}

.more-menu.user-menu {
  top: 0;
  bottom: auto;
}

.user-credits {
  margin-top: 4px;
  color: #F5A524 !important;
  font-weight: 600;
}

/* on a computer the name is in the menu already: "Mais" skips it */
@media (min-width: 861px) {
  .appnav #moreMenu .more-who {
    display: none;
  }
}

@media (max-width: 860px) {
  body.in-app .appnav-user {
    display: none;
  }
}

/* ---------- plans: invite with a plan, the month's use, locked options ---------- */
.invite-pop {
  z-index: 60;
}

.invite-setup {
  display: grid;
  gap: 12px;
}

#inviteResult {
  display: grid;
  gap: 12px;
}

#inviteResult[hidden],
.invite-setup[hidden] {
  display: none;
}

.invite-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.invite-field select,
.adm-plan select,
.adm-plan .adm-credits-n {
  height: 40px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.auth-plan {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 165, 36, .12);
  color: #F5C46A;
  font-size: 13.5px;
  font-weight: 600;
}

/* side menu: "Grátis · 1 de 1 música este mês", above the upgrade pill */
.appnav .appnav-usage {
  height: auto;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: normal;
  line-height: 1.4;
}

.appnav .appnav-usage:hover {
  background: none;
  color: var(--text-2);
}

body.in-app.nav-collapsed .appnav-usage,
body[data-view="editor"].in-app .appnav-usage,
body[data-view="processing"].in-app .appnav-usage {
  display: none;
}

.user-plan {
  margin-top: 4px;
  color: var(--text-2) !important;
  white-space: normal !important;
}

/* a format the plan does not include: visible, but marked */
.seg button.locked {
  opacity: .45;
}

.seg button.locked::after {
  content: " 🔒";
  font-size: 11px;
}

.adm-plan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.adm-plan .hint {
  flex-basis: 100%;
}

.adm-plan .adm-credits-n {
  width: 84px;
}

@media (max-width: 860px) {
  body.in-app .appnav-usage {
    display: none !important;
  }
}

/* admin: name and "nova senha" on the first line, the plan below */
.adm-user .adm-plan {
  grid-column: 1 / -1;
  order: 2;
}

.adm-user .adm-reset {
  order: 3;
}

/* ======================================================================
   Responsive pass: touch targets, the composer on phones, narrow fixes
   (audit at 320 · 360 · 390 · 430 · 768 · 1024 · 1280 · 1440 · 1920)
   ====================================================================== */

/* ---------- fingers: 40 px minimum where the pointer is a finger (phones, tablets) ---------- */
@media (pointer: coarse) {
  .btn-sm,
  .pill-btn,
  .lang-btn,
  .plan-toggle button,
  .seg button,
  .song-btn,
  .render-share,
  .credits-share .btn,
  #zipBtn,
  select,
  .studio-head select,
  .col-head select,
  .col-head .btn {
    min-height: 40px;
  }

  .round-btn,
  .song-more,
  .icon-btn.icon-sm {
    width: 40px;
    height: 40px;
  }

  /* inline text buttons ("Começar no gancho", "Ver área das redes"): taller hit area, same look */
  .link-btn,
  .guide-btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .appnav .more-lang button {
    min-height: 40px;
  }

  #newSongBtn {
    min-width: 40px;
    min-height: 40px;
  }

  details > summary {
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  /* clip times: − / + of 24 px become 36 px squares (the row has room) */
  .nudge button {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  /* the whole-lyrics shift (−0,5 / −0,1 / +0,1 / +0,5) */
  #globalShift button {
    min-height: 40px;
  }

  .clip input[type=checkbox] {
    width: 24px;
    height: 24px;
  }

  .swatches {
    gap: 10px;
  }

  .swatches button,
  .quick-controls .swatches button {
    width: 40px;
    height: 40px;
  }

  input[type=color],
  .quick-controls input[type=color] {
    width: 40px;
    height: 40px;
  }

  .time-btn {
    min-height: 36px;
    min-width: 40px;
  }
}

/* ---------- the composer on phones: short hint, the action on its own full-width line ---------- */
@media (max-width: 560px) {
  .composer {
    padding: 16px 14px 14px 16px;
  }

  /* 16 px: iPhone zooms the page into any field with smaller text */
  .composer input[type=text] {
    font-size: 16px;
  }

  .composer-row .btn-rec {
    flex: 1 0 100%;
    margin-left: 0;
    justify-content: center;
    min-height: 48px;
  }
}

/* ---------- studio home: "Recentes", the search and "Ver todas" share the line, or wrap ---------- */
.row-head {
  flex-wrap: wrap;
  row-gap: 12px;
}

@media (max-width: 560px) {
  /* phones: "Recentes" alone, then the search stretching with "Ver todas" beside it */
  .home-recent .row-tools {
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .home-recent .row-tools .app-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

/* ---------- "Ganhar créditos": the link box stacks on narrow phones ---------- */
@media (max-width: 420px) {
  .credits-copy {
    flex-direction: column;
  }

  .credits-copy .btn {
    width: 100%;
    min-height: 44px;
  }

  .credits-share .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- editor on phones: a smaller song thumbnail leaves the title room ---------- */
@media (max-width: 560px) {
  .song-thumb {
    width: 64px;
    border-radius: 8px;
  }

  .clip-thumb {
    width: 72px;
  }

  .clip-time {
    white-space: nowrap;
  }
}

/* ---------- editor up to tablets: a shortcut to the video look and the "Gerar" button ---------- */
.render-jump {
  display: none;
}

@media (max-width: 1040px) {
  /* a bar: "3 cortes · 1:20 no total" on the left, the way on (look, then "Gerar") on the right */
  body[data-view="editor"] .render-jump {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 24;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 7px 7px 7px 16px;
    border: 1px solid var(--line-2);
    border-radius: 20px;
    background: rgba(35, 27, 23, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--text);
    font: inherit;
    text-align: left;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
    cursor: pointer;
    transition: opacity .2s, transform .2s;
  }

  body[data-view="editor"] .render-jump[hidden] {
    display: none;
  }

  .rj-sum {
    min-width: 0;
    display: grid;
    line-height: 1.2;
  }

  .rj-sum b {
    font-size: 14px;
  }

  .rj-sum small {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }

  .rj-go {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--brasa);
    color: var(--on-brasa);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
  }
}

@media (max-width: 860px) {
  /* above the bottom bar */
  body[data-view="editor"].in-app .render-jump {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

/* the clip's checkbox sits in a 44 px square that selects it too (a finger needs the room) */
.clip-check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -12px -8px;
  cursor: pointer;
}

/* the touch feedback in place of the browser's tap box: a short press on buttons, links and cards */
@media (pointer: coarse) {
  button:not(:disabled):not(.render-jump):active,
  .btn:active,
  .pill-btn:active,
  .round-btn:active,
  .appnav a:active,
  .appnav button:active,
  .song-card:active,
  summary:active,
  label.check:active {
    transform: scale(.97);
    opacity: .85;
    transition: transform .08s, opacity .08s;
  }
}

/* the "Visual e gerar" bar: a short press, like the other buttons */
@media (pointer: coarse) and (max-width: 1040px) {
  body[data-view="editor"] .render-jump:active {
    transform: scale(.98);
    opacity: .9;
  }
}

/* landing header: "Entrar no estúdio" on a computer, "Entrar" / "Estúdio" on a phone (the room is short there) */
.studio-btn .lbl-short {
  display: none;
}

@media (max-width: 640px) {
  .studio-btn .lbl-long {
    display: none;
  }

  .studio-btn .lbl-short {
    display: inline;
  }

  .topbar-right {
    gap: 8px;
  }

  .topbar-right .btn-sm.home-only {
    padding-inline: 12px;
  }
}

/* small phones: the landing header keeps the flag and both buttons; the chevron goes first, then the word */
@media (max-width: 400px) {
  body[data-view="home"] .lang-btn > svg,
  body[data-view="legal"] .lang-btn > svg {
    display: none;
  }

  body[data-view="home"] .lang-btn,
  body[data-view="legal"] .lang-btn {
    padding: 0 9px;
  }
}

@media (max-width: 370px) {
  body[data-view="home"] .topbar .brand,
  body[data-view="legal"] .topbar .brand {
    font-size: 0; /* the word goes, the symbol stays */
    gap: 0;
  }
}

/* ---------- payments: packs, the account's subscription, messages ---------- */
.plan-once dl div {
  align-content: start;
}

.plan-once dl .btn {
  justify-self: start;
  margin-top: 6px;
}

.billing-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 18px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.billing-box p {
  margin: 0;
  color: var(--text-2);
}

#planosMsg:empty {
  display: none;
}

/* ---------- folders, in "Minhas músicas" ---------- */
.folder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.folder-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.folder-chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.folder-chip[aria-pressed="true"] span {
  color: rgba(17, 13, 11, .6);
}

.folder-new {
  border-style: dashed;
}

.folder-locked {
  opacity: .7;
}

.folder-select {
  margin-left: auto;
}

/* one artist's folder: back to the artists, its name, what can be done with it */
.folder-bar.in-folder {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  overflow: visible;
}

.folder-back {
  margin-bottom: 10px;
}

.folder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.folder-head h2 {
  margin: 0;
  font-size: 26px;
  overflow-wrap: anywhere;
}

.folder-head .hint {
  margin: 4px 0 0;
}

.folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folder-actions .danger {
  color: #FF8A80;
}

/* the artists' page */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.artist-card {
  display: grid;
  gap: 3px;
  width: 100%;
  height: 100%;
  align-content: start;
  padding: 10px 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}

.artist-card:hover {
  border-color: rgba(243, 236, 230, .3);
  transform: translateY(-2px);
}

.artist-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin-bottom: 9px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  background: hsl(var(--hue) 32% 20%);
}

.artist-art b {
  color: hsl(var(--hue) 55% 78%);
  font-size: 46px;
}

.artist-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-meta.live {
  color: var(--rec);
}

/* the artist of the song being sent, on the composer */
.composer-folder {
  position: relative;
  max-width: 190px;
}

.composer-folder select {
  min-width: 0;
  max-width: 150px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
}

.composer-folder select option {
  background: var(--panel);
  color: var(--text);
}

/* the folder's window */
.folder-style-field {
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.folder-style-field select {
  width: 100%;
  height: 48px;
  font-size: 16px; /* 16px keeps iPhone from zooming into the field */
}

.folder-style-field .hint {
  font-weight: 400;
}

/* several songs at once */
.song-check {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(17, 13, 11, .45);
  cursor: pointer;
}

.song-check input {
  width: 22px;
  height: 22px;
  accent-color: var(--rec);
  cursor: pointer;
}

#recentList.selecting {
  padding-bottom: 112px;
}

#recentList.selecting .song {
  cursor: pointer;
}

#recentList.selecting .song-actions,
#recentList.selecting .song-play {
  visibility: hidden;
}

#recentList .song.picked {
  outline: 1px solid var(--rec);
  outline-offset: -1px;
}

.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  translate: -50% 0;
}

.bulk-count {
  font-weight: 700;
  white-space: nowrap;
}

#bulkMove {
  max-width: 170px;
}

.song-folder {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(243, 236, 230, .08);
  color: var(--text-2);
  font-size: 12px;
}

.song-menu-head {
  margin: 4px 12px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.song-menu [aria-current="true"] {
  color: var(--rec);
}

@media (pointer: coarse) {
  .folder-chip {
    min-height: 40px;
  }
}

@media (max-width: 560px) {
  /* phones: the chips scroll sideways in one row */
  .folder-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }

  .folder-chip {
    flex: none;
  }

  .artist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* "Minhas músicas": the list sits right under the folders (the 56 px gap was for the song box above it, gone) */
#viewLibrary .recent {
  margin-top: 8px;
  max-width: none;
}

#folderError:empty {
  display: none;
}

/* ---------- forgot password, delete account ---------- */
.auth-forgot {
  justify-self: center;
  padding: 6px 8px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-forgot:hover {
  color: var(--text);
}

.auth-done {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(243, 236, 230, .06);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.auth-done[hidden],
.delete-ask[hidden],
#deleteDone[hidden],
#deletePop .btn[hidden] {
  display: none;
}

.auth-done a {
  color: var(--text);
  font-weight: 600;
}

.more-menu .danger {
  color: var(--danger);
}

.delete-ask {
  display: grid;
  gap: 12px;
}

#deletePop .delete-ask p {
  line-height: 1.5;
}

#deletePassword {
  height: 42px;
  font-size: 15px;
  color: var(--text);
}

/* ---------- "Continuar com o Google" ---------- */
.auth-google {
  display: grid;
  gap: 4px;
}

.auth-google[hidden] {
  display: none;
}

.auth-google-btn {
  display: flex;
  justify-content: center;
  min-height: 44px;
  /* Google's iframe is a light page: inside our dark scheme the browser paints it an opaque white box */
  color-scheme: light;
}

/* ---------- "Minha conta" ---------- */
.profile-modal {
  z-index: 55;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: #1E1916;
  border: 1px solid rgba(243, 236, 230, .1);
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: auth-in .25s cubic-bezier(.2, .7, .2, 1);
}

#profileBody {
  display: grid;
  gap: 14px;
}

.pf-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 40px;
}

.pf-avatar {
  flex: none;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brasa), #6E1730);
  color: var(--on-brasa);
  font-size: 22px;
  font-weight: 700;
}

.pf-who {
  min-width: 0;
  flex: 1;
}

.pf-who h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pf-who h2 span,
.pf-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-edit {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.pf-edit:hover {
  color: var(--text);
  background: rgba(243, 236, 230, .06);
}

.pf-email {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.pf-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.pf-name-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pf-name-form input,
.pf-pass-form input {
  flex: 1 1 180px;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #292320;
  color: var(--text);
  font-size: 16px;
}

.pf-name-form input:focus,
.pf-pass-form input:focus {
  outline: none;
  border-color: rgba(255, 107, 74, .6);
}

.pf-name-form .form-error,
.pf-pass-form .form-error {
  flex-basis: 100%;
  margin: 0;
}

.pf-name-form .form-error:empty,
.pf-pass-form .form-error:empty {
  display: none;
}

.pf-sec {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(243, 236, 230, .035);
  border: 1px solid rgba(243, 236, 230, .06);
}

.pf-sec h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pf-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#pfPlan {
  display: grid;
  gap: 10px;
}

.pf-plan-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(243, 236, 230, .08);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.pf-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

.pf-big b {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pf-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(243, 236, 230, .08);
  overflow: hidden;
}

.pf-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brasa), var(--rec));
}

.pf-small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pf-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.pf-tile {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(243, 236, 230, .05);
}

.pf-tile span {
  color: var(--muted);
  font-size: 12px;
}

.pf-tile b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.pf-tile small {
  color: var(--muted);
  font-size: 12px;
}

.pf-tile a {
  color: var(--text-2);
}

.pf-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pf-features li {
  padding: 5px 10px;
  border: 1px solid rgba(243, 236, 230, .1);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 12.5px;
}

.pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pf-row + .pf-row,
#pfPassword + .pf-row {
  padding-top: 12px;
  border-top: 1px solid rgba(243, 236, 230, .06);
}

.pf-row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pf-row-text b {
  font-size: 15px;
}

.pf-row-text span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pf-row-text .pf-ok {
  color: #7FD1A3;
}

.pf-row > .btn {
  flex: none;
}

.pf-pass-form {
  display: grid;
  gap: 10px;
}

.pf-pass-form .row {
  display: flex;
  gap: 8px;
}

.pf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
}

/* "Mais" on a phone: the name at the top opens "Minha conta" */
.appnav .more-menu button.more-who {
  display: grid;
  gap: 2px;
  justify-items: start;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 4px 0 10px;
  text-align: left;
}

.more-who .more-who-go {
  margin-top: 4px;
  color: var(--text-2) !important;
  font-weight: 600;
}

@media (max-width: 560px) {
  .profile-modal {
    padding: 10px;
    place-items: start center;
  }

  .profile-card {
    padding: 22px 16px 18px;
    border-radius: 24px;
  }

  .pf-sec {
    padding: 14px;
  }

  .pf-avatar {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }

  .pf-row {
    flex-wrap: wrap;
  }
}

/* ---------- "Confirme o seu e-mail" (new e-mail accounts) ---------- */
.verify-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  max-width: 720px;
  margin: 0 auto 18px;
  padding: 10px 16px;
  border: 1px solid rgba(245, 165, 36, .35);
  border-radius: 14px;
  background: rgba(245, 165, 36, .08);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.verify-banner[hidden] {
  display: none;
}

.verify-banner.ok {
  border-color: rgba(127, 209, 163, .4);
  background: rgba(127, 209, 163, .08);
}

.verify-banner.bad {
  border-color: rgba(255, 122, 107, .4);
  background: rgba(255, 122, 107, .08);
}

.pf-warn {
  color: #F5A524;
}

.pf-warn .link-btn {
  font-size: inherit;
}

/* ---------- the eye in password fields ---------- */
.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap > input[data-eye] {
  width: 100%;
  box-sizing: border-box;
  padding-right: 52px;
}

/* Edge draws its own eye in password fields: one is enough */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}

.pw-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.pw-eye:hover,
.pw-eye[aria-pressed="true"] {
  color: var(--text);
}

.pw-eye:focus-visible {
  outline: 2px solid rgba(255, 107, 74, .7);
  outline-offset: -2px;
}

.pw-wrap.no-eye .pw-eye {
  display: none;
}

.pw-wrap.no-eye > input[data-eye] {
  padding-right: 14px;
}

/* ---------- the Google photo in the avatars ---------- */
.avatar,
.appnav-avatar,
.pf-avatar {
  overflow: hidden;
}

#accountInitials:has(img) {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- admin: metrics ---------- */
.metrics {
  display: grid;
  gap: 14px;
}

.metrics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metrics-head h2 {
  margin: 0;
}

.metrics-range {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(243, 236, 230, .06);
}

.metrics-range button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.metrics-range button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.metrics-sub {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.metrics-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 8px;
}

.m-tile {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(243, 236, 230, .045);
}

.m-tile span {
  color: var(--muted);
  font-size: 12.5px;
}

.m-tile b {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.m-tile small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.m-tile.warn {
  box-shadow: inset 0 0 0 1px rgba(245, 165, 36, .5);
}

.m-tile.warn small {
  color: #F5A524;
}

.funnel {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.funnel li {
  display: grid;
  grid-template-columns: minmax(130px, 200px) 1fr 44px 44px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.f-label {
  color: var(--text-2);
}

.f-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(243, 236, 230, .06);
  overflow: hidden;
}

.f-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--brasa);
}

.funnel b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.funnel small {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.metrics-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.m-chart {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px 10px;
  border-radius: 14px;
  background: rgba(243, 236, 230, .045);
}

.m-chart figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  font-size: 14px;
}

.m-chart figcaption span {
  color: var(--muted);
  font-size: 12.5px;
}

.m-bars {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  align-items: end;
  height: 110px;
  border-bottom: 1px solid rgba(243, 236, 230, .14);
}

/* the whole column answers the pointer: a bigger target than the bar */
.m-col {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  padding: 0 1px;
  cursor: default;
}

.m-col i {
  display: block;
  width: 100%;
  max-width: 14px;
  border-radius: 4px 4px 0 0;
  background: var(--brasa);
}

.m-col i.zero {
  height: 0 !important;
}

.m-col.on i {
  background: var(--rec);
}

.m-col.on {
  background: rgba(243, 236, 230, .05);
}

.m-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11.5px;
}

.m-tip {
  position: absolute;
  z-index: 70;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.m-tip[hidden] {
  display: none;
}

.m-fail {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-2);
}

.m-fail b {
  color: var(--danger);
  margin-right: 6px;
}

@media (max-width: 560px) {
  .funnel li {
    grid-template-columns: 1fr 40px 40px;
    gap: 4px 10px;
  }

  .funnel .f-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .m-tile {
    padding: 12px;
  }

  .m-tile b {
    font-size: 22px;
  }
}

/* ---------- admin: checks of the real services (inside .checks: .check is also every checkbox label) ---------- */
.checks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks .check {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(243, 236, 230, .04);
}

.checks .check div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.checks .check div span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.checks .check em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
}

.check-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #7FD1A3;
}

.checks .check.ok em {
  color: #7FD1A3;
}

.checks .check.warn .check-dot {
  background: #F5A524;
}

.checks .check.warn em {
  color: #F5A524;
}

.checks .check.fail {
  box-shadow: inset 0 0 0 1px rgba(255, 122, 107, .45);
}

.checks .check.fail .check-dot {
  background: var(--danger);
}

.checks .check.fail em {
  color: var(--danger);
}

.check-when {
  padding: 4px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- panel tables: where people came from, partners ---------- */
.m-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(243, 236, 230, .035);
}

.m-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.m-table th,
.m-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.m-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(243, 236, 230, .08);
}

.m-table tbody tr + tr td {
  border-top: 1px solid rgba(243, 236, 230, .05);
}

.m-table small {
  color: var(--muted);
}

.partner-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 8px;
  align-items: center;
}

.partner-form input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.partner-pct {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.partner-pct input {
  width: 72px;
}

/* ---------- "Gostou do vídeo?" ---------- */
.refer-pop p {
  line-height: 1.5;
}

.refer-link input {
  flex: 1;
  min-width: 0;
}

.invite-pop .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- phone: the menu floats as an island above the bottom edge ---------- */
@media (max-width: 860px) {
  body.in-app {
    /* the gap below the island; on phones that give the site the whole screen it clears the system bar */
    --island-gap: max(14px, env(safe-area-inset-bottom));
  }

  body.in-app .appnav {
    left: 14px;
    right: 14px;
    bottom: var(--island-gap);
    max-width: 460px;
    margin: 0 auto;
    padding: 6px;
    border: 1px solid rgba(243, 236, 230, .09);
    border-radius: 999px;
    background: rgba(26, 20, 17, .78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  }

  /* without the blur the island is near opaque, so the page under it does not show through */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.in-app .appnav {
      background: rgba(26, 20, 17, .97);
    }
  }

  body.in-app .appnav-links a,
  body.in-app .appnav-more > button {
    height: 52px;
    border-radius: 999px;
  }

  /* equal shares, never narrower than the label ("Minhas músicas" spilled out of an equal fifth); the "+" in the
     middle stays exactly central between two items on each side */
  body.in-app .appnav-links a,
  body.in-app .appnav-more {
    flex: 1 1 0;
    min-width: max-content;
    width: auto; /* the menu's links are 100% wide elsewhere: as a basis, every item asked for the whole island */
  }

  /* the padding on the island's items themselves (for "Mais", its box, not the button in it): equal shares are
     counted inside it, so a padding elsewhere made that item 20 px narrower and the "+" off-centre */
  body.in-app .appnav-links a,
  body.in-app .appnav-more {
    padding: 0 10px;
  }

  body.in-app .appnav-more > button {
    padding: 0;
  }

  /* the page you are on: a soft capsule behind it */
  body.in-app .appnav-links a[aria-current="page"] {
    background: rgba(243, 236, 230, .09);
  }

  /* what sits above the island follows its new height (6 + 52 + 6 + border) */
  body.in-app .more-menu {
    bottom: calc(var(--island-gap) + 76px);
    border-radius: 22px;
  }

  body.in-app .feedback-pop {
    bottom: calc(var(--island-gap) + 76px);
  }

  body.in-app .bulk-bar {
    bottom: calc(var(--island-gap) + 76px);
  }

  body[data-view="editor"].in-app .render-jump {
    bottom: calc(var(--island-gap) + 82px);
  }
}

/* ---------- editor on a computer: a wider "Visual do vídeo" and a bigger preview ---------- */
@media (min-width: 1041px) {
  .workspace {
    /* the cuts keep what is left (their times and scores fit in ~470 px); the look panel grows with the screen */
    grid-template-columns: minmax(0, 1fr) clamp(400px, 42%, 660px);
  }

  .style-quick {
    grid-template-columns: minmax(158px, 48%) minmax(0, 1fr);
  }

  /* the preview fills its column, but always fits on the screen beside the controls */
  .style-quick .phone[data-aspect="9:16"] {
    width: min(100%, 56vh * 9 / 16);
  }

  .style-quick .phone[data-aspect="1:1"] {
    width: min(100%, 360px);
  }
}

/* up to ~1240 px the panel stays near 400 px: the preview keeps its old size so the controls beside it fit */
@media (min-width: 1041px) and (max-width: 1240px) {
  .style-quick {
    grid-template-columns: 158px minmax(0, 1fr);
  }
}

/* ---------- the arrangement: a box that scrolls sideways on phones (app.js draws the song wider there) ---------- */
.wave-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none; /* the song slides under the finger: no bar */
}

.wave-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 640px) {
  /* up and down still scroll the page; sideways is the song's (app.js: the pan) or a cut's edge */
  #waveCanvas {
    touch-action: pan-y;
  }
}

/* ---------- editor on phones: the cut's card ---------- */
/* the sliders button only shows on phones, where the start, end and hook move to the adjust panel */
.clip-adjust {
  display: none;
}

@media (max-width: 640px) {
  /* one short row: checkbox, picture, label / times / reason, score, adjust */
  .clip {
    grid-template-columns: auto 60px minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    align-items: center;
  }

  .clip-check {
    align-self: center;
  }

  .clip-thumb {
    width: 60px;
    aspect-ratio: 1;
  }

  .clip-main {
    gap: 3px;
    cursor: pointer;
  }

  .clip-label {
    gap: 3px 8px;
  }

  #clipList .section-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #clipList .clip-n {
    display: none;
  }

  #clipList .clip-reason {
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .clip-score {
    gap: 5px;
    cursor: pointer;
  }

  .clip-score b {
    font-size: 17px;
  }

  .clip-score .meter {
    width: 28px;
    height: 3px;
  }

  #clipList .clip-times {
    display: none;
  }

  .clip-adjust {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }
}

/* ---------- phones: the panel that adjusts a cut ---------- */
.clip-sheet {
  position: fixed;
  inset: 0;
  z-index: 62;
}

.clip-sheet[hidden] {
  display: none;
}

html.sheet-open {
  overflow: hidden;
}

.clip-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 2, .62);
  opacity: 0;
  transition: opacity .22s;
}

.clip-sheet.open .clip-sheet-scrim {
  opacity: 1;
}

.clip-sheet-panel {
  --c: var(--edge);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 520px;
  max-height: calc(100% - 32px);
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 14px;
  padding: 8px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
  outline: none;
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}

.clip-sheet.open .clip-sheet-panel {
  transform: none;
}

.clip-sheet-grab {
  justify-self: center;
  width: 40px;
  height: 4px;
  margin: 2px 0 0;
  border-radius: 2px;
  background: var(--line-2);
  box-shadow: 0 0 0 12px transparent; /* a bigger place to pull from */
}

.clip-sheet-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg) center / cover no-repeat;
  color: #fff;
  cursor: pointer;
}

.clip-sheet-media.audio {
  aspect-ratio: auto;
  height: 76px;
}

/* the cut's video: whole (a vertical one gets a taller box, app.js), never taller than ~40% of the screen */
.clip-sheet-media:not(.audio) {
  /* the box's width (panel up to 520 px, less its sides) over the video's shape (--ar, app.js), at most 42% of the screen */
  aspect-ratio: auto;
  height: min(42vh, calc((min(100vw, 520px) - 32px) / var(--ar, 1.7778)));
  background: #000;
}

.clip-sheet-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clip-sheet-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, .25);
  transition: opacity .2s;
}

/* playing: the picture clean, the pause button out of the way (a tap still pauses) */
.clip-sheet-media.on::before,
.clip-sheet-media.on .pl {
  opacity: 0;
}

.clip-sheet-media .pl {
  position: relative;
  z-index: 2;
  transition: opacity .2s;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .5);
}

.clip-sheet-media .pl svg {
  width: 20px;
  height: 20px;
}

.clip-sheet-prog {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .25);
}

.clip-sheet-prog span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.clip-sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.clip-sheet-head .clip-reason {
  font-size: 13.5px;
}

.clip-sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.clip-sheet-lab {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}

.clip-sheet-lab small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.big-nudge {
  display: grid;
  grid-template-columns: 52px 92px 52px;
  height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}

.big-nudge button {
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.big-nudge output {
  display: grid;
  place-items: center;
  border-inline: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.hook-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, .35);
  background: rgba(255, 209, 102, .08);
}

.hook-card > svg {
  color: var(--drop);
}

.hook-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.hook-card p b {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.hook-card button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--drop);
  color: var(--bg);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.clip-sheet-foot {
  display: grid;
  gap: 4px;
}

.clip-sheet-done {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--brasa);
  color: var(--on-brasa);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.clip-sheet-foot .remove {
  justify-self: center;
}

@media (prefers-reduced-motion: reduce) {
  .clip-sheet-scrim,
  .clip-sheet-panel {
    transition: none;
  }
}

/* ---------- phones, in the studio: the profile photo in the header, a "+" in the middle of the menu island ---------- */
.top-avatar,
.appnav .appnav-create, /* beats ".appnav a" (flex) in the computer's side menu */
.nav-short {
  display: none;
}

@media (max-width: 860px) {
  body.in-app #newSongBtn {
    display: none !important;
  }

  body.in-app .top-avatar:not([hidden]) {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    overflow: hidden;
    font-size: 12px;
  }

  /* "Minhas músicas" is "Músicas" in the island: with the "+" there are six, and a 320 px phone has to fit them */
  body.in-app .appnav .nav-long {
    display: none;
  }

  body.in-app .appnav .nav-short {
    display: inline;
  }

  body.in-app .appnav-links a.appnav-create {
    display: grid;
    place-items: center;
    flex: none;
    align-self: center;
    width: 46px;
    height: 46px;
    margin: 0 4px;
    padding: 0;
    border-radius: 50%;
    background: var(--brasa);
    color: var(--on-brasa);
    box-shadow: 0 6px 18px rgba(217, 54, 30, .45);
  }

  body.in-app .appnav-links a.appnav-create:hover {
    background: var(--brasa-hover);
    color: var(--on-brasa);
  }
}

/* ---------- phones: "Estilos" and "Marca" share one place in the menu island, with a switch on top of both ---------- */
.page-tabs {
  display: none;
}

@media (max-width: 860px) {
  body.in-app .appnav-links a[data-nav="brand"] {
    display: none;
  }

  /* on the brand page the island's "Estilos" is the page you are on */
  body.in-app[data-view="brand"] .appnav-links a[data-nav="styles"] {
    background: rgba(243, 236, 230, .09);
    color: var(--text);
  }

  body.in-app[data-view="brand"] .appnav-links a[data-nav="styles"] svg {
    color: var(--rec);
  }

  body.in-app .page-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
  }

  .page-tabs a {
    display: grid;
    place-items: center;
    height: 40px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }

  .page-tabs a[aria-current="page"] {
    background: var(--panel-2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-2);
  }
}

/* ---------- admin panel in tabs: Resumo · Crescimento · Contas · Mensagens · Sistema ---------- */
.admin.studio {
  max-width: 960px;
  gap: 16px;
}

.adm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adm-head h1 {
  margin: 0;
}

.adm-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  margin-top: -4px;
}

.adm-tabs::-webkit-scrollbar {
  display: none;
}

.adm-tabs [role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.adm-tabs [role="tab"]:hover {
  color: var(--text);
}

.adm-tabs [role="tab"][aria-selected="true"] {
  color: var(--text);
}

.adm-tabs [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brasa);
}

.adm-tabs [role="tab"]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -4px;
  border-radius: 8px;
}

.adm-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #F5A524;
  color: var(--bg);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.adm-badge.fail {
  background: var(--danger);
}

#admMsgBadge {
  background: var(--text);
}

.adm-badge[hidden] {
  display: none;
}

.adm-pane {
  display: grid;
  gap: 16px;
}

.adm-pane[hidden] {
  display: none;
}

#admMetricsError:empty {
  display: none;
}

/* what needs the admin */
.attn-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attn {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(243, 236, 230, .04);
  font-size: 14.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.attn .check-dot {
  margin-top: 5px;
}

.attn.ok {
  background: rgba(127, 209, 163, .08);
}

.attn.wait {
  display: block;
  color: var(--muted);
}

.attn.info .check-dot {
  background: var(--muted);
}

.attn.warn .check-dot {
  background: #F5A524;
}

.attn.warn {
  box-shadow: inset 0 0 0 1px rgba(245, 165, 36, .35);
}

.attn.fail .check-dot {
  background: var(--danger);
}

.attn.fail {
  box-shadow: inset 0 0 0 1px rgba(255, 122, 107, .5);
}

.attn .link-btn {
  min-height: 24px;
}

/* the four numbers of Resumo, and how they changed */
.metrics-tiles.big {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}

.metrics-tiles.big .m-tile b {
  font-size: 32px;
}

.m-delta {
  justify-self: start;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.m-delta.up {
  color: #7FD1A3;
}

.m-delta.down {
  color: var(--danger);
}

.m-delta.same {
  color: var(--muted);
}

/* accounts: one line each, opened to manage */
.adm-search {
  width: min(280px, 100%);
  height: 40px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

#admUsersTitle small {
  font-size: 14px;
  font-weight: 500;
}

.admin-list .adm-user {
  display: block;
  padding-top: 0;
  border-top: 1px solid var(--line);
}

.adm-user summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}

.adm-user summary::-webkit-details-marker {
  display: none;
}

.adm-user summary::after {
  content: "›";
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: transform .15s;
}

.adm-user details[open] summary::after {
  transform: rotate(90deg);
}

.adm-who {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 220px;
}

.adm-who .hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-facts {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: auto;
}

.adm-plan-name {
  font-size: 13px;
  font-weight: 700;
}

.adm-manage {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 4px 2px 14px;
}

.adm-manage .adm-reset {
  width: 100%;
}

/* the old one-row layout reordered these; here they go in reading order */
.adm-user .adm-manage > * {
  order: 0;
}

/* messages */
.adm-msg .section-chip {
  --c: var(--brasa);
  color: var(--on-brasa);
}

.adm-msg.new p:not(.hint) {
  color: var(--text);
}

/* partners: the form stays folded until it is needed */
.adm-more summary {
  width: max-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--pre);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.adm-more[open] summary {
  margin-bottom: 10px;
}

@media (max-width: 560px) {
  .adm-tabs [role="tab"] {
    padding: 0 11px;
    font-size: 14px;
  }

  /* the row is wider than a phone: fade the edge so the tabs past it show they are there */
  .adm-tabs {
    margin-inline: -16px;
    padding-inline: 10px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 40px), transparent);
  }

  .metrics-tiles.big {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-tiles.big .m-tile b {
    font-size: 24px;
  }

  .adm-search {
    width: 100%;
  }
}

/* ---------- admin: the period (Hoje · 7 · 30 · 90 dias · Datas) ---------- */
.adm-range {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.adm-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.adm-dates[hidden] {
  display: none;
}

.adm-dates label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.adm-dates input {
  height: 38px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  color-scheme: dark;
}

@media (max-width: 560px) {
  .adm-range {
    width: 100%;
    justify-items: stretch;
  }

  .adm-range .metrics-range {
    display: flex;
  }

  .adm-range .metrics-range button {
    flex: 1 1 auto;
    padding: 0 8px;
  }

  .adm-dates label {
    flex: 1 1 120px;
  }
}

/* ---------- the fonts of the videos (frontend/fonts, also read by the renderer) ---------- */
@font-face { font-family: "Archivo Black"; src: url("fonts/ArchivoBlack-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Anton"; src: url("fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("fonts/BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Alfa Slab One"; src: url("fonts/AlfaSlabOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("fonts/PermanentMarker-Regular.ttf") format("truetype"); font-display: swap; }

.phone-caption,
#phoneTitle,
.seg-fonts button {
  font-synthesis: none; /* one weight each: the browser must not thicken them, the video does not */
}

.seg-fonts button {
  font-size: 15px;
  font-weight: 400;
}

.seg-fonts button.on {
  font-weight: 400;
}

.model-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.model-row button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.model-row button:hover {
  color: var(--text);
}

.model-row button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.seg-radio label.locked {
  opacity: .45;
  cursor: not-allowed;
}

/* a video over the limit: which stretch to use */
.proc-section {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 8px auto 18px;
  text-align: left;
}

.proc-section label {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.proc-section-row {
  display: flex;
  gap: 8px;
}

.proc-section-row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px keeps iPhone from zooming into the field */
}

.proc-section .hint {
  margin: 0;
}

/* the Plans page's coupon */
.plan-coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 22px;
}

.plan-coupon input {
  width: 170px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.plan-coupon .hint {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
}

.plan-coupon .hint:empty {
  display: none;
}
