/* reader.css — 독서 앱 다크테마 */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%; overflow: hidden;
}
body {
  font-family: -apple-system, 'Malgun Gothic', 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.7;
  color: #d4d4d4; background: #1a1a2e;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
#app {
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}

/* ── 상단 바 ── */
.top-bar {
  background: #0f3460;
  padding: 12px 16px;
  flex-shrink: 0;
  border-bottom: 2px solid #16213e;
}
.top-bar h1 {
  font-size: 18px; font-weight: 700;
  color: #e0e0e0; margin: 0;
}

/* ── 상태 표시 ── */
.status {
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  color: #5dade2;
  background: #16213e;
  flex-shrink: 0;
}
.status.error { color: #e74c3c; }
.status.reading { color: #27ae60; }

/* ── 텍스트 표시 영역 ── */
.text-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 17px;
  line-height: 1.8;
  color: #e0e0e0;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
}
.text-area:empty::after {
  content: '촬영 버튼을 눌러 책 페이지를 촬영하세요.';
  color: #667;
  font-style: italic;
}

/* ── 하단 버튼 ── */
.controls {
  display: flex; gap: 0;
  background: #0f3460;
  border-top: 1px solid #16213e;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #8899aa;
  font-size: 16px; font-weight: 700;
  padding: 16px 6px;
  cursor: pointer;
  min-height: 60px;
  transition: color .15s, background .15s;
}
.btn:hover, .btn:active {
  color: #fff; background: rgba(255,255,255,.08);
}
.btn:focus-visible {
  outline: 2px solid #5dade2; outline-offset: -2px;
}
.btn:disabled {
  color: #445; cursor: default;
}
.btn:disabled:hover { background: transparent; }
.btn-capture { color: #5dade2; }
.btn-capture:hover, .btn-capture:active {
  color: #fff; background: #2980b9;
}
.btn-play { color: #27ae60; }
.btn-stop { color: #e74c3c; }

/* ── ARIA 포커스 ── */
:focus-visible {
  outline: 2px solid #5dade2;
  outline-offset: 2px;
}
