/* Holmes Play Lab · all selectors belong to the new interactive cube only. */
.hc-game {
  --hc-navy: #001740;
  --hc-yellow: #f6c60a;
  --hc-step: 69px;
  --hc-piece: 65.2px;
  display: block;
  direction: rtl;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  color: #fff;
  font-family: inherit;
  text-align: right;
  box-shadow: none;
  container-type: inline-size;
  container-name: holmes-cube;
}
.hc-game *, .hc-game *::before, .hc-game *::after { box-sizing: border-box; }
.hc-game button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hc-game button:focus-visible, .hc-game summary:focus-visible {
  outline: 3px solid var(--hc-yellow);
  outline-offset: 4px;
}
.hc-game button:disabled { cursor: default; opacity: .4; }
.hc-game button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hc-game p, .hc-game h3, .hc-game dl, .hc-game dd { margin: 0; }
.hc-game [hidden] { display: none !important; }

/* The cube floats directly on the page's navy background. Its 3D ancestors
   intentionally have no filters or opacity: the lighting is a separate layer. */
.hc-playground { min-width: 0; background: transparent; color: #e8eef8; display: flex; flex-direction: column; position: relative; }
.hc-stage {
  position: relative;
  height: 390px;
  min-height: 0;
  flex: none;
  perspective: 900px;
  perspective-origin: 50% 46%;
  overflow: clip;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
  isolation: isolate;
  outline: none;
}
.hc-stage::before { content: ''; position: absolute; width: 290px; height: 290px; max-width: 85%; top: 46%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, #173b6b55, #00174000 72%); pointer-events: none; }
.hc-stage:focus-visible { outline: 2px solid #f6c60a; outline-offset: -4px; border-radius: 12px; }
.hc-game.is-grabbing .hc-stage, .hc-game.is-grabbing .hc-sticker { cursor: grabbing; }
.hc-game[data-cube-busy="true"] .hc-stage { cursor: progress; }
.hc-stage-meta { position: absolute; top: 18px; right: 20px; left: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; direction: rtl; color: #b2c1d7; font-size: 12px; letter-spacing: 0; }
.hc-stage-meta b { font-family: Arial, sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 1px; color: #f6c60a; border: 1px solid #f6c60a38; border-radius: 6px; padding: 5px 10px; }
.hc-orbit-ring { width: min(75%, 370px); aspect-ratio: 1; position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); border: 1px solid #36578065; border-radius: 50%; pointer-events: none; }
.hc-orbit-ring::before { content: ''; position: absolute; inset: 13%; border: 1px dashed #f6c60a26; border-radius: 50%; }
.hc-orbit-ring::after { content: ''; position: absolute; width: 8px; height: 8px; left: 9%; top: 18%; border-radius: 50%; background: #f6c60a; box-shadow: 0 0 0 6px #f6c60a24; }
.hc-floor-shadow { position: absolute; left: 24%; width: 52%; height: 28px; top: calc(46% + 139px); border-radius: 50%; background: radial-gradient(ellipse, #00091c99 0%, #00091c35 50%, transparent 72%); filter: blur(8px); pointer-events: none; }
.hc-stage-caption { position: absolute; bottom: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; line-height: 1.8; color: #a2b3cd; pointer-events: none; }
.hc-live-dot { height: 5px; width: 5px; border-radius: 50%; background: #a4b6d2; }
.hc-game[data-cube-state="solved"] .hc-live-dot { background: #f6c60a; }
.hc-is-won .hc-orbit-ring::before { border-color: #bd990b80; animation: hc-win-ring .9s ease-out both; }
@keyframes hc-win-ring { from { transform: scale(.72); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

.hc-scene, .hc-turner { position: absolute; width: 0; height: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.hc-scene { left: 50%; top: 46%; }
.hc-turner { left: 0; top: 0; }
.hc-piece {
  position: absolute;
  width: var(--hc-piece);
  height: var(--hc-piece);
  left: calc(var(--hc-piece) / -2);
  top: calc(var(--hc-piece) / -2);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.hc-piece-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0b1529;
  border: 1px solid #26344b;
  border-radius: 4.5px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.hc-sticker {
  position: absolute;
  inset: 2.2px;
  background: linear-gradient(145deg, #ffffff29, transparent 58%, #00174012), var(--hc-sticker-color);
  border: 1px solid #ffffff24;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #ffffff5c, inset 0 -2px 0 #00174025;
  display: grid;
  place-items: center;
  color: #001740;
  cursor: grab;
}
.hc-sticker-b { color: #fff; }


.hc-touch-hint { padding: 8px 6px 18px; margin-inline: auto !important; text-align: center; color: #bac8dd; font-size: 14px; line-height: 1.9; }
.hc-console { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'status status' 'stats actions' 'wins wins'; align-items: center; gap: 16px 24px; min-width: 0; padding-top: 19px; border-top: 1px solid #ffffff20; background: transparent; }
.hc-status { grid-area: status; color: #e8eef8; }
.hc-status p { font-size: 16px; font-weight: 500; line-height: 1.8; }
.hc-is-won .hc-status { color: #f6c60a; }
.hc-statistics { grid-area: stats; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.hc-statistics > div + div { padding-inline-start: 14px; border-inline-start: 1px solid #ffffff20; }
.hc-statistics dt { color: #aebed5; font-size: 13px; line-height: 1.8; }
.hc-statistics dd { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; direction: ltr; font-size: 29px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.35; }
.hc-statistics dd b { font-weight: 500; }
.hc-statistics dd > span { color: #aebed5; font-size: 15px; }
.hc-actions { grid-area: actions; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hc-actions button { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 48px; padding: 10px 18px; border: 1px solid #4b6487; border-radius: 10px; font-size: 15px; font-weight: 500; line-height: 1.7; transition: background .2s, border-color .2s; }
.hc-actions .hc-shuffle { background: #f6c60a; border-color: #f6c60a; color: #001740; }
.hc-actions .hc-reset { background: transparent; color: #e4eaf3; }
.hc-actions .hc-shuffle:not(:disabled):hover { background: #ffda31; border-color: #ffda31; }
.hc-actions .hc-reset:hover { background: #ffffff08; border-color: #f6c60a; }
.hc-session-wins { grid-area: wins; color: #f6c60a; font-size: 13px; line-height: 1.8; }
.hc-session-wins b { margin-inline-start: 6px; font-weight: 600; }

@container holmes-cube (max-width: 520px) {
  .hc-stage { height: 355px; }
  .hc-stage-meta { top: 17px; left: 14px; right: 14px; }
  .hc-stage-caption { bottom: 17px; }
  .hc-orbit-ring { width: 76%; }
  .hc-floor-shadow { top: calc(46% + 124px); }
  .hc-console { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'status' 'stats' 'actions' 'wins'; gap: 14px; padding-top: 18px; }
  .hc-statistics { max-width: 310px; }
  .hc-statistics dd { font-size: 28px; }
  .hc-actions button { min-height: 50px; }
}
@container holmes-cube (max-width: 360px) {
  .hc-stage { height: 305px; }
  .hc-stage-meta { left: 10px; right: 10px; font-size: 12px; }
  .hc-stage-meta b { font-size: 12px; padding: 5px 8px; }
  .hc-stage-caption { bottom: 15px; font-size: 12px; }
  .hc-floor-shadow { top: calc(46% + 107px); }
  .hc-touch-hint { padding-inline: 0; font-size: 13px; }
  .hc-actions button { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-game button { transition: none !important; }
  .hc-is-won .hc-orbit-ring::before { animation: none !important; }
}
html[data-motion="paused"] .hc-game button { transition: none !important; }
html[data-motion="paused"] .hc-is-won .hc-orbit-ring::before { animation: none !important; }
@media print { .hc-game { display: none; } }
