:root {
  color-scheme: dark;
  /* base surfaces */
  --bg: #061512;
  --bg-glow-1: rgba(73, 230, 167, 0.08);
  --bg-glow-2: rgba(255, 69, 168, 0.09);
  --header-bg: rgba(6, 21, 18, 0.88);
  --panel: #0b211d;
  --panel-strong: #0e3028;
  --surface: rgba(16, 52, 44, 0.92);
  --surface-top: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(8, 26, 23, 0.72);
  --surface-3: rgba(5, 17, 15, 0.34);
  --field: #102c28;
  --code-bg: #020a09;
  --canvas-bg: #03100e;
  /* lines + text */
  --line: rgba(141, 255, 222, 0.18);
  --line-soft: rgba(141, 255, 222, 0.14);
  --text: #effffb;
  --muted: #a6c7be;
  /* brand accents */
  --green: #49e6a7;
  --green-deep: #0c7d5b;
  --green-ink: #04120f;
  --magenta: #ff45a8;
  --magenta-soft: #ff8bc8;
  --magenta-ink: #150611;
  --cyan: #56d8ff;
  --amber: #ffd166;
  --danger: #ff6b7a;
  /* effects */
  --accent-glow: rgba(73, 230, 167, 0.28);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  --elev-1: 0 4px 14px rgba(0, 0, 0, 0.28);
  --elev-2: 0 18px 50px rgba(0, 0, 0, 0.42);
  --ring: 0 0 0 3px rgba(73, 230, 167, 0.28);
  --ring-magenta: 0 0 0 3px rgba(255, 69, 168, 0.26);
  --rain-opacity: 0.58;
  /* radii */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eaf1ee;
  --bg-glow-1: rgba(20, 160, 110, 0.12);
  --bg-glow-2: rgba(224, 42, 144, 0.08);
  --header-bg: rgba(255, 255, 255, 0.86);
  --panel: #ffffff;
  --panel-strong: #f3f8f6;
  --surface: rgba(255, 255, 255, 0.97);
  --surface-top: rgba(255, 255, 255, 0.7);
  --surface-2: #ffffff;
  --surface-3: rgba(15, 70, 56, 0.045);
  --field: #ffffff;
  /* code + canvas stay dark — read better as terminal/preview panels */
  --line: rgba(15, 70, 56, 0.16);
  --line-soft: rgba(15, 70, 56, 0.1);
  --text: #0c241e;
  --muted: #587a70;
  --green: #11a06e;
  --green-deep: #0c7d5b;
  --green-ink: #ffffff;
  --magenta: #d92a8e;
  --magenta-soft: #b83a82;
  --magenta-ink: #ffffff;
  --cyan: #1487b3;
  --amber: #b5781a;
  --danger: #d23b4a;
  --accent-glow: rgba(17, 160, 110, 0.22);
  --shadow: 0 18px 48px rgba(20, 60, 50, 0.12);
  --elev-1: 0 4px 14px rgba(20, 60, 50, 0.08);
  --elev-2: 0 16px 40px rgba(20, 60, 50, 0.12);
  --ring: 0 0 0 3px rgba(17, 160, 110, 0.24);
  --ring-magenta: 0 0 0 3px rgba(217, 42, 142, 0.22);
  --rain-opacity: 0.1;
}

* {
  box-sizing: border-box;
}

html {
  transition: background-color 300ms ease;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, var(--bg-glow-1), transparent 34%),
    linear-gradient(315deg, var(--bg-glow-2), transparent 32%),
    var(--bg);
  color: var(--text);
  transition: background-color 300ms ease, color 300ms ease;
}

.gcode-rain {
  position: fixed;
  inset: -20vh 0 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--rain-opacity);
  transform: translateY(var(--scroll-shift, 0px));
}

.gcode-rain span {
  position: absolute;
  top: -18vh;
  color: rgba(86, 216, 255, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.82rem, 1.4vw, 1.08rem);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(73, 230, 167, 0.08);
  animation: gcodeRain 18s linear infinite;
}

.gcode-rain span:nth-child(1) { left: 5%; animation-delay: -2s; }
.gcode-rain span:nth-child(2) { left: 18%; animation-delay: -9s; color: rgba(73, 230, 167, 0.08); }
.gcode-rain span:nth-child(3) { left: 32%; animation-delay: -5s; }
.gcode-rain span:nth-child(4) { left: 48%; animation-delay: -12s; color: rgba(255, 69, 168, 0.075); }
.gcode-rain span:nth-child(5) { left: 63%; animation-delay: -7s; }
.gcode-rain span:nth-child(6) { left: 74%; animation-delay: -15s; color: rgba(73, 230, 167, 0.075); }
.gcode-rain span:nth-child(7) { left: 86%; animation-delay: -4s; }
.gcode-rain span:nth-child(8) { left: 93%; animation-delay: -11s; color: rgba(255, 69, 168, 0.065); }

.button-link,
button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(255, 69, 168, 0.22));
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--magenta-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.1;
}

.brand-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.1;
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 44, 40, 0.72);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 20px var(--green);
}

.header-status.expired .status-dot {
  background: var(--danger);
  box-shadow: 0 0 20px var(--danger);
}

.header-status.paid .status-dot {
  background: var(--magenta);
  box-shadow: 0 0 20px var(--magenta);
}

.compact-button {
  min-height: 40px;
  padding-inline: 14px;
}

.membership-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin: 18px clamp(16px, 3vw, 40px) 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 48, 40, 0.78);
  box-shadow: var(--shadow);
}

.membership-strip h2 {
  margin-bottom: 4px;
}

.membership-strip p {
  margin-bottom: 0;
  color: var(--muted);
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.price-row span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 69, 168, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 69, 168, 0.08);
  font-weight: 800;
  white-space: nowrap;
}

.price-row .best-value-pill {
  color: #04120f;
  border-color: rgba(73, 230, 167, 0.72);
  background: linear-gradient(135deg, var(--green), #8bffd4);
  box-shadow: 0 0 24px rgba(73, 230, 167, 0.2);
}

.landing-page {
  padding: 26px clamp(16px, 3vw, 40px) 10px;
}

.hero-section {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 4% -4%;
  z-index: -1;
  opacity: 0.46;
  background:
    linear-gradient(90deg, transparent 49%, rgba(73, 230, 167, 0.12) 50%, transparent 51%) 0 0 / 84px 84px,
    linear-gradient(0deg, transparent 49%, rgba(86, 216, 255, 0.08) 50%, transparent 51%) 0 0 / 84px 84px;
  mask-image: radial-gradient(circle at 72% 45%, #000 0 34%, transparent 70%);
}

.hero-copy {
  max-width: 840px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.96;
}

.ai-summary {
  max-width: 760px;
  margin-bottom: 16px;
  color: #e3fff8;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.72;
}

.ai-summary strong {
  color: var(--green);
  font-weight: 900;
}

.ai-summary strong:nth-of-type(3) {
  color: var(--magenta-soft);
}

.hero-lead {
  max-width: 740px;
  margin-bottom: 22px;
  color: #d0eee7;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-badges span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(86, 216, 255, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(86, 216, 255, 0.07);
  font-weight: 850;
}

.hero-visual {
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.hero-stage {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glow-x: 50%;
  --glow-y: 50%;
  position: relative;
  width: min(560px, 84vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 180ms ease-out;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(86, 216, 255, 0.22), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(255, 69, 168, 0.16), transparent 38%),
    radial-gradient(circle at 38% 68%, rgba(73, 230, 167, 0.14), transparent 36%);
  filter: blur(2px);
  opacity: 0.9;
}

.hero-stage::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  left: var(--glow-x);
  top: var(--glow-y);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(86, 216, 255, 0.24), rgba(73, 230, 167, 0.12) 38%, transparent 68%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.hero-particle {
  position: absolute;
  z-index: 5;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(86, 216, 255, 0.85), 0 0 26px rgba(73, 230, 167, 0.28);
  transform: translate(-50%, -50%);
  animation: heroSpark 900ms ease-out forwards;
}

.hero-gcode-burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 850;
}

.hero-gcode-burst span {
  position: absolute;
  top: -18%;
  color: rgba(239, 255, 251, 0.72);
  text-shadow: 0 0 22px rgba(86, 216, 255, 0.38);
  animation: gcodeAssemble 3.6s cubic-bezier(.2,.8,.2,1) forwards;
}

.hero-gcode-burst span:nth-child(1) { left: 4%; animation-delay: 0.08s; }
.hero-gcode-burst span:nth-child(2) { left: 28%; animation-delay: 0.2s; color: rgba(73, 230, 167, 0.78); }
.hero-gcode-burst span:nth-child(3) { left: 56%; animation-delay: 0.32s; }
.hero-gcode-burst span:nth-child(4) { left: 74%; animation-delay: 0.12s; color: rgba(255, 69, 168, 0.78); }
.hero-gcode-burst span:nth-child(5) { left: 18%; animation-delay: 0.42s; color: rgba(86, 216, 255, 0.76); }
.hero-gcode-burst span:nth-child(6) { left: 62%; animation-delay: 0.52s; color: rgba(73, 230, 167, 0.76); }

.hero-toolpath {
  position: absolute;
  inset: 4%;
  z-index: 3;
  overflow: visible;
  filter: url(#pathGlow);
  opacity: 0;
  animation: toolpathLayer 4s ease forwards;
}

.hero-path-main,
.hero-path-ghost {
  fill: none;
  stroke: url(#toolpathGradient);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 920;
  stroke-dashoffset: 920;
  animation: drawToolpath 2.4s 0.75s ease-out forwards, dissolvePath 1.1s 2.8s ease forwards;
}

.hero-path-ghost {
  stroke-width: 2.2;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  opacity: 0.42;
  animation-delay: 1s, 2.85s;
}

.hero-cutter {
  opacity: 0;
  filter: drop-shadow(0 0 16px rgba(73, 230, 167, 0.86));
  animation: cutterReveal 3.2s 0.75s ease forwards;
}

.circuit-lines {
  position: absolute;
  inset: 11%;
  z-index: 1;
  border-radius: 50%;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent 12%, rgba(73, 230, 167, 0.2) 12% 13%, transparent 13% 48%, rgba(86, 216, 255, 0.18) 48% 49%, transparent 49%),
    linear-gradient(0deg, transparent 18%, rgba(255, 69, 168, 0.16) 18% 19%, transparent 19% 62%, rgba(73, 230, 167, 0.16) 62% 63%, transparent 63%);
  mask-image: radial-gradient(circle, transparent 0 35%, #000 35% 100%);
  animation: circuitPulse 5.5s ease-in-out infinite;
}

.cnc-orbit {
  position: relative;
  z-index: 2;
  width: min(520px, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  opacity: 0;
  animation: logoReveal 4s cubic-bezier(.2,.8,.2,1) forwards, float3d 7s 4s ease-in-out infinite;
}

.cnc-orbit::before,
.cnc-orbit::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(73, 230, 167, 0.36);
  border-radius: 50%;
  transform: rotateX(68deg) rotateZ(22deg);
  box-shadow: 0 0 50px rgba(73, 230, 167, 0.13);
}

.cnc-orbit::after {
  inset: 16%;
  border-color: rgba(255, 69, 168, 0.42);
  transform: rotateX(62deg) rotateZ(-18deg);
}

.cnc-orbit img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  transform: translateZ(44px);
  filter:
    drop-shadow(0 0 22px rgba(86, 216, 255, 0.28))
    drop-shadow(0 0 34px rgba(73, 230, 167, 0.22))
    drop-shadow(0 30px 58px rgba(255, 69, 168, 0.28));
}

.toolpath-line,
.toolpath-node {
  position: absolute;
  display: block;
}

.toolpath-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--magenta), var(--green), transparent);
  box-shadow: 0 0 24px rgba(255, 69, 168, 0.38);
}

.line-a {
  width: 62%;
  top: 26%;
  transform: rotate(-12deg) translateZ(70px);
}

.line-b {
  width: 54%;
  bottom: 24%;
  transform: rotate(18deg) translateZ(80px);
}

.toolpath-node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 28px rgba(73, 230, 167, 0.85);
}

.node-a {
  top: 20%;
  left: 24%;
}

.node-b {
  right: 18%;
  top: 44%;
  background: var(--magenta);
}

.node-c {
  bottom: 20%;
  left: 40%;
}

.seo-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 20px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
}

.seo-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.1;
}

.seo-section p {
  color: var(--muted);
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-grid article {
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 48, 40, 0.58);
}

.feature-grid h3 {
  margin: 0 0 10px;
  color: var(--magenta-soft);
  font-size: 1.35rem;
}

.feature-grid p {
  margin-bottom: 0;
}

.seo-band {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(141, 255, 222, 0.16);
  background: rgba(3, 16, 14, 0.45);
}

.seo-heading {
  max-width: 900px;
  margin-bottom: 18px;
}

.seo-heading h2,
.seo-split h2,
.seo-cta h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.6vw, 3.4rem);
  line-height: 1.06;
}

.seo-heading p,
.seo-split p,
.seo-cta p {
  color: #d0eee7;
  line-height: 1.72;
}

.benefit-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.benefit-grid article,
.workflow-grid article {
  min-height: 190px;
  padding: 16px;
  border: 1px solid rgba(166, 199, 190, 0.16);
  border-radius: var(--radius);
  background: rgba(6, 21, 18, 0.72);
}

.benefit-grid h3,
.workflow-grid h3 {
  margin: 0 0 8px;
}

.benefit-grid p,
.workflow-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.seo-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  align-items: start;
}

.seo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seo-list span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 69, 168, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 69, 168, 0.08);
  font-weight: 850;
}

.workflow-grid article strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #04120f;
  background: var(--green);
  font-size: 1.15rem;
  font-weight: 950;
}

.seo-cta {
  text-align: center;
}

.seo-article h1 {
  max-width: 980px;
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(2.25rem, 5.2vw, 5rem);
  line-height: 1;
}

.seo-cta p {
  max-width: 850px;
  margin: 0 auto 18px;
}

.text-link {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.text-link:hover {
  color: var(--cyan);
}

.keyword-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.keyword-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(86, 216, 255, 0.24);
  border-radius: 999px;
  color: #e8fffa;
  background: rgba(86, 216, 255, 0.08);
  font-size: 0.95rem;
  font-weight: 850;
  text-decoration: none;
}

.keyword-nav a:hover {
  border-color: rgba(255, 69, 168, 0.48);
  color: #fff;
  background: rgba(255, 69, 168, 0.12);
}

.sample-code {
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(86, 216, 255, 0.22);
  border-radius: var(--radius);
  color: #dffdf7;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 1px rgba(73, 230, 167, 0.05);
}

.sample-code code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-list p {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgba(73, 230, 167, 0.18);
  border-radius: var(--radius);
  color: #d6f7ef;
  background: rgba(73, 230, 167, 0.06);
  line-height: 1.58;
}

.notice-list.warning p {
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.08);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-grid details {
  padding: 16px;
  border: 1px solid rgba(166, 199, 190, 0.16);
  border-radius: var(--radius);
  background: rgba(6, 21, 18, 0.72);
}

.faq-grid summary {
  color: var(--text);
  font-weight: 950;
  cursor: pointer;
}

.faq-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.reviews-section .seo-heading strong {
  color: var(--green);
}

.review-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 69, 168, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 69, 168, 0.06);
}

.review-form textarea {
  resize: vertical;
}

.review-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.review-status.success {
  color: var(--green);
}

.review-status.error {
  color: var(--danger);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-card {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(166, 199, 190, 0.16);
  border-radius: var(--radius);
  background: rgba(6, 21, 18, 0.72);
}

.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-card strong,
.review-card span,
.review-card time {
  display: block;
}

.review-card span,
.review-card time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.review-card p {
  margin: 0;
  color: #d0eee7;
  line-height: 1.62;
}

.review-stars {
  color: var(--amber);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.review-source {
  align-self: start;
  min-width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(86, 216, 255, 0.2);
  border-radius: 999px;
  color: var(--cyan) !important;
  background: rgba(86, 216, 255, 0.08);
}

.review-source.real {
  color: #04120f !important;
  background: var(--green);
}

.program-area.locked {
  display: none;
}

.membership-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 8, 7, 0.72);
  backdrop-filter: blur(8px);
}

.membership-modal.show {
  display: flex;
}

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 8, 7, 0.74);
  backdrop-filter: blur(10px);
}

.auth-modal.show {
  display: flex;
}

.profile-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 28;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 8, 7, 0.74);
  backdrop-filter: blur(10px);
}

.profile-modal.show {
  display: flex;
}

.auth-dialog {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 48, 40, 0.98), rgba(8, 28, 24, 0.98));
  box-shadow: var(--shadow);
}

.profile-dialog {
  width: min(940px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 48, 40, 0.98), rgba(8, 28, 24, 0.98));
  box-shadow: var(--shadow);
}

.profile-form {
  margin-top: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tab {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.auth-tab.selected {
  color: #04120f;
  background: var(--green);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.google-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.google-button::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 9px;
  border-radius: 50%;
  color: #04120f;
  background: #ffffff;
  font-weight: 950;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.membership-dialog {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 48, 40, 0.98), rgba(8, 28, 24, 0.98));
  box-shadow: var(--shadow);
}

.membership-note,
.membership-footnote {
  color: var(--muted);
  line-height: 1.6;
}

.promo-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 69, 168, 0.34);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 69, 168, 0.16), rgba(73, 230, 167, 0.09));
}

.promo-countdown strong {
  color: var(--green);
  white-space: nowrap;
}

.promo-countdown.expired {
  border-color: rgba(166, 199, 190, 0.18);
  background: var(--surface-3);
}

.membership-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.promptpay-panel,
.payment-history {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(86, 216, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(86, 216, 255, 0.07);
}

.promptpay-panel h3,
.payment-history h3,
.admin-panel h3 {
  margin: 0 0 12px;
}

.promptpay-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.promptpay-summary div,
.payment-item,
.admin-item,
.user-item {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.promptpay-summary span,
.payment-item span,
.admin-item span,
.user-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.promptpay-summary strong,
.payment-item strong,
.admin-item strong,
.user-item strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.promptpay-qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(73, 230, 167, 0.24);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.promptpay-qr-card img {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.promptpay-qr-card p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #04120f;
  background: var(--amber);
  font-weight: 900;
}

.status-badge.paid {
  background: var(--green);
}

.status-badge.rejected {
  color: #fff;
  background: var(--danger);
}

.slip-preview {
  max-width: 100%;
  max-height: 240px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.plan-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 16px;
  border: 1px solid rgba(166, 199, 190, 0.2);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.plan-card.featured {
  border-color: rgba(255, 69, 168, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 168, 0.14);
}

.plan-card.best-value {
  transform: translateY(-8px);
  border-color: rgba(73, 230, 167, 0.72);
  background:
    linear-gradient(180deg, rgba(73, 230, 167, 0.12), rgba(3, 16, 14, 0.64)),
    rgba(3, 16, 14, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(73, 230, 167, 0.22),
    0 20px 52px rgba(73, 230, 167, 0.14);
}

.best-value-ribbon {
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #04120f;
  background: linear-gradient(135deg, var(--green), #9affd8);
  font-size: 0.78rem;
  font-weight: 950;
}

.plan-card h3,
.plan-card p {
  margin: 0;
}

.plan-card p {
  color: var(--muted);
  line-height: 1.5;
}

.regular-price {
  color: rgba(166, 199, 190, 0.85) !important;
  font-size: 0.96rem;
  font-weight: 850;
  text-decoration: line-through;
}

.plan-price {
  color: var(--text) !important;
  font-size: 2rem;
  font-weight: 950;
}

.plan-discount {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid rgba(255, 69, 168, 0.34);
  border-radius: 999px;
  color: var(--magenta-soft) !important;
  background: rgba(255, 69, 168, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(330px, 440px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px clamp(16px, 3vw, 40px) 36px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  gap: 18px;
  min-width: 0;
  min-height: calc(100vh - 150px);
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 48, 40, 0.94), rgba(8, 28, 24, 0.94));
  box-shadow: var(--shadow);
}

.controls-panel,
.preview-panel,
.output-panel,
.details-panel {
  padding: 18px;
}

.controls-panel {
  align-self: start;
}

.details-panel {
  grid-column: 1 / -1;
}

.easy-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 18px auto 36px;
  display: grid;
  gap: 18px;
}

.easy-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.easy-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.easy-intro p {
  max-width: 780px;
  margin-bottom: 0;
  color: #d0eee7;
  font-size: 1.05rem;
  line-height: 1.68;
}

.profile-summary-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(73, 230, 167, 0.24);
  border-radius: var(--radius);
  background: rgba(3, 16, 14, 0.44);
}

.profile-summary-card span,
.profile-summary-card small {
  color: var(--muted);
  font-weight: 800;
}

.profile-summary-card strong {
  color: var(--text);
  font-size: 1.18rem;
}

.easy-workflow {
  display: grid;
  gap: 18px;
}

.easy-step {
  padding: 18px;
}

.easy-step-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.easy-step-head h2 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.easy-step-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.step-number {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #04120f;
  background: linear-gradient(135deg, var(--green), #91ffd7);
  font-weight: 950;
  box-shadow: 0 0 24px rgba(73, 230, 167, 0.22);
}

.easy-hint {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(86, 216, 255, 0.18);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(86, 216, 255, 0.07);
  font-weight: 850;
}

.easy-hint.warning {
  color: #04120f;
  border-color: rgba(255, 209, 102, 0.8);
  background: var(--amber);
}

.easy-output-step {
  display: grid;
  gap: 16px;
}

.easy-preview-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(380px, 1.05fr);
  gap: 16px;
  min-width: 0;
  min-height: calc(100vh - 260px);
  align-items: stretch;
}

.easy-preview-grid .preview-panel,
.easy-preview-grid .output-panel,
.easy-output-step .details-panel {
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.preview-panel,
.output-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.easy-preview-grid canvas {
  min-height: 360px;
}

.advanced-drawer {
  padding: 18px;
}

.advanced-drawer summary {
  cursor: pointer;
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 950;
}

.advanced-drawer > p {
  margin: 12px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.72fr) minmax(280px, 0.72fr);
  gap: 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.source-mode-panel {
  border-color: rgba(255, 69, 168, 0.34);
}

.source-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.source-mode-button {
  min-height: 50px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.source-mode-button.selected {
  color: #04120f;
  background: var(--green);
  border-color: var(--green);
}

.source-mode-description {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.source-fieldset-hidden {
  display: none;
}

fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 17, 15, 0.28);
}

legend {
  padding: 0 8px;
  color: var(--green);
  font-weight: 800;
}

label,
.compact-field {
  display: grid;
  gap: 7px;
}

label span,
.compact-field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

fieldset > label + label,
fieldset > label + .field-grid,
fieldset > .field-grid + label,
.tool-hint {
  margin-top: 12px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(166, 199, 190, 0.24);
  border-radius: 7px;
  outline: none;
  background: var(--field);
  color: var(--text);
}

input[type="file"] {
  padding: 8px;
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  color: #04120f;
  background: var(--green);
  font-weight: 900;
}

.field-button {
  display: grid;
  gap: 7px;
}

.field-button span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.origin-picker-field {
  display: grid;
  gap: 7px;
}

.origin-row {
  margin-top: 14px;
}

.origin-picker-field > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.origin-picker {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 22px);
  grid-template-rows: repeat(3, 22px);
  justify-content: space-between;
  align-content: space-between;
  width: 100%;
  height: 104px;
  padding: 10px;
  border: 1px solid rgba(166, 199, 190, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(rgba(166, 199, 190, 0.13), rgba(166, 199, 190, 0.13)) center / calc(100% - 40px) 1px no-repeat,
    linear-gradient(90deg, rgba(166, 199, 190, 0.13), rgba(166, 199, 190, 0.13)) center / 1px calc(100% - 40px) no-repeat,
    var(--field);
}

.origin-point {
  min-width: 22px;
  min-height: 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 3px solid #071a16;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px rgba(166, 199, 190, 0.36);
}

.origin-point:hover {
  transform: scale(1.15);
  background: var(--magenta-soft);
}

.origin-point.selected {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--magenta), 0 0 16px rgba(73, 230, 167, 0.54);
}

.origin-description {
  margin: 0;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
}

input:focus,
select:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 69, 168, 0.16);
}

input:disabled {
  opacity: 0.52;
}

.tool-hint {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(86, 216, 255, 0.08);
  border: 1px solid rgba(86, 216, 255, 0.18);
}

.nesting-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(73, 230, 167, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(73, 230, 167, 0.09), rgba(86, 216, 255, 0.05)),
    rgba(3, 16, 14, 0.48);
}

.nesting-card.disabled {
  border-color: rgba(166, 199, 190, 0.16);
  background: rgba(3, 16, 14, 0.36);
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(166, 199, 190, 0.12);
  border-radius: 7px;
  background: rgba(4, 25, 21, 0.42);
}

.toggle-row input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(166, 199, 190, 0.28);
  background: rgba(16, 44, 40, 0.86);
  cursor: pointer;
  position: relative;
  margin-top: 2px;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.toggle-row input[type="checkbox"]:checked {
  border-color: rgba(255, 69, 168, 0.62);
  background: rgba(255, 69, 168, 0.18);
}

.toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background: var(--green);
  box-shadow: 0 0 18px rgba(73, 230, 167, 0.55);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  color: var(--text);
}

.toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.nesting-status {
  min-height: 34px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(86, 216, 255, 0.18);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(86, 216, 255, 0.07);
  font-size: 0.86rem;
  font-weight: 850;
}

.nesting-status.success {
  color: var(--green);
  border-color: rgba(73, 230, 167, 0.24);
  background: rgba(73, 230, 167, 0.08);
}

.nesting-status.warning {
  color: #04120f;
  border-color: rgba(255, 209, 102, 0.78);
  background: var(--amber);
}

.compact-field {
  width: min(230px, 100%);
}

.compact-field input {
  min-height: 38px;
}

.animation-speed-control {
  width: min(520px, 100%);
  gap: 7px;
}

.animation-speed-control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.animation-speed-control strong {
  color: var(--green);
}

.animation-speed-control small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.animation-speed-control input[type="range"] {
  min-height: 32px;
  padding: 0;
  accent-color: var(--magenta);
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.animation-speed-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(86, 216, 255, 0.16);
  border-radius: 7px;
  background: rgba(3, 16, 14, 0.36);
}

.speed-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(86, 216, 255, 0.16);
  border-radius: 7px;
  background: rgba(3, 16, 14, 0.42);
}

.speed-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(166, 199, 190, 0.18);
  color: var(--text);
  background: rgba(16, 44, 40, 0.92);
  font-size: 0.82rem;
}

.speed-chip.hot {
  border-color: rgba(255, 69, 168, 0.45);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 69, 168, 0.85), rgba(86, 216, 255, 0.55));
}

.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  color: #04120f;
  background: linear-gradient(135deg, var(--green), #88ffd2);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}

.button-link:hover,
button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.button-link:active,
button:active {
  transform: translateY(0);
}

.secondary-button {
  color: #150611;
  background: linear-gradient(135deg, var(--magenta), var(--magenta-soft));
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.speed-buttons .speed-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(166, 199, 190, 0.18);
  color: var(--text);
  background: rgba(16, 44, 40, 0.92);
  font-size: 0.82rem;
}

.speed-buttons .speed-chip.hot {
  border-color: rgba(255, 69, 168, 0.45);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 69, 168, 0.85), rgba(86, 216, 255, 0.55));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.button-row.tight {
  justify-content: flex-end;
  margin-top: 0;
}

#previewCanvas {
  display: block;
  width: 100%;
  height: clamp(420px, 58vh, 760px);
  flex: 1 1 auto;
  border: 1px solid rgba(166, 199, 190, 0.22);
  border-radius: var(--radius);
  background: #03100e;
}

.code-editor {
  min-height: 420px;
  max-height: none;
  flex: 1 1 auto;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(166, 199, 190, 0.22);
  border-radius: var(--radius);
  background: #020a09;
  color: #d9fff2;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.58;
}

.sheet-downloads {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(73, 230, 167, 0.22);
  border-radius: 7px;
  background: rgba(73, 230, 167, 0.07);
}

.sheet-downloads[hidden] {
  display: none;
}

.sheet-downloads strong {
  color: var(--green);
}

.sheet-download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-download-button {
  min-height: 38px;
}

.status-message {
  display: none;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 7px;
  font-weight: 750;
}

.status-message.show {
  display: block;
}

.status-message.success {
  color: #caffec;
  border: 1px solid rgba(73, 230, 167, 0.36);
  background: rgba(73, 230, 167, 0.1);
}

.status-message.error {
  color: #ffe5e8;
  border: 1px solid rgba(255, 107, 122, 0.48);
  background: rgba(255, 107, 122, 0.12);
}

.status-message.info {
  color: #e8f7ff;
  border: 1px solid rgba(86, 216, 255, 0.3);
  background: rgba(86, 216, 255, 0.1);
}

.job-details {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-grid div {
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.detail-grid dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
}

.site-footer {
  padding: 22px clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  background: rgba(3, 16, 14, 0.56);
}

.admin-page {
  padding: 18px clamp(16px, 3vw, 40px) 36px;
}

.admin-panel {
  padding: 18px;
}

.admin-dashboard {
  display: grid;
  gap: 16px;
}

.admin-summary,
.admin-create {
  padding: 14px;
  border: 1px solid rgba(86, 216, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(86, 216, 255, 0.06);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  padding: 12px;
  border: 1px solid rgba(166, 199, 190, 0.16);
  border-radius: 7px;
  background: rgba(3, 16, 14, 0.62);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
  color: var(--text);
}

.admin-create h3 {
  margin-top: 0;
}

.admin-create-form {
  max-width: none;
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.admin-item,
.user-item,
.payment-item {
  margin-bottom: 10px;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

/* กัน select / date input ล้นกรอบการ์ด (grid item ต้อง min-width:0 จึงจะย่อได้) */
.admin-user-controls > * {
  min-width: 0;
}

.admin-user-controls input,
.admin-user-controls select {
  width: 100%;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-users-head h3 {
  margin: 0;
}

.admin-user-actions button {
  flex: 1 1 auto;
}

@media (max-width: 560px) {
  .admin-user-controls {
    grid-template-columns: 1fr;
  }
}

@keyframes gcodeRain {
  0% {
    transform: translate3d(0, -12vh, 0);
    opacity: 0;
  }
  12%,
  78% {
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 120vh, 0);
    opacity: 0;
  }
}

@keyframes gcodeAssemble {
  0% {
    transform: translate3d(0, -40px, 120px) scale(1);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  58% {
    transform: translate3d(var(--assemble-x, 0), 260px, 70px) scale(0.95);
    opacity: 0.82;
  }
  100% {
    transform: translate3d(0, 310px, 0) scale(0.18);
    opacity: 0;
  }
}

@keyframes toolpathLayer {
  0%,
  10% {
    opacity: 0;
  }
  28%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes drawToolpath {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dissolvePath {
  to {
    opacity: 0;
    filter: blur(9px);
    transform: scale(0.78);
    transform-origin: 50% 50%;
  }
}

@keyframes cutterReveal {
  0%,
  8% {
    opacity: 0;
  }
  22%,
  74% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes circuitPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: rotate(0deg) scale(1);
  }
  50% {
    opacity: 0.74;
    transform: rotate(2deg) scale(1.02);
  }
}

@keyframes logoReveal {
  0%,
  66% {
    opacity: 0;
    transform: scale(0.76) rotateX(16deg) rotateY(-18deg);
    filter: blur(12px);
  }
  82% {
    opacity: 1;
    transform: scale(1.05) rotateX(6deg) rotateY(-8deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(7deg) rotateY(-10deg);
    filter: blur(0);
  }
}

@keyframes heroSpark {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -74%) scale(0.25);
  }
}

@keyframes float3d {
  0%,
  100% {
    transform: rotateX(7deg) rotateY(-10deg) translateY(0);
  }

  50% {
    transform: rotateX(13deg) rotateY(10deg) translateY(-16px);
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .easy-intro,
  .easy-preview-grid,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .membership-strip {
    grid-template-columns: 1fr;
  }

  .hero-section,
  .seo-section,
  .seo-split {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 420px;
  }

  .hero-stage {
    width: min(460px, 86vw);
  }

  .feature-grid,
  .benefit-grid,
  .workflow-grid,
  .faq-grid,
  .review-grid,
  .admin-summary {
    grid-template-columns: 1fr;
  }

  .promptpay-summary,
  .admin-columns {
    grid-template-columns: 1fr;
  }

  .price-row {
    justify-content: flex-start;
  }

  .plan-card.best-value {
    transform: none;
  }

  .controls-panel {
    align-self: stretch;
  }
}

@media (max-width: 720px) {
  .app-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .membership-plans {
    grid-template-columns: 1fr;
  }

  .easy-shell {
    width: min(100% - 24px, 1480px);
  }

  .easy-intro,
  .easy-step,
  .advanced-drawer {
    padding: 14px;
  }

  .easy-step-head {
    align-items: center;
  }

  .promo-countdown {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-mode-switch {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row,
  .button-row.tight {
    display: grid;
    grid-template-columns: 1fr;
  }

  .animation-speed-row {
    grid-template-columns: 1fr;
  }

  #previewCanvas {
    height: 280px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hero-stage {
    animation: mobileHeroFloat 8s ease-in-out infinite;
  }

  .hero-stage::after {
    display: none;
  }
}

@keyframes mobileHeroFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.01);
  }
}

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

  .gcode-rain,
  .hero-gcode-burst,
  .hero-toolpath,
  .hero-cutter {
    display: none !important;
  }

  .cnc-orbit {
    opacity: 1;
  }
}


/* ============================================================
   Modern Refresh 2026 — token-based UI polish (dark + light)
   ทุกพื้นผิววิ่งผ่าน CSS variables เพื่อสลับธีมมืด/สว่างได้
   ============================================================ */

/* --- Panels: glass + ยกตอน hover --- */
.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 42%),
    var(--surface);
  box-shadow: var(--elev-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 200ms ease, box-shadow 240ms ease, transform 240ms ease, background 300ms ease;
}

.easy-step.panel:hover,
.controls-panel.panel:hover {
  border-color: var(--accent-glow);
}

/* --- Fieldset --- */
fieldset {
  padding: 16px 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 40%),
    var(--surface-3);
  transition: border-color 200ms ease, background 300ms ease;
}

fieldset:focus-within {
  border-color: var(--accent-glow);
}

legend {
  padding: 3px 12px;
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

label span,
.compact-field span,
.field-button span,
.origin-picker-field > span {
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Inputs / selects / textarea --- */
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 200ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent-glow);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* select chevron (วาดด้วย CSS, ปรับสีตามธีม) */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--green) 50%),
    linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: var(--date-icon-filter, invert(0.7));
}

/* --- Buttons --- */
button,
.button-link {
  border-radius: var(--radius-sm);
  color: var(--green-ink);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 70%, #ffffff));
  box-shadow: 0 8px 20px var(--accent-glow);
  letter-spacing: 0.01em;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 200ms ease, border-color 140ms ease;
}

button:focus-visible,
.button-link:focus-visible {
  outline: none;
  box-shadow: var(--ring), var(--elev-1);
}

button:hover,
.button-link:hover {
  box-shadow: 0 12px 28px var(--accent-glow);
}

.secondary-button {
  color: var(--magenta-ink);
  background: linear-gradient(135deg, var(--magenta), var(--magenta-soft));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--magenta) 30%, transparent);
}

.secondary-button:hover {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--magenta) 42%, transparent);
}

.secondary-button:focus-visible {
  box-shadow: var(--ring-magenta), var(--elev-1);
}

.ghost-button {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.ghost-button:hover {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  border-color: var(--accent-glow);
  box-shadow: none;
}

button:disabled,
button[disabled],
.button-link[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
  transform: none;
}

/* --- Header status pill --- */
.header-status {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--line);
}

/* --- Theme toggle button --- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.1rem;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.theme-toggle:hover {
  color: var(--green);
  border-color: var(--accent-glow);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  box-shadow: none;
  transform: rotate(-12deg);
}

/* --- Source / segmented toggles --- */
.source-mode-button {
  border-radius: var(--radius-sm);
  transition: transform 140ms ease, border-color 160ms ease, background 160ms ease;
}

.source-mode-button.selected {
  box-shadow: 0 8px 22px var(--accent-glow);
}

/* --- Step number --- */
.step-number {
  width: 40px;
  height: 40px;
  color: var(--green-ink);
  box-shadow: 0 6px 18px var(--accent-glow);
}

/* --- Canvas & code editor (คงพื้นมืดทั้งสองธีมเพื่ออ่านง่าย) --- */
#previewCanvas {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--canvas-bg);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.code-editor {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--code-bg);
  color: #d9fff2;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.45);
}

.code-editor::selection,
.code-editor *::selection {
  background: rgba(255, 69, 168, 0.32);
}

::selection {
  background: color-mix(in srgb, var(--green) 36%, transparent);
  color: var(--text);
}

/* --- Status message --- */
.status-message {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.sheet-downloads {
  border-radius: var(--radius);
}

/* --- Custom scrollbar --- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-glow) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-color: var(--accent-glow);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.toggle-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* light theme: date picker icon เป็นสีเข้ม */
html[data-theme="light"] {
  --date-icon-filter: invert(0.25);
}

@media (max-width: 720px) {
  :root {
    --radius: 12px;
    --radius-lg: 16px;
  }
  .panel {
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  .panel,
  button,
  .button-link,
  input,
  select,
  textarea {
    transition: none !important;
  }
}

/* ============================================================
   Landing Page SaaS Redesign (.lp-*) — token-based, dark+light
   ============================================================ */
.lp-main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.lp-section {
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--line-soft);
}

.lp-section:first-child { border-top: 0; }

.lp-head {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 52px);
  text-align: center;
}

.lp-head .eyebrow { justify-content: center; }

.lp-head h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.lp-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 5px 14px;
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hero rating row ---------- */
.lp-hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.lp-stars { color: var(--amber); letter-spacing: 2px; font-size: 1rem; }

/* ---------- Trust strip ---------- */
.lp-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  padding: 22px 0 4px;
  color: var(--muted);
}

.lp-trust span:first-child {
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.lp-trust b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

/* ---------- Pain / Gain ---------- */
.lp-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lp-card {
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 46%),
    var(--surface);
  box-shadow: var(--elev-1);
}

.lp-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.18rem;
}

.lp-card.pain { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.lp-card.gain { border-color: var(--accent-glow); }

.lp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.lp-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  line-height: 1.55;
}

.lp-list li b { color: var(--text); font-weight: 800; }

.lp-ic {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 900;
}

.lp-ic.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); }
.lp-ic.good { color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); }

/* ---------- Bento features ---------- */
.lp-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.lp-feature {
  grid-column: span 2;
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 42%),
    var(--surface);
  box-shadow: var(--elev-1);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 240ms ease;
}

.lp-feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent-glow);
  box-shadow: var(--elev-2);
}

.lp-feature.wide { grid-column: span 3; }

.lp-feature-ic {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  color: var(--green-ink);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 60%, var(--cyan)));
  box-shadow: 0 8px 20px var(--accent-glow);
}

.lp-feature-ic svg { width: 24px; height: 24px; }

.lp-feature h3 { margin: 0 0 8px; font-size: 1.15rem; }
.lp-feature p { margin: 0; color: var(--muted); line-height: 1.6; }

.lp-feature .tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--magenta) 16%, transparent);
  color: var(--magenta);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Why / stats ---------- */
.lp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.lp-stat {
  padding: 22px;
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.lp-stat strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  background: linear-gradient(120deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-stat span { color: var(--muted); font-size: 0.92rem; font-weight: 700; }

/* ---------- Steps ---------- */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: lp-step;
}

.lp-step {
  position: relative;
  padding: 26px 22px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.lp-step::before {
  counter-increment: lp-step;
  content: counter(lp-step);
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: var(--green-ink);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 60%, #fff));
  font-weight: 950;
  box-shadow: 0 6px 18px var(--accent-glow);
}

.lp-step h3 { margin: 0 0 6px; font-size: 1.08rem; }
.lp-step p { margin: 0; color: var(--muted); line-height: 1.55; }

/* ---------- Audience chips ---------- */
.lp-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.lp-chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
}

.lp-chips span::before { content: "✓"; color: var(--green); font-weight: 900; }

/* ---------- Pricing ---------- */
.lp-pricing {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lp-price {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 40%),
    var(--surface);
  box-shadow: var(--elev-1);
}

.lp-price.popular {
  border-color: var(--green);
  box-shadow: 0 18px 50px var(--accent-glow);
  transform: translateY(-6px);
}

.lp-price-tag {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lp-price-tag.free { background: color-mix(in srgb, var(--cyan) 18%, transparent); color: var(--cyan); }
.lp-price-tag.best { background: var(--green); color: var(--green-ink); }
.lp-price-tag.ghost { background: var(--surface-3); color: var(--muted); }

.lp-price h3 { margin: 0 0 4px; font-size: 1.2rem; }

.lp-price .amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 2px;
}

.lp-price .amount b { font-size: 2.2rem; line-height: 1; letter-spacing: -0.02em; }
.lp-price .amount s { color: var(--muted); font-size: 1rem; }
.lp-price .per { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; }

.lp-price ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.lp-price li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--muted); line-height: 1.45; font-size: 0.94rem; }
.lp-price li::before { content: "✓"; color: var(--green); font-weight: 900; }
.lp-price .button-link { margin-top: auto; width: 100%; }

/* ---------- Final CTA ---------- */
.lp-cta {
  text-align: center;
  padding: clamp(40px, 6vw, 72px) 28px;
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--green) 16%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--elev-2);
}

.lp-cta h2 { margin: 8px 0 12px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.lp-cta p { max-width: 620px; margin: 0 auto 24px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }

.lp-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lp-note { margin-top: 16px; color: var(--muted); font-size: 0.86rem; }

/* ---------- SEO copy block ---------- */
.lp-prose { max-width: 820px; margin: 0 auto; }
.lp-prose p { color: var(--muted); line-height: 1.85; margin: 0 0 14px; }
.lp-prose a { color: var(--green); font-weight: 700; }

/* ---------- Rich footer ---------- */
.lp-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--surface-3);
}

.lp-footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.lp-footer h4 { margin: 0 0 12px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.lp-footer a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.lp-footer a:hover { color: var(--green); }
.lp-footer .lp-foot-brand p { color: var(--muted); line-height: 1.6; margin: 10px 0 0; font-size: 0.92rem; max-width: 320px; }
.lp-foot-logo { display: flex; align-items: center; gap: 10px; }
.lp-foot-logo img { width: 40px; height: 40px; }
.lp-foot-logo strong { font-size: 1.1rem; }

.lp-footer-bottom {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .lp-bento { grid-template-columns: repeat(4, 1fr); }
  .lp-feature, .lp-feature.wide { grid-column: span 2; }
  .lp-pricing { grid-template-columns: repeat(2, 1fr); }
  .lp-price.popular { transform: none; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .lp-split { grid-template-columns: 1fr; }
  .lp-bento { grid-template-columns: 1fr; }
  .lp-feature, .lp-feature.wide { grid-column: span 1; }
  .lp-pricing { grid-template-columns: 1fr; }
  .lp-stats, .lp-steps { grid-template-columns: 1fr 1fr; }
  .lp-footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   Sub-landing modernization — upgrade legacy SEO sections to
   the SaaS look, token-based (dark + light). Used by
   /cnc-online, /gcode-online, /svg-to-gcode, /dxf-to-gcode,
   /docs, /examples, /grbl-gcode-generator
   ============================================================ */
/* constrain only legacy sub-landing sections (main index uses .lp-main) */
.seo-band {
  width: min(1080px, calc(100% - 32px));
  margin: 22px auto 0;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 42%),
    var(--surface);
  box-shadow: var(--elev-1);
}

.seo-article {
  text-align: center;
  background:
    radial-gradient(120% 130% at 50% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 58%),
    var(--surface);
}

.seo-article h1 {
  max-width: 880px;
  margin: 8px auto 16px;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.seo-article .ai-summary,
.seo-article > p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  line-height: 1.7;
}

.seo-article .eyebrow,
.seo-band .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--green);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.seo-heading {
  max-width: 760px;
  margin: 0 auto clamp(22px, 3vw, 36px);
  text-align: center;
}

.seo-heading h2,
.seo-split h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.14;
}

.seo-heading p { color: var(--muted); line-height: 1.7; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.seo-article .hero-actions { justify-content: center; }

.keyword-nav { justify-content: center; gap: 10px; margin: 20px 0; }

.keyword-nav a {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.keyword-nav a:hover {
  color: var(--green);
  border-color: var(--accent-glow);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.feature-grid,
.benefit-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article,
.benefit-grid article,
.workflow-grid article {
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--surface-top), transparent 44%),
    var(--surface);
  box-shadow: var(--elev-1);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 220ms ease;
}

.feature-grid article:hover,
.benefit-grid article:hover,
.workflow-grid article:hover {
  transform: translateY(-4px);
  border-color: var(--accent-glow);
  box-shadow: var(--elev-2);
}

.feature-grid h3,
.benefit-grid h3,
.workflow-grid h3 { margin: 0 0 8px; font-size: 1.12rem; }

.feature-grid p,
.benefit-grid p,
.workflow-grid p { margin: 0; color: var(--muted); line-height: 1.6; }

.workflow-grid article { position: relative; padding-top: 64px; }

.workflow-grid article strong {
  position: absolute;
  top: 22px;
  left: 24px;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--green-ink);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 60%, #fff));
  font-weight: 950;
  box-shadow: 0 6px 18px var(--accent-glow);
}

.benefit-grid article strong { color: var(--green); }

.text-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.seo-cta {
  text-align: center;
  border: 1px solid var(--accent-glow);
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--green) 16%, transparent), transparent 60%),
    var(--surface);
}

.seo-cta p { max-width: 620px; margin: 0 auto 22px; color: var(--muted); }

.notice-list { color: var(--muted); }
.notice-list.warning p { color: var(--amber); }

.sample-code {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: #d9fff2;
}

.site-footer {
  padding: 28px clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  text-align: center;
  background: var(--surface-3);
}

@media (max-width: 860px) {
  .feature-grid,
  .benefit-grid,
  .workflow-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .feature-grid,
  .benefit-grid,
  .workflow-grid { grid-template-columns: 1fr; }
}
