/* Thin gold and quiet jade for supporting actions; cloud relief belongs to the primary pair. */
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] > button {
  border: 1px solid #c8b77f;
  border-image: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #f0f4e8, #e5edda);
  box-shadow: inset 0 1px 0 #ffffff80;
  color: #294a38;
  text-shadow: none;
  filter: none;
  min-height: 46px;
  height: 46px;
  padding: 7px 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] svg.chapter-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  filter: saturate(.65);
}
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] > button:hover:not(:disabled) {
  background: linear-gradient(135deg, #e9efdf, #dce7d1);
  border-color: #a99a69;
  filter: none;
}
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] > button:active:not(:disabled) {
  background: #dce7d1;
  box-shadow: inset 0 1px 2px #35543d15;
  filter: none;
}
:root body .celestial-site.celestial-palace .chart-navigation {
  gap: 7px;
  border: 0;
}
:root body .celestial-site.celestial-palace .chart-navigation > a {
  position: relative;
  border: 1px solid #dce4d3;
  border-image: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #f2f5eb, #eaf0e1);
  box-shadow: none;
  color: #35543d;
  text-shadow: none;
  filter: none;
  min-height: 44px;
  padding: 10px 6px;
  font-size: 14px;
  text-decoration: none;
}
:root body .celestial-site.celestial-palace .chart-navigation > a:hover {
  background: #e3ebd8;
  text-decoration: none;
}
:root body .celestial-site.celestial-palace .chart-navigation > a[aria-current="location"] {
  background: #dfe9d2;
  border-color: #d5dfc8;
  color: #203f2a;
  font-weight: 700;
}
:root body .celestial-site.celestial-palace .chart-navigation > a[aria-current="location"]::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 24%;
  right: 24%;
  height: 2px;
  background: #b59b4d;
  border: 0;
}
:root body .celestial-site.celestial-palace :is(.share-actions[role="group"] > button, .chart-navigation > a):focus-visible {
  outline: 2px solid #526e54;
  outline-offset: 3px;
}
@media (max-width: 680px) {
  :root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
    gap: 8px;
  }
  :root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions[role="group"] > button { font-size: 13px; padding-inline: 6px; }
  :root body .celestial-site.celestial-palace .chart-navigation { gap: 6px; }
  :root body .celestial-site.celestial-palace .chart-navigation > a { font-size: 13px; padding-inline: 4px; }
}

/* Keep the remaining share/save actions evenly distributed in one row. */
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions.has-download[role="group"] {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}

/* The dedicated copy-link action is redundant with sharing. Match its icon,
   rather than its position, so non-shareable editions keep their save action. */
.share-actions[role="group"] > button:has(.chapter-icon > path[d="M11 11h17v18H11zM5 22H3V3h18v3"]) {
  display: none !important;
}
:root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions.has-download[role="group"] > button {
  min-width: 0;
  padding-inline: 3px;
  gap: 3px;
}
@media (max-width: 480px) {
  :root body .celestial-site.celestial-palace.celestial-palace.celestial-palace .share-actions.has-download[role="group"] > button {
    flex-direction: column;
    height: 62px;
    padding: 5px 1px;
    font-size: 12px;
  }
}
