:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #66706e;
  --paper: #ffffff;
  --line: #dce3e1;
  --panel: #f3f6f5;
  --accent: #16877e;
  --accent-dark: #0d665f;
  --warm: #d97706;
  --shadow: 0 12px 36px rgba(24, 32, 31, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf1f0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-view {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 68px minmax(520px, calc(100svh - 148px)) 80px;
  background: #f5f7f6;
}

.auth-nav {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 76px);
  background: #ffffff;
  border-bottom: 1px solid #dce3e1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #18201f;
  font-size: 20px;
  font-weight: 850;
  text-decoration: none;
}

.auth-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 18px;
  background: #167d74;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: block;
  object-fit: contain;
}

.auth-nav-note {
  color: #65716f;
  font-size: 13px;
  font-weight: 650;
}

.auth-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
}

.auth-hero > img,
.auth-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-hero > img {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.auth-shade {
  z-index: -1;
  background: rgba(246, 248, 247, 0.16);
}

.auth-content {
  width: min(520px, calc(100% - 44px));
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-left: clamp(24px, 7vw, 108px);
  padding: 44px 0;
  color: #14201e;
}

.auth-kicker {
  margin: 0 0 12px;
  color: #0d665f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-content h1 {
  margin: 0;
  font-size: clamp(52px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-description {
  max-width: 490px;
  margin: 20px 0 26px;
  color: #34413f;
  font-size: 19px;
  line-height: 1.5;
}

.google-button-host {
  width: 280px;
  min-height: 44px;
  display: grid;
  align-items: center;
}

.trial-access-button {
  width: 280px;
  height: 42px;
  border: 1px solid #66716f;
  border-radius: 4px;
  background: #ffffff;
  color: #263230;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.trial-access-button:hover {
  border-color: #167d74;
  color: #0d665f;
}

.auth-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #303c3a;
  font-size: 12px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-message.error {
  color: #b42318;
  font-weight: 700;
}

.auth-privacy {
  max-width: 340px;
  margin: 8px 0 0;
  color: #46514f;
  font-size: 11px;
  line-height: 1.4;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 24px;
  padding: 12px clamp(24px, 7vw, 108px);
  background: #172321;
  color: #f8fbfa;
}

.auth-benefits div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auth-benefits strong {
  font-size: 13px;
}

.auth-benefits span {
  overflow: hidden;
  color: #aeb9b7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Access screen */
.auth-view {
  position: relative;
  min-height: 100svh;
  grid-template-rows: 68px minmax(0, 1fr);
  overflow: hidden;
  background: #eef2f1;
}

.auth-view::before {
  content: "";
  position: absolute;
  inset: 68px 0 0;
  background: url("assets/mimusica-login-hero.webp") center / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.login-stage {
  z-index: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 38px 20px;
  overflow-y: auto;
}

.login-card {
  width: min(100%, 460px);
  display: grid;
  gap: 20px;
  padding: 30px 34px;
  background: #ffffff;
  border: 1px solid #d8dfdd;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(23, 35, 33, 0.12);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #167d74;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.login-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: block;
  object-fit: contain;
}

.login-heading h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-heading p {
  margin: 4px 0 0;
  color: #65716f;
  font-size: 13px;
}

.login-card .google-button-host {
  width: 100%;
  min-height: 44px;
  justify-items: center;
}

.google-pending-button {
  width: 100%;
  height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cfd8d5;
  border-radius: 4px;
  background: #ffffff;
  color: #34413f;
  font-size: 13px;
  font-weight: 750;
}

.google-pending-button img {
  width: 18px;
  height: 18px;
}

.google-pending-button span {
  grid-column: 2;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #78827f;
  font-size: 11px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: #dfe5e3;
}

.email-auth-form {
  display: grid;
  gap: 15px;
}

.email-auth-form label {
  display: grid;
  gap: 6px;
  color: #3d4947;
  font-size: 12px;
  font-weight: 750;
}

.email-auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd8d5;
  border-radius: 5px;
  background: #ffffff;
  color: #18201f;
  outline: 0;
}

.email-auth-form input:focus {
  border-color: #16877e;
  box-shadow: 0 0 0 3px rgba(22, 135, 126, 0.12);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 44px;
}

.password-field button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6c7774;
  cursor: pointer;
}

.password-field button:hover {
  background: #f0f4f3;
  color: #1a5f58;
}

.password-field svg {
  width: 18px;
  height: 18px;
}

.login-submit {
  height: 44px;
  margin-top: 3px;
  border: 0;
  border-radius: 5px;
  background: #167d74;
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.login-submit:hover {
  background: #0d665f;
}

.login-submit:disabled {
  background: #94aaa6;
  cursor: wait;
}

.login-card .auth-message {
  min-height: 0;
  margin: -8px 0 0;
  text-align: center;
  text-shadow: none;
}

.auth-mode-toggle {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0d665f;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.login-card .trial-access-button {
  width: 100%;
}

.login-card .auth-privacy {
  max-width: none;
  margin: -8px 0 0;
  color: #7a8482;
  text-align: center;
  text-shadow: none;
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

button {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.app-shell {
  min-height: 100vh;
  padding: 0;
}

.workspace,
.editor-view {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1380px;
  margin: 0 auto;
}

.create-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.create-panel {
  width: min(100%, 620px);
  padding: 30px;
  display: grid;
  gap: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.create-heading,
.projects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.create-heading {
  display: grid;
  gap: 3px;
}

.create-heading span,
.projects-heading span {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.create-heading h2,
.projects-heading h2 {
  margin: 0;
  font-size: 21px;
}

.editor-view {
  --score-toolbar-height: 116px;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 0;
  max-width: none;
  min-height: 100vh;
}

.projects-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  overflow-y: auto;
  background: #172321;
  color: #f8fbfa;
  border: 0;
  box-shadow: 8px 0 24px rgba(24, 32, 31, 0.08);
  display: flex;
  flex-direction: column;
}

.brand-compact {
  margin-bottom: 28px;
  border-color: #34413f;
}

.brand-compact .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 20px;
  background: #2ba399;
  border-radius: 6px;
}

.brand-compact .brand-logo {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.brand-compact h1 {
  font-size: 20px;
  color: #fff;
}

.brand-compact p {
  color: #9eaaa8;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid #2ba399;
  background: var(--accent);
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.icon-button:hover {
  background: var(--accent-dark);
}

.project-list {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 4px 2px;
  border-top: 1px solid #34413f;
}

.sidebar-account > img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #2ba399;
}

.sidebar-account > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-account strong,
.sidebar-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account strong {
  font-size: 12px;
}

.sidebar-account span {
  color: #9eaaa8;
  font-size: 10px;
}

.sidebar-account button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #aeb9b7;
  cursor: pointer;
}

.sidebar-account button:hover {
  background: #263633;
  color: #fff;
}

.sidebar-account svg {
  width: 17px;
  height: 17px;
}

.project-item {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #f6f9f8;
  border-radius: 6px;
}

.project-item:hover {
  background: #21302e;
  border-color: #34413f;
}

.project-item.active {
  background: #244943;
  border-color: #3aa99e;
}

.project-open {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 5px 0;
  text-align: left;
  cursor: pointer;
}

.project-open strong,
.project-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-open strong {
  font-size: 13px;
  font-weight: 750;
}

.project-open span,
.empty-projects {
  color: #aab4b2;
  font-size: 12px;
}

.project-delete {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8f9b99;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.project-delete:hover,
.project-delete:focus-visible {
  background: #fff0ee;
  color: #b42318;
  outline: none;
}

.empty-projects {
  margin-top: 16px;
  line-height: 1.45;
}

.projects-heading span {
  color: #69c7be;
}

.projects-heading h2 {
  color: #fff;
}

.input-panel,
.score-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.input-panel {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-weight: 900;
  font-size: 24px;
  border-radius: 6px;
}

.brand .brand-logo {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 24px;
  line-height: 1;
}

.brand p,
.field span,
.upload-box small,
.progress-card p {
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  border-radius: 6px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.upload-box {
  min-height: 128px;
  border: 1px dashed #b8afa1;
  background: #fbfaf7;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  cursor: pointer;
  text-align: center;
  border-radius: 8px;
}

.upload-box.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: #f1f8f6;
}

.upload-box.has-error {
  border-color: #b42318;
  background: #fff4f2;
}

.upload-box input {
  display: none;
}

.upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  border-radius: 6px;
}

.audio-preview {
  width: 100%;
  height: 42px;
}

.source-message {
  min-height: 18px;
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.source-message.success {
  color: var(--accent-dark);
}

.source-message.error {
  color: #b42318;
}

.identity-fields {
  display: grid;
  gap: 12px;
}

.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  min-height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  background: #aaa69d;
  cursor: not-allowed;
}

.ghost-button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  border-radius: 6px;
}

.toolbar-icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: #b42318;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.toolbar-icon-button svg {
  width: 18px;
  height: 18px;
}

#insertMeasureButton,
#appendMeasureButton {
  color: var(--accent-dark);
}

.selection-action-button {
  color: var(--accent-dark);
}

.selection-action-button.confirmed {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.repeat-marker-button {
  color: var(--accent-dark);
  font-family: "Noto Music", "Apple Symbols", Georgia, serif;
  font-size: 24px;
}

.repeat-marker-button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.manual-repeat-sign {
  position: absolute;
  z-index: 6;
  top: 20px;
  width: 18px;
  height: 37px;
  color: var(--ink);
  font-size: 0;
  line-height: 0;
  pointer-events: none;
}

.manual-repeat-sign::before,
.manual-repeat-sign::after {
  content: "";
  position: absolute;
  display: block;
}

.manual-repeat-sign::before {
  inset: 0;
}

.manual-repeat-sign::after {
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 9px currentColor;
}

.manual-repeat-start {
  left: -5px;
}

.manual-repeat-start::before {
  background: linear-gradient(
    to right,
    currentColor 0 4px,
    transparent 4px 7px,
    currentColor 7px 9px,
    transparent 9px
  );
}

.manual-repeat-start::after {
  left: 12px;
}

.manual-repeat-end {
  right: -5px;
}

.manual-repeat-end::before {
  background: linear-gradient(
    to right,
    transparent 0 9px,
    currentColor 9px 11px,
    transparent 11px 14px,
    currentColor 14px 18px
  );
}

.manual-repeat-end::after {
  left: 1px;
}

.measure.is-repeat-consumed,
.staff-row.is-repeat-consumed,
.score-section.is-repeat-consumed {
  display: none !important;
}

.toolbar-icon-button:disabled {
  color: #b8b4ac;
  background: #f0ede7;
  cursor: not-allowed;
}

.progress-card {
  border: 1px solid var(--line);
  background: #fbfaf7;
  padding: 14px;
  display: grid;
  gap: 10px;
  border-radius: 6px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.progress-track {
  height: 8px;
  background: #e3ddd2;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--warm);
  transition: width 260ms ease;
}

.score-panel {
  min-width: 0;
  min-height: 100vh;
  padding: 0 24px 48px;
  background: #edf1f0;
  border: 0;
  box-shadow: none;
}

.score-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  align-items: stretch;
  gap: 10px;
  min-height: 98px;
  margin: 0 -24px 18px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 5px 18px rgba(24, 32, 31, 0.06);
}

.toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.toolbar-title {
  min-width: 132px;
}

.mobile-toolbar-toggle {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7dfdd;
  border-radius: 5px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
}

.mobile-toolbar-toggle svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.score-toolbar.tools-collapsed .mobile-toolbar-toggle svg {
  transform: rotate(180deg);
}

.score-toolbar h2 {
  font-size: 16px;
  margin-top: 1px;
}

.status-pill {
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-group {
  min-width: 0;
  display: grid;
  grid-template-rows: 10px auto;
  align-items: start;
  gap: 5px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.toolbar-group:first-of-type {
  padding-left: 0;
  border-left: 0;
}

.toolbar-group-label {
  display: block;
  color: #7e8987;
  font-size: 8px;
  font-weight: 850;
  line-height: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.toolbar-group-controls {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.toolbar-group .score-controls {
  padding: 0;
  border: 0;
}

.toolbar-group .playback-tools {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
}

.toolbar-group-share .score-controls {
  justify-content: center;
}

.measure-pulse-control {
  height: 36px;
  display: inline-grid;
  grid-template-columns: auto 25px 25px 25px;
  align-items: center;
  gap: 2px;
  padding: 0 4px 0 8px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.measure-pulse-control button,
.measure-pulse-control output {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e1df;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.measure-pulse-control output {
  border-color: transparent;
  font-size: 11px;
}

.measure-pulse-control button:disabled {
  color: #b9c1bf;
  background: #f2f4f3;
  cursor: not-allowed;
}

.chord-player {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 30px 42px minmax(180px, 1fr) 42px auto auto;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  background: #1d2927;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
}

.transport-button {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}

.chord-player input[type="range"] {
  width: 100%;
  height: 4px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: linear-gradient(to right, #d94835 0%, #d94835 0%, #777 0%, #777 100%);
  accent-color: #d94835;
  cursor: pointer;
}

.youtube-player-panel {
  width: min(100%, 400px);
  min-width: 200px;
  aspect-ratio: 16 / 9;
  justify-self: center;
  overflow: hidden;
  border-radius: 6px;
  background: #111;
}

.youtube-player-panel[hidden] {
  display: none;
}

.youtube-player-panel.is-minimized {
  position: fixed;
  top: var(--score-toolbar-height);
  right: 0;
  bottom: auto;
  z-index: 40;
  width: 220px;
  height: 220px;
  min-height: 200px;
  aspect-ratio: auto;
  border-radius: 6px 0 0 6px;
  box-shadow: 0 8px 28px rgba(8, 18, 16, 0.3);
}

.youtube-player-panel iframe,
#youtubePlayer {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.playback-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-left: 1px solid #53605e;
}

.playback-mode-switch button {
  height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #bfc8c6;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.playback-mode-switch .youtube-video-toggle {
  width: 24px;
  padding: 0;
  display: grid;
  place-items: center;
}

.youtube-video-toggle svg {
  width: 14px;
  height: 14px;
}

.youtube-video-toggle[hidden] {
  display: none;
}

.playback-mode-switch button:hover:not(:disabled) {
  color: #fff;
  background: #344340;
}

.playback-mode-switch button.active {
  background: #f3f7f6;
  color: #173d38;
}

.playback-mode-switch button:disabled {
  color: #64706e;
  cursor: not-allowed;
}

.sync-controls {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding-left: 5px;
  border-left: 1px solid #53605e;
}

.sync-controls button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d8dfdd;
  cursor: pointer;
}

.sync-controls button:hover,
.sync-controls .sync-offset.active,
.sync-controls #realignTimelineButton.confirmed {
  color: #fff;
  background: #344340;
}

.sync-controls .sync-offset {
  width: 34px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.sync-controls svg {
  width: 15px;
  height: 15px;
}

.sync-controls .realign-timeline-button {
  width: auto;
  display: inline-flex;
  gap: 4px;
  padding: 0 7px;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.score-controls {
  display: flex;
  align-items: end;
  gap: 6px;
  padding-right: 9px;
  border-right: 1px solid var(--line);
}

.score-controls label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.score-controls select,
.score-controls input {
  width: 72px;
  height: 32px;
  padding: 0 7px;
  background: #f8faf9;
  border-color: #d7dfdd;
  border-radius: 5px;
}

.score-controls input {
  width: 58px;
}

#fontStyle {
  width: 96px;
}

#systemsPerPage {
  width: 58px;
}

.playback-tools {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 2px;
  padding-right: 9px;
  border-right: 1px solid var(--line);
}

.metronome-toggle {
  width: 34px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
}

.metronome-toggle:disabled {
  color: #8c8982;
  background: #eeeae2;
  cursor: not-allowed;
}

.metronome-toggle.active {
  border-color: var(--accent);
  background: #e7f4f1;
  color: var(--accent-dark);
}

.metronome-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.print-icon-button {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
}

.print-icon-button svg {
  width: 17px;
  height: 17px;
}

.beat-dots {
  min-width: 42px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.beat-dots span {
  width: 6px;
  height: 6px;
  background: #c9c4bb;
  border-radius: 50%;
}

.beat-dots span.active {
  background: var(--warm);
  transform: scale(1.35);
}

.score-time {
  min-width: 92px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.score-content {
  width: 100%;
  margin: 0;
  display: block;
  position: relative;
  transition: padding 180ms ease;
}

.score-content .score-sheet {
  transition: transform 180ms ease;
}

.score-content.has-section-navigator .score-sheet {
  transform: translateX(86px);
}

.score-content.has-youtube-sidebar {
  padding-right: 284px;
}

.score-content.has-youtube-sidebar .score-sheet {
  transform: none;
}

.score-content.has-section-navigator.has-youtube-sidebar .score-sheet {
  transform: translateX(86px);
}

.section-navigator {
  position: fixed;
  top: var(--score-toolbar-height);
  left: 252px;
  z-index: 12;
  width: 154px;
  max-height: calc(100vh - var(--score-toolbar-height) - 20px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid #dce4e2;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(24, 32, 31, 0.08);
}

.section-navigator.is-hidden {
  display: none !important;
}

.section-navigator-toggle {
  color: var(--accent-dark);
}

.section-navigator-toggle.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.section-navigator-heading {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.section-navigator-heading span {
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-navigator-heading strong {
  font-size: 14px;
}

.section-navigation {
  display: grid;
  gap: 2px;
  margin: 0;
}

.section-navigation-button {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.section-navigation-button span {
  color: #929c9a;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.section-navigation-button strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-navigation-button:hover {
  background: #f0f5f4;
}

.section-navigation-button.active {
  border-left-color: var(--accent);
  background: #e5f3f0;
  color: #0c615a;
}

.section-navigation-button.is-selected {
  border-left-color: var(--accent);
  background: #d8eeea;
  color: #084f4a;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

.score-sheet {
  --score-font: Georgia, "Times New Roman", serif;
  --section-gap: 28px;
  --first-system-gap: 30px;
  --system-gap: 60px;
  --system-bottom: 18px;
  --chord-size: 23px;
  --chord-offset: -33px;
  --title-size: 40px;
  --artist-size: 18px;
  --meta-size: 17px;
  --header-gap: 24px;
  --meta-gap: 20px;
  --section-title-size: 18px;
  max-width: 920px;
  min-height: 1120px;
  margin: 0 auto;
  padding: 54px 56px;
  background: #fff;
  border: 1px solid #e1e7e5;
  border-radius: 4px;
  box-shadow: 0 16px 44px rgba(24, 32, 31, 0.1);
}

.score-sheet[data-systems-per-page="5"] {
  --section-gap: 24px;
  --first-system-gap: 28px;
  --system-gap: 52px;
  --system-bottom: 16px;
  --chord-size: 22px;
  --chord-offset: -31px;
}

.score-sheet[data-systems-per-page="6"] {
  --section-gap: 20px;
  --first-system-gap: 26px;
  --system-gap: 46px;
  --system-bottom: 14px;
  --chord-size: 21px;
  --chord-offset: -29px;
  --title-size: 38px;
  --header-gap: 20px;
  --meta-gap: 17px;
}

.score-sheet[data-systems-per-page="7"] {
  --section-gap: 16px;
  --first-system-gap: 24px;
  --system-gap: 40px;
  --system-bottom: 12px;
  --chord-size: 20px;
  --chord-offset: -27px;
  --title-size: 36px;
  --artist-size: 17px;
  --meta-size: 16px;
  --header-gap: 17px;
  --meta-gap: 14px;
  --section-title-size: 17px;
}

.score-sheet[data-systems-per-page="8"] {
  --section-gap: 12px;
  --first-system-gap: 22px;
  --system-gap: 34px;
  --system-bottom: 10px;
  --chord-size: 19px;
  --chord-offset: -25px;
  --title-size: 34px;
  --artist-size: 16px;
  --meta-size: 15px;
  --header-gap: 14px;
  --meta-gap: 12px;
  --section-title-size: 16px;
}

.score-sheet[data-font="handwritten"] {
  --score-font: "Marker Felt", "Comic Sans MS", cursive;
}

.score-sheet[data-font="classic"] {
  --score-font: Georgia, "Times New Roman", serif;
}

.score-sheet[data-font="modern"] {
  --score-font: Inter, ui-sans-serif, system-ui, sans-serif;
}

.score-header {
  display: grid;
  justify-items: center;
  position: relative;
  margin-bottom: var(--header-gap);
}

.score-editor-credit {
  position: absolute;
  top: -28px;
  right: 0;
  max-width: 220px;
  overflow: hidden;
  color: #7b8482;
  font-family: var(--score-font);
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-editor-credit strong {
  font-weight: 600;
}

.score-header input {
  border: 0;
  box-shadow: none;
  text-align: center;
  padding: 0;
  background: transparent;
}

#songTitle {
  font-size: var(--title-size);
  font-family: var(--score-font);
  font-weight: 700;
}

#songArtist {
  max-width: 360px;
  font-size: var(--artist-size);
  font-weight: 600;
  font-family: var(--score-font);
}

.score-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: var(--meta-gap);
  font-family: var(--score-font);
  font-size: var(--meta-size);
  font-weight: 700;
}

.score-meta input {
  width: 54px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 2px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.tempo-mark span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 0.7;
}

#songMeter {
  width: 72px;
}

.sections {
  display: grid;
  gap: var(--section-gap);
}

.section-title {
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 10px 16px;
  font-family: var(--score-font);
  font-size: var(--section-title-size);
  font-weight: 700;
}

.score-section > .staff-row:first-of-type {
  margin-top: var(--first-system-gap);
}

.score-section.is-selected {
  outline: 2px solid #2a9d93;
  outline-offset: 8px;
  background: rgba(15, 118, 110, 0.035);
}

.score-section.is-selected .section-title {
  color: var(--accent-dark);
}

.section-title[contenteditable="true"] {
  min-width: 110px;
  outline: 1px solid var(--accent);
  background: #fff;
}

.staff-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: end;
  margin-bottom: var(--system-bottom);
}

.staff-row + .staff-row {
  margin-top: var(--system-gap);
}

.staff-row:has(.measure:only-child) {
  margin-bottom: max(8px, calc(var(--system-bottom) / 2));
}

.staff-row + .staff-row:has(.measure:only-child) {
  margin-top: max(30px, calc(var(--system-gap) * 0.72));
}

.clef {
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 58px;
  line-height: 1;
  font-family: Georgia, serif;
}

.measures {
  position: relative;
  display: flex;
  border-left: 2px solid var(--ink);
}

.print-repeat-symbol,
.print-repeat-count {
  display: none;
}

.measure {
  flex: 0 0 25%;
  min-width: 0;
  min-height: 58px;
  border-right: 2px solid var(--ink);
  position: relative;
  background: transparent;
  cursor: pointer;
}

.measure::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 20px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
  box-shadow: 0 9px var(--ink), 0 18px var(--ink), 0 27px var(--ink), 0 36px var(--ink);
  pointer-events: none;
}

.measure.is-selected {
  outline: 2px solid #2a9d93;
  outline-offset: -2px;
  background: rgba(15, 118, 110, 0.08);
}

.measure.is-playing {
  background-color: rgba(15, 118, 110, 0.08);
}

.measure.is-playing::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -36px;
  bottom: -4px;
  left: var(--playhead-position, 0%);
  width: 3px;
  background: #d94835;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.beat-chords {
  position: absolute;
  z-index: 2;
  top: var(--chord-offset);
  left: 12px;
  right: 6px;
  display: grid;
  grid-template-columns: repeat(var(--pulse-count, 4), minmax(0, 1fr));
  align-items: end;
}

.beat-chords input {
  position: static;
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  font-family: var(--score-font);
  font-size: min(var(--chord-size), 18px);
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
}

.beat-chords[data-pulses="6"] input {
  font-size: 14px;
}

.beat-chords input::placeholder {
  color: transparent;
}

.beat-chords input:focus {
  border-bottom: 1px solid var(--accent);
  box-shadow: none;
}

.time-signature {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 7px;
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 0.78;
  text-align: center;
}

.measure.has-time-signature .beat-chords,
.measure.has-time-signature .slashes {
  left: 42px;
}

.slashes {
  position: absolute;
  z-index: 1;
  inset: 22px 12px 0;
  display: grid;
  grid-template-columns: repeat(var(--pulse-count, 4), 1fr);
  align-items: center;
  pointer-events: none;
}

.slashes span {
  display: block;
  width: 18px;
  height: 4px;
  background: var(--ink);
  transform: rotate(-38deg);
}

@media (max-width: 900px) {
  .auth-view {
    grid-template-rows: 62px minmax(0, 1fr);
  }

  .auth-nav {
    padding: 0 18px;
  }

  .auth-nav-note {
    display: none;
  }

  .auth-view::before {
    inset: 62px 0 0;
  }

  .login-stage {
    place-items: start center;
    padding: 24px 14px;
  }

  .login-card {
    padding: 24px 20px;
  }

  .auth-hero {
    min-height: 560px;
  }

  .auth-hero > img {
    object-position: 61% center;
  }

  .auth-shade {
    background: rgba(245, 248, 247, 0.72);
  }

  .auth-content {
    width: min(440px, calc(100% - 36px));
    margin-left: 18px;
    padding: 34px 0;
  }

  .auth-content h1 {
    font-size: 52px;
  }

  .auth-description {
    max-width: 390px;
    font-size: 17px;
  }

  .auth-benefits {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 24px;
  }

  .auth-benefits span {
    white-space: normal;
  }

  .app-shell {
    padding: 12px;
  }

  .workspace,
  .editor-view {
    grid-template-columns: 1fr;
  }

  .create-view {
    min-height: calc(100vh - 24px);
  }

  .create-panel {
    padding: 20px;
  }

  .projects-sidebar {
    position: static;
    height: auto;
    max-height: 250px;
  }

  .sidebar-account {
    margin-top: 18px;
  }

  .project-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .input-panel {
    position: static;
    height: auto;
  }

  .score-panel {
    padding: 12px;
  }

  .score-toolbar {
    margin: -12px -12px 16px;
    padding: 12px;
  }

  .toolbar-main {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    align-items: start;
  }

  .toolbar-group {
    width: 100%;
    padding: 0;
    border-left: 0;
  }

  .toolbar-group-general,
  .toolbar-group-measure {
    grid-column: 1 / -1;
  }

  .toolbar-group-system {
    grid-column: 1;
  }

  .toolbar-group-share {
    grid-column: 2;
  }

  .toolbar-group-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .toolbar-group-measure .toolbar-group-controls,
  .toolbar-group-system .toolbar-group-controls {
    justify-content: flex-start;
  }

  .toolbar-group-share .toolbar-group-controls {
    justify-content: flex-end;
  }

  .chord-player {
    width: 100%;
  }

  .playback-tools {
    width: auto;
    margin: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .score-controls {
    width: 100%;
    padding: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .score-sheet {
    padding: 34px 18px;
    min-height: auto;
  }

  #songTitle {
    font-size: 34px;
  }

  .score-header span {
    position: static;
    margin-top: 6px;
  }

  .measures {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    row-gap: 34px;
  }
}

/* Public landing and connected creation flow */
.auth-view {
  min-height: 100svh;
  grid-template-rows: 72px minmax(0, 1fr);
  overflow: visible;
  background: #172321;
}

.auth-view::before {
  content: none;
}

.auth-nav {
  height: 72px;
  padding: 0 clamp(22px, 5vw, 76px);
  border: 0;
  background: #f8faf9;
}

.landing-login-button,
.landing-primary-button,
.create-account button {
  border: 0;
  cursor: pointer;
}

.create-account .create-projects-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: #2f8f86;
  background: #244943;
}

.create-projects-button svg {
  width: 16px;
  height: 16px;
}

.landing-login-button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #b9c7c4;
  border-radius: 5px;
  background: transparent;
  color: #17312d;
  font-size: 13px;
  font-weight: 800;
}

.landing-login-button:hover {
  border-color: #16877e;
  background: #eef7f5;
  color: #0d665f;
}

.landing-view {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  isolation: isolate;
  overflow: hidden;
  background: #172321 url("assets/mimusica-login-hero.webp") center / cover no-repeat;
}

.landing-view::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 27, 25, 0.96) 0%, rgba(15, 27, 25, 0.82) 35%, rgba(15, 27, 25, 0.14) 70%);
}

.landing-copy {
  width: min(650px, calc(100% - 44px));
  align-self: center;
  margin-left: clamp(24px, 7vw, 108px);
  padding: 48px 0 34px;
  color: #ffffff;
}

.landing-kicker {
  margin: 0 0 14px;
  color: #77d1c7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-copy h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(54px, 6.5vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.landing-description {
  max-width: 550px;
  margin: 22px 0 28px;
  color: #d7e0de;
  font-size: 18px;
  line-height: 1.55;
}

.landing-primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-radius: 5px;
  background: #27a398;
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
}

.landing-primary-button:hover {
  background: #17877e;
}

.landing-primary-button svg {
  width: 19px;
  height: 19px;
}

.landing-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.landing-proof > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 19px clamp(18px, 3vw, 44px);
  background: rgba(15, 27, 25, 0.88);
}

.landing-proof strong {
  color: #ffffff;
  font-size: 13px;
}

.landing-proof span {
  color: #aebbb8;
  font-size: 11px;
}

.login-stage {
  min-height: calc(100svh - 72px);
  padding: 38px 20px;
  background:
    linear-gradient(rgba(239, 244, 242, 0.9), rgba(239, 244, 242, 0.96)),
    url("assets/mimusica-login-hero.webp") center / cover no-repeat;
}

.login-card {
  position: relative;
}

.login-back-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #f0f4f3;
  color: #586461;
  cursor: pointer;
}

.login-back-button:hover {
  background: #e4efed;
  color: #0d665f;
}

.login-back-button svg {
  width: 19px;
  height: 19px;
}

.create-view {
  min-height: 100svh;
  display: block;
  padding: 0;
  background: #eef3f1;
}

.create-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(22px, 5vw, 72px);
  background: #172321;
  color: #ffffff;
}

.create-nav .brand {
  margin: 0;
  padding: 0;
  border: 0;
}

.create-nav .brand-mark {
  border-radius: 5px;
  background: #27a398;
}

.create-nav .brand h1 {
  color: #ffffff;
}

.create-nav .brand p {
  color: #aebbb8;
}

.create-account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #c9d3d1;
  font-size: 12px;
  font-weight: 700;
}

.create-account button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #49605c;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.create-account button:hover {
  border-color: #66c5bb;
  background: #213b37;
}

.create-workspace {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100svh - 112px);
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  margin: 20px auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9e2df;
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(19, 37, 33, 0.1);
}

.create-intro {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  padding: 42px;
  isolation: isolate;
  overflow: hidden;
  background: #172321 url("assets/mimusica-login-hero.webp") 61% center / cover no-repeat;
  color: #ffffff;
}

.create-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 30, 27, 0.96), rgba(13, 30, 27, 0.08) 75%);
}

.create-intro-step {
  color: #77d1c7;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.create-intro h2 {
  max-width: 470px;
  margin: 10px 0 14px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

.create-intro p {
  max-width: 450px;
  margin: 0;
  color: #d0dcda;
  font-size: 14px;
  line-height: 1.55;
}

.create-panel {
  width: 100%;
  align-content: center;
  padding: clamp(28px, 4vw, 52px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 900px) {
  .auth-view {
    grid-template-rows: 62px minmax(0, 1fr);
  }

  .auth-nav {
    height: 62px;
  }

  .landing-view,
  .login-stage {
    min-height: calc(100svh - 62px);
  }

  .landing-view {
    background-position: 62% center;
  }

  .landing-view::before {
    background: linear-gradient(90deg, rgba(15, 27, 25, 0.95), rgba(15, 27, 25, 0.52));
  }

  .landing-copy {
    align-self: end;
    margin: 0 22px;
    padding: 62px 0 38px;
  }

  .landing-copy h1 {
    font-size: 50px;
  }

  .landing-description {
    font-size: 16px;
  }

  .landing-proof {
    grid-template-columns: 1fr;
  }

  .landing-proof > div:nth-child(n + 2) {
    display: none;
  }

  .create-nav {
    min-height: 64px;
    padding: 10px 16px;
  }

  .create-nav .brand p,
  .create-account > span {
    display: none;
  }

  .create-projects-button span {
    display: none;
  }

  .create-account .create-projects-button {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .create-workspace {
    width: min(100% - 24px, 640px);
    min-height: 0;
    grid-template-columns: 1fr;
    margin: 12px auto;
  }

  .create-intro {
    min-height: 270px;
    padding: 28px;
    background-position: center 44%;
  }

  .create-intro h2 {
    font-size: 30px;
  }

  .create-panel {
    padding: 26px 20px;
  }
}

@page {
  size: letter portrait;
  margin: 12mm 10mm;
}

@media (max-width: 900px) {
  .score-content {
    width: 100%;
    display: block;
  }

  .score-content.has-section-navigator .score-sheet {
    transform: none;
  }

  .score-content.has-youtube-sidebar .score-sheet,
  .score-content.has-section-navigator.has-youtube-sidebar .score-sheet {
    transform: none;
  }

  .score-content.has-youtube-sidebar {
    padding-right: 0;
  }

  .youtube-player-panel.is-minimized {
    position: static;
    width: 200px;
    height: 200px;
    margin-left: auto;
    border-radius: 6px;
    box-shadow: none;
  }

  .section-navigator {
    position: sticky;
    top: var(--score-toolbar-height);
    left: auto;
    z-index: 12;
    width: auto;
    max-height: none;
    margin-bottom: 12px;
    padding: 8px;
    overflow: hidden;
  }

  .section-navigator-heading {
    display: none;
  }

  .section-navigation {
    display: flex;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
  }

  .section-navigation-button {
    min-width: 112px;
  }
}

/* Responsive application layout */
@media (max-width: 1180px) {
  .score-toolbar {
    min-height: 0;
  }

  .toolbar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-title,
  .toolbar-actions {
    width: 100%;
  }

  .toolbar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-toolbar-toggle {
    display: grid;
    flex: 0 0 34px;
  }

  .score-toolbar.tools-collapsed .toolbar-actions {
    display: none;
  }

  .score-toolbar.tools-collapsed {
    gap: 7px;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .toolbar-group-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .youtube-player-panel {
    min-height: 200px;
    aspect-ratio: auto;
  }

  .sync-controls .realign-timeline-button span {
    display: none;
  }

  .sync-controls .realign-timeline-button {
    width: 24px;
    padding: 0;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .editor-view {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: clip;
  }

  .projects-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 14px;
    overflow-x: clip;
    box-shadow: none;
  }

  .brand-compact {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .projects-heading h2 {
    font-size: 18px;
  }

  .project-list {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .project-item {
    flex: 0 0 min(78vw, 292px);
  }

  .sidebar-account {
    margin-top: 12px;
    padding-top: 10px;
  }

  .score-panel {
    width: 100%;
    min-width: 0;
    padding: 0 10px 28px;
    overflow-x: clip;
  }

  .score-toolbar {
    width: auto;
    margin: 0 -10px 12px;
    padding: 10px;
    gap: 8px;
  }

  .toolbar-title {
    min-width: 0;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .toolbar-group,
  .toolbar-group-general,
  .toolbar-group-measure,
  .toolbar-group-system,
  .toolbar-group-share {
    width: 100%;
    grid-column: 1;
    padding: 0;
    border: 0;
  }

  .toolbar-group + .toolbar-group {
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .toolbar-group-controls,
  .toolbar-group-measure .toolbar-group-controls,
  .toolbar-group-system .toolbar-group-controls,
  .toolbar-group-share .toolbar-group-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }

  .toolbar-group-general .score-controls {
    flex: 1 1 232px;
    display: grid;
    grid-template-columns: 58px 68px minmax(94px, 1fr);
    gap: 6px;
  }

  .toolbar-group-general .score-controls label,
  .toolbar-group-general .score-controls input,
  .toolbar-group-general .score-controls select,
  #fontStyle {
    width: 100%;
  }

  .toolbar-group-general .playback-tools {
    flex: 0 0 auto;
  }

  .toolbar-group-measure .score-controls {
    width: auto;
    flex: 0 0 72px;
  }

  .toolbar-group-system .score-controls {
    width: auto;
    flex: 0 0 58px;
  }

  .measure-pulse-control {
    border: 0;
    padding-left: 0;
  }

  .chord-player {
    min-height: 70px;
    grid-template-columns: 28px 38px minmax(72px, 1fr) 38px;
    grid-template-rows: 30px 30px;
    gap: 3px 5px;
    padding: 5px 7px;
  }

  .chord-player .playback-mode-switch {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-self: start;
    border-left: 0;
  }

  .chord-player .sync-controls {
    grid-column: 3 / 5;
    grid-row: 2;
    justify-self: end;
  }

  .score-content {
    width: 100%;
    min-width: 0;
  }

  .section-navigator {
    top: var(--score-toolbar-height);
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    border-left: 1px solid #dce4e2;
    border-radius: 5px;
  }

  .section-navigation {
    gap: 0;
  }

  .section-navigation-button {
    flex: 0 0 auto;
    min-width: 118px;
    border-radius: 0;
  }

  .score-sheet {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    padding: 30px 12px;
    overflow: hidden;
  }

  .score-editor-credit {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: -12px 0 10px;
    text-align: right;
  }

  #songTitle {
    width: 100%;
    max-width: 100%;
    font-size: clamp(25px, 8vw, 34px);
  }

  #songArtist {
    width: 100%;
    max-width: 100%;
  }

  .score-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .staff-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .clef {
    font-size: 47px;
  }

  .measures {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .measure {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .auth-nav {
    padding: 0 14px;
  }

  .auth-brand {
    gap: 8px;
    font-size: 18px;
  }

  .auth-brand .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .auth-brand .brand-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .landing-login-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .landing-view {
    background-position: 66% center;
  }

  .landing-view::before {
    background: linear-gradient(0deg, rgba(15, 27, 25, 0.98) 0%, rgba(15, 27, 25, 0.72) 64%, rgba(15, 27, 25, 0.34) 100%);
  }

  .landing-copy {
    width: auto;
    margin: 0 18px;
    padding: 36px 0 28px;
  }

  .landing-copy h1 {
    font-size: 42px;
    line-height: 1;
  }

  .landing-description {
    margin: 18px 0 22px;
    font-size: 15px;
  }

  .landing-primary-button {
    width: 100%;
    justify-content: space-between;
  }

  .login-stage {
    min-width: 0;
    padding: 14px 10px;
  }

  .login-card {
    width: 100%;
    max-width: calc(100vw - 20px);
    min-width: 0;
    padding: 22px 16px;
  }

  .create-nav {
    min-height: 62px;
    gap: 8px;
    padding: 9px 12px;
  }

  .create-nav .brand {
    min-width: 0;
    gap: 8px;
  }

  .create-nav .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .create-nav .brand-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .create-nav .brand h1 {
    font-size: 19px;
  }

  .create-account {
    flex: 0 0 auto;
    gap: 7px;
  }

  .create-account button {
    min-height: 34px;
    padding: 0 9px;
  }

  .create-workspace {
    width: calc(100% - 16px);
    margin: 8px auto;
    border-radius: 6px;
  }

  .create-intro {
    min-height: 235px;
    padding: 22px;
  }

  .create-intro h2 {
    font-size: 27px;
  }

  .create-panel {
    gap: 18px;
    padding: 24px 16px;
  }

  .upload-box {
    min-height: 142px;
    padding: 14px;
  }

  .brand-compact h1 {
    font-size: 19px;
  }

  .toolbar-group-general .score-controls {
    flex-basis: 100%;
  }

  .toolbar-group-general .playback-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .score-sheet {
    --title-size: 30px;
    --artist-size: 14px;
    --meta-size: 14px;
    --section-title-size: 15px;
    --chord-size: 17px;
    --chord-offset: -27px;
    --system-gap: 48px;
    padding: 26px 8px;
  }

  .score-header {
    padding: 0 6px;
  }

  .score-meta,
  .section-title {
    margin-left: 6px;
  }

  .staff-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .clef {
    font-size: 42px;
  }

  .slashes {
    inset-inline: 5px;
  }

  .slashes span {
    width: 13px;
  }
}

@media print {
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff;
  }

  .input-panel,
  .auth-view,
  .projects-sidebar,
  .section-navigator,
  .score-toolbar {
    display: none;
  }

  .app-shell,
  .score-panel,
  .score-sheet {
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: 0;
  }

  .workspace,
  .editor-view {
    display: block;
  }

  .score-content {
    width: auto;
    display: block;
  }

  .score-content.has-section-navigator .score-sheet {
    transform: none;
  }

  .score-sheet {
    width: 190mm;
    max-width: none;
    min-height: 0;
  }

  .score-sheet[data-systems-per-page="4"] {
    --section-gap: 18px;
    --first-system-gap: 24px;
    --system-gap: 44px;
    --system-bottom: 12px;
  }

  .score-sheet[data-systems-per-page="5"] {
    --section-gap: 15px;
    --first-system-gap: 21px;
    --system-gap: 38px;
    --system-bottom: 10px;
    --chord-size: 21px;
    --chord-offset: -29px;
  }

  .score-sheet[data-systems-per-page="6"] {
    --section-gap: 12px;
    --first-system-gap: 18px;
    --system-gap: 32px;
    --system-bottom: 8px;
    --chord-size: 19px;
    --chord-offset: -25px;
    --title-size: 33px;
    --header-gap: 12px;
    --meta-gap: 10px;
    --section-title-size: 16px;
  }

  .score-sheet[data-systems-per-page="7"] {
    --section-gap: 9px;
    --first-system-gap: 16px;
    --system-gap: 28px;
    --system-bottom: 7px;
    --chord-size: 18px;
    --chord-offset: -23px;
    --title-size: 31px;
    --artist-size: 15px;
    --meta-size: 14px;
    --header-gap: 10px;
    --meta-gap: 9px;
    --section-title-size: 15px;
  }

  .score-sheet[data-systems-per-page="8"] {
    --section-gap: 6px;
    --first-system-gap: 12px;
    --system-gap: 22px;
    --system-bottom: 5px;
    --chord-size: 17px;
    --chord-offset: -21px;
    --title-size: 28px;
    --artist-size: 14px;
    --meta-size: 13px;
    --header-gap: 7px;
    --meta-gap: 6px;
    --section-title-size: 14px;
  }

  .score-sheet[data-systems-per-page="7"] .section-title,
  .score-sheet[data-systems-per-page="8"] .section-title {
    padding: 0;
    margin-bottom: 5px;
  }

  .sections {
    display: block;
  }

  .score-section {
    margin-bottom: var(--section-gap);
    break-inside: auto;
    page-break-inside: auto;
  }

  .section-title {
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-repeat-omitted {
    display: none !important;
  }

  .print-repeat-symbol,
  .print-repeat-count {
    position: absolute;
    z-index: 5;
    display: block;
    color: #111;
    pointer-events: none;
  }

  .print-repeat-symbol {
    top: 9px;
    font-family: "Apple Symbols", "Noto Music", serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
  }

  .print-repeat-start {
    left: -7px;
  }

  .print-repeat-end {
    right: -8px;
  }

  .print-repeat-count {
    top: -18px;
    right: 3px;
    font-family: var(--score-font);
    font-size: 13px;
    font-weight: 700;
  }

  .staff-row {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .staff-row.print-page-end {
    break-after: page;
    page-break-after: always;
  }

  .staff-row.print-page-start {
    margin-top: 5mm !important;
  }

  .measure,
  .measure.is-selected,
  .measure.is-playing {
    background: transparent;
    outline: 0;
  }

  .score-section.is-selected {
    outline: 0;
    background: transparent;
  }

  .measure::before,
  .slashes span {
    background: #111;
  }

  .measure::before {
    box-shadow: 0 9px #111, 0 18px #111, 0 27px #111, 0 36px #111;
  }

  .measure.is-playing::after {
    display: none;
  }
}
