/* The collector pages (src/routes/collector.js): Stamp Album, Card Binder, Plushie Shelf. Real objects: a stamp album page
   with printed outlines, a nine-pocket card binder, a wooden plushie cabinet with name tags. Page palette, named by role. */
:root {
  --ca-wood: #c98b52;
  --ca-wood-dark: #8a5530;
  --ca-wood-back: #f3dcc0;
  --ca-sleeve: #e9eef9;
  --ca-cover: #4a3a8c;
}
.ca-form { display: grid; gap: 16px; margin: 0; }

/* A missing spot opens on a tap: where it comes from, and the gull post pin. */
.ca-page details > summary { list-style: none; display: grid; justify-items: center; align-content: start; gap: 6px; cursor: pointer; }
.ca-page details > summary::-webkit-details-marker { display: none; }
.ca-where { display: grid; justify-items: center; gap: 6px; margin-top: 6px; }
.ca-where small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.3; }
.ca-page details[open] > summary b { color: var(--ink); }
.ca-where .btn { border-radius: var(--r-sm); white-space: normal; line-height: 1.15; } /* "Pin to the gull post" wraps in a narrow spot */
.ca-spot, .ca-pocket-wrap, .ca-plush { min-width: 0; }
.ca-page :is(.ca-spot, .ca-pocket-wrap, .ca-plush) :is(b, .ca-tag, small) { overflow-wrap: break-word; hyphens: auto; } /* long names hyphenate in a narrow phone column */

/* Stamp album: a cream page, a printed outline per stamp. Placed stamps sit under a glassine hinge and Pip's postmark. */
.ca-album { display: grid; gap: 24px; padding: 20px; background: var(--parchment); border: var(--line) solid var(--ink); border-radius: 6px var(--r-tile) var(--r-tile) 6px; box-shadow: var(--shadow); } /* style-ok: book spine corner */
.ca-sec h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px dashed var(--rule); font: 600 var(--fs-sm) var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ca-sec h2 small { font-weight: 600; letter-spacing: 0; text-transform: none; }
.ca-spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.ca-spot { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.ca-spot b { font: 600 var(--fs-xs)/1.2 var(--display); }
.ca-outline { position: relative; width: 100%; max-width: 104px; aspect-ratio: 1; display: grid; place-items: center; border: 2px dashed color-mix(in oklab, var(--ink) 28%, transparent); border-radius: 4px; } /* style-ok: printed stamp outline */
.ca-outline svg { width: 88%; height: auto; }
.ca-wide .ca-outline { aspect-ratio: 4 / 3; }
.ca-wide .ca-outline svg { width: 100%; }
.ca-placed .ca-outline { border-color: transparent; }
.ca-placed .ca-outline::before { content: ''; position: absolute; z-index: 1; top: 4px; left: 50%; translate: -50% 0; width: 40%; height: 12px; background: rgb(255 255 255 / .6); border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent); }
.ca-postmark { position: absolute; right: -14px; bottom: -6px; width: 44px; height: auto; color: var(--grape); opacity: .7; rotate: -12deg; pointer-events: none; }
.ca-owned .ca-outline { background: var(--hi-soft); border: 2px dashed var(--pink); }
.ca-owned .ca-outline svg { rotate: -8deg; translate: 6px -10px; filter: drop-shadow(3px 4px 0 color-mix(in oklab, var(--ink) 25%, transparent)); }
.ca-missing .ca-outline svg, .ca-missing .ca-pocket svg { filter: grayscale(1) opacity(.3); }
.is-mystery svg, .ca-missing .ca-sit svg { filter: brightness(0) opacity(.12) !important; } /* a Starfall piece nobody has found keeps its look a secret; plushies read best as silhouettes */
.ca-missing b { color: var(--muted); font-weight: 500; }

/* Card binder: sleeve pages of nine pockets; desktop opens two pages side by side on a spine. */
.ca-binder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; background: var(--ca-cover); border: var(--line) solid var(--ink); border-radius: var(--r-tile); box-shadow: var(--shadow); gap: 6px; }
.ca-sheet { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 12px 10px; padding: 16px 16px 32px 40px; background: var(--ca-sleeve); border: 2px solid var(--ink); border-radius: 6px; } /* style-ok: binder sleeve */
.ca-sheet::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 16px; background: radial-gradient(circle at 50% 50%, var(--ca-cover) 0 5px, var(--ink) 5px 7px, transparent 7px) 0 16% / 16px 33% repeat-y; }
.ca-folio { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; color: var(--muted); font: 600 var(--fs-xs) var(--display); }
.ca-pocket-wrap { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.ca-pocket-wrap b { font: 600 var(--fs-xs)/1.2 var(--display); }
.ca-pocket { position: relative; width: 100%; aspect-ratio: 5 / 6; display: grid; place-items: center; overflow: visible; border: 2px solid color-mix(in oklab, var(--ink) 40%, transparent); border-radius: 6px; background: linear-gradient(135deg, rgb(255 255 255 / .85), rgb(255 255 255 / .25) 45%, rgb(255 255 255 / .6)); } /* style-ok: card sleeve pocket */
.ca-pocket::after { content: ''; position: absolute; inset: 10px 0 auto; height: 2px; background: color-mix(in oklab, var(--ink) 15%, transparent); } /* the sleeve's open lip */
.ca-pocket svg { width: 96%; height: auto; }
.ca-owned .ca-pocket { border: 2px dashed var(--pink); background: var(--hi-soft); }
.ca-owned .ca-pocket svg { translate: 0 -22%; rotate: 6deg; }
.ca-missing .ca-pocket { border-style: dashed; }

/* Plushie shelf: one wooden cabinet, plank segments join into shelves, a paper tag hangs under each spot. */
.ca-cabinet { padding: 16px 12px 4px; background: var(--ca-wood-back); border: var(--line) solid var(--ink); border-radius: var(--r-tile); box-shadow: var(--shadow); }
.ca-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.ca-plush { display: grid; justify-items: center; align-content: start; gap: 0; text-align: center; }
.ca-page .ca-plush > summary { gap: 0; padding-block: 0; min-height: 0; justify-self: stretch; } /* a missing spot's summary must stack exactly like a placed spot's div (no 6px summary gap, no phone 10px summary padding), or its plank drops below the row's shelf line */
.ca-plush b { display: none; } /* the tag carries the name */
.ca-sit { height: 96px; display: grid; place-items: end center; }
.ca-sit svg { width: 96px; max-width: 100%; height: auto; margin-bottom: -10px; }
.ca-plank { justify-self: stretch; margin-inline: -6px; height: 14px; background: var(--ca-wood); border-block: var(--line) solid var(--ink); box-shadow: 0 4px 0 var(--ca-wood-dark); } /* reaches into the column gap, so a row of planks reads as one shelf */
.ca-tag { position: relative; display: block; margin-top: 16px; padding: 6px 10px; max-width: 128px; background: var(--card); border: 2px solid var(--ink); border-radius: 6px; rotate: -2deg; font: 600 var(--fs-xs)/1.2 var(--display); } /* style-ok: paper tag */
.ca-tag::before { content: ''; position: absolute; top: -18px; left: 50%; width: 2px; height: 16px; background: var(--ink); }
.ca-tag small { display: block; color: var(--muted); font: 600 var(--fs-xs) var(--body); }
.ca-plush > .btn { margin-top: 10px; }
.ca-missing .ca-tag { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; }
.ca-owned .ca-sit { background: radial-gradient(closest-side, var(--hi) 60%, transparent); }
.ca-owned .ca-sit svg { translate: 0 -14px; rotate: -6deg; }
.ca-owned .ca-tag { background: var(--hi-soft); border-color: var(--pink); }

@media (max-width: 767px) {
  .ca-album { padding: 14px 10px; }
  .ca-spots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .ca-binder { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 12px; }
  .ca-sheet { padding: 12px 6px 32px 32px; gap: 12px; }
  .ca-sheet::before { left: 8px; }
  .ca-shelves { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ca-sit { height: 84px; }
  .ca-sit svg { width: 84px; }
  .ca-tag { padding: 4px; max-width: 100%; }
  .ca-page details > summary { min-width: 0; max-width: 100%; }
  .ca-page .ca-form .btn-small { padding-inline: 4px; width: 100%; }
}
