:root {
  color-scheme: dark;
  --background: #080b12;
  --surface: #111723;
  --surface-raised: #171f2e;
  --border: #293348;
  --text: #e7ebf2;
  --muted: #929db0;
  --accent: #d9b96e;
  --accent-soft: rgba(217, 185, 110, 0.12);
  --blue: #71a7ff;
  --purple: #c79aff;
  --yellow: #f2cf69;
  --green: #7bd995;
  --orange: #f3a36d;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -10%, rgba(217, 185, 110, 0.1), transparent 30rem),
    linear-gradient(180deg, #0b0f18 0, var(--background) 24rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(41, 51, 72, 0.85);
  background: rgba(8, 11, 18, 0.9);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.page {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.header-note {
  color: var(--muted);
  font-size: 13px;
}

.page {
  padding: 56px 0 80px;
}

.hero {
  max-width: 790px;
  padding: 34px 0 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero__lead {
  max-width: 680px;
  margin-bottom: 0;
  color: #c5ccd8;
  font-size: clamp(17px, 2.2vw, 21px);
}

.archive-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 18px;
}

.archive-heading h2 {
  margin: 0;
  font-size: 22px;
}

.archive-heading span {
  color: var(--muted);
  font-size: 13px;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.day-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--surface-raised), var(--surface));
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.day-card:hover {
  transform: translateY(-2px);
  border-color: #6d6045;
  background: linear-gradient(135deg, #1d2431, #131924);
}

.day-card__number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #6d6045;
  border-radius: 50%;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.day-card__title {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 700;
}

.day-card__meta {
  color: var(--muted);
  font-size: 13px;
}

.day-card__arrow {
  color: var(--accent);
  font-size: 23px;
}

.day-header {
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--border);
}

.day-header h1 {
  margin-bottom: 10px;
  font-size: clamp(38px, 6vw, 64px);
}

.day-meta {
  color: var(--muted);
}

.day-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
}

.day-nav a,
.day-nav span {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.day-nav a:hover {
  border-color: #6d6045;
  color: var(--accent);
}

.chronicle {
  padding-top: 20px;
}

.hour-section {
  margin-top: 30px;
}

.hour-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hour-title::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.entry {
  margin: 6px 0;
  padding: 9px 12px;
  border-left: 3px solid var(--border);
  border-radius: 5px;
  background: rgba(17, 23, 35, 0.88);
  font-size: 14px;
}

.entry--action {
  border-color: var(--blue);
}

.entry--dialogue {
  border-color: var(--purple);
  background: rgba(199, 154, 255, 0.055);
}

.entry--diary {
  border-color: var(--accent);
}

.entry--event {
  border-color: var(--yellow);
}

.entry--plan {
  border-color: var(--green);
}

.entry--memory {
  border-color: var(--orange);
}

.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.entry__time,
.entry__location {
  color: var(--muted);
  font-size: 12px;
}

.entry__type {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry__agent {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.entry__text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.dialogue-lines {
  display: grid;
  gap: 5px;
}

.dialogue-line {
  display: grid;
  grid-template-columns: minmax(90px, 150px) 1fr;
  gap: 10px;
}

.dialogue-line__name {
  color: var(--purple);
  font-weight: 700;
}

.empty-state {
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .site-header__inner,
  .page {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .header-note {
    display: none;
  }

  .page {
    padding-top: 34px;
  }

  .hero {
    padding-top: 20px;
  }

  .day-grid {
    grid-template-columns: 1fr;
  }

  .day-card {
    min-height: 96px;
  }

  .dialogue-line {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
