:root {
  /* Cold dungeon stone + tarnished iron + aged bronze + blood red */
  --bg: #0b0c0e;
  --bg-vignette:
    radial-gradient(140% 90% at 50% -10%, #1c2026 0%, #101216 38%, #0b0c0e 72%),
    radial-gradient(80% 60% at 15% 110%, rgba(150, 90, 40, 0.1) 0%, transparent 60%);

  --stone: #15171c;
  --stone-raised: #1c1f26;
  --stone-sunken: #101217;

  --iron: #2a2f39;
  --iron-light: #3b424f;
  --iron-dark: #0c0e12;

  --bronze: #c79a4b;
  --bronze-bright: #e6bd6b;
  --bronze-deep: #8a6a2f;
  --bronze-glow: rgba(230, 189, 107, 0.35);

  --parchment: #d9cfb8;
  --parchment-dim: #9c937e;
  --parchment-faint: #6a6457;

  --patina: #6fa07e;
  --patina-bg: rgba(95, 140, 110, 0.14);
  --patina-line: rgba(111, 160, 126, 0.5);

  --blood: #c0463c;
  --blood-bright: #d65b50;
  --blood-bg: rgba(160, 45, 38, 0.16);
  --blood-line: rgba(192, 70, 60, 0.5);

  --amber: #d9913f;
  --amber-bg: rgba(217, 145, 63, 0.14);
  --amber-line: rgba(217, 145, 63, 0.5);

  --radius: 6px;
  --radius-sm: 5px;

  --bevel: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  --display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-vignette);
  background-color: var(--bg);
  background-attachment: fixed;
  color: var(--parchment);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

button {
  touch-action: manipulation;
}

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

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(14px, 4vw, 26px) clamp(12px, 3.5vw, 20px)
    calc(40px + env(safe-area-inset-bottom));
  display: grid;
  gap: clamp(12px, 3vw, 18px);
}

.app-input {
  display: grid;
  gap: clamp(16px, 4vw, 24px);
}

/* --- header --- */

.app-head {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: clamp(176px, 20vw, 212px);
  padding: 0 clamp(14px, 4vw, 22px) clamp(12px, 2.5vw, 14px);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--iron);
  background: var(--stone-sunken) url("assets/hero.webp") center top / cover no-repeat;
}

.app-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 12, 14, 0.12) 0%,
    rgba(11, 12, 14, 0.28) 38%,
    rgba(11, 12, 14, 0.78) 72%,
    rgba(11, 12, 14, 0.92) 100%
  );
  pointer-events: none;
}

.app-head::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  z-index: 2;
  width: 120px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--bronze), transparent);
}

.app-head > * {
  position: relative;
  z-index: 1;
}

.app-head-support {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
}

.app-head-support-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.85));
  transition: filter 0.12s;
}

.app-head-support-link:hover,
.app-head-support-link:focus-visible {
  filter: drop-shadow(0 0 6px rgba(100, 180, 255, 0.55))
    drop-shadow(0 1px 4px rgba(0, 0, 0, 0.85));
  outline: none;
}

.app-head-support-ore {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  animation: app-head-support-ore-glow 4s ease-in-out infinite;
}

.app-head-support-link:hover .app-head-support-ore,
.app-head-support-link:focus-visible .app-head-support-ore {
  animation-play-state: paused;
}

@keyframes app-head-support-ore-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(100, 180, 255, 0.1));
  }
  50% {
    filter: drop-shadow(0 0 5px rgba(100, 180, 255, 0.35))
      drop-shadow(0 0 8px rgba(100, 180, 255, 0.15));
  }
}

.app-head-support-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  max-width: min(220px, 70vw);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bronze-deep);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone));
  color: var(--parchment);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s;
  box-shadow: var(--bevel), 0 8px 20px rgba(0, 0, 0, 0.55);
}

.app-head-support-link:hover::after,
.app-head-support-link:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.tagline {
  margin: 0 auto;
  max-width: 44ch;
  color: var(--parchment);
  font-size: clamp(0.82rem, 2.4vw, 0.94rem);
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.app-definition {
  margin: 6px auto 0;
  max-width: 52ch;
  color: var(--parchment-dim);
  font-size: clamp(0.72rem, 2vw, 0.8rem);
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.app-version-wrap {
  margin: 8px 0 0;
}

.app-version {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--iron-light);
  background: var(--stone-sunken);
  color: var(--parchment-dim);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  transition: border-color 0.12s, color 0.12s;
}

.app-version:hover {
  border-color: var(--bronze-deep);
  color: var(--bronze);
}

/* --- panels (carved stone slabs) --- */

.panel {
  background: linear-gradient(180deg, var(--stone-raised), var(--stone));
  border: 1px solid var(--iron);
  border-top-color: var(--iron-light);
  border-radius: var(--radius);
  padding: clamp(13px, 3.5vw, 18px);
  box-shadow: var(--bevel), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.panel h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bronze);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--iron-light), transparent);
}

.sequence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.sequence-head h2 {
  margin-bottom: 0;
}

.sequence-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.panel-note {
  margin: 0 0 16px;
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

/* --- controls --- */

.controls {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.controls-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.locks-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controls-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.field-label {
  font-family: var(--display);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--parchment-dim);
  margin-right: 2px;
}

.pill-row {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  min-width: 46px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--iron-light);
  background: linear-gradient(180deg, var(--iron), var(--iron-dark));
  color: var(--parchment);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--bevel);
  transition: border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.pill:active {
  transform: translateY(1px);
}

.pill.is-active {
  background: linear-gradient(180deg, var(--bronze-bright), var(--bronze-deep));
  border-color: var(--bronze-bright);
  color: #1a1206;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 14px var(--bronze-glow), var(--bevel);
}

.pill.is-copied {
  border-color: var(--patina);
  color: var(--patina);
}

.pill-ghost {
  font-weight: 500;
  color: var(--parchment-dim);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone-sunken));
  border-color: var(--iron);
}

.pill[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* --- tumblers (in-game plate cards) --- */

.tumblers {
  display: grid;
  gap: clamp(10px, 2.5vw, 14px);
}

.hole-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 4px;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: var(--parchment-dim);
  text-transform: uppercase;
  grid-column: 1 / -1;
}

.hole-legend-wall {
  color: var(--blood-bright);
  font-weight: 700;
}

.hole-legend-notch {
  color: var(--bronze);
  font-weight: 700;
}

.tumbler-card {
  background: linear-gradient(180deg, #1a1d24 0%, #12141a 100%);
  border: 1px solid var(--iron);
  border-radius: var(--radius);
  padding: clamp(12px, 3vw, 16px);
  box-shadow: var(--bevel), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  border-left: 3px solid transparent;
}

.tumbler-card.at-edge {
  border-left-color: var(--blood);
}

.tumbler-card.at-edge .tumbler-title {
  color: var(--blood-bright);
}

.tumbler-card.near-edge {
  border-left-color: var(--amber);
}

.tumbler-card.near-edge .tumbler-title {
  color: var(--amber);
}

.tumbler-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.tumbler-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bronze);
}

.tumbler-sub {
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--parchment-faint);
}

.tumbler-sub:empty {
  display: none;
}

.tumbler-start,
.tumbler-links {
  display: grid;
  gap: 8px;
}

.tumbler-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--iron);
}

.tumbler-field-label {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--parchment-dim);
}

.plate-holes {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(4px, 1.2vw, 6px);
  padding: 8px 6px;
  background: var(--stone-sunken);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.hole {
  aspect-ratio: 1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, #08090c 0%, #151820 70%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--parchment-faint);
  font-weight: 700;
  font-size: clamp(0.72rem, 2.8vw, 0.85rem);
  cursor: pointer;
  transition: box-shadow 0.12s, color 0.12s, transform 0.1s;
}

.hole.is-notch {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px var(--bronze-deep);
  color: var(--bronze);
}

.hole.is-wall:not(.is-active) {
  color: var(--blood-bright);
}

.hole.is-active {
  background: radial-gradient(circle at 42% 32%, var(--bronze-bright), var(--bronze-deep));
  box-shadow: 0 0 10px var(--bronze-glow),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #160f04;
  transform: translateY(-1px);
}

.hole:not(.is-active):active {
  transform: scale(0.96);
}

.plate-holes--readout {
  pointer-events: none;
  width: 100%;
}

/* Walkthrough readout: active pin recessed with a visible ring; notch gets bronze */
.plate-holes--readout .hole.is-active {
  background: radial-gradient(circle at 50% 55%, #08090c 0%, #151820 70%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 6px rgba(255, 255, 255, 0.08);
  color: var(--parchment);
  transform: none;
}

.plate-holes--readout .hole.is-active.is-notch {
  background: radial-gradient(circle at 42% 32%, var(--bronze-bright), var(--bronze-deep));
  border-color: var(--bronze-bright);
  box-shadow: 0 0 10px var(--bronze-glow),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #160f04;
  transform: translateY(-1px);
}

.plate-holes--readout .hole.is-active.is-moving:not(.is-notch):not(.at-edge):not(.near-edge) {
  border-color: var(--parchment);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 12px rgba(255, 255, 255, 0.22);
}

.plate-holes--readout .hole.is-active.is-moving.is-notch {
  border: 1px solid var(--bronze-bright);
  box-shadow: 0 0 14px var(--bronze-glow),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.plate-holes--readout .hole.is-active.at-edge,
.plate-holes--readout .hole.is-active.is-wall {
  border-color: var(--blood);
  color: var(--blood-bright);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 10px var(--blood-bg);
}

.plate-holes--readout .hole.is-active.is-moving.at-edge,
.plate-holes--readout .hole.is-active.is-moving.is-wall {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 14px var(--blood-bg);
}

.plate-holes--readout .hole.is-active.near-edge {
  border-color: var(--amber-line);
  color: var(--amber-line);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 8px var(--amber-bg);
}

.plate-holes--readout .hole.is-active.is-moving.near-edge {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 0 12px var(--amber-bg);
}

@media (min-width: 900px) {
  .app {
    grid-template-columns: 1fr minmax(300px, 380px);
    grid-template-rows: auto 1fr auto;
    align-items: start;
  }

  .app-head {
    grid-column: 1 / -1;
  }

  .app-input {
    grid-column: 1;
  }

  .panel--sequence {
    grid-column: 2;
    grid-row: 2;
    position: sticky;
    top: clamp(12px, 3vw, 20px);
    max-height: calc(100dvh - clamp(12px, 3vw, 20px) - 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .panel--sequence.is-minimized {
    overflow: visible;
    max-height: none;
  }

  .panel--sequence.is-minimized .solution {
    flex: none;
    overflow: visible;
  }

  .panel--sequence.has-solution .solve-btn {
    display: none;
  }

  .solution {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .solution-count {
    margin-bottom: 10px;
    font-size: 1.15rem;
  }

  .walkthrough {
    margin-top: 12px;
    padding: 12px;
  }

  .wt-current {
    min-height: 3.75rem;
    margin: 10px 0;
  }

  .move-cmd--focus .move-lock {
    font-size: 1.4rem;
  }

  .move-cmd--focus .move-arrow {
    width: 3.5rem;
    height: 3.5rem;
  }

  .move-cmd--focus .move-arrow svg {
    width: 2.45rem;
    height: 2.45rem;
  }

  .wt-board {
    gap: 6px;
  }

  .wt-plate .plate-holes--readout {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 6px 4px;
    gap: 4px;
  }

  .wt-plate .plate-holes--readout .hole {
    min-height: 0;
    width: 100%;
    max-width: 28px;
    height: auto;
    aspect-ratio: 1;
    justify-self: center;
    font-size: 0.65rem;
  }

  .app-foot {
    grid-column: 1 / -1;
  }

  .tumblers {
    --card-label-col: 140px;
    --card-col-gap: 20px;
    gap: 8px;
  }

  .hole-legend {
    width: auto;
    margin: 0;
    padding: 0 0 4px calc(var(--card-label-col) + var(--card-col-gap) + 110px);
  }

  .tumbler-card {
    display: grid;
    grid-template-columns: var(--card-label-col) 1fr;
    column-gap: var(--card-col-gap);
    row-gap: 10px;
    align-items: center;
    padding-block: 12px;
  }

  .tumbler-head {
    grid-column: 1;
    grid-row: 1 / -1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    margin-bottom: 0;
    width: auto;
  }

  .tumbler-start {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    margin-inline: 0;
    grid-template-columns: 110px 1fr;
    align-items: center;
  }

  .tumbler-links {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    width: auto;
    margin-inline: 0;
    grid-template-columns: 110px 1fr;
    align-items: center;
  }

  .tumbler-field-label {
    width: auto;
    text-align: right;
  }

  .plate-holes {
    width: 100%;
    grid-template-columns: repeat(7, minmax(44px, 1fr));
    max-width: 100%;
    gap: 6px;
    padding: 8px 10px;
    margin-inline: 0;
  }

  .hole {
    min-height: 0;
    width: 100%;
    max-width: 52px;
    aspect-ratio: 1;
    height: auto;
    justify-self: center;
    font-size: 0.78rem;
  }

  .link-chip-row {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
}

.link-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-chip-group {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
}

.link-gone-btn {
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--iron-light);
  background: var(--stone-sunken);
  color: var(--parchment-faint);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.link-gone-btn.is-active {
  border-style: solid;
  border-color: var(--bronze-bright);
  color: var(--bronze-bright);
  background: rgba(233, 185, 105, 0.12);
}

.link-gone-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.link-chip {
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--iron);
  background: var(--stone-sunken);
  color: var(--parchment-dim);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.link-chip:active {
  transform: translateY(1px);
}

.link-chip.link-none {
  color: var(--parchment-faint);
}

.link-chip.link-same {
  color: var(--patina);
  background: var(--patina-bg);
  border-color: var(--patina-line);
}

.link-chip.link-opp {
  color: var(--blood-bright);
  background: var(--blood-bg);
  border-color: var(--blood-line);
}

.link-chip.link-removed {
  text-decoration: line-through;
  opacity: 0.7;
}

.mastery-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.mastery-row {
  flex-wrap: wrap;
}

.mastery-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--parchment-dim);
}

.breaks-stepper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--iron);
}

.breaks-stepper-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breaks-step {
  min-width: 40px;
  padding: 0 12px;
}

.breaks-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--parchment);
}

.breaks-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--parchment-faint);
}

.wt-help-trigger {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--parchment-faint);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.12s, text-decoration-color 0.12s;
}

.wt-help-trigger:hover,
.wt-help-trigger:focus-visible {
  color: var(--parchment-dim);
  text-decoration-color: var(--parchment-faint);
}

.wt-help-trigger.is-open {
  color: var(--bronze-bright);
  text-decoration-color: var(--bronze-bright);
}

.wt-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.wt-help-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: default;
}

.wt-help-sheet-host {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: none;
}

.wt-help-sheet-host--bottom {
  place-items: end center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}

.wt-help-sheet {
  width: min(420px, 100%);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--bronze-deep);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone));
  box-shadow:
    var(--bevel),
    0 0 0 1px rgba(230, 189, 107, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.wt-help-sheet--bottom {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  max-height: min(75vh, 520px);
  animation: wt-help-slide-up 0.2s ease-out;
}

@keyframes wt-help-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.wt-help-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.wt-help-sheet-title {
  margin: 0;
  font-family: var(--display);
  color: var(--bronze-bright);
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.wt-help-sheet-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--iron);
  border-radius: var(--radius-sm);
  background: var(--stone-sunken);
  color: var(--parchment);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.wt-help-sheet-close:hover,
.wt-help-sheet-close:focus-visible {
  border-color: var(--bronze);
  color: var(--bronze-bright);
}

body.wt-help-open {
  overflow: hidden;
}

.wt-help-lead {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--parchment-dim);
}

.mismatch-checklist {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--parchment-dim);
  text-align: left;
}

.mismatch-checklist li + li {
  margin-top: 6px;
}

.wt-open-text {
  font-weight: 600;
  color: var(--patina);
}

/* --- solution --- */

.solve-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--bronze-bright);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--bronze-bright), var(--bronze-deep));
  color: #160f04;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px var(--bronze-glow), var(--bevel);
}

.solve-btn:active {
  transform: translateY(1px);
}

.solve-btn.is-disabled,
.solve-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.35);
}

.solve-btn.is-ready-flash:not(:disabled) {
  animation: solve-ready-flash 0.9s ease;
}

@keyframes solve-ready-flash {
  0%,
  100% {
    box-shadow: 0 0 20px var(--bronze-glow), var(--bevel);
  }
  50% {
    box-shadow: 0 0 28px var(--bronze-bright), 0 0 8px var(--bronze-glow), var(--bevel);
  }
}

.solution {
  margin-top: 16px;
  max-width: 100%;
  overflow-x: clip;
}

.panel--sequence.is-minimized {
  overflow: visible;
}

.panel--sequence.is-minimized .sequence-head {
  margin-bottom: 6px;
}

.panel--sequence.is-minimized .solution {
  margin-top: 0;
  overflow: visible;
}

.sequence-min {
  padding: 0 0 14px;
  overflow: visible;
}

.sequence-min-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
  overflow: visible;
}

.sequence-min-core {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
}

.sequence-min-arrow-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.sequence-min-step {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--parchment-dim);
  letter-spacing: 1px;
  line-height: 1;
}

.sequence-min-core .move-lock {
  display: flex;
  align-items: center;
  height: 2.75rem;
  font-family: var(--display);
  font-weight: 700;
  color: var(--bronze-bright);
  font-size: 1.1rem;
}

.sequence-min-done {
  display: flex;
  align-items: center;
  height: 2.75rem;
  text-align: center;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--patina);
}

.sequence-min-core .move-arrow {
  width: 2.75rem;
  height: 2.75rem;
}

.sequence-min-core .move-arrow svg {
  width: 2rem;
  height: 2rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--iron-light);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone-sunken));
  color: var(--bronze-bright);
  cursor: pointer;
  box-shadow: var(--bevel);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--bronze-deep);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn.is-copied {
  border-color: var(--patina);
  color: var(--patina);
}

.icon-btn svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.icon-btn svg[fill="none"] {
  fill: none;
  stroke: currentColor;
}

.icon-btn--tool {
  width: 2.25rem;
  height: 2.25rem;
}

@media (max-width: 768px) {
  .icon-btn--tool {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.icon-btn--tool svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 899px) {
  .panel--sequence {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-bottom: -8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: var(--bevel), 0 -8px 24px rgba(0, 0, 0, 0.5);
  }

  .panel--sequence:not(.is-minimized) {
    max-height: calc(100dvh - env(safe-area-inset-bottom) - 8px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .panel--sequence:not(.is-minimized) .solution {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .panel--sequence.has-solution .solve-btn {
    display: none;
  }

  .panel--sequence .solution-count {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .panel--sequence .walkthrough {
    padding: 10px;
    margin-top: 10px;
  }

  .panel--sequence .wt-current {
    min-height: 3.5rem;
    margin: 8px 0;
  }

  .panel--sequence .move-cmd--focus .move-lock {
    font-size: 1.25rem;
  }

  .panel--sequence .move-cmd--focus .move-arrow {
    width: 3.25rem;
    height: 3.25rem;
  }

  .panel--sequence .move-cmd--focus .move-arrow svg {
    width: 2.25rem;
    height: 2.25rem;
  }

  .panel--sequence .wt-board {
    gap: 4px;
  }

  .panel--sequence .wt-plate {
    padding: 4px 4px;
    gap: 4px;
    grid-template-columns: 1.75rem minmax(0, 1fr);
  }

  .panel--sequence .wt-plate .plate-holes--readout {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    padding: 3px 1px;
  }

  .panel--sequence .wt-plate .plate-holes--readout .hole {
    min-height: 0;
    min-width: 0;
    max-width: none;
    font-size: clamp(0.5rem, 2.4vw, 0.65rem);
  }
}

.hint {
  color: var(--parchment-dim);
  font-style: italic;
}

.success {
  font-family: var(--display);
  letter-spacing: 1px;
  color: var(--patina);
  font-weight: 700;
}

.solution-count {
  margin: 0 0 14px;
  font-size: 1.35rem;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.alert {
  font-family: var(--display);
  letter-spacing: 0.5px;
  color: var(--blood-bright);
  font-weight: 700;
}

.solution-failure {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.step-toggle {
  margin-top: 12px;
  width: 100%;
}

.step-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone-sunken));
  border: 1px solid var(--iron);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.step:hover {
  border-color: var(--bronze-deep);
}

.step:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

.step.is-current {
  border-color: var(--bronze);
  box-shadow: 0 0 14px var(--bronze-glow);
}

.step.is-done {
  opacity: 0.55;
}

.step.is-done .step-text {
  text-decoration: line-through;
  color: var(--parchment-dim);
}

.step.is-upcoming {
  opacity: 0.82;
}

.step-num {
  flex: 0 0 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--bronze-bright), var(--bronze-deep));
  border: 1px solid var(--bronze-bright);
  color: #160f04;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.step.is-done .step-num {
  background: radial-gradient(circle at 50% 38%, var(--patina), #3f6b50);
  border-color: var(--patina);
  color: #0c160f;
}

.step.is-upcoming .step-num {
  background: linear-gradient(180deg, var(--iron), var(--iron-dark));
  border-color: var(--iron-light);
  color: var(--parchment-dim);
  box-shadow: none;
}

.step-text {
  font-weight: 600;
}

/* --- walkthrough --- */

.walkthrough {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--stone-sunken);
  border: 1px solid var(--iron);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.wt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.wt-nav .pill {
  flex: 1;
}

.wt-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.wt-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wt-counter {
  font-family: var(--display);
  letter-spacing: 1px;
  color: var(--parchment-dim);
  font-weight: 700;
  font-size: 0.85rem;
}

.wt-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--stone-raised);
  border: 1px solid var(--iron);
  overflow: hidden;
}

.wt-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bronze-deep), var(--bronze-bright));
  transition: width 0.18s ease;
}

.pill-primary {
  background: linear-gradient(180deg, var(--bronze-bright), var(--bronze-deep));
  border-color: var(--bronze-bright);
  color: #1a1206;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 14px var(--bronze-glow), var(--bevel);
}

.wt-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  min-width: 0;
}

.wt-plate {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-width: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--iron);
  background: linear-gradient(180deg, var(--iron), var(--iron-dark));
  box-shadow: var(--bevel);
}

.wt-plate.is-current {
  border-color: var(--bronze);
  box-shadow: var(--bevel), 0 0 14px var(--bronze-glow);
}

.wt-plate.is-current .wt-label {
  color: var(--bronze-bright);
}

.wt-label {
  font-family: var(--display);
  color: var(--parchment-faint);
  font-size: 0.74rem;
  font-weight: 700;
}

.wt-plate .plate-holes--readout {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 6px 4px;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.wt-plate .plate-holes--readout .hole {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 32px;
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  font-size: 0.72rem;
}

.wt-current {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 4rem;
}

.wt-current.is-open {
  font-family: var(--display);
  letter-spacing: 0.5px;
  color: var(--patina);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  text-align: center;
}

.move-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}

.move-lock {
  font-family: var(--display);
  font-weight: 700;
  color: var(--bronze-bright);
}

.move-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--bronze-bright), var(--bronze-deep));
  border: 1px solid var(--bronze-bright);
  box-shadow: 0 0 18px var(--bronze-glow), 0 0 4px var(--bronze-bright),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #160f04;
}

.move-arrow svg {
  display: block;
  fill: currentColor;
}

.move-cmd--focus .move-arrow--right svg {
  transform: translateX(2px);
}

.move-cmd--focus .move-arrow--left svg {
  transform: translateX(-2px);
}

.move-cmd--list .move-arrow--right svg {
  transform: translateX(1px);
}

.move-cmd--list .move-arrow--left svg {
  transform: translateX(-1px);
}

.move-cmd--min .move-arrow--right svg {
  transform: translateX(1px);
}

.move-cmd--min .move-arrow--left svg {
  transform: translateX(-1px);
}

.move-cmd--focus .move-lock {
  font-size: 1.75rem;
}

.move-cmd--focus .move-arrow {
  width: 4rem;
  height: 4rem;
}

.move-cmd--focus .move-arrow svg {
  width: 2.85rem;
  height: 2.85rem;
}

.move-cmd--list .move-lock {
  font-size: 1rem;
}

.move-cmd--list .move-arrow {
  width: 2rem;
  height: 2rem;
}

.move-cmd--list .move-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

.move-cmd--min .move-lock {
  font-size: 1.1rem;
}

.move-cmd--min .move-arrow {
  width: 2.75rem;
  height: 2.75rem;
}

.move-cmd--min .move-arrow svg {
  width: 2rem;
  height: 2rem;
}

.step.is-current .move-arrow {
  box-shadow: 0 0 18px var(--bronze-glow), 0 0 4px var(--bronze-bright),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* --- footer --- */

.app-foot {
  padding-top: 16px;
  border-top: 1px solid var(--iron);
  color: var(--parchment-faint);
  font-size: 0.82rem;
  text-align: center;
}

.app-foot-meta {
  margin: 10px 0 0;
}

.app-foot-meta .app-version {
  font-size: 0.72rem;
  padding: 2px 10px;
}

.app-foot-link {
  color: var(--parchment-dim);
  text-decoration: none;
  transition: color 0.12s;
}

.app-foot-link:hover,
.app-foot-link:focus-visible {
  color: var(--bronze);
  outline: none;
}

.app-foot-sep {
  color: var(--iron-light);
}

.support-strip {
  margin-bottom: 4px;
}

.support-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bronze-deep);
  background: rgba(233, 185, 105, 0.08);
  color: var(--parchment);
  text-decoration: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.support-cta:hover {
  border-color: var(--bronze-bright);
  box-shadow: 0 0 14px var(--bronze-glow), var(--bevel);
}

.support-cta:hover .support-ore {
  filter: drop-shadow(0 0 6px rgba(100, 180, 255, 0.55));
}

.support-ore {
  flex-shrink: 0;
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: -2px 0;
}

.support-cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.support-cta-text {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bronze-bright);
}

.support-cta-sub {
  font-size: 0.78rem;
  color: var(--parchment-dim);
}

/* --- how-to-map guide --- */

.how-to-map {
  margin: 0 0 12px;
  border: 1px solid var(--iron);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.how-to-map summary {
  cursor: pointer;
  padding: 10px 12px;
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: var(--bronze-bright);
}

.how-to-map-body {
  padding: 0 12px 14px;
}

.how-to-map-steps {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--parchment-dim);
  font-size: 0.88rem;
}

.how-to-map-steps li + li {
  margin-top: 8px;
}

.how-to-map-subhead {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bronze-bright);
}

.how-to-map-tier-note {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--parchment-dim);
}

.how-to-map-table {
  width: 100%;
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.how-to-map-table th,
.how-to-map-table td {
  padding: 8px 10px;
  border: 1px solid var(--iron);
  text-align: left;
}

.how-to-map-table th {
  background: var(--stone-sunken);
  color: var(--parchment);
  font-weight: 700;
}

.how-to-map-visual {
  position: relative;
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--iron);
}

.how-to-map-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.how-to-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-line {
  stroke: var(--bronze-bright);
  stroke-width: 3;
}

.map-dot {
  fill: var(--bronze-bright);
  stroke: rgba(11, 12, 14, 0.9);
  stroke-width: 2;
}

.map-label-bg {
  fill: rgba(11, 12, 14, 0.88);
  stroke: var(--bronze-deep);
  stroke-width: 1.5;
}

.map-label-text {
  fill: var(--parchment);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.map-label-text--accent {
  fill: var(--bronze-bright);
}

.map-label-text--callout {
  fill: var(--patina);
  font-size: 26px;
  font-weight: 600;
}

.how-to-map-example {
  margin-top: 12px;
}

/* --- banners --- */

.hash-banner,
.share-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--iron-light);
  background: rgba(233, 185, 105, 0.08);
}

.hash-banner-text,
.share-prompt-text {
  margin: 0;
  flex: 1 1 180px;
  color: var(--parchment);
  font-size: 0.88rem;
}

.hash-banner-dismiss {
  margin-left: auto;
}

.share-prompt-btn.is-copied {
  border-color: var(--patina);
  color: var(--patina);
}

/* --- onboarding --- */

.onboarding-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.55);
}

.onboarding-card-host {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: none;
}

.onboarding-card-host--mobile {
  place-items: end center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}

.onboarding-card-host--mobile-top {
  place-items: start center;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px;
}

.onboarding-card {
  width: min(420px, 100%);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--bronze-deep);
  background: linear-gradient(180deg, var(--stone-raised), var(--stone));
  box-shadow:
    var(--bevel),
    0 0 0 1px rgba(230, 189, 107, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.onboarding-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--parchment);
}

.onboarding-title {
  margin: 0 0 8px;
  font-family: var(--display);
  color: var(--bronze-bright);
  font-size: 1.05rem;
}

.onboarding-body,
.onboarding-footnote {
  margin: 0 0 12px;
  color: var(--parchment);
  font-size: 0.9rem;
}

.onboarding-footnote {
  font-size: 0.82rem;
  color: var(--patina);
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.onboarding-target {
  outline: 2px solid var(--bronze-bright);
  outline-offset: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 21;
  scroll-margin: 12px;
}

@media (max-width: 768px) {
  body.onboarding-active.onboarding-card-at-top .onboarding-target {
    scroll-margin-top: calc(220px + env(safe-area-inset-top));
    scroll-margin-bottom: 24px;
  }

  body.onboarding-active.onboarding-card-at-bottom .onboarding-target {
    scroll-margin-top: 12px;
    scroll-margin-bottom: calc(220px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 899px) {
  body.onboarding-active .panel--sequence {
    position: static;
    z-index: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 0;
    box-shadow: var(--bevel);
  }

  body.onboarding-active .tumbler-card:has(.onboarding-target) {
    position: relative;
    z-index: 21;
  }
}

.tumblers.is-pulse {
  animation: tumblers-pulse 1.2s ease;
}

@keyframes tumblers-pulse {
  0%,
  100% {
    box-shadow: none;
  }
  40% {
    box-shadow: 0 0 0 2px var(--bronze-bright), 0 0 18px var(--bronze-glow);
  }
}

@media (max-width: 768px) {
  .panel--sequence .solve-btn {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0);
    z-index: 3;
  }

  .link-chip {
    min-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
  }
}
