:root {
  color-scheme: dark;
  --bg: #010102;
  --surface: #111113;
  --surface-raised: #18181b;
  --surface-soft: rgba(255, 249, 239, 0.06);
  --ink: #f7efe5;
  --ink-strong: #f4e9ff;
  --muted: #b9aa9c;
  --line: rgba(185, 167, 255, 0.24);
  --line-strong: rgba(185, 167, 255, 0.34);
  --accent: #b9a7ff;
  --accent-strong: #d4c9ff;
  --accent-soft: rgba(185, 167, 255, 0.16);
  --star: #ffd166;
  --dismiss: #ffb4a8;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(185, 167, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #050507 0%, var(--bg) 42%);
  color: var(--ink);
  font-family:
    system-ui, -apple-system, "system-ui", "Hiragino Sans", "Yu Gothic", YuGothic,
    sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.public-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 26px;
}

.public-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 22px;
}

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

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  color: var(--ink-strong);
  font-family: Spectral, Georgia, serif;
  font-size: clamp(38px, 8vw, 76px);
  font-weight: 600;
  line-height: 1.02;
}

.admin-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.admin-link:hover {
  border-color: var(--line-strong);
  color: var(--accent-strong);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -2px 20px;
  border-bottom: 1px solid var(--line);
  padding: 13px 2px;
  background: rgba(1, 1, 2, 0.9);
  backdrop-filter: blur(14px);
}

.summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.select-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
.filter-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 800;
}

select {
  padding: 0 34px 0 12px;
}

.filter-button {
  padding: 0 13px;
}

.filter-button.is-active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.reset-button {
  color: var(--muted);
}

.event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 32px;
}

.event-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow);
}

.event-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.event-card.is-hidden-card {
  background: linear-gradient(180deg, #151517, #0f0f11);
}

.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.date-block {
  display: grid;
  gap: 4px;
}

.date-block span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.date-block strong {
  color: var(--muted);
  font-size: 12px;
}

.card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.icon-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.04);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.star-button {
  font-size: 24px;
}

.star-button.is-starred {
  border-color: rgba(255, 209, 102, 0.48);
  background: rgba(255, 209, 102, 0.12);
  color: var(--star);
}

.hide-button {
  color: var(--muted);
  font-size: 22px;
}

.hide-button:hover {
  border-color: rgba(255, 180, 168, 0.42);
  background: rgba(255, 180, 168, 0.1);
  color: var(--dismiss);
}

.restore-button {
  color: var(--accent-strong);
  font-size: 21px;
}

.restore-button:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.event-card h2 {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  gap: 8px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.meta-list dd {
  color: rgba(255, 250, 242, 0.82);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.description {
  color: rgba(255, 250, 242, 0.82);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.notes {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.links a:hover {
  border-color: var(--line-strong);
  color: var(--accent-strong);
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .public-shell {
    padding: 16px;
  }

  .public-header {
    align-items: flex-start;
  }

  .toolbar {
    display: block;
  }

  .controls {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .event-list {
    grid-template-columns: 1fr;
  }

  .event-card h2 {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .public-header {
    display: block;
  }

  .admin-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .select-control {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}
