.publication-volltext-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef8f0;
  color: #1f6b3a;
  font-size: 0.72rem;
  line-height: 1.2;
}

.volltext-panel {
  border: 1px solid #cfdbea;
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
}

.volltext-panel--empty p,
.volltext-panel--loading p,
.volltext-panel--error p {
  margin: 0;
  color: #355476;
  font-size: 0.92rem;
}

.volltext-panel--empty h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #003f7d;
}

.volltext-panel--error p {
  color: #b42318;
}

.volltext-panel-head {
  margin-bottom: 12px;
}

.volltext-panel-head h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #003f7d;
}

.volltext-panel-filename {
  margin: 0;
  font-size: 0.88rem;
  color: #355476;
}

.volltext-file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.volltext-file-tab {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #f7fbff;
  color: #355476;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.82rem;
  cursor: pointer;
}

.volltext-file-tab.is-active {
  border-color: #00a3ad;
  background: #ffffff;
  color: #003f7d;
}

.volltext-file-tab:hover,
.volltext-file-tab:focus-visible {
  border-color: #9eb8d8;
  outline: none;
}

.pdf-viewer {
  border: 1px solid #e2eaf4;
  border-radius: 8px;
  background: #f7fbff;
  overflow: hidden;
}

.pdf-viewer--fullscreen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.pdf-viewer--loading,
.pdf-viewer--error {
  padding: 24px 16px;
}

.pdf-viewer--loading p,
.pdf-viewer--error p {
  margin: 0;
  color: #355476;
}

.pdf-viewer--error p {
  color: #b42318;
}

.pdf-viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2eaf4;
  background: #ffffff;
}

.pdf-viewer-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pdf-viewer-toolbar button,
.pdf-viewer-action-link {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #f7fbff;
  color: #003f7d;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.8rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.pdf-viewer-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdf-viewer-toolbar button:hover:not(:disabled),
.pdf-viewer-toolbar button:focus-visible,
.pdf-viewer-action-link:hover,
.pdf-viewer-action-link:focus-visible {
  border-color: #9eb8d8;
  background: #ffffff;
  color: #00a3ad;
  outline: none;
}

.pdf-viewer-scale {
  min-width: 3.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #355476;
}

.pdf-viewer-page-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #355476;
}

.pdf-viewer-page-input input {
  width: 3rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid #cfdbea;
  border-radius: 4px;
  font-size: 0.8rem;
  text-align: center;
}

.pdf-viewer-canvas-wrap {
  overflow: auto;
  max-height: min(72vh, 900px);
  padding: 12px;
}

.pdf-viewer--fullscreen .pdf-viewer-canvas-wrap {
  flex: 1;
  max-height: none;
}

.pdf-viewer-canvas {
  display: block;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 63, 125, 0.08);
}

.pdf-page-layer {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
}

.pdf-page-layer--note {
  cursor: crosshair;
}

.pdf-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  line-height: 1;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  z-index: 2;
  text-align: initial;
}

.pdf-text-layer :is(span, br) {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0 0;
  font-family: sans-serif;
  line-height: 1;
}

.pdf-text-layer ::selection {
  background: rgba(0, 163, 173, 0.28);
  color: transparent;
}

.pdf-page-layer--highlight .pdf-text-layer {
  z-index: 4;
}

.pdf-page-layer--highlight .pdf-annotation-layer {
  z-index: 3;
}

.pdf-annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.pdf-highlight-rect {
  position: absolute;
  border-radius: 1px;
  pointer-events: none;
}

.pdf-page-layer--view .pdf-highlight-rect.is-removable {
  pointer-events: auto;
  cursor: pointer;
}

.pdf-note-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  padding: 0;
  border: 1px solid #c9a100;
  border-radius: 50%;
  background: #ffe566;
  box-shadow: 0 1px 4px rgba(0, 63, 125, 0.15);
  pointer-events: auto;
  cursor: pointer;
}

.pdf-note-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff8d6;
}

.pdf-note-editor {
  position: absolute;
  z-index: 5;
  width: min(240px, calc(100% - 24px));
  padding: 10px;
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 63, 125, 0.15);
}

.pdf-note-editor-label {
  display: block;
  margin-bottom: 6px;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.82rem;
  color: #003f7d;
}

.pdf-note-editor textarea {
  width: 100%;
  min-height: 88px;
  padding: 8px;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.pdf-note-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pdf-note-editor-actions button {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #f7fbff;
  color: #003f7d;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.78rem;
  cursor: pointer;
}

.pdf-note-editor-delete {
  color: #b42318 !important;
}

.pdf-viewer-tools {
  align-items: center;
}

.pdf-tool-btn.is-active {
  border-color: #00a3ad;
  background: #ffffff;
  color: #003f7d;
}

.pdf-highlight-colors {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
}

.pdf-highlight-color {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.pdf-highlight-color.is-active {
  border-color: #003f7d;
}

.pdf-viewer-hint {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

.pdf-viewer-inline-error {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fef3f2;
  color: #b42318;
  font-size: 0.84rem;
}

.publication-detail-volltext-action {
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #cfe8d4;
  border-radius: 8px;
  background: #f4fbf6;
}

.publication-volltext-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid #78be20;
  border-radius: 6px;
  background: #ffffff;
  color: #1f6b3a;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.9rem;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.publication-volltext-link:hover,
.publication-volltext-link:focus-visible {
  border-color: #00a3ad;
  background: #f7fbff;
  color: #003f7d;
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .pdf-viewer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-viewer-toolbar-group {
    justify-content: center;
  }

  .pdf-viewer-canvas-wrap {
    max-height: 60vh;
  }
}
