.plate-reader {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 23, 19, 0.94), rgba(23, 33, 28, 0.94)),
    var(--moss);
  color: var(--paper);
}

.plate-reader::before {
  opacity: 0.25;
}

.reader-bar,
.reader-dock {
  position: relative;
  z-index: 5;
  display: grid;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 10px clamp(14px, 3vw, 28px);
  background: rgba(11, 22, 18, 0.92);
  border-color: rgba(255, 248, 231, 0.28);
  backdrop-filter: blur(14px);
}

.reader-bar {
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  border-bottom: 1px solid rgba(255, 248, 231, 0.28);
}

.reader-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.reader-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1;
}

.reader-brand small,
.reader-progress,
.reader-hints,
.reader-select-label,
.reader-button {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reader-brand small {
  color: var(--moss-soft);
  font-size: 0.68rem;
}

.reader-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 248, 231, 0.82);
  font-size: 0.72rem;
}

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

.reader-button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 248, 231, 0.38);
  background: rgba(255, 248, 231, 0.08);
  color: var(--paper);
  font-size: 0.72rem;
  text-decoration: none;
}

.reader-button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}

.reader-shell {
  position: relative;
  z-index: 2;
  height: calc(100vh - 144px);
  min-height: 360px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
}

.plate-stage {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 26px);
  overflow: hidden;
}

.reader-plate {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.reader-plate img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 264px);
  object-fit: contain;
  border: 1px solid rgba(255, 248, 231, 0.35);
  background: #efe3c3;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.46);
}

.reader-plate figcaption {
  width: min(100%, 980px);
  color: rgba(255, 248, 231, 0.86);
  text-align: center;
}

.reader-plate h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4vw, 2.7rem);
  font-weight: 500;
  letter-spacing: 0;
}

.reader-plate p {
  margin: 6px auto 0;
  max-width: 82ch;
}

.reader-plate .eyebrow {
  color: rgba(255, 248, 231, 0.62);
}

.turn-zone {
  position: relative;
  z-index: 3;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 248, 231, 0.7);
}

.turn-zone span {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(255, 248, 231, 0.3);
  background: rgba(255, 248, 231, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.turn-zone:hover span,
.turn-zone:focus-visible span {
  background: rgba(255, 248, 231, 0.2);
  color: var(--paper);
}

.turn-zone:disabled span {
  opacity: 0.28;
}

.reader-dock {
  grid-template-columns: auto minmax(160px, 280px) auto minmax(120px, 180px) minmax(210px, 1fr);
  border-top: 1px solid rgba(255, 248, 231, 0.28);
}

.reader-select-label,
.reader-hints {
  color: rgba(255, 248, 231, 0.68);
  font-size: 0.7rem;
}

.reader-dock select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 248, 231, 0.4);
  background: rgba(255, 248, 231, 0.94);
  color: var(--ink);
  font-weight: 750;
}

.reader-hints {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  text-align: right;
}

.is-turning .reader-plate img {
  animation: page-turn 180ms ease-out;
}

@keyframes page-turn {
  from {
    opacity: 0.6;
    transform: translateX(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 820px) {
  .plate-reader {
    overflow: auto;
  }

  .reader-bar {
    grid-template-columns: 1fr;
  }

  .reader-progress,
  .reader-actions {
    justify-content: flex-start;
  }

  .reader-shell {
    height: auto;
    min-height: calc(100vh - 214px);
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .reader-plate img {
    max-height: calc(100vh - 330px);
  }

  .reader-dock {
    grid-template-columns: 1fr;
  }

  .reader-hints {
    justify-content: flex-start;
    text-align: left;
    flex-direction: column;
    gap: 4px;
  }

  .turn-zone span {
    min-width: 38px;
    min-height: 42px;
    writing-mode: vertical-rl;
  }
}
