/* Life Timeline — Карта: линия жизни, шкала, точки, кривые сфер, карточки событий на карте.
   Вынесено без изменений из app/life-timeline.html (строки 305–862 на 31.10.2026).
   Порядок подключения файлов важен: он повторяет исходный порядок правил. */
.life-path-wide {
  fill: none;
  stroke: rgba(240, 208, 154, .035);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.life-path {
  fill: none;
  stroke: url(#lifeGradient);
  stroke-width: .72;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.emotion-band {
  stroke: rgba(238, 243, 239, .045);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.emotion-band.zero {
  stroke: rgba(240, 208, 154, .105);
}

.emotion-label {
  fill: rgba(238, 243, 239, .44);
  font-size: 11px;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(8, 14, 18, .68);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.emotion-label.zero {
  fill: rgba(240, 208, 154, .64);
}

.year-axis {
  stroke: rgba(238, 243, 239, .18);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.year-tick {
  stroke: rgba(238, 243, 239, .34);
  stroke-width: .85;
  vector-effect: non-scaling-stroke;
}

.axis-detail-tick {
  stroke: rgba(238, 243, 239, .18);
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}

.axis-day-tick {
  stroke: rgba(238, 243, 239, .12);
  stroke-width: .55;
  vector-effect: non-scaling-stroke;
}

.year-label,
.anchor-label,
.season-label,
.month-label,
.day-label {
  fill: rgba(238, 243, 239, .58);
  font-size: 12px;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(8, 14, 18, .68);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.season-label {
  fill: rgba(238, 243, 239, .48);
  font-size: 11px;
}

.month-label {
  fill: rgba(238, 243, 239, .54);
  font-size: 11px;
}

.day-label {
  fill: rgba(238, 243, 239, .42);
  font-size: 10px;
}

.today-label,
.anchor-label.today {
  fill: rgba(240, 208, 154, .78);
}

.today-label {
  font-size: 12px;
  font-weight: 400;
}

.anchor-halo {
  fill: rgba(240, 208, 154, .14);
  stroke: rgba(240, 208, 154, .24);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.anchor-core {
  fill: rgba(255, 239, 207, .88);
  stroke: rgba(255, 255, 255, .60);
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}

.sphere-line {
  fill: none;
  stroke: var(--sphere-color);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: .58;
}

.sphere-line-soft {
  fill: none;
  stroke: var(--sphere-color);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: .055;
}

.sphere-line-joint {
  fill: var(--sphere-color);
  opacity: .26;
}

.sphere-line-joint-soft {
  fill: var(--sphere-color);
  opacity: .09;
}

.period-highlight {
  fill: url(#periodGlow);
  opacity: .88;
  pointer-events: none;
}

.period-highlight-edge {
  stroke: rgba(207, 231, 225, .18);
  stroke-width: 1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.event-node {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.event-node.is-muted { opacity: .24; }
.event-node.is-cluster-match .event-core {
  stroke: rgba(255, 255, 255, .72);
  stroke-width: 1.35;
}
.event-node.is-cluster-match .event-halo {
  opacity: var(--event-selected-halo-opacity, .14);
}
.event-node.is-hidden { opacity: 0; pointer-events: none; }

.top-action:disabled {
  opacity: .38;
  cursor: default;
}

.event-halo {
  fill: var(--event-color);
  opacity: var(--event-halo-opacity, .065);
}

.event-core {
  fill: var(--event-color);
  stroke: rgba(255, 255, 255, .30);
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
}

.event-center {
  fill: rgba(255, 255, 255, .78);
  opacity: .58;
  pointer-events: none;
}

.event-person-badge {
  pointer-events: none;
}

.event-person-badge circle {
  fill: rgba(21, 29, 31, .88);
  stroke: rgba(207, 231, 225, .56);
  stroke-width: .95;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .28));
  vector-effect: non-scaling-stroke;
}

.event-person-badge .event-person-badge-ring {
  fill: transparent;
}

.event-person-badge image {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .28));
}

.event-person-badge text {
  fill: rgba(238, 243, 239, .88);
  font-size: var(--person-badge-font, 8.5px);
  font-weight: 620;
  text-anchor: middle;
  dominant-baseline: central;
}

.event-node:hover .event-core,
.event-node.is-selected .event-core {
  stroke: rgba(255, 255, 255, .86);
  stroke-width: 1.4;
}

.event-node.is-selected .event-halo {
  opacity: var(--event-selected-halo-opacity, .14);
}

.event-node.is-draft .event-core {
  stroke: rgba(255, 255, 255, .86);
  stroke-dasharray: 3 3;
}

.timeline-cards {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}


.map-date-chip {
  position: fixed;
  left: 50%;
  bottom: 46px;
  z-index: 7;
  display: none;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 28px));
  padding: 7px 12px;
  border: 1px solid rgba(238, 243, 239, .14);
  border-radius: 999px;
  background: rgba(12, 17, 20, .66);
  color: rgba(238, 243, 239, .80);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(14px) saturate(1.03);
  font-size: 11px;
  font-weight: 640;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.map-date-chip.is-visible {
  display: block;
}

.timeline-card {
  position: absolute;
  width: 193px;
  min-height: 104px;
  display: grid;
  grid-template-columns: 62px 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 8px;
  row-gap: 8px;
  align-items: start;
  padding: 9px 10px 8px;
  border: 1px solid color-mix(in srgb, var(--event-color) 40%, rgba(255,255,255,.14));
  border-radius: 8px;
  background:
    radial-gradient(94% 84% at 18% 8%, color-mix(in srgb, var(--event-color) 9%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.014) 48%, rgba(0,0,0,.040)),
    rgba(14, 19, 22, .68);
  backdrop-filter: blur(15px) saturate(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.085),
    inset 0 -1px 0 rgba(0,0,0,.12),
    0 10px 26px rgba(0,0,0,.22),
    0 0 18px color-mix(in srgb, var(--event-color) 6%, transparent);
  color: var(--text);
  pointer-events: auto;
  transform-origin: 50% 100%;
  transition: opacity 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.timeline-card.compact {
  width: 200px;
  min-height: 108px;
  grid-template-columns: 66px 1fr;
}

.timeline-card.is-selected,
.timeline-card.is-transient {
  border-color: color-mix(in srgb, var(--event-color) 62%, rgba(255,255,255,.34));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    0 12px 31px rgba(0,0,0,.29),
    0 0 0 1px color-mix(in srgb, var(--event-color) 20%, transparent),
    0 0 22px color-mix(in srgb, var(--event-color) 11%, transparent);
}

.timeline-card.is-selected::after,
.timeline-card.is-transient::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid color-mix(in srgb, var(--event-color) 58%, rgba(255,255,255,.08));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--event-color) 28%, transparent));
  transform: translateX(-50%);
}

.timeline-card-media {
  position: relative;
  width: 62px;
  height: 66px;
  border-radius: 7px;
  background:
    radial-gradient(74% 66% at 24% 20%, rgba(255,255,255,.24), transparent 43%),
    radial-gradient(88% 78% at 78% 82%, color-mix(in srgb, var(--event-color) 24%, transparent), transparent 62%),
    linear-gradient(135deg, rgba(255,255,255,.12), color-mix(in srgb, var(--event-color) 13%, rgba(20,24,27,.94)));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -14px 20px rgba(0,0,0,.18);
  overflow: hidden;
}

.timeline-card-media img,
.event-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-card.compact .timeline-card-media {
  width: 66px;
  height: 70px;
}

.timeline-card-content {
  min-width: 0;
}

.timeline-card-date {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(238,243,239,.58);
  font-size: 9.8px;
  line-height: 1.15;
  white-space: nowrap;
}

.timeline-card-date .event-card-daytime {
  width: 17px;
  height: 17px;
}

.timeline-card-date .event-card-daytime svg {
  width: 11px;
  height: 11px;
}

.timeline-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  color: rgba(255,255,255,.84);
  font-size: 11.4px;
  font-weight: 570;
  line-height: 1.24;
  letter-spacing: 0;
}

.timeline-card.compact .timeline-card-title {
  font-size: 11.8px;
  line-height: 1.24;
}

.timeline-card-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  color: rgba(238,243,239,.58);
  font-size: 10px;
  line-height: 1.2;
}

.timeline-card-place-line {
  margin-top: 5px;
  color: rgba(238,243,239,.56);
  font-size: 10.5px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-card-score {
  color: color-mix(in srgb, var(--event-color) 66%, rgba(255,255,255,.86));
  font-size: 15px;
  font-weight: 720;
  flex: 0 0 auto;
  text-shadow: 0 0 10px color-mix(in srgb, var(--event-color) 25%, transparent);
}

.timeline-card-stories {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.timeline-card-story {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  height: 20px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--cluster-color) 24%, rgba(238,243,239,.12));
  border-radius: 999px;
  background: color-mix(in srgb, var(--cluster-color) 10%, rgba(255,255,255,.030));
  color: rgba(238,243,239,.66);
  font-size: 9px;
  font-weight: 540;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-card-story-more {
  flex: 0 0 auto;
  color: rgba(238,243,239,.46);
  font-size: 9px;
  line-height: 1;
}

.timeline-card-people {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-width: 68px;
}

.timeline-card-person {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-left: -6px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.34), transparent 42%),
    color-mix(in srgb, var(--event-color) 24%, rgba(22,26,29,.92));
  color: rgba(255,255,255,.88);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.timeline-card-person.extra {
  background: rgba(255,255,255,.08);
  color: rgba(238,243,239,.72);
  font-size: 7.5px;
}

.timeline-card-actions {
  grid-column: 1 / -1;
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.timeline-card.is-transient .timeline-card-actions,
.timeline-card.is-selected .timeline-card-actions {
  display: flex;
}

.timeline-card-action {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(255,255,255,.048);
  border: 1px solid rgba(255,255,255,.095);
  color: rgba(238,243,239,.76);
  font-size: 10.5px;
}

.timeline-card-action:hover {
  background: rgba(255,255,255,.080);
  color: var(--text);
}

.draft-guide {
  stroke: rgba(240, 208, 154, .32);
  stroke-width: .9;
  stroke-dasharray: 3 7;
  vector-effect: non-scaling-stroke;
}

.product-ui {
  z-index: 10;
  pointer-events: none;
}

.glass {
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .060), rgba(255, 255, 255, .012) 44%, rgba(255, 255, 255, .032)),
    var(--panel);
  backdrop-filter: blur(16px) saturate(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .13),
    inset 0 -1px 0 rgba(255, 255, 255, .040),
    0 18px 54px rgba(0, 0, 0, .30);
}

