.opo-reader {
  --bar: #0d5a8f;
  --btn: #c45c26;
  --rail: #071e33;
  --on: #1d81c2;
  margin: 0;
  height: 100dvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #111;
  color: #fff;
  font-family: Arial, sans-serif;
  overflow: hidden;
}
.opo-reader__bar,
.opo-reader__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  flex-shrink: 0;
}
.opo-reader__bar {
  background: var(--bar);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.opo-reader__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}
.opo-reader__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
}
.opo-reader__brand span {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.opo-reader__title { flex: 1; text-align: center; min-width: 0; }
.opo-reader__title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opo-reader__title span { display: block; font-size: 12px; opacity: 0.75; }
.opo-reader__nav { display: flex; gap: 8px; flex-shrink: 0; }
.opo-reader__nav a,
.opo-reader__tools button,
.opo-reader__continue button {
  background: var(--btn);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  font-size: 13px;
}
.opo-reader__nav a:not(.opo-reader__home) {
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
}
.opo-reader__tools button.icon { width: 40px; padding: 8px; }
.opo-reader__tools button.is-on,
.opo-reader__tabs a.is-on { background: var(--on); color: #fff; }
.opo-reader__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 12px;
  background: #0a3a5c;
  flex-shrink: 0;
}
.opo-reader__tabs a {
  flex-shrink: 0;
  color: #d7eadc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  white-space: nowrap;
}
.opo-reader__continue {
  display: flex;
  justify-content: center;
  padding: 6px;
  background: #0a3a5c;
  flex-shrink: 0;
}
.opo-reader__continue[hidden] { display: none; }
.opo-reader__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
}
.opo-reader__rail {
  width: 72px;
  flex: 0 0 72px;
  background: var(--rail);
  overflow-y: auto;
  overflow-x: hidden;
}
.opo-reader__rail button {
  display: block;
  width: calc(100% - 10px);
  margin: 6px 5px;
  padding: 10px 4px;
  background: #163a58;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.opo-reader__rail button.is-on { border-color: var(--btn); background: var(--on); }
.opo-reader__stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  background: #111;
}
.opo-reader__spread {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  transform: scale(var(--z, 1));
  transform-origin: center center;
}
.opo-reader__sheet {
  position: relative;
  display: inline-block;
  background: #fff;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  line-height: 0;
}
.opo-reader__sheet[hidden] { display: none !important; }
.opo-reader__sheet img {
  display: block;
  max-height: calc(100dvh - 168px);
  width: auto;
  max-width: 46vw;
  background: #fff;
  pointer-events: none;
  user-select: none;
}
.opo-reader__wm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  overflow: hidden;
  opacity: .22;
}
.opo-reader__wm span {
  transform: rotate(-28deg);
  font-size: 15px;
  font-weight: 800;
  color: #0d5a8f;
  white-space: nowrap;
  padding: 14px 18px;
  font-family: Georgia, serif;
}
.opo-reader__wait {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.7);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 8;
}
.opo-reader__wait[hidden] { display: none; }
.opo-reader__tools {
  justify-content: center;
  background: rgba(0,0,0,.82);
  flex-wrap: wrap;
  gap: 6px;
}
.opo-reader__tools button:disabled { opacity: 0.4; cursor: default; }
.opo-reader__fail { color: #fff; text-align: center; max-width: 28rem; line-height: 1.5; }
.opo-reader__fail a { color: #ffd4d4; font-weight: 700; }
@media (max-width: 767px) {
  .opo-reader__brand span { display: none; }
  .opo-reader__title { font-size: 13px; }
  .opo-reader__nav a:last-child { display: none; }
  .opo-reader__rail { display: none; }
  .opo-reader__sheet img { max-width: 96vw; }
}
