@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@100;400&display=swap");

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 800px at 30% 20%, rgba(214,178,94,0.12), transparent 60%),
              radial-gradient(900px 700px at 70% 70%, rgba(120,190,255,0.10), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
}

.app{
  height:100%;
  display:flex;
  flex-direction:column;
}

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
}
.toolbar__right{
  display:flex;
  align-items:center;
  gap: 10px;
}
.auth-status{
  font-size: 12px;
  color: var(--muted);
}

.timeline{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
  color: var(--muted);
  font-size: 12px;
}
.timeline__label{
  font-weight: 600;
  color: var(--text);
}
.timeline__range{
  flex: 1;
  min-width: 140px;
}
.timeline__value{
  min-width: 36px;
  text-align: right;
  font-family: var(--mono);
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand__mark{
  width: 36px;
  height: 36px;
  display:grid;
  place-items:center;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.brand__title{
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand__subtitle{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(214,178,94,0.35);
}
.btn:active{ transform: translateY(1px); }

.btn--ghost{
  background: transparent;
}

.stage{
  flex:1;
  position:relative;
  overflow:hidden;
  display:flex;
}

.stage__canvasWrap{
  flex:1;
  min-width:0;
  position:relative;
}

.zoom-title{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms linear;
  mix-blend-mode: normal;
}
.zoom-title__word{
  position: absolute;
  font: 100 72px/1 "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 14px;
  color: #f5d36a;
  transform: translate(-50%, -50%);
  text-shadow: none;
}

.canvas{
  width:100%;
  height:100%;
  display:block;
}

.drawer{
  width: 360px;
  max-width: 85vw;
  border-left: 1px solid var(--stroke);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-2);

  position:absolute;
  top:0;
  right:0;
  bottom:0;

  transform: translateX(102%);
  transition: transform 180ms ease;
}
.drawer.is-open{
  transform: translateX(0);
}
.drawer__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border-bottom: 1px solid var(--stroke);
}
.drawer__title{
  font-weight: 700;
}
.drawer__body{
  padding: 14px;
}

.panel{
  padding: 12px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  border-radius: var(--radius);
}
.panel__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.panel__row:last-child{ border-bottom:none; }
.hint{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  gap: 12px;
}

.legend{
  display:flex;
  gap: 18px;
  align-items:center;
  padding: 10px 16px;
  border-top: 1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
  color: var(--muted);
  font-size: 13px;
}
.legend__item{
  display:flex;
  align-items:center;
  gap: 8px;
}
.legend__item--muted{
  margin-left:auto;
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.75;
}

.events-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 6px;
}
.event-row{
  display:grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 10px;
}
.range-wrap{
  display:flex;
  align-items:center;
  gap: 8px;
}
.range-wrap .input{
  flex: 1;
  padding: 6px 8px;
}
.range-value{
  min-width: 32px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.input{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.input:focus{
  outline: none;
  border-color: rgba(214,178,94,0.5);
}
.input--note{
  min-height: 96px;
  resize: vertical;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display:inline-block;
}
.dot--year{
  background: #111;
  border: 1px solid rgba(255,255,255,0.25);
}
.dot--bday{
  background: transparent;
  border: 2px solid rgba(255,255,255,0.9);
}

@media (max-width: 820px){
  .drawer{ width: 320px; }
}


.tooltip{
  position: fixed;
  left: 0; top: 0;
  transform: translate(-9999px, -9999px);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  filter: blur(18px);
  transition: opacity 300ms ease, filter 800ms ease;
  
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 12px;
  
  background: rgba(10,12,16,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
  
  color: rgba(255,255,255,0.92);
  font: 12px/1.25 var(--font);
  letter-spacing: 0.2px;
  backdrop-filter: blur(10px);
}

.tooltip--visible{
  opacity: 1;
  filter: blur(0);
}

.tooltip--empty{
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
  color: rgba(255,255,255,0.95);
  font: 12px/1.3 var(--font);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  backdrop-filter: none;
  padding-bottom: 66px;
}
.tooltip--event{
  padding-bottom: 0;
}
.tooltip--event{
  color: rgba(255,210,120,0.95);
}
.tooltip--event::after{
  height: 38px;
  border-left-color: rgba(255,175,90,0.9);
}
.tooltip--empty::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 66px;
  border-left: 2px solid rgba(255,255,255,0.5);
  transform: translateX(-50%);
}
.tooltip--event::after{
  display: none;
}
.tooltip--empty .hint-title{
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.7;
}
.tooltip--empty .hint-date{
  font-weight: 500;
  font-size: 14px;
}

.tooltip .year{
  font-weight: 650;
  font-size: 12px;
  opacity: 0.95;
  margin-bottom: 6px;
}

.tooltip .note{
  font-size: 12px;
  opacity: 0.9;
}

.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,8,12,0.55);
  backdrop-filter: blur(6px);
  z-index: 10000;
}
.modal.is-open{
  display: flex;
}
.modal__panel{
  width: 360px;
  max-width: 92vw;
  border: 1px solid var(--stroke);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
}
.modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
}
.modal__title{
  font-weight: 700;
}
.modal__body{
  padding: 14px;
}
.modal__actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
