html,
body {
  width: 100%;
  overflow-x: hidden;
}

.topbar {
  gap: 10px 16px;
  flex-wrap: wrap;
}

.topbar .brand {
  min-width: 0;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
}

.topbar nav a {
  margin-left: 0;
  white-space: nowrap;
}

.card-no,
.card-en,
.cc-en,
.kwline,
.theme p,
.note {
  overflow-wrap: anywhere;
}

.cardgrid .cardcell {
  display: grid;
  align-content: start;
  gap: 6px;
}

.cc-art-wrap {
  display: block;
  width: min(86px, 72%);
  aspect-ratio: 300 / 527;
  margin: 0 auto 8px;
  padding: 3px;
  background: #fff7eb;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(33, 26, 32, 0.1);
  overflow: hidden;
}

.cc-art {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.waite-card-figure {
  width: min(210px, 72vw);
  margin: 18px auto 24px;
  text-align: center;
}

.waite-card-art {
  display: block;
  width: 100%;
  height: auto;
  background: #fff7eb;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(33, 26, 32, 0.14);
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    padding: 12px 16px 14px;
  }

  .topbar .brand {
    width: 100%;
    font-size: 14px;
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .topbar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(232, 211, 168, 0.28);
    border-radius: 999px;
    font-size: 12px;
  }

  .wrap {
    padding: 0 16px 56px;
  }

  .crumb {
    font-size: 11.5px;
    line-height: 1.7;
  }

  .card-hero {
    padding: 24px 18px;
    border-radius: 12px;
  }

  .card-hero h1 {
    font-size: 26px;
    line-height: 1.42;
  }

  .card-no {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .card-en {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .lead {
    font-size: 15px;
    line-height: 1.9;
  }

  .cardgrid {
    gap: 10px;
  }

  .cardcell {
    padding: 12px 10px 14px;
  }

  .cc-art-wrap {
    width: min(76px, 76%);
  }

  .waite-card-figure {
    width: min(188px, 74vw);
  }

  .cc-name {
    font-size: 17px;
  }

  .cc-en {
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }

  .cc-kw {
    font-size: 11px;
  }

  .corr-table {
    table-layout: fixed;
    font-size: 13.5px;
  }

  .corr-table th,
  .corr-table td {
    padding: 9px 10px;
    overflow-wrap: anywhere;
  }

  .related {
    display: grid;
    grid-template-columns: 1fr;
  }

  .related a {
    min-width: 0;
  }

  .cta {
    padding: 24px 18px;
  }

  .cta a.btn {
    display: block;
    padding-left: 18px;
    padding-right: 18px;
  }

  footer {
    padding-left: 16px;
    padding-right: 16px;
    line-height: 1.9;
  }

  footer a {
    display: inline-flex;
    margin: 3px 5px;
  }
}
