:root {
  --paper: #fbfaf7;
  --ink: #0f0f0e;
  --muted: #5f5b54;
  --hairline: #d8d1c6;
  --accent: #bd5537;
  --tag: #b8b36c;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Pretendard", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 32px;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: "Bodoni 72", Didot, "Bodoni MT", "Times New Roman", serif;
  font-size: 37px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.header-actions,
.guest-actions,
.member-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}

.guest-actions[hidden],
.member-actions[hidden] {
  display: none;
}

.search-button {
  position: relative;
  width: 19px;
  height: 19px;
  border: 0;
  background: transparent;
  padding: 0;
}

.search-button::before {
  position: absolute;
  left: 1px;
  top: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.search-button::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 2px;
  background: var(--ink);
  content: "";
  transform: rotate(45deg);
  transform-origin: center;
}

.header-divider {
  width: 1px;
  height: 17px;
  background: var(--hairline);
}

.join-button,
.logout-button {
  display: inline-grid;
  place-items: center;
  height: 28px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.join-button {
  width: 54px;
}

.logout-button {
  min-width: 64px;
  padding: 0 12px;
  border: 1px solid #0c0c0b;
  border-radius: 0;
  background: #0c0c0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.member-nickname {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  color: #1a1918;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.critic-list-page {
  padding: 45px 72px 72px;
}

.list-hero {
  margin-bottom: 54px;
}

.list-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.list-title-row h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: clamp(58px, 6.4vw, 86px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.list-title-row p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.upload-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 280px;
  height: 56px;
  padding: 0 21px 0 24px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 17px;
  margin-bottom: 12px;
}

.filter-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.filter-button span {
  margin-left: 7px;
}

.filter-button.active {
  color: var(--accent);
}

.section-rule {
  height: 1px;
  margin-bottom: 39px;
  background: var(--hairline);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 46px 40px;
}

.work-grid.is-empty {
  grid-template-columns: 1fr;
}

.work-grid-empty {
  margin: 0;
  padding: 54px 20px;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.work-card {
  display: block;
  min-width: 0;
}

.work-card[hidden] {
  display: none;
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2.23 / 1;
  border: 1px solid var(--hairline);
  object-fit: cover;
}

.work-card-copy {
  margin-top: 3px;
}

.work-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.work-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.work-card p.work-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin: 0 0 6px;
  color: #7b746b;
  font-size: 13px;
  line-height: 1.2;
}

.work-card-author-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.work-card-meta span {
  flex: 0 0 auto;
  text-align: right;
}

.work-card-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.work-card:hover h2 {
  color: var(--accent);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
}

.page-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.page-number:hover,
.page-number.active {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1180px) {
  .critic-list-page {
    padding-inline: 46px;
  }

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

@media (max-width: 820px) {
  .list-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-link {
    width: min(280px, 100%);
    flex-basis: auto;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 24px;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 64px;
    padding: 0 18px;
  }

  .wordmark {
    font-size: 30px;
  }

  .login-link,
  .header-divider {
    display: none;
  }

  .header-actions,
  .guest-actions,
  .member-actions {
    gap: 12px;
  }

  .member-nickname {
    max-width: 95px;
  }

  .critic-list-page {
    padding: 38px 20px 56px;
  }

  .list-hero {
    margin-bottom: 38px;
  }

  .list-title-row h1 {
    font-size: 48px;
  }

  .section-rule {
    margin-bottom: 30px;
  }

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