.ci-reader {
  --ci-yellow: #ffd54a;
  --ci-muted: #aaa;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: min(92vh, 900px);
  min-height: min(92dvh, 900px);
  overflow: hidden;
  padding: 16px clamp(14px, 4vw, 36px) 20px;
  box-sizing: border-box;
  color: #fff;
  background: #000;
  border-radius: 18px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ci-reader * { box-sizing: border-box; }
.ci-reader:fullscreen { width: 100vw; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; border-radius: 0; }
.ci-header { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:40px; }
.ci-title { color:#bbb; font-size:clamp(12px, 3.2vw, 16px); letter-spacing:.08em; text-transform:uppercase; }
.ci-exit { border:1px solid #777; border-radius:999px; padding:8px 14px; color:#fff; background:#222; font-size:14px; }
.ci-stage { display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:0; padding:14px 0 22px; text-align:center; }
.ci-text { width:min(100%, 800px); max-height:72%; overflow:auto; color:#f5f5f5; font-size:clamp(27px, 6.5vw, 46px); font-weight:600; line-height:1.32; text-wrap:pretty; }
.ci-text.is-dialogue { color:var(--ci-yellow); }
.ci-text.is-active { text-shadow:0 0 22px rgba(255,255,255,.22); }
.ci-progress { width:min(70%, 420px); height:4px; margin-top:26px; overflow:hidden; border-radius:9px; background:#292929; }
.ci-progress span { display:block; width:0; height:100%; background:#fff; transition:width .18s linear; }
.ci-controls { display:grid; grid-template-areas:"prev skip" "pause play"; grid-template-columns:repeat(2, minmax(82px, 1fr)); grid-template-rows:repeat(2, 82px); gap:12px; width:min(100%, 390px); justify-self:center; }
.ci-prev { grid-area:prev; }
.ci-pause { grid-area:pause; }
.ci-skip { grid-area:skip; }
.ci-play { grid-area:play; }
.ci-control { display:grid; place-items:center; width:100%; height:100%; border:1px solid #444; border-radius:18px; color:#fff; background:#171717; font:600 42px/1 system-ui,sans-serif; cursor:pointer; user-select:none; }
.ci-control:active { transform:scale(.97); background:#292929; }
.ci-skip { color:#ffe078; }
.ci-play { color:#fff; background:#282828; }
.ci-message { position:absolute; left:50%; bottom:190px; transform:translateX(-50%); color:#ccc; font-size:14px; text-align:center; pointer-events:none; }
.ci-unlock-zone { position:absolute; right:0; bottom:0; width:42px; height:42px; z-index:5; }
.ci-reader.is-playing .ci-play { border-color:#777; }
.ci-reader.is-dialogue .ci-text { color:var(--ci-yellow); }
@media (min-width:700px) {
  .ci-reader { min-height:760px; }
  .ci-controls { grid-template-columns:repeat(2, 82px); grid-template-rows:repeat(2, 82px); }
  .ci-message { bottom:120px; }
}
@media (max-height:620px) {
  .ci-reader { min-height:100vh; min-height:100dvh; padding-top:8px; padding-bottom:10px; }
  .ci-controls { grid-template-rows:repeat(2, 58px); gap:8px; width:min(100%, 300px); }
  .ci-control { border-radius:14px; font-size:32px; }
  .ci-text { font-size:clamp(22px, 5vw, 34px); }
  .ci-message { bottom:138px; }
}
