.wall {
  min-height: 100vh;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
}

.frame {
  --moulding: 34px;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  border: var(--moulding) solid #5c4428;
  border-image-source: url("../images/frame-oak.webp");
  border-image-slice: 10%;
  border-image-width: var(--moulding);
  border-image-repeat: round;
  background-color: var(--paper);
  background-clip: padding-box;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.5),
    0 40px 80px rgba(0, 0, 0, 0.28);
}

.moulding-x,
.moulding-y {
  display: none;
}

.rabbet {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: linear-gradient(180deg, #5c4428, #8a6a40 38%, #5a4328);
  box-shadow:
    inset 0 2px 5px rgba(20, 12, 4, 0.55),
    inset 0 -1px 0 rgba(255, 230, 180, 0.12),
    0 0 0 1px rgba(70, 48, 22, 0.45);
}

.site-foot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0;
  padding: 0.7rem 0.85rem 0.65rem;
  background: var(--paper);
}

.site-foot p {
  margin: 0;
  padding: 0.2rem 0.15rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #5a4630;
}

.site-foot a {
  color: #5a4630;
  font-family: var(--font-hand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.legal-nav {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.2rem;
}

.bolt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 32%, #d8d4cc, #7a7468 62%, #4e4a44);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.board {
  position: relative;
  flex: 1 1 auto;
  background-color: #c4a06a;
  background-image: url("../images/cork.webp");
  background-repeat: repeat;
  background-size: 300px;
  box-shadow:
    inset 0 0 0 1px rgba(62, 48, 28, 0.4),
    inset 0 14px 36px rgba(40, 20, 0, 0.18);
  padding: 1.35rem 2.4rem 2.6rem;
}

.mast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.plaque {
  position: relative;
  grid-column: 2;
  margin: 0;
  padding: 0.35rem 1.4rem 0.5rem;
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 18px rgba(40, 20, 0, 0.18);
  font-family: var(--font-hand);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #3a2410;
  transform: rotate(-0.8deg);
}

a.plaque {
  cursor: pointer;
}

.mast-search {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.4rem;
  width: min(260px, 100%);
}

.search {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding-left: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23706452' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem 50%;
}

.search::placeholder {
  color: #8a7b68;
}

.search:focus {
  outline: 2px solid rgba(247, 241, 227, 0.9);
}

.search-more {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  box-sizing: border-box;
  flex: 0 0 auto;
  transform: none;
  border: 0;
  min-height: 2.6rem;
  padding: 0.4rem 0.65rem;
  background: #e8e0d0;
  background-image: none;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px var(--stamp);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.board-filters {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: -0.4rem 0 1.25rem;
  padding: 0.75rem 0.85rem 0.8rem;
  background: var(--paper);
  box-shadow: 0 8px 16px rgba(40, 20, 0, 0.14);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.board-filters[hidden] {
  display: none;
}

.search-results[hidden] {
  display: none;
}

.search-results {
  margin: 0 0 1.25rem;
}

.board-filters fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem 0.7rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  overflow: visible;
}

.board-filters legend {
  grid-column: 1 / -1;
  margin: 0 0 0.15rem;
  padding: 0;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.board-filters label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #5a4630;
}

.board-suggest {
  position: absolute;
  z-index: 8;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  max-height: 12rem;
  overflow: auto;
  background: var(--paper-deep);
  border: 1px solid #d4c4a8;
  box-shadow: 0 8px 16px rgba(40, 20, 0, 0.16);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
}

.board-suggest[hidden] {
  display: none;
}

.board-suggest li {
  margin: 0;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.board-suggest li:hover,
.board-suggest li.is-active {
  background: #e8e0d0;
}

.board-filters input,
.board-filters select {
  width: 100%;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-actions button {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  box-sizing: border-box;
  transform: none;
  margin: 0;
  border: 0;
  min-height: 2.6rem;
  padding: 0.4rem 0.65rem;
  background: #e8e0d0;
  background-image: none;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px var(--stamp);
}

.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin-bottom: 2rem;
  padding-inline: 0.85rem;
}

.hero-side {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-start;
}

.hero-side-end {
  justify-content: flex-end;
}

.pin {
  width: 158px;
  background: #fbfaf6;
  padding: 10px 8px 14px;
  position: relative;
  display: block;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 24px rgba(20, 10, 0, 0.28);
}

.pin-tilt-left {
  transform: rotate(-2.4deg);
}

.pin-tilt-right {
  transform: rotate(1.8deg);
}

.pin:hover,
.pin:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  z-index: 2;
}

.pin-tack {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 6;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 32% 32%, #f4a3a3, #b42318);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.pin-tack.is-resolved,
.pin-tack.pin-green {
  background: radial-gradient(circle at 32% 32%, #b7e4c7, #2d6a4f);
}

.pin-tack.pin-red {
  background: radial-gradient(circle at 32% 32%, #f4a3a3, #b42318);
}

.pin-tack.pin-blue {
  background: radial-gradient(circle at 32% 32%, #9ec5e8, #1e4d7b);
}

.pin-tack.pin-purple {
  background: radial-gradient(circle at 32% 32%, #d4b3ee, #5b2c8a);
}

.pin-tack.pin-gold {
  background: radial-gradient(circle at 32% 32%, #e6d08a, #9b6b12);
}

.pin-tack.pin-brown {
  background: radial-gradient(circle at 32% 32%, #d8d4cc, #4e4a44);
}

.pin-tack::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 2px;
  height: 3px;
  background: linear-gradient(180deg, #9a9a9a, #6a6a6a);
  transform: translateX(-50%);
}

.photo {
  aspect-ratio: 1;
  background: #d9d4c8;
  overflow: hidden;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo.is-placeholder img,
img.is-placeholder {
  object-fit: contain;
}

.caption {
  margin: 0.55rem 0.15rem 0;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #6b6256;
  text-align: center;
}

.stamp {
  position: absolute;
  top: 0.55rem;
  right: 0.45rem;
  padding: 0.12rem 0.4rem;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--font-typed);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(8deg);
  background: rgba(255, 255, 255, 0.72);
}

.stamp.is-resolved,
.card-stamp.is-resolved {
  border-color: #2f6f4e;
  color: #2f6f4e;
}

.summary {
  position: relative;
  background-color: #f4f1e6;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 27px,
      rgba(70, 120, 160, 0.12) 28px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 27px,
      rgba(70, 120, 160, 0.1) 28px
    );
  padding: 1.35rem 1.6rem 1.25rem;
  box-shadow: 3px 6px 16px rgba(0, 0, 0, 0.18);
  transform: rotate(-1.15deg);
}

.summary::before,
.summary::after {
  content: "";
  position: absolute;
  top: -7px;
  height: 16px;
  background: linear-gradient(
    180deg,
    rgba(246, 238, 220, 0.8),
    rgba(210, 192, 154, 0.48)
  );
}

.summary::before {
  left: 22%;
  width: 52px;
  transform: rotate(-5.5deg);
}

.summary::after {
  right: 19%;
  width: 58px;
  transform: rotate(6.5deg);
}

.summary h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-hand);
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.counts {
  display: flex;
  justify-content: space-evenly;
  gap: 2rem;
  margin-bottom: 0.9rem;
  text-align: center;
}

.counts strong {
  display: block;
  font-family: var(--font-hand);
  font-size: 2.4rem;
  font-weight: 700;
  color: #1e4d7b;
  line-height: 1;
}

.counts span {
  display: block;
  font-family: var(--font-hand);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.summary p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.hand-title {
  position: relative;
  margin: 0;
  padding: 0.15rem 0.7rem;
  overflow: visible;
  font-family: var(--font-hand);
  font-size: 2.15rem;
  font-weight: 600;
  background: #dcc48a;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.12);
  transform: rotate(-1.2deg);
}

.hand-title .pin-tack {
  top: -12px;
}

.geo-sheet {
  position: relative;
  background: #f4f1e6;
  padding: 0;
  box-shadow: 3px 6px 16px rgba(0, 0, 0, 0.16);
  margin-bottom: 1.6rem;
}

#us-map {
  position: relative;
  display: flex;
  flex-direction: column;
}

.us-map-stage {
  position: relative;
}

.us-map-canvas {
  width: 100%;
  height: min(56vw, 480px);
  min-height: 320px;
  background: #e8e4d8;
}

#us-map:fullscreen,
#us-map:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  background: #e8e4d8;
  padding: 0;
}

.map-atlas-body {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 0;
}

.map-atlas {
  box-sizing: border-box;
  flex: 1 1 15rem;
  max-width: 20rem;
  margin: 0;
  padding: 0.85rem 0.85rem 1rem;
  border-right: 1px solid rgba(80, 60, 30, 0.16);
  background: #f7f1e3;
  overflow: auto;
}

.map-atlas-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-hand);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink);
}

.map-atlas-crumb {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
}

.map-atlas-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-atlas-list .search-more {
  justify-content: space-between;
  width: 100%;
}

.map-atlas-list .search-more[aria-pressed="true"] {
  background: var(--chip-hover, #c5d4c0);
}

.map-atlas-n {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
}

.map-atlas-body .us-map-stage {
  flex: 1 1 18rem;
  min-width: 0;
}

#us-map:fullscreen .map-atlas-body,
#us-map:-webkit-full-screen .map-atlas-body {
  flex: 1 1 auto;
  min-height: 0;
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .map-atlas {
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid rgba(80, 60, 30, 0.16);
  }
}

#us-map:fullscreen .us-map-stage,
#us-map:-webkit-full-screen .us-map-stage {
  flex: 1 1 auto;
  min-height: 0;
}

#us-map:fullscreen .us-map-canvas,
#us-map:-webkit-full-screen .us-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}

#us-map .geo-note {
  position: relative;
  z-index: 3;
  order: -1;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.7rem 1rem 0.65rem;
  background: #f7f1e3;
  box-shadow: 0 2px 0 rgba(40, 20, 0, 0.12);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.map-peek {
  display: none;
}

#us-map:fullscreen .map-peek.is-open,
#us-map:-webkit-full-screen .map-peek.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  z-index: 5;
  width: auto;
  overflow: auto;
  padding: 0.75rem 1.1rem 1rem;
  background-color: #c4a06a;
  background-image: url("../images/cork.webp");
  background-repeat: repeat;
  background-size: 300px;
  box-shadow: none;
}

#us-map:fullscreen .map-peek .case-bar,
#us-map:-webkit-full-screen .map-peek .case-bar {
  flex: 0 0 auto;
  margin-bottom: 0.75rem;
}

#us-map:fullscreen .map-peek .case-sheet,
#us-map:-webkit-full-screen .map-peek .case-sheet {
  flex: 1 1 auto;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

.map-dock {
  display: none;
}

#us-map:fullscreen .map-dock,
#us-map:-webkit-full-screen .map-dock {
  display: block;
  position: relative;
  flex: 0 0 auto;
  z-index: 4;
  padding: 0.35rem 0.85rem 0.45rem;
  border-top: 8px solid #5c4428;
  background: #f7f1e3;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.28),
    0 -16px 36px rgba(40, 20, 0, 0.28);
}

#us-map:fullscreen .map-dock .section-head,
#us-map:-webkit-full-screen .map-dock .section-head {
  margin-bottom: 0;
  justify-content: center;
}

#us-map:fullscreen .map-dock .hand-title,
#us-map:-webkit-full-screen .map-dock .hand-title {
  font-size: 1.55rem;
  text-align: center;
}

#us-map:fullscreen .map-dock-cards,
#us-map:-webkit-full-screen .map-dock-cards {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  gap: 1rem;
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 0.65rem;
  padding-bottom: 0.35rem;
}

#us-map:fullscreen .map-dock-cards .note-wrap,
#us-map:-webkit-full-screen .map-dock-cards .note-wrap {
  flex: 0 0 230px;
}

#us-map:fullscreen .map-dock-cards .empty-cite,
#us-map:-webkit-full-screen .map-dock-cards .empty-cite {
  margin: 0;
}

.map-legend {
  position: absolute;
  left: 10px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.45rem;
  background: rgba(247, 241, 227, 0.92);
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.16);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: #5c4e3a;
  pointer-events: none;
}

.map-swatch {
  width: 0.85rem;
  height: 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(92, 68, 40, 0.35);
}

.map-legend .map-swatch + .map-swatch {
  margin-left: 0.35rem;
}

.us-map-canvas .maplibregl-canvas {
  outline: none;
}

.us-map-canvas .maplibregl-ctrl-attrib {
  font-size: 0.8rem;
}

.us-map-canvas .maplibregl-popup-content {
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--paper);
  padding: 0.45rem 0.5rem;
}

.map-case-pop {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 168px;
  max-width: 220px;
}

.map-case-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.map-case-row img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  background: #d9d4c8;
  flex: 0 0 52px;
}

.map-case-row p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #3d3428;
}

.map-case-row span {
  display: block;
  color: #6b6256;
  font-size: 0.78rem;
}

.geo-note {
  margin: 0.45rem 0 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.board .empty-cite {
  display: inline-block;
  margin: 0 0 1.75rem;
  padding: 0.7rem 0.85rem 0.65rem;
  background: var(--paper);
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.12);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-top: 0.65rem;
}

.note-card {
  display: block;
  position: relative;
  background: #fffaf0;
  padding: 1.15rem 1rem 1.5rem;
  min-height: 168px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.16);
  transform: rotate(-0.5deg);
  cursor: default;
}

.note-card:nth-child(even) {
  background: var(--paper-deep);
  transform: rotate(0.6deg);
}

.note-card:hover,
.note-card:focus-visible {
  transform: rotate(0deg) translateY(-3px);
  z-index: 2;
}

.note-card h3 {
  position: relative;
  margin: 0 0 0.45rem;
  padding-right: 2.4rem;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.note-card .note-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.note-card .fact {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

.note-card .fact-seen,
.note-card .fact-place {
  min-height: 1.2rem;
}

.note-card .fact-place {
  position: relative;
  margin-top: 0.28rem;
}

.note-card .fact-ico {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.12em;
  color: var(--ink-soft);
}

.note-card .fact-ico svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.note-card .fact-text {
  min-width: 0;
}

.note-card .fact-place .fact-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card h3.is-cut::after,
.note-card .fact-place.is-cut::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 8;
  width: max-content;
  max-width: min(18rem, 72vw);
  padding: 0.45rem 0.65rem;
  background: #fffaf0;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.18);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.note-card:focus-visible h3.is-cut::after {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) {
  .note-card h3.is-cut:hover::after,
  .note-card .fact-place.is-cut:hover::after {
    opacity: 1;
    visibility: visible;
  }
}

.note-card .note-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.55rem;
}

.note-card .note-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.note-card .more,
.note-card .case-open {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  font-weight: 600;
  color: #7a2e12;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.15;
}

.note-card .more .cookie-btn-ico,
.note-card .case-open .cookie-btn-ico {
  margin-right: 0.28em;
}

.note-card .more:hover,
.note-card .more:focus-visible,
.note-card .case-open:hover,
.note-card .case-open:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.note-card .file-date {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  white-space: nowrap;
}

.note-card .file-date .fact-ico {
  width: 0.78rem;
  height: 0.78rem;
  margin-top: 0;
}

.card-stamp {
  position: absolute;
  top: 0.65rem;
  right: 0.55rem;
  bottom: auto;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  padding: 0.1rem 0.35rem;
  font-family: var(--font-typed);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(8deg);
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.pager-status,
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.6rem;
  line-height: 1;
  padding: 0.4rem 0.75rem;
  background: #e8e0d0;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 0 0 1px var(--stamp);
}

.pager-btn {
  transform: none;
  border: 0;
  text-transform: none;
  cursor: pointer;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hero-side,
  .hero-side-end {
    order: 2;
  }

  .summary {
    order: 1;
    max-width: 420px;
    width: 100%;
  }

  .counts {
    gap: 1.15rem;
  }
}

@media (max-width: 720px) {
  .wall {
    padding: 0;
  }

  .frame {
    --moulding: 22px;
  }

  .board {
    padding: 1rem 0.85rem 1.5rem;
  }

  .mast {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .plaque,
  .mast-search,
  .mast-actions {
    grid-column: 1;
  }

  .mast-search {
    justify-self: center;
    width: min(260px, 100%);
  }
}

.mast-search {
  width: min(380px, 100%);
}

.hero {
  display: block;
  padding-inline: 0.35rem;
  padding-top: 0.35rem;
  margin-bottom: 2.1rem;
}

.hero-side {
  display: none;
}

.summary {
  transform: none;
  width: 100%;
  max-width: none;
  padding: 0.35rem 0.2rem 0.15rem;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.summary::before,
.summary::after {
  display: none;
}

.summary h2 {
  display: none;
}

.counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0;
}

.counts p {
  position: relative;
  margin: 0;
  padding: 1.05rem 0.4rem 0.7rem;
  background-color: #fffaf0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 22px,
    rgba(70, 120, 160, 0.12) 23px
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    2px 5px 12px rgba(40, 20, 0, 0.16);
  border-left: 5px solid #9b2c2c;
  transform: rotate(-0.9deg);
}

.counts p:nth-child(2) {
  border-left-color: #1e4d7b;
  transform: rotate(0.7deg);
}

.counts p:nth-child(3) {
  border-left-color: #5b2c8a;
  transform: rotate(-0.5deg);
}

.counts p:nth-child(4) {
  border-left-color: #2f6f4e;
  transform: rotate(0.85deg);
}

.counts p:nth-child(5) {
  border-left-color: #3a2410;
  transform: rotate(-0.4deg);
}

.counts p::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 32% 32%, #f4a3a3, #b42318);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

.counts p:nth-child(2)::before {
  background: radial-gradient(circle at 32% 32%, #9ec5e8, #1e4d7b);
}

.counts p:nth-child(3)::before {
  background: radial-gradient(circle at 32% 32%, #d4b3ee, #5b2c8a);
}

.counts p:nth-child(4)::before {
  background: radial-gradient(circle at 32% 32%, #b7e4c7, #2d6a4f);
}

.counts p:nth-child(5)::before {
  background: radial-gradient(circle at 32% 32%, #d8d4cc, #4e4a44);
}

.counts p::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 18%;
  width: 42px;
  height: 12px;
  background: linear-gradient(180deg, rgba(246, 238, 220, 0.88), rgba(210, 192, 154, 0.5));
  transform: rotate(-6deg);
  box-shadow: 0 1px 2px rgba(40, 20, 0, 0.16);
  pointer-events: none;
}

.us-map-canvas {
  height: min(36vw, 560px);
  min-height: 360px;
}

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem 1.35rem;
}

.featured-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.featured-grid .note-wrap {
  min-width: 0;
}

.featured-grid .note-card {
  min-height: 280px;
  padding: 0 1.35rem 1.9rem;
  box-shadow: 3px 7px 18px rgba(40, 18, 0, 0.22);
  transform: rotate(-0.35deg);
}

.featured-grid .note-wrap:nth-child(even) .note-card {
  transform: rotate(0.4deg);
}

.featured-grid .note-card h3 {
  font-size: 1.95rem;
}

.featured-grid .card-stamp {
  background: #1e4d7b;
}

.featured-grid .card-stamp.is-resolved {
  background: #2f6f4e;
}

.pin {
  display: flex;
  flex-direction: column;
  width: 176px;
  padding: 0 0 12px;
  overflow: visible;
}

.pin .pin-tack {
  top: -12px;
  z-index: 6;
}

.pin .stamp {
  order: -1;
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0.42rem 0.4rem 0.28rem;
  border: 0;
  border-radius: 0;
  transform: none;
  text-align: center;
  background: var(--stamp);
  color: #f7f1e3;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  box-shadow: inset 0 -1px 0 rgba(40, 10, 8, 0.28);
}

.pin .stamp.is-resolved,
.card-stamp.is-resolved {
  background: #2f6f4e;
  border-color: #2f6f4e;
  color: #f7f1e3;
}

.pin .photo {
  margin: 0 8px;
}

.pin .caption {
  order: 2;
}

.note-card {
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 0 1.35rem 1.75rem;
  min-height: 250px;
}

.note-card .pin-tack {
  top: -12px;
  z-index: 6;
}

.card-stamp {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  display: block;
  width: calc(100% + 2.7rem);
  margin: 0 -1.35rem 8px;
  transform: none;
  border: 0;
  border-radius: 0;
  padding: 0.38rem 0.55rem 0.32rem;
  text-align: center;
  background: var(--stamp);
  color: #f7f1e3;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  box-shadow: inset 0 -1px 0 rgba(40, 10, 8, 0.28);
}

.legal-nav .cookie-open,
.legal-nav .theme-open {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-family: var(--font-hand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.note-card h3 {
  padding-right: 2.4rem;
  margin-bottom: 0.65rem;
  font-size: 1.7rem;
  line-height: 1.1;
  min-height: calc(1.7rem * 1.1 * 2);
}

.counts p {
  text-align: center;
}

@media (max-width: 1100px) {
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

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

  .board,
  .board-case {
    padding: 1rem 0.9rem 1.6rem;
  }
}

@media (max-width: 720px) {
  .mast-search {
    width: min(260px, 100%);
  }

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

html.night-board .board,
html.night-board #us-map:fullscreen .map-peek.is-open,
html.night-board #us-map:-webkit-full-screen .map-peek.is-open {
  background-color: #6a4424;
  background-image:
    linear-gradient(180deg, rgba(52, 30, 10, 0.4), rgba(28, 14, 4, 0.48)),
    url("../images/cork.webp");
  box-shadow:
    inset 0 0 0 1px rgba(40, 24, 8, 0.55),
    inset 0 18px 42px rgba(20, 8, 0, 0.4);
}

html.night-board .rabbet {
  background: linear-gradient(180deg, #4a3418, #6a4a28 38%, #3f2c16);
}

html.night-board .geo-sheet {
  background: var(--paper-deep);
}

html.night-board #us-map .geo-note,
html.night-board .map-atlas {
  background: var(--paper);
}

html.night-board .map-atlas {
  border-right-color: rgba(80, 60, 30, 0.35);
}

html.night-board .counts p {
  background-color: var(--paper);
}

html.night-board .note-card {
  background: var(--paper);
}

html.night-board .note-wrap:nth-child(even) .note-card {
  background: var(--paper-deep);
}

html.night-board .note-card h3.is-cut::after,
html.night-board .note-card .fact-place.is-cut::after {
  background: var(--paper);
}

html.night-board .us-map-canvas,
html.night-board #us-map:fullscreen,
html.night-board #us-map:-webkit-full-screen {
  background: #c4b48a;
}

html.night-board .board-peek-frame,
html.night-board #us-map:fullscreen .map-dock,
html.night-board #us-map:-webkit-full-screen .map-dock {
  background: var(--paper);
}

html.night-board .frame::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--moulding));
  z-index: 0;
  pointer-events: none;
  border: var(--moulding) solid rgba(42, 22, 8, 0.42);
  box-sizing: border-box;
}

html.night-board .site-foot {
  background: var(--paper);
}

html.night-board .site-foot p,
html.night-board .site-foot a,
html.night-board .legal-nav .cookie-open,
html.night-board .legal-nav .theme-open {
  color: #3f2e1c;
}

html.night-board .hand-title {
  background: #b89650;
}

html.night-board .plaque {
  background: var(--paper);
}

@supports (background-image: image-set(url("x.avif") type("image/avif"))) {
  .frame {
    border-image-source: url("../images/frame-oak.avif");
  }

  .board {
    background-image: url("../images/cork.avif");
  }

  #us-map:fullscreen .map-peek.is-open,
  #us-map:-webkit-full-screen .map-peek.is-open {
    background-image: url("../images/cork.avif");
  }

  html.night-board .board,
  html.night-board #us-map:fullscreen .map-peek.is-open,
  html.night-board #us-map:-webkit-full-screen .map-peek.is-open {
    background-image:
      linear-gradient(180deg, rgba(52, 30, 10, 0.4), rgba(28, 14, 4, 0.48)),
      url("../images/cork.avif");
  }
}

.mast-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  grid-column: 1;
  justify-self: start;
}

.board-peek {
  display: none;
}

.board-peek.is-open {
  display: block;
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 40;
  background: transparent;
}

.frame:has(#board-peek.is-open) .rabbet {
  z-index: 2;
}

.frame:has(#board-peek.is-open) .site-foot {
  z-index: 0;
}

.board:has(#board-peek.is-open) {
  padding-bottom: 22rem;
}

.board-peek-frame {
  width: 100%;
  padding: 0;
  border: 0;
  border-top: 8px solid #5c4428;
  background: #f7f1e3;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.28),
    0 -16px 36px rgba(40, 20, 0, 0.28);
}

.board-peek-inner {
  max-height: min(48vh, 22rem);
  overflow: auto;
  padding: 0.45rem 0.85rem 0.65rem;
}

.board-peek .case-bar {
  margin-bottom: 0.45rem;
}

.board-peek-kicker {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-align: center;
}

.board-peek-body {
  display: grid;
  grid-template-columns: 180px minmax(16rem, 1fr) minmax(14rem, 1.2fr);
  gap: 0.85rem;
  align-items: start;
}

.board-peek .sheet-card {
  margin: 0;
  padding: 0.7rem 0.85rem 0.9rem;
}

.board-peek .hand-heading {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.board-peek .sheet-card .board-peek-name {
  text-decoration: none;
}

.board-peek-note {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .board-peek-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .board-peek .portrait {
    width: min(180px, 100%);
  }

  .board-peek-body .sheet-card:last-child {
    grid-column: 1 / -1;
  }
}

.account-who {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  box-sizing: border-box;
  margin: 0;
  transform: none;
  border: 0;
  min-height: 2.6rem;
  padding: 0.4rem 0.65rem;
  background: #e8e0d0;
  background-image: none;
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px var(--stamp);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
}

span.account-who {
  cursor: default;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
}

span.account-who:hover,
span.account-who:focus-visible {
  background: #e8e0d0;
}

.account-who[hidden] {
  display: none;
}

.note-wrap {
  position: relative;
}

.note-wrap:nth-child(even) .note-card {
  background: var(--paper-deep);
  transform: rotate(0.6deg);
}

.note-wrap:nth-child(even) .note-card:hover,
.note-wrap:nth-child(even) .note-card:focus-visible {
  transform: rotate(0deg) translateY(-3px);
  z-index: 2;
}

.note-star {
  position: absolute;
  top: 2.05rem;
  right: 0.55rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
  transform: none;
  border: 0;
  padding: 0.12rem 0.35rem;
  background: var(--paper);
  color: #7a4a12;
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.14);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.note-star.is-on {
  color: #2f6f4e;
}

.note-star.is-on::before,
.note-star.is-on::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid #2f6f4e;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: star-saved-ping 2.6s ease-out infinite;
}

.note-star.is-on::after {
  animation-delay: 1.3s;
}

@keyframes star-saved-ping {
  0% {
    transform: translate(-50%, -50%) scale(0.75);
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.85);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .mast-account {
    grid-column: 1;
    justify-self: center;
  }
}
