:root {
  --bg: #ece8df;
  --bg-dot: #d5cfc2;
  --panel-bg: #fcfbf8;
  --subcard-bg: #f5f2eb;
  --text: #1c1b18;
  --text-secondary: #434038;
  --muted: #6e6a5f;
  --border: #dcd6c8;
  --border-strong: #c4bcae;
  --accent: #2c5e4f;
  --accent-soft: #e3ede9;
  --active-bg: #e3ede9;
  --active-text: #234d40;
  --active-border: #bfd4cc;
  --dot-inactive: #8c877a;
  --shadow: 0 1px 3px rgba(28, 27, 24, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --bg-dot: #262420;
    --panel-bg: #1c1b18;
    --subcard-bg: #23211d;
    --text: #edeae2;
    --text-secondary: #c7c2b6;
    --muted: #918c7e;
    --border: #302d27;
    --border-strong: #454138;
    --accent: #7fb5a3;
    --accent-soft: #1f332c;
    --active-bg: #1f332c;
    --active-text: #95c7b6;
    --active-border: #2e4d42;
    --dot-inactive: #6e6a5f;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: center top;
  color: var(--text);
  line-height: 1.55;
  padding: 40px 16px;
  -webkit-font-smoothing: antialiased;
}

body.has-custom-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background-color: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar {
  width: 82px;
  height: 82px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background-color: var(--subcard-bg);
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

h1 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 4px;
  background-color: var(--active-bg);
  color: var(--active-text);
  border: 1px solid var(--active-border);
}

.status-pill:empty {
  display: none;
}

.handle {
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--muted);
  margin-top: 3px;
}

.tagline {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 6px;
}

.about {
  margin-top: 16px;
  font-size: 0.935rem;
  color: var(--text-secondary);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background-color: var(--subcard-bg);
  border: 1px solid var(--border-strong);
  padding: 5px 13px;
  border-radius: 4px;
  transition: border-color 0.15s, color 0.15s;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.communities-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-card {
  background-color: var(--subcard-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}

.community-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.community-icon {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background-color: var(--panel-bg);
  flex-shrink: 0;
}

.community-icon-fallback {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background-color: var(--panel-bg);
  color: var(--muted);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.community-info {
  flex: 1;
  min-width: 0;
}

.community-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.community-title a {
  color: var(--text);
  text-decoration: none;
}

.community-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.community-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.positions-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.position-row {
  display: flex;
  gap: 14px;
}

.position-track {
  width: 46px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.track-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--dot-inactive);
  border: 2px solid var(--subcard-bg);
  box-shadow: 0 0 0 1.5px var(--dot-inactive);
  margin-top: 6px;
  z-index: 1;
  flex-shrink: 0;
}

.position-row.is-current .track-dot {
  background-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.track-line {
  width: 2px;
  flex: 1;
  background-color:
