/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Hide static content when JS is enabled */
.js-enabled .static-content {
  display: none !important;
}

/* Show timeline section by default for no-JS preview */
body:not(.js-enabled) #timeline-section {
  display: flex !important;
}

body:not(.js-enabled) #loading-state {
  display: none !important;
}

/* Ensure static content is visible when JS is disabled */
body:not(.js-enabled) .static-content {
  display: block;
}

body:not(.js-enabled) .static-content.timeline-item {
  display: flex;
}

body:not(.js-enabled) .static-content.chip {
  display: inline-flex;
}

body:not(.js-enabled) .static-content.decade-wrapper {
  display: flex;
}

/* Timeline Wrapper */
.timeline-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styles */
.sidebar-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 7.5rem;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  scroll-behavior: smooth;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem 0.5rem;
  height: 100vh;
  max-height: 100vh;
  transition: all 0.5s;
}

.sidebar-content.justify-start {
  justify-content: flex-start;
}

.sidebar-title {
  position: sticky;
  top: 0;
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
  padding: 0.75rem 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #ffffff;
  z-index: 10;
  flex-shrink: 0;
}

.decade-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: all 0.3s;
  position: relative;
  box-sizing: border-box;
  margin-bottom: 0.25rem;
}

.decade-wrapper-expanded {
  border: 2px solid #2563eb;
  border-radius: 0.75rem;
  background-color: #eff6ff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
  padding: 0.25rem 0.25rem 0.5rem;
}

.decade-btn {
  width: 100%;
  padding: 0.75rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s;
  border-width: 2px;
  border-style: solid;
  cursor: pointer;
  border-radius: 0.5rem;
  background: white;
}

.expanded-decade-btn {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.inactive-decade-btn {
  color: #6b7280;
  border-color: transparent;
}

.inactive-decade-btn:hover {
  background-color: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.inactive-expanded-decade-btn {
  border-color: #93c5fd;
  color: #1d4ed8;
  background-color: #eff6ff;
}

.year-list {
  padding: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  /* animation: slideIn 0.3s ease-out; */
  box-shadow: inset 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.year-item-wrapper {
  width: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  box-sizing: border-box;
}

.year-buttons-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 0.3rem;
  align-items: center;
}

.year-btn {
  width: 100%;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.active-year-btn {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 0 0 2px #bfdbfe;
  font-weight: 700;
}

.inactive-year-btn {
  color: #6b7280;
}

.inactive-year-btn:hover {
  color: #2563eb;
  border-color: #93c5fd;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.year-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
}

.year-btn-disabled:hover {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
}

.year-video-btn {
  width: 100%;
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 6px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: visible;
  box-sizing: border-box;
  padding: 0.5rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.year-video-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(37, 99, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: rgba(255, 255, 255, 0.3);
}

.year-video-btn-text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  width: 100%;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

.spacer {
  height: 40vh;
  flex-shrink: 0;
}

/* Timeline Container */
.timeline-container {
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  overflow: hidden;
}

/* Filters */
.desktop-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.5rem;
  flex-shrink: 0;
}

.mobile-filters {
  display: none;
  padding: 0.5rem;
  flex-shrink: 0;
}

.mobile-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
}

.mobile-filters .category_selector {
  width: 100%;
}

.mobile-filters .category_row {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.mobile-filters .category_row__label-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  justify-content: space-between;
}

.filter-col {
  flex: 1;
  max-width: 50%;
}

.category-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* Category Selector Styles from tag-sample2.html */
:root {
  --border: #d1d5db;
  --border_soft: #e5e7eb;
  --text: #111827;
  --muted: #4b5563;
  --muted2: #6b7280;
  --bg: #ffffff;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --panel_gap: 0px;
  --active_border: #2563eb;
  --chip_on_bg: rgba(37, 99, 235, 0.12);
  --chip_on_border: rgba(37, 99, 235, 0.35);
  --chip_on_text: #1d4ed8;
  --count_bg: #f3f4f6;
  --count_border: #e5e7eb;
  --count_text: #6b7280;
  --backdrop: rgba(0, 0, 0, 0.22);
}

.category_selector {
  position: relative;
  width: 100%;
  min-width: 0;
}

.category_row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

/* Desktop: reduce selector width to balance with count display */
.desktop-filters .category_row {
  grid-template-columns: 70px 1fr;
  max-width: 60%;
  flex: 0 1 auto;
}

.category_row__label-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.category_row__label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.mobile-filters .category_row__label-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.category_row__control {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.category_row__control:focus,
.category_row__control:focus-visible {
  outline: none;
}

.category_row__control.is_open {
  border-color: var(--active_border);
  box-shadow: none;
  position: relative;
  z-index: 1000;
  background: #fff;
}

.category_row__left {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.3;
}

.category_row__right {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
}

.category_row__icon {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted2);
  margin-left: 2px;
}

.category_row__control.connect_bottom.is_open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.category_panel.connect_bottom.is_open {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.category_row__control.connect_top.is_open {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-color: transparent;
}

.category_panel.connect_top.is_open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.category_panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  border: 1px solid var(--border_soft);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  z-index: 999;
  overflow: hidden;
  max-height: calc(100dvh - 24px);
}

.category_panel.is_open {
  display: block;
  border-color: var(--active_border);
}

.category_panel__header {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.category_panel__title {
  font-size: 13px;
  margin-bottom: 10px;
}

.category_panel__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Mobile dialog: actions below selector */
.filter-dialog-body .category_panel__actions {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 0;
}

.chip_area {
  padding: 10px 12px 12px;
}

.chip_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--muted2);
  flex: 0 0 auto;
}

.chip__label {
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.chip__count {
  margin-left: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--count_border);
  background: var(--count_bg);
  color: var(--count_text);
  font-size: 12px;
  line-height: 1;
}

.chip.is_on {
  background: var(--chip_on_bg);
  border-color: var(--chip_on_border);
}

.chip.is_on .chip__dot {
  border-color: var(--chip_on_text);
  background: var(--chip_on_text);
}

.chip.is_on .chip__label {
  color: var(--chip_on_text);
  font-weight: 600;
}

.chip.is_on .chip__count {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.08);
  color: var(--count_text);
}

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 998;
}

.backdrop.is_open {
  display: block;
}

/* Multi-select Component Styles from multi-select.html */
.selectMultiple {
  width: 100%;
  position: relative;
}

.selectMultiple select {
  display: none;
}

.selectMultiple > div {
  position: relative;
  z-index: 2;
  padding: 8px 35px 2px 12px;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  min-height: 44px;
  box-shadow: 0 4px 16px 0 rgba(22, 42, 90, 0.12);
  transition: box-shadow 0.15s ease;
  cursor: pointer;
}

.selectMultiple > div:hover {
  box-shadow: 0 4px 24px -1px rgba(22, 42, 90, 0.16);
}

.selectMultiple > div .arrow {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 24px;
  height: 24px;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1976d2;
  transition: transform 0.15s ease;
  pointer-events: none;
}

.selectMultiple > div .arrow .material-symbols-outlined {
  font-size: 20px;
  transition: transform 0.15s ease;
}

.selectMultiple.open > div .arrow .material-symbols-outlined {
  transform: rotate(180deg);
}

.selectMultiple .placeholder {
  color: #99a3ba;
  display: block;
  position: absolute;
  left: 12px;
  cursor: pointer;
  top: 8px;
  line-height: 28px;
  transition: all 0.15s ease;
  pointer-events: none;
}

.selectMultiple .placeholder.hide {
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, 0);
}

.selectMultiple > div a {
  position: relative;
  padding: 0 24px 6px 8px;
  line-height: 28px;
  color: #1e2330;
  display: inline-block;
  vertical-align: top;
  margin: 0 6px 0 0;
}

.selectMultiple > div a em {
  font-style: normal;
  display: block;
  white-space: nowrap;
}

.selectMultiple > div a:before {
  content: "";
  left: 0;
  top: 0;
  bottom: 6px;
  width: 100%;
  position: absolute;
  display: block;
  background: rgba(25, 118, 210, 0.15);
  z-index: -1;
  border-radius: 4px;
}

.selectMultiple > div a i {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 28px;
  display: block;
}

.selectMultiple > div a.more-tag {
  cursor: default;
  padding: 0 12px 6px 12px;
}

.selectMultiple > div a.more-tag i {
  display: none;
}

.selectMultiple > div a.more-tag:before {
  background: rgba(25, 118, 210, 0.25);
}

.selectMultiple > div a i:before,
.selectMultiple > div a i:after {
  content: "";
  display: block;
  width: 2px;
  height: 10px;
  position: absolute;
  left: 50%;
  top: 50%;
  background: #1976d2;
  border-radius: 1px;
}

.selectMultiple > div a i:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.selectMultiple > div a i:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.selectMultiple > div a.notShown {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.selectMultiple > div a.notShown:before {
  width: 28px;
  transition: width 0.25s cubic-bezier(0.87, -0.41, 0.19, 1.44) 0.1s;
}

.selectMultiple > div a.notShown i {
  opacity: 0;
  transition: all 0.15s ease 0.15s;
}

.selectMultiple > div a.notShown em {
  opacity: 0;
  transform: translate(-6px, 0);
  transition: all 0.2s ease 0.15s;
}

.selectMultiple > div a.notShown.shown {
  opacity: 1;
}

.selectMultiple > div a.notShown.shown:before {
  width: 100%;
}

.selectMultiple > div a.notShown.shown i {
  opacity: 1;
}

.selectMultiple > div a.notShown.shown em {
  opacity: 1;
  transform: translate(0, 0);
}

.selectMultiple > div a.remove {
  pointer-events: none;
}

.selectMultiple > div a.remove:before {
  width: 28px;
  transition: width 0.2s cubic-bezier(0.87, -0.41, 0.19, 1.44) 0s;
}

.selectMultiple > div a.remove i {
  opacity: 0;
  transition: all 0.15s ease 0s;
}

.selectMultiple > div a.remove em {
  opacity: 0;
  transform: translate(-12px, 0);
  transition: all 0.2s ease 0s;
}

.selectMultiple > div a.remove.disappear {
  opacity: 0;
  transition: opacity 0.25s ease 0s;
}

.selectMultiple > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  z-index: 1;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  visibility: hidden;
  opacity: 0;
  border-radius: 8px;
  transform: translate(0, 20px) scale(0.8);
  transform-origin: 0 0;
  box-shadow: 0 12px 20px rgba(22, 42, 90, 0.08);
  transition: all 0.2s ease,
    transform 0.2s cubic-bezier(0.87, -0.41, 0.19, 1.44),
    filter 0.15s ease 0.1s;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

.selectMultiple > ul li {
  color: #1e2330;
  background: #fff;
  padding: 12px 16px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  /* transition: background 0.15s ease, color 0.15s ease,
    transform 0.15s ease 0.15s, opacity 0.2s ease 0.15s,
    border-radius 0.15s ease; */
}

.selectMultiple > ul li:first-child {
  border-radius: 8px 8px 0 0;
}

.selectMultiple > ul li:first-child:last-child {
  border-radius: 8px;
}

.selectMultiple > ul li:last-child {
  border-radius: 0 0 8px 8px;
}

.selectMultiple > ul li:last-child:first-child {
  border-radius: 8px;
}

.selectMultiple > ul li:hover {
  background: #1976d2;
  color: #fff;
}

.selectMultiple > ul li.selected {
  background: #e3f2fd;
  padding-right: 36px;
  position: relative;
}

.selectMultiple > ul li.selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: bold;
  color: #1976d2;
  width: auto;
  height: auto;
  background: transparent;
  opacity: 1;
  border-radius: 0;
}

.selectMultiple > ul li.selected:hover {
  background: #1976d2;
  color: #fff;
}

.selectMultiple > ul li.selected:hover::after {
  color: #fff;
}

.selectMultiple.open > div {
  box-shadow: 0 4px 20px -1px rgba(22, 42, 90, 0.12);
}

.selectMultiple.open > ul {
  transform: translate(0, 12px) scale(1);
  opacity: 1;
  visibility: visible;
  filter: drop-shadow(0 16px 24px rgba(22, 42, 90, 0.16));
}

/* Scrollbar styles for multi-select dropdown */
.selectMultiple > ul::-webkit-scrollbar {
  width: 8px;
}

.selectMultiple > ul::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 8px;
}

.selectMultiple > ul::-webkit-scrollbar-thumb {
  background-color: rgba(25, 118, 210, 0.3);
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.selectMultiple > ul::-webkit-scrollbar-thumb:hover {
  background-color: rgba(25, 118, 210, 0.5);
}

.selectMultiple > ul {
  /* scrollbar-width: thin; */
  scrollbar-width: none;
  scrollbar-color: rgba(25, 118, 210, 0.3) #f1f1f1;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 1;
  }
  25% {
    transform: scale(30, 30);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(50, 50);
  }
}

@keyframes scale-up {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Legacy multi-select styles - keeping for compatibility */
.multi-select-container {
  position: relative;
  width: 100%;
}

.select-btn {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
  transition: all 0.3s;
}

.select-btn:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.select-btn.open {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.select-btn .btn-text {
  font-size: 14px;
  font-weight: 400;
  color: #333;
}

.select-btn .arrow-dwn {
  display: flex;
  height: 21px;
  width: 21px;
  color: #757575;
  font-size: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.select-btn.open .arrow-dwn {
  transform: rotate(-180deg);
}

.list-items {
  position: absolute;
  margin-top: 8px;
  border-radius: 8px;
  padding: 8px;
  background-color: #fff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  width: 100%;
  z-index: 1000;
  border: 1px solid #e5e5e5;
}

.select-btn.open ~ .list-items {
  display: block;
}

.list-items::-webkit-scrollbar {
  width: 8px;
  height: 0;
}

.list-items::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.list-items::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.list-items .item {
  display: flex;
  align-items: center;
  list-style: none;
  height: 40px;
  cursor: pointer;
  transition: 0.3s;
  padding: 0 12px;
  border-radius: 8px;
}

.list-items .item:hover {
  background-color: #e3f2fd;
}

.item .item-text {
  font-size: 14px;
  font-weight: 400;
  color: #333;
}

.item .checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  width: 16px;
  border-radius: 4px;
  margin-right: 12px;
  border: 1.5px solid #c0c0c0;
  transition: all 0.3s ease-in-out;
  flex-shrink: 0;
}

.item.checked .checkbox {
  background-color: #1976d2;
  border-color: #1976d2;
}

.checkbox .check-icon {
  color: #fff;
  font-size: 11px;
  transform: scale(0);
  transition: all 0.2s ease-in-out;
}

.item.checked .check-icon {
  transform: scale(1);
}

.mobile-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  gap: 0.5rem;
}

.filter-btn {
  width: 35px;
  height: 35px;
  border-radius: 4px;
  border: none;
  background-color: #1976d2;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-btn:hover {
  background-color: #1565c0;
}

.count-display {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.count-number {
  font-size: 18px;
  font-weight: 600;
  color: #212121;
}

.count-text {
  font-size: 14px;
  color: #757575;
  white-space: nowrap;
}

/* Filter Dialog */
.filter-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.filter-dialog.show {
  display: flex;
}

.filter-dialog-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.filter-dialog-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
}

.filter-dialog-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #757575;
}

.close-btn:hover {
  color: #212121;
}

.filter-dialog-body {
  padding: 1rem;
  /* overflow-y: auto; */
  flex: 1;
}

.filter-dialog-actions {
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background-color: #fafafa;
  border-top: 1px solid #e5e5e5;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background-color: #1976d2;
  color: white;
}

.btn-primary:hover {
  background-color: #1565c0;
}

.btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.btn--primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #757575;
  color: white;
}

.btn-secondary:hover {
  background-color: #616161;
}

/* Loading and Error States */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex: 1;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: 1rem;
  font-size: 16px;
  color: #757575;
}

.error-state {
  padding: 1rem;
  flex: 1;
}

.error-alert {
  background-color: #ffebee;
  border: 1px solid #ef5350;
  border-radius: 4px;
  padding: 1rem;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #c62828;
  margin-bottom: 0.5rem;
}

.error-message {
  color: #c62828;
}

/* Timeline Section */
.timeline-section {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.timeline-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  position: relative;
}

/* Timeline Item Styles */
.timeline-item {
  display: flex;
  position: relative;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.timeline-item::before {
  background: #dadee4;
  content: '';
  height: 100%;
  left: 14px;
  position: absolute;
  top: 0;
  width: 2px;
  z-index: -1;
}

.timeline-item.timeline-item-selected .info-card {
  border-color: #1976d2 !important;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3) !important;
}

.timeline-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-icon-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.badge {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge .material-symbols-outlined {
  font-size: 16px;
  color: white;
}

.label-priority-low {
  background-color: #66bb6a;
  color: white;
}

.label-priority-medium {
  background-color: #ffa726;
  color: white;
}

.label-priority-important {
  background-color: #f44336;
  color: white;
}

.timeline-content {
  flex: 1 1 auto;
  padding: 0 0 0 1rem;
}

.info-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid transparent;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  background-color: #fafafa;
}

.card-header-only {
  padding: 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.header-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-icon {
  color: #757575;
  font-size: 16px;
}

.date-text {
  font-size: 16px;
  font-weight: 400;
}

.header-title-section {
  flex: 1;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #212121;
  line-height: 1.3;
}

.header-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-chip {
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.category-chip .material-symbols-outlined {
  font-size: 14px;
}

.header-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 6px 12px;
  border: 1px solid #1976d2;
  background: white;
  color: #1976d2;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  background-color: #e3f2fd;
}

.card-body {
  padding: 20px;
}

.info-section {
  margin-bottom: 24px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #424242;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-content {
  font-size: 14px;
  color: #616161;
  line-height: 1.6;
}

.info-field {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.info-field:last-child {
  margin-bottom: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 960px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #757575;
  min-width: 80px;
  flex-shrink: 0;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.info-chip {
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  background-color: #1976d2;
  color: white;
  display: inline-block;
}

.info-chip.clickable-chip {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  user-select: none;
}

.info-chip.clickable-chip:hover {
  background-color: #1565c0;
  transform: translateY(-1px);
}

.info-chip.clickable-chip:active {
  transform: translateY(0);
  background-color: #0d47a1;
}

.info-chip.clickable-chip:focus {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}

/* Photo Styles */
.photo-carousel {
  border-radius: 4px;
  overflow: hidden;
  height: 300px;
  position: relative;
  background-color: #f5f5f5;
}

.photo-image-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.photo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.photo-counter {
  font-size: 12px;
  color: #757575;
  text-align: center;
  margin-top: 8px;
}

/* Dialog Styles */
.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dialog-overlay.show {
  display: flex;
}

.dialog-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dialog-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.dialog-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212121;
}

.dialog-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 400px;
  max-height: 70vh;
}

.dialog-actions {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  background-color: #fafafa;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.detail-html-content {
  padding: 16px;
  line-height: 1.6;
  color: #333;
}

.detail-html-content h1,
.detail-html-content h2,
.detail-html-content h3,
.detail-html-content h4,
.detail-html-content h5,
.detail-html-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.detail-html-content p {
  margin-bottom: 1em;
}

.detail-html-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1em 0;
}

.detail-html-content a {
  color: #1976d2;
  text-decoration: none;
}

.detail-html-content a:hover {
  text-decoration: underline;
}

.detail-html-content ul,
.detail-html-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

.detail-html-content li {
  margin-bottom: 0.5em;
}

.detail-html-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.detail-html-content th,
.detail-html-content td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.detail-html-content th {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* Photo Viewer Styles */
.photo-viewer-content {
  max-width: 1400px;
}

.photo-viewer-body {
  display: flex;
  flex-direction: row;
  padding: 0;
  min-height: 0;
  flex: 1;
}

.photo-viewer-left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
  overflow-y: auto;
}

.main-photo-wrapper {
  position: relative;
  width: 100%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-photo-container {
  width: 100%;
  height: 100%;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.main-photo {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  transition: opacity 0.3s ease-in-out;
}

.photo-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-nav-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.photo-nav-btn-left {
  left: 16px;
}

.photo-nav-btn-right {
  right: 16px;
}

.photo-counter-overlay {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
}

.thumbnail-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: #1976d2 #f5f5f5;
}

.thumbnail-container::-webkit-scrollbar {
  height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
  background: #1976d2;
  border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb:hover {
  background: #1565c0;
}

.thumbnail-item {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thumbnail-item:hover {
  border-color: #1976d2;
  /* transform: scale(1.03); */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.active {
  border-color: #1976d2;
  border-width: 3px;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-viewer-right {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid #e5e5e5;
}

.photo-info-card {
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.photo-info-card-title {
  background-color: #fafafa;
  font-size: 18px;
  font-weight: 600;
  color: #212121;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e5e5e5;
}

.photo-info-card-content {
  padding: 16px;
}

.photo-info-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.photo-info-item:last-child {
  margin-bottom: 0;
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #1976d2;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.scroll-to-top-btn:hover {
  background-color: #1565c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Category Chip Colors */
.category-chip.category-DIARY {
  background-color: #00897b;
}

.category-chip.category-NEWS {
  background-color: #d32f2f;
}

.category-chip.category-DISC {
  background-color: #f57c00;
}

.category-chip.category-CONCERT {
  background-color: #7b1fa2;
}

.category-chip.category-RECORDING {
  background-color: #1976d2;
}

.category-chip.category-REHEARSAL {
  background-color: #388e3c;
}

.category-chip.category-MOVIE {
  background-color: #e64a19;
}

.category-chip.category-MEDIA {
  background-color: #0097a7;
}

.category-chip.category-EVENT {
  background-color: #fbc02d;
}

.category-chip.category-SONGS {
  background-color: #c2185b;
}

.category-chip.category-BOOK {
  background-color: #5d4037;
}

.category-chip.category-子供時代 {
  background-color: #81d4fa;
}

.category-chip.category-中高生でアマチュアバンド時代 {
  background-color: #7986cb;
}

.category-chip.category-大学生・大学院生時代でアマチュアバンド時代 {
  background-color: #9575cd;
}

.category-chip.category-オフコース時代 {
  background-color: #78909c;
}

.category-chip.category-ソロ時代 {
  background-color: #ba68c8;
}

/* Responsive Styles for Category Selector */
@media (max-width: 640px) {
  .category_row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .category_row__control {
    padding: 12px 12px;
  }

  .chip_grid {
    gap: 8px;
  }

  .chip {
    padding: 11px 10px 11px 12px;
  }
}

/* Responsive Styles */
@media (max-width: 479px) {
  .desktop-filters {
    display: none;
  }

  .mobile-filters {
    display: block;
  }

  .sidebar-container {
    width: 4rem;
  }

  .sidebar-content {
    padding: 0.75rem 0.25rem;
  }

  .decade-wrapper-expanded {
    padding: 0.2rem 0.15rem 0.4rem;
  }

  .decade-btn {
    padding: 0.5rem 0.2rem;
    font-size: 0.7rem;
  }

  .year-list {
    padding: 0.4rem 0 0;
    gap: 0.3rem;
  }

  .year-btn {
    width: 88%;
    padding: 0.35rem 0;
    font-size: 0.7rem;
  }

  .year-item-wrapper {
    width: 88%;
  }

  .year-video-btn {
    padding: 0.2rem 0.05rem;
    font-size: 0.35rem;
    gap: 0.05rem;
    min-height: auto;
    border-width: 1px;
  }

  .year-video-btn .material-symbols-outlined {
    font-size: 0.5rem !important;
    width: 0.5rem !important;
    height: 0.5rem !important;
    line-height: 0.5rem !important;
  }

  .year-video-btn-text {
    font-size: 0.35rem !important;
    padding: 0;
    line-height: 1;
    letter-spacing: 0;
  }

  .timeline-item .timeline-icon .badge {
    width: 20px;
    height: 20px;
  }

  .timeline-item .timeline-content {
    padding: 0 0 0 0.5rem !important;
  }

  .timeline-item::before {
    left: 9px;
  }

  .timeline-list {
    padding: 10px;
  }

  .header-date {
    font-size: 12px;
  }

  .card-header {
    padding: 15px;
  }

  .header-right {
    align-items: flex-start;
  }

  .card-body {
    padding: 15px;
  }

  .section-title {
    margin-bottom: 8px;
  }

  .info-section {
    margin-bottom: 12px;
  }

  .photo-carousel {
    height: 200px !important;
  }

  .photo-viewer-body {
    flex-direction: column;
  }

  .photo-viewer-left {
    flex: 1;
  }

  .photo-viewer-right {
    border-left: none;
    border-top: 1px solid #e5e5e5;
  }

  .thumbnail-item {
    width: 60px;
    height: 60px;
  }

  .photo-nav-btn {
    width: 38px;
    height: 38px;
  }

  .photo-counter-overlay {
    padding: 4px 8px;
  }

  .photo-info-card-title {
    padding: 10px;
  }

  .photo-info-card-content {
    padding: 10px;
  }

  .scroll-to-top-btn {
    width: 40px;
    height: 40px;
    bottom: 12px;
    right: 12px;
  }
}

@media (min-width: 600px) and (max-width: 959px) {
  .scroll-to-top-btn {
    width: 48px;
    height: 48px;
    bottom: 12px;
    right: 12px;
  }
}

@media (min-width: 992px) {
  .sidebar-container {
    width: 13rem;
  }
}

@media (max-width: 991px) {
  .year-buttons-container {
    flex-direction: column;
    gap: 0;
  }

  .year-buttons-container .year-btn {
    border-radius: 0.375rem 0.375rem 0 0;
    width: 100%;
  }

  .year-buttons-container .year-video-btn {
    border-radius: 0 0 0.375rem 0.375rem;
    width: 100%;
    gap: 0.3rem;
  }
}
