:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f5f5f7; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }

.topbar {
  position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.topbar-inner { max-width: 1440px; height: 56px; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark, .login-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: white; background: #1d1d1f; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; font-size: 11px; color: #86868b; }
.reviewed-pill { border-radius: 999px; padding: 6px 12px; color: #0066cc; background: #e8f2ff; font-size: 12px; font-weight: 650; }

.page-shell { max-width: 1440px; margin: auto; padding: 54px 32px 64px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: end; margin-bottom: 36px; }
.eyebrow { margin: 0 0 12px; color: #0071e3; font-size: 14px; font-weight: 650; }
h1 { max-width: 850px; margin: 0; font-size: clamp(40px, 5vw, 58px); line-height: 1.07; letter-spacing: -.045em; }
.intro-copy { max-width: 720px; margin: 20px 0 0; color: #6e6e73; font-size: 18px; line-height: 1.75; }
.progress-card { padding: 22px; border: 1px solid rgba(0,0,0,.06); border-radius: 24px; background: white; box-shadow: 0 10px 35px rgba(0,0,0,.04); }
.progress-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.progress-row span { color: #86868b; font-variant-numeric: tabular-nums; }
.progress-track { height: 8px; margin: 13px 0; overflow: hidden; border-radius: 999px; background: #e8e8ed; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #0071e3; transition: width .3s ease; }
.progress-card p { margin: 0; color: #86868b; font-size: 12px; line-height: 1.65; }

.filters { position: sticky; top: 70px; z-index: 30; display: flex; gap: 12px; align-items: center; margin-bottom: 30px; padding: 12px; border: 1px solid rgba(0,0,0,.06); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 10px 30px rgba(0,0,0,.05); backdrop-filter: blur(24px); }
.search-box { position: relative; display: flex; align-items: center; min-width: 240px; flex: 1; }
.search-box span { position: absolute; left: 13px; color: #86868b; font-size: 22px; transform: translateY(-1px); }
.search-box input { width: 100%; height: 44px; padding: 0 16px 0 42px; border: 0; outline: 0; border-radius: 14px; color: #1d1d1f; background: #f5f5f7; }
.search-box input:focus { box-shadow: 0 0 0 3px rgba(0,113,227,.2); }
.categories { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.categories button, .pending-button { flex: 0 0 auto; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; color: #6e6e73; background: transparent; }
.categories button:hover, .pending-button:hover { background: #f5f5f7; }
.categories button.active { color: white; background: #1d1d1f; }
.pending-button { border: 1px solid rgba(0,0,0,.1); }
.pending-button.active { border-color: #0071e3; color: #0066cc; background: #e8f2ff; }

.alert { margin-bottom: 24px; padding: 13px 16px; border: 1px solid #fecaca; border-radius: 16px; color: #b91c1c; background: #fef2f2; font-size: 14px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.section-heading p { margin: 5px 0 0; color: #86868b; font-size: 14px; }
.clear-button { border: 0; border-radius: 999px; padding: 10px 15px; color: #0066cc; background: transparent; }
.clear-button:hover { background: #e8f2ff; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.work-card { overflow: hidden; border: 1px solid rgba(0,0,0,.06); border-radius: 24px; background: white; box-shadow: 0 10px 35px rgba(0,0,0,.035); transition: transform .28s ease, box-shadow .28s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(0,0,0,.08); }
.image-button { position: relative; display: block; width: 100%; aspect-ratio: 4/3; padding: 0; border: 0; overflow: hidden; background: #f5f5f7; }
.image-button:focus-visible { outline: 4px solid rgba(0,113,227,.25); outline-offset: -4px; }
.image-button img { width: 100%; height: 100%; padding: 12px; object-fit: contain; transition: transform .45s ease; }
.work-card:hover .image-button img { transform: scale(1.015); }
.zoom-pill { position: absolute; right: 12px; bottom: 12px; border-radius: 999px; padding: 7px 11px; color: #424245; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.08); font-size: 12px; }
.card-body { padding: 20px; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-pill { border-radius: 999px; padding: 5px 9px; color: #6e6e73; background: #f5f5f7; font-size: 12px; }
.work-code { overflow: hidden; color: #86868b; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.work-title { display: -webkit-box; min-height: 52px; margin: 12px 0 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 17px; line-height: 1.5; letter-spacing: -.01em; }
.school, .department { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school { margin: 9px 0 0; color: #6e6e73; font-size: 14px; }
.department { margin: 5px 0 0; color: #a1a1a6; font-size: 12px; }
.vote-actions { display: grid; gap: 8px; margin-top: 20px; }
.vote-button { height: 44px; border: 1px solid transparent; border-radius: 13px; font-weight: 600; transition: .18s ease; }
.vote-button.allow { color: #0066cc; background: #e8f2ff; }
.vote-button.allow:hover { background: #dcecff; }
.vote-button.reject { border-color: rgba(0,0,0,.1); color: #424245; background: white; }
.vote-button.reject:hover { background: #f5f5f7; }
.vote-button.allow.selected { color: white; background: #0071e3; }
.vote-button.reject.selected { border-color: #1d1d1f; color: white; background: #1d1d1f; }
.save-status { height: 16px; margin: 11px 0 0; color: #86868b; text-align: center; font-size: 11px; }

.empty { padding: 76px 24px; border: 1px dashed rgba(0,0,0,.1); border-radius: 24px; background: white; text-align: center; }
.empty > span { color: #86868b; font-size: 32px; }
.empty h3 { margin: 12px 0 0; }
.empty p { margin: 8px 0 0; color: #86868b; font-size: 14px; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 38px; }
.load-more { height: 48px; padding: 0 22px; border: 1px solid rgba(0,0,0,.1); border-radius: 999px; color: #1d1d1f; background: white; box-shadow: 0 2px 7px rgba(0,0,0,.04); }

dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(0,0,0,.32); backdrop-filter: blur(5px); }
.preview-dialog { width: min(1100px, calc(100% - 24px)); max-height: 94vh; overflow: hidden; border-radius: 24px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.dialog-heading { padding: 20px 60px 18px 24px; border-bottom: 1px solid rgba(0,0,0,.06); }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.dialog-heading p { margin: 6px 0 0; color: #6e6e73; font-size: 14px; }
.dialog-close { position: absolute; right: 18px; top: 17px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #6e6e73; background: #f0f0f2; font-size: 24px; }
.preview-stage { display: grid; place-items: center; max-height: calc(94vh - 92px); padding: 28px; overflow: auto; background: #f5f5f7; }
.preview-stage img { max-width: 100%; max-height: calc(94vh - 150px); border-radius: 14px; object-fit: contain; box-shadow: 0 12px 35px rgba(0,0,0,.08); }

.login-dialog { width: min(430px, calc(100% - 32px)); border-radius: 26px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.24); }
.login-dialog::backdrop { background: rgba(245,245,247,.92); backdrop-filter: blur(18px); }
.login-dialog form { padding: 34px; }
.login-mark { width: 42px; height: 42px; margin-bottom: 24px; border-radius: 13px; }
.login-dialog h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.login-dialog form > p { margin: 9px 0 25px; color: #6e6e73; line-height: 1.6; }
.login-dialog label span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.login-dialog input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid rgba(0,0,0,.13); border-radius: 13px; outline: 0; }
.login-dialog input:focus { border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.login-dialog button { width: 100%; height: 48px; margin-top: 16px; border: 0; border-radius: 13px; color: white; background: #0071e3; font-weight: 650; }
.login-dialog button:hover { background: #0077ed; }
.login-error { margin: 10px 0 0 !important; color: #b91c1c !important; font-size: 13px; }

@media (max-width: 1180px) {
  .gallery { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .filters { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; }
}
@media (max-width: 880px) {
  .page-shell { padding-top: 38px; }
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .progress-card { max-width: 540px; }
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 0 18px; }
  .page-shell { padding: 34px 16px 48px; }
  h1 { font-size: 38px; }
  .intro-copy { font-size: 16px; }
  .filters { top: 64px; margin-inline: -4px; border-radius: 18px; }
  .categories { width: 100%; order: 3; }
  .pending-button { margin-left: auto; }
  .gallery { grid-template-columns: 1fr; }
  .work-title { min-height: auto; }
  .preview-stage { padding: 12px; }
  .login-dialog form { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
