    :root {
      color-scheme: dark;
      --paper: #101214;
      --surface: #171a1f;
      --surface-soft: #20242b;
      --ink: #f2f0ea;
      --muted: #a99f93;
      --line: #30343b;
      --tick: #2a2f36;
      --beat: #59616b;
      --bar: #9b8d7c;
      --accent: #3db6ad;
      --accent-soft: #173d3b;
      --section: #f0a35f;
      --section-soft: #2b211b;
      --chord-bg: rgba(248, 244, 237, 0.72);
      --chord-border: rgba(248, 244, 237, 0.46);
      --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
      --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
      --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --font-scale: 1;
      --chart-base-size: 15px;
      --chart-size: calc(var(--chart-base-size) * var(--font-scale));
      --tick-width: 14px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      background: var(--paper);
      color: var(--ink);
      font-family: var(--sans);
      line-height: 1.35;
    }

    body {
      margin: 0;
      min-width: 320px;
    }

    .topbar {
      background: rgba(16, 18, 20, 0.94);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--line);
    }

    .admin-mode .topbar {
      position: sticky;
      top: 0;
      z-index: 5;
    }

    .topbar-inner {
      align-items: center;
      display: flex;
      gap: 14px;
      justify-content: space-between;
      margin: 0 auto;
      max-width: 1180px;
      padding: 12px 18px;
    }

    h1 {
      font-size: calc(20px * var(--font-scale));
      letter-spacing: 0;
      line-height: 1.1;
      margin: 0;
    }

    .subtitle {
      color: var(--muted);
      font-size: calc(12px * var(--font-scale));
      margin-top: 4px;
    }

    .subtitle[contenteditable="true"]:empty::before {
      color: rgba(169, 159, 147, 0.62);
      content: "Subtítulo";
    }

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

    button {
      align-items: center;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      cursor: pointer;
      display: inline-flex;
      font: 800 calc(13px * var(--font-scale))/1 var(--mono);
      height: 34px;
      justify-content: center;
      min-width: 34px;
      padding: 0 10px;
    }

    button:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    button:disabled {
      background: rgba(23, 26, 31, 0.42);
      border-color: rgba(48, 52, 59, 0.58);
      color: rgba(169, 159, 147, 0.48);
      cursor: default;
      opacity: 0.68;
    }

    button:disabled:hover {
      border-color: rgba(48, 52, 59, 0.58);
      color: rgba(169, 159, 147, 0.48);
    }

    button.is-active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    #save-json.has-unsaved-changes {
      background: rgba(240, 163, 95, 0.18);
      border-color: var(--section);
      box-shadow: 0 0 0 2px rgba(240, 163, 95, 0.16);
      color: var(--section);
    }

    [hidden] {
      display: none !important;
    }

    .admin-only {
      display: none;
    }

    .admin-mode .admin-only {
      display: inline-flex;
    }

    .volume-controls {
      align-items: center;
      display: grid;
      gap: 10px;
    }

    .volume-control {
      align-items: center;
      color: var(--muted);
      display: grid;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      gap: 6px;
      grid-template-columns: 104px minmax(0, 1fr);
      text-transform: uppercase;
    }

    .volume-control input {
      accent-color: var(--accent);
      cursor: pointer;
      width: 100%;
    }

    .output-controls {
      display: grid;
      gap: 6px;
    }

    .options-separator {
      border: 0;
      border-top: 1px solid rgba(240, 163, 95, 0.34);
      margin: 12px 0 0;
    }

    .output-actions {
      display: flex;
      justify-content: flex-start;
      margin-bottom: 4px;
    }

    .output-control {
      align-items: center;
      color: var(--muted);
      display: grid;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      gap: 6px;
      grid-template-columns: 52px minmax(140px, 1fr) minmax(82px, 0.45fr) 64px;
      text-transform: uppercase;
    }

    .output-control span {
      color: var(--section);
      font-weight: 900;
    }

    .output-control select,
    .output-control input {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(11px * var(--font-scale))/1 var(--mono);
      height: 28px;
      min-width: 0;
      padding: 0 6px;
    }

    .output-control input {
      accent-color: var(--accent);
      cursor: pointer;
      padding: 0;
    }

    .toast-stack {
      bottom: 18px;
      display: grid;
      gap: 8px;
      left: 18px;
      max-width: min(360px, calc(100vw - 36px));
      position: fixed;
      z-index: 50;
    }

    .action-toast {
      background: rgba(18, 23, 26, 0.97);
      border: 1px solid rgba(61, 182, 173, 0.45);
      border-radius: 8px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
      color: var(--ink);
      font: 800 calc(12px * var(--font-scale))/1.25 var(--mono);
      opacity: 0;
      padding: 10px 12px;
      transform: translateY(8px);
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .action-toast.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .action-toast.is-error {
      border-color: rgba(240, 163, 95, 0.72);
      color: var(--section);
    }

    .boot-status {
      background: rgba(18, 23, 26, 0.98);
      border: 1px solid rgba(61, 182, 173, 0.48);
      border-radius: 8px;
      bottom: 18px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
      color: var(--ink);
      display: grid;
      gap: 8px;
      left: 18px;
      max-width: min(420px, calc(100vw - 36px));
      padding: 10px 12px;
      position: fixed;
      transition: opacity 180ms ease, transform 180ms ease;
      width: 420px;
      z-index: 52;
    }

    .boot-status.is-done {
      opacity: 0;
      transform: translateY(8px);
    }

    .boot-status.is-error {
      border-color: rgba(240, 163, 95, 0.72);
    }

    .boot-status-head,
    .boot-status-detail {
      align-items: center;
      display: flex;
      font: 800 calc(11px * var(--font-scale))/1.25 var(--mono);
      gap: 8px;
      justify-content: space-between;
      min-width: 0;
    }

    .boot-status-head strong,
    .boot-status-detail {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .boot-status-head span {
      color: var(--accent);
      flex: 0 0 auto;
    }

    .boot-status.is-error .boot-status-head span {
      color: var(--section);
    }

    .boot-status-track {
      background: rgba(48, 52, 59, 0.72);
      border-radius: 999px;
      height: 8px;
      overflow: hidden;
    }

    .boot-status-bar {
      background: linear-gradient(90deg, var(--accent), var(--section));
      height: 100%;
      transform: scaleX(0);
      transform-origin: left center;
      transition: transform 140ms ease;
      width: 100%;
    }

    .preload-progress {
      background: rgba(18, 23, 26, 0.98);
      border: 1px solid rgba(61, 182, 173, 0.48);
      border-radius: 8px;
      bottom: 18px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
      color: var(--ink);
      display: grid;
      gap: 8px;
      left: 18px;
      max-width: min(420px, calc(100vw - 36px));
      padding: 10px 12px;
      position: fixed;
      width: 420px;
      z-index: 51;
    }

    .preload-progress-head,
    .preload-progress-detail {
      align-items: center;
      display: flex;
      font: 800 calc(11px * var(--font-scale))/1.25 var(--mono);
      gap: 8px;
      justify-content: space-between;
      min-width: 0;
    }

    .preload-progress-head strong,
    .preload-progress-detail {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .preload-progress-head span {
      color: var(--accent);
      flex: 0 0 auto;
    }

    .preload-progress-track {
      background: rgba(48, 52, 59, 0.72);
      border-radius: 999px;
      height: 8px;
      overflow: hidden;
    }

    .preload-progress-bar {
      background: linear-gradient(90deg, var(--accent), var(--section));
      height: 100%;
      transform: scaleX(0);
      transform-origin: left center;
      transition: transform 140ms ease;
      width: 100%;
    }

    .midi-monitor {
      border-top: 1px solid var(--line);
      color: var(--muted);
      display: none;
      font: 800 calc(11px * var(--font-scale))/1.2 var(--mono);
      margin: 0 auto;
      max-width: 1180px;
      min-width: 0;
      overflow: hidden;
      padding: 6px 18px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-mode.midi-enabled .midi-monitor {
      display: block;
    }

    .midi-monitor strong {
      color: var(--section);
    }

    .live-control {
      align-items: stretch;
      background: rgba(18, 23, 26, 0.96);
      border: 1px solid rgba(61, 182, 173, 0.38);
      border-radius: 8px;
      bottom: 18px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
      display: grid;
      gap: 6px;
      max-width: min(430px, calc(100vw - 32px));
      padding: 6px;
      position: fixed;
      right: 18px;
      z-index: 40;
    }

    .live-control.is-playing {
      border-color: rgba(61, 182, 173, 0.72);
    }

    .live-control button {
      height: 36px;
      min-width: 38px;
      padding: 0 9px;
    }

    .live-control-state {
      color: var(--muted);
      font: 800 calc(11px * var(--font-scale))/1.2 var(--mono);
      max-width: 100%;
      min-width: 0;
      white-space: pre-line;
    }

    .live-control.is-playing .live-control-state {
      color: var(--accent);
    }

    .live-control-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .live-control-main {
      align-items: center;
      display: flex;
      gap: 6px;
    }

    .live-song-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .live-song-buttons button.is-active {
      border-color: var(--section);
      color: var(--section);
    }

    .transport-scroll-button {
      background: rgba(18, 23, 26, 0.94);
      border-color: rgba(61, 182, 173, 0.52);
      color: var(--accent);
      display: none;
    }

    .transport-scroll-button.is-visible {
      display: inline-flex;
    }

    .options-dialog {
      align-items: center;
      background: rgba(0, 0, 0, 0.6);
      bottom: 0;
      display: flex;
      justify-content: center;
      left: 0;
      padding: 18px;
      position: fixed;
      right: 0;
      top: 0;
      z-index: 60;
    }

    .options-dialog[hidden] {
      display: none;
    }

    .options-panel {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      display: grid;
      gap: 12px;
      max-width: 480px;
      padding: 14px;
      width: min(100%, 480px);
    }

    .cifra-dialog {
      background: rgba(18, 23, 26, 0.98);
      border: 1px solid rgba(240, 163, 95, 0.5);
      border-radius: 8px;
      box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48);
      display: grid;
      gap: 10px;
      max-height: min(760px, calc(100vh - 110px));
      padding: 12px;
      position: fixed;
      right: 18px;
      top: 86px;
      width: min(620px, calc(100vw - 36px));
      z-index: 58;
    }

    .cifra-dialog[hidden] {
      display: none;
    }

    .cifra-head {
      align-items: center;
      display: flex;
      gap: 10px;
      justify-content: space-between;
    }

    .cifra-title {
      color: var(--section);
      font: 900 calc(13px * var(--font-scale))/1.2 var(--mono);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .cifra-url-row,
    .cifra-actions {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .cifra-actions a {
      align-items: center;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      display: inline-flex;
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      height: 34px;
      padding: 0 10px;
      text-decoration: none;
      white-space: nowrap;
    }

    .cifra-actions a:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .cifra-url-row input {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      flex: 1 1 280px;
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      height: 34px;
      min-width: 0;
      padding: 0 10px;
    }

    .cifra-results {
      background: rgba(13, 15, 17, 0.72);
      border: 1px solid var(--line);
      border-radius: 6px;
      display: grid;
      gap: 3px;
      max-height: 168px;
      overflow: auto;
      padding: 4px;
    }

    .cifra-results[hidden] {
      display: none;
    }

    .cifra-result-button {
      align-items: stretch;
      background: transparent;
      border-color: transparent;
      border-radius: 5px;
      color: var(--ink);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 3px;
      height: auto;
      justify-content: flex-start;
      line-height: normal;
      min-height: 44px;
      overflow: hidden;
      padding: 7px 8px;
      text-align: left;
      white-space: nowrap;
      width: 100%;
    }

    .cifra-result-button:hover {
      background: var(--surface-soft);
    }

    .cifra-result-button:focus-visible {
      outline: 1px solid var(--accent);
      outline-offset: -1px;
    }

    .cifra-result-title {
      color: var(--ink);
      display: block;
      font: 900 calc(12px * var(--font-scale))/1.25 var(--mono);
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
    }

    .cifra-result-url {
      color: var(--muted);
      display: block;
      font: 700 calc(10px * var(--font-scale))/1.25 var(--mono);
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
    }

    .cifra-output {
      background: #0d0f11;
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 700 calc(12px * var(--font-scale))/1.42 var(--mono);
      margin: 0;
      min-height: 220px;
      overflow: auto;
      padding: 12px;
      white-space: pre-wrap;
    }

    .cifra-output.is-empty {
      color: var(--muted);
    }

    .prompt-dialog {
      align-items: center;
      background: rgba(0, 0, 0, 0.62);
      bottom: 0;
      display: flex;
      justify-content: center;
      left: 0;
      padding: 18px;
      position: fixed;
      right: 0;
      top: 0;
      z-index: 70;
    }

    .prompt-dialog[hidden] {
      display: none;
    }

    .prompt-panel {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      display: grid;
      gap: 12px;
      max-width: 520px;
      padding: 14px;
      width: min(100%, 520px);
    }

    .prompt-head,
    .prompt-actions {
      align-items: center;
      display: flex;
      gap: 8px;
      justify-content: space-between;
    }

    .prompt-title {
      color: var(--section);
      font: 900 calc(13px * var(--font-scale))/1.2 var(--mono);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .prompt-body {
      min-width: 0;
    }

    .prompt-choose,
    .prompt-list,
    .prompt-form {
      display: grid;
      gap: 8px;
    }

    .prompt-search {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(13px * var(--font-scale))/1 var(--mono);
      height: 38px;
      min-width: 0;
      padding: 0 10px;
      width: 100%;
    }

    .prompt-list {
      max-height: min(420px, calc(100vh - 220px));
      overflow: auto;
    }

    .prompt-list-row {
      align-items: stretch;
      display: grid;
      gap: 6px;
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .prompt-list-item {
      align-items: center;
      background: var(--surface-soft);
      border-color: var(--line);
      display: grid;
      gap: 10px;
      grid-template-columns: 28px minmax(0, 1fr);
      height: auto;
      justify-content: stretch;
      min-height: 42px;
      padding: 8px 10px;
      text-align: left;
      white-space: normal;
      width: 100%;
    }

    .prompt-list-item:hover,
    .prompt-list-item:focus-visible {
      border-color: var(--accent);
      color: var(--accent);
    }

    .prompt-list-index {
      color: var(--muted);
      font: 900 calc(11px * var(--font-scale))/1 var(--mono);
      text-align: right;
    }

    .prompt-list-label {
      display: grid;
      gap: 3px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .prompt-list-label small {
      color: var(--muted);
      font: 700 calc(10px * var(--font-scale))/1.25 var(--mono);
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .prompt-list-action {
      align-self: stretch;
      border-color: rgba(255, 120, 120, 0.42);
      color: #ff9b8f;
      min-width: 34px;
      padding: 0 9px;
    }

    .prompt-list-action:hover,
    .prompt-list-action:focus-visible {
      border-color: #ff9b8f;
      color: #ffd1cb;
    }

    .prompt-field {
      display: grid;
      gap: 6px;
    }

    .prompt-field span,
    .prompt-empty {
      color: var(--muted);
      font: 800 calc(10px * var(--font-scale))/1.2 var(--mono);
      text-transform: uppercase;
    }

    .prompt-field input {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(13px * var(--font-scale))/1 var(--mono);
      height: 38px;
      min-width: 0;
      padding: 0 10px;
    }

    .prompt-actions {
      justify-content: flex-end;
    }

    .options-head {
      align-items: center;
      display: flex;
      justify-content: space-between;
    }

    .options-title {
      color: var(--section);
      font: 900 calc(13px * var(--font-scale))/1 var(--mono);
    }

    .options-group {
      display: grid;
      gap: 8px;
    }

    .options-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .options-label {
      color: var(--muted);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      text-transform: uppercase;
    }

    .midi-picker {
      align-items: center;
      background: rgba(0, 0, 0, 0.6);
      bottom: 0;
      display: flex;
      justify-content: center;
      left: 0;
      padding: 18px;
      position: fixed;
      right: 0;
      top: 0;
      z-index: 20;
    }

    .midi-picker[hidden] {
      display: none;
    }

    .midi-picker-panel {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      max-width: 420px;
      padding: 14px;
      width: min(100%, 420px);
    }

    .midi-picker-head {
      align-items: center;
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .midi-picker-title {
      color: var(--section);
      font: 900 calc(13px * var(--font-scale))/1 var(--mono);
    }

    .midi-input-list {
      display: grid;
      gap: 6px;
    }

    .midi-input-list button {
      justify-content: flex-start;
      min-height: 36px;
      width: 100%;
    }

    .midi-config {
      border-top: 1px solid var(--line);
      display: grid;
      gap: 6px;
      margin-top: 12px;
      padding-top: 12px;
    }

    .midi-config-row {
      align-items: center;
      display: grid;
      gap: 6px;
      grid-template-columns: minmax(0, 1fr) minmax(90px, auto) auto auto;
    }

    .midi-config-title {
      font: 800 calc(12px * var(--font-scale))/1.15 var(--sans);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .midi-config-signal {
      color: var(--muted);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .midi-config-row button {
      font-size: calc(11px * var(--font-scale));
      height: 28px;
      min-width: 28px;
      padding: 0 8px;
    }

    .midi-candidates {
      display: grid;
      gap: 4px;
      grid-column: 1 / -1;
      margin: 2px 0 4px;
      max-height: 128px;
      overflow: auto;
      padding-right: 2px;
    }

    .midi-candidates button {
      align-items: center;
      border-color: rgba(240, 163, 95, 0.42);
      color: var(--section);
      display: grid;
      gap: 6px;
      grid-template-columns: auto auto minmax(0, 1fr);
      justify-content: flex-start;
      min-height: 24px;
      min-width: 0;
      padding: 0 7px;
      width: 100%;
    }

    .midi-candidate-channel {
      background: rgba(61, 182, 173, 0.16);
      border: 1px solid rgba(61, 182, 173, 0.5);
      border-radius: 999px;
      color: var(--accent);
      font: 900 calc(10px * var(--font-scale))/1 var(--mono);
      padding: 2px 5px;
    }

    .midi-candidate-type {
      font: 900 calc(10px * var(--font-scale))/1 var(--mono);
      text-transform: uppercase;
    }

    .midi-candidate-data {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .midi-candidates button[data-midi-type="note"] {
      border-color: rgba(61, 182, 173, 0.62);
      color: var(--accent);
    }

    .midi-candidates button[data-midi-type="noteoff"] {
      border-color: rgba(169, 159, 147, 0.42);
      color: var(--muted);
    }

    .midi-candidates button[data-midi-type="cc"] {
      border-color: rgba(240, 163, 95, 0.62);
      color: var(--section);
    }

    .midi-candidates button[data-midi-type="program"] {
      border-color: rgba(255, 211, 115, 0.62);
      color: #ffd373;
    }

    .midi-candidates button[data-midi-type="pitch"] {
      border-color: rgba(215, 147, 255, 0.62);
      color: #d793ff;
    }

    main {
      margin: 0 auto;
      max-width: 1180px;
      padding: 18px 18px 150px;
    }

    .setlist {
      border-bottom: 1px solid var(--line);
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-bottom: 18px;
      padding-bottom: 18px;
    }

    .set-item {
      align-items: start;
      border-left: 3px solid var(--accent);
      cursor: pointer;
      display: grid;
      gap: 8px;
      grid-template-columns: minmax(0, 1fr);
      padding-left: 10px;
    }

    .admin-mode .set-item {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .set-item:hover strong,
    .set-item:focus-visible strong {
      color: var(--accent);
    }

    .set-item:focus-visible {
      border-radius: 4px;
      outline: 2px solid var(--accent);
      outline-offset: 4px;
    }

    .setlist-actions {
      align-items: center;
      border-left: 3px solid var(--accent);
      display: flex;
      gap: 8px;
      grid-column: 1 / -1;
      justify-content: flex-start;
      padding-left: 10px;
    }

    .setlist-actions button {
      font-size: calc(12px * var(--font-scale));
      height: 30px;
    }

    .set-item strong {
      display: block;
      font-size: calc(13px * var(--font-scale));
    }

    .set-item span {
      color: var(--muted);
      display: block;
      font-size: calc(12px * var(--font-scale));
      margin-top: 2px;
    }

    .set-item-controls {
      display: none;
      gap: 4px;
    }

    .admin-mode .set-item-controls {
      display: flex;
    }

    .set-item-controls button {
      font-size: calc(11px * var(--font-scale));
      height: 26px;
      min-width: 26px;
      padding: 0;
    }

    .set-item-controls .remove-song {
      color: var(--section);
    }

    .setlist-index {
      display: grid;
      gap: 10px;
      margin: 0 auto;
      max-width: 720px;
    }

    .setlist-link {
      background: var(--surface);
      border: 1px solid var(--line);
      border-left: 3px solid var(--accent);
      border-radius: 8px;
      color: var(--ink);
      display: block;
      padding: 14px 16px;
      text-decoration: none;
    }

    .setlist-link:hover,
    .setlist-link:focus-visible {
      border-color: var(--accent);
      outline: 0;
    }

    .setlist-link strong {
      display: block;
      font-size: calc(15px * var(--font-scale));
    }

    .setlist-link span {
      color: var(--muted);
      display: block;
      font-size: calc(12px * var(--font-scale));
      margin-top: 4px;
    }

    .song {
      margin: 0 0 36px;
      scroll-margin-top: 86px;
    }

    .admin-song-separator {
      border: 0;
      border-top: 2px solid rgba(240, 163, 95, 0.78);
      box-shadow: 0 0 10px rgba(240, 163, 95, 0.22);
      margin: 0 0 28px;
    }

    .song-head {
      align-items: end;
      border-bottom: 2px solid var(--line);
      display: flex;
      gap: 14px;
      justify-content: space-between;
      margin-bottom: 14px;
      padding-bottom: 10px;
    }

    .admin-mode .song-head {
      align-items: stretch;
      flex-direction: column;
      gap: 10px;
    }

    .song-title {
      font-size: calc(22px * var(--font-scale));
      line-height: 1.12;
      margin: 0;
    }

    .admin-mode .song-title {
      width: 100%;
    }

    .song-meta {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      justify-content: flex-end;
    }

    .admin-mode .song-meta {
      align-items: end;
      justify-content: flex-start;
    }

    .editor-field {
      color: var(--muted);
      display: grid;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      gap: 4px;
      text-transform: uppercase;
    }

    .editor-field input {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      height: 28px;
      min-width: 68px;
      padding: 0 8px;
    }

    .editor-field input:focus {
      border-color: var(--accent);
      outline: 0;
    }

    .audio-tracks {
      align-items: stretch;
      display: grid;
      gap: 5px;
      min-width: min(100%, 560px);
    }

    .audio-track-controls {
      align-items: end;
      background: rgba(32, 36, 43, 0.45);
      border: 1px solid rgba(48, 52, 59, 0.85);
      border-radius: 6px;
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      padding: 5px;
    }

    .audio-track-label {
      align-self: center;
      color: var(--section);
      font: 900 calc(11px * var(--font-scale))/1 var(--mono);
      min-width: 28px;
      text-transform: uppercase;
    }

    .audio-track-time {
      align-self: center;
      contain: layout paint style;
      color: #d6cbc0;
      flex: 0 0 13ch;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      font-variant-numeric: tabular-nums;
      opacity: 0.86;
      width: 13ch;
    }

    .audio-track-controls button {
      font-size: calc(11px * var(--font-scale));
      height: 28px;
      padding: 0 8px;
    }

    .audio-file-name {
      align-self: center;
      background: rgba(16, 18, 20, 0.72);
      border: 1px solid rgba(48, 52, 59, 0.9);
      border-radius: 6px;
      color: #d6cbc0;
      display: inline-flex;
      font: 800 calc(10px * var(--font-scale))/1.15 var(--mono);
      gap: 6px;
      max-width: 300px;
      min-width: 0;
      overflow: hidden;
      padding: 6px 8px;
      text-transform: none;
    }

    .audio-file-name::before {
      color: var(--section);
      content: "arquivo";
      flex: 0 0 auto;
      text-transform: uppercase;
    }

    .audio-file-name-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .audio-file-remove {
      flex: 0 0 auto;
      font-size: calc(10px * var(--font-scale));
      height: 18px;
      line-height: 1;
      padding: 0 5px;
    }

    .audio-upload-input {
      display: none;
    }

    .song-mute-controls {
      align-items: center;
      display: inline-flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .song-mute-controls button {
      background: rgba(32, 36, 43, 0.72);
      color: var(--muted);
      font-size: calc(10px * var(--font-scale));
      height: 28px;
      padding: 0 7px;
    }

    .song-mute-controls button.is-muted {
      background: rgba(240, 163, 95, 0.16);
      border-color: var(--section);
      color: var(--section);
      text-decoration: line-through;
    }

    .key-field {
      color: var(--muted);
      display: grid;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      gap: 4px;
      text-transform: uppercase;
    }

    .key-field-inline {
      display: inline-flex;
    }

    .key-control {
      align-items: center;
      background: var(--accent-soft);
      border-radius: 999px;
      color: #b9f0eb;
      display: inline-flex;
      gap: 4px;
      min-height: 28px;
      padding: 3px;
      white-space: nowrap;
    }

    .key-value {
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      min-width: 62px;
      padding: 0 3px;
      text-align: center;
      text-transform: none;
    }

    .key-step {
      border-radius: 999px;
      font-size: calc(11px * var(--font-scale));
      height: 22px;
      min-width: 22px;
      padding: 0;
    }

    .tag {
      background: var(--accent-soft);
      border-radius: 999px;
      color: #b9f0eb;
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      padding: 7px 9px;
      white-space: nowrap;
    }

    .source-button {
      align-items: center;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 8px;
      color: #c31717;
      display: inline-flex;
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      gap: 6px;
      height: 28px;
      padding: 0 9px;
      text-decoration: none;
      white-space: nowrap;
    }

    .source-button:hover {
      border-color: #c31717;
    }

    .source-button svg {
      display: block;
      height: 15px;
      width: 15px;
    }

    .song-body {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: visible;
    }

    .subsong {
      align-items: center;
      background: var(--section-soft);
      color: var(--section);
      display: flex;
      font: 900 calc(12px * var(--font-scale))/1 var(--mono);
      gap: 8px;
      justify-content: space-between;
      letter-spacing: 0.08em;
      padding: 9px 12px;
      position: relative;
      text-transform: uppercase;
    }

    .subsong-title {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .chart-line {
      align-items: stretch;
      border-top: 1px solid var(--line);
      display: grid;
      grid-template-columns: 86px minmax(360px, 1fr) minmax(170px, 0.52fr);
      min-height: 40px;
      position: relative;
    }

    .chart-line::before {
      bottom: 0;
      content: "";
      left: -42px;
      position: absolute;
      top: 0;
      width: 42px;
      z-index: 6;
    }

    .chart-line.transport-active {
      background: rgba(255, 184, 77, 0.12);
      box-shadow: inset 4px 0 0 rgba(255, 184, 77, 0.92), inset 0 0 0 999px rgba(255, 184, 77, 0.03);
    }

    .chart-line:first-child {
      border-top: 0;
    }

    .section-label-cell {
      align-items: center;
      border-right: 1px solid var(--line);
      display: grid;
      min-width: 0;
    }

    .admin-mode .section-label-cell {
      align-items: stretch;
      grid-template-rows: minmax(0, 1fr) auto;
    }

    .section-label {
      align-items: center;
      color: var(--section);
      display: flex;
      font: 800 calc(12px * var(--font-scale))/1 var(--mono);
      min-width: 0;
      overflow-wrap: anywhere;
      padding: 6px 10px;
      white-space: pre-line;
    }

    .line-play-button {
      align-items: center;
      background: rgba(14, 16, 20, 0.96);
      border: 1px solid rgba(240, 163, 95, 0.72);
      border-radius: 999px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 178, 79, 0.08);
      color: #ffb24f;
      display: inline-flex;
      font: 900 calc(11px * var(--font-scale))/1 var(--mono);
      height: 22px;
      justify-content: center;
      left: -32px;
      line-height: 1;
      min-width: 22px;
      opacity: 0;
      padding: 0;
      pointer-events: none;
      position: absolute;
      top: 50%;
      transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease, background 120ms ease;
      transform: translateY(-50%);
      width: 22px;
      z-index: 7;
    }

    .chart-line:hover .line-play-button,
    .line-play-button:focus-visible {
      opacity: 0.76;
      pointer-events: auto;
    }

    .line-play-button:hover {
      background: rgba(31, 24, 18, 0.98);
      border-color: var(--section);
      color: #ffb24f;
      opacity: 1;
      transform: translateY(-50%) scale(1.06);
    }

    .line-guide-field {
      color: var(--muted);
      display: grid;
      font: 800 calc(9px * var(--font-scale))/1 var(--mono);
      gap: 4px;
      padding: 0 6px 6px;
      text-transform: uppercase;
    }

    .line-guide-field select {
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      min-width: 0;
      width: 100%;
    }

    .line-guide-field.has-guide-cue select {
      background: rgba(240, 163, 95, 0.16);
      border-color: var(--section);
      color: var(--section);
    }

    .line-guide-indicator {
      color: var(--section);
      display: inline-flex;
      flex: 0 0 auto;
      font: 900 calc(14px * var(--font-scale))/1 var(--mono);
      margin-left: 6px;
    }

    .chart-wrap {
      --chart-pad-bottom: 5px;
      --chart-pad-top: 5px;
      --chord-height: 16px;
      --chord-margin-top: 2px;
      --repeat-size: 16px;
      --repeat-top: calc(var(--chart-pad-top) + 11px + 1px + (var(--time-height) - var(--repeat-size)) / 2);
      --time-height: 21px;
      overflow-x: visible;
      overflow-y: visible;
      overscroll-behavior-x: contain;
      padding: var(--chart-pad-top) 8px var(--chart-pad-bottom);
      position: relative;
    }

    .chart-wrap:has(.floating-top) {
      --chart-pad-top: 14px;
    }

    .chart-wrap:has(.floating-bottom) {
      --chart-pad-bottom: 18px;
    }

    .admin-mode .chart-wrap {
      --chart-pad-bottom: 5px;
      --chart-pad-top: 14px;
      --chord-height: 18px;
      --chord-margin-top: 3px;
      --time-height: 24px;
    }

    .count-grid,
    .time-grid {
      display: grid;
      grid-template-columns: var(--grid-template);
      min-width: 0;
      width: 100%;
    }

    .count-grid {
      color: var(--muted);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      height: 11px;
      margin-bottom: 1px;
      position: relative;
    }

    .count {
      border-left: 1px solid var(--beat);
      padding-left: 4px;
    }

    .count.bar-start {
      border-left: 2px solid var(--bar);
    }

    .subtick-marker {
      background: #ff5a3d;
      border-radius: 999px;
      bottom: -2px;
      box-shadow: 0 0 0 1px rgba(255, 90, 61, 0.18), 0 0 8px rgba(255, 90, 61, 0.42);
      pointer-events: none;
      position: absolute;
      top: -1px;
      transform: translateX(-1px);
      width: 2px;
      z-index: 3;
    }

    .time-grid {
      min-height: 21px;
      overflow: visible;
      position: relative;
    }

    .admin-mode .time-grid {
      min-height: 24px;
    }

    .admin-mode .time-grid {
      cursor: crosshair;
    }

    .guide-marker-lane {
      display: grid;
      grid-template-columns: var(--grid-template);
      height: 20px;
      margin-top: 2px;
      min-width: 0;
      position: relative;
      width: 100%;
    }

    .guide-marker-lane::before {
      color: var(--section);
      content: "↑";
      display: none;
      font: 900 calc(14px * var(--font-scale))/1 var(--mono);
      left: var(--guide-hover-left, -9999px);
      pointer-events: none;
      position: absolute;
      top: 1px;
      transform: translateX(-50%);
      z-index: 5;
    }

    .guide-marker-lane:hover::before {
      display: block;
    }

    .guide-marker-lane.is-readonly {
      cursor: default;
      height: 16px;
      margin-top: 0;
    }

    .guide-marker-lane.is-readonly:hover::before {
      display: none;
    }

    .guide-marker {
      align-items: center;
      align-self: center;
      background: rgba(240, 163, 95, 0.16);
      border: 1px solid var(--section);
      border-radius: 6px;
      color: var(--section);
      display: inline-flex;
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      gap: 3px;
      height: 18px;
      justify-content: center;
      min-width: 0;
      overflow: hidden;
      padding: 0 2px 0 5px;
      position: absolute;
      top: 1px;
      transform: translateX(-50%);
      z-index: 6;
    }

    .guide-marker.is-readonly {
      background: transparent;
      border: 0;
      font: 900 calc(14px * var(--font-scale))/1 var(--mono);
      height: 16px;
      padding: 0;
      pointer-events: auto;
      width: 16px;
    }

    .guide-marker select,
    .guide-marker-picker {
      background: rgba(32, 36, 43, 0.98);
      border: 0;
      color: var(--section);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      max-width: 92px;
      min-width: 0;
    }

    .guide-marker button {
      background: transparent;
      border: 0;
      color: var(--muted);
      height: 16px;
      min-width: 16px;
      padding: 0;
    }

    .guide-marker-picker {
      border: 1px solid var(--section);
      border-radius: 6px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
      height: 20px;
      left: var(--guide-picker-left, 0);
      max-width: 132px;
      position: absolute;
      top: 0;
      transform: translateX(-50%);
      z-index: 7;
    }

    .time-grid::before {
      background: rgba(12, 14, 16, 0.54);
      border: 1px solid var(--line);
      border-radius: 6px;
      bottom: 0;
      content: "";
      left: 0;
      opacity: 0.95;
      position: absolute;
      top: 0;
      width: var(--visible-width, 100%);
    }

    .transport-needle {
      --wait-cells: 4;
      --wait-progress: 0%;
      background: rgba(255, 90, 61, 0.9);
      box-shadow: 0 0 0 1px rgba(255, 228, 190, 0.5), 0 0 14px rgba(255, 90, 61, 0.66);
      display: none;
      left: 0;
      pointer-events: none;
      position: fixed;
      top: 0;
      transform: translate3d(-9999px, -9999px, 0);
      will-change: transform, height;
      width: 3px;
      z-index: 30;
    }

    .transport-needle.is-visible {
      display: block;
    }

    .transport-needle::before {
      background:
        repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--wait-cells) - 1px), rgba(180, 255, 250, 0.3) calc(100% / var(--wait-cells) - 1px) calc(100% / var(--wait-cells))),
        linear-gradient(90deg, rgba(61, 182, 173, 0.9) 0 var(--wait-progress), rgba(14, 23, 26, 0.94) var(--wait-progress) 100%);
      border: 1px solid rgba(180, 255, 250, 0.58);
      border-radius: 4px;
      box-shadow: 0 3px 12px rgba(61, 182, 173, 0.28), 0 3px 10px rgba(0, 0, 0, 0.32);
      color: #d7fffb;
      content: attr(data-label);
      display: none;
      font: 900 calc(11px * var(--font-scale))/1 var(--mono);
      left: 0;
      min-width: 74px;
      padding: 4px 8px;
      pointer-events: none;
      position: absolute;
      text-align: center;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
      top: 0;
      transform: translate(-4px, -100%);
      white-space: nowrap;
    }

    .transport-needle[data-label]::before {
      display: block;
    }

    .tick-cell {
      border-left: 1px solid var(--tick);
      grid-row: 1;
      margin: 0;
      min-height: 21px;
      pointer-events: none;
      position: relative;
      z-index: 0;
    }

    .admin-mode .tick-cell {
      min-height: 24px;
    }

    .tick-cell.beat-start {
      border-left-color: var(--beat);
    }

    .tick-cell.bar-start {
      border-left: 2px solid var(--bar);
    }

    .chord {
      align-items: center;
      align-self: center;
      background: var(--chord-bg);
      border: 1px solid var(--chord-border);
      border-radius: 6px;
      box-shadow: 0 3px 8px rgba(33, 26, 18, 0.08);
      color: #121212;
      container-type: inline-size;
      display: flex;
      font: 900 var(--chart-size)/1 var(--mono);
      grid-row: 1;
      height: var(--chord-height);
      justify-content: center;
      margin: var(--chord-margin-top) 2px 0;
      justify-self: stretch;
      min-width: 0;
      overflow: hidden;
      padding: 0 4px;
      position: relative;
      white-space: nowrap;
      z-index: 1;
    }

    .chord.floating-label {
      overflow: visible;
      z-index: 2;
    }

    .chord.resizing {
      filter: brightness(1.12);
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      z-index: 6;
    }

    .chord.duplicate-ghost {
      filter: saturate(1.08) brightness(1.08);
      opacity: 0.68;
      outline: 2px dashed var(--section);
      outline-offset: 2px;
      pointer-events: none;
      z-index: 7;
    }

    .chord.phrase-2 {
      --chord-bg: rgba(255, 232, 202, 0.76);
      --chord-border: rgba(240, 178, 112, 0.58);
    }

    .chord.subtick {
      --chord-bg: rgba(255, 211, 115, 0.78);
      --chord-border: rgba(252, 172, 54, 0.72);
      box-shadow: 0 0 0 1px rgba(255, 196, 77, 0.28), 0 4px 12px rgba(0, 0, 0, 0.28);
      margin: 0;
      position: absolute;
      top: calc((var(--time-height) - var(--chord-height) - var(--chord-margin-top)) / 2 + var(--chord-margin-top));
    }

    .chord.single-note-preview {
      --chord-bg: rgba(255, 139, 90, 0.86);
      --chord-border: rgba(255, 83, 55, 0.82);
      color: #170b07;
    }

    .admin-mode .chord {
      cursor: text;
    }

    .chord.short {
      padding: 0 3px;
    }

    .chord-text {
      display: block;
      font-size: min(var(--chart-size), calc(170cqw / var(--chars)));
      line-height: 1;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
      text-align: center;
      white-space: nowrap;
    }

    .chord.floating-label .chord-text {
      background: var(--chord-bg);
      border: 1px solid var(--chord-border);
      border-radius: 5px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
      font-size: calc(11px * var(--font-scale));
      left: 50%;
      min-width: max-content;
      padding: 2px 4px;
      position: absolute;
      top: -18px;
      transform: translateX(-50%);
    }

    .chord.floating-bottom .chord-text {
      bottom: -18px;
      top: auto;
    }

    .chord.floating-label:hover,
    .chord.floating-label:focus-within {
      z-index: 5;
    }

    .chord-text:empty::before {
      color: rgba(18, 18, 18, 0.48);
      content: attr(data-placeholder);
    }

    .resize-handle {
      bottom: 0;
      display: none;
      position: absolute;
      top: 0;
      width: 6px;
      z-index: 3;
    }

    .resize-handle.start {
      cursor: ew-resize;
      left: 0;
    }

    .resize-handle.end {
      cursor: ew-resize;
      right: 0;
    }

    .admin-mode .resize-handle {
      display: block;
    }

    .repeat-mark {
      align-items: center;
      background: rgba(24, 27, 32, 0.9);
      border: 1px solid rgba(240, 163, 95, 0.62);
      border-radius: 999px;
      color: var(--section);
      display: flex;
      font: 900 calc(10px * var(--font-scale))/1 var(--mono);
      height: var(--repeat-size);
      justify-content: center;
      padding: 0 5px;
      position: absolute;
      right: 0;
      top: var(--repeat-top);
      transform: translateX(50%);
      white-space: nowrap;
      z-index: 4;
    }

    .repeat-mark.after-cut {
      left: min(calc(var(--repeat-left) + 10px), calc(100% - 42px));
      right: auto;
      transform: none;
    }

    .lyrics {
      align-items: center;
      border-left: 1px solid var(--line);
      color: #d8d1c8;
      display: flex;
      font-size: calc(13px * var(--font-scale));
      min-height: 0;
      min-width: 0;
      overflow: hidden;
      padding: 5px 12px;
      position: relative;
    }

    .lyrics span {
      display: block;
      line-height: 1.15;
      max-height: 100%;
      min-height: 1em;
      min-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: pre-line;
    }

    .lyrics span:empty::before {
      color: var(--muted);
      content: attr(data-placeholder);
      opacity: 0.72;
    }

    .lyrics.needs-height {
      align-items: flex-start;
      height: auto !important;
      min-height: min-content;
      overflow: visible;
    }

    .lyrics.needs-height span {
      max-height: none;
      overflow: visible;
    }

    [contenteditable="true"] {
      border-radius: 4px;
      cursor: text;
      outline: 0;
    }

    [contenteditable="true"]:focus {
      box-shadow: 0 0 0 2px var(--accent);
      background: rgba(61, 182, 173, 0.1);
    }

    .line-controls {
      bottom: 4px;
      display: none;
      gap: 4px;
      position: absolute;
      right: 4px;
      z-index: 4;
    }

    .admin-mode .line-controls {
      display: flex;
      opacity: 0;
      pointer-events: none;
      transition: opacity 120ms ease;
    }

    .admin-mode .chart-line:hover .line-controls,
    .admin-mode .chart-line:focus-within .line-controls,
    .admin-mode .line-controls:focus-within {
      opacity: 1;
      pointer-events: auto;
    }

    .subsong-controls {
      display: none;
      gap: 4px;
      letter-spacing: 0;
    }

    .admin-mode .subsong-controls {
      display: flex;
    }

    .line-controls button,
    .subsong-controls button {
      background: rgba(32, 36, 43, 0.95);
      height: 22px;
      min-width: 22px;
      padding: 0;
    }

    .subsong-controls .subsong-audio-cut {
      color: var(--muted);
      font: 800 calc(10px * var(--font-scale))/1 var(--mono);
      letter-spacing: 0;
      min-width: 46px;
      padding: 0 6px;
    }

    .subsong-controls .subsong-audio-cut.is-active {
      border-color: var(--warn);
      color: var(--warn);
    }

    .line-controls button:disabled,
    .subsong-controls button:disabled {
      cursor: default;
      opacity: 0.42;
    }

    .repeat-input,
    .trim-input {
      background: rgba(32, 36, 43, 0.95);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      font: 800 calc(11px * var(--font-scale))/1 var(--mono);
      height: 22px;
      padding: 0 5px;
      width: 42px;
    }

    .repeat-input:focus,
    .trim-input:focus {
      border-color: var(--accent);
      outline: 0;
    }

    @media (max-width: 780px) {
      :root {
        --chart-base-size: 12px;
      }

      .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
      }

      .actions {
        justify-content: flex-start;
        width: 100%;
      }

      .toast-stack {
        bottom: 132px;
      }

      .setlist {
        grid-template-columns: 1fr 1fr;
      }

      .song-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .song-meta {
        justify-content: flex-start;
      }

      .chart-line {
        grid-template-columns: 58px minmax(0, 1fr) 64px;
      }

      .lyrics {
        border-left: 1px solid var(--line);
        border-top: 0;
        grid-column: auto;
        padding: 6px 8px;
      }
    }

    @media (max-width: 460px) {
      :root {
        --chart-base-size: 10px;
        --tick-width: 14px;
      }

      main {
        padding: 12px 12px 150px;
      }

      .setlist {
        grid-template-columns: 1fr;
      }

      .song-title {
        font-size: calc(19px * var(--font-scale));
      }

      .chart-line {
        grid-template-columns: 52px minmax(0, 1fr) 56px;
      }

      .section-label {
        font-size: calc(9px * var(--font-scale));
        padding-left: 8px;
        padding-right: 8px;
      }

      .line-guide-field {
        padding-left: 4px;
        padding-right: 4px;
      }

      .lyrics { padding: 5px 7px; }

      .chord {
        padding: 0 2px;
      }

      .chord.short {
        padding: 0 1px;
      }
    }

    @media print {
      button {
        display: none;
      }

      .song {
        break-inside: avoid;
      }
    }
