.dp-app { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
.dp-app h1 { font-size: 1.5rem; font-weight: 700; margin: 24px 0 16px; }

.studio { display: flex; gap: 24px; align-items: flex-start; }
.studio .result { flex: 1; min-width: 0; position: sticky; top: 16px; }
.studio .panel { flex: 0 0 380px; }

.result-empty { padding: 32px 24px; text-align: center; color: #666; border: 2px dashed #ddd; border-radius: 8px; }
.result-live { border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat { background: #f7faf8; border-radius: 6px; padding: 12px; }
.stat-label { font-size: .75rem; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: #1a6b4a; margin-top: 2px; }
.stat-value.warn { color: #b45309; }

.chart-wrap { margin: 16px 0; }
.chart-wrap svg { width: 100%; height: auto; display: block; }

.payoff-order { margin: 12px 0; }
.payoff-order h3 { font-size: .85rem; font-weight: 600; margin: 0 0 6px; }
.payoff-list { list-style: none; padding: 0; margin: 0; }
.payoff-list li { font-size: .85rem; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.payoff-list li:last-child { border-bottom: 0; }

.warnings { margin-top: 8px; }
.warn-msg { font-size: .8rem; color: #b45309; background: #fff7ed; padding: 8px 10px; border-radius: 4px; margin: 4px 0; }

/* Debt inputs */
.debts { display: flex; flex-direction: column; gap: 8px; }
.debt-row { display: flex; gap: 6px; align-items: flex-start; }
.debt-fields { display: grid; grid-template-columns: 1fr 1fr 0.7fr 1fr; gap: 6px; flex: 1; min-width: 0; }
.debt-fields input { font-size: .9rem; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; width: 100%; box-sizing: border-box; }
.debt-fields input:focus { border-color: #1a6b4a; outline: none; box-shadow: 0 0 0 2px rgba(26,107,74,.15); }
.debt-remove { background: none; border: none; font-size: 1.2rem; color: #999; cursor: pointer; padding: 8px 4px; line-height: 1; }
.debt-remove:hover { color: #c00; }

.add-debt { font-size: .85rem; color: #1a6b4a; text-decoration: none; display: inline-block; margin: 4px 0 16px; }
.add-debt:hover { text-decoration: underline; }

.ctrl { margin-bottom: 14px; }
.ctrl label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; color: #333; }
.ctrl input { font-size: .9rem; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; width: 100%; box-sizing: border-box; }
.ctrl input:focus { border-color: #1a6b4a; outline: none; box-shadow: 0 0 0 2px rgba(26,107,74,.15); }

.method-ctrl { margin-bottom: 20px; }
.method-toggle { display: flex; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.method-btn { flex: 1; padding: 8px; font-size: .85rem; font-weight: 500; border: none; background: #fff; cursor: pointer; color: #333; transition: background .15s, color .15s; }
.method-btn:first-child { border-right: 1px solid #ccc; }
.method-btn.active { background: #1a6b4a; color: #fff; }
.method-desc { font-size: .75rem; color: #888; margin: 4px 0 0; }

a.dl,
a.dl-again { display: inline-block; padding: 12px 28px; background: #1a6b4a; color: #fff; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 1rem; text-align: center; }
a.dl:hover { background: #155d3f; }
a.dl-again { background: #f5f5f5; color: #333; font-size: .85rem; padding: 8px 18px; }
a.dl-again:hover { background: #eee; }

#buy { display: block; text-align: center; width: 100%; box-sizing: border-box; }
#buy.inert { opacity: .4; pointer-events: none; }

/* Order page */
.order { max-width: 480px; margin: 40px auto; text-align: center; }
.order h1 { font-size: 1.5rem; }
.order-date { font-size: 1.1rem; color: #1a6b4a; font-weight: 600; margin: 8px 0 20px; }
.order .dl, .order .dl-again { display: block; width: max-content; max-width: 100%; box-sizing: border-box; margin: 0 auto 12px; }
.new-plan { display: inline-block; color: #1a6b4a; font-size: .85rem; text-decoration: none; margin-top: 8px; }
.new-plan:hover { text-decoration: underline; }
.sent { font-size: .85rem; color: #666; margin-top: 20px; }

/* Paywall */
.dp-pay { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
.dp-back { font-size: .85rem; color: #1a6b4a; text-decoration: none; display: inline-block; margin: 16px 0 12px; }
.dp-back:hover { text-decoration: underline; }
.pay-grid { display: flex; gap: 24px; align-items: flex-start; }
.pay-art { flex: 1; min-width: 0; }
.pay-art h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; }
#pay-summary .stat { display: inline-block; margin-right: 16px; }

.pay-box { flex: 0 0 380px; }
.pay-price { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.pay-price span { font-size: .95rem; color: #333; }
.pay-price b { font-size: 1.5rem; font-weight: 700; }
.pay-mail { font-size: .8rem; color: #666; margin: 4px 0 0; }

/* Footer */
.foot { border-top: 1px solid #eee; padding: 24px 16px; margin-top: 32px; }
.foot .wrap { max-width: 960px; margin: 0 auto; }
.foot .links { font-size: .8rem; display: flex; gap: 16px; }
.foot .links a { color: #666; text-decoration: none; }
.foot .links a:hover { text-decoration: underline; }
.disclaimer { font-size: .7rem; color: #999; margin: 8px 0 0; }

/* Responsive */
@media (max-width: 700px) {
  .studio { flex-direction: column-reverse; }
  .studio .panel { flex: none; width: 100%; }
  .studio .result { position: static; width: 100%; }
  .debt-fields { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .pay-grid { flex-direction: column; }
  .pay-box { flex: none; width: 100%; }
}
.debt-f { display: block; min-width: 0; }
.debt-f span { display: block; margin: 0 0 3px; font-size: 12px; font-weight: 600; color: #52606d; }
.debt-f input { width: 100%; box-sizing: border-box; }
.debt-remove { margin-top: 17px; }
@media (min-width: 861px) { .debt-row + .debt-row .debt-f span { display: none; } .debt-row + .debt-row .debt-remove { margin-top: 0; } }
