/* ============================================================
   EN UNA NOTA — Creator studio
   ============================================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 620px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.unit {
  align-self: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-right: 4px;
}

/* ---------- head ---------- */
.studio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 0 24px;
}

.studio-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 12px 0 8px;
}

.studio-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1100px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- modo ---------- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  line-height: 1.25;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}

.mode-btn .material-symbols-outlined {
  font-size: 22px;
  color: var(--faint);
  transition: color 0.18s;
}

.mode-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  transform: translateY(-1px);
}

.mode-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(16, 255, 160, 0.45);
  color: var(--accent);
}

.mode-btn.is-active .material-symbols-outlined {
  color: var(--accent);
}

@media (max-width: 640px) {
  .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- YouTube ---------- */
.yt-preview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg-deep);
  border: 1px solid var(--line);
}

.yt-thumb {
  width: 88px;
  height: 62px;
  border-radius: var(--r-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d2024, #101215);
  color: var(--faint);
  border: 1px solid var(--line);
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-thumb.has-img {
  border-color: rgba(16, 255, 160, 0.3);
}

.yt-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.yt-meta strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 4px;
}

.yt-wave span {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.35;
}

.yt-wave span:nth-child(3n) { height: 18px; }
.yt-wave span:nth-child(4n) { height: 26px; }
.yt-wave span:nth-child(2n) { height: 13px; }

.yt-preview:hover .yt-wave span,
.yt-thumb.has-img + .yt-meta + .yt-wave span {
  animation: wave 1s ease-in-out infinite alternate;
}

.yt-preview:hover .yt-wave span:nth-child(2n) { animation-delay: 0.12s; }
.yt-preview:hover .yt-wave span:nth-child(3n) { animation-delay: 0.24s; }

@keyframes wave {
  from { transform: scaleY(0.45); opacity: 0.35; }
  to { transform: scaleY(1); opacity: 0.9; }
}

@media (max-width: 700px) {
  .yt-preview {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .yt-thumb { width: 70px; height: 52px; }
  .yt-wave { display: none; }
}

/* ---------- clip ---------- */
.clip-row {
  display: grid;
  grid-template-columns: 160px auto minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.inline-field.compact {
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  padding-right: 10px;
}

.inline-field.compact:focus-within {
  border-color: rgba(16, 255, 160, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 255, 160, 0.09);
}

.inline-field.compact .field {
  background: transparent;
  box-shadow: none;
  border: 0;
}

.clip-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.4;
  max-width: 330px;
}

.clip-tip .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
  flex: none;
}

@media (max-width: 780px) {
  .clip-row {
    grid-template-columns: 1fr 1fr;
  }
  .clip-tip {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ---------- segmented ---------- */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.seg button {
  min-width: 46px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}

.seg button:hover {
  color: var(--text);
  background: var(--surface-3);
}

.seg button.is-active {
  background: var(--accent);
  color: #05130c;
  box-shadow: 0 2px 12px rgba(16, 255, 160, 0.25);
}

/* ---------- opciones ---------- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  transition: border-color 0.18s, background 0.18s;
}

.opt-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.opt-row.is-correct {
  border-color: rgba(16, 255, 160, 0.45);
  background: rgba(16, 255, 160, 0.045);
}

.opt-cover {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: none;
}

.opt-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-letter {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.55);
}

.opt-letter {
  position: absolute;
  left: 5px;
  bottom: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #05130c;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 1.5;
}

.opt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.opt-field > span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.opt-field input {
  width: 100%;
  height: 36px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.16s, background 0.16s;
}

.opt-field input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.opt-field input:hover {
  background: #101215;
}

.opt-field input:focus {
  outline: none;
  border-color: rgba(16, 255, 160, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 255, 160, 0.08);
}

.opt-cover-url {
  grid-column: 2 / 5;
}

.opt-cover-url input {
  height: 30px;
  font-size: 11.5px;
  color: var(--muted);
}

.opt-yt {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.opt-yt input {
  flex: 1;
  height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid transparent;
  color: var(--text);
  font-size: 12px;
}

.opt-yt input:focus {
  outline: none;
  border-color: rgba(16, 255, 160, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 255, 160, 0.08);
}

.opt-yt .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.correct-pick {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: color 0.16s, background 0.16s, border-color 0.16s, transform 0.16s;
}

.correct-pick:hover {
  color: var(--accent);
  transform: scale(1.06);
}

.correct-pick .material-symbols-outlined {
  font-size: 22px;
}

.opt-row.is-correct .correct-pick {
  color: #05130c;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(16, 255, 160, 0.35);
}

@media (max-width: 760px) {
  .opt-row {
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    gap: 8px;
  }
  .opt-cover {
    width: 48px;
    height: 48px;
    grid-column: 1;
    grid-row: 1;
  }
  .opt-field {
    grid-column: 2;
  }
  .correct-pick {
    grid-column: 3;
    grid-row: 1;
    width: 36px;
    height: 36px;
  }
  .opt-cover-url {
    grid-column: 2 / 4;
  }
}

/* ---------- reglas ---------- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.rule {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

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

.rule > strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
}

.rule .seg {
  align-self: flex-start;
  background: var(--bg-deep);
}

.rule .tiny {
  margin: 0;
}

/* ---------- acciones ---------- */
.studio-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0 30px;
}

.studio-actions .btn-primary {
  margin-left: auto;
}

@media (max-width: 640px) {
  .studio-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .studio-actions .btn-primary {
    margin-left: 0;
  }
}

/* ---------- simulador ---------- */
.sim-card {
  overflow: visible;
}

.sim-stage {
  border-radius: var(--r-lg);
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(16, 255, 160, 0.08), transparent 70%),
    var(--bg-deep);
  border: 1px solid var(--line);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.sim-vinyl {
  width: 150px;
  height: 150px;
  margin: 0 auto 2px;
}

.sim-vinyl .disc {
  width: 150px;
  height: 150px;
  animation-duration: 12s;
}

.sim-vinyl .disc-label {
  width: 54px;
  height: 54px;
  gap: 0;
}

.sim-vinyl .disc-label .material-symbols-outlined {
  font-size: 13px;
}

.sim-vinyl .disc-label strong {
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.sim-vinyl .disc-label span {
  font-size: 5.5px;
}

.sim-vinyl .disc-hole {
  width: 6px;
  height: 6px;
}

.sim-prompt {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  padding: 0 6px;
}

.sim-options {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sim-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}

.sim-letter {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

.sim-opt-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sim-opt-text strong {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-opt-text span {
  font-size: 8.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- cola ---------- */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 3px;
}

.queue-item {
  display: grid;
  grid-template-columns: 22px 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: border-color 0.16s, background 0.16s;
}

.queue-item:hover {
  background: var(--surface-3);
}

.queue-item.is-editing {
  border-color: rgba(123, 97, 255, 0.5);
  background: rgba(123, 97, 255, 0.08);
}

.q-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--faint);
  text-align: center;
}

.q-cover {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}

.q-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.q-letter {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.55);
}

.q-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.q-meta strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-meta span {
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-actions {
  display: flex;
  gap: 1px;
  opacity: 0.55;
  transition: opacity 0.16s;
}

.queue-item:hover .q-actions {
  opacity: 1;
}

.icon-btn.sm {
  width: 26px;
  height: 26px;
}

.icon-btn.sm .material-symbols-outlined {
  font-size: 16px;
}

.icon-btn.danger:hover {
  color: var(--coral);
}

.queue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 26px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
}

.queue-empty > .material-symbols-outlined {
  font-size: 30px;
  color: var(--faint);
  margin-bottom: 4px;
}

.queue-empty strong {
  font-family: var(--font-display);
  font-size: 14px;
}

.queue-empty .btn {
  margin-top: 8px;
}

.queue-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.queue-actions .btn {
  justify-content: center;
  font-size: 11px;
  padding: 8px 10px;
}

/* ---------- sala ---------- */
.room-card .room-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room-card .qr-card {
  background: var(--bg-deep);
}

.room-card .qr-box {
  width: 118px;
  height: 118px;
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.room-actions .btn {
  font-size: 11px;
}

.room-actions .btn.hidden {
  display: none;
}

.room-modal-qr {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}

.room-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* ---------- utilidades ---------- */
#room-chip .dot {
  background: var(--faint);
  box-shadow: none;
}

#room-chip .dot.on {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
