/* waive: 56 — .sidebar dan .mobile-bar sama-sama sticky top:0 tetapi tidak pernah
   tampil bersamaan (sidebar disembunyikan <=900px). Bukan tabrakan.
   ==========================================================================
   Kampung Studio — Redesign (Bloom)
   03 · komponen: field, kapsul karet, lembar kerja, library, pengaturan
   ========================================================================== */

/* --------------------------------------------------------------- kontrol -- */

.input,
.textarea,
.zu-model-select,
.zu-ws-select {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--sheet);
  color: var(--ink);
  font-size: var(--t-13);
  line-height: 1.5;
  box-shadow: 0 0 0 1px var(--muted);
  transition: box-shadow var(--dur-1) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-2);
  opacity: 0.8;
}

.input:hover,
.zu-model-select:hover,
.zu-ws-select:hover {
  box-shadow: 0 0 0 1px var(--ink-2);
}

.input:focus,
.zu-model-select:focus,
.zu-ws-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

/* area teks: sumur lembar, bukan pill */
.textarea {
  border-radius: var(--radius-inner);
  resize: vertical;
  min-height: 84px;
  font-family: var(--font-body);
  box-shadow: inset 0 2px 4px var(--shade-1), 0 0 0 1px var(--rule);
}

.textarea:focus {
  box-shadow: inset 0 2px 4px var(--shade-1), 0 0 0 2px var(--accent);
}

.textarea--tall {
  min-height: 158px;
}

textarea.is-masked {
  -webkit-text-security: disc;
  text-security: disc;
  font-family: var(--font-code);
  letter-spacing: 0.08em;
}

.zu-model-select,
.zu-ws-select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.zu-side-search {
  padding: 9px 34px 9px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 1px var(--shade-1), inset 0 1px 0 var(--hi);
  background: var(--paper);
}

/* ---------------------------------------------------------------- tombol -- */

.btn,
.btn-primary,
.btn-ghost,
.btn-secondary,
.btn-danger-strong,
.btn-gradient,
.tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-12);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--shade-1), 0 8px 18px -12px var(--shade-2), inset 0 1px 0 var(--hi);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.btn:hover,
.btn-primary:hover,
.btn-ghost:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--shade-2), 0 12px 22px -12px var(--shade-2), inset 0 1px 0 var(--hi);
}

.btn:active,
.btn-primary:active {
  transform: translateY(1px);
}

.btn:disabled,
.tiny-btn:disabled,
.btn-gradient:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* utama: umber padat */
.btn-primary {
  background: var(--umber);
  color: var(--accent-ink);
  box-shadow: 0 8px 18px -12px var(--shade-3), inset 0 1px 0 var(--hi-strong);
}

.btn-primary:hover {
  background: var(--umber-hi);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--paper-2);
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 15px 20px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-2);
  transform: none;
}

.btn-danger-strong {
  background: var(--bad);
  color: var(--accent-ink);
  box-shadow: 0 8px 18px -12px var(--shade-3);
}

.btn-danger-strong:hover {
  background: var(--bad-hi);
  color: var(--accent-ink);
}

/* CTA: kapsul karet di dalam bezel, label di lembar */
.btn-gradient,
.btn-gradient--suno {
  position: relative;
  flex: 1;
  justify-content: center;
  gap: var(--s-2);
  padding: 15px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  color: var(--accent-ink);
  font-size: var(--t-15);
  font-weight: 600;
  letter-spacing: 0.005em;
  box-shadow: 0 1px 0 var(--btn-bevel-hi) inset, 0 -1px 0 var(--btn-bevel-lo) inset,
    0 14px 26px -14px var(--btn-glow);
}

.btn-gradient::before {
  display: none;
}

.btn-gradient:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--btn-top-hi), var(--btn-bottom-hi));
  transform: translateY(-1px);
}

.btn-gradient:active:not(:disabled) {
  transform: translateY(1px);
}

.tiny-btn {
  padding: 6px 11px;
  font-size: var(--t-11);
  background: transparent;
  color: var(--ink-2);
  box-shadow: none;
}

.tiny-btn:hover:not(:disabled) {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.tiny-btn--primary {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-edge-2);
}

.tiny-btn--primary:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-ink);
}

.tiny-btn--danger {
  color: var(--ink-2);
}

.tiny-btn--danger:hover:not(:disabled) {
  background: var(--bad-soft);
  color: var(--bad);
}

.tiny-btn--playing {
  color: var(--accent);
}

.tiny-btn--cover,
.tiny-btn--master {
  color: var(--ink-2);
}

/* --------------------------------------------------- komposer: lembar kerja -- */

.playground-grid {
  display: grid;
  grid-template-columns: 384px minmax(0, 1fr) minmax(0, 316px);
  align-items: start;
  gap: var(--s-5);
}

.playground-form {
  min-width: 0;
}

.zu-compose-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: var(--s-7);
  border-radius: var(--radius-card);
  background: var(--sheet);
  box-shadow: var(--shadow-card);
}

.zu-compose-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}

.zu-panel-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zu-panel-eyebrow {
  display: none;
}

.panel-title {
  font-size: var(--t-20);
  font-weight: 600;
  letter-spacing: -0.024em;
  color: var(--ink);
}

/* grup field: bukan kotak, hanya jarak + garis tipis */
.zu-compose-mode-row,
.zu-compose-type-block,
.zu-vocal-gender-compact,
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.zu-compose-mode-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.zu-form-label,
.zu-model-label,
.field > label,
.field-head > label,
.zu-ws-picker-label,
.zu-detail-section,
.stored-keys-title,
.stored-keys-provider,
.settings-add-label {
  font-size: var(--t-12);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}

/* segmen sebagai kaset: pill lembar, aktif terangkat */
.zu-type-grid {
  display: inline-flex;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.zu-type-grid--mode {
  gap: 6px;
}

.zu-type-btn {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--t-12);
  font-weight: 500;
  text-align: center;
  box-shadow: none;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease);
}

.zu-type-btn:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.zu-type-btn--on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-edge);
  font-weight: 600;
}

.zu-top-sticky {
  position: static;
  margin: 0;
  padding: 0;
  background: none;
}

.zu-compose-controls-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: stretch;
}

.zu-model-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.zu-gender-grid {
  display: flex;
  gap: 6px;
}

.zu-gender-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: var(--t-12);
  box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--shade-1);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease);
}

.zu-gender-btn:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.zu-gender-btn--on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-edge);
  font-weight: 600;
}

.zu-gender-reset {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: var(--t-11);
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.zu-gender-reset:hover {
  background: var(--paper-3);
  color: var(--accent);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 20px;
}

.field-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease);
}

.field:hover .field-head-actions,
.field:focus-within .field-head-actions {
  opacity: 1;
}

@media (hover: none) {
  .field-head-actions {
    opacity: 1;
  }
}

.counter {
  font-size: var(--t-10);
  color: var(--ink-2);
  margin-right: 4px;
}

.field-hint {
  font-size: var(--t-11);
  color: var(--muted);
  line-height: 1.55;
}

/* cover */
.zu-cover-lead {
  font-size: var(--t-11);
  color: var(--ink-2);
  line-height: 1.55;
}

.zu-cover-lead--warn {
  color: var(--bad);
}

.zu-cover-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  padding: var(--s-5) var(--s-4);
  border-radius: var(--radius-inner);
  border: 1px dashed var(--rule);
  background: none;
  color: var(--ink-2);
  font-size: var(--t-12);
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.zu-cover-drop:hover {
  color: var(--ink);
  border-color: var(--accent-edge-2);
}

.zu-cover-drop__icon {
  color: var(--accent);
}

.zu-cover-player {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3) 0 0;
  border-top: 1px solid var(--rule);
  background: none;
  box-shadow: none;
}

.zu-cover-player--ready {
  border-top-color: var(--ok-edge);
}

.zu-cover-player__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.zu-cover-player__icon {
  color: var(--accent);
}

.zu-cover-player__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.zu-cover-player__status {
  font-size: var(--t-11);
  color: var(--ok);
}

.zu-cover-player__name {
  font-size: var(--t-12);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zu-cover-player__audio {
  width: 100%;
  height: 32px;
}

.zu-cover-note {
  font-size: var(--t-11);
  color: var(--muted);
}

.zu-cover-note--ok {
  color: var(--ok);
}

/* status generate */
.zu-gen-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--s-3) 0 0;
  border-top: 1px solid var(--rule);
}

.zu-gen-status-head {
  font-family: var(--font-code);
  font-size: var(--t-11);
  color: var(--ink-2);
}

.zu-gen-status-bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  overflow: hidden;
}

.zu-gen-status-bar > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.form-actions {
  position: sticky;
  bottom: var(--s-3);
  z-index: 3;
  display: flex;
  gap: var(--s-2);
  margin: var(--s-5) 0 0;
  padding: var(--s-3) 0 var(--s-4);
  border-top: 1px solid var(--rule);
  background: var(--sheet);
}

.zu-action-btn--danger {
  flex: 0 0 auto;
}

/* --------------------------------------------------------------- kartu -- */

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius-card);
  background: var(--sheet);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--card-edge);
}

.card--side,
.panel-right {
  overflow: hidden;
}

.zu-right-col,
.zu-detail-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* belum ada lagu dipilih -> kolom detail tidak memakan ruang */
.zu-detail-col:has(#detail-body[hidden]) {
  display: none;
}

.zu-library-card {
  max-height: calc(100vh - var(--s-7) * 2);
  max-height: calc(100dvh - var(--s-7) * 2);
  padding: var(--s-5) var(--s-5) 0;
}

.zu-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  padding-bottom: var(--s-3);
}

.zu-library-head-actions {
  display: flex;
  gap: 2px;
}

.zu-library-delete-all-btn {
  font-size: var(--t-10);
}

.zu-library-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
}

.zu-ws-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.zu-ws-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.zu-ws-picker-label {
  flex: none;
  font-size: var(--t-11);
}

.zu-ws-select {
  padding: 6px 26px 6px 12px;
  font-size: var(--t-12);
}

.zu-ws-bar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.zu-ws-add {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.zu-ws-add-input {
  width: 96px;
  padding: 6px 10px;
  font-size: var(--t-11);
}

.zu-side-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zu-side-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.zu-side-search-count {
  position: absolute;
  right: 12px;
  font-size: var(--t-10);
  color: var(--muted);
  pointer-events: none;
}

/* filter: kaset kecil */
.zu-library-like-filter {
  display: flex;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.zu-like-filter-btn {
  flex: none;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--t-11);
  font-weight: 500;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.zu-like-filter-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.zu-like-filter-btn--on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-edge);
  font-weight: 600;
}

.zu-library-bulk-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------- daftar lagu -- */

.zu-recent-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.zu-recent-list--scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  margin: 0 calc(var(--s-4) * -1);
  padding: 0 var(--s-4);
}

.zu-library-empty {
  padding: var(--s-8) var(--s-3);
  text-align: center;
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.6;
}

.zu-recent-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-areas:
    "art body dur"
    "art actions actions";
  gap: 2px var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}

.zu-recent-item:hover {
  background: var(--paper);
}

.zu-recent-item--active {
  background: var(--paper);
  box-shadow: inset 2px 0 0 var(--accent);
}

.zu-recent-item--checked {
  background: var(--accent-soft);
}

/* art: klip berwarna lane */
.zu-recent-art {
  grid-area: art;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-clip);
  background: linear-gradient(
    color-mix(in oklab, var(--lane-2) 16%, var(--sheet)),
    color-mix(in oklab, var(--lane-2) 26%, var(--sheet))
  );
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--lane-2) 42%, transparent),
    inset 0 1px 0 var(--hi);
  color: color-mix(in oklab, var(--lane-2) 70%, var(--ink));
  overflow: hidden;
}

.zu-recent-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zu-recent-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zu-recent-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.zu-recent-name {
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zu-rename-btn {
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: var(--t-10);
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.zu-recent-item:hover .zu-rename-btn {
  opacity: 1;
}

.zu-rename-btn:hover {
  color: var(--accent);
}

.zu-recent-meta {
  font-size: var(--t-10);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zu-recent-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* status: label kecil + titik */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: var(--t-10);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
}

.pill--ok {
  color: var(--ok);
}

.pill--muted {
  color: var(--bad);
}

.pill--accent {
  color: var(--accent);
}

.zu-recent-task-chip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: var(--t-10);
}

.zu-recent-task-chip:hover {
  color: var(--accent);
}

.zu-recent-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease);
}

.zu-recent-item:hover .zu-recent-actions,
.zu-recent-item--active .zu-recent-actions {
  opacity: 1;
}

.zu-recent-act {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--sheet);
  color: var(--ink-2);
  font-size: var(--t-10);
  box-shadow: 0 0 0 1px var(--shade-1), inset 0 1px 0 var(--hi);
}

.zu-recent-check {
  position: absolute;
  top: var(--s-3);
  left: -18px;
  width: 12px;
  height: 12px;
  accent-color: var(--accent);
}

.zu-ws-move-wrap {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.zu-ws-move {
  padding: 3px 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: var(--t-10);
  max-width: 100%;
}

.zu-recent-item--liked .zu-recent-name::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  vertical-align: middle;
}

/* ------------------------------------------------------------- detail -- */

.zu-detail-col .card {
  max-height: calc(100vh - var(--s-7) * 2);
  max-height: calc(100dvh - var(--s-7) * 2);
  padding: var(--s-4);
}

.result-placeholder {
  display: block;
  padding: var(--s-8) var(--s-3);
  text-align: center;
  font-size: var(--t-12);
  color: var(--muted);
  line-height: 1.6;
}

.zu-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: 0;
  overflow-y: auto;
}

.zu-detail-top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: center;
}

.zu-detail-art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-inner);
  background: linear-gradient(
    color-mix(in oklab, var(--lane-3) 22%, var(--sheet)),
    color-mix(in oklab, var(--lane-3) 34%, var(--sheet))
  );
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--lane-3) 40%, transparent),
    inset 0 1px 0 var(--hi);
  color: color-mix(in oklab, var(--lane-3) 65%, var(--ink));
  overflow: hidden;
}

.zu-detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zu-detail-top-text {
  min-width: 0;
}

.zu-detail-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.zu-detail-title {
  font-size: var(--t-17);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zu-detail-meta {
  margin-top: 3px;
  font-size: var(--t-10);
  color: var(--muted);
}

.zu-like-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.zu-like-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.zu-like-btn--on {
  color: var(--accent);
}

.detail-style-block,
.detail-lyrics-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}

.zu-detail-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

.zu-detail-section {
  font-size: var(--t-12);
  color: var(--muted);
}

.detail-headline-actions {
  display: flex;
  gap: 2px;
}

.detail-style-scroll,
.detail-lyrics-scroll {
  max-height: 132px;
  overflow-y: auto;
  padding-right: 4px;
}

.detail-style-scroll.is-min,
.detail-lyrics-scroll.is-min,
.detail-style-block.is-min .detail-style-scroll {
  max-height: 56px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, var(--mask-solid) 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, var(--mask-solid) 62%, transparent 100%);
}

.zu-detail-text {
  font-size: var(--t-12);
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* modal bahaya */
.modal-card--danger .modal-title {
  color: var(--ink);
}

/* --------------------------------------------------------- pengaturan -- */

.settings-zu {
  max-width: 820px;
}

.settings-zu-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.settings-zu-card {
  gap: var(--s-4);
  padding: var(--s-6);
  border-radius: var(--radius-card);
  background: var(--sheet);
  box-shadow: var(--shadow-card);
}

.settings-zu-card-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.settings-zu-head-copy {
  min-width: 0;
  flex: 1;
}

.settings-zu-title-row {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}

.settings-zu-h2 {
  font-size: var(--t-20);
  font-weight: 600;
  letter-spacing: -0.024em;
}

.settings-key-badge {
  padding: 0;
  border: 0;
  font-family: var(--font-code);
  font-size: var(--t-11);
  color: var(--muted);
}

.settings-zu-lead {
  font-size: var(--t-12);
  color: var(--ink-2);
  line-height: 1.6;
}

.settings-empty-keys {
  color: var(--muted);
}

/* daftar kunci */
.stored-keys {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3) 0 0;
  border-top: 1px solid var(--rule);
  background: none;
  box-shadow: none;
}

.stored-keys-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

.stored-keys-head-left {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.settings-link {
  font-size: var(--t-11);
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

.settings-link:hover {
  color: var(--accent);
}

.stored-keys-list {
  display: flex;
  flex-direction: column;
}

.stored-keys-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-11);
}

.stored-keys-item:last-child {
  border-bottom: 0;
}

.stored-keys-idx {
  font-size: var(--t-10);
  color: var(--muted);
}

.stored-keys-mask {
  font-size: var(--t-11);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stored-keys-provider {
  font-size: var(--t-10);
}

.stored-keys-credits {
  font-size: var(--t-10);
  color: var(--ink-2);
}

.stored-keys-ok {
  color: var(--ok);
}

.stored-keys-err {
  font-size: var(--t-10);
  color: var(--bad);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stored-keys-muted {
  color: var(--muted);
}

.stored-keys-copy,
.stored-keys-remove {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  font-size: var(--t-10);
}

.stored-keys-copy:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.stored-keys-remove:hover {
  background: var(--bad-soft);
  color: var(--bad);
}

.is-copied {
  color: var(--ok);
}

.stored-keys-hint {
  font-size: var(--t-10);
  color: var(--muted);
  line-height: 1.5;
}

/* tambah token */
.settings-add-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 0;
  border-top: 0;
}

.settings-add-label {
  font-size: var(--t-12);
}

.settings-add-label--small {
  font-weight: 400;
  color: var(--muted);
}

.settings-add-row {
  display: flex;
  gap: var(--s-2);
}

.settings-add-row--stack {
  align-items: flex-end;
}

.settings-add-input {
  flex: 1;
  font-family: var(--font-code);
  font-size: var(--t-12);
}

.settings-add-error {
  font-size: var(--t-11);
  color: var(--bad);
}

.settings-add-actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-2);
}

.settings-add-actions .btn,
.settings-add-actions .btn-primary {
  padding: 10px 16px;
  font-size: var(--t-12);
}

.buy-token-link {
  text-decoration: none;
}

/* tentang */
.settings-about {
  gap: var(--s-3);
  padding: var(--s-6);
  border-radius: var(--radius-card);
  background: var(--paper-2);
  box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--shade-1);
}

.settings-about-head {
  padding-bottom: var(--s-2);
}

.settings-about-p {
  font-size: var(--t-12);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 66ch;
}

.settings-about-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px var(--s-5);
}

.settings-about-list li {
  position: relative;
  padding-left: 14px;
  font-size: var(--t-12);
  color: var(--ink-2);
}

.settings-about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lane-3);
}

.settings-important {
  margin-top: var(--s-2);
  padding: var(--s-3) 0 0;
  border-top: 1px solid var(--rule);
  background: none;
  box-shadow: none;
}

.settings-important__title {
  margin-bottom: 6px;
  font-size: var(--t-12);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}

.settings-important ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-important li {
  position: relative;
  padding-left: 13px;
  font-size: var(--t-11);
  line-height: 1.55;
  color: var(--ink-2);
}

.settings-important li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lane-1);
}

/* ------------------------------------------------------------ responsif -- */

@media (max-width: 1440px) {
  .playground-grid {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .zu-detail-col {
    grid-column: 1 / -1;
  }

  .zu-detail-col .card {
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .zu-compose-controls-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
  }

  .settings-about-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .playground-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .zu-library-card {
    max-height: none;
  }

  .zu-recent-actions,
  .zu-rename-btn {
    opacity: 1;
  }

  .zu-recent-check {
    left: 0;
  }

  .zu-compose-panel {
    padding: var(--s-4);
  }
}
