:root {
  --pulse-cyan: #52e6ff;
  --pulse-gold: #f0b85c;
  --pulse-danger: #ff5f6d;
}

.portfolio-pulso { margin-top: 3.5rem; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid color-mix(in srgb, var(--ai) 36%, var(--line)); border-radius: var(--radius); background: linear-gradient(145deg, color-mix(in srgb, var(--ai) 5%, var(--surface)), var(--surface)); }
.portfolio-pulso-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.portfolio-pulso-heading h3 { margin: 0 0 .6rem; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.portfolio-pulso-heading p { max-width: 690px; margin: 0; font-size: .9rem; }
.portfolio-pulso-heading .service-proof { margin-bottom: .9rem; }
.pulso-mini-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.pulso-mini-tags span { padding: .35rem .55rem; border: 1px solid rgba(82,230,255,.2); border-radius: 999px; color: #a9d9e2; font-size: .62rem; white-space: nowrap; }

.game-shell { overflow: hidden; border: 1px solid rgba(82,230,255,.18); border-radius: 18px; background: #071014; box-shadow: 0 20px 55px rgba(0,0,0,.35); }
.game-topbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .85rem; border-bottom: 1px solid rgba(82,230,255,.12); background: #081216; }
.game-brand { display: flex; align-items: center; gap: .55rem; }
.game-brand strong { color: #f4fcfd; font-size: .78rem; letter-spacing: .11em; }
.game-brand-signal { width: 8px; height: 8px; border-radius: 50%; background: var(--pulse-cyan); box-shadow: 0 0 14px var(--pulse-cyan); }
.game-stats { display: flex; gap: clamp(.8rem, 3vw, 2.2rem); }
.game-stats > div { display: grid; min-width: 52px; }
.game-stats span { color: #607074; font-size: .5rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.game-stats strong { color: #eafcff; font-size: .82rem; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.game-stats > div:last-child strong { color: var(--pulse-gold); }

.game-stage { position: relative; height: clamp(270px, 32vw, 360px); min-height: 270px; overflow: hidden; isolation: isolate; background: #050b0e; }
.game-canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.game-canvas:focus-visible { outline: 2px solid var(--pulse-cyan); outline-offset: -4px; border-radius: 0; }
.game-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 1rem; background: rgba(4,9,11,.63); transition: opacity .18s ease, visibility .18s ease; }
.game-overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.game-overlay-panel { width: min(100%, 390px); padding: 1.25rem; border: 1px solid rgba(82,230,255,.22); border-radius: 15px; background: rgba(7,16,20,.92); text-align: center; box-shadow: 0 20px 55px rgba(0,0,0,.4); }
.game-overlay-kicker { color: var(--pulse-cyan); font-size: .58rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.game-overlay-title { margin: .55rem 0 .55rem; color: var(--text); font-size: clamp(1.5rem, 4vw, 2.1rem); }
.game-overlay p { max-width: 330px; margin: 0 auto 1rem; font-size: .78rem; }
.game-start { min-height: 42px; padding: .65rem 1.15rem; border: 0; border-radius: 999px; background: var(--pulse-cyan); color: #041014; font: inherit; font-size: .76rem; font-weight: 850; cursor: pointer; box-shadow: 0 0 24px rgba(82,230,255,.2); }
.game-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.game-controls { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border-top: 1px solid rgba(82,230,255,.12); background: #081216; }
.game-compact-hint { color: #718084; font-size: .62rem; }
.game-compact-hint kbd { margin-inline: .15rem; padding: .14rem .3rem; border: 1px solid #314147; border-bottom-width: 2px; border-radius: 4px; background: #0d191d; color: #c7d2d4; font-family: inherit; font-size: .56rem; }
.control-actions { display: flex; gap: .45rem; }
.control-actions button { min-height: 34px; display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .6rem; border: 1px solid #26373c; border-radius: 7px; background: #0b171b; color: #aab5b7; font: inherit; font-size: .59rem; font-weight: 750; cursor: pointer; }
.control-actions button:hover:not(:disabled) { color: #f2fbfc; border-color: #40565c; }
.control-actions button:disabled { opacity: .38; cursor: not-allowed; }

@media (max-width: 760px) {
  .portfolio-pulso-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .pulso-mini-tags { justify-content: flex-start; }
}

@media (max-width: 660px) {
  .portfolio-pulso { margin-inline: -.75rem; padding: 1rem .75rem; border-inline: 0; border-radius: 0; }
  .game-shell { border-radius: 12px; }
  .game-topbar { align-items: flex-start; padding: .55rem .6rem; }
  .game-stats { gap: .55rem; }
  .game-stats > div { min-width: 43px; }
  .game-stats span { font-size: .44rem; }
  .game-stats strong { font-size: .68rem; }
  .game-stage { height: 330px; min-height: 330px; }
  .game-controls { flex-wrap: wrap; }
  .game-compact-hint { width: 100%; display: block; text-align: center; line-height: 1.5; }
  .control-actions { width: 100%; }
  .control-actions button { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .game-overlay { transition: none; }
}
