#billing-dialog{width:min(760px,calc(100% - 24px));max-height:90svh}
.credit-summary{display:flex;gap:24px;align-items:center;border-bottom:1px solid var(--border);padding:12px 0 24px}
.credit-summary strong{font-size:30px;display:block}.credit-summary small{display:block;color:var(--muted)}
.billing-test{padding:10px 12px;background:#fff4d6;color:#725200;border:1px solid #ebd999;font-size:13px;border-radius:4px}
.billing-section{padding:24px 0;border-bottom:1px solid var(--border)}
.billing-section h3{font-size:16px;margin:0 0 16px}
.credit-packages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.credit-package{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--border);border-radius:6px;cursor:pointer;margin:0;min-width:0}
.credit-package:has(input:checked){border-color:var(--green);background:#eff8f4}
.credit-package input{width:18px;height:18px;flex-shrink:0;accent-color:var(--green)}
.credit-package span{min-width:0;display:block}.credit-package strong{display:block;font-size:15px}.credit-package span span{font-size:14px;font-weight:400;margin-top:6px}
.credit-rules{font-size:12px;color:var(--muted);line-height:1.6}
.credit-order{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--border);font-size:13px}
.credit-order small,.credit-movement small{display:block;color:var(--muted);font-size:11px;margin-top:5px}
.credit-order-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.credit-order-actions .button{font-size:12px}
.credit-movement{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border);font-size:13px}
.credit-positive{color:var(--green)}
#open-credits{white-space:nowrap;min-width:174px}
@media(max-width:650px){.workspace header>div:first-child{display:none}.workspace header{height:auto;min-height:62px;padding:12px 18px}.account-controls{width:100%;justify-content:space-between;gap:6px}.credit-order{align-items:flex-start;flex-direction:column}.credit-package{padding:12px;gap:8px}.credit-package strong{font-size:13px}#open-credits .credit-label{display:none}}
@media(max-width:360px){.credit-packages{grid-template-columns:1fr}.credit-package>span{display:flex;flex:1;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px}.credit-package span span{margin-top:0}}
/* Included allowances and purchased credits remain separate. */
.plan-heading, .plan-limit > div { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.plan-limit { margin:16px 0; }
.plan-limit > div { flex-wrap:wrap; font-size:13px; }
.plan-limit progress { display:block; width:100%; height:9px; margin:9px 0 6px; border:0; border-radius:3px; overflow:hidden; accent-color:#339b82; background:#e4e7e9; }
.plan-limit progress::-webkit-progress-bar { background:#e4e7e9; }
.plan-limit progress::-webkit-progress-value { background:#339b82; }
.plan-limit progress::-moz-progress-bar { background:#339b82; }
.plan-limit small { color:var(--muted); font-size:12px; }
.plan-actions { display:flex; flex-wrap:wrap; gap:10px; }
.plan-actions button { white-space:normal; }
.editorial-summary { padding:16px 0; border-bottom:1px solid var(--border); margin-bottom:20px; }
.editorial-summary h3 { font-size:15px; margin:0 0 8px; }
.editorial-summary p { font-size:14px; line-height:1.6; margin:6px 0; overflow-wrap:anywhere; }
.editorial-refinement { margin:20px 0; padding-bottom:20px; border-bottom:1px solid var(--border); }
.editorial-refinement summary { cursor:pointer; font-size:14px; font-weight:600; }
.editorial-refinement form { margin-top:16px; }
.editorial-refinement p { font-size:12px; line-height:1.5; }
#create-form label[for="prompt"] { margin-top:18px; }
#create-form .form-footer { flex-wrap:wrap; gap:12px; }
#detail .detail-actions { display:flex; flex-wrap:wrap; gap:8px; max-width:100%; }
#refresh[aria-busy="true"] svg { animation:library-refresh 1s linear infinite; }
@keyframes library-refresh { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { #refresh[aria-busy="true"] svg { animation:none; } }
@media(max-width:650px) { .account-controls { flex-wrap:wrap; } #open-credits { max-width:100%; font-size:12px; } }
