/* Shared public-tool header and footer. /paipan inlines the same rules. */
.pp-header,
.pp-footer {
  width: 100%;
  background: rgba(251, 247, 240, 0.96);
}
.pp-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #eadfca;
}
.pp-bar,
.pp-footer nav {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
}
.pp-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3a2a22;
  text-decoration: none;
  min-width: 0;
}
.pp-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.pp-brand b,
.pp-brand small { white-space: nowrap; }
.pp-brand b {
  display: block;
  font-family: "Noto Serif TC", "Noto Serif SC", "Songti TC", serif;
  font-size: 18px;
  line-height: 1.1;
}
.pp-brand small {
  display: block;
  margin-top: 2px;
  font: 500 11px/1.2 "Noto Sans TC", "PingFang TC", sans-serif;
  letter-spacing: 0.08em;
  color: #8a7a6a;
}
.pp-nav,
.pp-langs,
.pp-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.pp-footer nav { justify-content: flex-start; gap: 12px 24px; }
.pp-nav a,
.pp-langs a,
.pp-footer a,
.pp-tools > summary {
  color: #8a1f2c;
  text-decoration: none;
}
.pp-nav a[aria-current="page"],
.pp-langs a[aria-current="page"],
.pp-footer a[aria-current="page"],
.pp-tools a[aria-current="page"] b {
  font-weight: 700;
}
.pp-lang-full {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.pp-lang-short { display: inline; }
.pp-tools { position: relative; }
.pp-tools > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pp-tools > summary::-webkit-details-marker { display: none; }
.pp-tools-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #eadfca;
  background: #fffdf8;
  box-shadow: 0 16px 40px -24px rgba(80, 50, 40, 0.45);
}
.pp-tools-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  color: #4d403b;
  white-space: normal;
}
.pp-tools-panel small { color: #8a7a6a; font-size: 12px; font-weight: 400; }
@media (max-width: 800px) {
  .pp-bar { gap: 8px 12px; }
  .pp-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
  }
  .pp-nav a,
  .pp-tools > summary { white-space: nowrap; }
  .pp-langs { margin-left: auto; flex-wrap: nowrap; gap: 8px; }
  .pp-tools-panel { left: auto; right: 0; }
}
