:root {
  --bg: #f8f5ef;
  --bg-soft: #eef5ee;
  --surface: #ffffff;
  --primary: #2e5e3a;
  --accent: #a87f22;
  --text: #26382c;
  --muted: rgba(38, 56, 44, 0.72);
  --line: rgba(46, 94, 58, 0.16);
  --shadow: 0 18px 42px rgba(38, 56, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(238, 245, 238, 0.9), rgba(248, 245, 239, 1) 42%),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
}

.page-shell {
  width: min(640px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 56px;
}

.brand-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.brand-name {
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-link {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-link:hover {
  border-color: rgba(46, 94, 58, 0.36);
  background: rgba(255, 255, 255, 0.62);
}

.reader-tools {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tool-label,
.tool-hint,
p,
h1,
h2 {
  margin-top: 0;
}

.tool-label {
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
}

.tool-hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.font-controls {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.font-controls button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.font-controls button.is-active {
  background: var(--primary);
  color: #fff;
}

.intro-section {
  margin-bottom: 44px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
}

h1 {
  margin-bottom: 24px;
  color: var(--primary);
  font-size: clamp(2rem, 8vw, 3.15rem);
  line-height: 1.22;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.35;
  letter-spacing: 0;
}

.intro-section p,
.gift-note p,
.success-card p,
.closing-note p {
  font-size: 1.05rem;
}

.hero-subtitle {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.65;
}

.gift-note {
  margin-bottom: 34px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.subscribe-form,
.success-card {
  margin-bottom: 42px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid rgba(46, 94, 58, 0.28);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(111, 154, 120, 0.24);
}

.form-message {
  min-height: 30px;
  margin-bottom: 12px;
  color: #a33a2a;
  font-weight: 800;
}

.form-message.success {
  color: var(--primary);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 15px 20px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.secondary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.privacy-text {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.closing-note {
  color: var(--primary);
  font-weight: 800;
  text-align: center;
}

.closing-note p {
  margin-bottom: 0;
}

.success-shell {
  min-height: 100vh;
}

.success-card {
  text-align: center;
}

.success-card h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
}

.button-stack {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.line-card-preview {
  margin: 28px 0 0;
}

.line-card-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(38, 56, 44, 0.08);
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 48px);
    padding-top: 34px;
  }

  .reader-tools {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 44px;
  }

  .font-controls {
    width: 100%;
  }

  .font-controls button {
    flex: 1;
  }

  .brand-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .subscribe-form,
  .success-card {
    padding: 24px;
  }
}
