@charset "UTF-8";
:root {
  color-scheme: dark;
  --ink: #f5f4f7;
  --muted: #aaa8b2;
  --paper: #101012;
  --surface: #1b1b1f;
  --line: #303035;
  --violet: #a18aff;
  --lime: #d5ef80;
  --pink: #edbddc;
  --blue: #bad4f4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

button, .button, select, input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  background: #242428;
  color: var(--ink);
}

button, .button, select {
  cursor: pointer;
}

button, .button {
  transition: background 0.15s, border-color 0.15s;
}

button:hover, .button:hover {
  background: #35343c;
  border-color: #55515f;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

button:focus-visible, .button:focus-within, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

[hidden] {
  display: none !important;
}

main {
  max-width: 1360px;
  margin: auto;
  padding: 38px 40px 64px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.app-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 20deg, #d4c6ff, #7b4eff, #b79aff, #eee7ff, #d4c6ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1254901961);
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.8px;
}

.page-nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #1f1f23;
  border-radius: 999px;
}
.page-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 12px;
}
.page-nav a:first-child {
  background: #f4f3f6;
  color: #1a191d;
}
.page-nav a:hover {
  color: var(--ink);
  background: #36343d;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.source-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
}

#source {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#sync {
  font-size: 12px;
  color: var(--muted);
}

.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.tools .button {
  background: #f3f2f5;
  color: #17161b;
  border-color: transparent;
}
.tools .button:hover {
  background: var(--violet);
}

#notice {
  margin: 0 0 24px;
  padding: 11px 16px;
  border-radius: 12px;
  background: #24212b;
  color: #c7bbdd;
  font-size: 12px;
}
#notice:empty {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.metric {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  border-radius: 22px;
  padding: 23px 24px;
  color: #201d29;
  background: var(--lime);
}
.metric[href] {
  text-decoration: none;
  transition: box-shadow 160ms ease;
}
.metric[href]:hover {
  box-shadow: inset 0 0 0 2px rgba(32, 29, 41, 0.3137254902);
}
.metric:nth-child(2) {
  background: var(--violet);
}
.metric:nth-child(3) {
  background: var(--pink);
}
.metric:nth-child(4) {
  background: var(--blue);
}
.metric small {
  font-size: 11px;
  color: #3d344b;
  max-width: 95%;
}
.metric-label {
  font-size: 13px;
  font-weight: 500;
  padding-right: 16px;
}
.metric-value {
  font-size: clamp(28px, 3.1vw, 44px);
  font-weight: 550;
  letter-spacing: -1.8px;
  line-height: 1.15;
  margin: 23px 0 12px;
  font-variant-numeric: tabular-nums;
}
.metric-value span {
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 400;
}

.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.panel {
  min-width: 0;
  border-radius: 22px;
  background: var(--surface);
  padding: 26px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

h2 {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.25px;
}

.panel-head h2 {
  margin: 0;
}

.panel-head select {
  min-height: 34px;
  font-size: 11px;
  padding: 6px 12px;
}

.caption {
  margin: 22px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 18px;
  margin: 20px 0 0;
  font-size: 11px;
  color: var(--violet);
}
.legend span + span {
  color: var(--lime);
}

.chart {
  display: flex;
  gap: 8px;
  height: 232px;
  overflow-x: auto;
  padding: 20px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: #4b465a transparent;
}

.bar-group {
  display: flex;
  flex: 1;
  min-width: 28px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.bars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  height: 175px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent 43px, rgba(255, 255, 255, 0.0196078431) 43px, rgba(255, 255, 255, 0.0196078431) 44px);
}

.bar {
  width: 35%;
  max-width: 20px;
  min-height: 1px;
  background: var(--violet);
  border-radius: 4px 4px 0 0;
}
.bar.days {
  background: var(--lime);
  opacity: 0.85;
}
.bar-label {
  font-size: 9px;
  white-space: nowrap;
  color: var(--muted);
}

.weekdays {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  height: 244px;
  padding-top: 16px;
}

.weekday {
  flex: 1;
  min-width: 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.weekday strong {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
}
.weekday .stem {
  height: 169px;
  display: flex;
  align-items: flex-end;
  background: #25222e;
  border-radius: 7px;
  margin-bottom: 14px;
  overflow: hidden;
}
.weekday .stem i {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #695393;
}
.weekday.best .stem i {
  background: var(--violet);
}
.weekday.best {
  color: var(--violet);
}

.cloud {
  min-height: 214px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-content: center;
  justify-content: center;
  padding: 12px 8px;
}
.cloud span {
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 450;
}

.insight {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.insight b {
  min-width: 106px;
  font-size: 27px;
  font-weight: 450;
  letter-spacing: -1px;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}
.insight span {
  min-width: 0;
  font-size: 12px;
}
.insight small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.journal {
  margin-top: 20px;
}
.journal .panel-head {
  margin-bottom: 18px;
}
.journal input {
  max-width: 240px;
  background: #242428;
  font-size: 12px;
}

input::placeholder {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 20px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.031372549);
  font-size: 12px;
  overflow-wrap: anywhere;
}
td:first-child {
  width: 18%;
  min-width: 105px;
  color: var(--muted);
}
td:last-child {
  width: 16%;
  min-width: 105px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.0117647059);
}

#more {
  margin-top: 20px;
  font-size: 12px;
}

@media (max-width: 800px) {
  main {
    padding: 24px 20px 40px;
  }
  .intro {
    margin-bottom: 28px;
  }
  .page-nav a {
    padding: 7px 12px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .tools {
    flex-wrap: wrap;
    width: 100%;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metric {
    min-height: 160px;
    padding: 20px;
  }
  .metric-value {
    font-size: 34px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 22px;
  }
}
@media (max-width: 420px) {
  main {
    padding: 20px 14px 32px;
  }
  .metric {
    padding: 17px;
  }
  .metric-label {
    font-size: 11px;
    padding: 0;
  }
  .metric-value {
    font-size: 28px;
  }
  .metric small {
    font-size: 10px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .journal input {
    max-width: none;
    width: 100%;
  }
  .weekdays {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  button, .button {
    transition: none;
  }
}
.holiday-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(237, 189, 220, 0.1254901961);
  color: var(--pink);
  font-size: 10px !important;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 6px;
}

.metric-value.duration-total {
  font-size: clamp(23px, 2.4vw, 35px);
  letter-spacing: -1px;
}

.cloud span {
  white-space: nowrap;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.calendar {
  margin-top: 20px;
  scroll-margin-top: 20px;
}
.calendar-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0 30px;
}
.calendar-legend {
  display: flex;
  gap: 18px;
}
.calendar-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.calendar-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.met-key {
  background: var(--violet);
}

.holiday-key {
  background: var(--pink);
}

.calendar-months {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 36px;
}

.calendar-month h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 15px;
}

.calendar-week, .calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-week {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  font-size: 10px;
  color: var(--muted);
  background: #232327;
}
.calendar-day.met {
  --calendar-day-tint: #a18aff35;
  background: var(--calendar-day-tint);
  color: #d9cdff;
}
.calendar-day.holiday {
  --calendar-day-tint: #edbddc40;
  background: var(--calendar-day-tint);
  color: #ffdaef;
}
.calendar-day:hover {
  border-color: var(--muted);
}
.calendar-day.selected {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}

.calendar-details {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 20px;
  font-size: 12px;
}
.calendar-details h3 {
  font-size: 13px;
  font-weight: 500;
  margin-top: 0;
}
.calendar-details p {
  color: var(--muted);
  margin: 0;
}

.calendar-entry {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}
.calendar-entry small {
  flex-shrink: 0;
  color: var(--blue);
}

@media (max-width: 1050px) {
  .calendar-months {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}
@media (max-width: 800px) {
  .calendar-months {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }
  .page-nav a {
    padding: 7px 9px;
  }
  .metric-value.duration-total {
    font-size: 27px;
  }
}
@media (max-width: 420px) {
  .calendar-months {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    max-height: 42px;
  }
  .metric-value.duration-total {
    font-size: 22px;
  }
  .intro {
    flex-wrap: wrap;
    gap: 20px;
  }
}
.relationship {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 26px 0 30px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.relationship-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.relationship-date {
  font-size: 25px;
  letter-spacing: -0.7px;
}
.relationship-duration {
  font-size: 30px;
  color: var(--pink);
  letter-spacing: -0.7px;
}
.relationship-duration span {
  font-size: 17px;
  color: var(--muted);
  margin-right: 8px;
}
.relationship-total {
  margin-left: auto;
  color: var(--lime);
  font-size: 19px;
  text-align: right;
}
.relationship-total span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}

.trips {
  margin-top: 20px;
  scroll-margin-top: 20px;
}

.section-count {
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  color: var(--muted);
  font-size: 12px;
  grid-column: 1/-1;
}

.journal {
  scroll-margin-top: 20px;
}

.view-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: #252429;
}
.view-switch button {
  min-height: 32px;
  padding: 6px 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.view-switch button[aria-selected=true] {
  color: #18151e;
  background: var(--violet);
}

.history-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 24px 0 28px;
  color: var(--muted);
  font-size: 11px;
}
.calendar-controls .calendar-legend {
  margin-left: auto;
}
.calendar-controls select {
  min-height: 34px;
  font-size: 11px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}
.calendar-layout .calendar-months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}
.calendar-layout .calendar-details {
  position: sticky;
  top: 24px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: #232226;
  border-radius: 16px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.calendar-entry {
  display: block;
  border-bottom: 1px solid var(--line);
}
.calendar-entry:last-child {
  border-bottom: 0;
}
.calendar-entry > span {
  display: block;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.calendar-entry small {
  display: block;
  margin-top: 14px;
  color: var(--pink);
}
.calendar-entry-range {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) 255px;
    gap: 20px;
  }
  .calendar-layout .calendar-months {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .relationship {
    gap: 28px;
  }
  .relationship-duration {
    font-size: 25px;
  }
}
@media (max-width: 800px) {
  .relationship {
    flex-wrap: wrap;
    gap: 24px 35px;
  }
  .relationship-total {
    margin-left: 0;
    text-align: left;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .calendar-layout .calendar-details {
    order: -1;
    position: static;
    max-height: 260px;
  }
  .calendar-controls .calendar-legend {
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .relationship-duration {
    font-size: 23px;
  }
  .relationship-duration span {
    font-size: 14px;
    margin-right: 4px;
  }
  .relationship-date {
    font-size: 23px;
  }
}
.dashboard-tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  max-width: min(300px, 100vw - 16px);
  padding: 11px 15px;
  border: 1px solid #5b526e;
  border-radius: 12px;
  color: var(--ink);
  background: #302a3b;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

[data-tooltip] {
  cursor: help;
}
[data-tooltip]:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 5px;
}

.cloud [data-tooltip]:hover, .cloud [data-tooltip]:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.bar-group:hover .bar, .bar-group:focus-visible .bar {
  filter: brightness(1.2);
}

.history-controls {
  gap: 12px;
  flex-wrap: wrap;
}
.history-controls select {
  font-size: 12px;
  margin-right: auto;
}

.history-date {
  display: block;
  white-space: nowrap;
}

#rows td:first-child .holiday-badge {
  margin: 7px 0 0;
}

.history-title {
  font-weight: 500;
}

.history-description {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.history-description summary {
  cursor: pointer;
  width: fit-content;
}
.history-description p {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin: 12px 0 0;
  font-size: 12px;
}

.calendar-entry-title {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  margin: 0 0 12px;
}

.calendar-details .calendar-entry-description {
  white-space: pre-line;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 12px;
}

.gap-note {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.calendar-day.today {
  position: relative;
  font-weight: 650;
}
.calendar-day.today::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--lime);
  border-radius: 5px;
  pointer-events: none;
}
.calendar-day.future {
  color: var(--muted);
  opacity: 0.35;
}

.calendar-legend .today-key {
  background: transparent;
  border: 1px solid var(--lime);
}

.timeline {
  margin-top: 20px;
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  margin-top: 18px;
}
.timeline-scroll {
  height: auto;
  max-height: none;
  overflow: visible;
  margin-top: 22px;
  scrollbar-width: thin;
  scrollbar-color: #59506d transparent;
  border-block: 1px solid var(--line);
}
.timeline-scroll:focus-visible {
  outline: 1px solid var(--violet);
  outline-offset: 3px;
}
.timeline-canvas {
  position: relative;
}

.vertical-axis {
  position: absolute;
  top: 32px;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(var(--violet), #7f6aaf);
  border-radius: 99px;
}

.timeline-connectors {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.timeline-connectors path {
  fill: none;
  stroke: #6d607f;
  stroke-width: 1;
}

.vertical-month {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
.vertical-month span {
  display: block;
  white-space: nowrap;
  font-size: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
}

.vertical-trip {
  position: absolute;
  width: 7px;
  transform: translateX(-50%);
  background: var(--pink);
  opacity: 0.75;
  border-radius: 99px;
}

.vertical-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  min-height: 0;
  padding: 0;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--violet);
  cursor: pointer;
  z-index: 4;
}
.vertical-pin.holiday {
  background: var(--pink);
}
.vertical-pin:hover, .vertical-pin:focus-visible {
  background: var(--lime);
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.vertical-pin.selected {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.timeline-label {
  position: absolute;
  height: 72px;
  min-height: 0;
  padding: 10px 14px;
  background: #25232b;
  border: 1px solid rgba(255, 255, 255, 0.0274509804);
  border-radius: 13px;
  text-align: left;
  white-space: normal;
  display: block;
  cursor: pointer;
  z-index: 2;
}
.timeline-label strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 5px;
}
.timeline-label.left {
  text-align: right;
}
.timeline-label.holiday {
  border-color: rgba(237, 189, 220, 0.2509803922);
}
.timeline-label.holiday strong {
  color: var(--pink);
}
.timeline-label.selected {
  border-color: var(--lime);
}
.timeline-label-date {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.timeline-details {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
  min-height: 66px;
  font-size: 12px;
}
.timeline-details > p {
  color: var(--muted);
  margin: 0;
  white-space: pre-line;
  line-height: 1.8;
}

.timeline-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}
.timeline-detail-heading h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.timeline-detail-heading > span {
  color: var(--pink);
  flex-shrink: 0;
}

.timeline-detail-date {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 11px;
}

.landmarks {
  margin-top: 20px;
  scroll-margin-top: 20px;
}

.date-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.date-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.0470588235);
  border-radius: 15px;
  background: #25232b;
}
.date-card .date-card-date {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.date-card h3 {
  font-size: 23px;
  line-height: 1.3;
  font-weight: 450;
  letter-spacing: -0.5px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.date-card .date-card-meta {
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.date-card.date-card-landmark .date-card-meta {
  color: var(--lime);
}
.date-card.date-card-trip .date-card-meta {
  color: var(--pink);
}
.date-card details {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
.date-card details summary {
  cursor: pointer;
  width: fit-content;
}
.date-card details p {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .date-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .date-card-grid {
    grid-template-columns: 1fr;
  }
}
.date-number {
  display: inline-block;
  color: var(--violet);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.1px;
  margin-right: 8px;
  white-space: nowrap;
}

.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
  margin-top: 22px;
}
.timeline-layout .timeline-scroll {
  margin-top: 0;
}
.timeline-layout .timeline-details {
  position: sticky;
  top: 24px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: #232226;
  border-radius: 16px;
  max-height: none;
  overflow: visible;
  min-width: 0;
  overflow-wrap: anywhere;
}
.timeline-layout .timeline-detail-heading {
  display: block;
}
.timeline-layout .timeline-detail-heading h3 {
  margin-bottom: 12px;
}
.timeline-layout .timeline-detail-heading > span {
  display: block;
  font-size: 13px;
}
.timeline-layout .timeline-detail-date {
  line-height: 1.8;
}

@media (max-width: 1100px) {
  .timeline-layout {
    grid-template-columns: minmax(0, 1fr) 255px;
    gap: 20px;
  }
}
@media (max-width: 800px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }
  .timeline-layout .timeline-details {
    order: -1;
    position: static;
    max-height: none;
  }
}
.vertical-day {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.vertical-day i {
  position: absolute;
  width: 9px;
  height: 1px;
  background: rgba(179, 166, 205, 0.3333333333);
  left: -4px;
  top: 0;
}
.vertical-day span {
  position: absolute;
  right: 12px;
  top: -7px;
  font-size: 9px;
  line-height: 14px;
  color: #918899;
  font-variant-numeric: tabular-nums;
}

.vertical-month span {
  font-size: 10px;
  font-weight: 550;
  color: #ddd3ed;
  border-color: #6d607f;
  padding: 5px 9px;
}
.vertical-month::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 1px;
  background: rgba(161, 138, 255, 0.5019607843);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.page-nav button {
  min-height: 34px;
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 8px 20px;
  font-size: 12px;
}
.page-nav button[aria-selected=true] {
  background: #f4f3f6;
  color: #1a191d;
}
.page-nav button:hover:not([aria-selected=true]) {
  color: var(--ink);
  background: #36343d;
}

.page-panel {
  margin-top: 0;
}

@media (max-width: 800px) {
  .intro {
    flex-wrap: wrap;
    gap: 20px;
  }
  .page-nav button {
    padding: 8px 14px;
  }
}
.journal-results {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
  font-size: 12px;
  color: var(--muted);
}

#journal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 5px 11px;
  font-size: 11px;
  border-color: rgba(161, 138, 255, 0.3137254902);
  color: var(--violet);
  background: rgba(161, 138, 255, 0.0745098039);
}

#show-all-dates {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 11px;
  margin-left: auto;
}

.journal-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.journal-list-column {
  max-height: 74vh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #59506d transparent;
}
.journal-list-column th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

.journal-details {
  position: sticky;
  top: 24px;
  border-radius: 16px;
  padding: 24px;
  background: #232226;
  border: 1px solid var(--line);
  min-width: 0;
  max-height: 74vh;
  overflow: auto;
  font-size: 12px;
}
.journal-details > p {
  color: var(--muted);
  line-height: 1.8;
}
.journal-details h3 {
  margin: 15px 0 24px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.4px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.record-facts {
  margin: 0;
}
.record-facts > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.record-facts dt {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.record-facts dd {
  margin: 0;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.record-description {
  margin-top: 23px;
}
.record-description h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.record-description p {
  line-height: 1.9;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.record-permalink, .open-journal {
  display: inline-block;
  margin-top: 18px;
  font-size: 11px;
  color: var(--violet);
  text-decoration: none;
}
.record-permalink:hover, .open-journal:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.date-card h3 a, .calendar-entry-title a {
  color: inherit;
  text-decoration: none;
}
.date-card h3 a:hover, .calendar-entry-title a:hover {
  color: var(--violet);
}

.entry-select {
  padding: 0;
  border: 0;
  border-radius: 4px;
  min-height: 0;
  line-height: 1.3;
  width: 100%;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}
.entry-select:hover {
  color: var(--violet);
  background: transparent;
  border-color: transparent;
}

tr.selected-entry {
  background: rgba(161, 138, 255, 0.0862745098);
}

.landmark-badge {
  display: inline-block;
  color: var(--lime);
  background: rgba(213, 239, 128, 0.0784313725);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  margin: 7px 4px 0 0;
  white-space: nowrap;
}

.cloud .cloud-term {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 450;
  cursor: pointer;
}
.cloud .cloud-term:hover {
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.day-journal-link {
  margin-top: 0;
  margin-bottom: 14px;
}

.calendar-details .calendar-entry-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-details > p {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-controls select {
  margin-right: 0;
}

.history-controls input {
  margin-left: auto;
}

@media (max-width: 1100px) {
  .journal-list-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 18px;
  }
}
@media (max-width: 800px) {
  .journal-list-layout {
    grid-template-columns: 1fr;
  }
  .journal-details {
    position: static;
    order: -1;
    max-height: 45vh;
  }
  .journal-list-column {
    max-height: 65vh;
  }
  .history-controls input {
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
}
.journal-list-column .table-wrap {
  overflow: visible;
}

.journal-list-column {
  max-height: none;
  overflow: visible;
}
.journal-list-column .table-wrap {
  overflow: visible;
}

.journal-details {
  max-height: none;
  overflow: visible;
  scroll-margin-top: 24px;
}
.journal-details.is-tall {
  position: static;
}

@media (max-width: 800px) {
  .journal-list-column {
    max-height: none;
    overflow: visible;
  }
  .journal-details {
    max-height: none;
    overflow: visible;
  }
}
.entry-keywords {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.keyword-tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(161, 138, 255, 0.1450980392);
  border-radius: 999px;
  color: #bcabe7;
  background: rgba(161, 138, 255, 0.0431372549);
  font-size: 10px;
  line-height: 1.5;
  text-decoration: none;
}
.keyword-tag:hover {
  color: var(--ink);
  border-color: var(--violet);
  background: rgba(161, 138, 255, 0.1450980392);
}

.record-keywords {
  margin-top: 22px;
}
.record-keywords h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}

.history-controls {
  justify-content: flex-start;
}
.history-controls select {
  max-width: 220px;
}

@media (max-width: 480px) {
  .history-controls select {
    max-width: 100%;
  }
}
#rows td:first-child {
  width: auto;
  min-width: 42px;
}

.journal-number .date-number {
  margin-right: 0;
}

.journal-days-in {
  width: 60px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#rows .history-date {
  white-space: normal;
  min-width: 140px;
  line-height: 1.7;
}

.keyword-picker {
  position: relative;
  font-size: 12px;
}
.keyword-picker summary {
  list-style: none;
  cursor: pointer;
}
.keyword-picker summary::-webkit-details-marker {
  display: none;
}
.keyword-picker summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

.keyword-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #242428;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5333333333);
  z-index: 10;
}
.keyword-menu p {
  font-size: 10px;
  color: var(--muted);
  padding: 0 6px 9px;
  margin: 0;
}
.keyword-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 6px;
}
.keyword-menu label:hover {
  background: rgba(255, 255, 255, 0.031372549);
}
.keyword-menu input {
  accent-color: var(--violet);
  min-height: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.entry-landmark {
  color: var(--lime);
  font-size: 11px;
  line-height: 1.6;
  margin: 3px 0 7px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.journal-entry-row {
  cursor: pointer;
}
.journal-entry-row:hover {
  background: rgba(161, 138, 255, 0.0705882353);
}
.journal-entry-row:focus-within {
  background: rgba(161, 138, 255, 0.0862745098);
}

.journal-details .record-landmark {
  color: var(--lime);
  font-size: 13px;
  line-height: 1.7;
  margin: -12px 0 24px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.calendar-year-heading {
  grid-column: 1/-1;
  font-size: 19px;
  font-weight: 500;
  color: var(--violet);
  padding-bottom: 12px;
  margin: 12px 0 0;
  border-bottom: 1px solid var(--line);
}

.days-in-total {
  display: block;
  white-space: nowrap;
}

.days-in-readable {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 4px;
}

.journal-days-in {
  min-width: 105px;
}

.calendar-year-group {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: inherit;
  gap: inherit;
  align-items: start;
}

.calendar-year-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0;
  padding: 14px 0;
  background: var(--surface);
}

.entry-description {
  width: 0;
  min-width: 100%;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journal-entry-row {
  scroll-margin-block: 45px;
}

.mobile-sheet {
  display: none;
}

@media (max-width: 800px) {
  main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .intro {
    display: block;
  }
  .identity h1 {
    font-size: 19px;
  }
  .page-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: rgba(31, 31, 35, 0.9607843137);
    border-top: 1px solid var(--line);
    border-radius: 0;
    backdrop-filter: blur(15px);
  }
  .page-nav button {
    min-height: 44px;
    padding: 8px 4px;
    font-size: 12px;
  }
  .tools {
    gap: 6px;
  }
  .tools button, .tools .button, .tools select {
    min-height: 44px;
  }
  .calendar-layout, .timeline-layout, .journal-list-layout {
    grid-template-columns: 1fr;
  }
  #calendar-details, #timeline-details, #journal-details {
    display: none;
  }
  .calendar-layout .calendar-months {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    aspect-ratio: auto;
    min-height: 40px;
    height: 42px;
    font-size: 12px;
  }
  .calendar-month h3 {
    font-size: 14px;
  }
  .calendar-week {
    font-size: 11px;
  }
  .calendar-year-heading {
    top: 0;
  }
  .vertical-pin {
    width: 25px;
    height: 25px;
    border-width: 7px;
  }
  .timeline-label {
    height: 76px;
  }
  .journal-list-column table, .journal-list-column tbody {
    display: block;
    width: 100%;
  }
  .journal-list-column thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .journal-entry-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--line);
  }
  #rows .journal-entry-row td {
    display: block;
    min-width: 0;
    width: auto;
    border: 0;
    padding: 0;
  }
  #rows .journal-entry-row td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  #rows .journal-entry-row td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 11px;
  }
  #rows .journal-entry-row td:nth-child(3) {
    grid-column: 1/-1;
    grid-row: 3;
  }
  #rows .journal-entry-row td:nth-child(4) {
    grid-column: 1/-1;
    grid-row: 2;
  }
  #rows .journal-entry-row td:nth-child(5) {
    grid-column: 1/-1;
    grid-row: 4;
    color: var(--blue);
  }
  .journal-entry-row .entry-select {
    font-size: 15px;
    line-height: 1.3;
    min-height: 0;
  }
  #rows .history-date {
    font-size: 12px;
    color: var(--muted);
  }
  .history-controls {
    gap: 8px;
  }
  .history-controls select {
    min-height: 44px;
    max-width: 100%;
    flex: 1;
  }
  .keyword-picker {
    flex: 1;
  }
  .keyword-picker summary {
    min-height: 44px;
  }
  .keyword-menu {
    width: min(280px, 80vw);
  }
  .keyword-menu label {
    min-height: 44px;
  }
  .keyword-menu input {
    width: 18px;
    height: 18px;
  }
  .filter-chip {
    min-height: 38px;
  }
  .detail-sheet-open {
    overflow: hidden;
  }
  .mobile-sheet[open] {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
    background: #232226;
    color: var(--ink);
    border: 1px solid #4c4459;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.3333333333);
    overflow: hidden;
  }
  .mobile-sheet::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
  }
  .sheet-handle {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    margin: 0 auto 10px;
    background: #645c70;
    flex-shrink: 0;
  }
  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }
  .sheet-header h2 {
    margin: 0;
    font-size: 15px;
  }
  .sheet-close {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 25px;
  }
  .mobile-sheet-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 18px;
    min-height: 0;
  }
  .mobile-sheet .mobile-sheet-content > aside {
    display: block !important;
    position: static;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .mobile-sheet .calendar-entry-description, .mobile-sheet .timeline-details > p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .mobile-sheet .open-journal, .mobile-sheet .record-permalink {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .mobile-sheet .timeline-detail-heading {
    display: block;
  }
  .mobile-sheet .timeline-detail-heading > span {
    display: block;
    color: var(--pink);
    margin-top: 10px;
  }
}
@media (max-width: 800px) {
  .mobile-sheet .record-description p, .mobile-sheet .calendar-entry-description, .mobile-sheet .timeline-details > p {
    font-size: 14px;
    line-height: 1.8;
  }
  .mobile-sheet .record-facts dd {
    font-size: 13px;
  }
  .mobile-sheet .record-facts dt {
    font-size: 11px;
  }
  .mobile-sheet .open-journal, .mobile-sheet .record-permalink {
    font-size: 13px;
  }
  .timeline-label strong {
    font-size: 14px;
  }
}
@media (max-width: 800px) {
  #rows .journal-entry-row td.journal-days-in {
    display: none;
  }
  .journal-entry-row {
    grid-template-columns: 1fr;
  }
}
.metric-icon {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 23px;
  height: 23px;
  opacity: 0.7;
  pointer-events: none;
}

.metric-label {
  padding-right: 30px;
}

@media (max-width: 480px) {
  .metric-icon {
    width: 19px;
    height: 19px;
    top: 16px;
    right: 16px;
  }
  .metric-label {
    padding-right: 23px;
  }
}
.calendar-layout, .timeline-layout, .journal-list-layout {
  grid-template-columns: minmax(0, 1fr);
}

html {
  scrollbar-gutter: stable;
}

.date-drawer-open {
  overflow: hidden;
}

.date-drawer {
  display: none;
}
.date-drawer[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: min(480px, 100vw);
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  border-left: 1px solid #4c4459;
  background: #232226;
  color: var(--ink);
  box-shadow: -20px 0 80px rgba(0, 0, 0, 0.3333333333);
  overflow: hidden;
  animation: drawer-enter 0.2s ease-out;
}
.date-drawer::backdrop {
  background: rgba(0, 0, 0, 0.4666666667);
  backdrop-filter: blur(2px);
}

.drawer-handle {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer-header h2 {
  margin: 0;
  font-size: 15px;
}
.drawer-header button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 25px;
}

.date-drawer .record-content {
  display: block !important;
  position: static;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 24px;
  margin: 0;
  background: transparent;
}

.date-drawer .record-description p {
  font-size: 14px;
  line-height: 1.9;
}

.date-drawer .record-facts dd {
  font-size: 13px;
}

.date-drawer .record-facts dt {
  font-size: 11px;
}

.date-drawer .record-landmark {
  color: var(--lime);
  font-size: 13px;
}

.drawer-intro {
  color: var(--muted);
  line-height: 1.8;
}

.drawer-day-list {
  display: grid;
  gap: 12px;
}

.drawer-day-date {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.0156862745);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.drawer-day-date small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}
.drawer-day-date:hover {
  border-color: var(--violet);
  background: rgba(161, 138, 255, 0.0431372549);
}

@keyframes drawer-enter {
  from {
    transform: translateX(100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media (max-width: 800px) {
  .date-drawer[open] {
    inset: auto 0 0;
    height: auto;
    max-height: 88dvh;
    width: 100%;
    border: 1px solid #4c4459;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation-name: sheet-enter;
  }
  .drawer-handle {
    display: block;
    flex-shrink: 0;
    width: 38px;
    height: 4px;
    background: #645c70;
    border-radius: 99px;
    margin: 12px auto 0;
  }
  .drawer-header {
    padding: 12px 20px;
  }
  .date-drawer .record-content {
    padding: 20px;
  }
  .date-drawer .record-permalink {
    min-height: 44px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
  }
}
@keyframes sheet-enter {
  from {
    transform: translateY(20%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .date-drawer[open] {
    animation: none;
  }
}
.date-drawer .record-content {
  order: 0;
}

a.date-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
a.date-card:hover {
  border-color: rgba(161, 138, 255, 0.5019607843);
  background: rgba(161, 138, 255, 0.062745098);
}
a.date-card:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}

.timeline-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trend-stack {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.trend-scales {
  display: grid;
  grid-template-rows: 110px 110px;
  gap: 20px;
}
.trend-scales > div {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: var(--violet);
}
.trend-scales > div span {
  margin-bottom: 4px;
}
.trend-scales > div small {
  font-size: 9px;
  color: var(--muted);
}
.trend-scales > div small:last-child {
  margin-top: auto;
}
.trend-scales > div + div {
  color: var(--lime);
}

.trend-periods {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 2px 5px;
  scrollbar-width: thin;
  scrollbar-color: #59506d transparent;
}

.trend-period {
  display: grid;
  grid-template-rows: 110px 110px auto;
  gap: 20px;
  flex: 1;
  min-width: 31px;
  cursor: help;
}

.trend-bars {
  display: flex;
  position: relative;
  align-items: flex-end;
  justify-content: center;
  height: 110px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent 27px, rgba(255, 255, 255, 0.0196078431) 27px, rgba(255, 255, 255, 0.0196078431) 28px);
}

.trend-bar {
  width: 66%;
  max-width: 25px;
  background: var(--violet);
  border-radius: 4px 4px 0 0;
}

.trend-bars.hours .trend-bar {
  background: var(--lime);
}

.trend-period .bar-label {
  text-align: center;
}

.trend-unknown {
  color: var(--muted);
  padding-bottom: 6px;
}

.trend-period:hover .trend-bar, .trend-period:focus-visible .trend-bar {
  filter: brightness(1.2);
}

@media (max-width: 800px) {
  .trend-period {
    min-width: 37px;
  }
}
.holiday-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trip-badge-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 24px;
}
.review-toolbar h2 {
  font-size: 18px;
  margin: 0;
}
.review-toolbar > div {
  display: flex;
  gap: 8px;
}

.review-story {
  display: grid;
  gap: 20px;
}

.review-slide {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 80px);
  border-radius: 32px;
  color: #201d29;
  padding: clamp(28px, 6vw, 84px);
  scroll-margin-top: 20px;
}
.review-slide::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  border: 1px solid currentColor;
  opacity: 0.1;
  border-radius: 50%;
  right: -25%;
  top: -30%;
}

.story-violet {
  background: var(--violet);
}

.story-lime {
  background: var(--lime);
}

.story-pink {
  background: var(--pink);
}

.story-blue {
  background: var(--blue);
}

.story-dark {
  background: #232127;
  color: var(--ink);
}

.story-content {
  width: 100%;
  position: relative;
}

.story-index {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 42px;
}

.story-eyebrow {
  font-size: clamp(14px, 1.7vw, 20px);
  margin: 0 0 24px;
}

.review-slide h2 {
  font-size: clamp(40px, 6vw, 86px);
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1.05;
  margin: 0 0 28px;
  overflow-wrap: anywhere;
}
.review-slide h2.story-year {
  font-size: clamp(100px, 20vw, 260px);
  line-height: 0.9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.review-slide h2.story-year span {
  font-size: 0.8em;
  font-weight: 350;
}

.story-number {
  font-size: clamp(100px, 18vw, 220px);
  display: inline-block;
  line-height: 1;
}

.story-lead {
  font-size: clamp(23px, 3vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin: 28px 0;
  max-width: 800px;
}

.story-caption {
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.75;
  margin: 28px 0 0;
}

.story-spark {
  display: flex;
  gap: clamp(5px, 1.4vw, 20px);
  height: 160px;
  max-width: 760px;
  margin-top: 36px;
}
.story-spark > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  font-size: 10px;
  text-align: center;
}
.story-spark i {
  display: block;
  height: var(--bar);
  min-height: 2px;
  background: currentColor;
  border-radius: 8px 8px 0 0;
}

.story-date-list {
  display: grid;
  gap: 12px;
}

.story-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 7px;
  position: relative;
  border: 1px solid rgba(32, 29, 41, 0.2509803922);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2078431373);
  box-shadow: 0 4px 14px rgba(32, 29, 41, 0.031372549);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 18px 20px;
  max-width: 900px;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.story-date > span:first-child {
  grid-column: 1;
  font-size: 12px;
  margin: 0;
}
.story-date strong {
  grid-column: 1;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.story-date small {
  grid-column: 1;
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}
.story-date .date-number {
  color: inherit;
  opacity: 0.65;
}
.story-date:hover {
  background: rgba(255, 255, 255, 0.3764705882);
  border-color: rgba(32, 29, 41, 0.4392156863);
  box-shadow: 0 8px 22px rgba(32, 29, 41, 0.0784313725);
}
.story-date:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.story-card-action {
  grid-column: 2;
  grid-row: 1/4;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.story-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(32, 29, 41, 0.2);
  border-radius: 50%;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.1882352941);
}

.story-tracks {
  max-width: 900px;
  margin-top: 36px;
}
.story-tracks a {
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1450980392);
  padding: 22px 0;
  color: inherit;
  text-decoration: none;
}
.story-tracks a > span:first-child {
  font-size: 12px;
  color: var(--violet);
}
.story-tracks a strong {
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.story-tracks a small {
  margin-left: auto;
  white-space: nowrap;
  color: var(--pink);
  font-size: 12px;
}
.story-tracks a:hover strong {
  color: var(--lime);
}

.story-recap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 60px;
  margin: 40px 0;
}
.story-recap > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.story-recap strong {
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 550;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.story-recap .counter-digit {
  text-align: left;
  min-width: 0 !important;
}
.story-recap > div > span {
  font-size: 13px;
}

.story-restart {
  color: inherit;
  border: 1px solid currentColor;
  background: transparent;
  padding: 12px 22px;
}
.story-restart:hover {
  background: rgba(255, 255, 255, 0.2509803922);
  color: inherit;
}

.story-controls {
  position: sticky;
  bottom: 24px;
  width: max-content;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(35, 33, 39, 0.9607843137);
  border: 1px solid rgba(255, 255, 255, 0.1882352941);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  padding: 6px;
  z-index: 5;
  color: var(--ink);
}
.story-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 20px;
  background: transparent;
  border: 0;
}
.story-controls button:disabled {
  opacity: 0.25;
  cursor: default;
}
.story-controls span {
  font-size: 12px;
  min-width: 40px;
  text-align: center;
}

.story-orbits {
  position: absolute;
  width: 240px;
  height: 240px;
  right: 0;
  bottom: -60px;
  z-index: -1;
  opacity: 0.15;
}
.story-orbits i {
  position: absolute;
  inset: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.story-orbits i:nth-child(2) {
  transform: translateX(-40px);
}
.story-orbits i:nth-child(3) {
  transform: translateX(40px);
}

@media (prefers-reduced-motion: no-preference) {
  .story-reveal-item {
    opacity: 0;
    transform: translateY(28px);
  }
  .story-reveal-item.is-revealed {
    animation: story-reveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms) both;
  }
  .story-reveal-item:is(h2).is-revealed {
    animation-name: story-stat-reveal;
    animation-duration: 0.95s;
  }
  .story-year.is-revealed > span {
    animation: story-turn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  }
  .story-spark i {
    transform: scaleY(0);
    transform-origin: bottom;
  }
  .story-spark.is-revealed i {
    animation: story-bar 0.85s cubic-bezier(0.16, 1, 0.3, 1) calc(0.25s + var(--bar-delay, 0ms)) both;
  }
  .story-reveal-item:focus-within {
    opacity: 1;
    transform: none;
    animation: none;
  }
  @keyframes story-reveal {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes story-stat-reveal {
    from {
      opacity: 0;
      transform: translateY(40px) scale(0.94);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes story-bar {
    to {
      transform: scaleY(1);
    }
  }
  @keyframes story-turn {
    from {
      transform: rotate(-50deg) scale(0.7);
      opacity: 0;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
}
@media (max-width: 800px) {
  .page-nav {
    grid-template-columns: repeat(5, 1fr);
  }
  .page-nav button {
    font-size: 11px;
  }
  .review-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .review-slide {
    min-height: calc(100svh - 112px);
    border-radius: 24px;
    padding: 32px 24px;
    scroll-margin-top: 12px;
  }
  .review-story {
    gap: 12px;
  }
  .story-index {
    margin-bottom: 32px;
  }
  .story-controls {
    bottom: 90px;
  }
  .story-tracks a {
    gap: 12px;
    padding: 20px 0;
  }
  .story-tracks a small {
    font-size: 10px;
  }
  .story-spark {
    height: 130px;
  }
  .story-spark > div {
    font-size: 8px;
  }
  .story-recap {
    gap: 24px;
  }
  .story-orbits {
    width: 160px;
    height: 160px;
  }
}
@media print {
  :root {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  main {
    max-width: none;
    padding: 0;
  }
  main > header, main > .toolbar, main > #notice, main > [role=tabpanel]:not(#review), .review-toolbar, .story-controls, dialog, .story-restart {
    display: none !important;
  }
  #review {
    display: block !important;
  }
  .review-story {
    display: block;
  }
  .review-slide {
    break-before: page;
    break-inside: avoid;
    min-height: 90vh;
    border-radius: 0;
    padding: 40px;
    margin: 0;
  }
  .story-content {
    animation: none !important;
  }
}
@media print {
  .story-reveal-item, .story-spark i, .story-year > span {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
.story-destinations {
  max-width: 900px;
  margin-top: 32px;
}

.story-destination {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(32, 29, 41, 0.2);
}
.story-destination strong {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.story-destination > span {
  text-align: right;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 800px) {
  .story-destination {
    flex-direction: column;
    gap: 8px;
  }
  .story-destination > span {
    text-align: left;
    font-size: 12px;
  }
}
.story-favourite-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.story-favourite-pair .story-date {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
}
.story-favourite-pair .story-date .story-card-action {
  grid-column: 1;
  grid-row: auto;
  justify-content: space-between;
  margin-top: 10px;
}
@media (max-width: 800px) {
  .story-favourite-pair {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.story-future-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.story-future-actions .story-future-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}
.story-future-actions .story-future-link:hover {
  background: rgba(255, 255, 255, 0.2509803922);
}

.quiz-stage {
  color: #201d29;
  padding: clamp(26px, 5vw, 64px);
  border-radius: 32px;
  min-height: 560px;
}
.quiz-stage h2 {
  font-size: clamp(32px, 4.5vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin: 32px 0;
  max-width: 1000px;
  font-weight: 550;
  outline: none;
}
.quiz-stage > button {
  margin: 18px 10px 0 0;
  background: #201d29;
  border: 1px solid #201d29;
  color: white;
  padding: 14px 24px;
}
.quiz-stage > button:hover {
  background: #393245;
}
.quiz-stage > button:disabled {
  opacity: 0.4;
  cursor: default;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  opacity: 0.75;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.quiz-options button {
  text-align: left;
  color: #201d29;
  background: rgba(255, 255, 255, 0.2509803922);
  border: 1px solid rgba(32, 29, 41, 0.2509803922);
  border-radius: 16px;
  min-height: 76px;
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.quiz-options button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.5019607843);
  border-color: #201d29;
}
.quiz-options button:disabled {
  cursor: default;
}
.quiz-options button.is-correct {
  background: #201d29;
  color: white;
  border-color: #201d29;
}
.quiz-options button.is-correct::before {
  content: "✓ ";
}
.quiz-options button.is-wrong {
  border: 2px solid #9c253c;
  background: rgba(255, 255, 255, 0.3764705882);
}
.quiz-options button.is-wrong::before {
  content: "✕ ";
}

.quiz-feedback {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
}
.quiz-feedback p {
  margin: 8px 0;
}

.quiz-score {
  font-size: 12px;
  margin: 24px 0 0;
  opacity: 0.7;
}

.quiz-filters {
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: no-preference) {
  .quiz-stage h2 {
    animation: story-stat-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .quiz-options button {
    animation: story-reveal 0.5s ease-out both;
  }
  .quiz-options button:nth-child(2) {
    animation-delay: 0.06s;
  }
  .quiz-options button:nth-child(3) {
    animation-delay: 0.12s;
  }
  .quiz-options button:nth-child(4) {
    animation-delay: 0.18s;
  }
}
@media (max-width: 800px) {
  .page-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    padding-inline: 6px;
  }
  .page-nav button {
    font-size: 10px;
    padding-inline: 2px;
  }
  .quiz-options {
    grid-template-columns: 1fr;
  }
  .quiz-stage {
    border-radius: 24px;
    min-height: 0;
  }
  .quiz-progress {
    font-size: 11px;
  }
  .quiz-options button {
    min-height: 64px;
    padding: 16px;
    font-size: 14px;
  }
}
.quiz-picker {
  border: 0;
  padding: 0;
  margin: 36px 0 20px;
  max-width: 600px;
}
.quiz-picker legend {
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 14px;
}

.quiz-scopes {
  display: flex;
  gap: 6px;
  background: rgba(32, 29, 41, 0.0823529412);
  padding: 5px;
  border-radius: 16px;
}
.quiz-scopes button {
  flex: 1;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #201d29;
  padding: 13px 16px;
  min-height: 46px;
}
.quiz-scopes button[aria-pressed=true] {
  background: #201d29;
  color: #fff;
}
.quiz-scopes button:hover:not([aria-pressed=true]) {
  background: rgba(255, 255, 255, 0.3137254902);
}

.quiz-period-fields {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}
.quiz-period-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  font-size: 12px;
}
.quiz-period-fields select {
  width: 100%;
  background: rgba(255, 255, 255, 0.2509803922);
  color: #201d29;
  border-color: rgba(32, 29, 41, 0.2509803922);
  border-radius: 12px;
  min-height: 48px;
}
.quiz-period-fields select option {
  color: #201d29;
  background: #fff;
}

.quiz-period-summary {
  font-size: 14px;
  margin: 18px 0 0;
}

.quiz-intro-note {
  font-size: 12px;
  opacity: 0.75;
}

.quiz-progress {
  align-items: center;
  flex-wrap: wrap;
}
.quiz-progress button {
  margin-left: auto;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(32, 29, 41, 0.3137254902);
  font-size: 11px;
  padding: 8px 12px;
}

@media (max-width: 800px) {
  .quiz-scopes button {
    padding-inline: 10px;
    font-size: 13px;
  }
}
.quiz-modes, .segmented-control {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
}
.quiz-modes button, .segmented-control button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 20px;
}
.quiz-modes button[aria-selected=true], .quiz-modes button[aria-pressed=true], .segmented-control button[aria-selected=true], .segmented-control button[aria-pressed=true] {
  color: #201d29;
  background: var(--violet);
}

.guess-description {
  max-width: 850px;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 32px;
}

.guess-picker {
  margin-top: 32px;
}
.guess-picker label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.guess-picker label strong {
  font-size: 22px;
  font-weight: 500;
}
.guess-picker input[type=range] {
  appearance: none;
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin: 12px 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: ew-resize;
  accent-color: #201d29;
}
.guess-picker input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 6px;
  background: rgba(32, 29, 41, 0.2);
}
.guess-picker input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -12px;
  border: 4px solid #fff9ed;
  border-radius: 50%;
  background: #6b43b0;
  box-shadow: 0 3px 9px rgba(32, 29, 41, 0.1882352941);
}
.guess-picker input[type=range]::-moz-range-track {
  height: 5px;
  border-radius: 6px;
  background: rgba(32, 29, 41, 0.2);
}
.guess-picker input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid #fff9ed;
  border-radius: 50%;
  background: #6b43b0;
}
.guess-picker input[type=range]:disabled {
  cursor: default;
  opacity: 0.65;
}

.guess-month-buttons {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}
.guess-month-buttons button {
  min-height: 44px;
  padding: 8px 2px;
  border: 1px solid rgba(32, 29, 41, 0.1882352941);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1450980392);
  color: #201d29;
  font-size: 12px;
}
.guess-month-buttons button[aria-pressed=true] {
  background: #6b43b0;
  color: #fff9ed;
  border-color: #6b43b0;
}
.guess-month-buttons button:hover:not(:disabled) {
  border-color: #201d29;
  background: rgba(255, 255, 255, 0.3137254902);
  color: #201d29;
}
.guess-month-buttons button:disabled {
  cursor: default;
  opacity: 0.7;
}

.guess-comparison {
  margin: 24px 14px 10px;
}

.guess-rail {
  position: relative;
  height: 2px;
  margin: 20px 0 28px;
  background: rgba(32, 29, 41, 0.1882352941);
}
.guess-rail .guess-distance {
  position: absolute;
  height: 2px;
  background: rgba(32, 29, 41, 0.5019607843);
}
.guess-rail .guess-pin, .guess-rail .actual-pin {
  position: absolute;
  top: -7px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 3px solid #fff9ed;
  border-radius: 50%;
  background: #6b43b0;
}
.guess-rail .actual-pin {
  top: 5px;
  border-radius: 2px;
  background: #305568;
  rotate: 45deg;
}

.guess-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.7;
}

.guess-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}
.guess-legend span:first-child {
  color: #59338f;
}
.guess-legend span:last-child {
  color: #305568;
}

.guess-results {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.guess-result {
  padding: 24px;
  background: rgba(255, 255, 255, 0.1882352941);
  border: 1px solid rgba(32, 29, 41, 0.2);
  border-radius: 18px;
}
.guess-result h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 10px;
}
.guess-result p {
  font-size: 12px;
  line-height: 1.7;
}

.guess-date-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-size: 12px;
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .guess-feedback .guess-pin, .guess-feedback .actual-pin {
    animation: detail-appear 240ms ease-out;
  }
}
@media (max-width: 800px) {
  .quiz-modes {
    width: 100%;
  }
  .quiz-modes button {
    flex: 1;
  }
  .guess-month-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .guess-description {
    font-size: 13px;
  }
  .guess-picker label {
    flex-wrap: wrap;
  }
  .guess-result {
    padding: 18px;
  }
}
.intro {
  flex-wrap: wrap;
}

.page-nav {
  flex-wrap: wrap;
}
.page-nav button {
  padding-inline: 14px;
}

.mobile-page-nav {
  display: none;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.6fr);
  gap: clamp(32px, 6vw, 100px);
  align-items: start;
  padding: 38px 0 64px;
  border-top: 1px solid var(--line);
}
.chapter-summary {
  position: sticky;
  top: 32px;
}
.chapter-heading > span {
  color: var(--muted);
  font-size: 16px;
}
.chapter-heading h3 {
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 12px 0;
}
.chapter-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.chapter-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 36px;
}
.chapter-cloud button {
  border: 0;
  background: none;
  padding: 3px 0;
  line-height: 1.25;
  border-radius: 0;
  overflow-wrap: anywhere;
}
.chapter-cloud button[aria-pressed=true] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.chapter-cloud button:hover {
  opacity: 0.75;
}
.chapter-word-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 24px 0 0;
}
.chapter-dates {
  display: grid;
  gap: 18px;
}
.chapter-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px;
  border-radius: 22px;
}
.chapter-card h4 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 20px 0 12px;
}
.chapter-card.is-word-match {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet);
}
.chapter-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}
.chapter-card-top .holiday-badge {
  margin-left: auto;
}
.chapter-landmark {
  color: var(--lime);
  font-size: 13px;
  margin: 0 0 16px;
}
.chapter-range {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.7;
}
.chapter-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.chapter-open {
  display: block;
  color: var(--violet);
  font-size: 12px;
  margin-top: 22px;
}

@media (max-width: 800px) {
  .page-nav {
    display: none;
  }
  .mobile-page-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(31, 31, 35, 0.9607843137);
    backdrop-filter: blur(15px);
  }
  .mobile-page-nav label {
    color: var(--muted);
    font-size: 12px;
  }
  .mobile-page-nav select {
    flex: 1;
    min-height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }
  .chapter {
    display: block;
    padding: 0 0 40px;
    border-top: 0;
  }
  .chapter-summary {
    position: static;
  }
  .chapter-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(16, 16, 18, 0.9607843137);
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 12px;
    backdrop-filter: blur(12px);
  }
  .chapter-heading h3 {
    font-size: 27px;
    margin: 0;
    order: -1;
  }
  .chapter-heading > span {
    font-size: 13px;
  }
  .chapter-heading p {
    margin-left: auto;
    white-space: nowrap;
    font-size: 11px;
  }
  .chapter-summary {
    display: contents;
  }
  .chapter-cloud {
    margin: 22px 0 0;
    gap: 7px 12px;
  }
  .chapter-word-status {
    margin: 14px 0 24px;
  }
  .chapter-card {
    padding: 22px;
  }
  .chapter-card h4 {
    font-size: 21px;
  }
  .chapter-description {
    font-size: 13px;
  }
}
@media print {
  .mobile-page-nav {
    display: none !important;
  }
}
@media (max-width: 800px) {
  .story-date {
    padding: 16px;
    column-gap: 14px;
  }
  .story-card-action {
    font-size: 0;
    gap: 0;
  }
}
.counter-digit {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.counter-final {
  display: none;
}

@media print {
  .counter-live {
    display: none !important;
  }
  .counter-final {
    display: inline !important;
  }
}
.overview-travel {
  margin-top: 20px;
}

.suitcase-collection {
  width: 100%;
}

.travel-case {
  position: relative;
  width: min(100%, 420px);
  margin: 54px auto 36px;
  padding: 0 12px;
  isolation: isolate;
}

.case-handle {
  position: absolute;
  width: 38%;
  height: 64px;
  top: -48px;
  left: 31%;
  border: 12px solid #4a6578;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  z-index: -1;
  box-shadow: inset 4px 0 #bad4f4;
}

.case-body {
  position: relative;
  min-height: 285px;
  padding: 48px 26px 30px;
  border-radius: 40px;
  border: 2px solid rgba(49, 44, 62, 0.1882352941);
  background: linear-gradient(145deg, #c69b84 0 48%, #b98777 48% 100%);
  box-shadow: inset 8px 0 rgba(255, 255, 255, 0.1254901961), inset -9px 0 rgba(50, 39, 62, 0.0901960784), 0 15px 24px rgba(32, 29, 41, 0.0941176471);
}
.case-body::before, .case-body::after {
  content: "";
  position: absolute;
  inset: 18px auto 18px 19%;
  width: 10px;
  border-radius: 20px;
  background: rgba(244, 217, 174, 0.4);
  z-index: 0;
}
.case-body::after {
  left: auto;
  right: 19%;
}

.case-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  color: #fff2db;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
}

.case-wheel {
  position: absolute;
  bottom: -18px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #4a6578;
  border: 7px solid #99b5ab;
  z-index: -1;
}
.case-wheel-left {
  left: 22%;
}
.case-wheel-right {
  right: 22%;
}

.case-stickers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--sticker-columns, 2), minmax(0, 1fr));
  align-items: center;
  gap: 14px 8px;
  z-index: 1;
  min-height: 205px;
}

.country-sticker {
  position: relative;
  border: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 180px;
  justify-self: center;
  border-radius: 25%;
  background: transparent;
  transform: rotate(var(--sticker-angle));
  filter: drop-shadow(0 5px 3px rgba(45, 34, 59, 0.2078431373));
  transition: filter 0.2s;
}
.country-sticker img {
  display: block;
  width: 100%;
  height: auto;
}
.country-sticker:hover, .country-sticker[aria-expanded=true] {
  background: transparent;
  filter: drop-shadow(0 7px 5px rgba(45, 34, 59, 0.3960784314)) brightness(1.05);
}
.country-sticker:focus-visible {
  outline: 3px solid #fff9ed;
  outline-offset: 5px;
}
.country-sticker-fallback {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 16px 10px;
  color: #302944;
  background: var(--sticker-colour, var(--lime));
  border: 7px solid #fff9ed;
  border-radius: 32px;
}
.country-sticker-fallback > span {
  font-size: 36px;
}
.country-sticker-fallback strong {
  font-size: clamp(13px, 1.6vw, 20px);
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.country-sticker-fallback small {
  font-size: 8px;
  letter-spacing: 2px;
}

.travel-hint {
  text-align: center;
  color: inherit;
  opacity: 0.75;
  font-size: 12px;
  margin: 12px 0;
}

.travel-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 30px 0;
}

.travel-country-details {
  margin: 24px 0 0;
  border: 1px solid rgba(32, 29, 41, 0.2509803922);
  border-radius: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1882352941);
}
.travel-country-details h3 {
  font-size: 24px;
  margin: 0;
  font-weight: 500;
}
.travel-country-details > p {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.8;
}

a.travel-date {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid rgba(32, 29, 41, 0.1882352941);
  border-radius: 0;
  background: none;
}
a.travel-date > span {
  font-size: 11px;
  opacity: 0.75;
}
a.travel-date strong {
  font-size: 16px;
  font-weight: 500;
}
a.travel-date:hover {
  background: rgba(255, 255, 255, 0.1254901961);
}

.overview-travel .suitcase-collection {
  max-width: 720px;
  margin: auto;
}
.overview-travel .travel-case {
  max-width: 360px;
}
.overview-travel .travel-country-details {
  border-color: var(--line);
  background: var(--surface);
}
.overview-travel a.travel-date {
  border-color: var(--line);
}
.overview-travel .travel-hint {
  color: var(--muted);
}

.review-travel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.review-travel-layout h2 {
  font-size: clamp(38px, 4vw, 64px);
}
.review-travel-layout .story-number {
  font-size: clamp(90px, 10vw, 150px);
}

@media (prefers-reduced-motion: no-preference) {
  .suitcase-collection.is-revealed .country-sticker {
    animation: sticker-arrive 0.65s cubic-bezier(0.16, 1, 0.3, 1) calc(0.2s + var(--sticker-delay, 0ms)) both;
  }
  @keyframes sticker-arrive {
    from {
      opacity: 0;
      transform: translateY(-22px) rotate(calc(var(--sticker-angle) - 12deg)) scale(1.18);
    }
    to {
      opacity: 1;
      transform: rotate(var(--sticker-angle)) scale(1);
    }
  }
}
@media (max-width: 800px) {
  .review-travel-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .travel-case {
    max-width: 340px;
  }
  .case-body {
    border-radius: 30px;
    padding: 45px 20px 24px;
    min-height: 240px;
  }
  .case-stickers {
    min-height: 180px;
  }
  .tools {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .country-sticker-fallback {
    min-height: 120px;
    border-width: 5px;
  }
}
@media print {
  .country-sticker {
    opacity: 1 !important;
    animation: none !important;
    transform: rotate(var(--sticker-angle)) !important;
  }
}
@media (min-width: 801px) {
  .overview-travel .suitcase-collection:has(.travel-country-details:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 60px);
    max-width: none;
  }
  .overview-travel .suitcase-collection:has(.travel-country-details:not([hidden])) .travel-country-details {
    margin: 0;
  }
  .overview-travel .suitcase-collection:has(.travel-country-details:not([hidden])) .travel-country-list {
    min-width: 0;
  }
}
:root {
  --motion-fast:160ms;
  --motion-panel:240ms;
  --motion-ease:cubic-bezier(.2,.7,.2,1);
}

@media (prefers-reduced-motion: no-preference) {
  button, .button, select, input, a.keyword-tag, .cloud-term, .calendar-day, .timeline-label, .vertical-pin, a.date-card, .story-date, .chapter-card, .travel-date, .journal-entry-row, .quiz-options button {
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease;
  }
  .country-sticker {
    transition: filter 180ms ease, opacity 180ms ease;
  }
  .country-sticker[aria-expanded=true] {
    filter: drop-shadow(0 7px 5px rgba(45, 34, 59, 0.3960784314)) brightness(1.07);
  }
  .page-panel:not([hidden]), #overview-page:not([hidden]) {
    animation: page-appear var(--motion-panel) ease-out;
  }
  .travel-country-details:not([hidden]), .drawer-day-list, .keyword-filter[open] .keyword-menu {
    animation: detail-appear var(--motion-panel) var(--motion-ease);
  }
  .date-drawer::backdrop {
    animation: page-appear 180ms ease-out;
  }
  .date-drawer .record-content {
    animation: page-appear 180ms ease-out;
  }
  .dashboard-tooltip:not([hidden]) {
    animation: tooltip-appear 140ms ease-out;
  }
  .quiz-feedback:not(:empty) {
    animation: detail-appear 180ms ease-out;
  }
  .story-card-action .story-arrow, .chapter-open > span {
    transition: translate var(--motion-fast) var(--motion-ease);
  }
  .story-date:hover .story-arrow, .chapter-card:hover .chapter-open > span {
    translate: 2px -2px;
  }
  @keyframes page-appear {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes detail-appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes tooltip-appear {
    from {
      opacity: 0;
      translate: 0 3px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .story-reveal-item {
    opacity: 1;
    transform: none;
  }
  .story-spark i {
    transform: none;
  }
}
.overview-pulses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.overview-pulses .overview-pulse {
  min-height: 220px;
  background: var(--blue);
  color: #201d29;
  text-decoration: none;
}
.overview-pulses .overview-pulse:nth-child(2) {
  background: var(--pink);
}
.overview-pulses .overview-pulse:nth-child(3) {
  background: var(--lime);
}
.overview-pulses .overview-pulse small {
  line-height: 1.7;
  max-width: 100%;
}

.pulse-value {
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 25px 0 12px;
  overflow-wrap: anywhere;
}

.pulse-meta {
  font-size: 12px;
  margin: 0 0 10px;
  opacity: 0.8;
}

.pulse-cue {
  font-size: 11px;
  margin-top: auto;
  padding-top: 16px;
}

.pulse-link:hover {
  box-shadow: inset 0 0 0 2px rgba(32, 29, 41, 0.3137254902);
}

@media (max-width: 800px) {
  .overview-pulses {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overview-pulses .overview-pulse {
    min-height: 185px;
  }
  .pulse-value {
    font-size: 28px;
  }
}
.overview-graphs {
  margin-bottom: 20px;
}

.page-panel {
  margin-top: 0;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  margin: 8px 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.4px;
}
.page-header .page-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 0 auto;
}
.page-header .page-controls select {
  margin: 0;
}
.page-header .page-controls input {
  max-width: 220px;
}
@media (max-width: 800px) {
  .page-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
  .page-header .page-controls {
    max-width: 100%;
  }
  .page-header .history-controls {
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .page-header .history-controls input {
    flex: 1 1 160px;
    max-width: none;
  }
}

.calendar-controls {
  margin-top: 0;
}
.calendar .calendar-year-heading {
  background: var(--paper);
}

#chapters-content > .chapter:first-child {
  border-top: 0;
  padding-top: 0;
}

@media print {
  .page-header {
    display: none !important;
  }
}
.planned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  margin-left: 6px;
  border: 1px solid rgba(186, 212, 244, 0.3333333333);
  border-radius: 999px;
  background: rgba(186, 212, 244, 0.0941176471);
  color: var(--blue);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}
.planned-badge::before {
  content: "◷";
  font-size: 12px;
}

.planned-duration {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}

.metrics--planning {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 800px) {
  .metrics--planning {
    grid-template-columns: 1fr;
  }
}

.metric--planning-count {
  background: var(--blue);
}
.metric--planning-next {
  background: var(--violet);
}
.metric-value--title {
  font-size: clamp(24px, 2.5vw, 32px);
  letter-spacing: -0.7px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.journal.upcoming-only thead th:nth-child(-n+2),
.journal.upcoming-only #rows tr[data-entry] > td:nth-child(-n+2) {
  display: none;
}
@media (max-width: 800px) {
  .journal.upcoming-only #rows .journal-entry-row td:nth-child(4) {
    grid-row: 1;
  }
  .journal.upcoming-only #rows .journal-entry-row td:nth-child(3) {
    grid-row: 2;
  }
  .journal.upcoming-only #rows .journal-entry-row td:nth-child(5) {
    grid-row: 3;
  }
}
.journal .journal-countdown {
  display: block;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tools button, .tools .button, .tools select, .tools input:not([type=checkbox]), .tools .keyword-picker summary, .tools.filter-picker > summary, .page-header .page-controls button, .page-header .page-controls .button, .page-header .page-controls select, .page-header .page-controls input:not([type=checkbox]), .page-header .page-controls .keyword-picker summary, .page-header .page-controls.filter-picker > summary, .filter-picker button, .filter-picker .button, .filter-picker select, .filter-picker input:not([type=checkbox]), .filter-picker .keyword-picker summary, .filter-picker.filter-picker > summary {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 12px;
  line-height: 22px;
}
.tools select, .tools .keyword-picker summary, .tools.filter-picker > summary, .page-header .page-controls select, .page-header .page-controls .keyword-picker summary, .page-header .page-controls.filter-picker > summary, .filter-picker select, .filter-picker .keyword-picker summary, .filter-picker.filter-picker > summary {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-color: #242428;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa6b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--ink);
}
.tools .keyword-picker summary::after, .page-header .page-controls .keyword-picker summary::after, .filter-picker .keyword-picker summary::after {
  content: none;
}

.filter-picker {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin-bottom: 20px;
}
.filter-picker > summary {
  list-style: none;
  cursor: pointer;
}
.filter-picker > summary::-webkit-details-marker {
  display: none;
}
.filter-picker > summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}
.filter-picker .filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: min(300px, 100vw - 84px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3333333333);
}
.filter-picker .filter-menu label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
}
.filter-picker .filter-menu select, .filter-picker .filter-menu input {
  width: 100%;
  min-width: 0;
}
.filter-picker .filter-menu p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.page-controls .filter-picker {
  margin-bottom: 0;
}
.page-controls .filter-picker .filter-menu {
  left: auto;
  right: 0;
  width: min(540px, 100vw - 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  max-height: min(75vh, 720px);
  overflow-y: auto;
}
.page-controls .filter-picker .filter-menu label {
  margin-bottom: 0;
}
.page-controls .filter-picker .filter-menu input, .page-controls .filter-picker .filter-menu select {
  max-width: none;
}
.page-controls .filter-picker .filter-menu > p, .page-controls .filter-picker .filter-menu > button, .page-controls .filter-picker .filter-menu .keyword-filter {
  grid-column: 1/-1;
}
.page-controls .filter-picker .filter-menu > p {
  margin: 0;
}
.page-controls .filter-picker .keyword-filter {
  min-width: 0;
  margin: 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.page-controls .filter-picker .keyword-filter legend {
  padding: 0 8px 0 0;
  font-size: 12px;
}
.page-controls .filter-picker .keyword-filter > input {
  width: 100%;
}
.page-controls .filter-picker .keyword-filter p {
  margin: 8px 0;
}
.page-controls .filter-picker .keyword-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  max-height: 200px;
  overflow-y: auto;
}
.page-controls .filter-picker .keyword-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.page-controls .filter-picker .keyword-options label input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--violet);
  flex-shrink: 0;
}

.page-controls .filter-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #242428;
}
.page-controls .filter-control .filter-picker > summary {
  border: 0;
  background-color: transparent;
}
.page-controls .filter-control #show-all-dates {
  width: 40px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.page-controls .filter-control #show-all-dates:hover {
  background: #35343c;
  color: var(--ink);
}

.awaiting-data .page-nav, .awaiting-data .mobile-page-nav, .awaiting-data .toolbar, .awaiting-data #notice, .awaiting-data [role=tabpanel] {
  display: none !important;
}

.csv-welcome {
  display: grid;
  place-items: center;
  min-height: 65vh;
  padding: 24px 0;
}

.csv-drop {
  width: min(560px, 100%);
  padding: clamp(28px, 6vw, 64px) 24px;
  border: 1px dashed var(--line);
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.csv-drop.drag-over {
  border-color: var(--violet);
  background: rgba(161, 138, 255, 0.0941176471);
  transform: scale(1.015);
}
.csv-drop h2 {
  margin: 16px 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -1px;
  line-height: 1.2;
}
.csv-drop p {
  margin: 0 0 24px;
  color: var(--muted);
}
.csv-drop button {
  background: var(--violet);
  color: #201d29;
  padding-inline: 28px;
}
.csv-drop small {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}
.csv-drop #csv-import-error {
  margin: 20px 0 0;
  color: var(--pink);
}

.csv-illustration {
  width: 110px;
  height: 110px;
  color: var(--violet);
}

.csv-privacy {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.csv-privacy h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
}
.csv-privacy p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
}
.csv-privacy p:last-child {
  margin-bottom: 0;
}
.csv-privacy strong {
  color: var(--ink);
  font-weight: 500;
}

.import-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.import-actions #sheet-choose {
  background: transparent;
  color: var(--ink);
}

.sheet-dialog {
  width: min(520px, 100vw - 32px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
}
.sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.sheet-dialog h2 {
  margin: 0;
  font-size: 20px;
}
.sheet-dialog p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.sheet-dialog label {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  font-size: 12px;
}
.sheet-dialog input {
  width: 100%;
  min-width: 0;
}
.sheet-dialog label span {
  color: var(--muted);
}
.sheet-dialog #sheet-error {
  color: var(--pink);
}
.sheet-dialog #sheet-submit {
  background: var(--violet);
  color: #201d29;
}

.sheet-dialog .data-current {
  padding: 16px;
  margin: 20px 0;
  background: var(--paper);
  border-radius: 14px;
}
.sheet-dialog .data-current > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.sheet-dialog .data-current strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.sheet-dialog .data-current p {
  margin: 6px 0 0;
}
.sheet-dialog .data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sheet-dialog .data-forget {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 24px;
}

.calendar-day.met.early-continuation {
  background: transparent;
  border-color: var(--calendar-day-tint);
  color: #d9cdff;
}
.calendar-day.holiday.early-continuation {
  background: transparent;
  border-color: var(--calendar-day-tint);
  color: #ffdaef;
}
.calendar-day.early-continuation:hover {
  background: transparent;
  border-color: var(--calendar-day-tint);
  box-shadow: 0 0 0 1px var(--calendar-day-tint);
}

.calendar-legend .continuation-key {
  background: transparent;
  border: 1px solid rgba(161, 138, 255, 0.2078431373);
}

.calendar-legend {
  flex-wrap: wrap;
}
