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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #111111;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
  min-width: 0;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  min-width: 150px;
  flex-shrink: 0;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 32px 0 48px;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
  position: relative;
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
}

/* ── Timeline wrap ── */
.timeline-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  padding: 20px 0 20px 52px;
}

/* ── Track ── */
.tl-track {
  position: relative;
  width: 2px;
  background: #d8d8d8;
  border-radius: 1px;
  cursor: pointer;
}

.tl-fill {
  display: none;
}

.tl-thumb {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #111;
  border-radius: 1px;
  cursor: grab;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  z-index: 2;
}

.tl-thumb:active,
.tl-thumb.dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) rotate(45deg) scale(1.4);
  box-shadow: 0 0 0 5px rgba(0,0,0,0.07);
}

/* ── Tick marks ── */
.tl-tick {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 1px;
  background: #c8c8c8;
  pointer-events: none;
}

.tl-tick-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: #ccc;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s;
}

/* ── Tooltip (follows thumb, anchored inside track) ── */
.tl-tooltip {
  position: absolute;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: none;
  transform: translateY(-50%);
  white-space: nowrap;
}

.tl-tooltip-day {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111;
  line-height: 1.2;
}

.tl-tooltip-date {
  font-size: 0.7rem;
  color: #666;
  line-height: 1.2;
}

/* ── End labels (top / bottom of track) ── */
.tl-label-end {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #999;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
}

.tl-label-top {
  bottom: calc(100% + 20px);
}

.tl-label-bottom {
  top: calc(100% + 20px);
}

/* ── Key hints (footer of main) ── */
.key-hints {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.key-hints-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.key-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: #bbb;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #e4e4e4;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.65rem;
  color: #aaa;
  background: #fafafa;
  line-height: 1.5;
}

/* ── Main content ── */
main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 32px 32px 0;
  position: relative;
}

/* ── Page title (sticky header) ── */
.page-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.day-label {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.date-label {
  font-size: 0.95rem;
  color: #666;
}

/* ── Day sections (scrollable body) ── */
.day-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.day-sections::-webkit-scrollbar {
  display: none;
}

.day-section {
  opacity: 1;
}

.day-section--current {
  opacity: 1;
}

.day-section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.day-section--current .day-section-heading {
  padding-left: 14px;
  border-left: 4px solid #16a34a;
}

.ds-day {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.ds-date {
  font-size: 0.82rem;
  color: #888;
}

/* ── Photo strip (horizontal scroll) ── */
.photo-strip {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-strip img {
  flex-shrink: 0;
  width: min(180px, 40vw);
  height: min(180px, 40vw);
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.photo-strip img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.empty-state {
  color: #999;
  font-size: 0.9rem;
  padding: 16px 0;
}

/* ── About panel ── */
.about {
  width: 220px;
  flex-shrink: 0;
  border-left: 1px solid #e0e0e0;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: relative;
  transition: width 0.2s ease;
}

.about--collapsed {
  width: 40px !important;
  padding: 32px 0;
  overflow: hidden;
}

.about--collapsed .about-content {
  display: none;
}

/* ── About toggle button ── */
.about-toggle {
  position: absolute;
  top: 16px;
  left: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #bbb;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.about-toggle:hover {
  color: #111;
}

.about--collapsed .about-toggle {
  left: 50%;
  transform: translateX(-50%);
}

/* ── About content ── */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 20px;
}

.about-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
}

.about-bio {
  font-size: 0.8rem;
  line-height: 1.7;
  color: #666;
}

.about-contact {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.75rem;
  color: #999;
}

.about-contact a {
  color: #555;
  text-decoration: none;
}

.about-contact a:hover {
  text-decoration: underline;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-caption {
  position: fixed;
  top: 24px;
  left: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  pointer-events: none;
}

.lightbox-caption-day {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.lightbox-caption-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.lightbox-caption-num {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
}

/* ── Footer row ── */
.footer-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 16px 0 20px;
}

.footer-row .key-hints {
  padding: 0;
}

/* ── Mobile day nav buttons ── */
.day-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.day-nav-btn:active {
  background: #f0f0f0;
}

@media (max-width: 700px) {
}

/* ── Loading spinner ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 40px auto;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #e0e0e0;
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-text {
  font-size: 0.85rem;
  color: #999;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Sidebar toggle button ── */
.sidebar-toggle {
  position: absolute;
  top: 16px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #bbb;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sidebar-toggle:hover {
  color: #111;
}

.sidebar-toggle::after,
.about-toggle::after {
  content: attr(data-label);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.sidebar--collapsed .sidebar-toggle::after,
.about--collapsed .about-toggle::after {
  opacity: 1;
}

.sidebar--collapsed .sidebar-toggle {
  right: 50%;
  transform: translateX(50%);
}

.sidebar--collapsed .sidebar-content {
  display: none;
}

.sidebar--collapsed {
  width: 40px !important;
  min-width: 40px !important;
  padding: 16px 0;
}

/* ── Sidebar content ── */
.sidebar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-height: 0;
}
}

/* ── Responsive ── */

/* Hide about panel when viewport is too narrow to show it comfortably */
@media (max-width: 1000px) {
  .about {
    display: none;
  }
}

@media (max-width: 700px) {
  main {
    padding: 20px 16px 0;
  }

  .page-title {
    margin-bottom: 16px;
  }

  .day-label {
    font-size: 1.2rem;
  }
}
