:root {
  --green: #123b2d;
  --green-2: #2f6852;
  --cream: #f7f3e9;
  --paper: #fffdf7;
  --ink: #10251c;
  --muted: #66756e;
  --line: #d8e2dc;
  --soft: #e8f0ea;
  --amber: #b6783c;
  --shadow: 0 24px 70px rgba(16, 37, 28, 0.12);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.trial-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 10px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(247, 243, 233, 0.94);
  border-bottom: 1px solid rgba(18, 59, 45, 0.1);
  backdrop-filter: blur(16px);
}
.trial-nav img { width: 142px; height: auto; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link, .language-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 253, 247, 0.9);
  color: var(--green);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.trial-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 22px 76px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(166, 198, 172, 0.35), transparent 32%),
    linear-gradient(135deg, #09271d, #174331 58%, #0b2e23);
}
.trial-hero::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -180px;
  bottom: -260px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; max-width: 960px; margin: auto; text-align: center; }
.eyebrow { color: #cde1d4; font-size: 13px; font-weight: 800; letter-spacing: 0.26em; }
h1, h2 { font-family: var(--serif); }
h1 { margin: 18px 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.22; letter-spacing: 0.03em; }
.hero-copy { max-width: 720px; margin: auto; color: #dce9e1; font-size: 19px; }
.hero-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-points span { padding: 7px 13px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.08); }

.trial-main { padding: 70px 20px 100px; }
.trial-shell { max-width: 1100px; margin: auto; display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 26px; align-items: start; }
.side-card, .form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.side-card { position: sticky; top: 104px; padding: 34px; }
.side-card h2 { margin: 10px 0 14px; font-size: 31px; line-height: 1.35; }
.side-card p { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.step-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--green); font-weight: 850; }
.steps b { display: block; margin-top: 3px; }
.steps small { display: block; color: var(--muted); line-height: 1.5; }
.line-note { margin-top: 28px; padding: 18px; border-radius: 18px; background: var(--soft); color: var(--green); font-weight: 700; }

.form-card { padding: 38px; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px; background: #edf2ee; border-radius: 18px; }
.mode-tab { min-height: 50px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.mode-tab[aria-selected="true"] { background: var(--paper); color: var(--green); box-shadow: 0 5px 18px rgba(16,37,28,.09); }
.form-intro { margin: 28px 0; }
.form-intro h2 { margin: 0 0 8px; font-size: 34px; }
.form-intro p { margin: 0; color: var(--muted); }
.trial-form[hidden] { display: none; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }
label, legend { display: block; margin-bottom: 8px; color: var(--ink); font-weight: 800; }
.required { color: #a34b3f; }
input, select, textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #c8d4cd;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(47,104,82,.12); }
fieldset { margin: 0 0 22px; padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}
.choice input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rating input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.rating label { display: grid; place-items: center; min-height: 52px; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.rating input:checked + label { border-color: var(--green); background: var(--soft); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin: 8px 0 22px; color: var(--muted); font-size: 14px; font-weight: 500; }
.consent input { width: 18px; min-height: 18px; margin-top: 4px; accent-color: var(--green); }
.privacy-note { margin: 0 0 22px; padding: 15px 17px; border-radius: 15px; background: #f3f6f3; color: var(--muted); font-size: 14px; }
.submit-button, .line-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 850;
  cursor: pointer;
}
.submit-button, .line-button { width: 100%; border: 0; background: var(--green); color: #fff; }
.submit-button:hover, .line-button:hover { background: var(--green-2); }
.submit-button:focus-visible, .line-button:focus-visible, .secondary-button:focus-visible, .mode-tab:focus-visible { outline: 3px solid rgba(47,104,82,.35); outline-offset: 3px; }
.form-error { min-height: 24px; margin: 10px 0 0; color: #a13f35; font-weight: 700; }

.review-panel { margin-top: 26px; padding: 26px; border: 1px solid #b8cdc0; border-radius: 22px; background: #f3f8f4; }
.review-panel[hidden] { display: none; }
.review-panel h2 { margin: 0 0 8px; }
.review-copy { color: var(--muted); }
.review-message { max-height: 260px; overflow: auto; margin: 18px 0; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.review-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--green); }
.fallback-links { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.fallback-links a { color: var(--green); font-weight: 800; }

.trial-footer { padding: 44px 20px; background: #081d16; color: #c7d6ce; text-align: center; }
.trial-footer a { color: inherit; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .trial-shell { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 620px) {
  .trial-nav { min-height: 68px; padding: 8px 14px; }
  .trial-nav img { width: 112px; }
  .nav-link { display: none; }
  .trial-hero { padding: 68px 18px 58px; }
  .hero-copy { font-size: 17px; }
  .trial-main { padding: 42px 14px 70px; }
  .side-card, .form-card { border-radius: 24px; padding: 24px 20px; }
  .field-grid, .choice-grid, .review-actions { grid-template-columns: 1fr; }
  .mode-tab { padding: 8px; font-size: 15px; }
  .form-intro h2 { font-size: 29px; }
  .rating label { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  input, select, textarea { transition: none; }
}
