.companion { --cp-ink:#162b49; --cp-accent:#e65719; color:var(--cp-ink); max-width:1160px; margin:24px auto; padding:0 16px; }
.companion * { box-sizing:border-box; }
.companion h1 { font-size:clamp(1.8rem,4vw,2.8rem); line-height:1.15; margin:8px 0 16px; }
.companion h2 { font-size:1.2rem; margin:0 0 16px; }
.companion .cp-lead { color:#526176; max-width:760px; }
.cp-grid { display:grid; grid-template-columns:minmax(280px, .85fr) minmax(0,1.15fr); gap:24px; margin:24px 0; align-items:start; }
.cp-panel { background:#fff; border:1px solid #dce3eb; border-radius:18px; padding:24px; min-width:0; box-shadow:0 8px 24px #162b4908; }
.companion label { display:block; font-weight:600; font-size:.9rem; margin:16px 0 6px; }
.companion input:not([type=checkbox]), .companion textarea, .companion select { width:100%; padding:11px 12px; font:inherit; color:#162b49; background:#fff; border:1px solid #becbd8; border-radius:8px; }
.companion textarea { resize:vertical; }
.companion button, .companion .cp-link { display:inline-block; padding:11px 17px; border:1px solid #c5d0dd; border-radius:9px; font-family:inherit; font-size:.9rem; font-weight:600; background:#fff; color:var(--cp-ink); cursor:pointer; text-decoration:none; }
.companion .cp-primary { background:var(--cp-accent); color:white; border-color:var(--cp-accent); }
.companion button:disabled { opacity:.5; cursor:wait; }
.companion :focus-visible { outline:3px solid #3683cf; outline-offset:3px; }
.cp-actions,.cp-links { display:flex; gap:10px; flex-wrap:wrap; margin:18px 0; align-items:center; }
.cp-hint { color:#5e6c7e; font-size:.85rem; line-height:1.5; }
.cp-status { min-height:1.6em; overflow-wrap:anywhere; }
.cp-status.is-error { color:#b42318; }
.cp-stage { display:grid; place-items:center; min-height:340px; background:#f0f4f8; border-radius:12px; padding:20px; }
.cp-stage img { max-width:100%; max-height:600px; object-fit:contain; }
.cp-stage canvas { width:100%; max-width:520px; height:auto; }
.cp-results { padding:16px; background:#f0f4f8; border-radius:10px; overflow-wrap:anywhere; }
.cp-results li { margin:8px 0; }
.cp-wheel { position:relative; }
.cp-wheel::before { content:""; z-index:1; position:absolute; top:12px; left:calc(50% - 12px); border:12px solid transparent; border-top:28px solid #162b49; }
.cp-winner { font-size:1.8rem; font-weight:750; margin:20px 0; text-align:center; overflow-wrap:anywhere; }
.cp-history { max-height:250px; overflow:auto; }
.cp-print-title { text-align:center; font-size:1.4rem; margin:8px; }
@media(max-width:760px) { .cp-grid { grid-template-columns:1fr; } .cp-panel { padding:18px; } .cp-stage { min-height:240px; } }
html[data-theme="dark"] .companion { --cp-ink:#e3eaf4; }
html[data-theme="dark"] .cp-panel { background:#162235; border-color:#334155; }
html[data-theme="dark"] .cp-stage, html[data-theme="dark"] .cp-results { background:#0d1828; }
html[data-theme="dark"] .companion .cp-lead, html[data-theme="dark"] .companion .cp-hint { color:#bac7d8; }
html[data-theme="dark"] .companion button { background:#24364e; color:#e3eaf4; }
html[data-theme="dark"] .companion .cp-primary { background:#e65719; color:white; }
