/* Patinated token chain and the three faces of a lifted wooden register. */
.zg-gates {
  --token-rim: #bf9756;
  --token-paper: #fff0bc;
}
.zg-wire {
  height: 3px;
  margin-top: -1px;
  background: linear-gradient(#28170c, #b19b68 45%, #6c4a2a 70%, #291b0e);
  opacity: 1;
  box-shadow: 0 2px 1px #160d09;
}
.zg-gate,
.zg-gate[data-power^='-'] {
  color: var(--token-paper);
  font: bold 18px/1 Georgia, 'Times New Roman', serif;
  letter-spacing: -.055em;
  text-shadow: 0 1px 0 #241607, 0 -1px 1px #160e06;
  border: 2px solid var(--token-rim);
  background:
    radial-gradient(circle at 30% 16%, #f5e7a824 1%, transparent 46%),
    repeating-conic-gradient(from 7deg, #806641 0 1deg, transparent 1deg 8deg) border-box,
    linear-gradient(135deg, #877448, #4c482c 49%, #705b36);
  box-shadow: inset 0 0 0 2px #483520, inset 0 0 0 3px #ceba7b, 0 2px 0 #47351f, 1px 5px 8px #150e0ac7;
  isolation: isolate;
}
.zg-gate::before {
  content: '';
  z-index: -1;
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid #d3b87f70;
  background: radial-gradient(ellipse at 30% 20%, #526054, #2f3d33 72%, #283026);
}
.zg-gate[data-power^='-']::before {
  background: radial-gradient(ellipse at 30% 20%, #79513a, #4f3025 72%, #38251c);
}
.zg-held {
  --zg-height: clamp(35px, 8.5vw, 49px);
  gap: 3px;
  filter: drop-shadow(1px 9px 4px #120903bd);
}
.zg-face,.zg-next {
  color: #fff1cc;
  border: 1px solid #c49c5a;
  border-radius: 4px;
  font: 600 clamp(19px, 5vw, 26px)/1 Georgia, 'Times New Roman', serif;
  text-shadow: -1px -1px 0 #351b0d, 0 1px 0 #26180c, 1px 1px 0 #765431;
  background:
    repeating-linear-gradient(5deg,#bf824521 0 1px,transparent 1px 5px,#21150d33 5px 7px,transparent 7px 10px),
    linear-gradient(151deg,#825330,#53301c 51%,#412214);
  box-shadow: inset 0 2px 0 #f1c98665, inset 0 -3px 0 #2c180f, inset 0 0 0 3px #523624;
}
.zg-face::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid #e7c98740;
  border-radius: 1px;
  background: linear-gradient(90deg,#daba7d 2px,transparent 2px) left bottom/7px 1px no-repeat;
}
.zg-next {
  border-color: #ceb47d;
  background:
    repeating-linear-gradient(-82deg,#b4ad7133 0 1px,transparent 1px 4px,#28170d20 4px 6px,transparent 6px 11px),
    linear-gradient(155deg,#776844,#604a2e 58%,#3a2c1b);
}
.zg-transformed .zg-cube { animation-timing-function: cubic-bezier(.23,.82,.26,1.09); }
.row.zg-source .tile { outline-color: #eccd8aaf; }
.row.zg-target .tile { outline-color: #ffe0a0; }
.row.zg-swap .tile { outline-color: #e7cf9ea6; }
.solid-fallback .row.zg-lifted .tile { visibility: hidden; }
.zg-old-digit { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.zg-preview {
  background: #302216f2;
  border: 1px solid #bca573;
  border-radius: 2px;
  color: #fff0cb;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: bold;
}
