/* Phase 6 and 7 styles, split out of index.html to keep it short. Loaded by index.html. */
/* Phase 6: course tear-off, title strike, speech bubbles, battery, heat line, stamp, certificate. */
.cm-panel, .cm-prompt { transition: transform .6s cubic-bezier(.5,0,.9,.4), opacity .6s ease-in; }
.cm-tear .cm-head { transform: translate(-50%, -160%) rotate(-4deg); opacity: 0; }
.cm-tear .cm-gauge { transform: translate(-180%, -50%) rotate(-8deg); opacity: 0; }
.cm-tear .cm-mod { transform: translateX(160%) rotate(7deg); opacity: 0; }
.cm-tear .cm-ledger { transform: translate(150%, 60%) rotate(10deg); opacity: 0; }
.cm-tear .cm-prompt { opacity: 0; }
.hud-runtitle.strike s { text-decoration: none; background: linear-gradient(#ff8a7a, #ff8a7a) no-repeat 0 55% / 100% 2px;
  animation: strike .5s .25s ease-out both; }
@keyframes strike { from { background-size: 0 2px; } to { background-size: 100% 2px; } }
.bb { position: absolute; left: 0; top: 0; max-width: min(320px, 70vw); padding: 7px 12px; border-radius: 14px;
  font: 15px/1.35 Georgia, "Times New Roman", serif; will-change: transform, opacity; z-index: 3; }
.bb-run { background: #fff; color: #111; border: 2px solid #111; box-shadow: 2px 3px 0 rgba(0,0,0,.35); }
.bb-course { background: var(--cm-paper); color: var(--cm-ink); border: 1px solid #a8996f; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.bb-tail { position: absolute; width: 12px; height: 12px; background: inherit; border: inherit; border-width: 0; transform: translate(-50%, -50%) rotate(45deg); }
.bb-run .bb-tail { border: 2px solid #111; }
.bb-course .bb-tail { border: 1px solid #a8996f; }
.bb-tail-bottom { top: 100%; border-top: 0 !important; border-left: 0 !important; margin-top: 0; }
.bb-tail-top { top: 0; border-bottom: 0 !important; border-right: 0 !important; }
.bb-tail-left { left: 0; border-top: 0 !important; border-right: 0 !important; }
.bb-tail-right { left: 100%; border-bottom: 0 !important; border-left: 0 !important; }
.rh-bat { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 4px; font-size: 10px; color: #f2d27a; text-shadow: 0 1px 2px #000; }
.rh-bat-bar { width: 104px; height: 5px; background: rgba(0,0,0,.5); border: 1px solid rgba(0,0,0,.6); }
.rh-bat-bar i { display: block; height: 100%; width: 100%; background: #e8b923; }
.rh-bat-bar i.low { background: #e0533d; }
.rh-heat { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); font-size: 15px; color: #ffb4a8;
  background: rgba(90,10,6,.7); padding: 5px 12px; border-radius: 3px; animation: rh-blink .7s steps(2) infinite; }
body.slowmo #game { filter: grayscale(.85) contrast(1.08); transition: filter .6s ease-out; }
#game { transition: filter .4s; }
.rh-stamp { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-12deg);
  font: bold 64px/1 Georgia, "Times New Roman", serif; letter-spacing: .08em; color: #d42a1e; padding: 10px 26px;
  border: 7px double #d42a1e; border-radius: 6px; background: rgba(255,240,230,.12); text-shadow: 0 0 1px #7a0f08; z-index: 6; }
.rh-stamp-escape { color: #c21d12; }
.rh-stamp.go { animation: stamp .55s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(3.2); opacity: 0; }
  60% { transform: translate(-50%, -50%) rotate(-12deg) scale(.9); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } }
.cert-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(40,34,22,.45);
  pointer-events: auto; z-index: 8; overflow: auto; }
.cert { background: var(--cm-paper); color: var(--cm-ink); width: min(640px, 92vw); padding: 22px 34px 18px; text-align: center;
  border: 1px solid var(--cm-rule); outline: 3px double #b8a574; outline-offset: -12px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  font: 15px/1.45 var(--cm-serif); margin: 16px 0; }
.cert-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a7b58; }
.cert h1 { font: normal 30px var(--cm-serif); letter-spacing: .1em; margin: 8px 0 10px; color: #2d2616; }
.cert-line { margin: 4px 0; font-style: italic; color: #5d5240; }
.cert-name { font: 24px var(--cm-serif); text-align: center; border: 0; border-bottom: 1px solid #8a7b58; background: transparent;
  color: #2d2616; width: 60%; margin: 2px 0 8px; padding: 2px 4px; }
.cert-outcome { font: bold 26px var(--cm-serif); letter-spacing: .12em; color: #8f1f16; margin: 6px 0; }
.cert-escape { color: #3a6242; }
.cert-stats { margin: 12px auto 8px; width: 80%; border-top: 1px solid var(--cm-rule); border-bottom: 1px solid var(--cm-rule); padding: 6px 0; }
.cert-row { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.cert-row b { font-weight: normal; color: #2d2616; }
.cert-unlock { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0; text-align: left; }
.cert-seal { width: 64px; height: 64px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font: bold 30px var(--cm-serif); color: #7c120b; background: radial-gradient(circle at 35% 30%, #e0493b, #a41c12 60%, #7c120b);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.35), inset 0 -3px 5px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.35);
  text-shadow: 1px 1px 0 rgba(255,170,160,.55), -1px -1px 0 rgba(60,0,0,.6); animation: seal .5s .3s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes seal { from { transform: scale(2.4) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.cert-unlock-text { animation: reveal .6s .9s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cert-none .cert-seal { filter: grayscale(1); opacity: .5; }
.cert-unlock-kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a7b58; }
.cert-unlock-name { font-size: 19px; color: #2d2616; }
.cert-unlock-desc { font-size: 13px; color: #5d5240; }
.cert-btn { font: 15px var(--cm-serif); background: var(--cm-ok); color: #fff; border: 1px solid #3a6242; padding: 8px 22px; cursor: pointer; margin: 6px 0 8px; }
.cert-btn:hover { background: #3f6b47; }
.cert-meta { font-size: 12px; color: #8a7b58; }
.cert-foot { font-size: 12px; color: #5d5240; margin-top: 10px; border-top: 1px solid var(--cm-rule); padding-top: 8px; }
.cert-last { display: block; font-size: 13px; color: #3d5a73; margin-top: 4px; }
#title .byline { font-size: 12px; color: #777; margin-top: 8px; }

/* Phase 7: course catalog, accreditation seal, volume, phone card, mute glyph, bouncing floaters. */
#title .catalog h3 { display: flex; justify-content: space-between; align-items: baseline; }
#title .ce-line { font-size: 12px; color: #555; text-transform: none; letter-spacing: 0; font-weight: normal; }
#title .cat-row { display: flex; align-items: center; gap: 14px; }
#title .modules { list-style: none; margin: 0; padding: 0; flex: 1; }
#title .modules li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #ecece6; }
#title .modules li:last-child { border-bottom: 0; }
#title .modules .num { color: #999; margin-right: 8px; }
#title .modules li.locked { color: #9a9a94; }
#title .modules .lock { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid #d0d0c8; padding: 2px 7px; border-radius: 10px; color: #a8a8a0; }
#title .modules .lock::before { content: ''; display: inline-block; width: 7px; height: 6px; margin-right: 5px; border: 1.5px solid currentColor; border-top-width: 3px; border-radius: 2px 2px 1px 1px; vertical-align: -1px; }
#title .modules button { font-size: 13px; padding: 7px 16px; }
.seal-badge { flex: none; width: 104px; height: 104px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; font: bold 9px/1.25 Georgia, "Times New Roman", serif; letter-spacing: .1em; color: #6b5a2e;
  background: radial-gradient(circle, #f6eed6 0 52%, #e6d7a8 53% 56%, #f6eed6 57% 64%, #d8c48c 65% 100%);
  border: 2px solid #b8a574; box-shadow: 0 1px 3px rgba(0,0,0,.18); transform: rotate(-8deg); }
.seal-badge b { font-size: 15px; letter-spacing: .04em; margin: 2px 0; color: #4a3d1c; }
.seal-badge i { font-style: normal; font-size: 8px; color: #8a7b58; }
#title .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid #ddd; margin-top: 18px; padding-top: 10px; }
#title .foot .byline { margin-top: 0; }
#title .vol { font-size: 12px; color: #777; display: flex; align-items: center; gap: 8px; }
#title .vol input { width: 120px; accent-color: #4a7a52; }
#title .phone-card { background: #fff; border: 1px solid #d6d6cf; border-left: 4px solid #4a7a52; padding: 16px 20px; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
#title .phone-card h3 { margin: 0 0 6px; font-size: 15px; color: #3d5a73; }
#title .phone-card p { margin: 0 0 8px; }
#title .phone-card .byline { margin: 10px 0 4px; }
#title .phone-card a { color: #3d5a73; }
body.touch-only #begin { display: none; }
.hud-mute { position: absolute; left: 10px; bottom: 10px; font-size: 13px; color: rgba(255,255,255,.55); text-shadow: 0 1px 2px #000; }
.hud-mute.muted { color: #ffb4a8; }
body.massage .hud-mute { color: rgba(59,51,38,.55); text-shadow: none; }

/* First-run grab-window prompts (goon-waves.js ONBOARD): the run floater, larger, pinned above the player. */
.rh-float.rh-onboard { font: bold 24px/1.2 system-ui, sans-serif; color: #ffe14a; letter-spacing: .04em; z-index: 4;
  text-shadow: 0 2px 3px #000, 0 0 6px #000, 0 0 2px #000; }
.rh-float.rh-onboard.go { animation: rh-onb .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes rh-onb { from { opacity: 0; scale: 1.6; } to { opacity: 1; scale: 1; } }

/* The mini-massage strip (hud-run.js): the ped calls like a course client (ruled 2026-09-25). The
   pressure bar is gone; the E hold's progress stays, the open call's key cue is the course's
   (hud-massage.js), and the strip flashes green or red for 1 s after an answer. */
.rh .rh-mini { width: 150px; transition: background-color .15s, box-shadow .15s; }
.rh .rh-mini.rh-mini-ok { background: rgba(38,96,44,.8); box-shadow: 0 0 0 2px #6fd26a; }
.rh .rh-mini.rh-mini-bad { background: rgba(120,24,16,.82); box-shadow: 0 0 0 2px #e0533d; }
.rh-mini-call { margin: 0 0 6px; padding: 4px 8px 6px; background: rgba(35,30,20,.78); border: 1px solid #cdbf9a;
  font: 14px Georgia, "Times New Roman", serif; color: #fdf8ea; text-align: left; }
.rh-mini-call kbd { font: bold 13px var(--mono, monospace); color: #2d2616; background: #f3ecd8; border: 1px solid #cdbf9a;
  border-bottom-width: 3px; border-radius: 4px; padding: 1px 10px; margin-right: 6px; }
.rh-mini-callbar { height: 4px; margin-top: 4px; background: rgba(253,248,234,.25); }
.rh-mini-callbar i { display: block; height: 100%; width: 100%; background: #ffd27a; }
/* The Q counter cue (hud-counter.js): the first-run prompt's size, over speech bubbles (.bb 3) and the prompt (.rh-onboard 4). */
.rh-mini-call.rh-counter { font: bold 24px/1.2 system-ui, sans-serif; padding: 6px 12px 8px; min-width: 150px; white-space: nowrap; }
.rh-mini-call.rh-counter kbd { font: bold 24px/1.1 var(--mono, monospace); padding: 2px 12px; border-bottom-width: 4px; margin-right: 10px; }
.rh-mini-call.rh-counter .rh-mini-callbar { height: 6px; margin-top: 6px; }

/* The vehicle name card (hud-run.js showVehicleName; DESIGN.md "Driving, three stages"): GTA3 manner,
   bottom right, big condensed capitals in pale gold, a soft dark shadow. In 0.3 s, held 2.5 s, out
   0.8 s (3.6 s); the sim clock hides the element when it is done. */
.rh-vehname { position: fixed; right: 36px; bottom: 34px; z-index: 3; pointer-events: none; white-space: nowrap;
  font: 700 46px/1 "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", Impact, sans-serif; font-stretch: condensed;
  text-transform: uppercase; letter-spacing: .03em; color: #e8c878; opacity: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,.7), 0 0 10px rgba(0,0,0,.45), 1px 1px 0 rgba(0,0,0,.55); }
.rh-vehname.go { animation: rh-vehname 3.6s linear both; }
@keyframes rh-vehname { 0% { opacity: 0; } 8.333% { opacity: 1; } 77.778% { opacity: 1; } 100% { opacity: 0; } }
