:root{
  --apc3-bg: #fcf8f3;
  --apc3-card: rgba(255,255,255,0.82);
  --apc3-border: #e8d8c3;
  --apc3-text: #1f1b3a;
  --apc3-muted: #6d6684;
  --apc3-accent: linear-gradient(135deg, #8a5b2b 0%, #c48b3a 100%);
  --apc3-accent-solid: #8a5b2b;
  --apc3-soft: #f6efe6;
  --apc3-soft-2: #f9f3ec;
  --apc3-shadow: 0 18px 45px rgba(66, 34, 10, 0.08);
  --apc3-radius: 22px;
  --apc3-radius-sm: 14px;
  --apc3-white: #ffffff;
}

.apc3-wrap * {
  box-sizing: border-box;
}

.apc3-wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--apc3-text);
}

.apc3-card {
  background: var(--apc3-card);
  border: 1px solid var(--apc3-border);
  border-radius: 24px;
  padding: 18px 18px 24px;
  box-shadow: var(--apc3-shadow);
  backdrop-filter: blur(8px);
}

.apc3-badge,
.apc3-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f7eee4;
  border: 1px solid #ecdac2;
  color: #9b6226;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0 auto 18px;
}

.apc3-card,
.apc3-result-card {
  text-align: center;
}

.apc3-title,
.apc3-result-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 16px;
  color: #1d1b4f;
  font-weight: 700;
}

.apc3-subtitle,
.apc3-result-summary {
  max-width: 760px;
  margin: 0 auto 26px;
  color: var(--apc3-muted);
  font-size: 15.5px;
  line-height: 1.95;
}

.apc3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.apc3-field {
  text-align: left;
}

.apc3-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2b2457;
}

.apc3-field input,
.apc3-field select {
  width: 100%;
  height: 52px;
  border: 1px solid #d9d5e8;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  background: #fff;
  color: #2c2850;
  transition: all .2s ease;
}

.apc3-field input:focus,
.apc3-field select:focus {
  outline: none;
  border-color: #b88b4a;
  box-shadow: 0 0 0 3px rgba(196, 139, 58, 0.12);
}

.apc3-advanced-toggle {
  margin: 18px auto 18px;
  color: #7f4c1c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  cursor: pointer;
  user-select: none;
}

.apc3-advanced-box {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #eee2d2;
  border-radius: 18px;
  background: #fcf8f3;
}

.apc3-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  height: 56px;
  padding: 0 18px;
  background: var(--apc3-accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .14em;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(138, 91, 43, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.apc3-submit:hover {
  transform: translateY(-1px);
}

.apc3-loading {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff7ef;
  border: 1px solid #ecdcc8;
  color: #8a5b2b;
  font-weight: 600;
}

.apc3-result-card {
  margin-top: 22px;
  border: 1px solid #eadfef;
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  padding: 18px 16px 20px;
  box-shadow: 0 16px 40px rgba(78, 57, 126, 0.05);
}

.apc3-synthesis-box,
.apc3-inline-hook,
.apc3-calc-card,
.apc3-followup-box {
  text-align: left;
  background: #fffaf5;
  border: 1px solid #ebddcf;
  border-radius: 18px;
  padding: 22px;
  margin: 0 0 18px;
}

.apc3-synthesis-box h4,
.apc3-inline-hook h4,
.apc3-calc-card h4,
.apc3-followup-box h4,
.apc3-mini-card h4,
.apc3-long-card h4,
.apc3-cta-box h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.35;
  margin: 0 0 14px;
  color: #2a234d;
}

.apc3-synthesis-box p,
.apc3-inline-hook p,
.apc3-calc-card p,
.apc3-followup-box p,
.apc3-mini-card p,
.apc3-long-card p,
.apc3-cta-box p,
.apc3-mini-card li,
.apc3-meter-note {
  color: #5e5675;
  font-size: 15px;
  line-height: 2;
  margin: 0 0 14px;
}

.apc3-meter-box {
  background: #f8f3eb;
  border-radius: 18px;
  padding: 18px;
  margin: 0 auto 18px;
  max-width: 860px;
}

.apc3-meter-label {
  font-size: 14px;
  font-weight: 700;
  color: #2c2850;
  margin-bottom: 12px;
}

.apc3-meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e8dccf;
  overflow: hidden;
  margin-bottom: 10px;
}

.apc3-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--apc3-accent);
}

.apc3-action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px auto 24px;
  max-width: 860px;
}

.apc3-mini-btn,
.apc3-calc-toggle {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #d9c8b7;
  background: #faf6f1;
  color: #7b4d21;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  cursor: pointer;
  padding: 12px 14px;
}

.apc3-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 18px;
}

.apc3-mini-card,
.apc3-long-card,
.apc3-cta-box {
  text-align: left;
  background: #fffdfb;
  border: 1px solid #ebddcf;
  border-radius: 18px;
  padding: 22px;
}

.apc3-mini-card ul {
  margin: 0;
  padding-left: 18px;
}

.apc3-chip-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.apc3-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8a5b2b 0%, #c48b3a 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.apc3-chip.soft {
  background: linear-gradient(135deg, #cfa36d 0%, #e7c79b 100%);
  color: #3b2c1f;
}

.apc3-followup-list {
  display: grid;
  gap: 12px;
}

.apc3-followup-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8f2ea;
  border: 1px solid #ead7c2;
  color: #5d452e;
  font-size: 14px;
  font-weight: 600;
}

.apc3-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.apc3-btn-primary,
.apc3-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: all .2s ease;
}

.apc3-btn-primary {
  background: var(--apc3-accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(138, 91, 43, 0.22);
}

.apc3-btn-secondary {
  background: #f5ede4;
  color: #7b4d21;
  border: 1px solid #e4d0b9;
}

.apc3-btn-primary:hover,
.apc3-btn-secondary:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .apc3-card,
  .apc3-result-card {
    padding: 16px 14px 18px;
    border-radius: 18px;
  }

  .apc3-grid,
  .apc3-two-col {
    grid-template-columns: 1fr;
  }

  .apc3-title,
  .apc3-result-title {
    font-size: 2rem;
  }

  .apc3-subtitle,
  .apc3-result-summary,
  .apc3-synthesis-box p,
  .apc3-inline-hook p,
  .apc3-calc-card p,
  .apc3-followup-box p,
  .apc3-mini-card p,
  .apc3-long-card p,
  .apc3-cta-box p,
  .apc3-mini-card li {
    font-size: 14px;
    line-height: 1.85;
  }

  .apc3-synthesis-box h4,
  .apc3-inline-hook h4,
  .apc3-calc-card h4,
  .apc3-followup-box h4,
  .apc3-mini-card h4,
  .apc3-long-card h4,
  .apc3-cta-box h4 {
    font-size: 1.2rem;
  }

  .apc3-cta-buttons {
    flex-direction: column;
  }

  .apc3-btn-primary,
  .apc3-btn-secondary {
    width: 100%;
  }
}