body {
  font-family: sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #fff9e6 0%, #ffffff 100%);
}

.year-color-0 { background: #ffdfb0; }
.year-color-1 { background: #d3d8ec; }
.year-color-2 { background: #ffe1b0; }
.year-color-3 { background: #ebe4ff; }
.year-color-4 { background: #ffdfee; }

#timeline-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}
#timeline-years {
  flex: 0 0 80px;
  position: relative;
  margin-right: 0;
}
#timeline-months {
  flex: 1 1 0%;
}
.year-block {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  margin-bottom: 0;
  justify-content: center;
}
.timeline-year-label {
  position: sticky;
  left: 0;
  top: 0;
  align-self: flex-start;
  min-width: 60px;
  max-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: #e0e0e0;
  writing-mode: vertical-rl;
  text-align: center;
  pointer-events: none;
  user-select: none;
  letter-spacing: 2px;
  z-index: 2;
  transition: top 0.2s;
  margin-bottom: 0;
  height: auto;
}
.year-months {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
}
.month {
  display: flex;
  align-items: flex-start;
  width: 500px;
  text-align: left;
  border-top: 1px solid #ddd;
  border-left: none;
  padding: 5px 10px;
  box-sizing: border-box;
  font-size: 12px;
  color: #555;
  /* background: #fff; */
  position: relative;
  margin-bottom: 24px;
  min-height: 40px;
  transition: min-height 0.2s;
}
.month .month-label {
  margin-left: 8px;
  font-size: 11px;
  color: #888;
}
.memory-count-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.memory-list {
  margin-left: 30px;
  min-height: 32px;
}
.add-memory-btn {
  margin-right: 10px;
  font-size: 14px;
  background: #e0f7fa;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
}
.add-memory-btn:hover {
  background: #b2ebf2;
}
.add-memory-prompt {
  font-size: 12px;
  color: #00838f;
  margin-right: 8px;
  font-weight: 500;
  display: inline-block;
  vertical-align: middle;
}
.memory-dot {
  position: absolute;
  left: 100px;
  width: 10px;
  height: 10px;
  background: teal;
  border-radius: 50%;
}
#memory-form {
  margin-top: 20px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  min-width: 260px;
  position: absolute;
  z-index: 1000;
  cursor: default;
}
#memory-form-header {
  cursor: move;
  font-weight: bold;
  margin-bottom: 8px;
  user-select: none;
}
#memory-date-label {
  font-weight: bold;
  color: #333;
}
#memory-date-input {
  margin-bottom: 8px;
  width: 90%;
}
#timeline-outer {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
}
.memory-image {
  max-width: 500px;
  width: 100%;
  height: auto;
  display: block;
}
#timeline-images {
  position: absolute;
  left: 600px;
  top: 0;
  width: 500px;
  height: 100%;
}
.timeline-image-absolute {
  position: absolute;
  left: 0;
  width: 500px;
  max-width: 500px;
  height: auto;
  z-index: 1;
} 