/* SalesVidGen — Premium step ③ Script, "Text look" (premiumTypePicker.js). Three looks set as type specimens
   (each card speaks in its own letters), and the preview: the scene's own storyboard picture as a phone frame
   with the film's real letters on it. Phone: one column, preview under the looks. Wide: looks left, preview right.
   App theme tokens only; colour marks state (picked look, busy preview, a rule that fired). */

.tp-root { display: grid; gap: 1.4rem; }
.tp-root > .pv-sub { margin: 0; }
.tp-grid { display: grid; gap: 1.4rem; align-items: start; }
.tp-side { display: grid; gap: 1rem; min-width: 0; max-width: 34rem; }

/* ---------- The three looks ---------- */
.tp-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.tp-look { display: grid; gap: 0.3rem; align-content: start; justify-items: center; min-height: 44px; padding: 0.95rem 0.5rem 0.8rem;
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary);
  font: inherit; text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.tp-look:hover:not(:disabled) { border-color: var(--border-strong); }
.tp-look.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-subtle); }
.tp-look:disabled { cursor: default; }
.tp-look:disabled:not(.is-on) { opacity: 0.5; }
.tp-look:focus-visible, .tp-root button:focus-visible, .tp-weight input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The specimen: an honest sketch of each look in the browser's letters (the preview shows the film's real ones). */
.tp-spec { display: block; font-size: clamp(1.45rem, 6vw, 2rem); line-height: 1.05; color: var(--text-primary); white-space: nowrap; }
.tp-look-bold .tp-spec { font-family: 'Anton', Impact, 'Haettenschweiler', 'Arial Narrow', sans-serif; font-weight: 400; letter-spacing: 0.01em; }   /* heavy by design: no fake bold */
.tp-look-clean .tp-spec { font-family: 'Montserrat', var(--font-body), sans-serif; font-weight: 600; letter-spacing: -0.01em; }
.tp-look-elegant .tp-spec { font-family: var(--font-display), 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 600; }
.tp-look-bold .tp-spec[lang="zh"] { font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 900; }
.tp-look-clean .tp-spec[lang="zh"] { font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 500; }
.tp-look-elegant .tp-spec[lang="zh"] { font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; font-style: normal; font-weight: 700; }
.tp-name { font-size: 0.86rem; font-weight: 600; line-height: 1.25; }
.tp-faces { font-size: 0.72rem; line-height: 1.3; color: var(--text-tertiary); overflow-wrap: anywhere; }

/* ---------- Pro: thin ↔ bold ---------- */
.tp-pro { display: grid; gap: 0.45rem; justify-items: start; padding-top: 0.2rem; }
.tp-weight { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; width: 100%; min-height: 44px;
  margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); text-transform: none; letter-spacing: 0; }
.tp-weight input { width: 100%; padding: 0; accent-color: var(--accent); }
.tp-wnote, .tp-shows { margin: 0; max-width: 52ch; font-size: 0.82rem; line-height: 1.45; color: var(--text-tertiary); }
.tp-wval { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.tp-shows b { color: var(--accent); font-weight: 600; }
.tp-status { margin: 0; min-height: 1.2em; font-size: 0.8rem; color: var(--text-secondary); }
.tp-use { display: grid; justify-items: center; gap: 0.1rem; width: 100%; max-width: 22rem; }
.tp-use small { font-size: 0.74rem; font-weight: 400; opacity: 0.85; }

/* ---------- The preview: the scene as a phone frame ---------- */
.tp-preview { display: grid; gap: 0.6rem; justify-items: center; margin: 0; min-width: 0; }
.tp-frame { position: relative; width: 100%; max-width: 320px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--border-color); background: linear-gradient(180deg, var(--bg-surface), var(--bg-base)); box-shadow: var(--shadow-md); }
.tp-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s var(--ease); }
.tp-frame.is-busy img { opacity: 0.55; }
.tp-frame.is-busy::after { content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 40%; background: var(--gradient-accent);
  animation: tp-busy 1.1s var(--ease) infinite; }
@keyframes tp-busy { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.tp-wait { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; font-size: 0.86rem; color: var(--text-secondary); text-align: center; }
.tp-preview figcaption { display: grid; gap: 0.3rem; width: 100%; max-width: 320px; font-size: 0.8rem; line-height: 1.4; }
.tp-where { color: var(--text-tertiary); }
.tp-rule { padding-left: 0.55rem; border-left: 3px solid var(--warning); color: var(--text-primary); }
.tp-note { color: var(--text-secondary); }
.tp-err { color: var(--error); }

@media (min-width: 760px) {
  .tp-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 2rem; }
  .tp-preview { position: sticky; top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-frame img, .tp-look { transition: none; }
  .tp-frame.is-busy::after { animation: none; width: 100%; opacity: 0.6; }
}
