.site-socials {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}
.site-socials a {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  color: var(--color-paper-card);
  background: var(--color-accent);
  border: 1px solid
    color-mix(in oklch, var(--color-accent) 75%, var(--color-rule));
  border-radius: 0.78rem;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}
.site-socials a:hover {
  transform: translateY(-0.15rem);
  filter: brightness(1.1);
}
.site-socials svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}
.mobile-menu__group {
  gap: var(--space-3xs, 0.25rem);
}
.mobile-menu__group + .mobile-menu__group {
  margin-top: var(--space-2xs, 0.5rem);
  padding-top: var(--space-xs, 0.75rem);
  border-top: var(--rule-hair, 1px) solid var(--color-rule, var(--line, #d8c4ad));
}
.mobile-menu__heading {
  padding: var(--space-2xs, 0.5rem) var(--space-sm, 1rem) var(--space-3xs, 0.25rem);
  color: var(--color-accent, var(--brown, #7c4a2f));
}
.mobile-menu__group a {
  gap: var(--space-2xs, 0.5rem);
}
.mobile-menu__group a i {
  color: var(--color-accent, var(--brown, #7c4a2f));
}
.page-stats {
  position: fixed;
  z-index: 965;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fffaf2;
  background: linear-gradient(135deg, #6b351f, #2e1710);
  border: 1px solid color-mix(in oklch, var(--color-rule) 55%, transparent);
  border-radius: 999px;
  box-shadow: 0 0.8rem 2.2rem rgba(0, 0, 0, 0.25);
  font: 800 0.75rem/1 inherit;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.page-stats[hidden] {
  display: none;
}
.page-stats__item {
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.65rem 0.8rem;
  color: #fffaf2;
  white-space: nowrap;
}
.page-stats button {
  font: inherit;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.page-stats button[aria-pressed="false"] {
  color: #fffaf2;
}
.page-stats button[aria-pressed="true"] {
  color: #ff4967;
}
.page-stats button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.page-stats i {
  font-size: 0.85rem;
}
.page-stats__compact {
  max-width: 3.5rem;
  overflow: hidden;
  opacity: 1;
  transition:
    max-width 0.28s ease,
    opacity 0.18s ease;
}
.page-stats__detail {
  min-height: 0;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  color: #fffaf2;
  transition:
    max-width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}
@media (hover: hover) {
  .page-stats:hover,
  .page-stats:focus-within {
    box-shadow: 0 1rem 2.8rem color-mix(in oklch, var(--color-ink) 34%, transparent);
    transform: translateY(-0.1rem);
  }
  .page-stats:hover .page-stats__compact,
  .page-stats:focus-within .page-stats__compact {
    max-width: 0;
    opacity: 0;
  }
  .page-stats:hover .page-stats__detail,
  .page-stats:focus-within .page-stats__detail {
    max-width: 10rem;
    opacity: 1;
  }
}
.guide-chat {
  position: fixed;
  z-index: 975;
  right: 4.8rem;
  bottom: 1rem;
  font-family: inherit;
}
.guide-chat[hidden] {
  display: none;
}
.guide-chat__launcher {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  color: #fffaf2;
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-deep)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 1rem 2.5rem
    color-mix(in oklch, var(--color-ink) 24%, transparent);
  font: 850 0.78rem/1 inherit;
  cursor: pointer;
}
.guide-chat__launcher:hover,
.guide-chat__launcher:focus-visible {
  transform: translateY(-0.12rem);
  box-shadow: 0 1.2rem 2.8rem color-mix(in oklch, var(--color-ink) 30%, transparent);
}
.guide-chat__panel {
  position: absolute;
  right: 0;
  bottom: 3.75rem;
  width: min(25rem, calc(100vw - 2rem));
  overflow: hidden;
  color: var(--color-ink);
  background: var(--color-paper-card);
  border: 1px solid var(--color-rule);
  border-radius: 1.3rem;
  box-shadow: 0 1.5rem 4rem
    color-mix(in oklch, var(--color-ink) 30%, transparent);
}
.guide-chat__panel[hidden] {
  display: none;
}
.guide-chat__panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  color: #fffaf2;
  background: linear-gradient(135deg, #58301f, #8e4d2c);
}
.guide-chat__panel > header > span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.guide-chat__panel > header img {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: transparent;
}
.guide-chat__panel > header b {
  display: grid;
  font-size: 0.82rem;
}
.guide-chat__panel > header small {
  color: rgba(255, 250, 242, 0.72);
  font-size: 0.57rem;
  font-weight: 650;
}
.guide-chat__panel > header button {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 0.6rem;
  cursor: pointer;
}
.guide-chat__messages {
  height: min(19rem, 42vh);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.8rem;
  overflow: auto;
}
.guide-chat__message {
  max-width: 88%;
  padding: 0.62rem 0.72rem;
  border-radius: 0.85rem;
  font-size: 0.72rem;
  line-height: 1.55;
}
.guide-chat__message p {
  margin: 0;
  white-space: pre-wrap;
}
.guide-chat__message.is-typing p::after {
  display: inline-block;
  width: 0.42em;
  height: 1em;
  margin-left: 0.18rem;
  vertical-align: -0.12em;
  background: var(--color-accent);
  border-radius: 0.12rem;
  content: "";
  animation: guide-caret 0.72s steps(1, end) infinite !important;
}
.guide-chat__message--thinking {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2.55rem;
}
.guide-chat__message--thinking span {
  margin-right: 0.12rem;
  color: var(--color-muted);
  font-weight: 750;
}
.guide-chat__message--thinking i {
  width: 0.38rem;
  height: 0.38rem;
  background: var(--color-accent);
  border-radius: 50%;
  animation: guide-thinking 0.9s ease-in-out infinite alternate !important;
}
.guide-chat__message--thinking i:nth-of-type(2) { animation-delay: 0.15s !important; }
.guide-chat__message--thinking i:nth-of-type(3) { animation-delay: 0.3s !important; }
.guide-chat__message--assistant {
  align-self: flex-start;
  background: var(--color-paper-soft);
  border: 1px solid var(--color-rule);
}
.guide-chat__message--user {
  align-self: flex-end;
  color: #fff;
  background: var(--color-accent);
}
.guide-chat__message a {
  display: inline-flex;
  margin-top: 0.38rem;
  color: var(--color-accent);
  font-weight: 850;
}
.guide-chat__suggestions {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.8rem 0.65rem;
  overflow: auto;
}
.guide-chat__suggestions button {
  flex: 0 0 auto;
  padding: 0.36rem 0.5rem;
  color: var(--color-muted);
  background: var(--color-paper-soft);
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  font: 750 0.61rem/1 inherit;
  cursor: pointer;
}
.guide-chat form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.7rem;
  border-top: 1px solid var(--color-rule);
}
.guide-chat input {
  min-width: 0;
  padding: 0.7rem 0.75rem;
  color: var(--color-ink);
  background: var(--color-paper-soft);
  border: 1px solid var(--color-rule);
  border-radius: 0.7rem;
  font: inherit;
}
.guide-chat form button {
  width: 2.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--color-accent);
  border: 0;
  border-radius: 0.7rem;
  cursor: pointer;
}
.guide-chat.is-busy form button,
.guide-chat.is-busy .guide-chat__suggestions button {
  opacity: 0.48;
  cursor: wait;
}
.guide-chat.is-busy input {
  opacity: 0.72;
  cursor: wait;
}
@media (max-width: 720px) {
  .page-stats {
    position: fixed;
    right: auto;
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    left: max(0.7rem, env(safe-area-inset-left));
    width: max-content;
    max-width: calc(100vw - 5.2rem);
    margin: 0;
    box-shadow: 0 0.7rem 1.8rem rgba(0, 0, 0, 0.24);
  }
  .page-stats__item {
    min-height: 2.85rem;
    padding: 0.62rem 0.72rem;
  }
  .page-stats__detail {
    display: none;
  }
  .guide-chat {
    position: fixed;
    right: max(0.7rem, env(safe-area-inset-right));
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
  }
  .guide-chat__launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .guide-chat__launcher {
    width: 3rem;
    min-height: 3rem;
    height: 3rem;
    justify-content: center;
    padding: 0;
  }
  .guide-chat__panel {
    position: fixed;
    right: max(0.55rem, env(safe-area-inset-right));
    bottom: calc(max(0.7rem, env(safe-area-inset-bottom)) + 3.7rem);
    width: min(25rem, calc(100vw - 1.1rem));
    max-height: calc(100dvh - 5.5rem - env(safe-area-inset-top));
  }
  .guide-chat__messages {
    height: min(19rem, calc(100dvh - 14.5rem));
  }
  .back-to-top {
    z-index: 980;
    right: max(0.7rem, env(safe-area-inset-right));
    bottom: calc(max(0.7rem, env(safe-area-inset-bottom)) + 3.7rem);
  }
}
@keyframes guide-thinking {
  from { opacity: 0.28; transform: translateY(0.15rem) scale(0.82); }
  to { opacity: 1; transform: translateY(-0.16rem) scale(1.08); }
}
@keyframes guide-caret {
  50% { opacity: 0; }
}
