.thesis-page {
  min-height: 100vh;
}

.thesis-main {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--header-h, 72px) + 1.5rem) 1.25rem 3rem;
}

.thesis-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(196, 165, 116, 0.35);
}

.thesis-toolbar .eyebrow {
  margin: 0 0 0.2rem;
}

.thesis-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #8A8A86);
}

.thesis-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.thesis-btn {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(196, 165, 116, 0.55);
  background: #fff;
  color: #8A7048;
  border-radius: 999px;
  cursor: pointer;
}

.thesis-btn:hover {
  border-color: #C4A574;
  background: #F3EFE7;
}

.thesis-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.thesis-page-indicator {
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #8A8A86);
}

.thesis-stage {
  position: relative;
  background: #F3EFE7;
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  max-height: calc(100vh - 220px);
  user-select: none;
  -webkit-user-select: none;
}

.thesis-stage canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 28px rgba(11, 18, 32, 0.08);
  background: #FAF9F7;
}

.thesis-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8A7048;
  font-size: 0.95rem;
}

.thesis-loading.is-hidden {
  display: none;
}

.thesis-disc-foot {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted, #8A8A86);
  line-height: 1.4;
}

@media print {
  body.thesis-page * {
    display: none !important;
  }
  body.thesis-page::after {
    content: "Printing of this document is not permitted.";
    display: block !important;
    padding: 2rem;
    font-family: sans-serif;
  }
}
