/* Scrolling Text Maker: photo hero, live LED preview (left) + settings panel (right). */

.calc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.ghost-btn:hover { background: rgba(59, 130, 246, 0.22); border-color: rgba(96, 165, 250, 0.6); }
.ghost-btn:disabled { opacity: 0.45; cursor: not-allowed; }
[hidden] { display: none !important; }

/* ── Hero ── */
.stm-hero { position: relative; overflow: hidden; background: #05070a; border-bottom: 1px solid rgba(96, 165, 250, 0.1); }
.stm-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 45%; }
.stm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 9, 18, 0.96) 0%, rgba(5, 9, 18, 0.8) 42%, rgba(5, 9, 18, 0.15) 75%, rgba(5, 9, 18, 0) 100%);
}
.stm-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--page-pad-inline, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.95rem;
}
.stm-hero__copy > * { max-width: 38rem; }
.stm-hero__title { margin: 0; font-family: var(--font-display, "Sora", sans-serif); font-size: clamp(2.1rem, 4.8vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; color: #f8fafc; }
.stm-hero__title span { display: block; margin-top: 0.4rem; font-size: 0.5em; letter-spacing: -0.01em; color: var(--accent-bright, #60a5fa); }
.stm-hero__lead { margin: 0; font-size: 1.05rem; line-height: 1.6; color: #cbd5e1; }
.stm-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.stm-chips li { padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem; color: #e2e8f0; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.stm-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.stm-hero__note { margin: 0; font-size: 0.875rem; color: #94a3b8; }

/* ── Tool ── */
.stm-tool { background: #05070a; padding: clamp(1.25rem, 3vw, 2rem) var(--page-pad-inline, 1.25rem) clamp(2rem, 5vw, 3.5rem); scroll-margin-top: 80px; }
.stm-grid { display: grid; gap: 1rem; max-width: 1200px; margin: 0 auto; }
@media (min-width: 960px) {
  .stm-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); align-items: start; }
  .stm-left { position: sticky; top: 88px; }
}
.stm-card { min-width: 0; padding: clamp(1rem, 2.2vw, 1.4rem); background: #111a2e; border: 1px solid rgba(96, 165, 250, 0.14); border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45); }

.stm-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid rgba(96, 165, 250, 0.2); }
.stm-canvas { display: block; width: 100%; aspect-ratio: 16 / 6; background: #000; cursor: zoom-in; }
.stm-exit {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  display: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 0.85rem var(--font-display, "Sora", sans-serif);
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s;
}
.stm-exit:hover, .stm-exit:focus { opacity: 1; }
.stm-stage.is-full {
  position: fixed;
  inset: 0;
  z-index: 10000;
  border: 0;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
.stm-stage.is-full .stm-canvas { width: 100%; height: 100%; aspect-ratio: auto; cursor: zoom-out; }
.stm-stage.is-full .stm-exit { display: block; }
.stm-stage:fullscreen { width: 100vw; height: 100vh; }
html.stm-locked, html.stm-locked body { overflow: hidden; }
.stm-rotate { display: none; }
@media (orientation: portrait) and (max-width: 719px) {
  .stm-stage.is-full .stm-rotate {
    display: block;
    position: absolute;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    margin: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #e2e8f0;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
  }
}

.stm-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.9rem; }
.stm-actions .btn-download { border: none; cursor: pointer; font-size: 0.9rem; padding: 0.7rem 1.2rem; }
.stm-rec-status { font-size: 0.85rem; color: #94a3b8; }
.stm-hint { margin: 0.7rem 0 0; font-size: 0.82rem; color: #64748b; line-height: 1.5; }

.stm-field { margin-top: 1rem; }
.stm-field:first-child { margin-top: 0; }
.stm-text {
  width: 100%;
  min-height: 76px;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 10px;
  color: #f1f5f9;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}
.stm-text:focus { outline: none; border-color: rgba(96, 165, 250, 0.5); }
.stm-range { display: grid; grid-template-columns: 6rem minmax(0, 1fr) 3rem; gap: 0.6rem; align-items: center; margin-top: 0.7rem; font-size: 0.875rem; color: #cbd5e1; }
.stm-range input { width: 100%; accent-color: #3b82f6; }
.stm-range output { text-align: end; font-weight: 600; color: #93c5fd; font-variant-numeric: tabular-nums; }
.stm-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin-top: 0.8rem; font-size: 0.875rem; color: #cbd5e1; }
.stm-row label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.stm-row input[type="checkbox"] { accent-color: #3b82f6; width: 1rem; height: 1rem; }
.stm-select { padding: 0.45rem 0.55rem; background: #0c1220; border: 1px solid rgba(96, 165, 250, 0.2); border-radius: 8px; color: #cbd5e1; font: inherit; font-size: 0.875rem; }
.stm-color { width: 2.4rem; height: 2rem; padding: 0; border: 1px solid rgba(96, 165, 250, 0.3); border-radius: 8px; background: none; cursor: pointer; }
.stm-swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.stm-swatch { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); cursor: pointer; padding: 0; }
.stm-swatch:hover { border-color: #fff; }
.stm-privacy { margin: 1rem 0 0; font-size: 0.8rem; color: #64748b; }

@media (max-width: 719px) {
  .stm-hero__img { position: relative; display: block; height: 190px; object-position: 80% 45%; }
  .stm-hero::after { inset: 0 0 auto 0; height: 190px; background: linear-gradient(180deg, rgba(5, 9, 18, 0) 40%, rgba(5, 9, 18, 1) 100%); }
  .stm-hero__copy { padding-top: 0.25rem; padding-bottom: 1.4rem; gap: 0.75rem; }
  .stm-hero__title { font-size: 2.1rem; }
  .stm-hero__lead { font-size: 0.95rem; line-height: 1.5; }
  .stm-chips li { font-size: 0.78rem; padding: 0.3rem 0.65rem; }
  .stm-card { border-radius: 16px; }
  .stm-canvas { aspect-ratio: 16 / 7; }
}

/* ── Explainers ── */
.tool-explain .feature-row__copy, .tool-explain .feature-row__media { min-width: 0; }
.tool-row a, .tool-siblings a { color: var(--accent-bright, #60a5fa); }
.stm-compare { margin: 0; display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }
.stm-compare__item { padding: 1rem; border-radius: 16px; background: #0f1a33; border: 1px solid rgba(96, 165, 250, 0.16); }
.stm-compare__label { display: block; margin-bottom: 0.6rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.stm-compare__screen { position: relative; height: 150px; border-radius: 10px; background: #000; overflow: hidden; }
.stm-demo-marquee { position: absolute; top: 50%; left: 0; transform: translateY(-50%); white-space: nowrap; font: 800 2.4rem/1 var(--font-display, "Sora", sans-serif); color: #ff3b30; text-shadow: 0 0 12px rgba(255, 59, 48, 0.8); animation: stm-marq 6s linear infinite; }
.stm-demo-marquee { transform: translateY(-50%); }
.stm-demo-prompter { position: absolute; left: 10%; right: 10%; top: 0; font-size: 0.8rem; line-height: 1.6; color: #e2e8f0; text-align: center; animation: stm-up 9s linear infinite; }
.stm-demo-prompter p { margin: 0 0 0.5rem; }
.stm-compare__screen--prompter::after { content: ""; position: absolute; left: 0; right: 0; top: 46%; height: 1.4rem; border-top: 1px solid rgba(96, 165, 250, 0.5); border-bottom: 1px solid rgba(96, 165, 250, 0.5); }
.stm-compare__note { margin: 0.6rem 0 0; font-size: 0.85rem; color: #94a3b8; line-height: 1.5; }
@keyframes stm-marq { from { left: 100%; } to { left: -160%; } }
@keyframes stm-up { from { transform: translateY(150px); } to { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { .stm-demo-marquee, .stm-demo-prompter { animation: none; } .stm-demo-marquee { left: 8%; } }
@media (max-width: 480px) { .stm-compare { grid-template-columns: 1fr; } }
.stm-uses { display: grid; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stm-use { padding: 1.35rem; border-radius: 16px; background: #0f1a33; border: 1px solid rgba(96, 165, 250, 0.14); }
.stm-use h3 { margin: 0 0 0.6rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.15rem; color: #f1f5f9; }
.stm-use p { margin: 0; color: #94a3b8; line-height: 1.65; font-size: 0.95rem; }
