/* ──────────────────────────────────────────────────────────────────────
   IN THIS HOUSE — yard sign summoner
   Dark neon. Mobile-first. A little bit over-the-top.
   ────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0612;
  --bg-2: #160a28;
  --ink: #fafaff;
  --dim: #8a86a8;
  --pink: #ff2d94;
  --pink-2: #ff6ab5;
  --cyan: #5cf2e8;
  --yellow: #ffe66a;
  --green: #6cff9a;
  --purple: #a29bfe;
  --border: rgba(255, 255, 255, 0.08);
  --border-hot: rgba(255, 45, 148, 0.5);

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Helvetica Neue", "Arial Black", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
    monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* ── Animated background ───────────────────────────────────────── */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 45, 148, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 242, 232, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 90%);
}

.bg-glow {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 45, 148, 0.18), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(92, 242, 232, 0.15), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(162, 155, 254, 0.15), transparent 55%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  animation: glow-shift 18s ease-in-out infinite alternate;
}

@keyframes glow-shift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4%, 3%) scale(1.08); }
}

/* ── Layout ────────────────────────────────────────────────────── */

main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem 3rem;
}

@media (min-width: 768px) {
  main {
    padding: 2rem 2rem 4rem;
  }
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  margin: 0.25rem 0 1rem;
}

@media (min-width: 768px) {
  .hero { margin: 0.5rem 0 1.5rem; }
}

.title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 11vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 0;
  text-transform: uppercase;
}

.title .line {
  display: block;
}

.title .accent {
  background: linear-gradient(90deg, var(--pink) 0%, var(--cyan) 50%, var(--yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 80px rgba(255, 45, 148, 0.3);
  animation: hue-shift 8s linear infinite;
}

@keyframes hue-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(35deg); }
}

.tagline {
  font-size: clamp(0.95rem, 2.3vw, 1.2rem);
  color: var(--ink);
  max-width: 36rem;
  margin: 0.75rem auto 0;
  line-height: 1.4;
}

.tagline .quiet {
  color: var(--dim);
  font-size: 0.92em;
}

.alt-mode-link {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.alt-mode-link a {
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border-bottom: 1px dashed rgba(92, 242, 232, 0.35);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.alt-mode-link a:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* ── Intake form ───────────────────────────────────────────────── */

.intake {
  max-width: 42rem;
  margin: 0 auto;
}

.intake form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .intake form {
    flex-direction: row;
  }
}

#handle {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

#handle::placeholder {
  color: var(--dim);
}

#handle:focus {
  border-color: var(--pink);
  background: rgba(255, 45, 148, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 45, 148, 0.12);
}

#go {
  background: linear-gradient(135deg, var(--pink) 0%, #ff66a0 100%);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  padding: 1.1rem 2rem;
  border-radius: 14px;
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 24px rgba(255, 45, 148, 0.3), 0 0 0 rgba(255, 45, 148, 0);
}

#go:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(255, 45, 148, 0.45),
              0 0 40px rgba(255, 45, 148, 0.2);
}

#go:active {
  transform: translateY(0) scale(0.99);
}

#go:disabled {
  filter: grayscale(0.5) brightness(0.7);
  cursor: not-allowed;
}

#go .btn-sub {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.fineprint {
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ── Live pipeline view ────────────────────────────────────────── */

.live {
  margin-top: 2.5rem;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-item.elapsed {
  color: var(--cyan);
  margin-left: auto;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.2s ease-in-out infinite;
}

.dot.collect {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.dot.render {
  background: var(--yellow);
  box-shadow: 0 0 12px var(--yellow);
}

.dot.done {
  background: var(--pink);
  box-shadow: 0 0 16px var(--pink);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

.phase-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.35rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 2rem 0 1rem;
  color: var(--cyan);
}

/* ── Chunk grid ─────────────────────────────────────────────────── */

.chunks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .chunks { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .chunks { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1400px) {
  .chunks { grid-template-columns: repeat(4, 1fr); }
}

.chunk-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  max-height: 260px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, transform 0.2s;
}

.chunk-card.active {
  border-color: var(--border-hot);
  background: rgba(255, 45, 148, 0.04);
  box-shadow: 0 0 0 1px var(--border-hot), 0 0 24px rgba(255, 45, 148, 0.15);
  animation: card-pulse 2s ease-in-out infinite;
}

@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--border-hot), 0 0 20px rgba(255, 45, 148, 0.12); }
  50% { box-shadow: 0 0 0 1px var(--border-hot), 0 0 32px rgba(255, 45, 148, 0.28); }
}

.chunk-card.searching {
  border-color: var(--cyan);
  background: rgba(92, 242, 232, 0.06);
}

.chunk-card.done {
  border-color: rgba(108, 255, 154, 0.35);
  background: rgba(108, 255, 154, 0.03);
  animation: none;
  box-shadow: none;
}

.chunk-card.done .chunk-header {
  color: var(--green);
}

.chunk-card.error {
  border-color: rgba(255, 100, 100, 0.4);
  background: rgba(255, 100, 100, 0.05);
}

.chunk-card.error .chunk-header {
  color: #ff8c8c;
}

.chunk-card.retry {
  border-color: rgba(255, 200, 80, 0.55);
  background: rgba(255, 200, 80, 0.06);
  animation: card-retry-pulse 0.8s ease-in-out infinite;
}

.chunk-card.retry .chunk-header,
.chunk-card.retry .chunk-toolcalls {
  color: #ffcb55;
}

@keyframes card-retry-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.4), 0 0 18px rgba(255, 200, 80, 0.15); }
  50% { box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.5), 0 0 28px rgba(255, 200, 80, 0.3); }
}

.chunk-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.chunk-label {
  font-weight: 700;
  color: var(--pink-2);
}

.chunk-card.done .chunk-label {
  color: var(--green);
}

.chunk-range {
  font-size: 0.68rem;
  opacity: 0.85;
}

.chunk-toolcalls {
  font-size: 0.68rem;
  color: var(--cyan);
  white-space: nowrap;
}

.chunk-content {
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 0.25rem;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chunk-content::-webkit-scrollbar {
  width: 4px;
}
.chunk-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* ── Collector output ──────────────────────────────────────────── */

.collector-output {
  background: rgba(92, 242, 232, 0.04);
  border: 1.5px solid rgba(92, 242, 232, 0.25);
  border-radius: 14px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--cyan);
  max-height: 55vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(92, 242, 232, 0.08);
  animation: collector-pulse 2.5s ease-in-out infinite;
}

@keyframes collector-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(92, 242, 232, 0.08); }
  50% { box-shadow: 0 0 50px rgba(92, 242, 232, 0.18); }
}

/* ── Result ────────────────────────────────────────────────────── */

.result {
  text-align: center;
  margin-top: 1.25rem;
  animation: result-in 0.6s cubic-bezier(.2, 1.2, .3, 1) both;
}

@keyframes result-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.result-title {
  color: var(--yellow);
  text-align: center;
  font-size: clamp(1.1rem, 3.2vw, 1.6rem);
  margin: 0 0 0.75rem;
}

/* The critical constraint: the sign PNG should ALWAYS fit on one screen,
   even on a small iPhone. We use svh (small viewport height) so iOS Safari's
   address bar doesn't confuse the layout. The actions row lives below, so
   the image gets the viewport minus a budget for header + buttons + meta. */
.sign-wrap {
  background: #111;
  padding: 0.4rem;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(255, 45, 148, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(255, 45, 148, 0.18);
}

#sign-img {
  display: block;
  max-width: 100%;
  max-height: min(68svh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

@media (min-width: 768px) {
  #sign-img {
    max-height: min(72svh, 1100px);
  }
}

.result-meta {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin: 0.75rem 0 0.75rem;
  line-height: 1.5;
}

.result-meta strong {
  color: var(--cyan);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.95rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--yellow), #ffb347);
  color: #221a00;
  border: none;
  box-shadow: 0 4px 24px rgba(255, 230, 106, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 6px 32px rgba(255, 230, 106, 0.45);
}

.btn.ghost {
  background: transparent;
}

.btn.copied {
  background: rgba(108, 255, 154, 0.15);
  border-color: rgba(108, 255, 154, 0.55);
  color: var(--green);
}

/* ── Error section ─────────────────────────────────────────────── */

.error {
  margin-top: 3rem;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 70, 70, 0.08);
  border: 1.5px solid rgba(255, 70, 70, 0.3);
  border-radius: 14px;
}

.error h2 {
  font-family: var(--font-display);
  font-weight: 900;
}

.error pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #ffaaaa;
  white-space: pre-wrap;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
}

/* ── Footer ────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ── Auth gate + user chip ─────────────────────────────────────── */

.auth-gate {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.gate-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-sub {
  color: var(--dim);
  margin: 0 0 1.5rem;
}

.sign-in-btn {
  min-width: 16rem;
}

.sign-in-btn:disabled {
  filter: grayscale(0.6) brightness(0.7);
  cursor: wait;
}

.gate-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dim);
  min-height: 1.2em;
}

/* Floating user chip in top-right: user button + runs pill */
.user-chip {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.user-chip.visible {
  display: flex;
}

@media (min-width: 768px) {
  .user-chip {
    top: 1.5rem;
    right: 1.5rem;
  }
}

.runs-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(108, 255, 154, 0.1);
  border: 1px solid rgba(108, 255, 154, 0.3);
  white-space: nowrap;
}

.runs-pill.zero {
  color: #ff8c8c;
  background: rgba(255, 100, 100, 0.1);
  border-color: rgba(255, 100, 100, 0.3);
}

.runs-pill.unlimited {
  color: var(--yellow);
  background: rgba(255, 230, 106, 0.12);
  border-color: rgba(255, 230, 106, 0.4);
  letter-spacing: 0.08em;
}

/* Override Clerk user button dark look */
.cl-userButtonBox {
  display: block !important;
}

/* ── Quota exhausted ───────────────────────────────────────────── */

.quota-empty {
  max-width: 32rem;
  margin: 2rem auto 0;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 100, 100, 0.06);
  border: 1.5px solid rgba(255, 100, 100, 0.25);
  border-radius: 14px;
}

.quota-empty h2 {
  font-family: var(--font-display);
  font-weight: 900;
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.quota-empty .quiet {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.expiry-note {
  color: var(--dim);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0 0 1rem;
  text-align: center;
}

/* ── Confetti burst on completion ──────────────────────────────── */

.confetti {
  position: fixed;
  top: 0;
  left: 50%;
  width: 10px;
  height: 16px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall 2.8s cubic-bezier(.2, .6, .3, 1) forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate(-50%, -20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), 110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ── Manual page ───────────────────────────────────────────────── */

.manual-main {
  padding: 1rem 1rem 3rem;
}

@media (min-width: 768px) {
  .manual-main { padding: 1.5rem 2rem 3rem; }
}

.manual-header {
  position: relative;
  text-align: center;
  margin-bottom: 1.25rem;
}

.back-link {
  position: absolute;
  left: 0;
  top: 0.25rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.back-link:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.25);
}

.manual-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.manual-title .accent {
  background: linear-gradient(90deg, var(--pink) 0%, var(--cyan) 50%, var(--yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.manual-sub {
  color: var(--dim);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .manual-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.75rem;
    align-items: start;
  }
}

/* editor column */

.editor {
  background: rgba(255, 255, 255, 0.025);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 0.9rem 0.75rem;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.editor-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--pink);
}

.editor-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
}

.lines-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.line-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.15rem 0.15rem 0.15rem 0.55rem;
  transition: border-color 0.15s, background 0.15s;
}

.line-row:focus-within {
  border-color: rgba(255, 45, 148, 0.5);
  background: rgba(255, 45, 148, 0.04);
}

.line-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
  min-width: 1.5rem;
}

.line-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.55rem 0.25rem;
  outline: none;
}

.line-row input::placeholder {
  color: rgba(138, 134, 168, 0.5);
}

.line-remove {
  background: transparent;
  border: none;
  color: var(--dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.line-remove:hover {
  color: #ff6a6a;
  background: rgba(255, 106, 106, 0.1);
}

.add-line-btn {
  width: 100%;
  margin-top: 0.5rem;
  background: rgba(92, 242, 232, 0.05);
  border: 1.5px dashed rgba(92, 242, 232, 0.35);
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
}

.add-line-btn:hover {
  background: rgba(92, 242, 232, 0.1);
  border-color: rgba(92, 242, 232, 0.6);
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn.small {
  font-size: 0.72rem;
  padding: 0.55rem 0.9rem;
  letter-spacing: 0.06em;
}

/* preview column */

.preview {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: sticky;
  top: 0.75rem;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.preview-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  transition: color 0.15s;
}

.preview-label.working {
  color: var(--yellow);
}

.manual-sign-wrap {
  min-height: 200px;
  position: relative;
}

.manual-sign-wrap #preview-img {
  max-height: min(60svh, 800px);
}

@media (min-width: 900px) {
  .manual-sign-wrap #preview-img {
    max-height: min(72svh, 1000px);
  }
}

.preview-empty {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 3rem 1rem;
}

.preview-actions {
  margin-top: 0;
}

.btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.manual-body .footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.manual-body .footer a {
  color: var(--cyan);
  text-decoration: none;
}
