.woa-frame {
  max-width: 900px;
  margin: 0 auto;
}

.wand-owner-archive {
  --woa-ink: var(--wp--preset--color--primary);
  --woa-ink-soft: #6b4a23;
  --woa-rule: rgba(90, 60, 25, 0.35);
  width: 100%;
  display: flex;
  flex-direction: column;
  background-image: var(--woa-bg);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 1497 / 1365;
  padding: 9% 11% 9% 41%;
  box-sizing: border-box;
}

.wand-owner-archive .woa-sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.wand-owner-archive.is-ready .woa-sheet {
  overflow: hidden;
}

.wand-owner-archive .woa-table {
  width: 100%;
  border-collapse: collapse;
  color:var(--wp--preset--color--primary);
  transition: opacity 0.35s ease;
}
.wand-owner-archive .woa-table.is-fading {
  opacity: 0;
}
.wand-owner-archive .woa-table thead th {
  font-size: calc(var(--wp--preset--font-size--normal) * 0.75);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wp--preset--color--primary);
  text-align: left;
  padding: 0.35em 0.5em;
  border-bottom: 2px solid var(--wp--preset--color--primary);
}
.wand-owner-archive .woa-table td {
  font-size: var(--wp--preset--font-size--normal);
  padding: 0.35em 0.5em;
  border-bottom: 1px solid var(--woa-rule);
  vertical-align: middle;
  width: 20%;
}
.wand-owner-archive .woa-table td.woa-name {
  width: 40%;
}
.wand-owner-archive .woa-table tbody tr:last-child td {
  border-bottom: none;
}

.wand-owner-archive .woa-empty {
  font-family: "Underwood Champion", serif;
  font-size: 1.1rem;
  text-align: center;
  color: var(--woa-ink-soft);
  margin: 0;
}

/* Pager */
.wand-owner-archive .woa-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: clamp(1rem, 4vw, 2rem);
}
.wand-owner-archive .woa-nav[hidden] {
  display: none;
}
.wand-owner-archive .woa-nav button {
  font-family: "Underwood Champion", serif;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid #c9a96e;
  background: #6b4423;
  color: #f3e7c8;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition:
    background 0.2s,
    transform 0.1s,
    opacity 0.2s;
}
.wand-owner-archive .woa-nav button:hover:not(:disabled) {
  background: #835730;
}
.wand-owner-archive .woa-nav button:active:not(:disabled) {
  transform: translateY(1px);
}
.wand-owner-archive .woa-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.wand-owner-archive .woa-status {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--woa-ink-soft);
  letter-spacing: 0.5px;
  min-width: 9ch;
  text-align: center;
}

/* Phone: the paper column is too narrow for a 4-column table at a readable
   size, so collapse each entry into a stacked card (label above value) with a
   fixed, legible font (the cqi sizes get too small here). Because each card is
   taller, the JS paginator automatically shows fewer entries per page. The
   whole ledger image is still shown — nothing is cropped. */
@media (max-width: 640px) {
  .wand-owner-archive .woa-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .wand-owner-archive .woa-table,
  .wand-owner-archive .woa-table tbody,
  .wand-owner-archive .woa-table tr,
  .wand-owner-archive .woa-table td {
    display: block;
    width: 100%;
  }

  .wand-owner-archive .woa-table tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--woa-rule);
  }
  .wand-owner-archive .woa-table tbody tr:last-child {
    border-bottom: none;
  }

  .wand-owner-archive .woa-table td {
    border: none;
    padding: 0.12rem 0;
    font-size: 0.95rem;
    line-height: 1.3;
    display: flex;
    gap: 0.5rem;
  }
  /* Label sits beside the value (one line per field) so each card is compact
     and a few entries still fit the short paper area. */
  .wand-owner-archive .woa-table td::before {
    content: attr(data-label);
    flex: 0 0 4.5em;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--woa-ink-soft);
    align-self: center;
  }
}
