:root {
  --bg: #0b0e13;
  --ink: #e3eaf2;
  --muted: #9fadbb;
  --dim: #74818f;
  --line: #1f2733;
  --line-strong: #2b3a4d;
  --accent: #39c8ff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

/* book selector — sits directly under the shared top bar */
.view-bar {
  display: flex;
  align-items: stretch;
  height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.view-tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.view-tabs button {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font: 10px/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.view-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
}

.view-tabs button:hover {
  color: var(--muted);
}

.view-tabs button[aria-selected="true"] {
  color: var(--ink);
}

.view-tabs button[aria-selected="true"]::after {
  background: var(--accent);
}

/* topbar 52 + view-bar 52 = 104 */
.screen {
  width: 100%;
  height: calc(100% - 104px);
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

@media (max-width: 760px) {
  .view-bar {
    padding: 0 16px;
  }
  .view-tabs {
    gap: 20px;
  }
}
