/* The in-browser ColecoVision player (Views/Play/Player.cshtml, wwwroot/js/player.js).
   Every rule is scoped to .cvz-player so nothing here changes the rest of the site.
   The player keeps its own dark panel in both the light and the dark site theme. */
.cvz-player { --bg:#111214; --panel:#1b1d21; --line:#2c2f35; --text:#ececec; --dim:#9aa0a8; --accent:#f18b55; --fire:#e8692e;
  background:var(--bg); color:var(--text); border-radius:16px; padding:18px; font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
.cvz-player *, .cvz-player *::before, .cvz-player *::after { box-sizing:border-box; }
.cvz-player .stage { max-width:1100px; margin:0 auto; }
.cvz-player .controls h2 { color:var(--text); }
.cvz-player a { color:var(--accent); }
.cvz-player .stage { max-width:1100px; margin:0 auto; }
.cvz-player .play { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:18px; align-items:start; }
.cvz-player #game-box { width:100%; aspect-ratio:4/3; background:#000; border-radius:10px; overflow:hidden; border:1px solid var(--line); }
.cvz-player #game { width:100%; height:100%; }
.cvz-player .empty { height:100%; display:grid; place-items:center; text-align:center; color:var(--dim); padding:20px; }

/* hide the emulator's own toolbar and touch gamepad: this page has its own controls */
.cvz-player .ejs_menu_bar, .cvz-player .ejs_virtualGamepad_parent { display:none !important; }
.cvz-player .bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.cvz-player .bar button { font:600 .9rem system-ui,sans-serif; padding:7px 14px; border-radius:8px; border:1px solid var(--line); background:var(--panel); color:var(--text); cursor:pointer; }
.cvz-player .bar button:hover { border-color:#555; }
.cvz-player .bar .vol { display:flex; align-items:center; gap:8px; color:var(--dim); font-size:.9rem; }
.cvz-player .bar input[type=range] { width:120px; accent-color:var(--accent); }
.cvz-player .howto { margin-top:12px; background:#1f2a20; border:1px solid #2f4a33; border-radius:10px; padding:10px 14px; }
.cvz-player .howto b { color:#9be3a8; }

/* ---- The emulated ColecoVision controller ----
   Evan-Amos's photograph of an original 1982 ColecoVision hand controller (public domain, Wikimedia Commons
   "ColecoVision-Controller-FL.jpg"), turned to face straight on with its real 12-key keypad and coiled cord. Each control is a clickable area over
   the real part of the photo; it lights up amber while it is pressed (by keyboard, gamepad, mouse or touch). */
.cvz-player .cv { position:relative; width:220px; aspect-ratio:640/1502; margin:118px auto 0; background:url("/emulator/img/controller.webp?v=3") 0 0/100% 100% no-repeat;
      user-select:none; -webkit-user-select:none; touch-action:none; }
.cvz-player .cv::before { content:""; position:absolute; left:0; bottom:calc(100% - 4px); width:100%; aspect-ratio:640/380; pointer-events:none;
      background:url("/emulator/img/cord.webp?v=1") 0 0/100% 100% no-repeat; }
.cvz-player .cv .hot { position:absolute; display:block; padding:0; border:0; background:transparent; border-radius:9%; cursor:pointer; transition:background-color .08s, box-shadow .08s; }
.cvz-player .cv .hot:hover { background:rgba(255,255,255,.18); }
.cvz-player .cv .hot.on { background:radial-gradient(closest-side, rgba(255,205,90,.85), rgba(242,160,30,.5)); box-shadow:0 0 10px rgba(246,166,35,.85); }
.cvz-player .cv .hot.dark.on { background:radial-gradient(closest-side, rgba(246,166,35,.75), rgba(246,166,35,.35)); }
.cvz-player .cv .ov { position:absolute; left:0; right:0; bottom:1px; font:800 7px/1 system-ui,sans-serif; color:#b3260b; text-align:center; white-space:nowrap; overflow:hidden; pointer-events:none; }
.cvz-player .cv .hot.dark .ov { color:#f6a623; }
.cvz-player .cv .badge { position:absolute; font:700 9px/1 system-ui,sans-serif; color:#f2f2f2; background:rgba(10,10,10,.85); border:1px solid #666; border-radius:4px; padding:2px 4px; pointer-events:none; white-space:nowrap; }
.cvz-player .cv .hot .badge { top:-7px; right:-7px; }
.cvz-player .cv .stick { position:absolute; left:8%; top:0.5%; width:84%; height:22.5%; border-radius:30%; cursor:grab; }
.cvz-player .cv .ring { position:absolute; left:50%; top:11.4%; width:44%; aspect-ratio:1; border-radius:50%; pointer-events:none; border:3px solid transparent; transform:translate(-50%,-50%); transition:transform .05s, border-color .08s, box-shadow .08s; }
.cvz-player .cv .ring.on { border-color:rgba(246,166,35,.95); box-shadow:0 0 14px rgba(246,166,35,.8); }
.cvz-player .cv .arrow { position:absolute; width:0; height:0; border:7px solid transparent; pointer-events:none; opacity:.35; transform:translate(-50%,-50%); }
.cvz-player .cv .arrow.on { opacity:1; }
.cvz-player .cv .arrow.up { left:50%; top:1.4%; border-bottom:10px solid #f6a623; border-top:0; }
.cvz-player .cv .arrow.down { left:50%; top:21.4%; border-top:10px solid #f6a623; border-bottom:0; }
.cvz-player .cv .arrow.left { left:24.5%; top:11.4%; border-right:10px solid #f6a623; border-left:0; }
.cvz-player .cv .arrow.right { left:75.5%; top:11.4%; border-left:10px solid #f6a623; border-right:0; }
.cvz-player .cv .badge.dir { transform:translate(-50%,-50%); }
.cvz-player .cv .badge.up { left:62%; top:1.6%; }
.cvz-player .cv .badge.down { left:62%; top:21.4%; }
.cvz-player .cv .badge.left { left:13%; top:11.4%; }
.cvz-player .cv .badge.right { left:87%; top:11.4%; }
.cvz-player .cv .badge.fl { left:-6px; top:37.6%; }
.cvz-player .cv .badge.fr { right:-6px; top:37.6%; }
.cvz-player .cv.nokeys .badge { display:none; }
.cvz-player .cv-cap { text-align:center; color:var(--dim); font-size:.8rem; margin-top:8px; }

/* ---- Controller choice ---- */
.cvz-player .ctrlpick { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:10px; }
.cvz-player .ctrlpick button { font:600 .82rem system-ui,sans-serif; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:var(--panel); color:var(--dim); cursor:pointer; }
.cvz-player .ctrlpick button.on { background:var(--accent); color:#111; border-color:var(--accent); }
.cvz-player .mousebar { text-align:center; margin:0 0 10px; font-size:.82rem; color:var(--dim); }
.cvz-player .mousebar button { font:600 .82rem system-ui,sans-serif; padding:6px 10px; border-radius:8px; border:1px solid var(--accent); background:transparent; color:var(--accent); cursor:pointer; margin-bottom:4px; }
.cvz-player .play.wide { grid-template-columns:1fr; }
.cvz-player .play.wide #game-box { max-width:760px; margin:0 auto; }
.cvz-player .play.wide .bar, .cvz-player .play.wide .howto { max-width:760px; margin-left:auto; margin-right:auto; }
.cvz-player .hidden { display:none !important; }

/* ---- Super Action Controller: the real controller, from Avon Fox's photos (www.the-liberator.net),
   cut out of their background: the top seen straight down, and the grip from the side. Front view: red-ball joystick, 12-key keypad on the silver panel and the
   white speed roller. Side view: the loop grip with its yellow, orange, purple and blue finger buttons. ---- */
.cvz-player .sac { display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-start; gap:28px; user-select:none; -webkit-user-select:none; touch-action:none; }
.cvz-player .sacf { position:relative; width:260px; aspect-ratio:600/1087; background:url("/emulator/img/sac-top.webp?v=1") 0 0/100% 100% no-repeat; }
.cvz-player .sacs { width:415px; max-width:100%; }
.cvz-player .sacsimg { position:relative; width:100%; aspect-ratio:660/750; background:url("/emulator/img/sac-side8.webp?v=1") 0 0/100% 100% no-repeat; }
.cvz-player .saccap { text-align:center; color:var(--dim); font-size:.78rem; margin-top:4px; }
.cvz-player .sac .credit { flex-basis:100%; text-align:center; color:#7d838b; font-size:.72rem; }
.cvz-player .sac .credit a { color:#9aa0a8; }
.cvz-player .sac .hot { position:absolute; padding:0; border:0; background:transparent; cursor:pointer; border-radius:12%; transition:background-color .08s, box-shadow .08s; }
.cvz-player .sac .hot:hover { background:rgba(255,255,255,.18); }
.cvz-player .sac .hot.on { background:radial-gradient(closest-side, rgba(255,205,90,.85), rgba(242,160,30,.45)); box-shadow:0 0 10px rgba(246,166,35,.85); }
.cvz-player .sac .grip.on { background:rgba(255,215,120,.45); box-shadow:0 0 12px rgba(246,166,35,.95); }
.cvz-player .sacstick { position:absolute; border-radius:50%; cursor:grab; }
.cvz-player .sacring { position:absolute; inset:4%; border-radius:50%; border:3px solid transparent; pointer-events:none; transition:transform .05s, border-color .08s, box-shadow .08s; }
.cvz-player .sacring.on { border-color:rgba(246,166,35,.95); box-shadow:0 0 14px rgba(246,166,35,.8); }
.cvz-player .sacroll { border-radius:40%; cursor:ns-resize; }
.cvz-player .badge2 { position:absolute; transform:translate(-50%,-50%); font:700 9px/1 system-ui,sans-serif; color:#f2f2f2; background:rgba(10,10,10,.85); border:1px solid #666; border-radius:4px; padding:2px 4px; pointer-events:none; white-space:nowrap; }
.cvz-player .nokeys .badge2 { display:none; }

/* ---- Roller Controller (the real unit: a wide base with two wells that hold the hand controllers,
   the trackball in the middle and two pairs of red action buttons) ---- */
.cvz-player .roller { position:relative; width:100%; max-width:860px; margin:4px auto 0; aspect-ratio:900/440; user-select:none; -webkit-user-select:none; touch-action:none; }
.cvz-player .roller svg { position:absolute; inset:0; width:100%; height:100%; }
.cvz-player .roller [data-c] { cursor:pointer; }
.cvz-player .roller .on { filter:drop-shadow(0 0 6px #f6a623) brightness(1.3); }
.cvz-player .rwell { position:absolute; top:10.5%; height:82%; width:19.6%; display:flex; justify-content:center; align-items:flex-start; }
.cvz-player .rwell.l { left:6.6%; }
.cvz-player .rwell.r { right:6.6%; }
.cvz-player .rwell .cv { width:74%; margin:2% auto 0; }
.cvz-player .rwell .cv::before { display:none; }
.cvz-player .rwell img { width:74%; margin-top:2%; opacity:.55; filter:grayscale(.2); pointer-events:none; }
.cvz-player .rwell .p2 { position:absolute; bottom:-6%; left:0; right:0; text-align:center; font:700 9px system-ui,sans-serif; color:#888; letter-spacing:.08em; }
.cvz-player .rball { position:absolute; left:50%; top:37.5%; width:21%; aspect-ratio:1; transform:translate(-50%,-50%); border-radius:50%; cursor:grab; }
.cvz-player .rball.on { box-shadow:0 0 0 3px rgba(246,166,35,.9), 0 0 18px rgba(246,166,35,.7); }

/* ---- Controls panel ---- */
.cvz-player .controls { margin-top:22px; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.cvz-player .controls h2 { margin:0 0 6px; font-size:1.1rem; }
.cvz-player .controls ol { margin:6px 0 12px 18px; padding:0; color:var(--dim); font-size:.92rem; }
.cvz-player .controls ol b { color:var(--text); }
.cvz-player .scope { display:flex; gap:16px; flex-wrap:wrap; align-items:center; margin:8px 0 12px; font-size:.92rem; }
.cvz-player .scope label { cursor:pointer; }
.cvz-player .gpstat { font-size:.85rem; color:var(--dim); margin-left:auto; }
.cvz-player .gpstat.ok { color:#9be3a8; }
.cvz-player table.map { width:100%; border-collapse:collapse; font-size:.92rem; }
.cvz-player table.map th { text-align:left; color:var(--dim); font-weight:600; padding:6px 8px; border-bottom:1px solid var(--line); }
.cvz-player table.map td { padding:4px 8px; border-bottom:1px solid #24262b; }
.cvz-player table.map td:first-child { white-space:nowrap; }
.cvz-player .bind { min-width:110px; text-align:left; font:600 .85rem system-ui,sans-serif; padding:5px 10px; border-radius:6px; border:1px solid #3a3d44; background:#111215; color:var(--text); cursor:pointer; }
.cvz-player .bind:hover { border-color:var(--accent); }
.cvz-player .bind.wait { background:var(--accent); color:#111; border-color:var(--accent); }
.cvz-player .bind.none { color:#666; font-style:italic; }
.cvz-player .reset { margin-top:12px; font:600 .85rem system-ui,sans-serif; padding:6px 12px; border-radius:6px; border:1px solid var(--line); background:transparent; color:var(--dim); cursor:pointer; }
.cvz-player .note { color:var(--dim); font-size:.85rem; margin-top:10px; }
@media (max-width:900px) {.cvz-player .play { grid-template-columns:1fr; }

}
.cvz-player #mute.blocked { background:#f18b55; color:#111; font-weight:700; }


/* ---- Player page header and the Play Online list (outside the dark player panel) ---- */
.cvz-playhead { display:flex; gap:16px; align-items:center; margin:10px 0 16px; }
.cvz-playhead img { width:72px; height:auto; border-radius:6px; box-shadow:0 4px 14px rgba(0,0,0,.35); }
.cvz-playhead img.still { width:120px; }
.cvz-playhead h1 { margin:2px 0 4px; font-size:clamp(1.4rem, 3vw, 2rem); }
.cvz-playcredit { margin:14px 0 30px; font-size:.8rem; opacity:.75; }
.cvz-playfilters { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:14px; }
.cvz-playfilters .form-control { flex:1 1 260px; }
.cvz-playfilters .form-select { flex:0 1 240px; }
.cvz-playcount { opacity:.75; font-size:.9rem; }
/* (Update 194) the "Arcade games" filter */
.cvz-playarc { display:inline-flex; align-items:center; gap:6px; margin:0; cursor:pointer; white-space:nowrap; }
.cvz-playarc .form-check-input { margin:0; }
/* (Update 195) "US Arcade Games": its "?" (opens the site's note card) and the arcade game's maker and year under the
   title while it is ticked (Update 196: the cards keep their boxes) */
.cvz-playarc label { display:inline-flex; align-items:center; gap:6px; margin:0; cursor:pointer; }
.cvz-playarc-q { width:24px; height:24px; flex:none; border-radius:50%; padding:0; border:1px solid var(--cvz-border, #2a2f3a); background:var(--cvz-surface-2, #1b1f27);
      color:var(--cvz-text, #e8e8e8); font:700 .8rem/1 system-ui,sans-serif; display:inline-grid; place-items:center; cursor:pointer; }
.cvz-playarc-q:hover, .cvz-playarc-q:focus-visible { border-color:var(--accent, #f5b400); }
.cvz-playarc-q:focus-visible { outline:2px solid var(--accent, #f5b400); outline-offset:2px; }
.cvz-arcname { display:none; }
.cvz-arcmode .cvz-arcname { display:block; }
/* (Update 198) the owner: while "US Arcade Games" is ticked, each game shows once, without its list of other versions */
.cvz-arcmode .cvz-playsame { display:none; }
.cvz-playgrid .cvz-gtile[hidden] { display:none; }
.cvz-gbox { position:relative; }
/* (Update 186) the accent's own ink: the light theme darkens the Games gold, where dark #111 text was only 3.5:1 (white is 5.3:1) */
.cvz-playbadge { position:absolute; left:8px; bottom:8px; background:var(--accent, #f18b55); color:var(--accent-ink, #10131a); font:700 .72rem/1 system-ui,sans-serif;
  padding:5px 9px; border-radius:999px; box-shadow:0 2px 8px rgba(0,0,0,.4); display:inline-flex; gap:4px; align-items:center; }
.cvz-playctl { display:block; font-size:.75rem; opacity:.8; }
.cvz-btn-play { display:inline-flex; gap:6px; align-items:center; }
@media (max-width:600px) { .cvz-player { padding:10px; border-radius:12px; } .cvz-playhead img { width:56px; } }

/* ---- Save / load message ---- */
.cvz-player .bar button:disabled { opacity:.45; cursor:default; }
.cvz-player .savemsg { color:#9be3a8; font-size:.85rem; min-width:0; }

/* ---- Phones and small tablets: game first, then a compact controller ---- */
@media (max-width:700px) {
  .cvz-player { padding:8px; }
  .cvz-player .stage { margin:0; }
  .cvz-player #game-box { border-radius:6px; }
  .cvz-player .bar { gap:6px; }
  .cvz-player .bar button { padding:8px 10px; font-size:.82rem; }
  .cvz-player .bar .vol input[type=range] { width:90px; }
  /* (Update 196) the coiled cord shows on phones too: 104px of it above the controller, cut off at the top of that space */
  .cvz-player .cv { width:min(200px, 52vw); margin-top:104px; clip-path: inset(-104px -30% -10% -30%); }
  .cvz-player .cv .badge, .cvz-player .badge2 { display:none; }   /* no keyboard labels on touch screens */
  .cvz-player .sac { gap:12px; }
  .cvz-player .sacf { width:min(46vw, 220px); }
  .cvz-player .sacs { width:min(46vw, 260px); }
  .cvz-player .saccap { display:none; }
  .cvz-player .controls { padding:12px; }
  .cvz-player table.map { font-size:.82rem; }
  .cvz-player .bind { min-width:0; }
  .cvz-playhead img { width:52px; }
}
/* Touch screens: the on-screen controller is the way to play, so keep it from scrolling the page while pressed */
@media (hover:none) and (pointer:coarse) {
  .cvz-player .cv, .cvz-player .sac, .cvz-player .roller { touch-action:none; }
}

/* ---- Folding "How to start" box ---- */
.cvz-player .howto details > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px; }
.cvz-player .howto details > summary::-webkit-details-marker { display:none; }
.cvz-player .howto details > summary::before { content:"\25B8"; color:#9be3a8; transition:transform .15s; }
.cvz-player .howto details[open] > summary::before { transform:rotate(90deg); }
.cvz-player .howto .hint { margin-left:auto; font-size:.8rem; color:var(--dim); }
.cvz-player .howto .howbody { margin-top:6px; }

/* ---- Order of the game column: on phones the touch controls sit right under the game ---- */
.cvz-player #playcol { display:flex; flex-direction:column; min-width:0; }
.cvz-player #playcol > .fsbar { order:0; }
.cvz-player #playcol > #game-box { order:1; }
.cvz-player #playcol > .tpad { order:2; }
.cvz-player #playcol > .bar { order:3; }
.cvz-player #playcol > .layoutpick { order:4; }
.cvz-player #playcol > .howto { order:5; }

/* ---- Choosing the on-screen controls (shown on touch screens and narrow windows) ---- */
.cvz-player .layoutpick { display:none; flex-wrap:wrap; gap:6px; align-items:center; margin-top:10px; font-size:.85rem; color:var(--dim); }
.cvz-player .layoutpick button { font:600 .82rem system-ui,sans-serif; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:var(--panel); color:var(--dim); cursor:pointer; }
.cvz-player .layoutpick button.on { background:var(--accent); color:#111; border-color:var(--accent); }
@media (hover:none), (max-width:900px) { .cvz-player .layoutpick { display:flex; } }
/* compact controls chosen: the classic controller pictures step aside (the controller picker stays) */
.cvz-player.compact #ctrlwrap .cv, .cvz-player.compact #ctrlwrap .sac, .cvz-player.compact #ctrlwrap .roller,
.cvz-player.compact #ctrlwrap .cv-cap, .cvz-player.compact #ctrlwrap .mousebar,
.cvz-player.compact #ctrlwrap .drive, .cvz-player.compact #ctrlwrap .dhelp { display:none !important; }
/* (Update 185) the Driving Controller (Expansion Module #2) and its keyboard-and-mouse "How to drive" help step aside
   too, as the other controllers do: the touch pad steers (left / right) and its fire button is the gas pedal */

/* ---- Compact touch controls ----
   Joystick on the left, the game's keys in the middle, big fire buttons on the right; everything is large enough
   for thumbs and works with several fingers at once. */
.cvz-player .tpad { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; margin-top:10px;
  padding:10px; background:var(--panel); border:1px solid var(--line); border-radius:12px; user-select:none; -webkit-user-select:none;
  touch-action:none; -webkit-touch-callout:none; }
.cvz-player .tpad[hidden] { display:none; }
.cvz-player .tpad button { -webkit-tap-highlight-color:transparent; touch-action:none; }
.cvz-player .tp-stick { position:relative; width:clamp(104px, 30vw, 150px); aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle, #2a2d33 0 55%, #1f2126 56% 100%); border:2px solid #3a3d44; }
.cvz-player .tp-stick::before { content:""; position:absolute; inset:8%; border-radius:50%;
  background:
    linear-gradient(#5a5e66,#5a5e66) 50% 4%/8% 10% no-repeat, linear-gradient(#5a5e66,#5a5e66) 50% 96%/8% 10% no-repeat,
    linear-gradient(#5a5e66,#5a5e66) 4% 50%/10% 8% no-repeat, linear-gradient(#5a5e66,#5a5e66) 96% 50%/10% 8% no-repeat; }
.cvz-player .tp-knob { position:absolute; left:50%; top:50%; width:44%; aspect-ratio:1; border-radius:50%; transform:translate(-50%,-50%);
  background:radial-gradient(circle at 35% 30%, #4a4d55, #17181b); border:2px solid #55585f; box-shadow:0 3px 8px rgba(0,0,0,.6);
  pointer-events:none; transition:transform .04s, border-color .08s; }
.cvz-player .tp-knob.on { border-color:#f6a623; box-shadow:0 0 12px rgba(246,166,35,.8); }
.cvz-player .tp-ball, .cvz-player .tp-roll { display:none; place-items:center; color:#ccc; font:700 .78rem system-ui,sans-serif; }
.cvz-player .tp-ball { width:clamp(104px, 30vw, 150px); aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #d9534f, #7c1c18 70%); border:3px solid #333; text-shadow:0 1px 2px #000; }
.cvz-player .tp-ball.on { box-shadow:0 0 14px rgba(246,166,35,.8); }
.cvz-player .tp-mid { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.cvz-player .tp-quick { display:grid; grid-template-columns:repeat(3, minmax(0, 46px)); gap:6px; justify-content:center; }
.cvz-player .tp-key, .cvz-player .tp-keys button { position:relative; display:grid; place-items:center; height:40px; padding:0;
  border-radius:8px; border:1px solid #4a4d55; background:linear-gradient(#f2f2f2,#cfcfcf); color:#111; font:800 1.05rem/1 system-ui,sans-serif; }
.cvz-player .tp-key small { position:absolute; bottom:1px; left:0; right:0; font:800 7px/1 system-ui,sans-serif; color:#b3260b; white-space:nowrap; overflow:hidden; }
.cvz-player .tp-key.on, .cvz-player .tp-keys button.on { background:linear-gradient(#ffd56a,#f2a01e); }
.cvz-player .tp-more { font:600 .78rem system-ui,sans-serif; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:#111215; color:var(--dim); }
.cvz-player .tp-more.on { background:var(--accent); color:#111; border-color:var(--accent); }
.cvz-player .tp-right { display:flex; flex-direction:column; align-items:center; gap:10px; }
.cvz-player .tp-fires, .cvz-player .tp-sacbtns { display:flex; gap:10px; align-items:center; }
.cvz-player .tp-fire { width:clamp(52px, 15vw, 70px); aspect-ratio:1; border-radius:50%; border:3px solid #3a1608;
  background:radial-gradient(circle at 35% 30%, #ff8a4a, #c2410c 70%); color:#fff; font:800 1rem system-ui,sans-serif; text-shadow:0 1px 2px #000;
  box-shadow:0 4px 0 #5b1d07; }
.cvz-player .tp-fire.r { margin-top:26px; }                     /* staggered, like a thumb rests */
.cvz-player .tp-fire.purple { background:radial-gradient(circle at 35% 30%, #b98cff, #6b21a8 70%); border-color:#2e1065; box-shadow:0 4px 0 #2e1065; width:clamp(42px, 12vw, 56px); }
.cvz-player .tp-fire.blue { background:radial-gradient(circle at 35% 30%, #7cb8ff, #1d4ed8 70%); border-color:#172554; box-shadow:0 4px 0 #172554; width:clamp(42px, 12vw, 56px); }
.cvz-player .tp-fire.on { background:radial-gradient(circle at 35% 30%, #ffe08a, #f2a01e 70%); transform:translateY(3px); box-shadow:0 1px 0 #5b1d07; }
.cvz-player .tp-sacbtns { display:none; }
.cvz-player .tp-roll { width:44px; height:90px; border-radius:10px; writing-mode:vertical-rl;
  background:repeating-linear-gradient(#2a2d33 0 6px, #3d4047 6px 9px); border:2px solid #55585f; }
.cvz-player .tp-roll.on { border-color:#f6a623; }
.cvz-player .tp-keys { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; max-width:260px; width:100%; margin:0 auto; }
.cvz-player .tp-keys[hidden] { display:none; }
/* which parts show for each controller */
.cvz-player .tpad.p-roller .tp-stick { display:none; }
.cvz-player .tpad.p-roller .tp-ball { display:grid; }
.cvz-player .tpad.p-sac .tp-sacbtns { display:flex; }
.cvz-player .tpad.p-sac .tp-right { flex-direction:row; flex-wrap:wrap; justify-content:center; max-width:190px; }
.cvz-player .tpad.p-sac .tp-roll { display:grid; }
@media (max-width:380px) {
  .cvz-player .tpad { gap:6px; padding:8px; }
  .cvz-player .tp-quick { grid-template-columns:repeat(3, minmax(0, 38px)); gap:5px; }
  .cvz-player .tp-key { height:36px; }
}

/* ---- Full screen ---- */
.cvz-player .fsbar { display:none; }
html.cvz-fs, html.cvz-fs body { overflow:hidden; }                       /* no page scrolling behind it */
.cvz-player #playcol.fs { position:fixed; inset:0; z-index:3000; background:#000; margin:0; padding:
  max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  justify-content:center; align-items:center; gap:6px; overflow:hidden; }
.cvz-player #playcol.fs > .bar, .cvz-player #playcol.fs > .howto, .cvz-player #playcol.fs > .layoutpick { display:none !important; }
.cvz-player #playcol.fs > .fsbar { display:flex; gap:8px; width:100%; justify-content:flex-end; }
.cvz-player .fsbar button { font:600 .8rem system-ui,sans-serif; padding:6px 12px; border-radius:999px; border:1px solid #444; background:rgba(30,30,34,.9); color:#eee; }
/* (Update 186) each 100dvh size has a 100vh copy in front of it, for browsers without dvh (iOS 15.0-15.3) */
.cvz-player #playcol.fs > #game-box { width:min(100%, calc((100vh - 60px) * 4 / 3)); width:min(100%, calc((100dvh - 60px) * 4 / 3)); border:0; border-radius:0; flex:0 0 auto; }
.cvz-player.compact #playcol.fs > #game-box { width:min(100%, calc((100vh - 290px) * 4 / 3)); width:min(100%, calc((100dvh - 290px) * 4 / 3)); }
.cvz-player #playcol.fs > .tpad { width:100%; max-width:560px; background:transparent; border:0; margin:0; }
/* phone turned sideways: game in the middle, joystick to its left, buttons to its right */
@media (orientation:landscape) and (max-height:600px) {
  .cvz-player.compact #playcol.fs { display:grid; grid-template-columns:1fr auto 1fr; grid-template-rows:auto 1fr;
    grid-template-areas:"bar bar bar" "left game right"; align-items:center; justify-items:center; }
  .cvz-player.compact #playcol.fs > .fsbar { grid-area:bar; }
  .cvz-player.compact #playcol.fs > #game-box { grid-area:game; width:auto; height:calc(100vh - 60px); height:calc(100dvh - 60px); max-width:62vw; }
  .cvz-player.compact #playcol.fs > .tpad { display:contents; }
  .cvz-player.compact #playcol.fs .tp-left { grid-area:left; display:flex; flex-direction:column; align-items:center; gap:10px; }
  .cvz-player.compact #playcol.fs .tp-right { grid-area:right; }
  .cvz-player.compact #playcol.fs .tp-mid { grid-area:left; align-self:end; margin-bottom:4px; }
  .cvz-player.compact #playcol.fs .tp-left { align-self:start; margin-top:10px; }
  .cvz-player.compact #playcol.fs .tp-keys { position:fixed; left:50%; bottom:8px; transform:translateX(-50%); z-index:5; width:240px;
    background:rgba(20,20,24,.95); padding:8px; border-radius:12px; border:1px solid #444; }
  .cvz-player.compact #playcol.fs .tp-stick, .cvz-player.compact #playcol.fs .tp-ball { width:clamp(96px, 22vh, 140px); }
}

/* (Update 185) a phone on its side after "Exit full screen": the game screen is sized to the room left between the
   site header and the tab bar (it used to take the full width, so it was more than twice the visible height) */
@media (orientation:landscape) and (max-height:600px) and (max-width:991.98px) {
  .cvz-player #playcol:not(.fs) > #game-box { width:min(100%, max(240px, calc((100dvh - var(--header-h, 56px) - var(--tabbar-h, 64px) - env(safe-area-inset-bottom) - 16px) * 4 / 3))); margin:0 auto; }
  /* (Update 186) this one uses var(), so a vh copy in front would not help: browsers without dvh get it here */
  @supports not (height: 100dvh) { .cvz-player #playcol:not(.fs) > #game-box { width:min(100%, max(240px, calc((100vh - var(--header-h, 56px) - var(--tabbar-h, 64px) - env(safe-area-inset-bottom) - 16px) * 4 / 3))); } }
}

/* test site: "Tell us what this game needs" under the touch controls */
.cvz-player .tp-report { grid-column:1 / -1; justify-self:center; font-size:.8rem; color:var(--accent); }
.cvz-player .tp-report[hidden] { display:none; }
.cvz-player #playcol.fs .tp-report { display:none; }

/* touch screens: Full screen is the main way to play, so it stands out, with a hint to turn the phone */
.cvz-player .bar button#full.primary { background:var(--accent); color:#111; border-color:var(--accent); }
.cvz-player .turnhint { display:none; }
@media (hover:none) and (orientation:portrait) {
  .cvz-player .turnhint { display:block; order:3; margin-top:8px; text-align:center; font-size:.82rem; color:var(--dim); }
  .cvz-player #playcol.fs .turnhint { display:none; }
}

/* Sideways full screen lays the touch controls out without their surrounding box (display:contents), so the box's
   "don't scroll or zoom here" setting no longer reached the joystick: Android took the drag as a page gesture and the
   stick stopped. Every touch control now carries the setting itself, and so does the full-screen player. */
.cvz-player .tp-left, .cvz-player .tp-mid, .cvz-player .tp-right, .cvz-player .tp-stick, .cvz-player .tp-ball,
.cvz-player .tp-roll, .cvz-player .tp-keys, .cvz-player .tp-quick, .cvz-player #playcol.fs {
  touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }

/* The trackball rolls (Update 47): a dimpled surface that moves the way the ball is pushed (player.js sets --roll),
   under a fixed shine. The big picture's ball gets the same moving surface over it. */
.cvz-player .tp-ball { position:relative; overflow:hidden; color:transparent; text-shadow:none;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.55) 0, rgba(255,255,255,.12) 18%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0,0,0,.55) 100%),
    radial-gradient(circle, rgba(0,0,0,.28) 0 2.2px, transparent 2.6px) var(--roll, 0 0) / 15px 15px,
    radial-gradient(circle at 40% 35%, #e0564f, #8a1f1a 72%); }
.cvz-player .rball { overflow:hidden;
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,.45) 100%),
    radial-gradient(circle, rgba(0,0,0,.30) 0 2.4px, transparent 2.9px) var(--roll, 0 0) / 9% 9%; }

/* Update 52: the key-mapping table never pushes the page sideways on a phone */
.cvz-player .mapwrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 600px) {
  .cvz-player table.map { table-layout: fixed; }
  .cvz-player table.map th, .cvz-player table.map td { padding: 4px 4px; }
  .cvz-player table.map td:first-child { white-space: normal; word-break: break-word; }
  .cvz-player .bind { width: 100%; white-space: normal; padding: 5px 6px; font-size: .78rem; line-height: 1.2; }
}

/* Update 55: the Roller Controller
   - the trackball's moving surface matches the ball exactly (it spilled past the ball onto the ROLLER CONTROLLER plate)
   - on desktop the game and the controller fit on screen together: side by side on wide windows, and on narrower ones
     the game is sized so the controller still fits underneath */
.cvz-player .rball { top: 36.82%; width: 18.67%; }
@media (min-width: 1200px) and (hover: hover) {
  .cvz-player:not(.compact) .play.wide.roller-on { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .cvz-player:not(.compact) .play.wide.roller-on #game-box { max-width: none; width: min(100%, calc((100vh - 200px) * 4 / 3)); width: min(100%, calc((100dvh - 200px) * 4 / 3)); margin: 0 auto; }
  .cvz-player:not(.compact) .play.wide.roller-on .bar, .cvz-player:not(.compact) .play.wide.roller-on .howto { max-width: none; }
  .cvz-player:not(.compact) .play.wide.roller-on #ctrlwrap { position: sticky; top: 80px; }
  .cvz-player:not(.compact) .play.wide.roller-on .roller { max-width: 100%; margin-top: 6px; }
}
@media (min-width: 901px) and (max-width: 1199.98px) and (hover: hover) {
  .cvz-player:not(.compact) .play.wide.roller-on #game-box { max-width: min(760px, calc((100vh - 520px) * 4 / 3)); max-width: min(760px, calc((100dvh - 520px) * 4 / 3)); min-width: 320px; }
  .cvz-player:not(.compact) .play.wide.roller-on .roller { max-width: 600px; }
}
.cvz-player .mousenote:not(:empty) { margin-top: 6px; font-size: .8rem; color: #f6c35b; }

/* Update 56: the touch trackball is the Roller Controller's cream-white ball (it was red), dots optional */
.cvz-player .tp-ball {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.75) 0, rgba(255,255,255,.18) 18%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(60,50,30,.45) 100%),
    radial-gradient(circle, rgba(70,60,40,.30) 0 2.2px, transparent 2.6px) var(--roll, 0 0) / 15px 15px,
    radial-gradient(circle at 38% 32%, #fffdf4, #efe6cc 35%, #bfb397 80%, #7d735e);
  box-shadow: inset 0 0 0 3px #111, 0 0 0 4px #2a2b2f, 0 4px 10px rgba(0,0,0,.5); }
.cvz-player.nodots .tp-ball {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.75) 0, rgba(255,255,255,.18) 18%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(60,50,30,.45) 100%),
    radial-gradient(circle at 38% 32%, #fffdf4, #efe6cc 35%, #bfb397 80%, #7d735e); }
.cvz-player.nodots .rball { background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,.45) 100%); }
.cvz-player .tp-dots { display: none; margin-top: 6px; font: 600 .72rem system-ui, sans-serif; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer; }
.cvz-player .tpad.p-roller .tp-dots { display: inline-block; }
.cvz-player .dotsopt { display: none; margin-left: 14px; }
.cvz-player .play.roller-on .dotsopt { display: inline; }
.cvz-player .tpad.p-roller .tp-left { display: flex; flex-direction: column; align-items: center; }
.cvz-player .roller .rswitch { cursor: pointer; } .cvz-player .roller .rswitch:focus-visible { outline: 2px solid var(--accent); }

/* ===== Update 57: Mouse & Keyboard, folded key settings, more room for the game on desktop ===== */
/* the key settings box folds away: a one-line bar until opened */
.cvz-player details.controls { padding: 0; }
.cvz-player details.controls > summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; list-style: none; }
.cvz-player details.controls > summary::-webkit-details-marker { display: none; }
.cvz-player details.controls > summary::before { content: "▸"; color: var(--accent); transition: transform .15s; }
.cvz-player details.controls[open] > summary::before { transform: rotate(90deg); }
.cvz-player details.controls .ctl-title { font-weight: 700; color: var(--text); font-size: 1rem; }
.cvz-player details.controls .ctl-sub { color: var(--dim); font-size: .85rem; }
.cvz-player details.controls .ctl-hint { margin-left: auto; font-size: .8rem; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cvz-player details.controls[open] { padding-bottom: 14px; }
.cvz-player details.controls > :not(summary) { margin-left: 16px; margin-right: 16px; }
/* (Update 186) on phones the long title (it gains the game's name) wrapped below the ▸ arrow and left the arrow alone on
   the first line: the bar is a small grid there, arrow + title + Show on one row, the short explanation under the title */
@media (max-width: 700px) {
  .cvz-player details.controls > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; }
  .cvz-player details.controls > summary::before { grid-column: 1; grid-row: 1; }
  .cvz-player details.controls .ctl-title { grid-column: 2; grid-row: 1; min-width: 0; }
  .cvz-player details.controls .ctl-hint { grid-column: 3; grid-row: 1; margin-left: 0; }
  .cvz-player details.controls .ctl-sub { grid-column: 2 / 4; grid-row: 2; }
}
.cvz-player details.controls { margin-top: 14px; }
/* (Update 186) the numbered list's numbers sit inside the panel's 16px margin, not on its border */
.cvz-player details.controls > ol { padding-left: 1.4em; }
/* (Update 186) the ▸ marker belongs to the title, so on a phone it can't wrap onto a line of its own above it */
.cvz-player details.controls > summary::before { content: none; }
.cvz-player details.controls .ctl-title::before { content: "▸"; display: inline-block; margin-right: 10px; color: var(--accent); transition: transform .15s; }
.cvz-player details.controls[open] .ctl-title::before { transform: rotate(90deg); }

/* the Mouse & Keyboard card */
.cvz-player .mkcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .86rem; }
.cvz-player .mkcard.hidden { display: none; }
.cvz-player .mk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text); font-size: .95rem; }
.cvz-player .mk-ic { color: var(--accent); font-size: 1.1rem; }
.cvz-player .mk-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; }
.cvz-player .mk-keys dt { color: var(--dim); font-weight: 600; }
.cvz-player .mk-keys dd { margin: 0; color: var(--text); font-weight: 600; }
.cvz-player .mk-keys dd small { display: block; font-weight: 400; color: var(--dim); }
.cvz-player .mk-keys .mk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cvz-player .mk-keys .mk-pad span { background: #111215; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; text-align: center; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvz-player .mk-keys .mk-pad i { font-style: normal; color: var(--accent); margin-right: 4px; }
.cvz-player .mk-mouse { margin: 10px 0 0; color: var(--dim); font-size: .8rem; line-height: 1.4; }
.cvz-player .mk-mode, .cvz-player .mk-change { display: block; width: 100%; margin-top: 8px; font: 600 .8rem system-ui, sans-serif; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #111215; color: var(--text); cursor: pointer; }
.cvz-player .mk-mode:hover, .cvz-player .mk-change:hover { border-color: var(--accent); }

/* desktop: the game gets the room. It is sized to fit the window's height, so the whole screen and its buttons show
   without scrolling; the controller or key card sits in a slim column beside it. */
@media (min-width: 901px) and (hover: hover) {
  .cvz-player:not(.compact) .play:not(.wide) { grid-template-columns: minmax(0, 1fr) 250px; }
  .cvz-player:not(.compact) .play.mk { grid-template-columns: minmax(0, 1fr) 270px; }
  .cvz-player:not(.compact) .play:not(.wide) #game-box { width: min(100%, calc((100vh - 190px) * 4 / 3)); width: min(100%, calc((100dvh - 190px) * 4 / 3)); margin: 0 auto; }
  .cvz-player:not(.compact) .play:not(.wide) .bar { justify-content: center; }
  .cvz-player:not(.compact) .play #ctrlwrap { position: sticky; top: 76px; }
  .cvz-player .ctrlpick { flex-direction: column; align-items: stretch; }
  .cvz-player .ctrlpick button { text-align: center; }
}
.cvz-player .play.mk .cv-cap { display: none; }

/* Update 58: mouse speed */
.cvz-player .mspeed-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: .8rem; color: var(--dim); }
.cvz-player .mspeed-row input { flex: 1 1 auto; max-width: 160px; accent-color: var(--accent); }
.cvz-player .mspeed-row output { min-width: 1.4em; text-align: right; color: var(--text); font-weight: 700; }
.cvz-player .mkcard .mspeed-row { justify-content: flex-start; }

/* Update 59: auto-fire in the bar under the game */
.cvz-player .af { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font: 600 .82rem system-ui, sans-serif; color: var(--dim); }
.cvz-player .af label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text); }
.cvz-player .af input[type=checkbox] { accent-color: var(--accent); width: 20px; height: 20px; margin: 0; }   /* (Update 194) was 13 px: too small to tap */
.cvz-player .af label { min-height: 24px; }
.cvz-player .af input[type=range] { width: 70px; accent-color: var(--accent); display: none; }
.cvz-player .af output { display: none; min-width: 2.4em; color: var(--text); }
.cvz-player .af.on { border-color: var(--accent); }
.cvz-player .af.on input[type=range], .cvz-player .af.on output { display: inline-block; }

/* Update 63: auto-fire's speed slider is always there (greyed out while auto-fire is off), so ticking the box no
   longer makes it appear and push things onto a new line */
.cvz-player .af { flex: 0 0 auto; white-space: nowrap; }
.cvz-player .af input[type=range], .cvz-player .af output { display: inline-block; }
.cvz-player .af input[type=range]:disabled { opacity: .35; }
.cvz-player .af:not(.on) output { opacity: .45; }
/* Update 65: auto-fire is a small menu (Off / While I hold fire / Always on) */
.cvz-player .af select { font: 600 .8rem system-ui, sans-serif; color: var(--text); background: #111215; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.cvz-player .af.on select { border-color: var(--accent); }

/* Update 67: trackball / speed roller games: the pointer is hidden over the game (it's the trackball now), and a small
   sign on the game screen says to click it to capture the mouse (Esc lets go) */
/* (Update 68) no cursor:none over the game: the captured mouse is hidden by the browser anyway, and this rule kept the pointer invisible after Esc */
.cvz-player #game-box { position: relative; }
.cvz-player .locktip { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); z-index: 5; pointer-events: none;
  padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.78); color: #fff; font: 600 .82rem system-ui, sans-serif;
  border: 1px solid rgba(255,255,255,.18); opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; }
.cvz-player .locktip.show { opacity: 1; transform: translate(-50%, 0); }
.cvz-player .locktip.on { border-color: var(--accent); }

/* Update 73: phones. The page scrolls when you drag on the game picture or between the touch controls; the controls
   themselves (joystick, ball, keys, fire buttons) still keep the finger. The emulator's own menu button (the ☰ in the
   corner of the game) is hidden: the player has its own buttons. */
.cvz-player #game, .cvz-player #game canvas { touch-action: pan-y; }
.cvz-player .tpad { touch-action: pan-y; }
.cvz-player #playcol.fs .tpad, .cvz-player #playcol.fs #game, .cvz-player #playcol.fs #game canvas { touch-action: none; }
.cvz-player .ejs_virtualGamepad_open { display: none !important; }
.cvz-player [data-c] { touch-action: none; }   /* (Update 73) no double-tap zoom on the controls */

/* ---- Driving Controller (Expansion Module #2), drawn from photos of the real unit: the console with its free-turning
   steering wheel and two gauges, the hand controller seated on the right as the gear shift, and the accelerator pedal
   in front. (Update 90) ---- */
.cvz-player .drive { position:relative; width:100%; max-width:640px; margin:4px auto 0; aspect-ratio:900/860; user-select:none; -webkit-user-select:none; touch-action:none; }
.cvz-player .drive svg { position:absolute; inset:0; width:100%; height:100%; }
.cvz-player .drive .dwheel { cursor:grab; outline:none; }
.cvz-player .drive .dwheel.grab { cursor:grabbing; }
.cvz-player .drive .dwheel.on #dWheelRot, .cvz-player .drive .dwheel:focus-visible #dWheelRot { filter:drop-shadow(0 0 6px rgba(246,166,35,.85)); }
.cvz-player .drive .dpedal { cursor:pointer; transition:transform .06s; transform-box:fill-box; transform-origin:50% 100%; }
.cvz-player .drive .dpedal.on { transform:scaleY(.9) scaleX(.98); filter:drop-shadow(0 0 8px #f6a623) brightness(1.35); }
.cvz-player .drive .dneedle { transition:transform .25s ease-out; transform-origin:0 0; }
.cvz-player .drive .dwell { position:absolute; left:66.00%; top:15.81%; width:15.78%; height:39.53%; display:flex; justify-content:center; align-items:flex-start; }
.cvz-player .drive .dwell .cv { width:100%; height:auto; margin:0 auto; }   /* sized by width so its arrows and badges sit true round the knob */
.cvz-player .drive .credit { position:absolute; left:0; right:0; top:100%; margin-top:6px; text-align:center; color:#7d838b; font-size:.72rem; line-height:1.35; }
.cvz-player .drive.hidden { display:none; }
.cvz-player .play.drive-on .drive { margin-bottom:4.2em; }
@media (min-width: 1100px) {
  .cvz-player:not(.compact) .play.wide.roller-on .drive { max-width:100%; margin-top:6px; }
}
.cvz-player .play.drive-on .dotsopt { display:none; }

/* (Update 91) "How to drive": folds away, remembered */
.cvz-player .dhelp { max-width:640px; margin:6px auto 8px; border:1px solid #2f3137; border-radius:12px; background:#17181b; color:#d9dbe0; }
.cvz-player .dhelp.hidden { display:none; }
.cvz-player .dhelp summary { cursor:pointer; padding:9px 14px; font-weight:700; list-style:none; display:flex; justify-content:space-between; align-items:center; }
.cvz-player .dhelp summary::-webkit-details-marker { display:none; }
.cvz-player .dhelp summary::after { content:"Show"; font-size:.75rem; font-weight:600; color:#9aa0a8; border:1px solid #3a3c42; border-radius:999px; padding:2px 10px; }
.cvz-player .dhelp[open] summary::after { content:"Hide"; }
.cvz-player .dhelp-body { padding:0 14px 12px; font-size:.86rem; line-height:1.45; }
.cvz-player .dhelp-body dl { display:grid; grid-template-columns:max-content 1fr; gap:6px 14px; margin:0; }
.cvz-player .dhelp-body dt { font-weight:700; color:#f6a623; }
.cvz-player .dhelp-body dd { margin:0; }
.cvz-player .dhelp-body kbd { font:700 .78rem system-ui,sans-serif; background:#0d0e10; border:1px solid #4a4c52; border-radius:4px; padding:0 5px; color:#f2f2f2; }
.cvz-player .dhelp-body .dh-start { margin:10px 0 0; padding:8px 10px; border-radius:8px; background:#1f2a1f; color:#cfe8cf; }
@media (max-width:520px) { .cvz-player .dhelp-body dl { grid-template-columns:1fr; } }

/* (Update 175) other versions that play exactly the same, listed under a game on /play */
.cvz-playsame { font-size: .78rem; margin-top: 2px; }
.cvz-playsame > summary { cursor: pointer; color: var(--cvz-muted, #9aa3b2); list-style: none; }
.cvz-playsame > summary::-webkit-details-marker { display: none; }
.cvz-playsame > summary::before { content: "▸ "; }
.cvz-playsame[open] > summary::before { content: "▾ "; }
.cvz-playsame ul { margin: 4px 0 0; padding-left: 14px; max-height: 160px; overflow: auto; }
.cvz-playsame li { margin: 1px 0; }

/* (Update 186) smooth round edges on ordinary (1x) screens, as site.css does for the rest of the site (Update 163): a 1px
   border round a pill or a rounded button breaks into steps there, so these get 2px */
@media (max-resolution: 1.49dppx), (-webkit-max-device-pixel-ratio: 1.49) {
  .cvz-player .ctrlpick button, .cvz-player .layoutpick button, .cvz-player .af, .cvz-player details.controls .ctl-hint, .cvz-player .locktip,
  .cvz-player .bind, .cvz-player .bar button, .cvz-player .vol button, .cvz-player .tp-more, .cvz-player .fsbar button, .cvz-player .tp-dots,
  .cvz-player .mk-mode, .cvz-player .mk-change { border-width: 2px; background-clip: padding-box; }
}

/* (Update 194) the Play badge on the game tiles is at least 12 px on phones */
@media (max-width: 575.98px) { .cvz-playbadge { font-size: .75rem; } }

/* (Update 195) the hand controller lines up with the game screen on desktop (sized and placed by player.js). Its coiled
   cord runs up behind the controller choice buttons, which stay on top. It springs out with the same motion as the A–Z
   controller (site.css cvzPadDrop / cvzCordStretchY): it drops a little past its place, stretching its cord, and the cord
   pulls it back. */
@media (min-width: 901px) and (hover: hover) {
  .cvz-player .ctrlpick { position: relative; z-index: 3; }
  /* the cord stops at the top of the controller column instead of rising out of the player's panel */
  .cvz-player:not(.compact) .play:not(.wide) #ctrlwrap { clip-path: inset(0 -60px -60px -60px); }
  /* (Update 198) the controller scrolls with the game screen (the column was "sticky", so the controller stayed on screen
     while the game moved, and no longer lined up), and the two controller choice buttons sit under it, so it can be
     as tall as the screen allows */
  .cvz-player:not(.compact) .play:not(.wide) #ctrlwrap { position: static; display: flex; flex-direction: column; }
  .cvz-player:not(.compact) .play:not(.wide) #ctrlwrap > .ctrlpick { order: 10; margin: 14px 0 0; }
}
.cvz-player .cv.cv-spring { animation: cvzPadDrop 2.6s both; will-change: transform, opacity; }
.cvz-player .cv.cv-spring::before { transform-origin: center bottom; animation: cvzCordStretchY 2.6s both; }
/* (Update 196) phones: the A–Z controller's phone motion (as site.css cvzPadDropPhone / cvzPadDropClip, with a taller cord space): it starts tucked inside
   its own space and slides down out of it, past its place, and the cord pulls it back. It never passes over the buttons
   above it. */
@keyframes cvzCvDropPhone {
  0%   { transform: translateY(calc(-100% - 104px)); animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
  52%  { transform: translateY(4%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  70%  { transform: translateY(-1.5%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  84%  { transform: translateY(.6%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { transform: none; }
}
/* the cut-off line moves opposite to the drop, so it stays put on the page (the top of the cord's space) */
@keyframes cvzCvDropClip {
  0%   { clip-path: inset(100% -30% -10% -30%); animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
  52%  { clip-path: inset(calc(-4% - 104px) -30% -10% -30%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  70%  { clip-path: inset(calc(1.5% - 104px) -30% -10% -30%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  84%  { clip-path: inset(calc(-.6% - 104px) -30% -10% -30%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { clip-path: inset(-104px -30% -10% -30%); }
}
@media (max-width:700px) {
  .cvz-player .cv.cv-spring { animation-name: cvzCvDropPhone, cvzCvDropClip; animation-duration: 2.6s; animation-fill-mode: both; }
}
@media (prefers-reduced-motion: reduce) { .cvz-player .cv.cv-spring, .cvz-player .cv.cv-spring::before { animation: none; } }
