:root {
  --bg-main: #061f19;
  --bg-radial-1: rgba(0, 150, 120, 0.22);
  --bg-radial-2: rgba(0, 80, 68, 0.3);
  --panel: rgba(9, 42, 34, 0.92);
  --panel-soft: rgba(13, 54, 45, 0.78);
  --panel-elevated: rgba(16, 67, 56, 0.9);
  --primary: #00b894;
  --primary-dark: #007f69;
  --primary-deep: #005c4d;
  --primary-soft: rgba(0, 184, 148, 0.14);
  --text-main: #f3fffb;
  --text-soft: #bfd9d2;
  --text-muted: #82a59b;
  --border-soft: rgba(151, 215, 198, 0.18);
  --border-strong: rgba(0, 184, 148, 0.38);
  --warning: #f7c948;
  --danger: #ff6b6b;
  --danger-bg: rgba(72, 24, 25, 0.72);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 16px 42px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 0 1px rgba(0, 184, 148, 0.14), 0 24px 70px rgba(0, 184, 148, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body.is-typing,
body.is-typing * {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 184, 148, 0.18), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(0, 105, 88, 0.18), transparent 30%),
    linear-gradient(135deg, #041a15 0%, #06261f 48%, #041611 100%);
  color: var(--text-main);
  font-family: "Noto Sans Thai", "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.62;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 16px;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.trial-app {
  min-height: 100vh;
}

.loading-screen {
  min-height: 80vh;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-weight: 800;
}

.trial-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(4, 26, 21, 0.86);
  border-bottom: 1px solid rgba(151, 215, 198, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00cfa7 0%, #009d80 52%, #00735f 100%);
  color: #04231c;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(0, 184, 148, 0.24);
}

.brand strong {
  color: #fff;
  font-size: 1.03rem;
  white-space: nowrap;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.header-center b {
  max-width: 100%;
  padding: 5px 11px;
  border: 1px solid rgba(0, 184, 148, 0.28);
  border-radius: 999px;
  background: rgba(0, 184, 148, 0.1);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.lang {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.lang button {
  min-height: 32px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 900;
}

.lang button.active {
  background: linear-gradient(135deg, #00cfa7, #008e74);
  color: #04231c;
}

.trial-hero,
.guide-page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 0;
}

.hero-copy {
  max-width: 860px;
  padding: 0 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warning);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.status-page h1,
.success-card h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.85rem, 2.8vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p,
.status-page p,
.success-card p {
  max-width: 760px;
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
}

.wizard-shell {
  margin-top: 8px;
}

.stepper {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.stepper li {
  min-width: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(151, 215, 198, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.stepper span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 950;
}

.stepper b {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.22;
}

.stepper .current {
  border-color: rgba(0, 184, 148, 0.54);
  background: rgba(0, 184, 148, 0.13);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 184, 148, 0.08);
}

.stepper .current span,
.stepper .done span {
  background: linear-gradient(135deg, #00cfa7, #008e74);
  color: #04231c;
}

.stepper .done {
  color: var(--text-main);
}

.wizard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.wizard-card,
.side-panel,
.success-card,
.status-card {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(9, 42, 34, 0.96), rgba(7, 34, 28, 0.94));
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.wizard-card {
  padding: 30px;
}

.step-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.step-title span {
  padding: 7px 11px;
  border: 1px solid rgba(0, 184, 148, 0.34);
  border-radius: 999px;
  background: rgba(0, 184, 148, 0.12);
  color: var(--warning);
  font-size: 0.8rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 184, 148, 0.08);
}

.step-title h2 {
  margin: 0;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1.28;
  letter-spacing: 0;
  text-align: right;
}

.progress-segments {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 24px;
}

.progress-segment {
  height: 6px;
  border-radius: 999px;
  background: rgba(151, 215, 198, 0.16);
}

.progress-segment.done,
.progress-segment.active {
  background: linear-gradient(90deg, #00cfa7, #007f69);
  box-shadow: 0 0 22px rgba(0, 184, 148, 0.16);
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
}

.alert.error {
  border: 1px solid rgba(255, 107, 107, 0.32);
  background: var(--danger-bg);
  color: #ffb4b4;
}
.alert.success,
.alert.warning {
  border: 1px solid rgba(0, 184, 148, 0.22);
  background: rgba(0, 184, 148, 0.1);
  color: var(--text-main);
}

.alert.warning {
  border-color: rgba(247, 201, 72, 0.3);
  background: rgba(247, 201, 72, 0.1);
}

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

.step-panel label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.step-panel label span,
.check span {
  color: #e7fff8;
  font-size: 0.86rem;
  font-weight: 800;
}

.step-panel input,
.step-panel select,
.step-panel textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(151, 215, 198, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.step-panel textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.step-panel select option {
  background: #092a22;
  color: #fff;
}

.step-panel input::placeholder,
.step-panel textarea::placeholder {
  color: var(--text-muted);
}

.step-panel input:focus,
.step-panel select:focus,
.step-panel textarea:focus {
  border-color: rgba(0, 184, 148, 0.72);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.13);
}

.wide {
  grid-column: 1 / -1;
}

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

.plan-card {
  min-height: 190px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(151, 215, 198, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.052);
  color: var(--text-soft);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-card strong {
  color: #fff;
  font-size: 1.18rem;
}

.plan-card b {
  margin-top: auto;
  color: var(--warning);
}

.plan-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.plan-card.selected {
  border-color: rgba(0, 184, 148, 0.62);
  background: rgba(0, 184, 148, 0.13);
  box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.1) inset, 0 18px 42px rgba(0, 184, 148, 0.11);
}

.review-panel {
  display: grid;
  gap: 14px;
}

.review-rows {
  display: grid;
  gap: 8px;
}

.review-rows div,
.status-card div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(151, 215, 198, 0.12);
}

.review-rows div:first-child,
.status-card div:first-child {
  padding-top: 0;
}

.review-rows div:last-child,
.status-card div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.review-rows span,
.status-card span {
  color: var(--text-muted);
}

.review-rows strong,
.status-card strong {
  color: #fff;
  text-align: right;
  overflow-wrap: anywhere;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(151, 215, 198, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.wizard-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  margin-top: 24px;
  align-items: center;
}

.btn {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, #00cfa7 0%, #009d80 52%, #00735f 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 184, 148, 0.25);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(0, 184, 148, 0.32);
}

.btn.secondary {
  border-color: rgba(215, 248, 234, 0.26);
  background: rgba(215, 248, 234, 0.075);
  color: #fff;
}

.btn.secondary:hover,
.btn.ghost:hover {
  border-color: var(--border-strong);
  background: rgba(0, 184, 148, 0.1);
}

.btn.ghost {
  color: var(--text-soft);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn:focus-visible,
.lang button:focus-visible,
.plan-card:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid rgba(0, 184, 148, 0.42);
  outline-offset: 3px;
}

.form-hint {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(0, 184, 148, 0.22);
  border-radius: 16px;
  background: rgba(0, 184, 148, 0.1);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: rgba(9, 42, 34, 0.7);
  box-shadow: var(--shadow-md);
}

.side-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.3;
}

.side-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.side-panel li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(151, 215, 198, 0.12);
  color: var(--text-soft);
  font-weight: 750;
}

.side-panel li:last-child {
  border-bottom: 0;
}

.side-panel li::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(0, 184, 148, 0.44);
}

.side-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.side-metrics span {
  padding: 13px 7px;
  border: 1px solid rgba(0, 184, 148, 0.24);
  border-radius: 16px;
  background: rgba(0, 184, 148, 0.1);
  color: #fff;
  text-align: center;
  font-size: 1.24rem;
  font-weight: 950;
  line-height: 1.1;
}

.side-metrics b {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.side-support {
  display: grid;
  gap: 10px;
}

.side-support article,
.info-blocks article,
.embed-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(151, 215, 198, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.side-support h3,
.info-blocks h3,
.embed-card h3 {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.35;
}

.side-support p,
.info-blocks p,
.embed-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.dev-link {
  color: #b8fff0;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.dev-link:hover {
  color: #fff;
}

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

.embed-card {
  display: grid;
  gap: 12px;
}

.icon-btn {
  justify-self: start;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 184, 148, 0.44);
  border-radius: 12px;
  background: rgba(0, 184, 148, 0.12);
  color: #b8fff0;
  font-weight: 900;
}

pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  background: #03100c;
  color: #dff9ed;
  font-size: 0.84rem;
  line-height: 1.5;
}

code {
  font-family: "Cascadia Mono", Consolas, monospace;
  white-space: pre;
}

.success-page,
.status-page {
  width: min(860px, calc(100% - 48px));
  margin: 54px auto 0;
}

.success-card,
.status-card {
  padding: 28px;
}

.status-card {
  margin: 20px 0;
  display: grid;
  gap: 0;
}

.trial-footer {
  width: min(1240px, calc(100% - 48px));
  margin: 42px auto 0;
  padding: 24px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(151, 215, 198, 0.14);
  color: var(--text-muted);
}

.trial-footer strong {
  color: #fff;
}

.wizard-card,
.side-panel,
.success-card,
.status-card,
.info-blocks article,
.side-support article,
.embed-card,
pre,
code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.trial-header,
.trial-hero,
.wizard-grid,
.step-panel,
.plan-grid,
.info-blocks,
.trial-footer {
  min-width: 0;
}

@media (max-width: 1040px) {
  .trial-header {
    padding-right: 24px;
    padding-left: 24px;
  }

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

  .side-panel {
    position: static;
  }

  .stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .header-center span {
    display: none;
  }

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

  .info-blocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .trial-header {
    min-height: 66px;
    padding-right: 14px;
    padding-left: 14px;
    gap: 8px;
  }

  .brand strong {
    display: none;
  }

  .header-center b {
    font-size: 0.72rem;
  }

  .trial-hero,
  .guide-page,
  .status-page,
  .success-page,
  .trial-footer {
    width: min(100% - 20px, 1240px);
    margin-top: 18px;
  }

  .trial-hero,
  .guide-page {
    padding-top: 18px;
  }

  .hero-copy h1,
  .status-page h1,
  .success-card h1 {
    font-size: 1.92rem;
  }

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

  .stepper li {
    padding: 8px;
  }

  .step-panel {
    grid-template-columns: 1fr;
  }

  .wizard-card,
  .side-panel,
  .success-card,
  .status-card {
    padding: 20px;
    border-radius: 20px;
  }

  .step-title {
    display: grid;
    gap: 10px;
  }

  .step-title h2 {
    text-align: left;
  }

  .wizard-actions {
    grid-template-columns: 1fr 1fr;
  }

  .wizard-actions span {
    display: none;
  }

  .wizard-actions .btn.ghost {
    grid-column: 1 / -1;
  }

  .btn {
    width: 100%;
  }

  .review-rows div,
  .status-card div {
    display: grid;
    gap: 2px;
  }

  .review-rows strong,
  .status-card strong {
    text-align: left;
  }

  .trial-footer {
    display: grid;
  }

  .side-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body {
    padding-bottom: 18px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 1.72rem;
  }

  .hero-copy p {
    font-size: 0.96rem;
  }

  .brand span {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 0.86rem;
  }

  .header-center {
    display: none;
  }

  .lang button {
    padding: 4px 8px;
  }

  .side-metrics span {
    padding: 10px 6px;
    font-size: 1.05rem;
  }

  .wizard-actions {
    grid-template-columns: 1fr;
  }
}
