:root {
  --bg: #f4efe6;
  --card: #fff8ef;
  --ink: #1e1b18;
  --muted: #736a61;
  --brand: #d24d1f;
  --brand-dark: #8e2f14;
  --line: #e7d7c6;
  --ok: #0b8f55;
  --warn: #9e3d16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, #f8dcc2 0, transparent 30%),
    radial-gradient(circle at 90% 10%, #f5c1ac 0, transparent 25%),
    linear-gradient(140deg, #f9f5ef 0%, #efe2d2 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.2rem;
}

.topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.brand {
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.menu {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.menu a {
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: color-mix(in srgb, var(--card) 88%, white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(52, 35, 22, 0.08);
}

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

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid #cfbca7;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

button,
.btn {
  width: auto;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  padding: 0.55rem 0.9rem;
}

button.secondary,
.btn.secondary {
  background: var(--brand-dark);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.55rem;
  vertical-align: top;
}

.badge {
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.16rem 0.6rem;
  border: 1px solid var(--line);
}

.badge.ok {
  background: #d8f3e4;
  border-color: #9fd4b6;
  color: #1b6445;
}

.badge.warn {
  background: #f5ddd1;
  border-color: #e2b9a7;
  color: #8a3516;
}

.alert {
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #d5f0df;
  color: #154f34;
  border: 1px solid #a7d3b8;
  padding: 0.7rem 0.9rem;
}

.video-shell {
  max-width: 780px;
  margin: 2rem auto;
}

video,
img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #000;
}

@media (max-width: 860px) {
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

.timeline-shell {
  width: min(740px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid rgba(120, 90, 60, 0.18);
  border-right: 1px solid rgba(120, 90, 60, 0.18);
  background: rgba(255, 250, 244, 0.72);
  backdrop-filter: blur(4px);
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(120, 90, 60, 0.18);
  background: rgba(255, 248, 239, 0.9);
}

.timeline-brand {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.timeline-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline-list {
  display: grid;
}

.timeline-item {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(120, 90, 60, 0.18);
  animation: post-in 240ms ease-out;
}

.timeline-item h2 {
  font-size: 1.1rem;
  margin: 0 0 0.45rem;
}

.timeline-item p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.timeline-item img,
.timeline-item video {
  display: block;
  width: min(100%, 520px);
  margin: 0 auto;
  max-height: clamp(200px, 46vh, 420px);
  background: #16120f;
  border-radius: 16px;
}

.timeline-item img {
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.timeline-item video {
  object-fit: contain;
  aspect-ratio: auto;
  width: min(100%, 420px);
  max-height: clamp(260px, 62vh, 620px);
}

@media (max-width: 640px) {
  .timeline-item img,
  .timeline-item video {
    width: 100%;
    max-height: clamp(190px, 36vh, 300px);
  }

  .timeline-item video {
    max-height: clamp(260px, 56vh, 520px);
  }
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.65rem;
}

.timeline-empty {
  text-align: center;
  padding: 3rem 1.1rem;
}

.timeline-pagination {
  padding: 1rem 1.1rem 2rem;
}

.timeline-pagination nav {
  display: flex;
  justify-content: center;
}

@keyframes post-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
