/* Version 3 refinements for clearer interaction without changing the original art direction. */
:root {
  --ux-ink: #173d35;
  --ux-paper: #f4eddc;
  --ux-gold: #b9852d;
}

button,
[role="tab"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role="tab"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ux-gold) 82%, white);
  outline-offset: 4px;
}

.paper-grain {
  opacity: .38;
}

.entry-orbit.orbit-two {
  opacity: .32;
}

.layer-tabs {
  position: relative;
  margin-bottom: 2.35rem;
}

.layer-tabs::after {
  content: "点击色版 · 对版边签同步切换版名";
  position: absolute;
  left: 0;
  bottom: -1.65rem;
  color: rgba(28, 55, 47, .64);
  font-size: .72rem;
  letter-spacing: .12em;
  white-space: nowrap;
}

.swatch {
  min-height: 48px;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.swatch:hover {
  transform: translateY(-2px);
}

.swatch.active {
  box-shadow: 0 0 0 2px rgba(185, 133, 45, .52), 0 10px 24px rgba(23, 61, 53, .11);
}

.registration-edge strong {
  min-height: 3.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ux-ink);
  font-size: .92rem;
  letter-spacing: .16em;
  transition: color .24s ease, transform .24s ease;
}

.stage-1 .registration-edge strong,
.stage-2 .registration-edge strong,
.stage-3 .registration-edge strong,
.stage-4 .registration-edge strong {
  color: #9b3e35;
  transform: translateY(-2px);
}

.process-facts span:first-child {
  background: rgba(244, 237, 220, .82);
  border: 1px solid rgba(185, 133, 45, .56);
  box-shadow: 0 8px 20px rgba(31, 57, 49, .08);
}

.process-facts span b {
  min-width: 2.85rem;
  padding-inline: .55rem;
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .08em;
}

.process-facts span:first-child b {
  background: var(--ux-ink);
  color: var(--ux-paper);
}

.process-insight {
  border-top-color: rgba(23, 61, 53, .2);
}

.entry-secondary {
  opacity: .94;
}

.entry-secondary:hover,
.entry-secondary:focus-visible {
  opacity: 1;
}

.entry-copy > p,
.entry-copy > small,
.entry-corner,
.scroll-cue {
  font-size: .75rem;
  line-height: 1.55;
}

.entry-rule,
.entry-copy button {
  font-size: .875rem;
}

.process-list button {
  min-height: 46px;
}

.process-list button.active {
  box-shadow: inset 3px 0 0 var(--ux-gold);
}

@media (max-width: 760px) {
  .entry-copy small,
  .entry-corner,
  .scroll-cue {
    opacity: .88;
  }

  .entry-copy > p,
  .entry-copy > small,
  .entry-corner,
  .scroll-cue {
    font-size: .75rem;
  }

  .entry-rule,
  .entry-copy button {
    font-size: .8125rem;
  }

  .entry-actions,
  .layer-actions {
    gap: .65rem;
  }

  .entry-actions button,
  .layer-actions button,
  .top-actions button,
  .finale-union-head button {
    min-height: 46px;
  }

  .layer-tabs {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 3px 3px 6px;
  }

  .layer-tabs::-webkit-scrollbar {
    display: none;
  }

  .layer-tabs .swatch {
    scroll-snap-align: center;
    flex: 0 0 auto;
  }

  .layer-tabs::after {
    position: sticky;
    left: 3px;
  }

  .registration-edge strong {
    min-height: 3.5em;
    font-size: .8rem;
  }

  .tour-guide {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
