#novel-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 33vh;
  min-height: 180px;
  max-height: 280px;
  z-index: 60;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: auto;
}

#novel-container.novel-visible {
  opacity: 1;
}

.novel-window {
  position: absolute;
  inset: 0;
  margin: 8px 16px;
  background: rgba(13, 20, 33, 0.92);
  border: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
}

.novel-window::before {
  content: '⌐';
  position: absolute;
  top: -4px;
  left: -4px;
  color: var(--cyan);
  font-size: 20px;
}

.novel-window::after {
  content: '¬';
  position: absolute;
  bottom: -4px;
  right: -4px;
  color: var(--cyan);
  font-size: 20px;
}

.novel-name {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  margin-bottom: 8px;
  min-height: 20px;
}

.novel-text {
  font-size: calc(15px * var(--font-size-scale, 1));
  line-height: 1.8;
  color: var(--text);
  flex: 1;
  overflow-y: auto;
}

.novel-controls {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.novel-ctrl-btn {
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  min-width: 44px;
  min-height: 34px;
}

.novel-ctrl-btn:hover,
.novel-ctrl-btn.active {
  color: var(--cyan);
  border-color: var(--cyan);
}

.novel-choices {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.novel-choice-btn {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  transition: all 0.2s;
}

.novel-choice-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Log */
#novel-log {
  position: fixed;
  inset: 10vh 15vw;
  background: rgba(13, 20, 33, 0.95);
  border: 1px solid var(--border);
  z-index: 65;
  padding: 20px;
  overflow-y: auto;
  display: none;
  font-size: 14px;
  line-height: 1.8;
}

.log-entry {
  margin-bottom: 8px;
  color: var(--text);
}

.log-speaker {
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-right: 8px;
}

.novel-advance-indicator {
  position: absolute;
  bottom: 12px;
  right: 20px;
  color: var(--cyan);
  font-size: 12px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}
