/* Create tab (js/create/view.js): Suno-style. Phone: one pane at a time (Create | Songs) with the player above the tab bar.
   960 px and up: the create panel on the left, the workspace on the right; 1200 px and up: a details column when a song is
   selected. The view does not scroll; each pane does. */
:root { --cr-a1: #ff7a3d; --cr-a2: #ff3d7f; --cr-a3: #b94dff;          /* on :root: the details and lyrics dialogs live outside the view */
  --cr-grad: linear-gradient(100deg, var(--cr-a1), var(--cr-a2) 55%, var(--cr-a3)); }
.view.create { overflow: hidden; --cr-pl-h: 64px; }
.cr { position: relative; display: flex; flex-direction: column; height: 100%; }
.cr .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.cr-create, .cr-work, .cr-detail { min-height: 0; display: flex; flex-direction: column; }
.cr[data-pane="create"] .cr-work, .cr[data-pane="songs"] .cr-create { display: none; }

.cr-phone { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 6px; }
.cr-phone .seg button { font-size: 13px; padding: 6px 14px; }
.cr-credits { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- create panel ---- */
.cr-create-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
/* What to make (view.js TASKS): four tiles, the chosen one outlined in the gradient; its one-line explanation under them */
.cr-tasks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cr-task { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 64px; padding: 8px 4px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s; }
.cr-task svg.i { width: 22px; height: 22px; }
.cr-task:hover { color: var(--ink); border-color: var(--line-strong); }
.cr-task[aria-checked="true"] { color: var(--ink); border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--cr-grad) border-box; border: 2px solid transparent; padding: 7px 3px; }
.cr-task[aria-checked="true"] svg.i { color: var(--cr-a2); }
.cr-task-hint { margin: -4px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.cr-engrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-engrow .cr-model { flex: none; }
.cr-engrow .cr-model select { width: auto; max-width: 190px; }
.cr-engrow > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: auto; }

/* Section headings in the panel: "Describe your song", and the numbered steps of Extend / Cover / Fill in */
.cr-sec { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; margin-top: 4px; }   /* wraps: on a narrow phone the mode switch goes under the heading, whole */
.cr-sec h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 700 16px/1.2 var(--font-display); }
.cr-step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cr-grad); color: #fff; font: 700 12px/1 var(--font); }
.cr-sec.wait h3 { color: var(--faint); }
.cr-sec.wait .cr-step-n { background: var(--line-strong); }
.cr-wait { margin: -4px 0 0 30px; font-size: 13px; color: var(--faint); }
.cr-inst small { font-weight: 400; color: var(--muted); font-size: 12px; }

/* New song: the slim "record it" line */
.cr-recline { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line-strong);
  background: none; color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
.cr-recline > svg.i:first-child { flex: none; width: 18px; height: 18px; color: var(--rec); }
.cr-recline span { flex: 1; min-width: 0; }
.cr-recline b { color: var(--ink); }
.cr-recline .cr-recline-go { flex: none; width: 14px; height: 14px; }
.cr-recline:hover { border-color: var(--rec); background: var(--rec-soft); color: var(--ink); }

/* Start from: Record / Your library / Upload, then the newest songs and recordings */
.cr-srcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cr-src { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 12px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--surface); color: inherit; text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.cr-src svg.i { width: 24px; height: 24px; margin-bottom: 3px; color: var(--cr-a2); }
.cr-src b { font-size: 14px; }
.cr-src small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.cr-src:hover { border-color: var(--cr-a2); background: color-mix(in srgb, var(--cr-a2) 6%, var(--surface)); }
.cr-src.mic svg.i { color: var(--rec); }
.cr-src.mic:hover { border-color: var(--rec); background: var(--rec-soft); }
.cr-src:disabled { opacity: .6; cursor: default; }
.cr-recent { display: flex; flex-direction: column; gap: 2px; }
.cr-recent > small { margin: 2px 2px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cr-recent-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 10px; background: none; color: inherit; text-align: left; cursor: pointer; }
.cr-recent-row:hover, .cr-recent-row:focus-visible { background: var(--raised); }
.cr-recent-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-recent-t b, .cr-recent-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-recent-t b { font-size: 14px; }
.cr-recent-t small { font-size: 12px; color: var(--muted); }
.cr-recent-go { flex: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--muted); }
.cr-recent-row:hover .cr-recent-go { color: #fff; border-color: transparent; background: var(--cr-grad); }
.cr-mode button { font-size: 13px; padding: 6px 14px; white-space: nowrap; }
.cr-model select { appearance: none; -webkit-appearance: none; min-height: 32px; padding: 4px 26px 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 13px; font-weight: 700; cursor: pointer; }
.cr-warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--rec-soft); color: var(--rec); font-size: 13px; }
.cr-note { margin: 0; font-size: 12px; color: var(--muted); }

.cr-box { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.cr-box:focus-within { border-color: color-mix(in srgb, var(--cr-a2) 55%, var(--line)); }
.cr-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cr-box-head label { font-size: 13px; font-weight: 700; }
.cr-box-acts { display: inline-flex; align-items: center; gap: 10px; }
.cr-count { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cr-box > .cr-count { align-self: flex-end; margin-top: -2px; }
.cr-box textarea { width: 100%; resize: vertical; border: 0; padding: 2px 0; background: none; font-size: 15px; line-height: 1.45; min-height: 64px; }
.cr-box textarea:focus { outline: none; }
.cr-box textarea::placeholder, .cr-fld input::placeholder { color: var(--faint); }
.cr-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 4px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--accent-text); }
.cr-link svg.i { width: 14px; height: 14px; }
.cr-link:hover { background: var(--accent-soft); }
.cr-link:disabled { opacity: .5; }

.cr-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.cr-chips::-webkit-scrollbar { display: none; }
.cr-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px 4px 7px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--raised); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cr-chip svg.i { width: 12px; height: 12px; }
.cr-chip:hover { color: var(--ink); border-color: var(--ink); }

.cr-chrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-chrow select { min-height: 36px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; }
.cr-box > input#cr-chords { width: 100%; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px; font-family: ui-monospace, Menlo, monospace; }
.cr-box > input#cr-chords:focus { outline: 2px solid var(--cr-a2); outline-offset: -1px; border-color: transparent; }
.cr-chpv, .cr-box-head small { font-size: 12px; color: var(--muted); font-weight: 400; }

.cr-inst { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; }
.cr-inst span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.cr-inst svg.i { width: 18px; height: 18px; color: var(--muted); }
.cr .switch:checked { background: var(--cr-a2); }

.cr-fld { display: flex; flex-direction: column; gap: 6px; }
.cr-fld > span { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.cr-fld > span b { margin-left: auto; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-fld small { font-size: 12px; color: var(--muted); }
.cr-fld input[type="text"], .cr-fld select { width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px; }
.cr-fld input[type="text"]:focus, .cr-fld select:focus { outline: 2px solid var(--cr-a2); outline-offset: -1px; border-color: transparent; }
.cr-fld input[type="range"], .cr-ext-at input, .cr-pl-seek input, .cr-pl-vol input { width: 100%; accent-color: var(--cr-a2); }
.cr-adv { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.cr-adv summary { padding: 12px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.cr-adv summary::-webkit-details-marker { display: none; }
.cr-adv summary::after { content: "+"; color: var(--muted); font-size: 18px; line-height: 1; }
.cr-adv[open] summary::after { content: "–"; }
.cr-adv-in { display: flex; flex-direction: column; gap: 16px; padding: 0 12px 14px; }

.cr-create-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--bg); }
.cr-create-foot small { font-size: 11px; color: var(--muted); text-align: center; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.cr-go { width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px;
  background: var(--cr-grad); color: #fff; font: 700 17px/1 var(--font-display); letter-spacing: .01em;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--cr-a2) 35%, transparent); transition: transform .12s, filter .12s; }
.cr-go svg.i { width: 20px; height: 20px; }
.cr-go:hover:not(:disabled) { filter: brightness(1.06); }
.cr-go:active:not(:disabled) { transform: scale(.985); }
.cr-go:disabled { opacity: .55; cursor: default; box-shadow: none; }

/* ---- extend box ---- */
.cr-ext { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--cr-a1) 45%, var(--line));
  background: color-mix(in srgb, var(--cr-a1) 7%, var(--surface)); }
.cr-ext-head { display: flex; align-items: center; gap: 10px; }
.cr-ext-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-ext-t small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cr-a1); }
.cr-ext-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-wave { position: relative; height: 64px; border-radius: 10px; background: var(--raised); }
.cr-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: ew-resize; touch-action: none; }
.cr-wave-msg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.cr-ext-at { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; }
.cr-ext-at .icon-btn { grid-row: span 2; }
.cr-ext-at span { font-size: 14px; }
.cr-ext-at span b { font-variant-numeric: tabular-nums; }
.cr-ext-at small { color: var(--muted); font-size: 12px; }
.cr-range { display: flex; flex-direction: column; gap: 2px; }
.cr-base small, .cr-fld small { color: var(--muted); font-size: 12px; }

/* ---- cover art (an image, or a gradient from the song's id) ---- */
.cr-art { position: relative; display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h1) 78% 58%), hsl(var(--h2) 72% 38%)); color: rgba(255, 255, 255, .85); }
.cr-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cr-art .cr-art-ic { width: 40%; height: 40%; stroke-width: 1.6; }
.cr-art.sm { width: 42px; height: 42px; border-radius: 8px; }
.cr-art.xs { width: 36px; height: 36px; border-radius: 7px; }
.cr-art.lg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; }
.cr-art.lg .cr-art-ic { width: 26%; height: 26%; }
.cr-art.err { background: var(--rec-soft); color: var(--rec); }
.cr-player.idle .cr-art { background: var(--raised); color: var(--faint); }

/* ---- workspace ---- */
.cr-work-head { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.cr-work-title { display: none; align-items: baseline; justify-content: space-between; gap: 10px; }
.cr-work-title h2 { margin: 0; font: 700 20px/1.2 var(--font-display); letter-spacing: -0.01em; }
.cr-work-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-search { flex: 1 1 180px; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.cr-search svg.i { width: 16px; height: 16px; color: var(--muted); }
.cr-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; padding: 6px 0; }
.cr-search input:focus { outline: none; }
.cr-search:focus-within { outline: 2px solid var(--cr-a2); outline-offset: -1px; border-color: transparent; }
.cr-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 16px; }

.cr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; }
.cr-row:hover { background: var(--raised); }
.cr-row.sel { background: color-mix(in srgb, var(--cr-a2) 9%, var(--surface)); }
.cr-row.msel, .cr-row.msel:hover { background: color-mix(in srgb, var(--cr-a2) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--cr-a2); }
.cr-row.on .cr-name b { color: var(--cr-a2); }
.cr-selbar { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--cr-a2) 8%, var(--surface)); }
.cr-selbar[hidden] { display: none; }
.cr-selbar b { font-size: 14px; }
.cr-selhint { flex: 1; font-size: 12px; color: var(--muted); }
.cr-selbar b + .cr-selhint:empty { flex: 1; }
.cr-selbar .btn:nth-of-type(1) { margin-left: auto; }
.cr-selbar .btn svg.i { width: 16px; height: 16px; margin-right: 6px; }
.cr-selbar .btn.danger, .cr-selbar .btn.danger svg.i { color: var(--rec); }
.cr-row.fresh { animation: cr-fresh 2.4s ease-out; }
@keyframes cr-fresh { 0%, 30% { background: color-mix(in srgb, var(--cr-a1) 22%, transparent); } 100% { background: transparent; } }
.cr-thumb { position: relative; padding: 0; border: 0; background: none; border-radius: 10px; }
.cr-dur { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; font-variant-numeric: tabular-nums; }
.cr-ov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .38); color: #fff; opacity: 0; transition: opacity .12s; }
.cr-ov svg.i { width: 24px; height: 24px; }
.cr-thumb:hover .cr-ov, .cr-thumb:focus-visible .cr-ov, .cr-row.on .cr-ov { opacity: 1; }
.cr-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.cr-eq i { width: 3px; background: #fff; border-radius: 1px; animation: cr-eq .9s ease-in-out infinite; }
.cr-eq i:nth-child(2) { animation-delay: -.3s; } .cr-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes cr-eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

.cr-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; text-align: left; }
.cr-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.cr-badge { flex: none; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 10px; font-weight: 700; color: var(--muted); text-transform: lowercase; line-height: 15px; }
.cr-style { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 0; }
.cr-tags:empty { display: none; }
.cr-tag { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); line-height: 18px; }
.cr-tag svg.i { width: 12px; height: 12px; }
.cr-tag.ext { color: var(--cr-a1); border-color: color-mix(in srgb, var(--cr-a1) 40%, var(--line)); background: color-mix(in srgb, var(--cr-a1) 8%, transparent); }
.cr-when { font-size: 11px; color: var(--faint); }
.cr-acts { display: flex; align-items: center; gap: 2px; }
.cr-like[aria-pressed="true"] { color: var(--cr-a2); }
.cr-like[aria-pressed="true"] svg.i { fill: currentColor; }
/* Share: one click from a song's row, its details and the player bar (Create and Library) */
.icon-btn.cr-share { color: var(--cr-a1); }
.icon-btn.cr-share:hover { color: var(--cr-a1); background: color-mix(in srgb, var(--cr-a1) 14%, transparent); }
.btn.cr-share { color: var(--cr-a1); border-color: color-mix(in srgb, var(--cr-a1) 45%, var(--line)); background: color-mix(in srgb, var(--cr-a1) 8%, transparent); font-weight: 700; }
.cr-pl-song .cr-share { flex: none; }

.cr-row.pending .cr-name b { color: var(--muted); }
.cr-row.pending .cr-art img { display: none; }
.cr-spin { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: cr-spin .8s linear infinite; }
.cr-row.pending .cr-art-ic { display: none; }
@keyframes cr-spin { to { transform: rotate(360deg); } }
.cr-shimmer { height: 4px; margin-top: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cr-shimmer i { display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--cr-grad); animation: cr-shim 1.4s ease-in-out infinite; }
@keyframes cr-shim { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.cr-row.failed .cr-style { white-space: normal; color: var(--rec); }
.cr-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.cr-empty svg.i { width: 36px; height: 36px; color: var(--faint); margin-bottom: 6px; }
.cr-empty b { color: var(--ink); font-size: 16px; }

@media (max-width: 520px) {
  .cr-row { gap: 10px; padding: 8px 4px 8px 6px; }
  .cr-acts .cr-like, .cr-acts .cr-sheetbtn { display: none; }
}

/* ---- more menu ---- */
.cr-menu { position: absolute; z-index: 40; min-width: 200px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow), 0 12px 32px rgba(0, 0, 0, .18); }
.cr-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font-size: 14px; text-align: left; }
.cr-menu button:hover, .cr-menu button:focus-visible { background: var(--raised); outline: none; }
.cr-menu svg.i { width: 18px; height: 18px; color: var(--muted); }
.cr-menu button.danger, .cr-menu button.danger svg.i { color: var(--rec); }

/* ---- details ---- */
.cr-detail { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.cr-d-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 16px; font-size: 13px; color: var(--muted); }
.cr-d { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 20px; }
.cr-d-name { display: flex; align-items: center; gap: 8px; }
.cr-d-name h3, .dlg .cr-d-name h3 { margin: 0; font: 700 21px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }   /* studio.css styles .dlg h3 as a label */
.cr-d-style { margin: 0; font-size: 13px; color: var(--muted); }
.cr-d-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cr-d-acts .btn.primary { background: var(--cr-grad); border: 0; color: #fff; }
.cr-d-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); font-size: 13px; text-align: left; }
.cr-d-link svg.i { width: 16px; height: 16px; color: var(--cr-a1); }
.cr-d-link:hover { border-color: var(--line-strong); }
.cr-d h4 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cr-d-lyrics { margin: 0; white-space: pre-wrap; font: 14px/1.6 var(--font); }
.cr-d-req { margin: 0; font-size: 14px; }
.cr-d-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 4px 0 0; font-size: 13px; }
.cr-d-info dt { color: var(--muted); }
.cr-d-info dd { margin: 0; }
.sheet.dlg .cr-d { padding: 4px 0 8px; }
.sheet.dlg .cr-art.lg { max-width: 260px; align-self: center; }

/* ---- player bar ---- */
.cr-player { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "song ctl" "seek seek"; align-items: center; column-gap: 8px;
  padding: 6px 10px 4px; border-top: 1px solid var(--line); background: var(--surface); }
.cr-pl-song { grid-area: song; display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-pl-t { min-width: 0; display: flex; flex-direction: column; }
.cr-pl-t b, .cr-pl-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-pl-t b { font-size: 14px; }
.cr-pl-t small { font-size: 12px; color: var(--muted); }
.cr-pl-ctl { grid-area: ctl; display: flex; align-items: center; gap: 2px; }
.cr-pl-play { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); }
.cr-pl-play svg.i { width: 20px; height: 20px; }
.cr-pl-play:disabled { opacity: .35; cursor: default; }
.cr-pl-seek { grid-area: seek; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-pl-seek input { height: 18px; }
.cr-pl-vol { display: none; }
.cr-player.idle .cr-pl-t b { color: var(--muted); font-weight: 600; }
/* phone keyboard up (keyboard.js): the player (here, in Discover and in the Library) and the step note give their rows to the form */
html.typing .cr-player { display: none; }
html.typing .cr-create-foot { padding-top: 6px; padding-bottom: 6px; }
html.typing .cr-create-foot small { display: none; }
html.typing .cr-create-foot .cr-go, html.typing .cr-nav .cr-back { min-height: 44px; }
/* phones: a player with nothing to play ("Nothing playing") gives its rows to the page, here, in Discover and in the Library; it comes back with the first song */
@media (max-width: 959px) { .cr-player.idle { display: none; } }
/* phones: fingers, short and narrow screens */
@media (pointer: coarse) {
  .cr-link { min-height: 32px; padding: 4px 6px; }
  .cr-tag-x { width: 30px; height: 32px; }
  .cr-hear-b { width: 32px; height: 32px; }
  .cr-chip { min-height: 32px; }
}
@media (max-width: 959px) and (max-height: 700px) { .cr-create-foot small { display: none; } }      /* a short phone: the step note's two lines go to the form */
@media (max-width: 359px) { .cr-layout > span { display: none; } .cr-layout .seg { margin-left: auto; } }      /* 320 px: no room for the word "Layout" beside New and the switch */

/* ---- desktop ---- */
@media (min-width: 960px) {
  .cr-body { grid-template-columns: minmax(340px, 410px) minmax(0, 1fr); }
  .cr[data-pane] .cr-work, .cr[data-pane] .cr-create { display: flex; }
  .cr-create { border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
  .cr-create-scroll { padding: calc(16px + env(safe-area-inset-top)) 18px 18px; }
  .cr-create-foot { padding: 12px 18px 14px; background: none; }
  .cr-work-head { padding: calc(16px + env(safe-area-inset-top)) 20px 12px; }
  .cr-work-title { display: flex; }
  .cr-list { padding: 8px 12px 20px; }
  .cr-player { grid-template-columns: minmax(200px, 1fr) auto minmax(260px, 2fr) 140px; grid-template-areas: "song ctl seek vol"; column-gap: 20px; padding: 8px 20px; min-height: var(--cr-pl-h); }
  .cr-pl-vol { grid-area: vol; display: flex; align-items: center; gap: 8px; color: var(--muted); }
  .cr-pl-vol svg.i { width: 18px; height: 18px; }
}
@media (min-width: 1200px) {
  .cr.has-detail .cr-body { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr) 340px; }
}

/* Sheet music dialog: the audio bar sticks to the top of the dialog body (app.css offsets it for the page header) */
.cr-sheet .score-audio { top: 0; background: var(--surface, #fff); border-radius: 20px; }
.cr-sheet .paper { margin-top: 6px; }

/* ---- record your instrument (create/record.js) ---- */
.cr-tag.take { color: var(--rec); border-color: color-mix(in srgb, var(--rec) 40%, var(--line)); background: color-mix(in srgb, var(--rec) 8%, transparent); }
.rc { display: flex; flex-direction: column; gap: 12px; }
.rc-stage { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); }
.rc-stage.on { border-color: var(--rec); }
.rc-stage:not(.on) .rc-lvlrow { opacity: .55; }
.rc-lvlrow { display: flex; align-items: center; gap: 14px; }

.rc-meter { flex: 1; height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.rc-meter i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--live), var(--warn) 75%, var(--rec)); transition: width 60ms linear; }
.rc-time { font: 700 22px/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.rc-audio { width: 100%; }
.rc-quiet { color: var(--rec); }
.rc-ask { margin: 4px 0 0; font-size: 14px; }
.rc-desc { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 8px 0 0; cursor: pointer; }
.rc-desc input { margin-top: 3px; }
.rc-desc small { display: block; color: var(--muted, #777); }
.rc-start .rec-dot { margin-right: 6px; }
.rc-stop { background: var(--rec); border-color: var(--rec); color: #fff; }

/* ---- sheet music: the three quality tiers, the progress dialog, and the row chip while a job runs (view.js, sheetjobs.py) ---- */
.cr-tiers { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.cr-tier { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.cr-tier:hover, .cr-tier:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.cr-tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cr-tier-head b { font-size: 15px; }
.cr-tier-time { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cr-tier-time.ready { color: var(--accent); }
.cr-tier-q { display: flex; align-items: center; gap: 3px; }
.cr-tier-q i { width: 18px; height: 5px; border-radius: 3px; background: var(--line); }
.cr-tier-q i.on { background: var(--accent); }
.cr-tier-q small { margin-left: 6px; font-size: 11px; color: var(--muted); }
.cr-tier-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cr-sheet-bar i { width: 2%; animation: none; transition: width .9s linear; }
.cr-sheet-eta { margin: 4px 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cr-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cr-chip svg.i { width: 14px; height: 14px; }
.cr-chip.ready { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cr-chip.error { color: var(--rec); border-color: color-mix(in srgb, var(--rec) 40%, var(--line)); }
.cr-chip-spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: cr-spin .8s linear infinite; }
.cr-sheet .cr-same { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); font-size: 12.5px; }

/* As another instrument (op cover): the instrument chips wrap instead of scrolling, a chosen one is filled; the earlier-recording picker sits under the record button */
.cr-chips.cr-instr { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.cr-instr .cr-chip { padding: 4px 10px; }
.cr-chip.on { color: var(--ink); border-color: var(--cr-a1); background: color-mix(in srgb, var(--cr-a1) 16%, var(--raised)); }
.rc-use { flex-wrap: wrap; }

/* "Your library" / "Change": the song-or-recording picker dialog */
.cr-pk { display: flex; flex-direction: column; gap: 10px; }
.cr-pk-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-pk-list { display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.cr-pk-row { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.cr-pk-row:hover { background: var(--raised); }
.cr-pk-row.cur { background: color-mix(in srgb, var(--cr-a2) 9%, var(--surface)); }
.cr-pk-play { position: relative; flex: none; padding: 6px; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.cr-pk-play .cr-ov svg.i { width: 18px; height: 18px; }
.cr-pk-play:hover .cr-ov, .cr-pk-play:focus-visible .cr-ov { opacity: 1; }
.cr-pk-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 2px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.cr-pk-pick:disabled { cursor: default; opacity: .6; }
.cr-pk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-pk-t b, .cr-pk-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-pk-t b { font-size: 14px; }
.cr-pk-t small { font-size: 12px; color: var(--muted); }
.cr-pk-t em { font-style: normal; color: var(--rec); }
.cr-pk-go { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.cr-pk-go:empty { display: none; }
.cr-pk-pick:not(:disabled):hover .cr-pk-go { color: var(--cr-a2); }
.cr-pk-row.cur .cr-pk-go { color: var(--cr-a2); }
.cr-note-ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--cr-a1); }
.cr-wave.all canvas { cursor: default; }
.cr-pick { align-self: flex-start; }

/* ---- the two layouts of the create panel (view.js renderForm): Guided | Suno style ---- */
.cr-layout { display: flex; align-items: center; gap: 10px; }
.cr-layout > span, .cr-layout > .cr-link + .seg { margin-left: auto; }      /* the Layout label gives its place to Undo while there is one */
.cr-layout .seg button { white-space: nowrap; }
/* "New": an empty panel for a new creation (view.js startOver) */
.cr-new { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.cr-new svg.i { width: 15px; height: 15px; color: var(--accent-text); }
.cr-new:hover { border-color: var(--accent-text); background: var(--accent-soft); }
.cr-layout > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cr-layout .seg button { padding: 5px 12px; }
/* A label that explains itself on hover (tip.js) */
.cr-create label[data-tip], .cr-create span[data-tip], .cr-create summary[data-tip], .cr-create h5[data-tip], .cr-create small[data-tip] { cursor: help; }
.cr-create .cr-box-head label[data-tip], .cr-create .cr-fld > span[data-tip], .cr-create h5[data-tip], .cr-engrow > span[data-tip], .cr-layout > span[data-tip], .cr-sugg-h > span[data-tip], .cr-mytags-h[data-tip] {
  text-decoration: underline dotted color-mix(in srgb, var(--muted) 55%, transparent); text-underline-offset: 3px; }

/* Guided: the steps along the top, the current one filled */
.cr-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; gap: 0; }
.cr-steps li { flex: 1 1 0; min-width: 0; position: relative; }
.cr-steps li + li::before { content: ""; position: absolute; top: 13px; right: calc(50% + 17px); left: calc(-50% + 17px); height: 2px; border-radius: 2px; background: var(--line-strong); }
.cr-steps li.done + li::before, .cr-steps li.done::before { background: var(--cr-a2); }
.cr-steps button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px; border: 0; background: none; color: var(--faint); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.cr-steps i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); font: 700 12px/1 var(--font); font-style: normal; color: var(--muted); }
.cr-steps i svg.i { width: 14px; height: 14px; }
.cr-steps span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-steps li.done button { color: var(--muted); }
.cr-steps li.done i { border-color: var(--cr-a2); color: var(--cr-a2); }
.cr-steps li.now button { color: var(--ink); }
.cr-steps li.now i { border-color: transparent; background: var(--cr-grad); color: #fff; }
.cr-steps button:hover span { color: var(--ink); }
.cr-page { display: flex; flex-direction: column; gap: 12px; }
.cr-page > .cr-sec:first-child h3 { font-size: 19px; }
/* Guided, step 1: what to make, as cards that say what each one does */
.cr-cards { display: flex; flex-direction: column; gap: 8px; }
.cr-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; cursor: pointer;
  transition: border-color .12s, background .12s; }
.cr-card > svg.i:first-child { flex: none; width: 24px; height: 24px; color: var(--muted); }
.cr-card > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cr-card b { font-size: 15px; }
.cr-card small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.cr-card .cr-card-go { flex: none; width: 16px; height: 16px; color: var(--faint); }
.cr-card:hover { border-color: var(--line-strong); background: var(--raised); }
.cr-card[aria-checked="true"] { border: 2px solid transparent; padding: 11px 11px 11px 13px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--cr-grad) border-box; }
.cr-card[aria-checked="true"] > svg.i:first-child, .cr-card[aria-checked="true"] .cr-card-go { color: var(--cr-a2); }
/* Guided, last step: what will be sent */
.cr-review { display: flex; flex-direction: column; padding: 4px 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.cr-review h4 { align-self: flex-start; cursor: help; margin: 8px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cr-rv { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cr-rv > span { font-weight: 700; color: var(--muted); }
.cr-rv p { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.cr-rv.bad p { color: var(--rec); }
/* The foot: Back beside Next or Create */
.cr-nav { width: 100%; display: flex; align-items: stretch; gap: 8px; }
.cr-nav .cr-back { flex: none; min-height: 52px; padding: 0 16px 0 12px; border-radius: 999px; }
.cr-go.cr-next { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---- the tags of the Styles box as chips that can be heard (view.js paintTags) ---- */
.cr-mytags, .cr-chips.cr-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.cr-mytags[hidden] { display: none; }
.cr-mytags-h, .cr-sugg-h > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cr-mytags-h { margin-right: 2px; }
.cr-sugg-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.cr-tagchip { display: inline-flex; align-items: center; max-width: 100%; min-height: 26px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cr-a2) 35%, var(--line-strong));
  background: color-mix(in srgb, var(--cr-a2) 7%, var(--surface)); font-size: 12px; overflow: hidden; }
.cr-tagchip > b { padding: 0 2px 0 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-tagchip > .cr-hear-b + b { padding-left: 5px; }
.cr-tagchip.add { border-color: var(--line-strong); background: var(--raised); }
.cr-tag-add { display: inline-flex; align-items: center; gap: 2px; min-height: 26px; padding: 0 10px 0 6px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; }
.cr-tag-add svg.i { width: 11px; height: 11px; }
.cr-tag-add:hover { color: var(--ink); }
.cr-tag-x { display: grid; place-items: center; width: 24px; height: 26px; border: 0; background: none; color: var(--faint); cursor: pointer; }
.cr-tag-x svg.i { width: 11px; height: 11px; }
.cr-tag-x:hover { color: var(--rec); }
/* The button in front of a tag: play (its clip exists), a spinner (being made), or build a preview (dimmed until hovered) */
.cr-hear-b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-right: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); background: none; color: var(--faint); cursor: pointer; }
.cr-hear-b svg.i { width: 12px; height: 12px; }
.cr-hear-b.ready { color: #fff; background: var(--cr-a2); border-right-color: transparent; }
.cr-hear-b.ready:hover, .cr-hear-b.ready.on { background: var(--cr-grad); }
.cr-hear-b.none:hover { color: var(--cr-a2); background: color-mix(in srgb, var(--cr-a2) 10%, transparent); }
.cr-hear-b.work { cursor: default; }
/* The popover: an Ideas menu (two-line items) or the note before a preview is built */
.cr-menu.pop { max-width: 300px; }
.cr-menu.pop button[role="menuitem"] { align-items: flex-start; }
.cr-menu.pop button[role="menuitem"] > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cr-menu.pop button[role="menuitem"] small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.cr-menu.pop button[role="menuitem"] svg.i { margin-top: 2px; flex: none; }
.cr-pop { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 8px; font-size: 13px; }
.cr-pop p { margin: 0; line-height: 1.45; color: var(--muted); }
.cr-menu .cr-pop .btn { width: auto; align-self: flex-start; justify-content: center; padding: 0 14px; border: 1px solid var(--line-strong); }
.cr-menu .cr-pop .btn.primary { background: var(--cr-grad); border: 0; color: #fff; }
.cr-menu-h { padding: 8px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cr-menu-h:first-child { padding-top: 3px; }
.cr-menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }

/* The Visualizer button (visualizer.js): a filled, labelled pill wherever a song can be played, so it is seen. Always loaded:
   visualizer.css only loads when the visualizer first opens. */
.viz-open { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px;
  background: var(--cr-grad); color: #fff; font: 700 13px/1 var(--font); white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--cr-a2) 38%, transparent); transition: transform .12s, filter .12s; }
.viz-open svg.i { width: 18px; height: 18px; color: #fff; }
.viz-open:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.viz-open:focus-visible { outline: 2px solid var(--cr-a2); outline-offset: 2px; }
.viz-open:disabled { opacity: .4; box-shadow: none; cursor: default; }
.btn.viz-open { height: auto; min-height: 36px; padding: 8px 14px 8px 11px; font-size: 14px; }
.cr-pl-ctl .viz-open { margin-left: 6px; }
@media (max-width: 560px) {
  .cr-pl-ctl .viz-open, .lib-bar .viz-open { width: 36px; padding: 0; }
  .cr-pl-ctl .viz-open span, .lib-bar .viz-open span { display: none; }
}
