:root {
  --bg: #f2eee7;
  --paper: rgba(255, 252, 247, 0.9);
  --paper-strong: #fffdf8;
  --ink: #172126;
  --muted: #5f6a72;
  --line: rgba(23, 33, 38, 0.1);
  --brand: #0d6e6e;
  --brand-deep: #0b4f53;
  --accent: #ef8f48;
  --success: #1e7f54;
  --error: #b33a3a;
  --shadow: 0 32px 80px rgba(19, 32, 38, 0.16);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans TC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(239, 143, 72, 0.2), transparent 28%),
    radial-gradient(circle at bottom right, rgba(13, 110, 110, 0.18), transparent 26%),
    linear-gradient(135deg, #efe5d6 0%, #f5f1e9 46%, #e8f0ef 100%);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 40px auto;
}

.page-shell-compact {
  width: min(720px, calc(100% - 32px));
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}

.form-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 247, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.thank-you-card {
  width: 100%;
  padding: 44px 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 247, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
}

.hero-panel {
  position: relative;
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(10, 68, 76, 0.96) 0%, rgba(9, 61, 66, 0.9) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  color: #f8f5ef;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -10% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 143, 72, 0.32), transparent 68%);
  pointer-events: none;
}

.logo-slot {
  display: grid;
  place-items: center;
  min-height: 112px;
  margin-bottom: 28px;
  border: 1px solid rgba(23, 33, 38, 0.08);
  border-radius: 18px;
  background: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-image {
  max-width: min(100%, 280px);
  max-height: 84px;
  object-fit: contain;
}

.thank-you-logo {
  max-width: 360px;
  margin: 0 auto 28px;
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 26px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.lang-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-button.is-active {
  color: var(--brand-deep);
  background: #f8f5ef;
}

.eyebrow {
  margin: 0 0 10px;
  color: #f1c58f;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.thank-you-eyebrow {
  color: var(--brand);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.thank-you-title {
  margin-bottom: 16px;
}

.thank-you-message {
  max-width: 42ch;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.7;
}

.lead,
.contact-note {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  color: rgba(248, 245, 239, 0.9);
  line-height: 1.72;
}

.contact-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.form-panel {
  padding: 36px;
}

.required-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

.required-note span {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}

.required-note p {
  margin: 0;
}

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

.field-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-block-full {
  grid-column: 1 / -1;
}

.field-label,
.choice-group legend {
  font-weight: 700;
  line-height: 1.4;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
  outline: none;
  border-color: rgba(13, 110, 110, 0.6);
  box-shadow: 0 0 0 4px rgba(13, 110, 110, 0.12);
  transform: translateY(-1px);
}

.choice-group {
  margin: 28px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
}

.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.choice-item:hover {
  border-color: rgba(13, 110, 110, 0.18);
  transform: translateY(-1px);
}

.choice-item input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.choice-item span {
  flex: 1;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.submit-button {
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #e56f2e);
  color: #fff9f3;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(229, 111, 46, 0.28);
}

.thank-you-button {
  display: inline-flex;
  align-self: center;
  text-decoration: none;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

@media (max-width: 900px) {
  .form-card {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .form-panel {
    animation: rise-in 0.6s ease both;
  }

  .form-panel {
    animation-delay: 0.08s;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}