/* Cyril the Squirrel Game v1.1.0 — inline, iframe-free embed. */
.ctsg-game-app {
  display: block;
  position: relative;
  width: 100%;
  max-width: var(--ctsg-max-width, 1280px);
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
  line-height: 1.4;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ctsg-game-app[hidden] { display: none !important; }
.ctsg-game-app button { appearance: none; text-transform: none; }
.ctsg-game-app h1,
.ctsg-game-app h2,
.ctsg-game-app p { font-family: inherit; }

.ctsg-game-app {
  color-scheme: dark;
  --ink: #fff9e8;
  --muted: #d9cfea;
  --purple-950: #120b24;
  --purple-900: #1c1038;
  --purple-800: #2c1756;
  --purple-700: #482080;
  --gold: #ffd447;
  --gold-strong: #ffb800;
  --coral: #ff665e;
  --mint: #61e6b6;
  --panel: rgba(24, 12, 48, 0.90);
  --panel-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ctsg-game-app, .ctsg-game-app * {
  box-sizing: border-box;
}

.ctsg-game-app {
  min-height: 100%;
  background: var(--purple-950);
}

.ctsg-game-app {
  min-height: 0;
  margin: 1.5rem auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(99, 60, 190, 0.42), transparent 34rem),
    radial-gradient(circle at 88% 2%, rgba(255, 102, 94, 0.22), transparent 30rem),
    linear-gradient(160deg, #170c31 0%, #241448 48%, #110a21 100%);
  overflow-x: hidden;
}

.ctsg-game-app button,
.ctsg-game-app canvas {
  -webkit-tap-highlight-color: transparent;
}

.ctsg-game-app button {
  font: inherit;
}

.ctsg-game-app button:focus-visible,
.ctsg-game-app canvas:focus-visible {
  outline: 4px solid var(--mint);
  outline-offset: 4px;
}

.ctsg-game-app .page-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 42px) 30px;
}

.ctsg-game-app .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 14px;
}

.ctsg-game-app .brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-transform: uppercase;
}

.ctsg-game-app .brand-kicker {
  color: var(--gold);
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 900;
  letter-spacing: 0.25em;
}

.ctsg-game-app .brand-title {
  margin-top: 5px;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  font-weight: 1000;
  letter-spacing: -0.045em;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.22);
}

.ctsg-game-app .topbar-actions {
  display: flex;
  gap: 8px;
}

.ctsg-game-app .icon-button,
.ctsg-game-app .secondary-button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.ctsg-game-app .icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ctsg-game-app .icon-button:hover,
.ctsg-game-app .secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

.ctsg-game-app .game-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: clamp(18px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ctsg-game-app .game-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #84d7ff;
  isolation: isolate;
}

.ctsg-game-app canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
}

.ctsg-game-app .screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 38px);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 212, 71, 0.13), transparent 28%),
    linear-gradient(105deg, rgba(17, 8, 35, 0.35), rgba(17, 8, 35, 0.72));
  backdrop-filter: blur(2px);
}

.ctsg-game-app .screen[hidden] {
  display: none;
}

.ctsg-game-app .panel {
  width: min(610px, 94%);
  max-height: 94%;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: clamp(18px, 3vw, 30px);
  padding: clamp(18px, 3.4vw, 38px);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.44);
}

.ctsg-game-app .logo-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: clamp(56px, 7vw, 78px);
  aspect-ratio: 1;
  margin-bottom: 10px;
  border: 4px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: #1a0e34;
  box-shadow: 0 0 0 7px rgba(255, 212, 71, 0.12), 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: rotate(-5deg);
}

.ctsg-game-app .logo-c {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 1000;
}

.ctsg-game-app .logo-bolt {
  position: absolute;
  right: -11px;
  bottom: -9px;
  color: var(--coral);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 1000;
  text-shadow: 0 3px 0 #1a0e34;
}

.ctsg-game-app .eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: clamp(0.68rem, 1.2vw, 0.86rem);
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.ctsg-game-app .panel h2 {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.ctsg-game-app .panel h2 span {
  color: var(--gold);
}

.ctsg-game-app .intro,
.ctsg-game-app .panel > p:not(.eyebrow) {
  max-width: 48ch;
  margin: clamp(12px, 2vw, 20px) auto;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.55vw, 1.08rem);
  line-height: 1.55;
}

.ctsg-game-app .primary-button {
  min-width: min(270px, 90%);
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  color: #201032;
  background: linear-gradient(180deg, #ffe77f 0%, var(--gold) 55%, var(--gold-strong) 100%);
  box-shadow: 0 8px 0 #a95b00, 0 15px 28px rgba(0, 0, 0, 0.30);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 1000;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.ctsg-game-app .primary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #a95b00, 0 18px 32px rgba(0, 0, 0, 0.34);
}

.ctsg-game-app .primary-button:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #a95b00, 0 8px 18px rgba(0, 0, 0, 0.30);
}

.ctsg-game-app .control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: clamp(18px, 3vw, 28px);
}

.ctsg-game-app .control-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 10px 7px;
  background: rgba(255, 255, 255, 0.045);
}

.ctsg-game-app kbd {
  min-width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom-width: 4px;
  border-radius: 8px;
  padding: 4px 7px;
  color: #271442;
  background: #fff9e8;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 1000;
}

.ctsg-game-app .control-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.ctsg-game-app .touch-note {
  margin-bottom: 0 !important;
  font-size: 0.76rem !important;
}

.ctsg-game-app .compact-panel {
  width: min(460px, 92%);
}

.ctsg-game-app .result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 26px;
}

.ctsg-game-app .result-grid > div {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.055);
}

.ctsg-game-app .result-grid span,
.ctsg-game-app .result-grid strong {
  display: block;
}

.ctsg-game-app .result-grid span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ctsg-game-app .result-grid strong {
  color: var(--gold);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.ctsg-game-app .win-panel {
  box-shadow: 0 22px 70px rgba(255, 184, 0, 0.20), 0 22px 60px rgba(0, 0, 0, 0.44);
}

.ctsg-game-app .mobile-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  background: rgba(10, 5, 22, 0.68);
}

.ctsg-game-app .jump-button {
  flex: 1;
  min-height: 62px;
  border: 0;
  border-radius: 16px;
  color: #24113f;
  background: linear-gradient(180deg, #ffe878, #ffc934);
  box-shadow: inset 0 -5px 0 rgba(146, 79, 0, 0.38);
  font-size: 1.08rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  cursor: pointer;
  touch-action: manipulation;
}

.ctsg-game-app .jump-button:active {
  transform: translateY(2px);
  box-shadow: inset 0 -2px 0 rgba(146, 79, 0, 0.38);
}

.ctsg-game-app .mobile-controls .secondary-button {
  min-width: 112px;
  border-radius: 16px;
  font-weight: 900;
}

.ctsg-game-app .game-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px 16px;
  color: var(--muted);
  font-size: 0.83rem;
}

.ctsg-game-app .game-footer p {
  margin: 0;
}

.ctsg-game-app .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (hover: hover) and (pointer: fine) {
  .ctsg-game-app .mobile-controls {
    display: none;
  }
}

@media (max-width: 720px) {
  .ctsg-game-app .page-shell {
    padding: 10px 8px 18px;
  }

  .ctsg-game-app .topbar {
    margin-bottom: 9px;
  }

  .ctsg-game-app .button-label {
    display: none;
  }

  .ctsg-game-app .icon-button {
    width: 44px;
    justify-content: center;
    padding: 8px;
  }

  .ctsg-game-app .game-card {
    border-radius: 18px;
  }

  .ctsg-game-app .screen {
    padding: 8px;
  }

  .ctsg-game-app .panel {
    width: 96%;
    padding: 15px;
    border-radius: 18px;
  }

  .ctsg-game-app .logo-badge {
    display: none;
  }

  .ctsg-game-app .panel h2 {
    font-size: clamp(1.65rem, 8vw, 2.55rem);
  }

  .ctsg-game-app .intro,
.ctsg-game-app .panel > p:not(.eyebrow) {
    margin: 8px auto 11px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .ctsg-game-app .primary-button {
    min-height: 44px;
    padding: 9px 20px;
    box-shadow: 0 5px 0 #a95b00, 0 9px 18px rgba(0, 0, 0, 0.28);
  }

  .ctsg-game-app .control-grid {
    gap: 5px;
    margin-top: 12px;
  }

  .ctsg-game-app .control-grid > div {
    padding: 6px 3px;
  }

  .ctsg-game-app kbd {
    border-bottom-width: 2px;
    padding: 2px 5px;
    font-size: 0.62rem;
  }

  .ctsg-game-app .control-grid span,
.ctsg-game-app .touch-note {
    font-size: 0.61rem !important;
  }

  .ctsg-game-app .result-grid {
    margin: 12px 0 16px;
  }

  .ctsg-game-app .result-grid > div {
    padding: 8px 4px;
  }

  .ctsg-game-app .game-footer {
    display: none;
  }
}

@media (max-width: 470px) {
  .ctsg-game-app .brand-title {
    font-size: 1.2rem;
  }

  .ctsg-game-app .brand-kicker {
    font-size: 0.56rem;
  }

  .ctsg-game-app .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ctsg-game-app .touch-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctsg-game-app, .ctsg-game-app *,
.ctsg-game-app::before, .ctsg-game-app *::before,
.ctsg-game-app::after, .ctsg-game-app *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}


.ctsg-game-app.ctsg-hide-header .topbar,
.ctsg-game-app.ctsg-hide-footer .game-footer {
  display: none !important;
}

.ctsg-game-app.ctsg-hide-header .page-shell {
  padding-top: 10px;
}

.ctsg-game-app.ctsg-hide-footer .page-shell {
  padding-bottom: 10px;
}

.ctsg-game-app.ctsg-hide-header.ctsg-hide-footer .page-shell {
  padding-block: 8px;
}


.ctsg-game-app .ctsg-game-error-message {
  margin: 0;
  padding: 2rem;
  color: #fff9e8;
  background: #241448;
  font: 700 1rem/1.5 system-ui, sans-serif;
  text-align: center;
}

@media (max-width: 720px) {
  .ctsg-game-app {
    margin-block: 1rem;
    border-radius: 16px;
  }
}

@media (max-width: 470px) {
  .ctsg-game-app .start-panel {
    padding: 8px 10px;
  }

  .ctsg-game-app .start-panel .eyebrow {
    margin-bottom: 3px;
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .ctsg-game-app .start-panel h2 {
    font-size: 1.46rem;
    line-height: 0.94;
  }

  .ctsg-game-app .start-panel .intro {
    margin: 4px auto 6px;
    font-size: 0.68rem;
    line-height: 1.22;
  }

  .ctsg-game-app .start-panel .primary-button {
    min-height: 38px;
    padding: 6px 16px;
    font-size: 0.9rem;
  }

  .ctsg-game-app .start-panel .control-grid {
    display: none;
  }
}

.ctsg-game-app .mobile-eyebrow {
  display: none;
}

@media (max-width: 470px) {
  .ctsg-game-app .start-panel .desktop-eyebrow,
  .ctsg-game-app .start-panel .intro {
    display: none;
  }

  .ctsg-game-app .start-panel .mobile-eyebrow {
    display: inline;
  }
}
