* { box-sizing: border-box; }

html {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% 0%, #fffdf6 0%, transparent 72%),
    radial-gradient(circle at 12% 85%, #f3e6cb88 0%, transparent 45%),
    radial-gradient(circle at 88% 78%, #e4efe388 0%, transparent 45%);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(a, button, summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

h1, h2, p { margin: 0; }
h1, h2, strong, b { font-weight: 900; }
h1, h2 { line-height: 1.12; letter-spacing: -0.03em; }
h1:focus { outline: none; }

[hidden] { display: none !important; }

.frame {
  width: min(94%, 1360px);
  margin-inline: auto;
}

/* ---------- Masthead Navigation ---------- */
.masthead {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin-top: clamp(10px, 1.4vw, 18px);
  padding: 7px clamp(12px, 1.6vw, 22px);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: inset 0 1px 0 #ffffff, var(--shadow-bar);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.08rem, 1.8vw, 1.48rem);
  letter-spacing: -0.035em;
  color: var(--ink);
}

.brand-bird {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8df, #f5dfb0);
  border: 1.5px solid #dec18a;
  transition: transform 0.22s ease;
}

.brand-bird img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.family-tools {
  --control-size: clamp(44px, 3.8vw, 50px);
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.85vw, 12px);
}

/* Stamp Book Header Pill */
.stamps-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  min-height: var(--control-size);
  padding: 0.25em 0.78em 0.25em 0.62em;
  border: 1.5px solid #dcc59f;
  border-radius: var(--radius-pill);
  background: #fdf6e6;
  color: var(--ink-wood);
  font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  font-weight: 850;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stamps-pill.has-stamps {
  border-color: #cda368;
  background: #fdf0cc;
}

.stamps-pill-icon {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  background: center / contain no-repeat url("../../Shared/Assets/island/stamp-icon.svg");
  filter: drop-shadow(0 1px 1px #4f351824);
}

.stamps-pill-count {
  display: inline-grid;
  place-items: center;
  padding: 0.08em 0.48em;
  border-radius: var(--radius-pill);
  background: #efe0c2;
  color: var(--ink-wood);
  font-size: 0.86em;
  font-weight: 900;
}

.stamps-pill.has-stamps .stamps-pill-count {
  background: var(--berry);
  color: #fffaf2;
}

/* Energy Pill */
.energy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32em;
  min-height: var(--control-size);
  padding: 0.24em 0.78em;
  border: 1.5px solid var(--sage-border);
  border-radius: var(--radius-pill);
  background: #edf4e4;
  color: var(--green);
  font-size: clamp(0.92rem, 1.3vw, 1.15rem);
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.energy-pill:not(.unavailable)::before {
  content: "";
  flex: none;
  width: 1.42em;
  height: 1.42em;
  background: center / contain no-repeat url("../../Shared/Assets/island/energy.svg");
}

.energy-pill.unavailable {
  white-space: normal;
  font-size: 0.85rem;
}

/* Family Menu & Avatar */
.family-menu { position: relative; }
.family-menu summary { list-style: none; cursor: pointer; }
.family-menu summary::-webkit-details-marker { display: none; }
.family-menu summary:focus-visible { outline: 3px solid var(--focus-ring); border-radius: 50%; }

.family-portrait {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--control-size);
  height: var(--control-size);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--green);
  background: #f6ead0;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.family-portrait.guest {
  border-color: #6b4b2e;
  background: #dff2ec center / cover no-repeat url("../../Shared/Assets/island/parent-guest.svg");
}

.family-portrait img { width: 100%; height: 100%; object-fit: contain; }

.family-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 206px;
  padding: 6px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  box-shadow: 0 12px 30px #233b3222;
}

.family-panel strong {
  display: block;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.family-panel [role="status"]:not(:empty) {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.family-panel :is(a, button):not([hidden]) {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  color: var(--green);
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.family-panel :is(a, button):hover { background: var(--paper-sage); }

/* ---------- Main Container ---------- */
main {
  flex: 1;
  padding-bottom: clamp(28px, 3vw, 44px);
}

/* ---------- Hero Storybook Banner ---------- */
.hero, .harbor-map {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.hero {
  margin-block: clamp(14px, 1.5vw, 20px) clamp(24px, 2.5vw, 36px);
  aspect-ratio: 3 / 1;
  min-height: clamp(204px, 23vw, 326px);
  display: flex;
  align-items: center;
  border: 1.5px solid #d7c39e;
  background: #fce9cb;
  box-shadow: 0 10px 28px #3c2f1b16;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right 44%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(95deg, #fff9ecdd 0%, #fff8ebaa 36%, #fff8eb00 62%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: min(56%, 560px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(20px, 2.8vw, 36px) clamp(18px, 4.2%, 52px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.55em;
  padding: 0.25em 0.8em;
  border-radius: var(--radius-pill);
  border: 1px solid #d7c298;
  background: #fffdf7d9;
  color: var(--ink-wood);
  font-size: clamp(0.76rem, 1vw, 0.9rem);
  font-weight: 850;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  color: #1c3b34;
  font-family: var(--font-display);
  font-weight: 950;
  font-size: clamp(2.35rem, 4.7vw, 4.45rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 0 #fffdf8cc;
}

.hero-copy h1 span {
  display: block;
  margin-bottom: 0.08em;
  color: var(--green);
  font-size: 0.72em;
  font-weight: 900;
}

.hero-line {
  margin-top: 0.65em;
  max-width: 34ch;
  color: #2c4a40;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 750;
  line-height: 1.38;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 1.05em;
  min-height: 46px;
  padding: 0.5em 1.3em;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: #fffdf7;
  box-shadow: 0 4px 14px #1d3c2d26;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 850;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.hero-cta:active {
  transform: scale(0.98);
}

/* ---------- Section Headings ---------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: clamp(12px, 1.4vw, 18px);
}

.section-heading h2,
.grade-library h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.55rem, 2.35vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-heading p {
  color: var(--ink-soft);
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  font-weight: 700;
}

/* ---------- Postcard Game Shelf ---------- */
.game-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
}

.game-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 8px 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.cover-frame {
  display: block;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid #e4d8bf;
  background: var(--paper-cream);
}

.cover-art {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.cover-art > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cover-art .map-stamp {
  position: absolute;
  width: clamp(38px, 4.3vw, 56px);
  max-height: 72%;
  object-fit: contain;
  right: 8px;
  bottom: 7px;
  filter: drop-shadow(0 2px 4px #3c2f1b66);
}

.card-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35em;
  padding: clamp(11px, 1.15vw, 15px) clamp(44px, 3.8vw, 56px) clamp(13px, 1.3vw, 17px) clamp(6px, 0.7vw, 10px);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.game-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.14em 0.62em;
  border-radius: var(--radius-pill);
  background: var(--paper-sage);
  border: 1px solid #cde0c3;
  color: var(--green);
  font-weight: 800;
  font-size: clamp(0.73rem, 0.92vw, 0.84rem);
}

.word-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14em 0.56em;
  border-radius: var(--radius-pill);
  background: #fbf1da;
  border: 1px solid #e6d1a7;
  color: var(--ink-wood);
  font-weight: 800;
  font-size: clamp(0.72rem, 0.88vw, 0.82rem);
}

.game-card-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.14rem, 1.55vw, 1.52rem);
  line-height: 1.16;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.game-description {
  margin-top: 2px;
  font-size: 0.96rem;
  line-height: 1.45;
  font-weight: 650;
  color: var(--ink-soft);
}

.play-arrow {
  position: absolute;
  top: 50%;
  right: clamp(6px, 0.8vw, 12px);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-weight: 900;
  line-height: 1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* ---------- Grade Picker Panel ---------- */
.home-grades {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 2.8vw, 42px);
  margin-top: clamp(26px, 2.8vw, 42px);
  padding: clamp(16px, 2vw, 26px) clamp(16px, 2.2vw, 30px);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.grades-intro h2 {
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  white-space: nowrap;
}

.grades-intro p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 700;
}

.grade-picker {
  flex: 1;
  max-width: 740px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 0.8vw, 12px);
}

.grade-picker a,
.home-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  border: 1.5px solid #bccab3;
  border-radius: 13px;
  background: var(--paper);
  color: var(--green);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  font-weight: 850;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.grade-picker a[data-has-games="true"]::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.grade-picker a[aria-current] {
  color: var(--paper);
  background: var(--green);
  border-color: var(--green);
}

.grade-picker a[aria-current]::after {
  background: #ffe38f;
}

.grade-picker a:active,
.home-link:active {
  transform: scale(0.97);
}

.grade-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-block: 16px 18px;
}

.grade-bar .grade-picker { max-width: 680px; }

.home-link {
  flex: none;
  border-radius: var(--radius-pill);
  padding-inline: 18px;
}

.grade-library { padding-top: 6px; }
.grade-library .game-shelf {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.filled-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45em;
  min-height: 46px;
  padding-inline: 1.45em;
  color: var(--paper);
  background: var(--green);
  border: 0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  font-size: 1.02rem;
  font-weight: 850;
  transition: background-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.filled-button:active {
  transform: scale(0.98);
}

/* ---------- Little Harbour Map ---------- */
.harbor-map {
  max-width: max(300px, calc(200svh - 300px));
  margin-inline: auto;
  border: 1.5px solid #9dbdb2;
  background: #a8d8cf;
  box-shadow: 0 12px 30px #1e3b351e;
}

.map-picture {
  display: block;
  width: 100%;
  height: auto;
}

.map-title {
  position: absolute;
  top: 3.6%;
  left: 3%;
  padding: clamp(8px, 1.1vw, 14px) clamp(14px, 1.8vw, 24px);
  border-radius: 18px;
  border: 1.5px solid #d5c39f;
  background: #fffaf0eb;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 20px #1f3c361a;
}

.map-title h1 {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.75rem);
  line-height: 1.05;
}

.map-title p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: clamp(0.75rem, 1.1vw, 0.98rem);
  font-weight: 750;
}

.map-location {
  position: absolute;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  align-items: end;
}

.map-location:focus-visible { outline: none; }
.map-location:focus-visible .map-pin {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.map-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.28em 0.42em 0.28em 0.88em;
  min-height: 46px;
  border: 2px solid #593d23;
  border-radius: var(--radius-pill);
  background: #fffdf6;
  box-shadow: 0 8px 20px #1d352c36;
  white-space: nowrap;
  color: #2c2117;
  font-size: clamp(1rem, 1.9vw, 1.72rem);
  font-weight: 900;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.map-pin-play {
  display: grid;
  place-items: center;
  width: 1.72em;
  height: 1.72em;
  border-radius: 50%;
  background: var(--green);
  color: #fffaf0;
  font-size: 0.72em;
}

@media (prefers-reduced-motion: no-preference) {
  .map-pin {
    animation: pin-bob 3.4s var(--pin-delay, 0s) ease-in-out infinite;
  }
  @keyframes pin-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }
}

/* ---------- Empty Grade Shelf ---------- */
.empty-shelf {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: clamp(32px, 5vw, 54px) 20px;
  background:
    radial-gradient(circle at 50% 28%, #fff4d6 0%, transparent 55%),
    var(--paper);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.empty-art {
  display: grid;
  place-items: center;
  width: clamp(164px, 20vw, 216px);
  height: clamp(164px, 20vw, 216px);
  padding: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fffdf6, #fae8c0);
  border: 2.5px solid #dfc188;
  box-shadow: 0 6px 18px #3f2d141c, 0 3px 0 #dec391;
}

.empty-art img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.empty-shelf h2 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  color: var(--ink);
}

.empty-shelf p {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.58;
}

/* ---------- Stamps ---------- */
.map-stamp {
  width: 1.85em;
  height: auto;
  transform: rotate(-7deg);
}

/* ---------- Footer & Parent Guide Dialog ---------- */
.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-block: 14px 26px;
  border-top: 1px solid #e3d7be;
}

.footer-note {
  color: var(--ink-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0.38em 1.05em;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--green);
  font-weight: 850;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.guide-pill svg {
  width: 1.15em;
  height: 1.15em;
}

dialog {
  width: min(92%, 500px);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--green);
  border-radius: 24px;
  box-shadow: 0 24px 60px #152b233d;
}

dialog::backdrop {
  background: #162c258c;
  backdrop-filter: blur(3px);
}

.guide-sheet {
  padding: clamp(22px, 3.5vw, 32px);
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill);
  background: var(--paper-sage);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 850;
}

.guide-badge img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

dialog h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
}

dialog p {
  margin-block: 14px;
  color: #334d42;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.62;
}

.guide-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ---------- Stamp Book (#stamps) ---------- */
.album-wrap {
  max-width: 1120px;
  margin: clamp(12px, 1.5vw, 22px) auto 0;
}

.album-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  aspect-ratio: 3.05 / 1;
  min-height: clamp(144px, 21vw, 244px);
  padding: clamp(16px, 2.5vw, 30px) 5%;
  border: 1.5px solid #c5a47e;
  border-radius: 24px;
  background: #f2ce96 url(../../Shared/Assets/island/stamp-desk.webp) right center / cover no-repeat;
  box-shadow: 0 10px 26px #412e1818;
}

.album-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff6e4e6 0%, #fff6e4bf 34%, #fff6e400 56%);
  pointer-events: none;
}

.album-banner-copy {
  position: relative;
  max-width: min(48%, 440px);
}

.album-kicker {
  display: inline-block;
  margin-bottom: 6px;
  padding: 0.2em 0.75em;
  border-radius: var(--radius-pill);
  background: #fffdf7d9;
  border: 1px solid #d4b489;
  color: var(--ink-wood);
  font-size: 0.82rem;
  font-weight: 850;
}

.album-banner h1 {
  color: #2f2013;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.02;
}

.album-banner p {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 0;
  padding: 0.28em 0.85em;
  border-radius: var(--radius-pill);
  background: #fffdf8eb;
  border: 1px solid #d8bc94;
  color: var(--ink-wood);
  font-size: clamp(0.88rem, 1.35vw, 1.08rem);
  font-weight: 850;
}

.album-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 0;
  margin: clamp(18px, 2.4vw, 30px) 0 10px;
  padding: 10px;
  border: 1.5px solid #4d6b63;
  border-radius: 20px;
  background: #618077;
  box-shadow: 0 14px 32px #23383222;
}

.album-entry {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(24px, 3vw, 40px) 6%;
  text-align: center;
  color: var(--ink);
  border: 1px solid #cbb492;
  background: #fff9eb;
}

.album-entry:nth-child(odd) {
  border-radius: 12px 4px 4px 12px;
  box-shadow: inset -16px 0 18px -16px #7d624570;
}

.album-entry:nth-child(even) {
  border-radius: 4px 12px 12px 4px;
  box-shadow: inset 16px 0 18px -16px #7d624570;
}

/* Vintage Stamp Mount with Photo Corners */
.stamp-mount {
  position: relative;
  display: grid;
  place-items: center;
  width: min(74%, 236px);
  aspect-ratio: 1.18;
  padding: 12px;
  border: 1.5px dashed #bfa37e;
  border-radius: 10px;
  background: radial-gradient(ellipse, #f7e6c6 0%, #fff7e6 76%);
  box-shadow: inset 0 2px 6px #8d6d461c;
}

.stamp-mount::before,
.stamp-mount::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #c8ad86;
  border-style: solid;
  pointer-events: none;
}

.stamp-mount::before {
  top: 6px;
  left: 6px;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 4px;
}

.stamp-mount::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 4px;
}

.stamp-placeholder {
  display: none;
  width: 82%;
  height: 82%;
  background: center / contain no-repeat url("../../Shared/Assets/island/stamp-sketch.svg");
}

.stamp-mount .postage-stamp {
  width: 86%;
  height: 86%;
  object-fit: contain;
  transform: rotate(-5deg);
  filter: drop-shadow(0 4px 6px #52391e33);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.stamp-postmark {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 44%;
  aspect-ratio: 120 / 72;
  background: center / contain no-repeat url("../../Shared/Assets/island/postmark.svg");
  transform: rotate(-8deg);
  pointer-events: none;
}

.album-entry:nth-child(even) .postage-stamp {
  transform: rotate(4deg);
}

/* Uncollected state keeps mystery without spoiling full colour art */
.awaiting-stamp .postage-stamp,
.awaiting-stamp .stamp-postmark {
  display: none;
}

.awaiting-stamp .stamp-placeholder {
  display: block;
}

.stamp-caption {
  flex: 1;
  min-width: 0;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stamp-stage {
  display: inline-block;
  margin-bottom: 4px;
  padding: 0.12em 0.62em;
  border-radius: var(--radius-pill);
  background: var(--paper-sage);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.stamp-caption h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
}

.stamp-count {
  margin: 5px 0 0;
  padding: 0.16em 0.72em;
  border-radius: var(--radius-pill);
  background: #faecd0;
  color: var(--ink-wood);
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  font-weight: 850;
}

.awaiting-stamp .stamp-count {
  background: #f1eadc;
  color: #7d6b56;
}

.stamp-hint {
  margin: 8px auto 12px;
  max-width: 26ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.38;
}

.stamp-play-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: auto;
  min-height: 44px;
  padding: 0.32em 1.1em;
  border: 1.5px solid #b8c9ae;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--green);
  font-size: 0.94rem;
  font-weight: 850;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.awaiting-stamp .stamp-play-link {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}

/* ---------- Hover Enhancements ---------- */
@media (hover: hover) {
  .wordmark:hover .brand-bird { transform: rotate(-7deg) scale(1.05); }
  .stamps-pill:hover,
  .guide-pill:hover,
  .stamp-play-link:hover {
    transform: translateY(-1px);
  }
  .hero-cta:hover,
  .filled-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
  }
  .game-card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
    box-shadow: var(--shadow-card-hover);
  }
  .game-card:hover .cover-art > img:first-child {
    transform: scale(1.045);
  }
  .game-card:hover .play-arrow {
    background: var(--green-hover);
    transform: translateY(-50%) translateX(2px);
  }
  .grade-picker a:not([aria-current]):hover,
  .home-link:hover {
    background: var(--paper-sage);
    transform: translateY(-1px);
  }
  .map-location:hover .map-pin {
    background: #fff9e6;
    border-color: var(--green);
    box-shadow: 0 12px 26px #1d352c40;
    transform: scale(1.04);
  }
  .album-entry:not(.awaiting-stamp):hover .postage-stamp {
    transform: rotate(-2deg) scale(1.06);
  }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .energy-pill:not(.unavailable)::before {
    background-image: url("../../Shared/Assets/island/energy.svg");
  }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 920px) {
  .game-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-grades {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .grade-picker {
    max-width: none;
  }
}

@media (max-width: 630px) {
  .masthead {
    padding: 5px 10px;
    min-height: 54px;
    margin-top: 8px;
    border-radius: 17px;
  }
  .brand-bird {
    width: 34px;
    height: 34px;
  }
  .wordmark {
    gap: 7px;
    font-size: 1rem;
    line-height: 1.08;
  }
  .stamps-pill-label {
    display: none;
  }
  .stamps-pill {
    padding-inline: 0.52em;
  }
  .family-tools {
    gap: 5px;
  }
  .energy-pill {
    font-size: 0.88rem;
    padding-inline: 0.55em;
  }
  .hero {
    aspect-ratio: 2.35 / 1;
    min-height: 196px;
    margin-top: 10px;
    border-radius: 18px;
    align-items: center;
  }
  .hero::after {
    background: linear-gradient(100deg, #fff9ece8 0%, #fff8ebc4 46%, #fff8eb00 72%);
  }
  .hero-copy {
    max-width: 60%;
    padding: 14px 4.5%;
  }
  .hero-kicker {
    display: none;
  }
  .hero-copy h1 {
    font-size: clamp(1.75rem, 6.8vw, 2.45rem);
  }
  .hero-line {
    font-size: 0.84rem;
    margin-top: 0.45em;
  }
  .hero-cta {
    margin-top: 0.65em;
    min-height: 38px;
    padding: 0.34em 0.9em;
    font-size: 0.84rem;
  }
  .game-card {
    padding: 6px 6px 0;
    border-radius: 16px;
  }
  .cover-frame {
    border-radius: 10px;
  }
  .card-body {
    gap: 4px;
    padding: 9px 34px 11px 6px;
  }
  .word-pill {
    display: none;
  }
  .play-arrow {
    width: 1.65rem;
    height: 1.65rem;
    right: 4px;
    font-size: 0.85rem;
  }
  .grade-bar {
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 10px 14px;
  }
  .grade-bar .grade-picker {
    flex-basis: 100%;
  }
  .grade-picker a {
    min-height: 44px;
    font-size: 0.9rem;
    border-radius: 11px;
  }
  .harbor-map {
    max-width: 100%;
    border-radius: 18px;
  }
  .map-title {
    padding: 6px 11px;
    border-radius: 12px;
  }
  .map-title h1 {
    font-size: clamp(1.1rem, 4.2vw, 1.55rem);
  }
  .map-title p {
    display: none;
  }
  .map-pin {
    position: relative;
    gap: 0.32em;
    min-height: 40px;
    padding-inline: 0.6em 0.35em;
    font-size: clamp(0.82rem, 3.4vw, 1rem);
  }
  .map-pin .map-stamp {
    position: absolute;
    right: -0.35em;
    top: -1.45em;
  }
  .map-location {
    translate: -50% min(3vw, 14px);
  }
  .album-banner {
    aspect-ratio: 2.4 / 1;
    min-height: 124px;
    padding: 12px 4.5%;
    border-radius: 18px;
    background-position: 95% center;
  }
  .album-banner-copy {
    max-width: 58%;
  }
  .album-kicker {
    display: none;
  }
  .album-banner h1 {
    font-size: clamp(1.55rem, 6.8vw, 2.4rem);
  }
  .album-banner p {
    margin-top: 6px;
    font-size: 0.8rem;
  }
  .album-spread {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }
  .album-entry,
  .album-entry:nth-child(odd),
  .album-entry:nth-child(even) {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(12px, 4vw, 20px);
    padding: clamp(14px, 4vw, 22px);
    text-align: left;
    border-radius: 12px;
    box-shadow: 0 2px 0 #dfcfaf;
  }
  .stamp-mount {
    width: 100%;
  }
  .stamp-caption {
    margin: 0;
    align-items: flex-start;
  }
  .stamp-hint {
    margin-inline: 0;
  }
}

@media (max-width: 540px) {
  .hero {
    aspect-ratio: 1.52 / 1;
    min-height: 0;
    align-items: flex-start;
  }
  .hero-art {
    object-position: right bottom;
  }
  .hero-copy {
    max-width: 62%;
    padding: 16px 5%;
  }
}

@media (max-width: 370px) {
  .grade-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
