/* Isolated counter generator styles: existing styles.css stays unchanged. */
.counter-tool-shell{display:grid;gap:18px;padding-bottom:38px}
.counter-tool-shell .toolbox{min-width:0}
.counter-tool-shell .toolbox h2{margin:0 0 14px}
.counter-section-title{font-size:22px;letter-spacing:-.035em}
.counter-service-status{padding:13px 15px;border:1px solid #d2dfe0;border-radius:12px;background:#f6faf9;color:#334155;font-size:13px;line-height:1.5;margin-bottom:22px}
.counter-service-status[data-state=paused]{background:#fff9ec;border-color:#eed6a7;color:#735218}
.counter-service-status[data-state=ready]{background:#edf9f1;border-color:#bde4cf;color:#165c34}
.counter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.counter-fields .field{min-width:0}
.counter-fields .field:first-child{grid-column:1/-1}
.counter-fields input,.counter-fields select,.counter-recovery input{width:100%;min-width:0}
.counter-fields input[type=color]{height:46px;width:100%;padding:5px;cursor:pointer}
.counter-fields input[type=range]{padding:0;accent-color:var(--brand)}
.counter-fields small{font-size:11px;line-height:1.5;color:#667085}
.counter-preview-area{margin-top:22px;border-radius:16px;padding:18px;border:1px solid #d8e4df;background:linear-gradient(135deg,#f7faf9,#edf4f1)}
.counter-preview-area>strong{display:block;font-size:12px;color:#526675;margin-bottom:12px}
.counter-preview{display:flex;align-items:center;justify-content:center;min-height:92px;border-radius:12px;background:#fff;border:1px dashed #c5d6d0;padding:12px;overflow-wrap:anywhere;max-width:100%}
.counter-preview>span{max-width:100%}
.counter-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px}
.counter-create-panel{margin-top:22px}
.counter-create-panel button:disabled{cursor:not-allowed;opacity:.5}
.counter-created,.counter-recovery{display:grid;gap:12px}
/* A hidden success panel must not be displayed before a real registration. */
.counter-created[hidden]{display:none!important}
.counter-created p,.counter-recovery p{margin:0;color:#586474;line-height:1.55;font-size:13px}
.counter-tool-shell textarea{width:100%;font-size:12px;line-height:1.5;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere;resize:vertical;background:#f7faf9;border:1px solid #d4e0dc;border-radius:12px;padding:13px}
#counterMessage,#counterCreatedMessage,#counterRecoveryMessage{font-size:12px;line-height:1.5;min-height:1em;margin:12px 0 0;color:#296052;overflow-wrap:anywhere}
#counterMessage[data-error=true],#counterCreatedMessage[data-error=true],#counterRecoveryMessage[data-error=true]{color:#aa3028}
#counterTurnstile{min-height:0}
.counter-recovery .field{margin-top:4px}
@media(max-width:640px){
.counter-fields{grid-template-columns:1fr}
.counter-fields .field:first-child{grid-column:auto}
.counter-tool-shell{gap:12px}
.counter-preview-area{padding:13px}
.counter-preview{padding:9px}
.counter-actions>*{width:100%}
}

/* A transparent widget has no colored background; show light text on a dark preview surface. */
.counter-preview[data-dark-preview="true"]{background:#172033;border-color:#66758b}
.counter-background-field .counter-transparent-option{display:flex;align-items:center;gap:9px;margin-top:11px;cursor:pointer;font-weight:500;font-size:13px;line-height:1.4}
.counter-background-field .counter-transparent-option input{width:17px;height:17px;flex:none;accent-color:#087c72;margin:0}
.counter-fields input[type=color]:disabled{opacity:.35;cursor:not-allowed}
.counter-existing{display:grid;gap:13px}
.counter-existing p{margin:0;color:#586474;line-height:1.55;font-size:13px}
.counter-existing-result[hidden]{display:none!important}
.counter-existing-result .field{margin-top:12px}
#counterExistingMessage{font-size:12px;min-height:1em;line-height:1.5;margin:0;color:#296052;overflow-wrap:anywhere}
#counterExistingMessage[data-error=true]{color:#aa3028}

/* Counter header: selected user-approved design, lossless alpha through lightweight WebP. */
.counter-showcase{max-width:1060px;text-align:center;margin:9px auto 4px}
.counter-showcase img{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:1600/533;margin:0 auto;object-fit:contain}
.counter-showcase + .counter-tool-shell{padding-top:12px}
.counter-service-status[data-state=ready]{background:#f6faf9;border-color:#dae5df;color:#51635c}
@media(max-width:620px){
.counter-showcase{margin:10px auto 6px}
.counter-showcase + .counter-tool-shell{padding-top:8px}
}
