.btn-prd {
  color: #355ecf;
  background: #f7faff;
  border-color: #cfdcf7;
}

.btn-prd:hover:not(:disabled) {
  background: #edf4ff;
  border-color: #b9ccf2;
}

.page-prd-viewer {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: min(820px, calc(100vw - 72px));
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-left: 1px solid #dbe5f1;
  box-shadow: -18px 0 40px rgba(22, 37, 63, 0.16);
  transform: translateX(100%);
  transition: transform 0.24s ease;
  z-index: 95;
}

.page-prd-viewer.dock-right {
  right: 0;
  left: auto;
  border-left: 1px solid #dbe5f1;
  border-right: 0;
  box-shadow: -18px 0 40px rgba(22, 37, 63, 0.16);
  transform: translateX(100%);
}

.page-prd-viewer.dock-left {
  left: 0;
  right: auto;
  border-left: 0;
  border-right: 1px solid #dbe5f1;
  box-shadow: 18px 0 40px rgba(22, 37, 63, 0.16);
  transform: translateX(-100%);
}

.page-prd-viewer.open {
  transform: translateX(0);
}

.page-prd-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e7edf6;
  background: linear-gradient(180deg, #f9fbff 0%, #f4f8fe 100%);
}

.page-prd-head-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-prd-badge {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4d77ea;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px rgba(77, 119, 234, 0.2);
  flex-shrink: 0;
}

.page-prd-head-copy {
  min-width: 0;
}

.page-prd-head-kicker {
  color: #72839a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.page-prd-head-title {
  margin-top: 4px;
  color: #253a69;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.page-prd-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7f90a9;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-prd-close:hover {
  background: #eef3fb;
  color: #566a87;
}

.page-prd-toolbar {
  padding: 14px 18px 12px;
  border-bottom: 1px solid #e7edf6;
  background: #ffffff;
}

.page-prd-toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-prd-search {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  color: #25354b;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-prd-search:focus {
  border-color: #88a2ef;
  box-shadow: 0 0 0 3px rgba(77, 119, 234, 0.14);
}

.page-prd-tool-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  color: #426099;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-prd-tool-btn:hover,
.page-prd-tool-btn.active {
  border-color: #4d77ea;
  background: #edf4ff;
  color: #2f56c6;
}

.page-prd-toolbar-tip {
  margin-top: 10px;
  color: #73839b;
  font-size: 12px;
  line-height: 1.6;
}

.page-prd-current {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f7fc;
  color: #50627d;
  font-size: 12px;
  line-height: 1.5;
}

.page-prd-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.page-prd-toc {
  min-height: 0;
  overflow: auto;
  padding: 14px 10px 18px;
  border-right: 1px solid #e8eef6;
  background: #f7f9fc;
}

.page-prd-toc-item {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d6f88;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: block;
}

.page-prd-toc-item.level-3 {
  padding-left: 20px;
}

.page-prd-toc-item.level-4 {
  padding-left: 30px;
}

.page-prd-toc-item:hover,
.page-prd-toc-item.active {
  background: #eaf1ff;
  color: #2d57ca;
}

.page-prd-toc-empty {
  padding: 10px;
  color: #8190a6;
  font-size: 12px;
  line-height: 1.5;
}

.page-prd-content {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 32px;
  background: #fff;
  color: #34465f;
}

.page-prd-heading {
  margin: 18px 0 10px;
  color: #233a6f;
  font-weight: 700;
  line-height: 1.45;
  scroll-margin-top: 18px;
}

.page-prd-heading.level-1 {
  margin-top: 0;
  font-size: 26px;
}

.page-prd-heading.level-2 {
  font-size: 20px;
  padding-top: 6px;
  border-top: 1px solid #e8eef6;
}

.page-prd-heading.level-3 {
  font-size: 17px;
}

.page-prd-heading.level-4 {
  font-size: 15px;
  color: #305691;
}

.page-prd-paragraph {
  margin: 10px 0;
  color: #4c5e77;
  font-size: 13px;
  line-height: 1.9;
  word-break: break-word;
}

.page-prd-list {
  margin: 8px 0 12px;
  padding-left: 20px;
  color: #4c5e77;
  font-size: 13px;
  line-height: 1.85;
}

.page-prd-list li + li {
  margin-top: 4px;
}

.page-prd-quote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid #8ba7f2;
  border-radius: 0 8px 8px 0;
  background: #f5f8ff;
  color: #556985;
}

.page-prd-quote p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}

.page-prd-divider {
  border: 0;
  border-top: 1px solid #e7edf6;
  margin: 18px 0;
}

.page-prd-inline-code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eff4fb;
  color: #365a95;
  font-size: 12px;
  font-family: "Consolas", "Courier New", monospace;
}

.page-prd-code-block {
  margin: 12px 0 16px;
  padding: 14px;
  border-radius: 10px;
  background: #f5f8fc;
  border: 1px solid #e0e8f3;
  overflow: auto;
}

.page-prd-code-block code {
  color: #3b4c63;
  font-size: 12px;
  line-height: 1.7;
  font-family: "Consolas", "Courier New", monospace;
  white-space: pre;
  display: block;
}

.page-prd-table-wrap {
  margin: 12px 0 16px;
  overflow: auto;
  border: 1px solid #e2e9f3;
  border-radius: 10px;
}

.page-prd-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
}

.page-prd-table th,
.page-prd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eef6;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.7;
  color: #4b5c74;
}

.page-prd-table th {
  background: #f6f9fd;
  color: #385891;
  font-weight: 700;
  white-space: nowrap;
}

.page-prd-table tr:last-child td {
  border-bottom: 0;
}

.page-prd-link {
  color: #2f5fdf;
  text-decoration: none;
}

.page-prd-link:hover {
  text-decoration: underline;
}

.is-doc-current {
  background: linear-gradient(180deg, rgba(234, 241, 255, 0.96) 0%, rgba(234, 241, 255, 0.7) 100%);
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(77, 119, 234, 0.08);
}

.page-prd-target {
  position: relative;
}

body.page-prd-locate-mode .page-prd-target {
  outline: 2px dashed rgba(77, 119, 234, 0.72);
  outline-offset: 3px;
  cursor: crosshair !important;
}

body.page-prd-locate-mode .page-prd-target::after {
  content: attr(data-prd-label);
  position: absolute;
  top: -12px;
  right: -2px;
  max-width: 180px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #4d77ea;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 8px 14px rgba(77, 119, 234, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 4;
}

.is-prd-current-target {
  outline: 3px solid rgba(77, 119, 234, 0.82);
  outline-offset: 4px;
  box-shadow: 0 0 0 5px rgba(77, 119, 234, 0.1);
}
