.sidebar-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.avatar-wrap {
  flex: 0 0 auto;
}

.avatar-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--avatar-size);
  height: var(--avatar-size);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.avatar-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  display: none;
  font-family: var(--font-display);
  font-size: calc(var(--avatar-size) * 0.4);
  color: var(--ink-muted);
}

.avatar-slot.is-fallback img {
  display: none;
}

.avatar-slot.is-fallback .avatar-placeholder {
  display: block;
}

.identity {
  flex: 1 1 auto;
  min-width: 0;
}

.player-name {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.player-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
}

.nav-toggle {
  flex: 0 0 var(--tap);
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--surface-raised);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.sidebar-drawer {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding: var(--space-4) 0 var(--space-2);
  border-top: 1px solid var(--line);
}

.sidebar-drawer.is-open {
  display: flex;
}

.sidebar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-1);
}

.server-tag {
  display: block;
  margin-bottom: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.server-tag::before {
  content: "#";
  margin-right: 2px;
  color: var(--accent);
}

.visit-counter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.visit-count {
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.visit-count[hidden] {
  display: none;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: nav;
}

.nav-item {
  counter-increment: nav;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  text-align: left;
  color: var(--ink-muted);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
  content: "#" counter(nav);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--ink);
  background: var(--surface);
}

.nav-item.active {
  color: var(--ink);
  background: var(--surface-raised);
}

.nav-item.active::before {
  color: var(--accent);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.tab-panel {
  display: none;
  scroll-margin-top: var(--header-offset);
}

.tab-panel.active {
  display: block;
}

.tab-panel h2 {
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-3);
  font-size: var(--text-2xl);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.tab-panel p {
  margin: 0;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--space-3);
}

.about-num {
  padding-top: 0.35em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
}

.about-list li span:last-child {
  max-width: 68ch;
  line-height: 1.7;
  color: var(--ink);
}

.stack {
  margin: 0;
}

.stack-row {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.stack-row:first-child {
  padding-top: 0;
}

.stack-row:last-child {
  border-bottom: 0;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.stack-items {
  margin: 0;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tech {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.tech img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.tech::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  padding: 3px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--bg);
  background: var(--ink);
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
}

.tech:first-child::after {
  left: 0;
  transform: translate(0, 4px);
}

.tech:hover,
.tech:focus-visible {
  border-color: var(--line-strong);
}

.tech--text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
}

.tech:hover::after,
.tech:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tech:first-child:hover::after,
.tech:first-child:focus::after {
  transform: translate(0, 0);
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.adv-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.adv-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.adv-icon-fallback {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
}

.adv-icon.is-fallback img {
  display: none;
}

.adv-icon.is-fallback .adv-icon-fallback {
  display: block;
}

.entry-body {
  min-width: 0;
}

.entry-org {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--accent-strong);
}

.tab-panel .entry-role {
  margin-top: 2px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

.adv-title-link {
  color: var(--accent-strong);
}

.tab-panel .entry-desc {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-muted);
}

.adv-proof {
  grid-column: 1 / -1;
  display: block;
  max-width: 560px;
  margin-top: var(--space-2);
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.adv-proof:hover,
.adv-proof:focus-visible {
  box-shadow: 0 0 0 1px var(--accent);
}

.adv-proof img {
  display: block;
  width: 100%;
  height: auto;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-card:hover,
.contact-card:focus-within {
  border-color: var(--line-strong);
}

.contact-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  min-height: 68px;
  padding: var(--space-3) var(--space-4);
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.contact-main:hover,
.contact-main:focus-visible {
  text-decoration: none;
  background: var(--surface-raised);
}

.contact-icon {
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-main:hover .contact-icon,
.contact-main:focus-visible .contact-icon {
  color: var(--accent-strong);
  border-color: var(--line-strong);
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

.contact-handle {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.copy-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.contact-copy {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0 var(--space-4);
  appearance: none;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--ink-faint);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.contact-copy:hover,
.contact-copy:focus-visible {
  color: var(--ink);
  background: var(--surface-raised);
}

[data-copy][data-state="copied"] .copy-icon {
  color: var(--success);
}

[data-copy][data-state="failed"] .copy-icon {
  color: var(--danger);
}

.arch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.arch-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shot {
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  text-decoration: none;
}

.shot:hover,
.shot:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-caption,
.shot figcaption {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.arch-text {
  min-width: 0;
}

.tab-panel .arch-text p {
  max-width: 62ch;
  margin-bottom: var(--space-4);
  line-height: 1.75;
  color: var(--ink-muted);
}

.tab-panel .arch-text p:first-child {
  color: var(--ink);
}

.arch-text h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-lg);
  color: var(--ink);
}

.arch-themes {
  margin-top: var(--space-6);
}

.arch-themes > p {
  max-width: 62ch;
  margin-bottom: var(--space-4);
  line-height: 1.75;
  color: var(--ink-muted);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-6) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
}

.tab-panel .not-found-code {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2.2rem + 4vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.tab-panel .not-found-title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
}

.tab-panel .not-found-text {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-4);
  margin-top: calc(var(--space-5) * -1);
  margin-left: calc(var(--space-2) * -1);
}

.lang-option {
  min-height: var(--tap);
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink-faint);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lang-option:hover,
.lang-option:focus-visible {
  color: var(--ink);
}

.lang-option[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.tab-panel .section-note {
  max-width: 62ch;
  margin-bottom: var(--space-5);
  line-height: 1.7;
  color: var(--ink-muted);
}

.shoutout-list {
  columns: 2;
  column-gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shoutout-list li {
  padding: var(--space-1) 0;
  break-inside: avoid;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.notice-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: var(--space-5) var(--gutter);
}

.notice-page .not-found {
  width: min(100%, 34rem);
}

.notice-image {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-3);
}

.notice-home {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}
