:root {
  --xfants-shell-ink: #173c34;
  --xfants-shell-paper: #f7f8f2;
  --xfants-shell-line: #cad5c9;
  --xfants-shell-accent: #a54c35;
  --xfants-shell-focus: #173c34;
}

.xfants-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  color: #fff;
  background: var(--xfants-shell-ink);
  transform: translateY(-160%);
}

.xfants-skip-link:focus-visible {
  transform: translateY(0);
}

.xfants-site-header,
.xfants-site-footer {
  color: var(--xfants-shell-ink);
  background: var(--xfants-shell-paper);
  overflow-wrap: anywhere;
}

.xfants-site-header {
  border-bottom: 1px solid var(--xfants-shell-line);
}

.xfants-site-header-inner,
.xfants-site-footer-inner {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.xfants-site-header-inner {
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.xfants-site-name {
  flex: 0 0 auto;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.xfants-site-nav,
.xfants-site-member-nav,
.xfants-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.xfants-site-nav {
  flex: 1 1 540px;
}

.xfants-site-nav a,
.xfants-site-member-nav a,
.xfants-site-logout button,
.xfants-site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 3px 2px;
  color: inherit;
  text-decoration: none;
}

.xfants-site-nav a:hover,
.xfants-site-member-nav a:hover,
.xfants-site-logout button:hover,
.xfants-site-footer a:hover {
  color: var(--xfants-shell-accent);
  text-decoration: underline;
}

.xfants-site-nav a[aria-current="page"],
.xfants-site-footer a[aria-current="page"] {
  color: var(--xfants-shell-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.xfants-site-header :is(a, button):focus-visible,
.xfants-site-footer a:focus-visible,
.xfants-skip-link:focus-visible {
  outline: 3px solid var(--xfants-shell-focus);
  outline-offset: 3px;
}

.xfants-site-logout {
  margin: 0;
}

.xfants-site-logout button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.xfants-site-member-nav {
  justify-content: flex-end;
  flex: 0 1 auto;
}

.xfants-site-nickname {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xfants-site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--xfants-shell-line);
}

.xfants-site-footer-inner {
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  color: #52655f;
  font-size: 14px;
}

@media (max-width: 760px) {
  .xfants-site-header-inner,
  .xfants-site-footer-inner {
    width: min(100% - 32px, 640px);
  }

  .xfants-site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 16px 0;
  }

  .xfants-site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .xfants-site-nav a {
    justify-content: center;
    min-width: 0;
    padding: 7px 4px;
    border: 1px solid transparent;
    font-size: 14px;
    white-space: nowrap;
  }

  .xfants-site-nav a[aria-current="page"] {
    border-color: currentcolor;
    text-decoration: none;
  }

  .xfants-site-member-nav {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .xfants-site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
