:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17211d;
  --muted: #65716b;
  --line: #ddd8cd;
  --green: #286b55;
  --green-soft: #e5f2ec;
  --gold: #8a661e;
  --gold-soft: #fbefd2;
  --blue: #275f8f;
  --blue-soft: #e4eef8;
  --coral: #a94e42;
  --coral-soft: #f8e5df;
  --neutral: #566069;
  --neutral-soft: #eceff1;
  --shadow: 0 18px 50px rgba(31, 42, 36, 0.08);
  --radius: 8px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(40, 107, 85, 0.12), rgba(246, 244, 239, 0) 340px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  padding: 46px 20px 20px;
}

.header-inner,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.08;
  font-weight: 800;
}

.subtitle {
  margin: var(--space-2) 0 0;
  color: var(--muted);
}

.page-shell {
  padding-bottom: 48px;
}

.control-panel {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 12px 0 var(--space-5);
  padding: var(--space-4);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(221, 216, 205, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.control-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: var(--space-3);
  align-items: center;
}

.search-box {
  min-width: 0;
}

.search-box input,
.select-wrap select,
.icon-button,
.ghost-button {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.search-box input {
  width: 100%;
  padding: 0 16px;
  outline: none;
}

.search-box input:focus,
.select-wrap select:focus,
.icon-button:focus,
.ghost-button:focus,
.filter-chip:focus,
.post-link:focus {
  outline: 3px solid rgba(39, 95, 143, 0.22);
  outline-offset: 2px;
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.select-wrap select {
  max-width: 220px;
  padding: 0 34px 0 12px;
}

.icon-button,
.ghost-button {
  padding: 0 16px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 700;
}

.ghost-button {
  background: transparent;
  color: var(--green);
  font-weight: 700;
}

.icon-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3);
}

.result-count {
  color: var(--muted);
  font-weight: 700;
}

.filter-chips,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-chips {
  margin-top: var(--space-3);
}

.filter-chip,
.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tag {
  display: inline-block;
  white-space: normal;
}

.filter-chip {
  cursor: pointer;
  color: var(--neutral);
  background: var(--neutral-soft);
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    padding 160ms ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  background: #e1e6e8;
}

.filter-chip.is-selected,
.filter-chip[aria-pressed="true"] {
  gap: 8px;
  padding-right: 7px;
  color: #fffdf8;
  background: var(--green);
  border-color: rgba(23, 33, 29, 0.36);
  box-shadow: 0 8px 18px rgba(40, 107, 85, 0.26);
  font-weight: 800;
  transform: translateY(-1px);
}

.filter-chip.is-selected:hover,
.filter-chip[aria-pressed="true"]:hover {
  background: #225c49;
  transform: translateY(-1px);
}

.filter-chip-remove {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid rgba(255, 253, 248, 0.7);
  background: #fffdf8;
  color: var(--green);
  box-shadow: 0 2px 6px rgba(23, 33, 29, 0.16);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.filter-chip-remove:hover {
  color: #fffdf8;
  background: #1f4f3f;
  transform: scale(1.06);
}

.student-list {
  display: grid;
  gap: var(--space-4);
}

.student-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid rgba(221, 216, 205, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.06);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.student-card:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 107, 85, 0.24);
  box-shadow: 0 16px 34px rgba(31, 42, 36, 0.1);
}

.thumb {
  width: 82px;
  height: 82px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--neutral-soft);
}

.card-main {
  min-width: 0;
}

.card-top {
  margin-bottom: var(--space-2);
}

.student-name {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.date-text {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.info-block {
  display: grid;
  gap: var(--space-3);
}

.info-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
}

.info-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

.info-value {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.college-value strong {
  font-weight: 800;
}

.english-name {
  color: var(--muted);
  font-size: 0.94em;
}

.tag-ranking {
  color: var(--gold);
  background: var(--gold-soft);
}

.tag-major {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag-athlete {
  color: var(--coral);
  background: var(--coral-soft);
}

.tag-regular {
  color: var(--green);
  background: var(--green-soft);
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(221, 216, 205, 0.7);
}

.post-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(40, 107, 85, 0.45);
  overflow-wrap: anywhere;
}

.post-link:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.empty-state {
  margin: 36px auto 0;
  padding: 40px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state h2 {
  margin: 0 0 var(--space-2);
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 30px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .control-panel {
    position: static;
    padding: var(--space-3);
  }

  .control-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .select-wrap {
    grid-column: 1 / -1;
    justify-content: space-between;
    min-width: 0;
  }

  .select-wrap select {
    width: min(220px, 60%);
    max-width: 100%;
  }

  .student-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3);
  }

  .thumb {
    width: 64px;
    height: 64px;
  }

  .info-line {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .header-inner,
  .page-shell {
    width: min(100% - 20px, 1120px);
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .select-wrap select,
  .icon-button,
  .ghost-button {
    width: 100%;
  }

  .student-card {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 100%;
    height: 150px;
  }
}
