/* tools-app: rules only this page uses (moved out of style.css so other pages don't parse them). */
.ba-slider-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: min(62vh, 520px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}
.ba-slider-after,
.ba-slider-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  background: transparent;
}
.ba-slider-before-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.85);
  z-index: 2;
}
.ba-slider-before {
  /* Keep before image same layout box as after (no stretch) */
  width: 100%;
  max-width: none;
  left: 0;
  right: auto;
}
.ba-slider-before-wrap .ba-slider-before {
  width: var(--ba-frame-w, 100cqw);
  min-width: 100%;
}
.ba-slider-frame {
  container-type: size;
}
.ba-slider-before-wrap .ba-slider-before {
  width: 100cqw;
  height: 100cqh;
  max-width: none;
}
.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}
.ba-slider-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.ba-slider-handle span::before,
.ba-slider-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}
.ba-slider-handle span::before {
  left: 8px;
  border-width: 5px 6px 5px 0;
  border-color: transparent #fff transparent transparent;
}
.ba-slider-handle span::after {
  right: 8px;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent #fff;
}
.ba-slider-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
  margin: 0;
}
.ba-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.host-marquee {
  display: block;
  overflow: hidden;
  max-width: 100%;
}
.host-marquee > span {
  display: inline-block;
  white-space: nowrap;
  padding-right: 1.5rem;
  animation: tool-title-marquee 10s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.host-marquee > span { animation: none; }
}
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; }
.serp-url { color: #006621; font-size: 0.82rem; margin: 0.15rem 0; }
.serp-desc { color: #4d5156; font-size: 0.88rem; }
.warn-hint { color: #b45309; }
.result-sub { font-size: 0.95rem; margin: 0.75rem 0 0.35rem; }
.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
  margin: 0.5rem 0;
}
.strength-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #16a34a);
  border-radius: inherit;
}
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.palette-strip {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.lead-mini {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0.35rem 0 0.75rem;
}
.seo-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.seo-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.emoji-cipher-out {
  font-size: 1.35rem;
  line-height: 1.55;
  word-break: break-word;
}
.emoji-style-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.emoji-style-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}
.emoji-style-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.emoji-style-head strong { font-size: 0.88rem; }
.emoji-style-text {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.gpt-gen { gap: 0.8rem; overflow: hidden; }
.gpt-gen-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.02rem;
}
.gpt-gen-orb {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 12%, #c4b5fd 30%, #8b5cf6 62%, #4f46e5 100%);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.75);
  animation: gptPulse 1.3s ease-in-out infinite;
}
.gpt-shimmer {
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 38%, var(--text) 50%, var(--muted) 62%, var(--muted) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gptShimmer 1.8s linear infinite;
}
.gpt-gen-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 440px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #1e1b4b, #312e81 45%, #0f766e);
}
.gpt-gen-stage.is-empty {
  background:
    radial-gradient(circle at 25% 30%, rgba(167, 139, 250, 0.85), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(45, 212, 191, 0.75), transparent 45%),
    radial-gradient(circle at 60% 20%, rgba(244, 114, 182, 0.6), transparent 40%),
    #1e1b4b;
  background-size: 160% 160%;
  animation: gptBlobs 6s ease-in-out infinite alternate;
  filter: blur(0.5px);
}
.gpt-gen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.45);
  transform: scale(1.15);
  animation: gptBreath 3.2s ease-in-out infinite;
}
.gpt-gen-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -45%;
  height: 45%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.1) 60%,
    transparent
  );
  mix-blend-mode: screen;
  animation: gptScan 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.gpt-gen-grain {
  position: absolute;
  inset: -4px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.7;
  animation: gptGrain 0.9s steps(4) infinite;
}
.gpt-gen-step {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
@media (prefers-reduced-motion: reduce) {
.gpt-shimmer { color: var(--text); background: none; }
}
