.tippy-cog-companion { position: absolute; z-index: 2; top: 0; left: 50%; width: clamp(48px, 10vw, 76px); aspect-ratio: 320 / 280; transform: translateX(-50%); transition: top 550ms cubic-bezier(.22, 1, .36, 1), left 550ms cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
.tippy-cog-companion > :is(img, svg) { display: block; width: 100%; height: 100%; background: transparent; transform-origin: 50% 90%; transform: rotate(var(--tippy-cog-lean, 0rad)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .tippy-cog-companion { transition: none; }
  .tippy-cog-companion > :is(img, svg) { transform: none; }
}
body[data-theme="tippy"] {
  --balance-mint: #9ce0c4;
  --balance-line: rgb(142 219 195 / 35%);
}

[data-theme="tippy"] .page-shell { width: min(1600px, calc(100% - 64px)); }
[data-theme="tippy"] .app-heading { min-height: 190px; padding-top: 12px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; gap: 12px; }
[data-theme="tippy"] .app-heading > :not(.game-engagement):not(.game-controls) { flex: 0 0 100%; max-width: none; }
[data-theme="tippy"] .app-heading h1 { letter-spacing: .12em; }
[data-theme="tippy"] .app-heading .game-engagement,
[data-theme="tippy"] .game-controls { margin: 0; }
[data-theme="tippy"] .game-controls { justify-content: center; }
[data-theme="tippy"] .mode-tab[aria-pressed="true"] { background: linear-gradient(145deg, #b6eed4, #83cfc4); color: #112d39; box-shadow: 0 0 16px rgb(156 224 196 / 15%); }

[data-theme="tippy"] .game-workspace { grid-template-columns: minmax(220px, 1fr) minmax(480px, 2.4fr) minmax(260px, 1fr); gap: 28px; padding: 28px 0 40px; }
[data-theme="tippy"] .game-primary { grid-column: 2; grid-row: 1 / span 3; width: 100%; max-width: 800px; margin-inline: auto; gap: 16px; }
[data-theme="tippy"] .game-sidebar { display: contents; }
[data-theme="tippy"] .game-play-panel { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
[data-theme="tippy"] .game-panel-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-theme="tippy"] .score-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; margin: 0 auto 24px; gap: 16px; }
[data-theme="tippy"] .score-card {
  --score-accent: #b6eed4;
  min-width: 0;
  padding: 6px 12px;
  color: var(--muted);
  letter-spacing: .12em;
}
[data-theme="tippy"] .score-card:nth-child(2) {
  --score-accent: #d3c4ff;
}
[data-theme="tippy"] .score-card strong { color: var(--score-accent); font-size: clamp(24px, 3vw, 36px); letter-spacing: 0; overflow-wrap: anywhere; text-shadow: 0 0 24px rgb(156 224 196 / 20%); }
[data-theme="tippy"] .attempt-results { margin: 0 0 18px; }
[data-theme="tippy"] .attempt-results li { border: 0; border-radius: 0; background: none; }
[data-theme="tippy"] .attempt-results li.is-best { background: none; }
[data-theme="tippy"] .attempt-results li.is-best strong { color: var(--accent); }
[data-theme="tippy"] .stage {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
[data-theme="tippy"] #tippy-canvas { border-radius: inherit; }
[data-theme="tippy"] #tippy-canvas:focus-visible { outline: 2px solid var(--balance-mint); outline-offset: 6px; }
[data-theme="tippy"] .game-actions { margin-top: 24px; }
[data-theme="tippy"] #action { border-radius: 999px; border-color: #9ce0c4; background: linear-gradient(145deg, #335d60, #243e56); color: #e0fff0; box-shadow: 0 0 24px rgb(156 224 196 / 14%); }
[data-theme="tippy"] #reset-board { border-radius: 999px; background: var(--paper); }
.balance-feedback { text-align: center; }
[data-theme="tippy"] #game-status { margin: 0; min-height: 0; }
[data-theme="tippy"] #game-status:empty { display: none; }
[data-theme="tippy"] .result-share-status:empty { display: none; }
[data-theme="tippy"] .result-share-actions:not(:has(button:not([hidden]))) { margin: 0; }

[data-theme="tippy"] .game-quick-guide,
[data-theme="tippy"] .game-sidebar > .daily-leaderboard { border: 1px solid var(--balance-line); border-radius: 42px; padding: 30px 24px; background: radial-gradient(ellipse at 40% 15%, #234258, #102641 65%, #25284c); box-shadow: 0 0 0 7px rgb(142 219 195 / 4%), 0 0 0 8px rgb(142 219 195 / 14%); }
[data-theme="tippy"] .game-quick-guide { grid-column: 1; grid-row: 1; }
[data-theme="tippy"] .game-quick-guide li { padding-left: 30px; }
[data-theme="tippy"] .game-quick-guide li::before { width: 22px; height: 22px; background: #2a4b56; color: #b6eed4; border: 1px solid #6f9c9b; }
[data-theme="tippy"] .game-sidebar > .daily-leaderboard { grid-column: 3; grid-row: 1; margin-top: 0; }
[data-theme="tippy"] #mode-note { margin: 16px 0 0; line-height: 1.6; }
[data-theme="tippy"] .account-invitation { justify-content: flex-start; line-height: 1.6; margin: 16px 0; }
[data-theme="tippy"] .daily-leaderboard .mode-tabs { margin-top: 14px; }
[data-theme="tippy"] .game-sidebar .leaderboard-note { font-size: 12px; }
[data-theme="tippy"] .game-sidebar .leaderboard-table-wrap { max-height: none; }

@media (max-width: 1400px) {
  [data-theme="tippy"] .page-shell { width: calc(100% - 48px); }
}
@media (max-width: 1240px) {
  [data-theme="tippy"] .game-workspace { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  [data-theme="tippy"] .game-primary { grid-column: 1; grid-row: 1; width: min(760px, 100%); }
  [data-theme="tippy"] .game-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1; grid-row: 2; gap: 26px; align-items: start; }
  [data-theme="tippy"] .game-quick-guide { grid-column: 1; grid-row: 1; }
  [data-theme="tippy"] .game-sidebar > .daily-leaderboard { grid-column: 2; grid-row: 1; }
}
@media (max-width: 600px) {
  [data-theme="tippy"] .page-shell { width: calc(100% - 32px); }
  [data-theme="tippy"] .game-workspace { padding-top: 14px; }
  [data-theme="tippy"] .game-sidebar { grid-template-columns: minmax(0, 1fr); }
  [data-theme="tippy"] .game-sidebar > .daily-leaderboard { grid-column: 1; grid-row: 2; }
  [data-theme="tippy"] .game-quick-guide,
  [data-theme="tippy"] .game-sidebar > .daily-leaderboard { border-radius: 30px; padding: 26px 22px; }
  [data-theme="tippy"] #action { min-width: 180px; }
}

body[data-game-session][data-theme="tippy"] .game-workspace { display: block; min-height: calc(100svh - 108px); padding: 0; }
body[data-game-session][data-theme="tippy"] .game-primary { display: block; width: min(820px, 100%); max-width: none; margin: 0 auto; }
body[data-game-session][data-theme="tippy"] .game-play-panel {
  position: relative;
  width: 100%;
  min-height: min(650px, max(380px, calc(100svh - 174px)));
  aspect-ratio: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: clamp(16px, 3vw, 26px);
  background: none;
  box-shadow: none;
}
body[data-game-session][data-theme="tippy"] #game-session-content { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
body[data-game-session][data-theme="tippy"] .score-row { width: min(100%, 520px); margin: 0 auto; gap: 14px; }
body[data-game-session][data-theme="tippy"] .score-card { padding: 6px 8px; }
body[data-game-session][data-theme="tippy"] .score-card strong { margin-top: 2px; font-size: 22px; }
body[data-game-session][data-theme="tippy"] .attempt-results { width: min(100%, 620px); margin: 0 auto; }
body[data-game-session][data-theme="tippy"] .attempt-results li { padding: 6px 4px; font-size: 10px; }
body[data-game-session][data-theme="tippy"] .attempt-results strong { margin-top: 3px; font-size: 12px; }
body[data-game-session][data-theme="tippy"] .attempt-results small { min-height: 0; margin-top: 1px; font-size: 8px; }
body[data-game-session][data-theme="tippy"] .game-play-panel .stage {
  width: min(100%, 650px, max(240px, calc((100svh - 400px) * 1.5)));
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
}
body[data-game-session][data-theme="tippy"] #tippy-canvas { max-height: min(48svh, 380px); object-fit: contain; }
body[data-game-session][data-theme="tippy"] .game-actions { margin: 0; }
body[data-game-session][data-theme="tippy"] #action { min-width: min(210px, 100%); min-height: 50px; }
body[data-game-session][data-theme="tippy"] .game-session-start { margin: 0; }
body[data-game-session][data-theme="tippy"] .game-session-status { width: min(720px, 100%); margin: 6px auto 0; }
body[data-game-session][data-theme="tippy"] #game-status { min-height: 0; font-size: 12px; line-height: 1.35; }
body[data-game-session][data-theme="tippy"] .game-session-dialog .game-guide > h2 { margin-left: 36px; }
body[data-game-session][data-theme="tippy"] .game-recommendations { margin-top: 64px; border: 0; border-radius: 0; background: none; box-shadow: none; }
[data-theme="tippy"] .game-recommendations a { border: 0; border-radius: 0; background: none; }
[data-theme="tippy"] .game-recommendations a:hover { background: none; color: var(--accent); }
[data-theme="tippy"] .mode-tabs { border: 0; padding: 0; gap: 6px; background: none; box-shadow: none; }
[data-theme="tippy"] .mode-tab { border: 1px solid var(--line); border-radius: 999px; }
html:not([data-color-mode="dark"]) [data-theme="tippy"] .score-card { --score-accent: var(--accent); }
body[data-theme="tippy"] { -webkit-tap-highlight-color: transparent; }

.tippy-backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, #000 16px, transparent var(--clear-left, 25%), transparent var(--clear-right, 75%), #000 calc(100% - 16px));
}
.tippy-falling-shape {
  position: absolute;
  top: -100px;
  left: var(--shape-x);
  width: var(--shape-size);
  height: var(--shape-size);
  animation: tippy-fall var(--fall-duration) var(--fall-delay) linear infinite;
}
.tippy-shape-face { display: block; width: 100%; height: 100%; background: var(--shape-color); }
.tippy-falling-shape[data-shape="circle"] .tippy-shape-face { border-radius: 50%; }
.tippy-falling-shape[data-shape="square"] .tippy-shape-face { border-radius: 4px; }
.tippy-falling-shape[data-shape="triangle"] .tippy-shape-face { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tippy-falling-shape[data-morph="shrinking"] .tippy-shape-face { animation: tippy-shrink 160ms ease-in both; }
.tippy-falling-shape[data-morph="bouncing"] .tippy-shape-face { animation: tippy-bounce 480ms ease-out both; }
.tippy-backdrop[data-paused="true"] :is(.tippy-falling-shape, .tippy-shape-face) { animation-play-state: paused; }
html:not([data-color-mode="dark"]) .tippy-backdrop { display: none; }
@media (max-width: 600px) {
  .tippy-falling-shape { opacity: .4; }
}
@keyframes tippy-fall {
  from { transform: translate3d(0, 0, 0) rotate(var(--spin-start)); }
  to { transform: translate3d(0, calc(100svh + 200px), 0) rotate(var(--spin-end)); }
}
@keyframes tippy-shrink {
  to { transform: scale(.08); }
}
@keyframes tippy-bounce {
  0% { transform: scale(.08); }
  45% { transform: scale(1.28); }
  70% { transform: scale(.88); }
  86% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tippy-backdrop { display: none; }
  .tippy-falling-shape, .tippy-shape-face { animation: none; }
}
