:root {
  --bg: #f6f6f9;
  --paper: #ffffff;
  --ink: #202225;
  --primary: #3c6074;
  --primary-soft: #bbdff8;
  --secondary: #a400a4;
  --secondary-soft: #ffbdf3;
  --tertiary: #ffd709;
  --night: #171b3a;
  --border: #000000;
  --shadow: 8px 8px 0 0 var(--secondary);
  --shadow-soft: 6px 6px 0 0 rgba(0, 0, 0, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(164, 0, 164, 0.08), transparent 0 18rem),
    radial-gradient(circle at 85% 10%, rgba(60, 96, 116, 0.12), transparent 0 20rem),
    radial-gradient(circle at 50% 80%, rgba(255, 215, 9, 0.1), transparent 0 18rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(var(--primary) 1.5px, transparent 1.5px),
    radial-gradient(var(--secondary) 1px, transparent 1px);
  background-size: 18px 18px, 32px 32px;
  background-position: 0 0, 8px 10px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px 20px;
  border: 4px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 6px 6px 0 0 rgba(164, 0, 164, 0.45);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.brand-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  color: var(--secondary);
}

.brand-subtitle {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(32, 34, 37, 0.72);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.date-picker-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: #cce7ff;
  box-shadow: 4px 4px 0 0 var(--border);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.date-picker-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-picker-value {
  font-size: 1rem;
}

.calendar-picker {
  position: relative;
}

.calendar-popover {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 360px;
  padding: 18px;
  border: 4px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 189, 243, 0.18));
  box-shadow: 10px 10px 0 0 rgba(164, 0, 164, 0.28);
}

.calendar-legend {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-legend-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 3px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.calendar-legend-chip.is-available {
  background: linear-gradient(180deg, rgba(255, 215, 9, 0.95), rgba(255, 240, 166, 0.95));
  box-shadow: 4px 4px 0 0 rgba(164, 0, 164, 0.18);
}

.calendar-legend-chip.is-unavailable {
  background: #ececf0;
  color: rgba(32, 34, 37, 0.44);
  border-color: rgba(0, 0, 0, 0.24);
  filter: grayscale(1);
}

.calendar-head {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-month-label {
  text-align: center;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
}

.calendar-nav {
  min-height: 44px;
  border: 3px solid var(--border);
  border-radius: 16px;
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 0 var(--border);
}

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

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: rgba(32, 34, 37, 0.68);
}

.calendar-day {
  min-height: 42px;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.calendar-day.is-available {
  background: linear-gradient(180deg, rgba(255, 215, 9, 0.95), rgba(255, 240, 166, 0.95));
  box-shadow: 5px 5px 0 0 rgba(164, 0, 164, 0.22);
}

.calendar-day.is-available:hover {
  transform: translate(-1px, -1px) rotate(-2deg);
  box-shadow: 7px 7px 0 0 rgba(164, 0, 164, 0.28);
}

.calendar-day.is-selected {
  background: linear-gradient(180deg, rgba(164, 0, 164, 0.92), rgba(214, 89, 214, 0.92));
  color: #ffffff;
  box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.2);
}

.calendar-day.is-unavailable {
  background: #ececf0;
  color: rgba(32, 34, 37, 0.4);
  border-color: rgba(0, 0, 0, 0.26);
  filter: grayscale(1);
  cursor: not-allowed;
}

.calendar-day.is-other-month {
  opacity: 0.42;
}

.button,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.pill-link:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.button-primary {
  background: var(--tertiary);
  box-shadow: 4px 4px 0 0 var(--border);
}

.button-secondary {
  background: var(--primary-soft);
  box-shadow: 4px 4px 0 0 var(--border);
}

.hero-grid,
.archive-grid,
.stat-grid,
.phase-grid {
  display: grid;
  gap: 22px;
}

.hero-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
  margin-bottom: 28px;
}

.hero-grid-single {
  grid-template-columns: 1fr;
}

.panel {
  border: 4px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel-pop {
  box-shadow: var(--shadow);
}

.profile-panel {
  padding: 28px;
  transform: rotate(-1deg);
}

.profile-panel-wide {
  transform: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.profile-grid-wide {
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 34px;
  align-items: start;
}

.avatar-frame {
  position: relative;
  padding: 14px 14px 28px;
  border: 4px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 6px 6px 0 0 rgba(164, 0, 164, 0.22);
  transform: rotate(2deg);
}

.avatar-frame-portrait {
  padding: 14px;
  border-radius: 30px;
  transform: rotate(-1deg);
}

.avatar-image {
  aspect-ratio: 1 / 1;
  border: 4px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-soft), #e7f3ff);
  object-fit: cover;
}

.avatar-image-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: 24px;
  object-fit: contain;
  object-position: center center;
}

.avatar-caption {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.photo-badge {
  position: absolute;
  top: -16px;
  left: 18px;
  display: inline-flex;
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--tertiary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.16);
}

.profile-copy {
  display: flex;
  flex-direction: column;
}

.profile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.profile-name {
  margin: 0;
}

.gender-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: #151515;
  transform: rotate(4deg);
  isolation: isolate;
}

.gender-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 215, 9, 0.98), rgba(255, 232, 138, 0.98));
  z-index: -1;
}

.gender-badge::after {
  content: "";
  position: absolute;
  inset: 10px -8px -8px 10px;
  border-radius: 999px;
  background: rgba(255, 189, 243, 0.95);
  z-index: -2;
}

.profile-tagline {
  margin-top: 6px;
  margin-bottom: 16px;
}

.headline {
  margin: 0 0 12px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.6rem);
  line-height: 0.95;
  font-weight: 900;
}

.headline strong {
  color: var(--secondary);
}

.lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(32, 34, 37, 0.84);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.chip {
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.18);
}

.chip-primary {
  background: var(--primary-soft);
}

.chip-secondary {
  background: var(--secondary-soft);
}

.chip-tertiary {
  background: var(--tertiary);
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}

.profile-facts-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fact-card {
  padding: 12px 14px;
  border: 3px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.12);
}

.fact-card:nth-child(4n + 1) {
  background: rgba(187, 223, 248, 0.72);
}

.fact-card:nth-child(4n + 2) {
  background: rgba(255, 189, 243, 0.62);
}

.fact-card:nth-child(4n + 3) {
  background: rgba(255, 215, 9, 0.5);
}

.fact-label {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(32, 34, 37, 0.66);
}

.fact-value {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.featured-panel {
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 189, 243, 0.26));
  transform: rotate(1deg);
}

.section-title {
  margin: 0 0 14px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
}

.kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--tertiary);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured-summary {
  margin: 14px 0 18px;
  line-height: 1.75;
}

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px;
  border: 4px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.stat-card.food {
  background: linear-gradient(180deg, rgba(187, 223, 248, 0.96), rgba(255, 255, 255, 1));
}

.stat-card.water {
  background: linear-gradient(180deg, rgba(255, 189, 243, 0.78), rgba(255, 255, 255, 1));
}

.stat-card.litter {
  background: linear-gradient(180deg, rgba(255, 215, 9, 0.54), rgba(255, 255, 255, 1));
}

.stat-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 900;
}

.stat-detail {
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(32, 34, 37, 0.72);
}

.schedule-panel,
.archive-panel,
.summary-panel,
.phase-section {
  padding: 24px;
}

.schedule-list {
  display: grid;
  gap: 14px;
}

.schedule-item {
  display: flex;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 3px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.schedule-time {
  flex: 0 0 116px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-weight: 900;
  color: var(--secondary);
}

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

.archive-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
  border: 4px solid var(--border);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 5px 5px 0 0 rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.archive-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 8px 8px 0 0 rgba(164, 0, 164, 0.22);
}

.archive-date {
  display: inline-flex;
  align-self: start;
  padding: 6px 10px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--tertiary);
  font-size: 0.82rem;
  font-weight: 900;
}

.archive-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
}

.archive-summary {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(32, 34, 37, 0.76);
}

.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-meta-chip {
  display: inline-flex;
  padding: 6px 10px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: rgba(187, 223, 248, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.day-layout {
  display: grid;
  gap: 26px;
}

.summary-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.cover-frame {
  padding: 16px 16px 24px;
}

.stamp-frame {
  position: relative;
  border: 0;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 215, 9, 0.36), rgba(255, 189, 243, 0.28), rgba(187, 223, 248, 0.42));
  box-shadow: 6px 6px 0 0 rgba(255, 215, 9, 0.28);
  overflow: hidden;
  isolation: isolate;
}

.stamp-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 14px 0, var(--paper) 0 7px, transparent 7.5px) top left / 28px 16px repeat-x,
    radial-gradient(circle at 14px 100%, var(--paper) 0 7px, transparent 7.5px) bottom left / 28px 16px repeat-x,
    radial-gradient(circle at 0 14px, var(--paper) 0 7px, transparent 7.5px) top left / 16px 28px repeat-y,
    radial-gradient(circle at 100% 14px, var(--paper) 0 7px, transparent 7.5px) top right / 16px 28px repeat-y;
}

.stamp-frame-cover::after,
.stamp-frame-slot::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 3px dashed rgba(0, 0, 0, 0.22);
  border-radius: 20px;
}

.cover-image {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(187, 223, 248, 0.7), rgba(255, 189, 243, 0.6));
}

.previewable-image {
  cursor: zoom-in;
  transition: transform 0.18s ease;
}

.previewable-image:hover {
  transform: scale(1.015);
}

.previewable-image:focus-visible {
  outline: 4px solid rgba(164, 0, 164, 0.55);
  outline-offset: 3px;
}

.date-badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--tertiary);
  font-weight: 900;
}

.story-box {
  padding: 18px 20px;
  border: 3px dashed var(--border);
  border-radius: 18px;
  background: rgba(255, 215, 9, 0.14);
  line-height: 1.8;
}

.phase-section {
  border: 4px solid var(--border);
  border-radius: var(--radius-lg);
}

.phase-midnight {
  background: linear-gradient(180deg, rgba(23, 27, 58, 0.96), rgba(52, 58, 114, 0.92));
  color: #ffffff;
}

.phase-daylight {
  background: linear-gradient(180deg, rgba(187, 223, 248, 0.72), rgba(255, 255, 255, 0.95));
}

.phase-evening {
  background: linear-gradient(180deg, rgba(255, 215, 9, 0.36), rgba(255, 189, 243, 0.24), rgba(255, 255, 255, 0.94));
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.phase-title {
  margin: 0;
  display: inline-flex;
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ink);
}

.phase-rule {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.35;
}

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

.slot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 18px;
  border: 4px solid var(--border);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.slot-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 0 rgba(164, 0, 164, 0.18);
}

.slot-card:nth-child(odd) {
  transform: rotate(-1.2deg);
}

.slot-card:nth-child(even) {
  transform: rotate(1.2deg);
}

.slot-card:nth-child(odd):hover,
.slot-card:nth-child(even):hover {
  transform: translateY(-3px) rotate(0deg);
}

.slot-image {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(187, 223, 248, 0.8), rgba(255, 189, 243, 0.7));
  object-fit: cover;
}

.slot-placeholder {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), transparent 0 32%),
    linear-gradient(135deg, rgba(187, 223, 248, 0.9), rgba(255, 215, 9, 0.5));
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
}

.stamp-frame-slot {
  padding: 14px;
  margin-bottom: 2px;
  box-shadow: 4px 4px 0 0 rgba(255, 215, 9, 0.4);
}

.slot-time {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.slot-badge {
  display: inline-flex;
  align-self: start;
  padding: 5px 10px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--secondary-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.slot-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.slot-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(32, 34, 37, 0.76);
}

.footer-note {
  margin-top: 28px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(32, 34, 37, 0.68);
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 24, 0.78);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 18px 18px 16px;
  border: 4px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 235, 0.98));
  box-shadow: 10px 10px 0 0 rgba(255, 215, 9, 0.3);
}

.lightbox-close {
  justify-self: end;
  padding: 8px 14px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--secondary-soft);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  min-height: min(52vw, 280px);
  max-height: calc(100vh - 180px);
  margin: 0 auto;
  border-radius: 18px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(187, 223, 248, 0.26), rgba(255, 189, 243, 0.2));
}

.lightbox-caption {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(32, 34, 37, 0.8);
}

.previewable-image {
  cursor: zoom-in;
}

@media (max-width: 980px) {
  .hero-grid,
  .summary-panel {
    grid-template-columns: 1fr;
  }

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

  .profile-grid-wide {
    grid-template-columns: 1fr;
  }

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

  .profile-facts {
    grid-template-columns: 1fr 1fr;
  }

  .profile-facts-wide {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 18px 14px 60px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .calendar-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 28px));
  }

  .stat-grid,
  .archive-grid,
  .phase-grid {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-dialog {
    width: calc(100vw - 24px);
    padding: 14px 14px 12px;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-facts-wide {
    grid-template-columns: 1fr;
  }

  .profile-panel,
  .featured-panel,
  .schedule-panel,
  .archive-panel,
  .summary-panel,
  .phase-section {
    padding: 18px;
  }
}
