/* Cut the costs (slice.js): the bills in the first screen, the button under the avatar, and the game window. */

/* the bills fly over the headline but never take a click: the words, buttons and avatar under them keep working */
.cut-sky { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }

/* his suggestion under the question box */
.play-cut { gap: 8px; }
.play-cut svg { flex: none; width: 18px; height: 18px; }

/* neon game buttons on the dark page (owner's reference, 17/11/2026): his "Play: cut the costs" and the brick game's start */
.play-cut.btn { background: rgb(8 6 5 / 0.6); color: #ffe3d0; border: 2px solid #ff8a45; text-shadow: 0 0 8px rgb(255 107 26 / 0.85);
  box-shadow: 0 0 4px #ff8a45, 0 0 14px rgb(255 107 26 / 0.7), 0 0 34px rgb(255 107 26 / 0.3), inset 0 0 10px rgb(255 107 26 / 0.4); }
.play-cut.btn:hover { background: rgb(255 107 26 / 0.14); color: #fff; }
.play-cut.btn:active { transform: scale(0.96); }
.play-cut svg { filter: drop-shadow(0 0 4px #ff6b1a); }
/* "Try it" on the button's left, its arrow nudging towards it (owner, 18/11/2026: small, minimal motion) */
.play-try { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.try-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; color: #ffb98c; }
.try-hint svg { width: 18px; height: 18px; animation: try-nudge 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes try-nudge { 0%, 100% { transform: translateX(0); opacity: 0.6; } 50% { transform: translateX(5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .try-hint svg { animation: none; } }
.play .play-start { padding: 16px 28px 16px 76px; border: 2px solid #ff8a45; border-radius: 16px; background: rgb(8 6 5 / 0.84); color: #ffe3d0; text-align: left; text-shadow: 0 0 8px rgb(255 107 26 / 0.9);
  box-shadow: 0 0 4px #ff8a45, 0 0 16px rgb(255 107 26 / 0.75), 0 0 42px rgb(255 107 26 / 0.38), inset 0 0 14px rgb(255 107 26 / 0.45); transition: box-shadow 200ms, border-color 200ms, transform 100ms ease-out; }
.play .play-start::before { content: ""; position: absolute; left: 20px; top: 50%; width: 34px; height: 34px; border: 2px solid #ff8a45; border-radius: 8px; transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 10px rgb(255 107 26 / 0.8), inset 0 0 8px rgb(255 107 26 / 0.5); }
.play .play-start::after { content: ""; position: absolute; left: 33px; top: 50%; width: 12px; height: 14px; transform: translateY(-50%); background: #ffb07a; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.play .play-start b { color: #fff4ec; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; }
.play .play-start span { color: #ffc9a6; }
.play .play-start:hover { border-color: #ffb07a; box-shadow: 0 0 6px #ffb07a, 0 0 22px rgb(255 107 26 / 0.9), 0 0 54px rgb(255 107 26 / 0.5), inset 0 0 16px rgb(255 107 26 / 0.55); }
.play .play-start:active { transform: translate(-50%, -50%) scale(0.97); }

/* the game window */
html.cg-open { overflow: hidden; }
.cg { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgb(8 8 10 / 0.84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cg[hidden] { display: none; }
.cg .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cg-box { position: relative; width: min(1000px, 100%); height: min(700px, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 24px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 110%, rgb(255 107 26 / 0.16), transparent 60%), #120f0d; border: 1px solid rgb(255 255 255 / 0.14); box-shadow: 0 50px 120px -40px rgb(0 0 0 / 0.95); color: #f4f3f1; }
.cg-hud { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px 20px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.cg-score { margin-right: auto; display: grid; gap: 2px; }
.cg-score small { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #b0aeb3; }
.cg-score b { font: 800 28px/1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cg-lives { display: flex; gap: 4px; }
.cg-lives svg { width: 24px; height: 24px; fill: #ef4444; transition: fill 200ms, transform 300ms var(--ease); }
.cg-lives svg.off { fill: rgb(255 255 255 / 0.18); transform: scale(0.82); }
.cg-sound, .cg-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background 200ms, transform 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.cg-sound:hover, .cg-close:hover { background: rgb(255 255 255 / 0.2); }
.cg-sound:active, .cg-close:active { transform: scale(0.92); }
.cg-sound svg { width: 20px; height: 20px; }
.cg-sound[aria-pressed="false"] .w { opacity: 0.2; }
.cg-time { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / 0.08); }
.cg-time i { display: block; height: 100%; background: var(--fill); transform-origin: left center; transition: background 300ms; }
.cg-time.is-low i { background: #ef4444; }
.cg-time.is-hit i { animation: cg-time-hit 700ms ease-out; }
@keyframes cg-time-hit { 0%, 55% { background: #ef4444; box-shadow: 0 0 14px #ef4444; } }
.cg-play { position: relative; min-height: 0; }
.cg-field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.cg-field:focus { outline: none; }

/* power-ups: a badge with its countdown, and the whole field tinted while slow motion or speed lasts */
.cg-buff { position: absolute; z-index: 2; left: 50%; top: 14px; transform: translateX(-50%); display: grid; gap: 6px; min-width: 170px; padding: 8px 16px 9px; border-radius: 99px; background: rgb(20 18 16 / 0.82); border: 1px solid rgb(255 255 255 / 0.18); font: 800 14px/1 var(--sans); text-align: center; pointer-events: none; }
.cg-buff[hidden] { display: none; }
.cg-buff i { display: block; height: 3px; border-radius: 3px; background: #38bdf8; transform-origin: left center; }
.cg.is-fast .cg-buff i { background: #f43f5e; }
.cg-play::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 250ms; }
.cg.is-slow .cg-play::after { opacity: 1; box-shadow: inset 0 0 140px rgb(56 189 248 / 0.38); }
.cg.is-fast .cg-play::after { opacity: 1; box-shadow: inset 0 0 140px rgb(244 63 94 / 0.34); }
.cg-play::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, rgb(255 210 176 / 0.55), transparent 70%); }
.cg.is-boom .cg-play::before { animation: cg-boom 420ms ease-out; }
@keyframes cg-boom { 0% { opacity: 1; } 100% { opacity: 0; } }

/* the window is one of his thought clouds, in grey (owner, 17/11/2026: "not white, like a grey shadow cloud"): the puffs sit
   behind the body, so only their rounded tops (lit) and bottoms (in shadow) show; they pop in one after another */
.cg-card { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); isolation: isolate; width: min(440px, calc(100% - 40px)); display: grid; justify-items: center; gap: 14px; padding: 34px 28px 28px; color: #17130e; text-align: center; }
.cg-card[hidden] { display: none; }
.cg-card:not([hidden]) { animation: cg-cloud-in 460ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cg-cloud-in { from { opacity: 0; transform: translate(-50%, -46%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.cg-cloud { position: absolute; inset: 0; z-index: -1; isolation: isolate; filter: drop-shadow(0 30px 26px rgb(0 0 0 / 0.6)) drop-shadow(0 8px 36px rgb(255 107 26 / 0.22)); }
.cg-cloud::before { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 46px;
  background: linear-gradient(180deg, #ebe8e4 0%, #dcd8d3 50%, #cbc6c0 100%); box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.75), inset 0 -18px 30px rgb(60 52 44 / 0.18); }
.cg-cloud i, .cg-cloud b { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 28%, #f8f6f3 0 12%, #e4e0db 40%, #cdc8c2 72%, #aea8a1 100%); }
.cg-cloud i { z-index: 0; aspect-ratio: 1; }
.cg-cloud b { z-index: 1; }
.cg-cloud i:nth-child(1) { left: 0; top: 0; width: 32%; transform: translateY(-30%); --n: 0; }
.cg-cloud i:nth-child(2) { left: 19%; top: 0; width: 42%; transform: translateY(-40%); --n: 1; }
.cg-cloud i:nth-child(3) { left: 50%; top: 0; width: 34%; transform: translateY(-32%); --n: 2; }
.cg-cloud i:nth-child(4) { left: 74%; top: 0; width: 27%; transform: translateY(-20%); --n: 3; }
.cg-cloud i:nth-child(5) { left: 6%; bottom: 0; width: 34%; transform: translateY(26%); --n: 4; }
.cg-cloud i:nth-child(6) { left: 56%; bottom: 0; width: 38%; transform: translateY(22%); --n: 5; }
.cg-cloud b:nth-of-type(1) { left: 7%; bottom: -66px; width: 26px; height: 26px; --n: 6; }
.cg-cloud b:nth-of-type(2) { left: 1%; bottom: -98px; width: 14px; height: 14px; --n: 7; }
.cg-card:not([hidden]) .cg-cloud i, .cg-card:not([hidden]) .cg-cloud b { animation: cg-puff 560ms cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(80ms + var(--n) * 45ms); }
@keyframes cg-puff { from { scale: 0.4; opacity: 0; } to { scale: 1; opacity: 1; } }
.cg-card h2 { font: 800 clamp(30px, 4.4vw, 42px)/1.05 var(--sans); letter-spacing: -0.035em; }
.cg-card p { font-size: 15.5px; line-height: 1.5; color: #3c3833; }
.cg-card .cg-best { font-weight: 700; color: #17130e; }
.cg-card .cg-best:empty { display: none; }
.cg-card .cg-end-lvl { font-weight: 800; color: #9a3412; }
.cg-card .cg-end-lvl:empty { display: none; }
.cg-total { color: #c2410c; }

/* the rules, only for those who want them: a small drop-down */
.cg-rules { display: grid; justify-items: center; gap: 12px; width: 100%; }
.cg-rules summary { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 14px 0 16px; border-radius: 99px; background: rgb(23 19 14 / 0.1); color: #17130e; font: 700 14px/1 var(--sans);
  cursor: pointer; list-style: none; transition: background 200ms, transform 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.cg-rules summary::-webkit-details-marker { display: none; }
.cg-rules summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 250ms var(--ease); }
.cg-rules[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.cg-rules summary:hover { background: rgb(23 19 14 / 0.16); }
.cg-rules summary:active { transform: scale(0.96); }
.cg-rule-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; color: #3c3833; text-align: left; }
.cg-rule-list li { position: relative; padding-left: 16px; }
.cg-rule-list li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: #c2410c; }

/* what else flies up: seven small pictures with a word each */
.cg-legend { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 0; padding: 0; list-style: none; }
.cg-legend li { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 1.15; color: #3c3833; }
.cg-legend img { width: 40px; height: 40px; }

/* the next level: a big banner in the middle of the field, gone after a moment */
.cg-stage { position: absolute; z-index: 2; left: 50%; top: 40%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none; opacity: 0; }
.cg-stage b { font: 800 clamp(42px, 7vw, 66px)/1 var(--sans); letter-spacing: -0.04em; color: #fff; text-shadow: 0 0 34px var(--fill), 0 4px 0 rgb(0 0 0 / 0.35); }
.cg-stage span { padding: 7px 14px; border-radius: 99px; background: rgb(20 18 16 / 0.86); color: #ffd2b0; font: 700 15px/1.2 var(--sans); }
.cg-stage.is-on { animation: cg-stage 1800ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cg-stage { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 24% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1); } }

/* the Play buttons: a glossy orange capsule with a round knob (owner's reference, 17/11/2026), pressed the moment a finger lands */
.cg-go { position: relative; display: inline-flex; align-items: center; gap: 16px; min-height: 60px; padding: 0 8px 0 30px; border-radius: 99px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #ff8f45 0%, #f05a10 50%, #c9330a 100%); background-color: #e04a0e; color: #fff; font: 800 19px/1 var(--sans); letter-spacing: -0.01em; text-shadow: 0 1px 1px rgb(110 30 0 / 0.6);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.4), inset 0 -5px 10px rgb(140 28 0 / 0.35), 0 0 0 1px rgb(170 45 8 / 0.65), 0 14px 26px -12px rgb(224 64 12 / 0.95);
  transition: transform 100ms ease-out, filter 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.cg-go::before { content: ""; position: absolute; left: 18px; right: 58px; top: 3px; height: 46%; border-radius: 99px 99px 40px 40px / 99px 99px 22px 22px; background: linear-gradient(180deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.04)); pointer-events: none; }
.cg-go span { position: relative; }
.cg-knob { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #ffffff 0 28%, #e7e5e2 60%, #c4c0bb 100%);
  box-shadow: 0 0 0 3px #ffb070, 0 0 0 4px rgb(160 40 8 / 0.5), 0 3px 6px rgb(0 0 0 / 0.3), inset 0 -3px 5px rgb(0 0 0 / 0.12); transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.cg-knob::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 16px; transform: translate(-35%, -50%); background: #e0400c; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.cg-go:hover { filter: brightness(1.05); }
.cg-go:hover .cg-knob { transform: translateX(2px) scale(1.05); }
.cg-go:active { transform: scale(0.96); filter: brightness(0.93); }
.cg-quote { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: #9a3412; transition: opacity 100ms; -webkit-tap-highlight-color: transparent; }
.cg-quote:active { opacity: 0.55; }
.cg-go:focus-visible, .cg-quote:focus-visible, .cg-rules summary:focus-visible { outline: 3px solid #17130e; outline-offset: 3px; }
.cg-hud button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cg-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; }
.cg.is-shake .cg-box { animation: cg-shake 360ms ease; }
@keyframes cg-shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

@media (max-width: 600px) {
  .cg { padding: 0; }
  .cg-box { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .cg-hud { gap: 8px; padding: 10px 10px 12px 16px; }
  .cg-score b { font-size: 24px; }
  .cg-lives svg { width: 20px; height: 20px; }
  .cg-card { width: calc(100% - 36px); padding: 30px 18px 24px; gap: 12px; }
  .cg-card p { font-size: 15px; }
  .cg-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; }
  .cg-legend img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .cg.is-shake .cg-box, .cg.is-boom .cg-play::before { animation: none; }
  .cg-card:not([hidden]), .cg-card:not([hidden]) .cg-cloud i, .cg-card:not([hidden]) .cg-cloud b { animation: none; }
  .cg-stage.is-on { animation: cg-stage-calm 1800ms ease both; }
}
@keyframes cg-stage-calm { 0%, 100% { opacity: 0; } 15%, 75% { opacity: 1; } }
