:root {
  --bg: #0c0c10;
  --bg-2: #0e0e13;
  --bg-3: #111116;
  --panel: #15151b;
  --line: #2a2a35;
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f5f5f7;
  --muted: #8a8a9a;
  --soft: #c9c9d4;
  --gold: #ffd700;
  --amber: #ffa500;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

button {
  border: 0;
}

.tool-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.35;
  animation: loaderRing 1.4s ease-out infinite;
}

.loader-ring-b {
  animation-delay: 0.5s;
}

.loader-bolt {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.18);
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.cursor-trail,
.tool-bg,
.tool-bg-grid,
.tool-bg-noise,
.tool-bg-scan,
.tool-bg-dots,
.side-grid,
.side-scan,
.side-particles,
.progress-bg {
  pointer-events: none;
}

.cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 9998;
  mix-blend-mode: screen;
}

.tool-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.tool-bg-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
}

.tool-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.tool-bg-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.45), transparent);
  animation: scanlineMove 10s linear infinite;
}

.tool-bg-dots span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  animation: pointFloat 8s ease-in-out infinite;
}

.tool-header,
.tool-main,
.tool-footer,
.not-found-main {
  position: relative;
  z-index: 2;
}

.tool-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12, 12, 16, 0.86);
  backdrop-filter: blur(16px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tool-header.is-scrolled {
  border-color: rgba(255, 215, 0, 0.15);
  background: rgba(12, 12, 16, 0.95);
}

.header-inner {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand {
  justify-self: start;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  transform: rotate(-7deg);
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.18));
}

.brand-cat {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--text);
  transform: rotate(-7deg);
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.18));
}

.brand-cat::before,
.brand-cat::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 36px;
  height: 1px;
  opacity: 0.78;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 11px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 25px 0 / 11px 1px no-repeat;
}

.brand-cat::before {
  top: 17px;
  transform: rotate(-8deg);
}

.brand-cat::after {
  top: 21px;
  transform: rotate(6deg);
}

.cat-face {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 26px;
  margin-top: 6px;
  border: 1.7px solid currentColor;
  border-radius: 48% 52% 46% 48%;
  background: rgba(255, 215, 0, 0.06);
  box-shadow: inset 0 -8px 18px rgba(255, 215, 0, 0.035);
}

.cat-face::before,
.cat-face::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 10px;
  height: 10px;
  border-top: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
  background: var(--bg);
}

.cat-face::before {
  left: 4px;
  transform: rotate(31deg) skew(-8deg);
}

.cat-face::after {
  right: 4px;
  transform: rotate(59deg) skew(8deg);
}

.cat-face i,
.cat-face b {
  position: absolute;
  display: block;
  pointer-events: none;
}

.cat-face i {
  left: 7px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 10px 0 0 var(--gold);
}

.cat-face b {
  left: 12px;
  top: 14px;
  width: 4px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.cat-face b::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 3px;
  width: 12px;
  height: 5px;
  border-bottom: 1.2px solid currentColor;
  border-radius: 0 0 12px 12px;
}

.brand-name {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-family: "Comic Sans MS", "Bradley Hand", "Segoe Print", cursive;
  font-size: 1.44rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-1deg);
}

.brand-name span {
  position: relative;
  display: inline-block;
  margin-left: 2px;
  color: var(--gold);
  font-size: 0.76em;
  transform: translateY(5px) rotate(5deg);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-self: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.header-nav a,
.footer-inner nav a,
.back-link {
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.header-nav a:hover,
.footer-inner nav a:hover,
.back-link:hover {
  color: var(--gold);
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 215, 0, 0.32);
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
}

.header-action:hover {
  background: var(--gold);
  color: var(--bg);
}

.tool-main {
  min-height: 100vh;
  padding-top: 64px;
}

.tool-frame {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(420px, 42%) minmax(0, 1fr);
}

.tool-side {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 40px;
}

.side-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 215, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
}

.side-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.55), transparent);
  opacity: 0.45;
  animation: sideScan 5s linear infinite;
}

.side-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.side-particles span {
  position: absolute;
  display: block;
  background: var(--gold);
  opacity: 0;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
  animation: floatUp 4.8s ease-in-out infinite;
}

.side-particles span:nth-child(2n) {
  animation-delay: -1.4s;
  animation-duration: 5.6s;
}

.side-particles span:nth-child(3n) {
  animation-delay: -2.2s;
  animation-duration: 6.4s;
}

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.72;
}

.corner-a {
  top: 24px;
  left: 24px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}

.corner-b {
  top: 24px;
  right: 24px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}

.corner-c {
  bottom: 24px;
  left: 24px;
  border-bottom: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}

.corner-d {
  right: 24px;
  bottom: 24px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.side-content,
.side-badges {
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.back-link svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.side-back {
  margin-bottom: 44px;
}

.tool-icon-wrap {
  position: relative;
  width: 66px;
  height: 66px;
  margin-bottom: 32px;
  animation: glowPulse 3s ease-in-out infinite;
}

.tool-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 215, 0, 0.1);
}

.tool-icon {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
}

.tool-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.9;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.tool-kicker {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-title {
  margin: 0 0 18px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4vw, 3.18rem);
  line-height: 1;
}

.tool-title span {
  display: block;
}

.tool-description {
  max-width: 340px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.feature-row span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
}

.code-window {
  width: min(100%, 410px);
  border: 1px solid var(--line);
  background: #08080c;
  overflow: hidden;
}

.code-titlebar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.window-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.code-titlebar strong {
  margin-left: 8px;
  color: #55556a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.code-window pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.72;
}

.code-window code {
  font-family: inherit;
  white-space: pre;
}

.code-muted {
  color: var(--muted);
}

.code-gold {
  color: var(--gold);
}

.code-blue {
  color: var(--blue);
}

.code-green {
  color: #34d399;
}

.code-red {
  color: var(--red);
}

.side-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.side-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-action {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
}

.mobile-back {
  display: none;
}

.action-panel {
  width: min(100%, 560px);
  animation: fadeSlideIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.action-panel h2 {
  margin: 0 0 30px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.12;
}

.notice {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid;
  background: var(--bg-2);
  font-size: 0.86rem;
}

.notice strong {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.notice span {
  color: var(--soft);
}

.notice-error {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.76);
}

.notice-error strong {
  color: var(--red);
}

.notice-success {
  border-color: rgba(74, 222, 128, 0.38);
  box-shadow: inset 3px 0 0 rgba(74, 222, 128, 0.7);
}

.notice-success strong {
  color: var(--green);
}

.progress-panel {
  position: relative;
  min-height: 128px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.progress-panel.is-hidden {
  display: none;
}

.progress-bg {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: repeating-linear-gradient(0deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 8px);
}

.progress-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.pulse-ring {
  position: absolute;
  inset: -7px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.22;
  animation: pulseRing 1.45s ease-out infinite;
}

.pulse-b {
  inset: -14px;
  opacity: 0.12;
  animation-delay: 0.45s;
}

.progress-panel.is-done .pulse-ring {
  display: none;
}

.progress-ring {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.progress-track,
.progress-value {
  fill: none;
  stroke-width: 3;
}

.progress-track {
  stroke: var(--line);
}

.progress-value {
  stroke: var(--gold);
  stroke-dasharray: 214;
  stroke-dashoffset: 214;
  transition: stroke-dashoffset 0.08s ease-out;
}

.progress-panel.is-done .progress-value {
  stroke: var(--green);
}

.progress-percent {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
}

.progress-panel.is-done .progress-percent {
  color: var(--green);
}

.progress-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.progress-copy strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.progress-copy span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-copy em {
  min-height: 16px;
  color: rgba(255, 215, 0, 0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  font-style: normal;
}

.tool-form {
  display: grid;
  gap: 18px;
}

.input-block {
  display: grid;
  gap: 10px;
}

.input-block label,
.tutorial-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.textarea-wrap {
  position: relative;
}

.textarea-wrap textarea {
  width: 100%;
  min-height: 170px;
  display: block;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--bg);
  color: var(--text);
  padding: 16px 16px 34px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.65;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  -webkit-text-security: disc;
  text-security: disc;
}

.textarea-wrap textarea::placeholder {
  color: #454552;
  -webkit-text-security: none;
  text-security: none;
}

.textarea-wrap textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.08), inset 0 0 24px rgba(255, 215, 0, 0.03);
}

.char-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #55556a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  user-select: none;
}

.execute-button {
  position: relative;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: background 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.execute-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 46%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-18deg);
}

.execute-button:hover {
  background: #ffe033;
  transform: translateY(-1px);
}

.execute-button:hover::after {
  animation: sweepBtn 0.55s ease forwards;
}

.execute-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.execute-button svg {
  position: relative;
  z-index: 1;
  fill: currentColor;
}

.execute-button span {
  position: relative;
  z-index: 1;
}

.execute-button.is-processing svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  animation: spin 0.8s linear infinite;
}

.tutorial-block {
  margin-top: 38px;
}

.tutorial-label {
  margin-bottom: 12px;
}

.tutorial-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 215, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.04) 1px, transparent 1px),
    var(--bg-2);
  background-size: 28px 28px;
  transition: border-color 0.2s ease;
}

.tutorial-frame:hover {
  border-color: rgba(255, 215, 0, 0.8);
}

.tutorial-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.tutorial-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.tutorial-empty span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: background 0.2s ease, color 0.2s ease;
}

.tutorial-empty svg {
  fill: currentColor;
}

.tutorial-frame:hover .tutorial-empty span {
  background: var(--gold);
  color: var(--bg);
}

.tutorial-empty strong {
  font-size: 0.72rem;
}

.tool-footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(12, 12, 16, 0.86);
  backdrop-filter: blur(16px);
}

.footer-inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner nav {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  font-weight: 800;
}

.not-found-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 24px 48px;
}

.not-found-panel {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 32px;
}

.not-found-panel h1 {
  margin: 22px 0 10px;
  font-family: var(--font-display);
  font-size: 2.2rem;
}

.not-found-panel p {
  margin: 0;
  color: var(--muted);
}

@keyframes loaderRing {
  from {
    transform: scale(0.65);
    opacity: 0.55;
  }
  to {
    transform: scale(1.28);
    opacity: 0;
  }
}

@keyframes loaderPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes scanlineMove {
  to {
    transform: translateY(100vh);
  }
}

@keyframes sideScan {
  to {
    transform: translateY(100vh);
  }
}

@keyframes pointFloat {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  22% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translateY(-56px);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  20% {
    opacity: 0.72;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-60px);
  }
}

@keyframes pulseRing {
  from {
    transform: scale(0.6);
    opacity: 0.58;
  }
  to {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.32), 0 0 80px rgba(255, 215, 0, 0.08);
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sweepBtn {
  from {
    left: -80%;
  }
  to {
    left: 132%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 921px) {
  .tool-main[data-tool-key="clothing-copier"] .code-titlebar {
    min-height: 30px;
  }

  .tool-main[data-tool-key="clothing-copier"] .code-window pre {
    max-height: 84px;
    padding: 10px 18px;
    overflow-y: hidden;
    font-size: 0.62rem;
    line-height: 1.38;
  }

  .tool-main[data-tool-key="clothing-copier"] .side-badges {
    margin-top: 18px;
  }
}

@media (max-width: 1080px) {
  .tool-frame {
    grid-template-columns: minmax(360px, 40%) minmax(0, 1fr);
  }

  .tool-side {
    padding: 34px;
  }

  .tool-action {
    padding: 44px 32px;
  }
}

@media (max-width: 920px) {
  .tool-shell {
    width: min(100% - 32px, 720px);
  }

  .header-nav {
    display: none;
  }

  .header-action {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .tool-frame {
    display: block;
    min-height: calc(100vh - 64px);
  }

  .tool-side {
    display: none;
  }

  .tool-action {
    min-height: calc(100vh - 64px);
    display: block;
    padding: 92px 24px 52px;
  }

  .mobile-back {
    display: inline-flex;
    margin-bottom: 28px;
  }

  .action-panel {
    width: min(100%, 640px);
    margin: 0 auto;
  }

  .footer-inner {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 0;
  }
}

@media (max-width: 560px) {
  .tool-shell {
    width: min(100% - 28px, 520px);
  }

  .brand-name {
    font-size: 1.14rem;
  }

  .brand-mark {
    width: 30px;
    height: 29px;
  }

  .header-inner {
    min-height: 60px;
  }

  .header-action {
    display: none;
  }

  .tool-main {
    padding-top: 60px;
  }

  .tool-action {
    min-height: calc(100vh - 60px);
    padding: 74px 18px 42px;
  }

  .action-panel h2 {
    margin-bottom: 24px;
  }

  .progress-panel {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .progress-ring-wrap,
  .progress-ring {
    width: 64px;
    height: 64px;
  }

  .progress-percent {
    font-size: 0.76rem;
  }

  .progress-copy strong {
    font-size: 0.98rem;
  }

  .progress-copy span {
    white-space: normal;
  }

  .textarea-wrap textarea {
    min-height: 160px;
    font-size: 0.78rem;
  }

  .execute-button {
    min-height: 50px;
    font-size: 0.72rem;
  }

  .footer-inner nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 920px) and (max-height: 760px) {
  .tool-action {
    padding: 70px 18px 24px;
  }

  .mobile-back {
    margin-bottom: 16px;
  }

  .action-panel h2 {
    margin-bottom: 18px;
    font-size: 1.45rem;
  }

  .tool-form {
    gap: 14px;
  }

  .textarea-wrap textarea {
    min-height: 126px;
  }

  .execute-button {
    min-height: 48px;
  }

  .tutorial-block {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* RBTools red public tool skin */
:root {
  --gold: #e23b46;
  --amber: #ff6a72;
  --font-sans: "Inter", Arial, sans-serif;
  --font-display: "Inter", Arial, sans-serif;
}

.brand-mark,
.loader-bolt {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transform: none;
  filter: none;
  box-shadow: none;
}

.brand-name {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 750;
  transform: none;
}

.tool-bg-grid,
.side-grid,
.progress-bg {
  background-image:
    linear-gradient(rgba(226, 59, 70, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 59, 70, 0.05) 1px, transparent 1px);
}

.tool-bg-scan,
.side-scan {
  background: linear-gradient(90deg, transparent, rgba(226, 59, 70, 0.5), transparent);
}

.execute-button {
  color: #ffffff;
}

.execute-button:hover {
  background: #c92b36;
}

/* Keep the tool page on the same red, white, and charcoal system as RBTools. */
body.tool-body {
  --bg: #f5f5f6;
  --bg-2: #ffffff;
  --bg-3: #f5f5f6;
  --panel: #ffffff;
  --line: #d9d9dd;
  --line-soft: #d9d9dd;
  --text: #171719;
  --muted: #66666d;
  --soft: #35353a;
  --gold: #b4232c;
  --amber: #86141c;
  --green: #198754;
  --red: #b4232c;
  --red-dark: #86141c;
  --red-soft: #f8e9e9;
  --blue: #2563eb;
  background: var(--bg);
  color: var(--text);
}

body.tool-body .page-loader {
  background: var(--red);
}

body.tool-body .tool-bg {
  background: var(--bg);
}

body.tool-body .tool-bg-grid,
body.tool-body .tool-bg-noise,
body.tool-body .tool-bg-scan,
body.tool-body .tool-bg-dots {
  display: none;
}

body.tool-body .tool-header {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .97);
  color: var(--text);
  backdrop-filter: none;
}

body.tool-body .tool-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .98);
}

body.tool-body .tool-header .brand-mark,
body.tool-body .tool-footer .brand-mark {
  background: var(--red);
  color: #fff;
}

body.tool-body .tool-header .brand-name,
body.tool-body .tool-footer .brand-name {
  color: var(--text);
}

body.tool-body .tool-header .header-nav {
  color: var(--muted);
}

body.tool-body .tool-header .header-nav a:hover,
body.tool-body .tool-footer a:hover,
body.tool-body .back-link:hover {
  color: var(--red);
}

body.tool-body .tool-main {
  background: var(--bg);
}

body.tool-body .tool-frame {
  background: var(--bg);
}

body.tool-body .tool-side {
  background: var(--red);
  border-right: 0;
  color: #fff;
}

body.tool-body .tool-side .side-grid,
body.tool-body .tool-side .side-scan,
body.tool-body .tool-side .side-particles,
body.tool-body .tool-side .corner {
  display: none;
}

body.tool-body .tool-side .back-link,
body.tool-body .tool-side .tool-kicker,
body.tool-body .tool-side .tool-description,
body.tool-body .tool-side .feature-row,
body.tool-body .tool-side .side-badges span {
  color: rgba(255, 255, 255, .82);
}

body.tool-body .tool-side .tool-icon-wrap {
  animation: none;
  box-shadow: none;
}

body.tool-body .tool-side .tool-icon-wrap::before {
  display: none;
}

body.tool-body .tool-side .tool-icon {
  border-color: rgba(255, 255, 255, .78);
}

body.tool-body .tool-side .tool-icon svg {
  stroke: #fff;
}

body.tool-body .tool-side .tool-title {
  color: #fff;
}

body.tool-body .tool-side .feature-row span {
  background: #fff;
  box-shadow: none;
}

body.tool-body .tool-side .side-badges span {
  border-color: rgba(255, 255, 255, .42);
}

body.tool-body .tool-action {
  background: #fff;
  border-left: 1px solid var(--line);
}

body.tool-body .tool-action .back-link,
body.tool-body .tool-action .tool-kicker,
body.tool-body .tool-action .input-block label,
body.tool-body .tool-action .tutorial-label {
  color: var(--red);
}

body.tool-body .action-panel h2 {
  color: var(--text);
}

body.tool-body .notice,
body.tool-body .progress-panel {
  background: var(--bg);
  border-color: var(--line);
}

body.tool-body .notice span,
body.tool-body .progress-copy span,
body.tool-body .progress-copy em {
  color: var(--muted);
}

body.tool-body .progress-bg {
  opacity: .035;
}

body.tool-body .progress-track {
  stroke: var(--line);
}

body.tool-body .progress-value,
body.tool-body .progress-percent {
  stroke: var(--red);
  color: var(--red);
}

body.tool-body .textarea-wrap textarea {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

body.tool-body .textarea-wrap textarea::placeholder {
  color: #8b8b93;
}

body.tool-body .textarea-wrap textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(180, 35, 44, .1);
}

body.tool-body .char-count {
  color: var(--muted);
}

body.tool-body .execute-button {
  background: var(--red);
  color: #fff;
}

body.tool-body .execute-button:hover {
  background: var(--red-dark);
}

body.tool-body .tutorial-frame {
  border-color: var(--line);
  background: var(--bg);
}

body.tool-body .tutorial-frame:hover {
  border-color: var(--red);
}

body.tool-body .tool-footer {
  border-top-color: var(--line);
  background: #fff;
  backdrop-filter: none;
}

body.tool-body .tool-footer p,
body.tool-body .tool-footer nav {
  color: var(--muted);
}

@media (max-width: 920px) {
  body.tool-body .tool-action {
    border-left: 0;
    background: #fff;
  }
}

/* Centered single-column tool layout. */
body.tool-body .tool-frame {
  display: block;
  min-height: calc(100vh - 64px);
  background: #fff;
}

body.tool-body .tool-side {
  min-height: 0;
  display: block;
  overflow: visible;
  padding: 64px 24px 34px;
  border: 0;
  background: #fff;
  color: var(--text);
}

body.tool-body .side-content {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

body.tool-body .tool-side .side-back {
  margin: 0 0 36px;
  color: var(--muted);
}

body.tool-body .tool-side .tool-icon-wrap {
  margin: 0 auto 24px;
}

body.tool-body .tool-side .tool-icon {
  border-color: var(--red);
  background: var(--red-soft);
}

body.tool-body .tool-side .tool-icon svg {
  stroke: var(--red);
}

body.tool-body .tool-side .tool-kicker {
  color: var(--red);
}

body.tool-body .tool-side .tool-title {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 4rem);
}

body.tool-body .tool-side .tool-title span {
  display: inline;
}

body.tool-body .tool-side .tool-title span + span::before {
  content: " ";
}

body.tool-body .tool-side .tool-description {
  max-width: 680px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

body.tool-body .tool-side .feature-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin: 0;
}

body.tool-body .tool-side .feature-row {
  color: var(--muted);
}

body.tool-body .tool-side .feature-row span {
  background: var(--red);
}

body.tool-body .tool-side .side-badges {
  justify-content: center;
  margin-top: 28px;
}

body.tool-body .tool-side .side-badges span {
  border-color: var(--line);
  color: var(--muted);
}

body.tool-body .tool-action {
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 96px;
  border: 0;
  background: #fff;
}

body.tool-body .mobile-back {
  display: none;
}

body.tool-body .action-panel {
  width: min(600px, 100%);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  background: #fff;
  animation: none;
}

body.tool-body .action-panel > .tool-kicker,
body.tool-body .action-panel > h2 {
  text-align: center;
}

body.tool-body .action-panel > h2 {
  margin-bottom: 28px;
}

body.tool-body .textarea-wrap textarea {
  min-height: 190px;
}

@media (max-width: 920px) {
  body.tool-body .tool-side {
    display: block;
    padding: 44px 20px 28px;
  }

  body.tool-body .tool-action {
    min-height: 0;
    display: flex;
    padding: 22px 20px 64px;
  }
}

@media (max-width: 560px) {
  body.tool-body .tool-side {
    padding-top: 34px;
  }

  body.tool-body .tool-side .side-back {
    margin-bottom: 28px;
  }

  body.tool-body .tool-side .tool-title {
    font-size: 2.35rem;
  }

  body.tool-body .tool-side .feature-list {
    display: grid;
    justify-content: stretch;
    text-align: left;
  }

  body.tool-body .action-panel {
    padding: 24px 18px;
  }

  body.tool-body .textarea-wrap textarea {
    min-height: 170px;
  }
}

/* Match the public red-night landing theme. */
body.tool-body {
  --bg: #0d0204;
  --bg-2: #160609;
  --bg-3: #211014;
  --panel: #18070a;
  --line: rgba(239, 112, 120, .28);
  --line-soft: rgba(239, 112, 120, .24);
  --text: #fff1f1;
  --muted: #b49a9f;
  --soft: #e5cfd2;
  --gold: #e12b35;
  --amber: #ff7e86;
  --green: #72d49c;
  --red: #e12b35;
  --red-dark: #a91722;
  --red-soft: #321014;
  --font: "Inter", Arial, sans-serif;
  background: #0d0204;
  color: var(--text);
  font-family: var(--font);
}

body.tool-body .tool-bg {
  display: block;
  background:
    radial-gradient(circle at 50% 40%, rgba(225, 43, 53, .18), transparent 42%),
    #0d0204;
}

body.tool-body .tool-bg-grid,
body.tool-body .tool-bg-noise,
body.tool-body .tool-bg-scan,
body.tool-body .tool-bg-dots {
  display: block;
}

body.tool-body .tool-bg-grid {
  background-image:
    linear-gradient(rgba(225, 43, 53, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 43, 53, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: gridDrift 22s linear infinite;
}

body.tool-body .tool-bg-noise {
  opacity: .035;
}

body.tool-body .tool-bg-scan {
  background: linear-gradient(90deg, transparent, rgba(255, 126, 134, .72), transparent);
}

body.tool-body .tool-bg-dots span {
  background: #ff7e86;
  box-shadow: 0 0 14px rgba(255, 126, 134, .6);
}

body.tool-body .tool-header {
  border-bottom-color: rgba(239, 112, 120, .28);
  background: rgba(13, 2, 4, .82);
  color: var(--text);
  backdrop-filter: blur(14px);
}

body.tool-body .tool-header.is-scrolled {
  border-bottom-color: rgba(239, 112, 120, .42);
  background: rgba(13, 2, 4, .96);
}

body.tool-body .tool-header .brand-mark,
body.tool-body .tool-footer .brand-mark {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 24px rgba(225, 43, 53, .28);
}

body.tool-body .tool-header .brand-name,
body.tool-body .tool-footer .brand-name,
body.tool-body .tool-header .header-nav {
  color: var(--text);
}

body.tool-body .tool-header .header-nav a,
body.tool-body .tool-footer p,
body.tool-body .tool-footer nav {
  color: var(--muted);
}

body.tool-body .tool-header .header-nav a:hover,
body.tool-body .tool-footer a:hover,
body.tool-body .back-link:hover {
  color: #ff9da3;
}

body.tool-body .tool-main,
body.tool-body .tool-frame,
body.tool-body .tool-action {
  background: transparent;
}

body.tool-body .tool-side {
  background: rgba(24, 7, 10, .9);
  color: var(--text);
  border-bottom: 1px solid rgba(239, 112, 120, .24);
}

body.tool-body .tool-side .side-back,
body.tool-body .tool-side .tool-description,
body.tool-body .tool-side .feature-row,
body.tool-body .tool-side .side-badges span {
  color: var(--muted);
}

body.tool-body .tool-side .tool-icon {
  border-color: rgba(255, 126, 134, .74);
  background: rgba(225, 43, 53, .12);
}

body.tool-body .tool-side .tool-icon svg,
body.tool-body .tool-side .tool-kicker,
body.tool-body .tool-side .feature-row span {
  color: #ff7e86;
  stroke: #ff7e86;
}

body.tool-body .tool-side .tool-title {
  color: var(--text);
  font-family: var(--font);
}

body.tool-body .tool-side .side-badges span {
  border-color: rgba(239, 112, 120, .28);
}

body.tool-body .tool-action {
  padding-top: 34px;
}

body.tool-body .action-panel {
  border-color: rgba(239, 112, 120, .28);
  background: rgba(22, 6, 9, .9);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

body.tool-body .action-panel h2,
body.tool-body .action-panel .tool-kicker,
body.tool-body .action-panel .input-block label,
body.tool-body .action-panel .tutorial-label {
  font-family: var(--font);
}

body.tool-body .action-panel h2 {
  color: var(--text);
}

body.tool-body .action-panel .tool-kicker,
body.tool-body .action-panel .input-block label,
body.tool-body .action-panel .tutorial-label {
  color: #ff7e86;
}

body.tool-body .notice,
body.tool-body .progress-panel,
body.tool-body .tutorial-frame {
  border-color: rgba(239, 112, 120, .28);
  background: rgba(13, 2, 4, .72);
}

body.tool-body .notice span,
body.tool-body .progress-copy span,
body.tool-body .char-count {
  color: var(--muted);
}

body.tool-body .progress-track {
  stroke: rgba(239, 112, 120, .24);
}

body.tool-body .progress-value,
body.tool-body .progress-percent {
  stroke: #ff7e86;
  color: #ff7e86;
}

body.tool-body .textarea-wrap textarea {
  border-color: rgba(239, 112, 120, .3);
  background: #0d0204;
  color: var(--text);
  font-family: var(--font);
}

body.tool-body .textarea-wrap textarea::placeholder {
  color: #806b70;
}

body.tool-body .textarea-wrap textarea:focus {
  border-color: #ff7e86;
  box-shadow: 0 0 0 3px rgba(225, 43, 53, .14);
}

body.tool-body .execute-button {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 30px rgba(225, 43, 53, .18);
  font-family: var(--font);
}

body.tool-body .execute-button:hover {
  background: #ff515a;
}

body.tool-body .tool-footer {
  border-top-color: rgba(239, 112, 120, .28);
  background: #0d0204;
  backdrop-filter: none;
}

body.tool-body .cursor-trail {
  mix-blend-mode: screen;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, -64px -64px; }
}

/* Keep the complete tool workflow inside one desktop viewport. */
body.tool-body .tool-main {
  padding-top: 64px;
}

body.tool-body .tool-side {
  padding: 28px 24px 18px;
}

body.tool-body .tool-side .side-back {
  margin-bottom: 16px;
}

body.tool-body .tool-side .tool-icon-wrap {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

body.tool-body .tool-side .tool-icon {
  width: 48px;
  height: 48px;
}

body.tool-body .tool-side .tool-icon svg {
  width: 24px;
  height: 24px;
}

body.tool-body .tool-side .tool-kicker {
  margin-bottom: 5px;
  font-size: .68rem;
}

body.tool-body .tool-side .tool-title {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1;
}

body.tool-body .tool-side .tool-description {
  max-width: 700px;
  margin-bottom: 12px;
  font-size: .86rem;
  line-height: 1.45;
}

body.tool-body .tool-side .feature-list {
  gap: 8px 20px;
}

body.tool-body .tool-side .feature-row {
  gap: 8px;
  font-size: .72rem;
}

body.tool-body .tool-side .feature-row span {
  width: 5px;
  height: 5px;
}

body.tool-body .tool-side .side-badges {
  display: none;
}

body.tool-body .tool-action {
  padding: 16px 24px 42px;
}

body.tool-body .action-panel {
  padding: 20px 24px;
}

body.tool-body .action-panel > h2 {
  margin-bottom: 16px;
  font-size: 1.55rem;
}

body.tool-body .tool-form {
  gap: 12px;
}

body.tool-body .input-block {
  gap: 7px;
}

body.tool-body .textarea-wrap textarea {
  min-height: 122px;
  padding: 12px 14px 30px;
  font-size: .78rem;
  line-height: 1.45;
}

body.tool-body .execute-button {
  min-height: 44px;
}

body.tool-body .tutorial-block {
  display: none;
}

@media (max-width: 920px) {
  body.tool-body .tool-main {
    padding-top: 60px;
  }

  body.tool-body .tool-side {
    padding: 26px 20px 16px;
  }

  body.tool-body .tool-action {
    padding: 14px 20px 34px;
  }
}

@media (max-width: 560px) {
  body.tool-body .tool-side {
    padding: 22px 16px 14px;
  }

  body.tool-body .tool-side .tool-title {
    font-size: 2rem;
  }

  body.tool-body .tool-action {
    padding: 12px 14px 28px;
  }

  body.tool-body .action-panel {
    padding: 18px 16px;
  }

  body.tool-body .textarea-wrap textarea {
    min-height: 112px;
  }
}
