/* CPS Test v2 (11-29): the TOM-O-METER arcade cabinet, night time in the casino's back room. Own look, not the Clicker's daytime street. */
@font-face { font-family: "Chakra Petch"; src: url(/TomGames/fonts/ChakraPetch-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/TomGames/fonts/ChakraPetch-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
:root { --night: #120a24; --pink: #ff3fb4; --cyan: #38e8ff; --yellow: #ffe14a; --ink: #0a0410; --disp: Bungee, "Arial Black", Impact, sans-serif; --ui: "Chakra Petch", system-ui, sans-serif; }
html, body { background: var(--night); color: #f3ecff; }
body { font-family: var(--ui); }
.cp { position: relative; height: 100svh; min-height: 360px; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; }

/* top bar: back to the Clicker, name, modes, sound */
.cp-top { position: absolute; z-index: 5; inset: 0 0 auto; background: #0d0620; box-shadow: 0 6px 18px #0d0620; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "back logo snd" "nav nav nav"; align-items: center; gap: 8px 12px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); }
.cp-back { grid-area: back; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px 0 10px; border: 2px solid #ffffff2e; border-radius: 999px; background: #0a041099; color: #fff; font: 700 15px/1 var(--ui); text-decoration: none; white-space: nowrap; }
.cp-back svg { width: 18px; height: 18px; fill: currentColor; }
.cp-back:hover { border-color: var(--yellow); color: var(--yellow); }
.cp-logo { grid-area: logo; margin: 0; font: 26px/1 var(--disp); color: #fff; letter-spacing: .5px; white-space: nowrap; text-shadow: 0 0 8px var(--pink), 0 0 22px #ff3fb488; }
.cp-logo span { color: var(--cyan); text-shadow: 0 0 8px var(--cyan), 0 0 22px #38e8ff88; }
.cp-nav { grid-area: nav; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cp-seg { display: flex; border: 2px solid #ffffff2e; border-radius: 12px; overflow: hidden; background: #0a0410b3; }
.cp-seg a { display: grid; grid-auto-flow: column; place-items: center; white-space: nowrap; min-width: 44px; height: 40px; padding: 0 11px; color: #cfc4e6; font: 700 15px/1 var(--ui); text-decoration: none; text-transform: uppercase; letter-spacing: .5px; }
.cp-seg a + a { border-left: 2px solid #ffffff1a; }
.cp-seg a:hover { color: #fff; background: #ffffff14; }
.cp-seg [aria-current] { background: var(--pink); color: #fff; text-shadow: 0 1px 0 #0006; }
.cp-snd { grid-area: snd; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 2px solid #ffffff2e; border-radius: 50%; background: #0a041099; color: #fff; }
.cp-snd svg { width: 22px; height: 22px; fill: currentColor; } .cp-snd .off, .cp-snd.is-off .on { display: none; } .cp-snd.is-off .off { display: block; }
@media (min-width: 760px) and (max-width: 1000px) { .cp-back span { display: none; } .cp-back { padding: 0 11px; } .cp-seg a { min-width: 40px; padding: 0 9px; } }
@media (min-width: 760px) { .cp-nav { flex-wrap: nowrap; } .cp-top { grid-template-columns: auto auto 1fr auto; grid-template-areas: "back logo nav snd"; } .cp-nav { justify-content: flex-end; } }
@media (max-width: 520px) { .cp-nav { flex-wrap: nowrap; gap: 6px; } .cp-wide { display: none; } }
@media (max-width: 420px) { .cp-back span { display: none; } .cp-back { padding: 0 11px; } .cp-logo { font-size: 22px; } .cp-seg a { min-width: 0; height: 38px; padding: 0 8px; font-size: 13px; } }

/* the click area: the whole room under the top bar (cps.js places it) */
.cp-pad { position: absolute; z-index: 3; left: var(--px, 0); top: var(--py, 0); width: var(--pw, 100%); height: var(--ph, 100%); padding: 0; border: 0; border-radius: 18px; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cp-pad { border-radius: 0; }
.cp-pad:focus-visible { outline: 3px solid var(--cyan); outline-offset: -4px; }
.m-space .cp-pad { cursor: default; }
.cp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.cp-about { padding: 30px max(20px, calc(50% - 430px)) 34px; background: #0d0720; border-top: 2px solid #ff3fb455; }
.cp-about h2 { margin: 0 0 10px; font: 24px/1.15 var(--disp); color: var(--yellow); }
.cp-about p { margin: 0 0 14px; max-width: 64ch; font: 600 16px/1.55 var(--ui); color: #d9d0ec; }
.cp-about a { color: var(--cyan); }
.cp-about ul { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 26px; font: 600 16px/1.6 var(--ui); }
.cp-about b { font: 17px/1 var(--disp); color: var(--pink); margin-right: 4px; }
.tpt-foot { background: #07030f; }

/* result: a prize ticket out of the machine */
.cp-res { width: min(440px, calc(100vw - 20px)); max-width: none; max-height: none; padding: 0; border: 0; background: none; overflow: visible; color: #2a0b24; }
.cp-res::backdrop { background: #07030fcc; }
.cp-res[open] .tk { animation: tk-in .45s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes tk-in { from { transform: translateY(-60px) rotate(-3deg); opacity: 0; } }
.tk { position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px 26px 20px; background: #ffd23f; border-radius: 6px; text-align: center;
  -webkit-mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 26px repeat-y, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 26px repeat-y;
          mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 26px repeat-y, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 26px repeat-y; }
.tk::before { content: ""; position: absolute; inset: 8px 16px; border: 2px dashed #2a0b2440; border-radius: 4px; pointer-events: none; }
.tk-x { position: absolute; top: 12px; right: 18px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #2a0b24; color: #ffd23f; }
.tk-x svg { width: 20px; height: 20px; fill: currentColor; }
.tk-head { display: flex; flex-direction: column; gap: 2px; margin: 4px 44px 10px; font: 700 15px/1.2 var(--ui); }
.tk-head span:first-child { font: 13px/1 var(--disp); letter-spacing: 3px; color: #c2177a; }
.tk-main { display: flex; align-items: center; justify-content: center; gap: 14px; }
.tk-main canvas { width: min(130px, 30vw); height: auto; flex: none; border: 4px solid #2a0b24; border-radius: 50%; }
.tk-main > div { flex: 1; min-width: 0; }
.tk-v { font: clamp(44px, 13vw, 62px)/1 var(--disp); color: #2a0b24; } .tk-v small { font-size: .38em; }
.tk-stamp { display: inline-block; margin: 10px 0 0; padding: 6px 10px 7px; border: 4px solid #c2177a; border-radius: 8px; color: #c2177a; font: clamp(17px, 5vw, 23px)/1 var(--disp); transform: rotate(-5deg); text-transform: uppercase; animation: tk-stamp .35s .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes tk-stamp { from { transform: rotate(8deg) scale(2.6); opacity: 0; } }
.tk-line { margin: 12px 0; font: 700 16px/1.35 var(--ui); }
.tk-clk { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 10px; border-radius: 12px; background: #2a0b24; color: #fff; text-align: left; text-decoration: none; }
.tk-clk img { flex: none; border-radius: 50%; border: 2px solid #ffd23f; }
.tk-clk span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-clk b { font: 13px/1 var(--disp); color: #ffd23f; letter-spacing: .5px; }
.tk-clk small { font: 600 14px/1.3 var(--ui); color: #eee3f5; }
.tk-clk i { flex: none; padding: 8px 12px; border-radius: 8px; background: var(--pink); font: normal 15px/1 var(--disp); }
.tk-clk:hover i { background: #ff63c4; }
.tk-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-btn { min-width: 0; min-height: 46px; padding: 8px 6px; border: 3px solid #2a0b24; border-radius: 10px; background: #fff7d6; color: #2a0b24; font: 15px/1.1 var(--disp); box-shadow: 0 4px 0 #2a0b24; }
.tk-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2a0b24; }
.tk-btn--go { grid-column: 1 / -1; background: #2a0b24; color: #ffd23f; font-size: 19px; }
.tk-btn--pink { background: var(--pink); color: #fff; }
@media (max-height: 560px) { .tk { padding: 10px 24px 12px; } .tk-main canvas { width: 80px; } .tk-v { font-size: 40px; } .tk-line { margin: 6px 0; } .tk-clk { margin-bottom: 8px; } .tk-btn { min-height: 40px; } .cp-res { width: min(560px, calc(100vw - 20px)); } }
@media (prefers-reduced-motion: reduce) { .cp-res[open] .tk, .tk-stamp { animation: none; } }
/* 11-29 search text */
.cp-about h2 + .tpt-faq { margin-top: 4px; }
.cp-about h2:not(:first-child) { margin-top: 28px; }
.cp-about .tpt-faq { font: 600 16px/1.4 var(--ui); color: #f3ecff; }
.cp-about .tpt-faq summary::after { color: var(--pink); }
.cp-about .tpt-faq p { color: #d9d0ec; }
.cp-more { margin-top: 22px !important; font-size: 15px !important; }
