/* goonlab — the studio page (the order form). Linked by studio/home.html
   only. The site's own sheet (goonlab.css) still styles the shared pieces:
   buttons, pills, notices, the character chips and their search box, the
   upload tiles, the music list, the modals, the job cards. Everything
   here is scoped to body.page-studio. */

/* ---- head: the title and the balance ---- */

.page-studio .studio-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.page-studio .studio-head h1 { font-size: 1.9rem; margin-bottom: 0.25rem; }
.page-studio .studio-head .page-sub { max-width: 40rem; }
.balance-card {
  display: flex; flex-direction: column; gap: 0.05rem;
  padding: 0.7rem 1.1rem; min-width: 11rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text);
  transition: border-color 0.12s ease;
}
.balance-card:hover { text-decoration: none; border-color: var(--accent-dim); }
.balance-label { font-size: var(--text-meta); color: var(--muted); }
.balance-card strong { font-size: 1.15rem; font-family: var(--mono); color: var(--accent); }
.balance-more { font-size: 0.8rem; color: var(--muted); }

/* ---- two columns: the steps, and the price beside them ----
   parts.css (SO-P7, 23: .price-layout; .studio-form, .studio-main,
   .studio-side and .side-sticky are its aliases there) */

/* ---- a step: one numbered card ---- */

.step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.1rem 1.3rem 1.3rem;
}
.step-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.step-n {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: var(--accent-ink);
  font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 2px 10px var(--glow-strong);
}
.step-title { font-size: 1.08rem; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.step-body { display: flex; flex-direction: column; gap: 0.8rem; }

/* the extras card folds: its head is the summary */
.step-extras > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.step-extras > summary::-webkit-details-marker { display: none; }
.step-extras > summary .step-title { font-size: 1rem; font-weight: 600; color: var(--muted); }
.step-extras > summary:hover .step-title { color: var(--text); }
.step-extras[open] > summary { margin-bottom: 0.9rem; }
.step-extras[open] > summary .step-title { color: var(--text); }
.step-caret {
  margin-left: auto; flex: none; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.step-extras[open] > summary .step-caret { transform: rotate(-135deg); }
.step-extras .step-body { gap: 0.9rem; }

/* ---- fields ---- */

.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-label {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.45rem;
  font-size: var(--text-meta); font-weight: 600; color: var(--text);
}
.sub-label { font-size: var(--text-meta); color: var(--muted); }
.hint { font-size: var(--text-body); color: var(--muted); margin: 0; }
.page-studio .roster-hint { color: var(--warn); }
.page-studio .errorlist { list-style: none; color: var(--danger); font-size: var(--text-body); margin: 0; padding: 0; }

.studio-form textarea,
.studio-form input[type="text"],
.studio-form input[type="url"],
.studio-form input[type="number"],
.studio-form select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--text); padding: 0.7rem 0.9rem;
  font: inherit; font-size: 0.98rem; transition: border-color 0.12s ease;
}
.studio-form textarea:focus,
.studio-form input:focus,
.studio-form select:focus { border-color: var(--accent); }
.studio-form textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.studio-form input[type="file"] { color: var(--muted); font-size: 0.9rem; }
.studio-form input[type="file"]::file-selector-button {
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--text); padding: 0.4rem 0.9rem; margin-right: 0.7rem;
  font: inherit; cursor: pointer;
}
.step .notice { margin: 0; }
.step .custom-warning { font-size: var(--text-body); }
.confirm-row {
  display: flex; align-items: flex-start; gap: 0.6rem;
  border: 1px solid var(--warn); border-radius: 10px;
  padding: 0.7rem 0.9rem; font-size: var(--text-body); cursor: pointer;
}
.confirm-row input { margin-top: 0.25rem; accent-color: var(--accent); flex: none; }

/* the reference choice: two cards, one picked */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.choice-card {
  display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 0.95rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.choice-card:hover { border-color: var(--accent); }
.choice-card input { margin-top: 0.2rem; accent-color: var(--accent); flex: none; width: 1.05rem; height: 1.05rem; }
.choice-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 6px 20px var(--glow);
  background: linear-gradient(180deg, var(--tint), transparent 60%), var(--panel-2);
}
.choice-text { display: flex; flex-direction: column; gap: 0.2rem; }
.choice-text strong { font-size: 0.95rem; font-weight: 700; }
.choice-text small { color: var(--muted); font-size: var(--text-body); line-height: 1.4; }
@media (max-width: 640px) { .choice-cards { grid-template-columns: 1fr; } }

/* the minutes box with its unit, and the quick lengths above it */
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { padding-right: 3.2rem; }
.input-suffix .suffix { position: absolute; right: 0.9rem; color: var(--muted); font-size: 0.85rem; pointer-events: none; }
.len-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-btn {
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--muted);
  border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.chip-btn:hover { border-color: var(--accent); color: var(--text); }
.chip-btn.is-active { background: var(--tint); color: var(--accent); border-color: var(--accent-dim); }

/* the [?] marks: parts.css (section 8), so every page may use them */

/* ---- the quality cards ---- */

.mode-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.mode-card {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem;
  min-height: 9.5rem; text-align: left; padding: 0.85rem 0.9rem;
  background: var(--panel-2); color: inherit; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.mode-card:hover { border-color: var(--accent); }
.mode-card.is-chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 6px 20px var(--glow);
  background: linear-gradient(180deg, var(--tint), transparent 60%), var(--panel-2);
}
.mode-card.is-chosen::after {
  content: "✓"; position: absolute; top: 0.6rem; right: 0.7rem;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.8rem; font-weight: 800; display: grid; place-items: center;
}
.mode-name { font-weight: 800; font-size: 1rem; padding-right: 1.5rem; }
.mode-desc { color: var(--muted); font-size: var(--text-body); line-height: 1.35; }
.mode-card .mode-est { margin-top: auto; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); }
.mode-card .mode-last { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }

/* the fold under the cards: the writer and the art sources by hand */
.page-studio .adv-options { border: 1px dashed var(--line); border-radius: 10px; padding: 0.6rem 0.9rem; }
.page-studio .adv-options summary {
  cursor: pointer; font-size: 0.86rem; color: var(--muted);
  list-style: none; display: flex; align-items: center; gap: 0.5rem;
}
.page-studio .adv-options summary::-webkit-details-marker { display: none; }
.page-studio .adv-options summary::before {
  content: "+"; flex: none; width: 1.1rem; height: 1.1rem;
  border: 1px solid var(--line); border-radius: 4px;
  display: grid; place-items: center; font-size: 0.85rem; line-height: 1;
}
.page-studio .adv-options[open] summary::before { content: "−"; }
.page-studio .adv-options summary:hover { color: var(--text); }
.page-studio .adv-options[open] summary { margin-bottom: 0.9rem; color: var(--text); }
.page-studio .adv-options .field-row { gap: 1.2rem; }
.page-studio .radio-stack { margin-top: 0.3rem; }
.page-studio #model-mode-wrap { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; }

/* ---- the add-ons: three switches ---- */

.addons { display: flex; flex-direction: column; gap: 0.5rem; }
.switch-row {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem;
}
.switch { display: flex; align-items: center; gap: 0.8rem; flex: 1; min-width: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch-ui {
  flex: none; width: 2.4rem; height: 1.35rem; border-radius: 999px;
  background: var(--line); position: relative; transition: background 0.15s ease;
}
.switch-ui::after {
  content: ""; position: absolute; top: 0.15rem; left: 0.15rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff;
  transition: transform 0.15s ease;
}
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(1.05rem); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.switch-text strong { font-size: 0.9rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.switch-text small { color: var(--muted); font-size: var(--text-body); }
@media (prefers-reduced-motion: reduce) { .switch-ui, .switch-ui::after, .mode-card, .chip-btn { transition: none; } }

/* ---- the extras ---- */

.extra {
  border: 1px solid var(--line); border-radius: 10px; margin: 0; min-width: 0;
  padding: 0.8rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.extra legend { padding: 0 0.4rem; }
/* the subtitle-speed slider: parts.css (section 4) */

/* ---- the price and the button ----
   parts.css (SO-P7, 23: .price-start; the old .estimate-* names, .studio-actions
   and .btn-generate are its aliases there) */

/* ---- phones and small tablets ---- */

@media (max-width: 1000px) {
  .mode-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .step { padding: 0.9rem 0.9rem 1rem; border-radius: 12px; }
  .field-row { grid-template-columns: 1fr; }
  .page-studio .studio-head h1 { font-size: 1.5rem; }
  .balance-card { min-width: 0; flex: 1 1 100%; flex-direction: row; align-items: baseline; gap: 0.6rem; padding: 0.6rem 0.9rem; }
  .balance-more { margin-left: auto; }
  /* the quick lengths, drawn 44 px tall by parts.css, a step apart */
  .len-presets { gap: var(--space-2); }
}
@media (max-width: 480px) {
  .mode-cards { grid-template-columns: 1fr; }
  .mode-card { min-height: 0; }
  .len-presets .chip-btn { padding: 0.45rem 0.8rem; }
}
