:root {
  --bg: #f6f2ea;
  --card: #fffcf7;
  --ink: #1b1917;
  --soft: #5d5549;
  --line: rgba(27, 25, 23, 0.14);
  --accent: #7f2b21;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8f4ed 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.hero {
  padding: max(14px, env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-logo {
  width: 210px;
  height: auto;
  display: block;
}

.hero-desc,
.hero-tip {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--soft);
}

.admin-entry {
  display: inline-flex;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.container {
  padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.9);
}

.controls {
  padding: 12px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #5a5044;
  margin-bottom: 6px;
}

.search-wrap {
  margin-bottom: 10px;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(27, 25, 23, 0.18);
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ghost-btn,
.pager-btn {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.meta-row {
  margin: 10px 2px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

#resultCount,
#institutionCount {
  margin: 0;
  font-size: 12px;
  color: #433d34;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 10px;
  box-shadow: 0 8px 20px rgba(26, 20, 14, 0.06);
}

.cover-wrap {
  margin: 0 0 10px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #d8cec0;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.ongoing {
  background: #e3f1e8;
  color: #1f6546;
}

.status-pill.upcoming {
  background: #f7ebdc;
  color: #8f5d23;
}

.status-pill.ended,
.status-pill.unknown {
  background: #ebe8e1;
  color: #5f5a53;
}

.institution {
  margin: 0;
  font-size: 12px;
  color: #6c6154;
  font-weight: 700;
}

.title {
  margin: 7px 0;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 900;
}

.date {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.summary {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5f564a;
  line-height: 1.5;
}

.empty {
  padding: 28px 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: #4a4338;
  background: rgba(255, 255, 255, 0.45);
}

.pager {
  margin: 12px 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.pager-btn {
  margin: 0;
}

#pageInfo {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.pager-btn:disabled {
  opacity: 0.38;
}

.directory {
  padding: 12px;
}

.directory-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.directory-head h2,
.directory-head p {
  margin: 0;
  font-size: 13px;
}

.institution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 170px;
  overflow: auto;
}

.institution-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  color: #433c32;
  background: #fff;
}
