:root {
  color-scheme: dark;
  --background: #0b0b0b;
  --surface: #101010;
  --surface-raised: #151515;
  --text: #f1f1ef;
  --muted: #969694;
  --subtle: #686866;
  --line: #292928;
  --line-strong: #3a3a39;
  --focus: #e6e6e3;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background);
  color: var(--text);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-color: #393938 var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 44% at 50% -12%, rgba(255, 255, 255, .055), transparent 74%),
    linear-gradient(180deg, #0d0d0d 0%, var(--background) 42rem);
  color: var(--text);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .1;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.014) 3px 4px);
}

button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
button { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.page-shell {
  width: min(100% - 80px, 1340px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.wordmark-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #464644;
  border-radius: 8px;
  color: #f0f0ee;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.08em;
}

.wordmark-name {
  color: #e4e4e1;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -.015em;
}

.wordmark-dot { color: var(--muted); }

.header-server-link, .footer-wordmark {
  transition: color .18s ease;
}

.header-server-link { display: inline-flex; align-items: center; gap: 9px; color: #c9c9c6; font-size: 12px; }
.header-server-link:hover, .footer-wordmark:hover { color: #fff; }
.header-server-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }

.external-mark { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }

main { flex: 1; }

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 54px;
  align-items: start;
  padding: 66px 0 64px;
}

.profile-section { min-width: 0; padding: 8px 12px 0 3px; }
.activity-section { min-width: 0; padding: 28px 30px 20px; border: 1px solid #30302f; border-radius: 12px; background: linear-gradient(145deg, #121212 0%, #0d0d0d 76%); box-shadow: 0 22px 54px rgba(0,0,0,.18); }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9d9d9a;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.4;
}

.kicker-line { width: 18px; height: 1px; display: inline-block; background: #777775; }

.profile-banner {
  height: 142px;
  margin: 25px 0 -104px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-position: center;
  background-size: cover;
  filter: grayscale(1);
}

.profile-main {
  min-height: 126px;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 25px;
  margin-top: 43px;
}

.profile-banner:not([hidden]) + .profile-main { margin-top: 71px; }

.avatar-frame {
  position: relative;
  width: 124px;
  height: 124px;
  overflow: hidden;
  border: 1px solid #3d3d3b;
  border-radius: 30px;
  background: #151515;
  box-shadow: 0 14px 42px rgba(0,0,0,.32);
}

.avatar-frame img { width: 100%; height: 100%; display: block; object-fit: cover; filter: grayscale(1); }
.avatar-fallback { position: absolute; inset: 0; display: grid; place-content: center; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 5px; opacity: .52; }
.avatar-fallback span { border: 1px solid #999; border-radius: 2px; }
.avatar-fallback span:nth-child(2) { transform: translateY(6px); }
.avatar-fallback span:nth-child(3) { transform: translateX(6px); }

.profile-copy { min-width: 0; padding-top: 1px; }
.profile-copy h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0;
  color: #f0f0ee;
  font-size: clamp(32px, 3.5vw, 42px);
  font-weight: 560;
  letter-spacing: -.06em;
  line-height: 1.02;
}

.discord-handle { margin: 8px 0 0; color: #a5a5a2; font-size: 13px; letter-spacing: .005em; }
.profile-waiting { margin: 10px 0 0; color: #7d7d7a; font-size: 12px; }

.presence-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin-top: 25px;
  padding: 0 12px;
  border: 1px solid #30302f;
  border-radius: 9px;
  background: rgba(255,255,255,.018);
  color: #d9d9d6;
  font-size: 12px;
}

.presence-dot, .connection-dot { flex: 0 0 auto; width: 7px; height: 7px; display: block; border-radius: 50%; }
.presence-dot { border: 1px solid #dededb; background: #dededb; box-shadow: 0 0 0 2px rgba(255,255,255,.07); }
.presence-dot[data-status="idle"] { border-color: #a2a2a0; background: transparent; box-shadow: inset -2px -2px 0 -1px #a2a2a0; }
.presence-dot[data-status="dnd"] { border-color: #ededeb; background: #ededeb; box-shadow: inset 0 0 0 2px #151515; }
.presence-dot[data-status="offline"], .presence-dot[data-status="unknown"] { border-color: #60605e; background: transparent; box-shadow: none; }
.presence-label { white-space: nowrap; }
.presence-separator { width: 1px; height: 13px; margin: 0 2px; background: #464644; }
.presence-device { color: #92928f; font-size: 11px; white-space: nowrap; }

.bio { max-width: 435px; margin: 20px 0 0; color: #b5b5b2; font-size: 14px; line-height: 1.65; white-space: pre-line; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.social-link { min-height: 35px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: #bdbdb9; font-size: 11px; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.social-link:hover { border-color: #5a5a58; background: #151515; color: #f3f3f0; }
.social-link svg { width: 13px; height: 13px; fill: currentColor; }

.activity-topline { min-height: 52px; display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.activity-topline h2, .vrchat-intro h2 { margin: 10px 0 0; color: #ededeb; font-size: 27px; font-weight: 540; letter-spacing: -.045em; }
.connection-indicator { display: inline-flex; align-items: center; gap: 8px; min-height: 26px; margin-top: 1px; padding: 0 9px; border: 1px solid #30302f; border-radius: 20px; color: #aaa9a6; font-family: var(--font-mono); font-size: 9px; letter-spacing: .045em; white-space: nowrap; }
.connection-dot { width: 6px; height: 6px; border: 1px solid #8d8d8a; background: transparent; }
.connection-indicator[data-state="live"] .connection-dot { border-color: #ededeb; background: #ededeb; }
.connection-indicator[data-state="snapshot"] .connection-dot { border-color: #bdbdb9; background: #bdbdb9; box-shadow: 0 0 0 2px #333; }
.connection-indicator[data-state="reconnecting"] .connection-dot { border-color: #c7c7c4; background: transparent; }
.connection-indicator[data-state="unavailable"] .connection-dot, .connection-indicator[data-state="offline"] .connection-dot { border-color: #626260; }
.activity-subline { min-height: 16px; margin: 13px 0 19px; color: #858582; font-size: 12px; line-height: 1.4; }

.activity-list { border-top: 1px solid var(--line); }
.activity-item { min-height: 126px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); transition: border-color .18s ease; }
.activity-item:hover { border-bottom-color: #41413f; }
.activity-art { position: relative; width: 96px; height: 96px; overflow: hidden; border: 1px solid #383836; border-radius: 8px; background: linear-gradient(145deg,#1a1a1a,#111); box-shadow: 0 7px 20px rgba(0,0,0,.24); transition: border-color .18s ease, background-color .18s ease; }
.activity-item:hover .activity-art { border-color: #5a5a58; background: #1a1a1a; }
.activity-art-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter .2s ease, transform .25s ease; }
.activity-item:hover .activity-art-image { filter: grayscale(1) contrast(1.04) brightness(1.08); transform: scale(1.035); }
.art-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #c1c1be; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.018) 1px, transparent 1px); background-size: 12px 12px; }
.art-fallback svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: .82; }
.activity-art--game .art-fallback svg { width: 34px; height: 34px; }
.activity-art--vrchat { background: #0a0a0a; }
.activity-art--vrchat .activity-art-image { object-fit: cover; filter: none; }
.activity-item:hover .activity-art--vrchat .activity-art-image { filter: brightness(1.04); }
.art-fallback-emoji { width: 36px; height: 36px; object-fit: contain; filter: grayscale(1); }
.art-fallback-emoji-text { max-width: 100%; overflow: hidden; font-size: 27px; filter: grayscale(1); }
.activity-art-badge { position: absolute; right: -1px; bottom: -1px; width: 27px; height: 27px; object-fit: cover; border: 2px solid #151515; border-radius: 50%; background: #151515; filter: grayscale(1); }
.activity-item:hover .activity-art-badge { border-color: #1a1a1a; }
.activity-copy { min-width: 0; padding-top: 2px; }
.activity-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.activity-name { min-width: 0; overflow-wrap: anywhere; margin: 0; color: #eeeeeb; font-size: 16px; font-weight: 570; line-height: 1.4; }
.activity-type { flex: 0 0 auto; color: #737370; font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; }
.activity-detail { overflow-wrap: anywhere; margin: 7px 0 0; color: #bcbcb9; font-size: 13px; line-height: 1.5; }
.activity-state { overflow-wrap: anywhere; margin: 4px 0 0; color: #92928f; font-size: 12px; line-height: 1.5; }
.activity-time { display: block; margin-top: 10px; color: #858582; font-family: var(--font-mono); font-size: 10px; letter-spacing: .01em; }
.activity-empty { min-height: 113px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 13px; color: #777774; }
.activity-empty p { max-width: 250px; margin: 0; font-size: 12px; line-height: 1.55; }
.empty-rule { width: 30px; height: 1px; background: #686866; }

.track-timeline { display: grid; grid-template-columns: minmax(30px, 1fr) 34px 34px; align-items: center; gap: 8px; margin-top: 11px; }
.track-progress { position: relative; height: 2px; overflow: hidden; background: #363635; }
.track-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #d3d3d0; transition: width .5s linear; }
.track-elapsed, .track-total { color: #747471; font-family: var(--font-mono); font-size: 9px; font-variant-numeric: tabular-nums; }
.track-total { text-align: right; }

.vrchat-section { display: grid; grid-template-columns: minmax(220px, .62fr) minmax(0, 1.38fr); align-items: center; gap: 48px; padding: 28px 30px; border: 1px solid #2c2c2b; border-radius: 11px; background: #0f0f0f; }
.vrchat-intro h2 { margin-top: 11px; font-size: 20px; }
.vrchat-intro p { margin: 7px 0 0; color: #878784; font-size: 12px; }
.destination-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.destination-card { min-width: 0; min-height: 96px; display: flex; align-items: center; gap: 15px; padding: 13px 16px; border: 1px solid #343433; border-radius: 8px; background: #121212; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.destination-card:hover { border-color: #5d5d5b; background: #161616; transform: translateY(-2px); }
.destination-icon { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid #454543; border-radius: 10px; background: #090909; }
.destination-icon--vrchat img { width: 100%; height: 100%; display: block; object-fit: cover; filter: grayscale(1); }
.destination-icon--discord svg { width: 30px; height: 30px; fill: none; stroke: #ddd; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.vrchat-link-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.destination-kicker { color: #777774; font-family: var(--font-mono); font-size: 8px; letter-spacing: .09em; }
.vrchat-name, .destination-name { overflow-wrap: anywhere; color: #eeeeeb; font-size: 14px; font-weight: 560; }
.destination-domain { overflow-wrap: anywhere; color: #858582; font-family: var(--font-mono); font-size: 9px; }
.external-mark { flex: 0 0 auto; margin-left: auto; color: #898986; transition: transform .18s ease, color .18s ease; }
.destination-card:hover .external-mark { color: #eeeeeb; transform: translate(2px, -2px); }

.site-footer { min-height: 69px; display: flex; align-items: center; color: #777774; font-size: 10px; }
.footer-wordmark { width: fit-content; color: #b7b7b4; font-weight: 560; }

[hidden] { display: none !important; }

@media (min-width: 1500px) {
  .top-grid { padding-top: 78px; padding-bottom: 78px; }
}

@media (max-width: 820px) {
  .page-shell { width: min(100% - 48px, 650px); }
  .site-header { min-height: 70px; }
  .top-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 43px 0 45px; }
  .profile-section { min-height: 0; padding: 0 1px 7px; }
  .activity-section { padding: 24px 24px 13px; border: 1px solid #30302f; }
  .profile-main { margin-top: 31px; }
  .vrchat-section { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 25px 24px; }
  .vrchat-intro p { margin-top: 6px; }
  .activity-list { max-width: none; }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 32px); }
  .site-header { min-height: 66px; }
  .wordmark { gap: 8px; }
  .wordmark-mark { width: 27px; height: 27px; }
  .header-server-link { gap: 5px; font-size: 10px; }
  .top-grid { padding-top: 34px; padding-bottom: 32px; }
  .profile-section { padding-bottom: 0; }
  .profile-main { grid-template-columns: 88px minmax(0,1fr); gap: 17px; min-height: 88px; margin-top: 24px; }
  .avatar-frame { width: 88px; height: 88px; border-radius: 24px; }
  .profile-copy h1 { font-size: clamp(24px, 7vw, 30px); }
  .discord-handle { margin-top: 6px; font-size: 12px; }
  .profile-waiting { margin-top: 8px; font-size: 11px; }
  .presence-row { min-height: 39px; gap: 8px; margin-top: 20px; padding: 0 10px; font-size: 11px; }
  .presence-device { font-size: 10px; }
  .activity-section { padding: 20px 17px 9px; }
  .activity-topline h2 { font-size: 23px; }
  .connection-indicator { gap: 6px; min-height: 24px; padding: 0 7px; font-size: 8px; }
  .activity-subline { margin: 13px 0 14px; font-size: 10px; }
  .activity-item { min-height: 98px; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 13px 0; }
  .activity-art { width: 72px; height: 72px; }
  .activity-art-badge { width: 23px; height: 23px; }
  .destination-grid { grid-template-columns: minmax(0,1fr); }
  .destination-card { min-height: 82px; }
  .vrchat-section { padding: 21px 17px; }
  .site-footer { min-height: 64px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
