:root {
  color-scheme: dark;
  --bg: #070a0d;
  --surface: #11161a;
  --surface-2: #151a1e;
  --surface-3: #0b0f12;
  --line: rgb(255 255 255 / 0.08);
  --line-soft: rgb(255 255 255 / 0.055);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --green: #10b981;
  --green-soft: #052e26;
  --green-text: #a7f3d0;
  --violet: #7f77dd;
  --violet-soft: #26215c;
  --violet-text: #cecbf6;
  --amber: #ef9f27;
  --amber-soft: #412402;
  --amber-text: #fac775;
  --pink: #d4537e;
  --pink-soft: #4b1528;
  --pink-text: #f4c0d1;
  --danger: #e24b4a;
  --radius: 8px;
  --shadow: 0 22px 80px rgb(0 0 0 / 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  background:
    linear-gradient(140deg, rgb(16 185 129 / 0.08), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgb(255 255 255 / 0.045), transparent 24rem),
    linear-gradient(180deg, #0b0f12 0%, #070a0d 58%, #050607 100%);
}

button {
  font: inherit;
}

button:focus-visible,
[data-action]:focus-visible {
  outline: 2px solid var(--green-text);
  outline-offset: 3px;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background:
    linear-gradient(135deg, rgb(29 158 117 / 0.08), transparent 32%),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.025) 0 1px, transparent 1px 88px);
}

.login-box {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(1rem, 4vw, 2rem);
  width: min(100%, 980px);
  min-height: 520px;
  padding: clamp(1rem, 3vw, 1.4rem);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(32 32 32 / 0.98), rgb(22 22 22 / 0.96)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  margin-bottom: 2.2rem;
  color: var(--green-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-logo,
.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: var(--green);
  border-radius: 50%;
}

.login-logo {
  width: 34px;
  height: 34px;
  color: var(--green-text);
  background: var(--green-soft);
  border: 1px solid var(--green);
  border-radius: var(--radius);
}

.login-title {
  max-width: 9ch;
  margin: 0 0 1rem;
  color: var(--text);
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.92;
}

.login-sub,
.login-footer,
.subtitle,
.hint,
.empty-state,
.empty-inline {
  color: var(--faint);
}

.login-sub {
  max-width: 31rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.7vw, 1.16rem);
}

.login-footer {
  margin: 1rem 0 0;
  color: var(--faint);
  font-size: 0.76rem;
}

.login-btn,
.primary-btn,
.play-btn {
  border: 1px solid color-mix(in srgb, var(--green) 72%, black);
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.login-btn,
.primary-btn {
  min-height: 42px;
  padding: 0.6rem 1rem;
  font-weight: 650;
}

.login-btn {
  width: min(100%, 340px);
  min-height: 50px;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.22), 0 16px 34px rgb(29 158 117 / 0.16);
}

.login-visual {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-height: 100%;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent),
    #191919;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.login-neck {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #3d2413, #6a3d1f 45%, #442614),
    #5c3a1e;
  border: 1px solid #76502e;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05);
}

.login-neck::before {
  content: "";
  position: absolute;
  inset: 0 0 0 34px;
  width: 8px;
  background: #e8e0cc;
  border-radius: 3px;
}

.login-neck::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgb(0 0 0 / 0.12) 38px 39px),
    linear-gradient(90deg, transparent, rgb(255 255 255 / 0.07), transparent);
  pointer-events: none;
}

.login-neck .string,
.login-neck .fret,
.login-neck .note {
  position: absolute;
  z-index: 1;
}

.login-neck .string {
  left: 44px;
  right: 0;
  height: 2px;
  background: #d8bd85;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.25);
}

.login-neck .s1 { top: 17%; height: 4px; }
.login-neck .s2 { top: 31%; height: 3px; }
.login-neck .s3 { top: 45%; height: 2px; }
.login-neck .s4 { top: 59%; height: 2px; }
.login-neck .s5 { top: 73%; height: 1px; }
.login-neck .s6 { top: 87%; height: 1px; }

.login-neck .fret {
  top: 0;
  bottom: 0;
  width: 4px;
  background: #cab99f;
  opacity: 0.85;
}

.login-neck .f1 { left: 27%; }
.login-neck .f2 { left: 46%; }
.login-neck .f3 { left: 65%; }
.login-neck .f4 { left: 84%; }

.login-neck .note {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--green);
  border: 2px solid var(--green-text);
  border-radius: 50%;
}

.login-neck .n1 { top: 12%; left: 18%; }
.login-neck .n2 { top: 37%; left: 39%; background: #2a7a5a; }
.login-neck .n3 { top: 56%; left: 62%; background: var(--violet); border-color: var(--violet-text); }
.login-neck .n4 { top: 75%; left: 79%; background: #2a7a5a; }

.login-panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.login-panel-row span {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  background: #202020;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-screen {
  background:
    linear-gradient(118deg, rgb(29 158 117 / 0.1) 0 1px, transparent 1px 34%),
    linear-gradient(135deg, #101419 0%, #151515 48%, #101310 100%);
}

.login-box {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  align-items: center;
  min-height: 620px;
  padding: clamp(1.4rem, 4vw, 3rem);
  isolation: isolate;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.045), transparent 36%),
    repeating-linear-gradient(158deg, transparent 0 5.6rem, rgb(29 158 117 / 0.035) 5.6rem calc(5.6rem + 1px), transparent calc(5.6rem + 1px) 9rem),
    linear-gradient(160deg, #15191b 0%, #141515 56%, #0e1512 100%);
  border-color: rgb(255 255 255 / 0.13);
}

.login-brand {
  position: absolute;
  z-index: 2;
  top: clamp(1.4rem, 3vw, 2rem);
  left: clamp(1.4rem, 3vw, 2rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--green-text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-brand .login-logo {
  width: 36px;
  height: 36px;
}

.login-copy {
  position: relative;
  z-index: 1;
  min-height: 420px;
  justify-content: flex-end;
  padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 5vw, 3rem);
}

.login-title {
  max-width: 13ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.4rem, 5.8vw, 4.4rem);
  font-weight: 650;
  line-height: 1.02;
}

.login-title span {
  display: block;
  color: var(--green);
}

.login-sub {
  max-width: 30rem;
  color: #aaa6a0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
}

.login-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.055), rgb(255 255 255 / 0.018)),
    rgb(29 31 32 / 0.86);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.34);
  backdrop-filter: blur(18px);
}

.login-card-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  text-align: center;
  text-transform: none;
}

.login-card-sub {
  margin: -0.45rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.login-field {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 0.9rem;
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent),
    #222526;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius);
  outline: none;
}

.login-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(29 158 117 / 0.18);
}

.login-field input::placeholder {
  color: #706d68;
}

.login-card .login-btn {
  width: 100%;
  margin-top: 0.35rem;
}

.login-card .login-footer {
  margin-top: 0.35rem;
  text-align: center;
}

.login-glow {
  position: absolute;
  z-index: -1;
  right: -12%;
  bottom: 12%;
  width: 58%;
  height: 34%;
  background: linear-gradient(100deg, transparent, rgb(29 158 117 / 0.14), transparent);
  filter: blur(44px);
  transform: rotate(-16deg);
}

.login-btn:hover,
.primary-btn:hover,
.play-btn:hover {
  background: #148762;
}

.login-btn:active,
.primary-btn:active,
.play-btn:active,
.icon-btn:active,
.tone-btn:active,
.segment:active {
  transform: scale(0.98);
}

.login-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.app-shell[hidden],
[hidden] {
  display: none !important;
}

.user-bar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  background: rgb(17 17 17 / 0.92);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
}

.brand-lockup,
.user-actions,
.user-info,
.audio-status,
.toolbar,
.legend,
.cycle-legend,
.exercise-start-row,
.bpm-sync {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 0.6rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.app-brand-logo {
  display: block;
  width: clamp(15rem, 19.5vw, 19.5rem);
  height: auto;
  max-height: 4.9rem;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgb(0 255 156 / 0.16));
}

.brand-mark,
.user-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.user-actions {
  gap: 0.75rem;
}

.user-info {
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  background: #0b0f12;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.user-avatar img {
  display: block;
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.ghost-btn,
.icon-btn,
.tone-btn,
.tab,
.segment,
.scale-btn {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.ghost-btn {
  padding: 0.35rem 0.7rem;
  background: transparent;
}

.ghost-btn:hover,
.icon-btn:hover,
.tone-btn:hover,
.segment:hover,
.scale-btn:hover {
  color: var(--text);
  background: #303030;
  border-color: #555;
}

.segment:disabled,
.segment:disabled:hover {
  color: #71717a;
  background: var(--surface-2);
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
  transform: none;
}

.app {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
  padding: clamp(1.1rem, 3vw, 2rem) 0 3rem;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  font-weight: 400;
  text-transform: uppercase;
}

h2 em {
  color: #00ff9c;
  font-style: italic;
}

.subtitle {
  margin-top: 0.25rem;
  font-size: 0.83rem;
}

.audio-status {
  display: none !important;
  flex: 0 0 auto;
  gap: 0.5rem;
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--faint);
  border-radius: 50%;
}

.status-dot.loading {
  background: var(--amber);
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.error {
  background: var(--danger);
}

.control-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.tone-card,
.metronome-card,
.panel {
  background: rgb(32 32 32 / 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tone-card {
  padding: 1rem;
}

.section-title,
.subsection-label {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 0.45rem;
  max-width: 1016px;
}

.tone-btn {
  min-height: 38px;
  padding: 0.45rem 0.35rem;
  font-size: 0.86rem;
}

.tone-btn[data-tone="6"] {
  grid-column-start: 2;
}

.tone-btn-chromatic {
  grid-row: span 2;
  min-height: 84px;
}

.tone-btn.active,
.segment.active,
.tab.active,
.scale-btn.active {
  color: var(--green-text);
  background: var(--green-soft);
  border-color: var(--green);
}

.metronome-card {
  display: flex;
  position: relative;
  align-items: center;
  gap: 1rem;
  min-width: 328px;
  padding: 2.2rem 1rem 1rem;
}

.metronome-title {
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metro-display {
  min-width: 84px;
  text-align: center;
}

.metro-label {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.metro-bpm {
  display: block;
  color: var(--green-text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 2rem;
  line-height: 1.05;
}

.metro-tick,
.bpm-sync i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
}

.metro-tick.beat,
.bpm-sync i.beat {
  background: var(--green-text);
  box-shadow: 0 0 12px rgb(159 225 203 / 0.65);
}

.metro-controls {
  display: grid;
  grid-template-columns: repeat(5, 38px);
  gap: 0.4rem;
}

.icon-btn,
.play-btn {
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.play-btn {
  font-size: 0.72rem;
}

.play-btn.active,
.primary-btn.active {
  background: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 75%, black);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  flex: 0 0 auto;
  padding: 0.7rem 1rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.tab.active {
  background: transparent;
  border-color: var(--green);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.toolbar {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.scale-actions,
.note-pills,
.legend,
.cycle-legend,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.exercise-type-break {
  display: none;
}

.note-pills {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-color: rgb(16 185 129 / 0.4) rgb(255 255 255 / 0.04);
}

.note-pills .note-pill {
  flex: 0 0 auto;
}

.exercise-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  max-width: 100%;
  overflow-x: auto;
  align-items: center;
  justify-content: start;
  padding-bottom: 0.3rem;
  scrollbar-color: rgb(16 185 129 / 0.4) rgb(255 255 255 / 0.04);
}

.exercise-pills .exercise-pill {
  flex: 0 0 58px;
}

.duet-pills {
  display: grid;
  grid-template-columns: repeat(8, 58px);
  gap: 0.55rem;
  align-items: center;
  justify-content: start;
}

.duet-pills {
  margin-top: 0.55rem;
}

.scale-btn {
  min-height: 38px;
  padding: 0.5rem 0.85rem;
}

.note-pill,
.exercise-pill,
.duet-pill {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green-text);
  font-size: 0.78rem;
  font-weight: 700;
  background: #2a6f54;
  border: 1px solid #2e8a68;
  border-radius: 50%;
}

button.note-pill,
button.exercise-pill {
  cursor: pointer;
}

.note-pill.root {
  color: #fff;
  background: var(--violet);
  border-color: color-mix(in srgb, var(--violet) 75%, white);
}

.exercise-pill {
  width: 58px;
  height: 58px;
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.exercise-pill .degree,
.duet-pill .degree {
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 600;
}

.exercise-pill.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgb(29 158 117 / 0.18);
}

.exercise-pill.start-note {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: none;
}

.exercise-pill.start-note.active {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgb(29 158 117 / 0.18);
}

.duet-pill {
  width: 58px;
  height: 58px;
  color: #b8d8f4;
  background: #1a2a3a;
  border-color: #4a90d9;
  border-radius: 50%;
}

.duet-pill.active {
  color: #fff;
  background: #4a90d9;
  box-shadow: 0 0 0 4px rgb(74 144 217 / 0.18);
}

.panel {
  padding: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 1rem;
}

.panel-title {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
}

.panel-title.compact {
  margin-bottom: 0;
}

.neck-wrap,
.cycle-wrap {
  overflow-x: auto;
  min-height: 160px;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  font-size: 0.88rem;
}

.empty-inline {
  font-size: 0.86rem;
}

.hint {
  margin-top: 0.55rem;
  font-size: 0.75rem;
}

.hint.center {
  text-align: center;
}

.legend,
.cycle-legend {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend span,
.cycle-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot,
.cycle-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.tonica,
.cycle-dot.tonica {
  background: var(--violet);
}

.legend-dot.subdominante,
.cycle-dot.campo {
  background: var(--green);
}

.legend-dot.dominante {
  background: var(--amber);
}

.legend-dot.relativa,
.cycle-dot.relativa {
  background: var(--pink);
}

.cycle-dot.fora {
  background: #5d584c;
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.chord-card {
  min-width: 0;
  padding: 0.55rem 0.35rem;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.chord-card:hover {
  transform: translateY(-1px);
}

.chord-card.selected {
  box-shadow: 0 0 0 2px currentColor;
}

.chord-card.tonica {
  color: var(--violet-text);
  background: var(--violet-soft);
  border-color: #534ab7;
}

.chord-card.subdominante {
  color: var(--green-text);
  background: rgb(5 46 38 / 0.9);
  border-color: rgb(16 185 129 / 0.58);
}

.chord-card.dominante {
  color: var(--amber-text);
  background: var(--amber-soft);
  border-color: #854f0b;
}

.chord-card.relativa {
  color: var(--pink-text);
  background: var(--pink-soft);
  border-color: #993556;
}

.chord-card.other {
  color: #d3d1c7;
  background: var(--surface-2);
  border-color: #444;
}

.chord-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
}

.chord-degree {
  display: block;
  margin: 0.1rem 0 0.25rem;
  color: currentColor;
  font-size: 0.64rem;
  opacity: 0.8;
}

.featured-neck {
  margin-bottom: 1rem;
  overflow: hidden;
  background: #1d1d1d;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.featured-neck-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.featured-title {
  font-size: 1rem;
  font-weight: 750;
}

.featured-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.featured-body {
  padding: 0.7rem 0.9rem 0.25rem;
  overflow-x: auto;
}

.neck-section {
  margin: 0 0 1rem;
  opacity: 0.75;
}

.neck-section-title {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.neck-section-title.tonica {
  color: var(--violet-text);
}

.neck-section-title.subdominante {
  color: var(--green-text);
}

.neck-section-title.dominante {
  color: var(--amber-text);
}

.neck-section-title.relativa {
  color: var(--pink-text);
}

.cycle-panel {
  text-align: left;
}

.cycle-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: center;
}

.cycle-progressions {
  align-self: stretch;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.01)),
    rgb(8 13 16 / 0.56);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.progression-list {
  display: grid;
  gap: 0.5rem;
}

.cycle-tip-card {
  display: grid;
  gap: 0.28rem;
  margin-bottom: 0.65rem;
  min-height: 56px;
  padding: 0.72rem 0.78rem;
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(16 185 129 / 0.12), rgb(16 185 129 / 0.04)),
    #11161a;
  border: 1px solid rgb(16 185 129 / 0.28);
  border-radius: var(--radius);
}

.cycle-tip-card span {
  color: var(--green-text);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cycle-tip-card strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
}

.progression-list span {
  display: block;
  min-height: 38px;
  padding: 0.58rem 0.72rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  background: #11161a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cycle-main {
  min-width: 0;
}

.scale-header,
.cycle-header,
.harmonic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.scale-header .panel-title,
.cycle-header .panel-title,
.harmonic-header .panel-title {
  margin-bottom: 0;
}

.scale-mode-controls,
.cycle-mode-controls,
.harmonic-mode-controls {
  flex: 0 0 auto;
}

.cycle-wrap {
  width: min(100%, 560px);
  margin: 0 auto;
}

.cycle-legend {
  justify-content: center;
  margin-top: 0.8rem;
}

.exercise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.exercise-controls {
  position: static;
}

.exercise-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

#exercise-type-controls {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: start;
  justify-self: end;
  width: max-content;
  max-width: calc(100% - 0.75rem);
  margin-left: auto;
  margin-right: 0.35rem;
}

.segment {
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.segmented.wide {
  margin-top: 0.9rem;
}

.exercise-start-row {
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.exercise-run-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-left: auto;
}

.note-rate-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-rate-buttons {
  flex-wrap: nowrap;
}

.bpm-sync {
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.practice-note {
  margin-top: 1rem;
  padding: 0.75rem;
  color: #80be94;
  font-size: 0.82rem;
  background: #1b2a20;
  border: 1px solid #2d4a35;
  border-radius: var(--radius);
}

.is-exercise-current {
  filter: drop-shadow(0 0 7px rgb(159 225 203 / 0.9));
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgb(16 185 129 / 0.055), transparent 32rem),
    linear-gradient(180deg, #0b0f12, #070a0d 62%);
}

.user-bar {
  padding-block: 0.85rem;
  background:
    linear-gradient(180deg, rgb(17 22 26 / 0.92), rgb(8 11 14 / 0.9));
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.025), 0 20px 48px rgb(0 0 0 / 0.24);
}

.brand-lockup {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-mark,
.user-avatar {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.015)),
    #0b0f12;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 18px rgb(0 0 0 / 0.24);
}

.app {
  width: min(100% - clamp(2.75rem, 4vw, 4rem), 1440px);
}

.workspace-header {
  margin-bottom: 1.35rem;
}

h2 {
  color: var(--text);
  letter-spacing: 0.01em;
}

.subtitle,
.user-info,
.hint,
.empty-state,
.empty-inline {
  color: var(--muted);
}

.tone-card,
.metronome-card,
.panel,
.featured-neck {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012)),
    rgb(17 22 26 / 0.88);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 18px 60px rgb(0 0 0 / 0.24);
  backdrop-filter: blur(18px);
}

.tone-card,
.metronome-card {
  padding: 1.25rem;
}

.metronome-card {
  padding-top: 2.65rem;
}

.section-title,
.subsection-label,
.metronome-title,
.panel-title {
  color: #d4d4d8;
  letter-spacing: 0.09em;
}

.ghost-btn,
.icon-btn,
.tone-btn,
.tab,
.segment,
.scale-btn {
  color: #d4d4d8;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.01)),
    #11161a;
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
}

.ghost-btn:hover,
.icon-btn:hover,
.tone-btn:hover,
.segment:hover,
.scale-btn:hover {
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.018)),
    #171d22;
  border-color: rgb(255 255 255 / 0.16);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 4px rgb(16 185 129 / 0.04);
}

.tone-btn.active,
.segment.active,
.scale-btn.active {
  color: #d1fae5;
  background:
    linear-gradient(180deg, rgb(16 185 129 / 0.28), rgb(16 185 129 / 0.12)),
    #052e26;
  border-color: rgb(16 185 129 / 0.78);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 0 28px rgb(16 185 129 / 0.16);
}

.play-btn,
.primary-btn,
.login-btn {
  background:
    linear-gradient(180deg, #22c55e, #10b981);
  border-color: rgb(16 185 129 / 0.78);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 14px 34px rgb(16 185 129 / 0.18);
}

.play-btn:hover,
.primary-btn:hover,
.login-btn:hover {
  background:
    linear-gradient(180deg, #34d399, #10b981);
  border-color: rgb(167 243 208 / 0.72);
}

.metro-bpm {
  color: #6ee7b7;
  font-size: 2.35rem;
  text-shadow: 0 0 26px rgb(16 185 129 / 0.2);
}

.metro-tick.beat,
.bpm-sync i.beat {
  background: #34d399;
  box-shadow: 0 0 18px rgb(16 185 129 / 0.6);
}

.tabs {
  border-bottom-color: var(--line);
}

.tab {
  color: var(--muted);
  font-size: 0.95rem;
}

.tab.active {
  color: var(--text);
  border-color: var(--green);
  box-shadow: inset 0 -1px 0 var(--green), 0 7px 18px rgb(16 185 129 / 0.08);
}

.toolbar {
  padding-block: 0.35rem;
}

.scale-btn {
  min-width: 150px;
}

.note-pill,
.exercise-pill,
.duet-pill {
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.012)),
    #202428;
  border-color: rgb(255 255 255 / 0.12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}

.note-pill.root,
.exercise-pill.active,
.exercise-pill.start-note.active,
.duet-pill.active {
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.012)),
    #202428;
  border-color: #10b981;
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 0 18px rgb(16 185 129 / 0.12);
}

.exercise-pill .degree,
.duet-pill .degree {
  color: #a1a1aa;
}

.note-pill.root .degree,
.exercise-pill.active .degree,
.duet-pill.active .degree {
  color: #a1a1aa;
}

.panel {
  padding: clamp(1rem, 2vw, 1.45rem);
}

.neck-wrap {
  padding: 0.25rem 0;
  scrollbar-color: rgb(16 185 129 / 0.4) rgb(255 255 255 / 0.04);
}

.neck-wrap svg,
.featured-body svg {
  min-width: 820px;
}

.chord-card {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.01)),
    #151a1e;
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.chord-card.selected {
  box-shadow: 0 0 0 2px currentColor, 0 0 32px rgb(16 185 129 / 0.12);
}

.practice-note {
  color: #a7f3d0;
  background: rgb(6 78 59 / 0.28);
  border-color: rgb(16 185 129 / 0.22);
}

@media (max-width: 920px) {
  .login-box {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-copy {
    padding: clamp(1rem, 5vw, 1.5rem);
  }

  .login-title {
    max-width: 12ch;
  }

  .login-visual {
    min-height: 340px;
  }

  .control-row,
  .exercise-layout,
  .cycle-body {
    grid-template-columns: 1fr;
  }

  .metronome-card,
  .exercise-controls {
    position: static;
  }

  .chord-grid {
    grid-template-columns: repeat(4, minmax(86px, 1fr));
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 0.75rem;
  }

  .login-box {
    gap: 0.75rem;
  }

  .login-kicker {
    margin-bottom: 1.5rem;
  }

  .login-title {
    font-size: clamp(2.35rem, 15vw, 4rem);
  }

  .login-btn {
    width: 100%;
  }

  .login-visual {
    min-height: 260px;
    padding: 0.75rem;
  }

  .login-neck {
    min-height: 220px;
  }

  .login-neck .note {
    width: 48px;
    height: 48px;
    font-size: 0.75rem;
  }

  .login-panel-row {
    grid-template-columns: 1fr;
  }

  .exercise-run-controls {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .note-rate-control {
    justify-content: space-between;
  }

  .app {
    width: min(100% - 1.35rem, 1100px);
  }

  .workspace-header,
  .user-bar,
  .metronome-card,
  .exercise-header,
  .exercise-start-row,
  .scale-header,
  .cycle-header,
  .harmonic-header {
    align-items: stretch;
    flex-direction: column;
  }

  .exercise-header {
    display: flex;
  }

  #exercise-type-controls {
    display: flex;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .user-actions {
    justify-content: space-between;
  }

  .audio-status {
    width: 100%;
  }

  .tone-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    max-width: none;
  }

  .tone-btn[data-tone="6"] {
    grid-column-start: auto;
  }

  .tone-btn-chromatic {
    grid-row: auto;
    min-height: 38px;
  }

  .metronome-card {
    min-width: 0;
  }

  .metro-controls {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }

  .chord-grid {
    grid-template-columns: repeat(2, minmax(116px, 1fr));
  }

  .duet-pills {
    grid-template-columns: repeat(4, 58px);
  }

  .tab {
    padding-inline: 0.8rem;
  }
}

.login-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(1.2rem, 4vw, 3.4rem);
  background:
    radial-gradient(circle at 16% 18%, rgb(0 255 156 / 0.16), transparent 22rem),
    radial-gradient(circle at 78% 76%, rgb(0 255 156 / 0.08), transparent 28rem),
    linear-gradient(135deg, #111 0%, #0d0d0d 42%, #060706 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: -35%;
  background:
    linear-gradient(115deg, transparent 0 37%, rgb(0 255 156 / 0.045) 42%, transparent 49%),
    linear-gradient(25deg, transparent 0 46%, rgb(255 255 255 / 0.035) 50%, transparent 56%);
  animation: sonara-bg-drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgb(255 255 255 / 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 72%);
  opacity: 0.35;
  animation: sonara-grid-drift 26s linear infinite;
  pointer-events: none;
}

@keyframes sonara-bg-drift {
  from {
    transform: translate3d(-1.5rem, -1rem, 0) rotate(-4deg);
  }

  to {
    transform: translate3d(1.5rem, 1rem, 0) rotate(4deg);
  }
}

@keyframes sonara-grid-drift {
  to {
    background-position: 72px 72px;
  }
}

.login-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 6.5rem);
  width: min(100%, 1180px);
  min-height: min(720px, calc(100vh - 4.5rem));
  padding: clamp(1.5rem, 4.5vw, 4rem);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.06), transparent 32%),
    linear-gradient(160deg, rgb(26 26 26 / 0.82), rgb(13 13 13 / 0.94) 54%, rgb(7 8 7 / 0.94)),
    rgb(13 13 13 / 0.92);
  border: 1px solid #2a2a2a;
  border-radius: 24px;
  box-shadow: 0 34px 120px rgb(0 0 0 / 0.48);
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(18px);
}

.login-copy {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 0;
}

.login-brand {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: clamp(3.8rem, 9vw, 7rem);
  color: #eaeaea;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: none;
}

.login-logo {
  width: 46px;
  height: 46px;
  color: #00ff9c;
  background: rgb(0 255 156 / 0.08);
  border: 1px solid rgb(0 255 156 / 0.65);
  border-radius: 14px;
  box-shadow: 0 0 34px rgb(0 255 156 / 0.18);
}

.login-kicker {
  display: inline-block;
  margin: 0 0 1.15rem;
  color: #00ff9c;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-title {
  max-width: 9ch;
  margin: 0 0 1.35rem;
  color: #eaeaea;
  font-size: clamp(3.1rem, 8.4vw, 6.8rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.92;
}

.login-title span {
  display: inline;
  color: inherit;
}

.login-sub {
  max-width: 32rem;
  margin: 0;
  color: #a0a0a0;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.65;
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.08rem;
  width: 100%;
  padding: clamp(1.4rem, 3.2vw, 2.35rem);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.014)),
    #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  box-shadow: 0 24px 90px rgb(0 0 0 / 0.38);
  backdrop-filter: blur(20px);
}

.login-card-title {
  margin: 0;
  color: #eaeaea;
  font-size: 1.34rem;
  font-weight: 720;
  text-align: left;
  text-transform: none;
}

.login-card-sub {
  margin: -0.35rem 0 0.7rem;
  color: #a0a0a0;
  font-size: 0.92rem;
  text-align: left;
}

.login-field {
  display: grid;
  gap: 0.48rem;
  color: #eaeaea;
  font-size: 0.86rem;
  font-weight: 650;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 0.95rem;
  color: #eaeaea;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-field input:focus {
  background: #121614;
  border-color: #00ff9c;
  box-shadow: 0 0 0 4px rgb(0 255 156 / 0.12);
}

.login-field input::placeholder {
  color: #666;
}

.login-forgot {
  justify-self: end;
  margin-top: -0.25rem;
  color: #00ff9c;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-card .login-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 0.55rem;
  color: #04110b;
  font-weight: 800;
  background: #00ff9c;
  border: 1px solid rgb(0 255 156 / 0.85);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgb(0 255 156 / 0.2);
}

.login-card .login-btn:hover {
  color: #04110b;
  background: #3bffb5;
  border-color: #84ffd0;
}

.login-card .login-footer {
  margin: 0.65rem 0 0;
  color: #a0a0a0;
  font-size: 0.78rem;
  text-align: center;
}

.login-glow {
  position: absolute;
  inset: auto -18% -15% 36%;
  z-index: 0;
  height: 42%;
  background: linear-gradient(100deg, transparent, rgb(0 255 156 / 0.2), transparent);
  filter: blur(64px);
  transform: rotate(-16deg);
  pointer-events: none;
}

@media (max-width: 820px) {
  .login-box {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
  }

  .login-brand {
    margin-bottom: 2.5rem;
  }

  .login-title {
    max-width: 11ch;
    font-size: clamp(2.75rem, 12vw, 4.8rem);
  }

  .login-card {
    max-width: 460px;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .login-screen {
    padding: 0.85rem;
  }

  .login-box {
    padding: 1.2rem;
    border-radius: 18px;
  }

  .login-brand {
    margin-bottom: 2rem;
  }

  .login-title {
    font-size: clamp(2.45rem, 15vw, 3.55rem);
  }

  .login-card {
    padding: 1.1rem;
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-screen::before,
  .login-screen::after {
    animation: none;
  }
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(0.7rem, 1.5vw, 1.2rem);
  background:
    radial-gradient(circle at 13% 34%, rgb(0 255 156 / 0.18), transparent 24rem),
    radial-gradient(circle at 70% 48%, rgb(0 255 156 / 0.075), transparent 28rem),
    radial-gradient(circle at 50% 95%, rgb(255 255 255 / 0.035), transparent 34rem),
    linear-gradient(135deg, #060707 0%, #0d0d0d 50%, #050606 100%);
}

.login-screen::before {
  background:
    radial-gradient(ellipse at 36% 48%, rgb(0 255 156 / 0.11), transparent 24rem);
  opacity: 0.72;
}

.login-screen::after {
  display: none;
}

.login-box {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 500px);
  width: min(100%, 1240px);
  min-height: auto;
  height: min(720px, calc(100vh - clamp(1rem, 2vw, 1.8rem)));
  gap: clamp(1.6rem, 4.6vw, 5.4rem);
  padding: clamp(1.4rem, 3.6vw, 4rem);
  background:
    radial-gradient(circle at 15% 44%, rgb(0 255 156 / 0.17), transparent 24rem),
    radial-gradient(circle at 80% 46%, rgb(255 255 255 / 0.045), transparent 20rem),
    linear-gradient(115deg, rgb(0 255 156 / 0.06), transparent 25% 66%, rgb(255 255 255 / 0.02)),
    linear-gradient(145deg, rgb(12 14 15 / 0.88), rgb(5 6 7 / 0.96));
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 22px;
  box-shadow: 0 38px 130px rgb(0 0 0 / 0.58), inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.login-copy {
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-self: center;
  justify-items: start;
  gap: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-align: left;
}

.login-copy::before {
  content: "";
  position: absolute;
  inset: -4% -18% -4% -24%;
  z-index: -1;
  pointer-events: none;
  background: url("../assets/violao-contorno.png") left center / contain no-repeat;
  opacity: 0.25;
  filter: drop-shadow(0 0 34px rgb(0 255 156 / 0.14));
  mask: none;
  -webkit-mask: none;
  transform: translate(30%, 20%) rotate(10deg) scale(1.3);
  transform-origin: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  margin: 0 0 clamp(0.7rem, 2vh, 1.2rem);
}

.login-logo-img {
  display: block;
  width: clamp(22.5rem, 33vw, 32rem);
  height: auto;
  max-height: clamp(8.4rem, 14.4vw, 12.8rem);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 26px rgb(0 255 156 / 0.24));
  flex: 0 0 auto;
}

.login-brand-text {
  display: grid;
  gap: 0.05rem;
}

.login-brand-text strong {
  color: #fff;
  font-family: "Poppins", Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: clamp(2.15rem, 4.25vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 9px 28px rgb(0 0 0 / 0.38);
}

.login-brand-text small {
  color: #00ff9c;
  font-size: clamp(0.95rem, 1.55vw, 1.45rem);
  font-weight: 720;
  letter-spacing: 0;
}

.login-accent-line {
  width: 3rem;
  height: 2px;
  margin: 0 0 clamp(1.15rem, 2.5vh, 1.7rem);
  background: #00ff9c;
  box-shadow: 0 0 18px rgb(0 255 156 / 0.55);
}

.login-title {
  display: grid;
  max-width: 7.2ch;
  margin: 0 0 clamp(0.8rem, 1.8vh, 1.2rem);
  color: #fff;
  font-size: clamp(3.4rem, 6.2vw, 6.1rem);
  font-weight: 860;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-shadow: 0 13px 38px rgb(0 0 0 / 0.42);
}

.login-title span {
  display: block;
}

.login-title span:last-child {
  color: #00ff9c;
  text-shadow: 0 0 28px rgb(0 255 156 / 0.28);
}

.login-sub {
  max-width: 30rem;
  margin: 0;
  color: #d0d0d0;
  font-size: clamp(0.98rem, 1.25vw, 1.2rem);
  line-height: 1.45;
}

.login-card {
  align-self: center;
  justify-self: end;
  width: min(100%, 470px);
  padding: clamp(1.15rem, 2.6vw, 2rem);
  gap: 0.72rem;
  background:
    radial-gradient(circle at 50% 85%, rgb(0 255 156 / 0.13), transparent 12rem),
    linear-gradient(145deg, rgb(28 31 36 / 0.74), rgb(15 16 18 / 0.78));
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 22px;
  box-shadow: 0 32px 90px rgb(0 0 0 / 0.48), inset 0 1px 0 rgb(255 255 255 / 0.06);
  backdrop-filter: blur(24px);
}

.login-user-icon {
  display: grid;
  width: 4.1rem;
  height: 4.1rem;
  place-items: center;
  justify-self: center;
  margin-bottom: 0.25rem;
  color: #00ff9c;
  background: rgb(255 255 255 / 0.035);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}

.login-user-icon svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card-title {
  color: #fff;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  text-align: center;
}

.login-card-sub {
  margin: -0.3rem 0 0.6rem;
  color: #a0a0a0;
  font-size: 0.94rem;
  text-align: center;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.28rem;
  background: rgb(255 255 255 / 0.035);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 12px;
}

.auth-mode-btn {
  min-height: 2.35rem;
  color: #a0a0a0;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.auth-mode-btn.active {
  color: #d1fae5;
  background: rgb(0 255 156 / 0.12);
  border-color: rgb(0 255 156 / 0.38);
}

.login-field {
  gap: 0.42rem;
  color: #fff;
  font-size: 0.88rem;
}

.login-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.18rem;
  padding: 0 1rem;
  color: #a0a0a0;
  background: rgb(21 24 28 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-input-wrap:focus-within {
  color: #00ff9c;
  background: rgb(21 24 28 / 0.88);
  border-color: rgb(0 255 156 / 0.7);
  box-shadow: 0 0 0 4px rgb(0 255 156 / 0.1), 0 0 24px rgb(0 255 156 / 0.08);
}

.login-input-wrap svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-input-wrap .login-eye {
  width: 1.25rem;
  height: 1.25rem;
}

.login-field input {
  min-height: 0;
  padding: 0;
  color: #eaeaea;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-field input:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.2rem;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: #a0a0a0;
  font-size: 0.92rem;
  cursor: pointer;
}

.login-check input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.login-check span {
  display: inline-grid;
  width: 1.18rem;
  height: 1.18rem;
  place-items: center;
  background: #00ff9c;
  border: 1px solid rgb(0 255 156 / 0.85);
  border-radius: 5px;
  box-shadow: 0 0 14px rgb(0 255 156 / 0.2);
}

.login-check span::before {
  content: "";
  width: 0.48rem;
  height: 0.26rem;
  border: solid #072217;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

.login-check input:not(:checked) + span {
  background: transparent;
  border-color: #2a2a2a;
  box-shadow: none;
}

.login-check input:not(:checked) + span::before {
  opacity: 0;
}

.login-forgot {
  justify-self: auto;
  margin-top: 0;
  color: #00ff9c;
  font-size: 0.92rem;
}

.login-forgot:hover {
  color: #7dffd0;
}

.auth-message {
  min-height: 1.1rem;
  margin: -0.1rem 0 0;
  color: #a0a0a0;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.auth-message:empty {
  display: none;
}

.auth-message.error {
  color: #fca5a5;
}

.auth-message.success {
  color: #a7f3d0;
}

.payment-btn {
  min-height: 3rem;
  color: #d1fae5;
  font-weight: 780;
  background:
    linear-gradient(180deg, rgb(0 255 156 / 0.15), rgb(0 255 156 / 0.07)),
    #10201a;
  border: 1px solid rgb(0 255 156 / 0.46);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 16px 44px rgb(0 255 156 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.payment-btn:hover {
  color: #fff;
  border-color: rgb(0 255 156 / 0.7);
  box-shadow: 0 18px 48px rgb(0 255 156 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.payment-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.payment-modal[hidden] {
  display: none;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.payment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(14px);
}

.payment-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 1.35rem;
  color: #f4f4f5;
  background:
    radial-gradient(circle at top left, rgb(0 255 156 / 0.11), transparent 34%),
    linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)),
    #11161a;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgb(0 0 0 / 0.55), 0 0 55px rgb(0 255 156 / 0.08);
}

.payment-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  color: #d4d4d8;
  font-size: 1.55rem;
  line-height: 1;
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  cursor: pointer;
}

.payment-modal-kicker {
  margin: 0 0 0.45rem;
  color: #00ff9c;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.payment-modal-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0;
}

.payment-modal-sub {
  margin: 0.45rem 0 1.2rem;
  color: #a1a1aa;
}

.payment-brick-wrap {
  min-height: 420px;
}

.payment-modal-message {
  min-height: 1.1rem;
  margin: 0.85rem 0 0;
  color: #a1a1aa;
  font-size: 0.9rem;
  text-align: center;
}

.payment-modal-message.success {
  color: #a7f3d0;
}

.payment-modal-message.error {
  color: #fca5a5;
}

.login-card .login-btn {
  min-height: 3.35rem;
  margin-top: 0.35rem;
  color: #fff;
  font-size: 1.05rem;
  background:
    linear-gradient(180deg, rgb(0 255 156 / 0.94), rgb(0 187 114 / 0.86));
  border-radius: 10px;
  box-shadow: 0 20px 50px rgb(0 255 156 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.24);
}

.login-card .login-btn:hover {
  color: #fff;
  background:
    linear-gradient(180deg, #35ffb3, #00cf7e);
  box-shadow: 0 22px 58px rgb(0 255 156 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.28);
}

.login-card .login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.78rem;
  padding-top: 0.78rem;
  color: #a0a0a0;
  font-size: 0.84rem;
  border-top: 1px solid rgb(255 255 255 / 0.09);
}

.login-card .login-footer svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-glow {
  inset: auto 32% 23% -10%;
  width: 52%;
  height: 28%;
  background: linear-gradient(100deg, transparent, rgb(0 255 156 / 0.23), transparent);
  filter: blur(58px);
}

@media (max-width: 1100px) {
  .login-box {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    gap: 2rem;
    padding: clamp(1.5rem, 3.5vw, 3rem);
  }

  .login-logo-img {
    width: clamp(20.5rem, 30vw, 27rem);
  }

  .login-title {
    font-size: clamp(3.3rem, 7vw, 5.5rem);
  }

}

@media (max-height: 760px) and (min-width: 861px) {
  .login-box {
    height: calc(100vh - 1rem);
    padding: clamp(1rem, 3vh, 1.8rem) clamp(1.2rem, 3.2vw, 3rem);
  }

  .login-brand {
    margin-bottom: 0.65rem;
  }

  .login-logo-img {
    width: clamp(18.5rem, 28vw, 23.5rem);
    max-height: 9.6rem;
  }

  .login-accent-line {
    margin-bottom: 0.95rem;
  }

  .login-title {
    margin-bottom: 0.75rem;
    font-size: clamp(3rem, 5.8vw, 4.9rem);
  }

  .login-sub {
    font-size: 0.98rem;
    line-height: 1.38;
  }

  .login-card {
    width: min(100%, 460px);
    padding: 1.35rem;
    gap: 0.7rem;
  }

  .login-user-icon {
    width: 3.8rem;
    height: 3.8rem;
  }

  .login-card-sub {
    margin-bottom: 0.25rem;
  }

  .login-input-wrap {
    min-height: 3.1rem;
  }

  .login-card .login-btn {
    min-height: 3.25rem;
  }

  .login-card .login-footer {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
  }
}

@media (max-width: 860px) {
  .login-box {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }

  .login-copy {
    align-self: center;
    justify-items: center;
    gap: 0;
    text-align: center;
  }

  .login-brand {
    justify-content: center;
  }

  .login-accent-line {
    margin-inline: auto;
  }

  .login-sub {
    margin-inline: auto;
  }

  .login-card {
    justify-self: center;
    width: min(100%, 540px);
  }

}

@media (max-width: 560px) {
  .login-screen {
    padding: 0.75rem;
  }

  .login-box {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .login-brand {
    margin-bottom: 1rem;
  }

  .login-logo-img {
    width: clamp(18rem, 84vw, 24rem);
    max-height: 9.6rem;
  }

  .login-title {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .login-sub {
    font-size: 1rem;
  }

  .login-card {
    padding: 1.15rem;
    border-radius: 16px;
  }

  .login-user-icon {
    width: 4.6rem;
    height: 4.6rem;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
}
