html[data-theme="purple"]{color-scheme:dark;--bg:#0b0b10;--panel:#15121d;--panel2:#1e1829;--purple:#a76cff;--purple2:#673090;--text:#f6f3fa;--muted:#bdb3ca;--line:#435262;--accent:#a76cff;}
html[data-theme="ems-blue"]{color-scheme:dark;--bg:#07101a;--panel:#0d1824;--panel2:#132233;--purple:#5ca9ff;--purple2:#16558e;--text:#f1f7ff;--muted:#adc0d3;--line:#435262;--accent:#5ca9ff;}
html[data-theme="teal"]{color-scheme:dark;--bg:#06110f;--panel:#0d201c;--panel2:#16352e;--purple:#48d8c0;--purple2:#116150;--text:#effbf7;--muted:#b2cec5;--line:#435262;--accent:#48d8c0;}
html[data-theme="redline"]{color-scheme:dark;--bg:#12090c;--panel:#24141a;--panel2:#351d25;--purple:#ff8297;--purple2:#8d233b;--text:#fff3f5;--muted:#d8b5bf;--line:#435262;--accent:#ff8297;}
html[data-theme="midnight"]{color-scheme:dark;--bg:#06070a;--panel:#101217;--panel2:#1d222b;--purple:#8d9cff;--purple2:#424f99;--text:#f3f5fa;--muted:#b2b9c5;--line:#435262;--accent:#8d9cff;}
html[data-theme="daylight"]{color-scheme:light;--bg:#f4f1f6;--panel:#ffffff;--panel2:#e9e4ef;--purple:#7c3fab;--purple2:#713495;--text:#23172e;--muted:#62546e;--line:#b6b1bc;--accent:#7c3fab;}
html[data-theme="night-shift"]{color-scheme:dark;--bg:#090e17;--panel:#111b28;--panel2:#1d2b3e;--purple:#f5cb77;--purple2:#765000;--text:#f3f5fa;--muted:#b5c4d4;--line:#435262;--accent:#f5cb77;}
html[data-theme="flight-medic"]{color-scheme:dark;--bg:#06121c;--panel:#0b2231;--panel2:#163548;--purple:#7bdaff;--purple2:#145b78;--text:#effaff;--muted:#b4ccdc;--line:#435262;--accent:#7bdaff;}
html[data-theme="rescue-squad"]{color-scheme:dark;--bg:#08130c;--panel:#12251a;--panel2:#233b28;--purple:#b4e887;--purple2:#38601d;--text:#f1faee;--muted:#b5cdb5;--line:#435262;--accent:#b4e887;}
html[data-theme="cardiac-monitor"]{color-scheme:dark;--bg:#050b09;--panel:#101b16;--panel2:#1a3024;--purple:#63f4a0;--purple2:#17663a;--text:#f0fcf5;--muted:#abcab9;--line:#435262;--accent:#63f4a0;}
html[data-theme="trauma-bay"]{color-scheme:light;--bg:#f7f3f4;--panel:#ffffff;--panel2:#f1e2e7;--purple:#a22545;--purple2:#8c1937;--text:#2d1420;--muted:#715461;--line:#b6b1bc;--accent:#a22545;}
html[data-theme="medic-unit"]{color-scheme:light;--bg:#f1f6fa;--panel:#ffffff;--panel2:#e0ecf5;--purple:#155f9a;--purple2:#114e80;--text:#152b40;--muted:#51677a;--line:#b6b1bc;--accent:#155f9a;}
header{background:var(--panel2);border-color:var(--line)}.sub,.qs span,.card h3,.recenttime,.footerinfo{color:var(--muted)}.logo{color:var(--purple2)}
input,select,textarea{background:var(--bg);color:var(--text);border:1px solid var(--line)}.secondary,.tabbtn,.chip,.qs,.filterbtn,dialog,.favstar{background:var(--panel);color:var(--text);border-color:var(--line)}
.primary,.tabbtn.active,.chip.on,.filterbtn.on{background:var(--purple2);color:white;border-color:var(--purple)}.tabs{grid-template-columns:repeat(6,minmax(0,1fr));background:var(--bg);gap:3px}.tabbtn{font-size:11px;min-height:44px}.pill{background:var(--panel2);color:var(--text)}.divider,.recentitem{border-color:var(--line)}
.report-toolbar{max-width:900px;margin:8px auto 0;display:flex;justify-content:flex-end}.report-toolbar button{padding:8px 12px;font-size:13px;min-height:40px}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:12px}.section-head h2{margin:0 0 12px}.protocol-copy{font-size:14px;color:var(--muted);line-height:1.5}.protocol-copy strong{color:var(--text)}
.protocol-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.protocol-controls label,.report-form label{font-size:14px;margin-bottom:6px}.mini-btn,.secondary-action,.close-btn{background:var(--panel2);border:1px solid var(--line);color:var(--text);font-size:14px;border-radius:12px;padding:10px 12px;min-height:44px}.protocol-links{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.protocol-links a{text-decoration:none;display:inline-flex;align-items:center}.protocol-reader{width:100%;height:70vh;min-height:400px;background:white;border:1px solid var(--line);border-radius:12px}
.dialog-body{padding:16px}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-head h2{font-size:19px}.report-form{display:grid;gap:12px}.report-form input,.report-form select,.report-form textarea{width:100%;border-radius:12px;padding:12px}.report-form textarea{min-height:100px;resize:vertical}.report-context,.report-status{font-size:13px;line-height:1.5;color:var(--muted);white-space:pre-wrap}.two-col{display:flex;gap:8px;flex-wrap:wrap}.action{background:var(--purple2);color:white}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--purple);outline-offset:3px}
html[data-theme="daylight"] .protocol,html[data-theme="trauma-bay"] .protocol,html[data-theme="medic-unit"] .protocol{color:#155f9a!important}
html[data-theme="daylight"] .recentanswer,html[data-theme="trauma-bay"] .recentanswer,html[data-theme="medic-unit"] .recentanswer{color:#17603f}
@media(max-width:500px){.protocol-controls{grid-template-columns:1fr}.headrow{gap:8px}.headrow>div:nth-child(2){min-width:0;flex:1}.headrow h1{font-size:18px}.offline{font-size:9px;max-width:82px}.logo{flex-shrink:0}.tabs{gap:2px}.tabbtn{padding:9px 2px;font-size:10px}}
