/* Road safety: Safe Driver HUD, helmet/seatbelt step, MVD officer stop, lesson card and the road-safety panel.
   Colours follow career.css (deep green #173f35, cream #fff8e5, gold #e7b43c). */
#rs-hud [hidden],#rs-card [hidden]{display:none!important}
#rs-hud{position:fixed;left:104px;top:212px;z-index:1290;display:none;cursor:pointer;cursor:pointer;align-items:center;gap:8px;background:#173f35ee;color:#f0f5df;border:1px solid #ffffff40;border-radius:16px;padding:6px 10px 6px 6px;box-shadow:0 6px 20px #06201a55;font-family:inherit}
.rs-driving.career-live #rs-hud,.rs-walking.career-live #rs-hud{display:flex}
.rs-limit{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#fff;border:5px solid #c8231c;color:#111;font:900 15px/1 sans-serif;flex-shrink:0;transition:transform .2s}
#rs-hud.school .rs-limit{box-shadow:0 0 0 3px #ffd23a}
#rs-hud.over .rs-limit{animation:rs-pulse .7s infinite}
.rs-score{display:flex;flex-direction:column;line-height:1.05;min-width:74px}
.rs-score small{font-size:8.5px;letter-spacing:.09em;color:#cfe0a9}
.rs-score strong{font-size:20px;color:#ffd84a;font-variant-numeric:tabular-nums}
.rs-score span{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}
#rs-hud.over .rs-score span{color:#ff9a8a}
.rs-gear-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;flex-shrink:0}
.rs-gear-icon svg{width:19px;height:19px;fill:currentColor;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.rs-gear-icon.on{background:#2f8a52;color:#fff}
.rs-gear-icon.off{background:#c0392b;color:#fff;animation:rs-pulse .9s infinite}
.rs-msg{position:absolute;left:0;top:calc(100% + 6px);white-space:nowrap;background:#173f35f2;color:#fff;border-radius:999px;padding:5px 11px;font-size:12px;font-weight:700;opacity:0;transform:translateY(-4px);transition:opacity .2s,transform .2s;pointer-events:none}
.rs-msg.show{opacity:1;transform:none}
.rs-msg.good{background:#2f8a52}
.rs-msg.bad{background:#c0392b}
#rs-hud-button{gap:5px}
@keyframes rs-pulse{50%{transform:scale(1.12)}}

/* helmet / seatbelt and officer cards */
.rs-modal{position:fixed;left:50%;bottom:104px;transform:translateX(-50%);z-index:1700;width:min(440px,calc(100vw - 24px));max-height:calc(100vh - 40px);overflow:auto;background:#fff8e5;color:#193d32;border:2px solid #e7b43c;border-radius:18px;padding:16px;box-shadow:0 18px 60px #06201a88;display:flex;gap:14px;align-items:flex-start;animation:career-pop .35s cubic-bezier(.2,1.4,.4,1)}
.rs-modal[hidden]{display:none}
.rs-modal h3{margin:3px 0 4px;font-size:19px;line-height:1.2}
.rs-modal p{margin:4px 0;font-size:13.5px;line-height:1.4}
.rs-modal .eyebrow{font-size:9.5px;letter-spacing:.09em;color:#8a6a12}
.rs-ml{color:#3d6a58;font-weight:600}
.rs-gear-art{flex-shrink:0;width:74px;height:74px;border-radius:50%;background:#173f35;color:#ffd84a;display:grid;place-items:center}
.rs-gear-art svg{width:44px;height:44px;fill:currentColor;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
.rs-officer{flex-shrink:0;width:74px;height:74px;border-radius:50%;background:#d9c08a;display:grid;place-items:center;font-size:44px;line-height:1}
.rs-primary{margin-top:10px;width:100%;border:0;border-radius:12px;background:#e7b43c;color:#2b2208;font:800 15px/1.2 inherit;padding:12px 14px;cursor:pointer;box-shadow:0 4px 0 #b88a1f}
.rs-primary:hover{background:#f2c654}
.rs-primary:disabled{opacity:.6}
.rs-primary kbd{font:700 11px/1 inherit;background:#2b220822;border-radius:5px;padding:2px 5px;margin-left:4px}
.rs-rule{display:flex;gap:10px;align-items:center;background:#173f35;color:#fff;border-radius:12px;padding:8px 10px;margin:8px 0}
.rs-rule>span{font-size:26px}
.rs-rule strong{display:block;font-size:14.5px}
.rs-rule em{display:block;font-style:normal;font-size:12.5px;color:#ffd84a;margin-top:2px}
.rs-challan{display:flex;align-items:baseline;gap:8px;border:2px dashed #c0392b;border-radius:10px;padding:7px 10px;margin-top:8px;font-size:11px;font-weight:700;letter-spacing:.04em;color:#8b2a1f}
.rs-challan b{font-size:20px;margin-left:auto}
.rs-challan small{font-weight:600;letter-spacing:0}

/* lesson card (same look as the job card) */
#rs-card{position:fixed;top:60px;left:50%;transform:translateX(-50%);z-index:1300;width:min(430px,calc(100vw - 24px));background:#fff8e5f5;color:#193d32;border:2px solid #41b88f;border-radius:16px;padding:10px 12px 9px;box-shadow:0 12px 40px #06201a66}
#rs-card[hidden]{display:none}
.rs-card-top{display:flex;gap:10px;align-items:flex-start}
#rs-card-icon{font-size:26px;line-height:1}
.rs-card-top>div{flex:1;min-width:0}
.rs-card-top .eyebrow{display:block;font-size:9px;letter-spacing:.08em;color:#2d7a5e}
#rs-card-text{display:block;font-size:14px;line-height:1.25;margin-top:2px}
#rs-card-cancel{border:0;background:#193d3218;color:#193d32;border-radius:50%;width:28px;height:28px;font-size:18px;cursor:pointer;flex-shrink:0}
.rs-card-row{display:flex;align-items:center;gap:12px;margin:7px 0 6px;font-weight:700;font-size:14px}
#rs-card-arrow{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#193d32;color:#41e7bb;font-size:15px;transition:transform .15s linear}
#rs-card-info{margin-left:auto;font-size:12.5px;text-align:right}
#rs-card .progress{height:5px;background:#193d3220;border-radius:5px;overflow:hidden}
#rs-card .progress span{display:block;height:100%;background:#41b88f;transition:width .3s}
.rs-look{display:flex;flex-direction:column;gap:6px;margin-bottom:7px}
.rs-look>span{display:flex;gap:5px}
.rs-look i{flex:1;font-style:normal;font-size:11.5px;font-weight:700;text-align:center;border-radius:8px;padding:4px;background:#193d3214}
.rs-look i.done{background:#2f8a52;color:#fff}
.rs-look>div{display:flex;gap:8px}
.rs-look button{flex:1;border:0;border-radius:10px;background:#173f35;color:#fff;font:800 15px/1 inherit;padding:12px;cursor:pointer;touch-action:manipulation}
.rs-look small{text-align:center;color:#3d6a58;font-weight:600}
.rs-mission.world-live .world-overlay{visibility:hidden}
.rs-mission #mission-card{top:auto;bottom:16px}

/* road-safety panel inside the drawer */
.rs-licence{display:flex;gap:12px;align-items:center;background:#173f35;color:#f5f8e8;border-radius:14px;padding:12px 14px;margin:10px 0 12px}
.rs-licence>span{font-size:34px}
.rs-licence strong{display:block;font-size:15px}
.rs-licence small{display:block;color:#ffd84a;margin-top:2px}
.rs-licence.got{background:linear-gradient(120deg,#1f5a46,#2f8a52);box-shadow:0 0 0 2px #ffd84a inset}
.rs-done{display:inline-block;color:#2f8a52;font-size:12px;margin-top:3px}
.rs-lessons{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.rs-lessons>div{display:flex;gap:8px;align-items:flex-start;background:#fff8e5;border:1px solid #193d3222;border-radius:12px;padding:8px 10px}
.rs-lessons span{font-size:22px;line-height:1}
.rs-lessons p{margin:0;font-size:12.5px;line-height:1.35}
.rs-lessons strong{display:block}
.rs-lessons small{display:block;color:#3d6a58;margin-top:2px}
.rs-quiz-sign{display:grid;place-items:center;margin:10px 0}
.rs-quiz-sign svg{width:140px;height:140px;filter:drop-shadow(0 6px 12px #06201a33)}
.rs-quiz-options{display:grid;gap:8px}
.rs-quiz-options button{text-align:left;padding:12px 14px;font-size:14px;line-height:1.3}
.rs-quiz-options button.right{background:#2f8a52;color:#fff;border-color:#2f8a52;opacity:1}
.rs-quiz-options button.wrong{background:#c0392b;color:#fff;border-color:#c0392b;opacity:1}
.rs-quiz-feedback{font-weight:700;margin:12px 0 8px}

@media(min-width:1241px){.rs-mission #career-toast{top:200px}}
@media(min-width:761px) and (max-width:1240px){
 #rs-card{left:auto;right:20px;transform:none;top:122px;width:min(400px,calc(100vw - 440px));min-width:300px}
}
@media(max-width:760px){
 #rs-hud{left:12px;top:252px;padding:4px 8px 4px 4px;gap:6px;border-radius:14px}
 .rs-limit{width:34px;height:34px;border-width:4px;font-size:13px}
 .rs-score{min-width:60px}
 .rs-score strong{font-size:17px}
 .rs-score span{font-size:10px}
 .rs-gear-icon{width:26px;height:26px}
 .rs-msg{font-size:11px}
 .rs-mission #career-hud,.rs-walking.career-live #rs-hud{visibility:hidden}
 #rs-hud-button{display:none}
 #rs-card{top:60px;padding:7px 10px 6px;border-radius:13px}
 #rs-card-text{font-size:12px}
 .rs-card-top .eyebrow{font-size:8px}
 .rs-card-row{font-size:12.5px;margin:4px 0}
 #rs-card-arrow{width:26px;height:26px}
 #rs-card-icon{font-size:18px}
 #rs-card-cancel{width:24px;height:24px;font-size:15px}
 .rs-look button{padding:11px 8px}
 .rs-modal{padding:12px;gap:10px;bottom:calc(env(safe-area-inset-bottom) + 96px)}
 .rs-gear-art,.rs-officer{width:52px;height:52px;font-size:30px}
 .rs-gear-art svg{width:32px;height:32px}
 .rs-modal h3{font-size:16px}
 .rs-modal p{font-size:12.5px}
 .rs-lessons{grid-template-columns:1fr}
 .rs-quiz-sign svg{width:110px;height:110px}
}
@media(prefers-reduced-motion:reduce){#rs-hud.over .rs-limit,.rs-gear-icon.off,.rs-modal{animation:none}}
/* Desktop and tablet: the helmet / seatbelt / MVD card sits above the footer row, under drawers and the full map, and is the only prompt at that moment. */
@media(min-width:761px){html:not(.m-phone) .rs-modal{bottom:140px;z-index:1450}html:not(.m-phone) body:has(.rs-modal:not([hidden])) #interaction-text,html:not(.m-phone) body:has(.rs-modal:not([hidden])) #notice{visibility:hidden}}
