html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.roadmap-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.roadmap-hero,
.roadmap-card {
  border-radius: 24px;
  padding: 24px;
}

.roadmap-hero {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.roadmap-hero__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  position: relative;
  min-height: 56px;
  width: 100%;
}

.roadmap-hero__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  position: static;
  transform: none;
  justify-self: center;
}

.roadmap-hero__top .logout-btn2 {
  position: relative;
  z-index: 1;
  justify-self: start;
}

.roadmap-intro {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.roadmap-intro h1 {
  font-family: 'Lobster', cursive;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  color: var(--primary-color);
}

.roadmap-intro p {
  color: var(--text-light);
  max-width: 72ch;
  text-align: left;
}

.roadmap-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.roadmap-card__head h2 {
  font-family: 'Lobster', cursive;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--primary-dark);
  letter-spacing: 0.02em;
}

.roadmap-hint {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(128, 36, 51, 0.08);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.88rem;
}

.roadmap-timeline {
  min-height: 190px;
  padding: 0 0 12px;
  margin: 0 -4px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 36, 51, 0.45) transparent;
}

.roadmap-timeline.is-dragging {
  cursor: grabbing;
}

.roadmap-timeline::-webkit-scrollbar {
  height: 8px;
}

.roadmap-timeline::-webkit-scrollbar-thumb {
  background: rgba(128, 36, 51, 0.45);
  border-radius: 999px;
}

.timeline-canvas {
  position: relative;
  min-height: 190px;
  width: max(1300px, 135%);
  padding: 20px 28px 34px;
}

.timeline-track {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 86px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9b0ba, var(--primary-color));
}

.timeline-node {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  width: 148px;
  height: 170px;
  display: block;
  color: var(--text-color);
  cursor: pointer;
}

.timeline-node::before,
.timeline-node::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.timeline-node::before {
  content: attr(data-top);
  top: 28px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--primary-dark);
}

.timeline-node::after {
  content: attr(data-bottom);
  top: 108px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-light);
}

.node-dot {
  position: absolute;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 0 8px rgba(128, 36, 51, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.timeline-node:hover .node-dot,
.timeline-node:focus-visible .node-dot,
.timeline-node.is-active .node-dot {
  transform: translateX(-50%) scale(1.08);
  background: var(--primary-color);
  box-shadow: 0 0 0 10px rgba(128, 36, 51, 0.18);
}

.timeline-node:hover::after,
.timeline-node:focus-visible::after,
.timeline-node.is-active::after {
  color: var(--primary-dark);
}

.roadmap-detail {
  margin-top: 14px;
  border: 1px solid rgba(128, 36, 51, 0.2);
  background: linear-gradient(160deg, #fff, #fff5f7);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.roadmap-detail__status {
  display: inline-flex;
  width: fit-content;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(130deg, var(--primary-color), var(--primary-dark));
}

.roadmap-detail h3 {
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.changelog-list {
  display: grid;
  gap: 14px;
}

.changelog-item {
  border: 1px solid rgba(128, 36, 51, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(155deg, #fff, #fffbfc);
}

.changelog-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.changelog-item h3 {
  color: var(--primary-dark);
  font-size: 1.04rem;
}

.changelog-item ul {
  padding-left: 20px;
  color: var(--text-color);
}

.changelog-tag {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(128, 36, 51, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
}

.changelog-points {
  margin: 0;
  padding: 18px 22px 18px 34px;
  border: 1px solid rgba(128, 36, 51, 0.18);
  border-radius: 18px;
  background: linear-gradient(155deg, #fff, #fffbfc);
  display: grid;
  gap: 10px;
}

.changelog-points li {
  color: var(--text-color);
  line-height: 1.55;
}

.deploy-calendar-wrap {
  display: grid;
  gap: 10px;
}

.deploy-calendar-help {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.deploy-calendar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max(84px, calc((100% - 60px) / 7));
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(128, 36, 51, 0.18);
  background: linear-gradient(155deg, #fff, #fffbfc);
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 36, 51, 0.45) transparent;
}

.deploy-calendar.is-dragging {
  cursor: grabbing;
}

.deploy-calendar::-webkit-scrollbar {
  height: 7px;
}

.deploy-calendar::-webkit-scrollbar-thumb {
  background: rgba(128, 36, 51, 0.45);
  border-radius: 999px;
}

.deploy-day {
  border: 1px solid rgba(128, 36, 51, 0.25);
  background: #fff;
  border-radius: 14px;
  min-height: 78px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--primary-dark);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.deploy-day__weekday {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deploy-day__number {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.deploy-day:hover,
.deploy-day:focus-visible,
.deploy-day.is-active {
  transform: translateY(-1px);
  background: linear-gradient(140deg, #9b3044, #7e2233);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(128, 36, 51, 0.28);
}

.deploy-log {
  margin-top: 12px;
  border: 1px solid rgba(128, 36, 51, 0.2);
  border-radius: 18px;
  background: linear-gradient(160deg, #fff, #fff5f7);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.deploy-log__title {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.06rem;
}

.deploy-log__list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.deploy-log__empty {
  margin: 0;
  color: var(--text-light);
  font-weight: 500;
}

body.dark-mode .roadmap-hero,
body.dark-mode .roadmap-card {
  background: rgba(16, 16, 18, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .roadmap-intro h1,
body.dark-mode .roadmap-card__head h2,
body.dark-mode .roadmap-detail h3,
body.dark-mode .changelog-item h3 {
  color: #ffd7de;
}

body.dark-mode .roadmap-intro p,
body.dark-mode .changelog-item ul {
  color: #e0d8db;
}

body.dark-mode .roadmap-hint {
  background: rgba(255, 255, 255, 0.12);
  color: #ffe9ed;
}

body.dark-mode .timeline-track {
  background: linear-gradient(90deg, #685058, #d8aab5);
}

body.dark-mode .node-dot {
  background: #0f0f11;
  border-color: #f3bec8;
  box-shadow: 0 0 0 8px rgba(243, 190, 200, 0.15);
}

body.dark-mode .timeline-node:hover .node-dot,
body.dark-mode .timeline-node:focus-visible .node-dot,
body.dark-mode .timeline-node.is-active .node-dot {
  background: #f3bec8;
}

body.dark-mode .timeline-node::before {
  color: #ffd7de;
}

body.dark-mode .timeline-node::after {
  color: #dfd0d4;
}

body.dark-mode .timeline-node:hover::after,
body.dark-mode .timeline-node:focus-visible::after,
body.dark-mode .timeline-node.is-active::after {
  color: #ffd7de;
}

body.dark-mode .roadmap-detail,
body.dark-mode .changelog-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .changelog-points {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .changelog-points li {
  color: #e0d8db;
}

body.dark-mode .deploy-calendar {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .deploy-calendar-help {
  color: #dfd0d4;
}

body.dark-mode .deploy-day {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffd7de;
}

body.dark-mode .deploy-day:hover,
body.dark-mode .deploy-day:focus-visible,
body.dark-mode .deploy-day.is-active {
  background: linear-gradient(140deg, #f0b6c2, #cc8b9a);
  color: #230910;
}

body.dark-mode .deploy-log {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .deploy-log__title {
  color: #ffd7de;
}

body.dark-mode .deploy-log__list li,
body.dark-mode .deploy-log__empty {
  color: #e0d8db;
}

@media (max-width: 900px) {
  .roadmap-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .roadmap-timeline {
    min-height: 170px;
  }

  .timeline-canvas {
    min-height: 170px;
  }

  .timeline-node {
    width: 132px;
  }
}

@media (max-width: 640px) {
  .roadmap-page {
    padding: 16px 12px 24px;
    gap: 14px;
  }

  .roadmap-hero,
  .roadmap-card {
    padding: 16px;
    border-radius: 18px;
  }

  .roadmap-timeline {
    padding-bottom: 10px;
  }

  .timeline-canvas {
    width: max(1020px, 170%);
    padding: 18px 16px 28px;
  }

  .timeline-track {
    left: 16px;
    right: 16px;
  }

  .roadmap-hero__top {
    align-items: flex-start;
    min-height: auto;
  }

  .roadmap-hero__brand {
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: auto;
  }

  .timeline-node {
    width: 118px;
    height: 154px;
  }

  .timeline-node::before {
    top: 22px;
    font-size: 0.8rem;
  }

  .timeline-node::after {
    top: 98px;
    font-size: 0.82rem;
  }

  .node-dot {
    top: 68px;
  }

  .changelog-item header {
    flex-direction: column;
    align-items: flex-start;
  }

  .deploy-calendar {
    grid-auto-columns: max(78px, calc((100% - 48px) / 7));
  }
}
