.slice-surface {
  --slice-floor: #172924;
  --slice-grid: #b8c9a1;
  --slice-player: #ffe9c5;
  --slice-cut-edge: #ff957c;
  --slice-friend: #cfff82;
  --slice-solution: #79e5ff;
  --slice-ink: #17231d;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 25 / 18;
  box-sizing: border-box;
  border-radius: inherit;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: crosshair;
  color: var(--slice-ink);
  background: var(--slice-floor);
}

.slice-surface:focus-visible {
  outline: 3px solid var(--slice-friend);
  outline-offset: -3px;
}

.slice-surface[data-family="pizza"] {
  --slice-floor: #2f1e23;
  --slice-grid: #eab2a1;
}

.slice-surface[data-family="press"] {
  --slice-floor: #342920;
  --slice-grid: #e7c594;
}

.slice-surface[data-direction="paper"] {
  --slice-floor: #29444a;
  --slice-grid: #f0d8af;
  --slice-cut-edge: #a9eaff;
  --slice-player: #f3fdff;
  --slice-friend: #ffba8f;
}

.slice-surface[data-direction="paper"] .slice-art,
.slice-surface[data-direction="paper"] .slice-reveal {
  filter: sepia(0.32) hue-rotate(125deg) saturate(0.88) brightness(1.18);
}

.slice-surface[data-state="revealed"] {
  cursor: default;
  touch-action: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .slice-surface[data-state="revealed"][data-animate-reveal] .slice-reveal {
    animation: slice-reveal 240ms ease-out both;
  }
}

@keyframes slice-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slice-background {
  fill: var(--slice-floor);
}

.slice-grid {
  fill: none;
  stroke: var(--slice-grid);
  stroke-width: 1;
  opacity: 0.16;
}

.slice-player,
.slice-friend,
.slice-solution,
.slice-markers,
.slice-anchor {
  pointer-events: none;
}

.slice-cut-shadow,
.slice-cut-line,
.slice-friend-shadow,
.slice-friend-line,
.slice-solution-shadow,
.slice-solution-line,
.slice-anchor,
.slice-cut-endpoint {
  vector-effect: non-scaling-stroke;
}

.slice-cut-shadow,
.slice-cut-line,
.slice-friend-shadow,
.slice-friend-line,
.slice-solution-shadow,
.slice-solution-line {
  stroke-linecap: round;
}

.slice-cut-shadow {
  stroke: var(--slice-ink);
  stroke-width: 7;
  opacity: 0.78;
}

.slice-cut-line {
  stroke: var(--slice-player);
  stroke-width: 2.5;
}

.slice-friend-shadow {
  stroke: var(--slice-ink);
  stroke-width: 6;
  stroke-dasharray: 4 8;
}

.slice-friend-line {
  stroke: var(--slice-friend);
  stroke-width: 3;
  stroke-dasharray: 4 8;
}

.slice-solution-shadow,
.slice-solution-line {
  stroke-dasharray: 16 9;
}

.slice-solution-shadow {
  stroke: var(--slice-ink);
  stroke-width: 7;
}

.slice-solution-line {
  stroke: var(--slice-solution);
  stroke-width: 3.5;
}

.slice-solution-coincident .slice-solution-shadow {
  stroke-width: 13;
}

.slice-solution-coincident .slice-solution-line {
  stroke-width: 10;
}

.slice-cut-endpoint,
.slice-anchor {
  fill: var(--slice-player);
  stroke: var(--slice-ink);
  stroke-width: 1.5;
}

.slice-anchor {
  stroke: var(--slice-cut-edge);
  stroke-width: 3;
}

.slice-marker {
  color: var(--slice-ink);
  font-family: system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
}

.slice-marker circle {
  fill: var(--slice-player);
  stroke: var(--slice-ink);
  stroke-width: 1.5;
}

.slice-marker-b circle {
  fill: var(--slice-cut-edge);
}

.slice-marker text {
  fill: currentColor;
}
