/* [h6] The Commute diary (public/js/commute.js, commuteart.js): one drawn moment at a time, your inner voice, big choices.
   z-index 968: over the h5 notice lane (965), so a toast never covers a moment; under an opened notice (1300).
   A large card on a desktop; the whole screen on a phone (the h5 HUD stays hidden under it). Touch targets 44 px and up, text 12 px and up. */
#cmGame.cd-wrap{position:fixed;inset:0;z-index:968;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(20,14,10,.62);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
#cmGame .cd-card{width:min(1120px,100%);height:min(680px,100%);display:flex;flex-direction:column;border-radius:20px;overflow:hidden;background:#fbf4e6;box-shadow:0 24px 60px rgba(0,0,0,.45);font-family:var(--body,system-ui,sans-serif);color:#2a1c12}
#cmGame .cd-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#cfe6f2;cursor:default}
#cmGame .cd-art,#cmGame .cd-svg{position:absolute;inset:0;width:100%;height:100%;display:block}
#cmGame .cd-art.cd-fade{animation:cdFade .45s ease}
#cmGame .cd-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;gap:10px;padding:10px 12px;pointer-events:none}
#cmGame .cd-top>*{pointer-events:auto}
#cmGame .cd-trip{display:flex;align-items:center;gap:8px;padding:6px 12px 6px 10px;border-radius:14px;background:rgba(255,253,248,.92);box-shadow:0 2px 8px rgba(0,0,0,.12);min-width:0;max-width:44%}
#cmGame .cd-trip .ic-w{color:#a8401f;flex:none}#cmGame .cd-trip div{min-width:0}
#cmGame .cd-trip b{display:block;font:700 15px var(--body,sans-serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#cmGame .cd-trip small{display:block;font-size:12px;color:#6b5443;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cmGame .cd-top{justify-content:space-between}#cmGame .cd-dots{flex:none;display:flex;align-items:center;gap:8px;margin-top:8px;padding:7px 11px;border-radius:999px;background:rgba(42,39,36,.62)}
#cmGame .cd-dots i{width:11px;height:11px;border-radius:50%;background:rgba(255,253,248,.55);box-shadow:0 0 0 2px rgba(42,28,18,.25)}
#cmGame .cd-dots i.on{background:#2e7a4c}#cmGame .cd-dots i.now{background:#ffd27a;transform:scale(1.25)}
#cmGame .cd-dots i.cd-flag{width:14px;height:14px;border-radius:3px;background:rgba(255,253,248,.55)}#cmGame .cd-dots i.cd-flag.on{background:#a8401f}
#cmGame .cd-skip{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:14px;border:0;background:rgba(255,253,248,.92);color:#2a1c12;font:700 14px var(--body,sans-serif);cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.12)}
#cmGame .cd-skip:hover{background:#fff}#cmGame .cd-skip[hidden]{display:none}
#cmGame .cd-think,#cmGame .cd-say{position:absolute;top:76px;max-width:40%;padding:11px 15px;border-radius:22px;font:600 16px/1.38 var(--body,sans-serif);box-shadow:0 6px 18px rgba(0,0,0,.18)}
#cmGame .cd-think{left:4%;background:#fffdf8;color:#2a1c12;font-style:italic;max-width:52%}#cmGame .cd-has-say .cd-think{max-width:36%}#cmGame .cd-has-say:has(.cd-say-m) .cd-think{max-width:33%}
#cmGame .cd-think::before,#cmGame .cd-think::after{content:'';position:absolute;border-radius:50%;background:#fffdf8;box-shadow:0 3px 8px rgba(0,0,0,.14)}
#cmGame .cd-think::before{width:16px;height:16px;right:22%;bottom:-20px}#cmGame .cd-think::after{width:9px;height:9px;right:18%;bottom:-34px}
#cmGame .cd-say{right:4%;background:#2a2724;color:#fff6e4;border-radius:18px 18px 4px 18px}
#cmGame .cd-say b{display:block;font:800 12px var(--body,sans-serif);letter-spacing:.06em;text-transform:uppercase;color:#ffd27a;margin-bottom:2px;font-style:normal}
#cmGame .cd-say.cd-say-m{right:25%;max-width:35%;border-radius:18px 4px 18px 18px}
#cmGame .cd-think[hidden],#cmGame .cd-say[hidden]{display:none}
#cmGame .cd-in{animation:cdPop .32s cubic-bezier(.2,1.4,.4,1)}
#cmGame .cd-panel{flex:none;padding:10px 12px;background:#fbf4e6;border-top:1px solid #eadcc2}
#cmGame .cd-chs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:10px}
#cmGame .cd-ch{display:flex;align-items:center;gap:10px;min-height:58px;padding:8px 12px;border-radius:14px;border:2px solid #e2cfae;background:#fff;color:#2a1c12;text-align:left;cursor:pointer;font-family:inherit;transition:transform .1s,border-color .15s}
#cmGame .cd-ch:hover{border-color:#a8401f}#cmGame .cd-ch:active{transform:scale(.97)}
#cmGame .cd-ch:disabled{opacity:.55;cursor:not-allowed;border-style:dashed}
#cmGame .cd-ch kbd{flex:none;width:24px;height:24px;border-radius:7px;display:grid;place-items:center;background:#f1e7d6;color:#6b5443;font:700 12px var(--body,sans-serif)}
#cmGame .cd-ch b{flex:1;font:700 16px/1.2 var(--body,sans-serif)}
#cmGame .cd-ch small{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font:700 12px var(--body,sans-serif);color:#6b5443;flex:none}
#cmGame .cd-t-rs{color:#a8401f}#cmGame .cd-t-q{color:#2e7a4c}#cmGame .cd-t-s{color:#8a6a10}
#cmGame .cd-res{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px}
#cmGame .cd-chips{display:flex;flex-wrap:wrap;gap:6px}
#cmGame .cd-chip{padding:5px 10px;border-radius:999px;font:700 13px var(--body,sans-serif);background:#efe6d6;color:#5a4636;animation:cdPop .3s ease both}
#cmGame .cd-chip.up{background:#e1f2e6;color:#2e7a4c}#cmGame .cd-chip.down{background:#fbe5df;color:#a8401f}#cmGame .cd-chip.rs{background:#fdf0d6;color:#8a5a10}#cmGame .cd-chip.tag{background:#2a2724;color:#ffd27a}
#cmGame .cd-next{flex:none;display:flex;align-items:center;justify-content:center;gap:6px;min-height:52px;min-width:150px;padding:0 20px;border:0;border-radius:14px;background:#a8401f;color:#fff;font:700 17px var(--body,sans-serif);cursor:pointer;box-shadow:0 4px 0 #7a2c14}
#cmGame .cd-next:active{transform:translateY(2px);box-shadow:0 2px 0 #7a2c14}#cmGame .cd-next:disabled{background:#c9b596;box-shadow:none;cursor:default}
#cmGame .cd-end-to{font:600 14px var(--body,sans-serif);color:#6b5443}
#cmGame .cd-end{position:absolute;right:4%;top:50%;transform:translateY(-46%);width:min(440px,52%);max-height:calc(100% - 70px);overflow:auto;padding:16px 20px 14px;border-radius:16px;background:#fffdf7;box-shadow:0 14px 40px rgba(0,0,0,.3);border-left:5px solid #e4572e;animation:cdPop .45s cubic-bezier(.2,1.3,.4,1)}
#cmGame .cd-end-h{display:flex;align-items:center;gap:6px;font:800 12px var(--body,sans-serif);letter-spacing:.08em;text-transform:uppercase;color:#a8401f}
#cmGame .cd-end-big{margin:8px 0 8px;font:700 20px/1.3 var(--display,Georgia,serif)}
#cmGame .cd-end-pat{display:flex;align-items:center;gap:10px;margin:0 0 8px;font:700 14px var(--body,sans-serif);color:#5a4636}#cmGame .cd-pat{width:125px;height:40px}
#cmGame .cd-end-line{margin:10px 0 4px;font:italic 500 16px/1.5 Georgia,'Times New Roman',serif;color:#2a1c12}
#cmGame .cd-end-foot{display:block;font-size:12px;color:#8a6a50}
/* the drawings move a little: rain, steam, a bob, a sway, the view outside the window */
#cmGame .cd-rain{animation:cdRain .55s linear infinite}#cmGame .cd-steam{animation:cdSteam 2.4s ease-in-out infinite}
#cmGame .cd-bob{animation:cdBob .5s ease-in-out infinite alternate}#cmGame .cd-bob2{animation:cdBob .8s ease-in-out infinite alternate}#cmGame .cd-idle{animation:cdBob 1.6s ease-in-out infinite alternate}
#cmGame .cd-sway{animation:cdSway 2.6s ease-in-out infinite alternate}#cmGame .cd-slide{animation:cdSlide 7s linear infinite}#cmGame .cd-drift{animation:cdDrift 18s ease-in-out infinite alternate}
#cmGame .cd-float{animation:cdBob 2.2s ease-in-out infinite alternate}#cmGame .cd-pulse{animation:cdPulse 1s ease-in-out infinite}#cmGame .cd-pop{animation:cdHonk 1.1s ease-in-out infinite}
#cmGame .cd-hold{animation:cdBob 2.8s ease-in-out infinite alternate}#cmGame .cd-ripple{animation:cdDrift 3s ease-in-out infinite alternate}#cmGame .cd-dim{opacity:.35}
@keyframes cdFade{from{opacity:0}to{opacity:1}}@keyframes cdPop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:none}}
@keyframes cdRain{from{transform:translateY(0)}to{transform:translateY(340px)}}@keyframes cdSteam{0%,100%{opacity:.25;transform:translateY(3px)}50%{opacity:.9;transform:translateY(-4px)}}
@keyframes cdBob{from{transform:translateY(0)}to{transform:translateY(-2.5px)}}@keyframes cdSway{from{transform:translateX(-3px)}to{transform:translateX(3px)}}
@keyframes cdSlide{from{transform:translateX(0)}to{transform:translateX(-60px)}}@keyframes cdDrift{from{transform:translateX(-14px)}to{transform:translateX(14px)}}
@keyframes cdPulse{50%{opacity:.55}}@keyframes cdHonk{0%,100%{transform:scale(1);opacity:.95}50%{transform:scale(1.06);opacity:.7}}
@media (prefers-reduced-motion:reduce){#cmGame *{animation:none!important}}
/* a phone, or any short screen: the whole screen, edge to edge, inside the safe area */
@media (max-height:520px),(pointer:coarse) and (max-width:900px){
  #cmGame.cd-wrap{padding:0;background:#1d1712}
  #cmGame .cd-card{width:100%;height:100%;border-radius:0;padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
  #cmGame .cd-top{padding:6px 8px;gap:8px}#cmGame .cd-trip{padding:4px 10px 4px 8px;max-width:46%}#cmGame .cd-trip b{font-size:14px}
  #cmGame .cd-dots{margin-top:6px;gap:6px;padding:6px 9px}#cmGame .cd-skip{font-size:13px;padding:0 12px}
  #cmGame .cd-think,#cmGame .cd-say{top:58px;padding:8px 12px;font-size:14px;line-height:1.32;border-radius:18px}#cmGame .cd-say{max-width:42%}
  #cmGame .cd-has-say .cd-think{max-width:38%}#cmGame .cd-has-say:has(.cd-say-m) .cd-think{max-width:34%}#cmGame .cd-say.cd-say-m{right:24%;max-width:36%}
  #cmGame .cd-panel{padding:6px 8px}#cmGame .cd-chs{gap:8px}
  #cmGame .cd-ch{min-height:50px;padding:5px 10px;gap:8px}#cmGame .cd-ch b{font-size:14.5px}#cmGame .cd-ch kbd{display:none}
  #cmGame .cd-res{min-height:50px}#cmGame .cd-next{min-height:48px;min-width:120px;font-size:16px}#cmGame .cd-chip{font-size:12px;padding:4px 9px}
  #cmGame .cd-end{right:2%;width:56%;top:50px;transform:none;max-height:calc(100% - 58px);padding:10px 14px 10px}#cmGame .cd-end-big{font-size:16px;margin:4px 0}
  #cmGame .cd-end-line{font-size:14px;margin:6px 0 2px}#cmGame .cd-pat{width:100px;height:32px}
}
