/* App shell — warm gradient atmosphere */
body {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(232, 223, 200, 0.45), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 50%, rgba(232, 237, 229, 0.5), transparent 50%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(240, 235, 228, 0.6), transparent 45%),
    linear-gradient(180deg, #f8f6f3 0%, var(--bg-primary) 40%, #f0ebe4 100%);
}

.app-shell {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.page {
  padding: 0 24px 48px;
  animation: pageIn 0.5s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 8px;
}

.nav-brand {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* Hero — minimal brand */
.hero-section {
  text-align: center;
  padding: 32px 0 28px;
}

.hero-brand {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Section labels */
.section-label {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 2px;
  text-align: center;
  margin: 20px 0 16px;
}

/* Entry cards */
.entry-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.entry-card:not(.entry-card--disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.card-cpti::before {
  background: linear-gradient(90deg, var(--sage), var(--sage-light));
}

.card-need::before {
  background: linear-gradient(90deg, #d4c5a0, #e8dfc8);
}

.card-judge::before {
  background: linear-gradient(90deg, var(--text-light), #c8c8c8);
}

.entry-card--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.entry-card--disabled:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

.card-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 10px;
}

.card-badge--free {
  background: var(--bg-green-soft);
  color: var(--sage-dark);
}

.card-badge--paid {
  background: rgba(212, 197, 160, 0.25);
  color: #8a7a5a;
}

.card-badge--soon {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-light);
}

.card-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--sage);
  font-weight: 500;
}

.card-cta::after {
  content: '→';
}

.card-cta--continue {
  color: var(--sage-dark);
}

.card-cta--continue::before {
  content: '✎ ';
  font-size: 12px;
}

.card-cta--disabled {
  color: var(--text-light);
}

.card-cta--disabled::after {
  content: none;
}

/* History records */
.records-section {
  margin-top: 4px;
}

.record-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-soft);
}

.record-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.record-info {
  flex: 1;
  min-width: 0;
}

.record-name {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.record-date {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.record-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
}

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

.btn--primary:hover {
  background: var(--sage-dark);
}

.btn--secondary {
  background: var(--bg-green-soft);
  color: var(--sage-dark);
}

.btn--secondary:hover {
  background: var(--sage-light);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.btn--ghost:hover {
  border-color: var(--text-light);
}

.btn--sm {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 100px;
}

.btn--sm.btn--secondary {
  font-weight: 500;
}

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

.btn--sm.btn--paid {
  color: #c4956a;
  border-color: rgba(196, 150, 106, 0.3);
}

.btn--sm.btn--paid:hover {
  background: rgba(196, 150, 106, 0.08);
}

/* Placeholder / sub pages */
.page-header {
  padding: 24px 0 20px;
  text-align: center;
}

.page-title {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.page-placeholder {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.page-placeholder__icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.page-placeholder__text {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--sage);
  margin-bottom: 16px;
}

.back-link::before {
  content: '←';
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal__title {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: 12px;
}

.modal__body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  pointer-events: none;
  width: calc(100% - 48px);
  max-width: 380px;
}

.toast {
  background: rgba(61, 61, 61, 0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.footer-section {
  text-align: center;
  padding: 24px 0 16px;
  border-top: 1px solid var(--border-soft);
  margin-top: 24px;
}

.footer-text {
  font-size: 12px;
  color: var(--text-light);
}

/* Loading */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-light);
  font-size: 14px;
}

.all-done-msg {
  text-align: center;
  padding: 28px 16px;
  margin-bottom: 8px;
}

.all-done-msg .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.all-done-msg .text {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--text-secondary);
}

/* ===== CPTI ===== */
.page-cpti {
  padding-bottom: 64px;
}

.cpti-guide {
  padding: 16px 0 32px;
}

.cpti-guide__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  background: var(--bg-green-soft);
  color: var(--sage-dark);
  margin-bottom: 16px;
}

.cpti-guide__title {
  font-family: var(--font-title);
  font-size: 24px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.cpti-guide__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.cpti-guide__dims {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.cpti-guide__dims li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  line-height: 1.6;
}

.cpti-guide__dims strong {
  color: var(--text-primary);
  font-weight: 500;
}

.cpti-guide__hint {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.cpti-guide__start,
.cpti-guide__resume,
.cpti-guide__view {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.cpti-progress {
  height: 4px;
  background: rgba(138, 154, 123, 0.15);
  border-radius: 4px;
  margin: 8px 0 28px;
  overflow: hidden;
}

.cpti-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--sage-light));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.cpti-quiz {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 28px 20px;
  box-shadow: var(--shadow-soft);
}

.cpti-quiz__text {
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 28px;
  text-align: center;
}

.cpti-slider-wrap {
  margin-bottom: 32px;
}

.cpti-slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.cpti-slider-label {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cpti-slider-label--left {
  text-align: left;
}

.cpti-slider-label--right {
  text-align: right;
}

.cpti-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--sage-light), var(--bg-warm));
  outline: none;
  margin: 8px 0;
}

.cpti-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--sage);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.cpti-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--sage);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.cpti-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
}

.cpti-quiz__actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.cpti-quiz__actions .btn {
  flex: 1;
}

.cpti-quiz__actions .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Result */
.page-cpti--result {
  padding-bottom: 80px;
}

.cpti-result-hero {
  text-align: center;
  padding: 24px 16px 28px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.cpti-result-code {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 6px;
  color: var(--sage-dark);
  margin-bottom: 8px;
}

.cpti-result-dims {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.cpti-result-name {
  font-family: var(--font-title);
  font-size: 26px;
  margin-bottom: 8px;
}

.cpti-result-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cpti-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.cpti-section__title {
  font-family: var(--font-title);
  font-size: 15px;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--sage);
}

.cpti-section__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cpti-section__hint {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.cpti-dim-row {
  margin-bottom: 16px;
}

.cpti-dim-row:last-child {
  margin-bottom: 0;
}

.cpti-dim-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.cpti-dim-pole {
  color: var(--text-light);
}

.cpti-dim-pole--active {
  color: var(--sage-dark);
  font-weight: 500;
}

.cpti-dim-track {
  display: flex;
  height: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-warm);
}

.cpti-dim-fill--left {
  background: var(--sage-light);
  transition: width 0.4s ease;
}

.cpti-dim-fill--right {
  background: var(--sage);
  transition: width 0.4s ease;
}

.cpti-need-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-green-soft);
  border-radius: 12px;
}

.cpti-need-box__title {
  font-family: var(--font-title);
  font-size: 13px;
  color: var(--sage-dark);
  margin-bottom: 6px;
}

.cpti-need-box__text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cpti-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-soft);
}

.cpti-match:last-child {
  margin-bottom: 0;
}

.cpti-match--best {
  background: rgba(232, 237, 229, 0.6);
}

.cpti-match--grow {
  background: rgba(240, 235, 228, 0.8);
}

.cpti-match--friction {
  background: rgba(245, 240, 240, 0.8);
}

.cpti-match__info {
  flex: 1;
  min-width: 0;
}

.cpti-match__type {
  font-family: var(--font-title);
  font-size: 14px;
  margin-bottom: 4px;
}

.cpti-match__code {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.cpti-match__note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cpti-match__score {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--sage-dark);
  flex-shrink: 0;
}

.cpti-section--cta {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 0 0;
}

.cpti-cta-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cpti-cta-btn:hover {
  transform: translateY(-1px);
}

.cpti-cta-btn--share {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.cpti-cta-btn--pay {
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(107, 125, 94, 0.25);
}

.cpti-cta-btn__label {
  display: block;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 500;
}

.cpti-cta-btn--pay .cpti-cta-btn__label {
  color: #fff;
}

.cpti-cta-btn__sub {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.75;
}

.cpti-retry {
  width: 100%;
  margin-top: 8px;
}

/* ── Pay page ── */
.page-pay .page-header,
.page-need .page-header {
  margin-bottom: 20px;
}

.pay-product__card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
}

.pay-product__icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.pay-product__name {
  font-family: var(--font-title);
  font-size: 20px;
  margin-bottom: 8px;
}

.pay-product__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.pay-product__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-need, #6b8f71);
}

.pay-channels__label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.pay-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  margin-bottom: 20px;
}

.pay-channel--selected {
  border-color: #07c160;
  background: rgba(7, 193, 96, 0.06);
}

.pay-channel__icon {
  font-size: 24px;
}

.pay-submit {
  width: 100%;
}

.pay-error {
  color: #c44;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

.pay-triage__progress {
  height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.pay-triage__bar {
  height: 100%;
  background: var(--accent-need, #6b8f71);
  transition: width 0.3s ease;
}

.pay-triage__step {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.pay-triage__title {
  font-family: var(--font-title);
  font-size: 20px;
  margin-bottom: 8px;
}

.pay-triage__hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pay-triage__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pay-option {
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pay-option--selected {
  border-color: var(--accent-need, #6b8f71);
  background: rgba(107, 143, 113, 0.08);
}

.pay-triage__next {
  width: 100%;
}

/* ── Need card Step 1 ── */
.need-guide {
  text-align: center;
  padding: 12px 0 24px;
}

.need-guide__badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent-need, #6b8f71);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.need-guide__title {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 12px;
}

.need-guide__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: left;
}

.need-guide__list {
  text-align: left;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 28px;
  padding-left: 20px;
}

.need-guide__start {
  width: 100%;
}

.need-step__hint {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.need-avatar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.need-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
}

.need-avatar--selected {
  border-color: var(--accent-need, #6b8f71);
  background: rgba(107, 143, 113, 0.06);
}

.need-avatar__circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0ebe4, #e8ede5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.need-avatar__name {
  font-family: var(--font-title);
  font-size: 16px;
}

.need-progress {
  position: relative;
  height: 8px;
  background: var(--border-soft);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.need-progress__bar {
  height: 100%;
  background: var(--accent-need, #6b8f71);
  transition: width 0.3s ease;
}

.need-progress__label {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 12px;
  color: var(--text-light);
}

.need-dim {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg-card);
}

.need-dim__head {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.need-dim__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.need-dim__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.need-chip {
  font-size: 11px;
  color: var(--text-light);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1.4;
}

.need-dim__body {
  padding: 0 14px 14px;
}

.need-dim__input-row {
  display: flex;
  gap: 8px;
}

.need-dim__input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.need-written-list {
  margin: 20px 0;
}

.need-written-list__title {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.need-written {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.need-written__tag {
  font-size: 10px;
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.need-written__text {
  flex: 1;
  font-size: 14px;
}

.need-written__remove {
  border: none;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
}

.need-attach {
  text-align: center;
  padding: 24px 0;
}

.need-attach__avatar {
  font-size: 48px;
  margin-bottom: 16px;
}

.need-attach__bubble {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
}

.need-attach__msg {
  font-family: var(--font-title);
  font-size: 16px;
  margin-bottom: 16px;
}

.need-attach__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.need-attach__tags--animate .need-attach-tag {
  animation: tagAttach 0.5s ease backwards;
}

.need-attach-tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color) 15%, white);
  border: 1px solid var(--tag-color);
  animation-delay: calc(var(--i, 0) * 0.08s);
}

@keyframes tagAttach {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.need-prioritize {
  text-align: center;
  padding: 32px 0;
}

.need-prioritize__title {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 16px;
}

.need-prioritize__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.need-swipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.need-swipe-card__dim {
  font-size: 12px;
  margin-bottom: 12px;
}

.need-swipe-card__text {
  font-size: 18px;
  font-family: var(--font-title);
  line-height: 1.6;
  margin-bottom: 24px;
}

.need-swipe-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.need-swipe-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 14px;
}

.need-swipe-btn--keep {
  border-color: var(--accent-need, #6b8f71);
  color: var(--accent-need, #6b8f71);
}

.need-swipe-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

.need-kept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.need-kept-tag,
.need-kept-list--inline .need-kept-tag {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 999px;
}

.need-top3-status {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.need-pick-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.need-pick-card {
  text-align: left;
  padding: 16px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
}

.need-pick-card--selected {
  border-color: var(--accent-need, #6b8f71);
  background: rgba(107, 143, 113, 0.06);
}

.need-pick-card__dim {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.need-pick-card__text {
  font-size: 16px;
  font-family: var(--font-title);
}

.need-ai-placeholder {
  text-align: center;
  padding: 48px 0;
}

.need-ai-placeholder__icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.need-ai-placeholder__title {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 12px;
}

.need-ai-placeholder__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.back-link--btn {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.page-need .btn--primary,
.page-pay .btn--primary,
.need-step .btn--primary {
  width: 100%;
}

/* Need AI dialog */
.page-need-ai .need-ai-loading {
  text-align: center;
  padding: 64px 0;
}

.need-ai-loading__spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--border-subtle, #e8e8ed);
  border-top-color: var(--accent, #8a9a7b);
  border-radius: 50%;
  animation: need-ai-spin 0.8s linear infinite;
}

@keyframes need-ai-spin {
  to { transform: rotate(360deg); }
}

.need-ai-loading__text {
  font-size: 15px;
  color: var(--text-primary);
}

.need-ai-loading__hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.need-ai-dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.need-ai-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.need-ai-msg {
  display: flex;
}

.need-ai-msg--bot {
  justify-content: flex-start;
}

.need-ai-msg--user {
  justify-content: flex-end;
}

.need-ai-msg__bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.need-ai-msg--bot .need-ai-msg__bubble {
  background: #f5f5f7;
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.need-ai-msg--user .need-ai-msg__bubble {
  background: var(--accent, #8a9a7b);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.need-ai-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.need-ai-opt {
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle, #e8e8ed);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.need-ai-opt:hover {
  border-color: var(--accent, #8a9a7b);
}

.need-ai-opt--selected {
  border-color: var(--accent, #8a9a7b);
  background: rgba(138, 154, 123, 0.08);
}

.need-ai-custom__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle, #e8e8ed);
  border-radius: 12px;
  font-size: 14px;
}

/* Need report */
.need-report {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 32px;
}

.need-report-briefing {
  background: linear-gradient(135deg, #f5f5f7 0%, #eef1ea 100%);
  border-radius: 16px;
  padding: 20px;
}

.need-report-briefing__headline {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 16px;
}

.need-report-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.need-report-metric {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.need-report-metric__label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.need-report-metric__value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}

.need-report-metric__sub {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

.need-report-stars {
  color: #e6a817;
  letter-spacing: 1px;
}

.need-report-top3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.need-report-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-subtle, #e8e8ed);
}

.need-report-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.need-report-section__title {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: 12px;
}

.need-report-subtitle {
  font-size: 15px;
  margin: 16px 0 8px;
}

.need-report-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.need-report-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.need-report-item__note {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.need-report-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 12px;
  font-size: 14px;
}

.need-report-highlight {
  font-weight: 600;
  color: var(--accent, #8a9a7b);
}

.need-report-muted {
  font-size: 13px;
  color: var(--text-secondary);
}

.need-report-alt__reason {
  font-size: 12px;
  color: var(--text-secondary);
}

.need-report-promo {
  background: #fff8eb;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
}

.need-report-promo__cta {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: #e68a00;
}

.need-report-home {
  width: 100%;
  text-align: center;
  display: block;
}
