:root {
  color-scheme: dark;
  --bg: #111315;
  --panel: #191c20;
  --panel-2: #22262c;
  --line: #343b45;
  --ink: #f3f5f7;
  --muted: #a9b1bb;
  --soft: #7d8792;
  --official: #7aa7ff;
  --community: #b491f0;
  --locked: #86ef45;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--community);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
}

h1, h2, p { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(34px, 5vw, 72px); line-height: 0.95; font-weight: 850; }
h2 { font-size: 16px; }
.topbar p { color: var(--muted); margin-top: 10px; }

.account {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(360px, 48vw);
}

.account-state {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.button, button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 8px 13px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover, button:hover { border-color: var(--community); }
.button.ghost { background: transparent; }
.hidden { display: none !important; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.official { background: var(--official); }
.dot.community { background: var(--community); }
.dot.locked { background: var(--locked); }

.notice {
  margin-bottom: 12px;
  border: 1px solid #714444;
  background: #251819;
  color: #ffb4b4;
  border-radius: 8px;
  padding: 10px 12px;
}

.notice.ok {
  border-color: #3e6c62;
  background: #152220;
  color: #9ee7da;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow-x: auto;
}

.month-axis {
  position: relative;
  min-width: 980px;
  height: 64px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.month {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 0 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 820;
  line-height: 1.05;
  opacity: 0.9;
}

.lane-label {
  min-width: 980px;
  color: var(--muted);
  font-weight: 800;
  margin: 10px 0 6px;
}

.timeline-lane {
  position: relative;
  min-width: 980px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 80px 100%,
    #d8d8d8;
  overflow: hidden;
}

.official-lane { background-color: #cfcfcf; }
.community-lane { background-color: #dcdcdc; }
.community-lane::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px dashed transparent;
  border-radius: 8px;
}
.community-lane:has(.roadmap-block-shell[draggable="true"])::after { border-color: rgba(180, 145, 240, 0.18); }

.roadmap-block-shell {
  --block-color: var(--community);
  position: absolute;
  top: 18px;
  height: 104px;
  min-width: 122px;
  z-index: 2;
  user-select: none;
}

.roadmap-block {
  height: 104px;
  min-width: 122px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 2px;
  padding: 12px 34px 8px 26px;
  color: #050607;
  background: var(--block-color);
  clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 50%, calc(100% - 38px) 100%, 0 100%, 28px 50%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.roadmap-block-shell[draggable="true"] {
  cursor: grab;
}

.roadmap-block-shell[draggable="true"]:active {
  cursor: grabbing;
  filter: brightness(1.08);
}

.roadmap-block-shell.official { opacity: 0.92; }
.roadmap-block-shell.locked {
  top: 22px;
  height: 96px;
  opacity: 0.78;
  z-index: 1;
}
.roadmap-block-shell.locked .roadmap-block { height: 96px; }
.roadmap-block-shell.community:not(.locked) { z-index: 2; }

.date-line {
  font-size: 11px;
  font-weight: 750;
  opacity: 0.72;
  white-space: nowrap;
}

.block-title {
  text-align: center;
  font-weight: 830;
  line-height: 1.18;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vote-badge {
  position: absolute;
  right: 22px;
  top: 8px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 850;
}

.remove-vote-btn {
  position: absolute;
  left: 30px;
  top: 8px;
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.62);
  color: #111;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.remove-vote-btn:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.48);
}

.voters {
  position: absolute;
  left: 10px;
  top: 112px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.voter-avatar, .voter-more {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--block-color);
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.voter-more {
  width: auto;
  padding: 0 6px;
  border-radius: 999px;
}

.muted-small {
  color: #4b5563;
  font-size: 11px;
  font-weight: 750;
}

.empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #374151;
  font-weight: 800;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.panel p { color: var(--muted); }

@media (max-width: 760px) {
  .shell { padding: 14px; }
  .topbar { display: grid; }
  .account {
    min-width: 0;
    justify-items: start;
  }
  .account-state { text-align: left; }
  .details-grid { grid-template-columns: 1fr; }
}
