/* The binder page (js/pages/binder.js): a leather ring binder of 3×3 plastic
   sleeve pages that turn in 3D, the card viewer a card slides out into, and
   the collection laid out by game and set underneath. Original artwork. */

.binder-page { max-width: 1280px; }
.binder-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 30px; margin-bottom: 10px; }
.binder-head h1 { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 0.25em; }
.binder-head .lede { margin: 0; max-width: 58ch; }
.binder-banner { margin: 6px 0 0; padding: 10px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 600; }
.plus-chip { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: rgba(12, 10, 24, 0.8); border: 1.5px solid rgba(255, 255, 255, 0.75); line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- stage */
.binder-stage { display: grid; justify-items: center; gap: 6px; margin-top: 8px; }
.book-frame { position: relative; width: 100%; display: grid; justify-items: center; outline: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.book-frame:focus-visible .book { outline: 2px solid var(--accent); outline-offset: 10px; border-radius: 20px; }
/* Clips sideways only (a turning page can swing past the edge), and reaches into the page margin so the book's shadow fades out instead of ending in a hard-edged box. */
.book-clip { width: calc(100% + 32px); min-width: 0; margin-inline: -16px; display: grid; justify-items: center; padding: 20px 16px 30px; overflow: hidden; overflow: clip visible; }
.book { position: relative; width: calc(var(--pw, 300px) * 2); height: var(--ph, 400px); }
.book.is-single { width: var(--pw, 300px); }
.book::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: -26px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); filter: blur(18px); transition: transform 0.7s var(--ease); }
.book-inner, .rings { position: absolute; inset: 0; transition: transform 0.7s var(--ease), opacity 0.4s; }
.book.is-double.is-closed .book-inner, .book.is-double.is-closed::before { transform: translateX(calc(var(--pw) * -0.5)); }
.book.is-double.is-closed::before { left: 54%; right: 4%; }

/* A leaf: one sheet with a page on each side, hinged on the rings. */
.leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; transform: perspective(2600px) rotateY(0deg); transform-style: preserve-3d; transition: transform var(--turn, 780ms) cubic-bezier(0.45, 0.05, 0.2, 1); }
.book.is-single .leaf { left: 0; width: 100%; }
.leaf.is-turned { transform: perspective(2600px) rotateY(-180deg); }
.leaf.no-anim { transition: none; }
.book.is-single .leaf.is-turned:not(.is-turning) { visibility: hidden; }
.face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); }
/* Only the side of each leaf that faces you takes clicks; otherwise the hidden side of a
   turned leaf can catch the pointer over the other page. A leaf in mid-turn takes none. */
.leaf.is-turned > .face.front, .leaf:not(.is-turned) > .face.back, .leaf.is-turning > .face { pointer-events: none; }
.face::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08) 35%, rgba(255, 255, 255, 0.1) 62%, rgba(0, 0, 0, 0.12)); }
.leaf.is-turning .face::after { animation: page-shade var(--turn, 780ms) ease-in-out; }
@keyframes page-shade { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* The inside of the back cover, under the last page. */
.board { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; border-radius: 4px 16px 16px 4px; background: radial-gradient(130% 90% at 80% 10%, #3a2f5c, #1b1630 70%); box-shadow: inset 10px 0 18px rgba(0, 0, 0, 0.45), 0 26px 50px rgba(0, 0, 0, 0.45); }

/* Rings down the spine. */
.rings { z-index: 900; pointer-events: none; }
.rings i { position: absolute; left: calc(50% - 22px); width: 44px; height: 17px; border-radius: 10px; border: 4px solid; border-color: #f3f5fa #8b91a1 #646a7a #d6dae3; background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.6); }
.rings i:nth-child(1) { top: calc(17% - 8px); }
.rings i:nth-child(2) { top: calc(50% - 8px); }
.rings i:nth-child(3) { top: calc(83% - 8px); }
.book.is-single .rings i { left: -16px; width: 34px; }
.book.is-closed .rings { opacity: 0; }

/* ---------------------------------------------------------------- the cover */
.cover { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background-color: #4f2512;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .06 0 0 0 0 .02 0 0 0 .5 0'/%3E%3C/filter%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .03 0 0 0 0 0 0 0 0 -1.6 1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"), radial-gradient(60% 45% at 32% 26%, rgba(255, 196, 132, 0.2), transparent 70%), radial-gradient(130% 100% at 50% 45%, #6e3820, #4b2210 60%, #260f05);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 170, 0.08), inset 0 0 38px rgba(20, 8, 0, 0.75), inset 16px 0 22px rgba(0, 0, 0, 0.55), 0 30px 60px rgba(0, 0, 0, 0.5); }
/* Shading along the spine and a thin rolled edge. */
.cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 6%, transparent 95%, rgba(196, 140, 88, 0.14)), linear-gradient(transparent 96%, rgba(196, 140, 88, 0.1)); box-shadow: inset 0 0 0 1.5px rgba(30, 12, 2, 0.7), inset 0 0 0 3px rgba(196, 140, 88, 0.12); }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-art text { font-family: "Cinzel", "Times New Roman", serif; font-weight: 700; font-size: 10px; letter-spacing: 0.07em; }
.cv-stitch { stroke: #c9a46a; stroke-width: 1.1; stroke-dasharray: 3.4 2.6; stroke-linecap: round; opacity: 0.55; }
.cover-open { position: absolute; left: 50%; bottom: 4.5%; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(232, 200, 122, 0.5); background: rgba(30, 14, 4, 0.55); color: #f1d796; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.15), 0 2px 6px rgba(0, 0, 0, 0.4); }
.cover-open:hover { background: rgba(30, 14, 4, 0.75); }
.nameplate-row i, .shelf-jump i, .shelf-game h3 i { width: 9px; height: 9px; border-radius: 3px; transform: rotate(45deg); background: var(--gc); flex: none; }
.inside { position: absolute; inset: 0; border-radius: 16px 4px 4px 16px; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 10%; background: radial-gradient(130% 90% at 20% 10%, #3a2f5c, #1b1630 70%); box-shadow: inset -10px 0 18px rgba(0, 0, 0, 0.45), 0 26px 50px rgba(0, 0, 0, 0.45); }
.book.is-single .inside { border-radius: 6px 16px 16px 6px; }
/* While the binder is shut, everything under the cover gets the same corners so nothing dark peeks out. */
.book.is-closed :is(.board, .face, .bpage, .inside) { border-radius: 10px; }
.nameplate { width: 100%; max-width: 330px; padding: 18px 20px; border-radius: 12px; background: linear-gradient(160deg, #fbf3dd, #e9dcb8); color: #2a2140; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.nameplate .kicker { color: #8a6420; margin-bottom: 2px; }
.nameplate .quiet { color: #6b5f80; margin: 0; }
.nameplate-name { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: 1.4rem; border-bottom: 1px solid rgba(42, 33, 64, 0.2); padding-bottom: 6px; overflow-wrap: anywhere; }
.nameplate-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 0.86rem; }
.nameplate-row b { flex: 1; }
.nameplate-row span { color: #5b5070; white-space: nowrap; }
.inside-hint { margin: 0; color: rgba(255, 240, 210, 0.7); font-size: 0.86rem; font-weight: 600; }

/* ---------------------------------------------------------------- pages and sleeves */
.bpage { position: absolute; inset: 0; padding: 6% 6% 8% 10%; border-radius: 4px 14px 14px 4px; background: radial-gradient(120% 70% at 35% 0%, color-mix(in srgb, var(--gc, #777) 12%, #25222f), #131219 75%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 6px 0 12px rgba(0, 0, 0, 0.5), 0 26px 50px rgba(0, 0, 0, 0.45); }
.bpage.is-left { padding: 6% 10% 8% 6%; border-radius: 14px 4px 4px 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset -6px 0 12px rgba(0, 0, 0, 0.5), 0 26px 50px rgba(0, 0, 0, 0.45); }
.bpage.is-blank { background: radial-gradient(120% 70% at 35% 0%, #22202b, #131219 75%); }
/* Punched holes along the spine edge. */
.bpage::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.4%; width: 3.6%; pointer-events: none; background: radial-gradient(circle at 50% 17%, #07060b 0 34%, rgba(255, 255, 255, 0.12) 38%, transparent 44%), radial-gradient(circle at 50% 50%, #07060b 0 34%, rgba(255, 255, 255, 0.12) 38%, transparent 44%), radial-gradient(circle at 50% 83%, #07060b 0 34%, rgba(255, 255, 255, 0.12) 38%, transparent 44%); background-size: 100% 100%; aspect-ratio: auto; }
.bpage.is-left::before { left: auto; right: 2.4%; }
.bpage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 2.6%; height: 100%; }
.bpage-foot { position: absolute; left: 0; right: 0; bottom: 2%; margin: 0; text-align: center; font-size: clamp(0.62rem, calc(var(--pw) * 0.024), 0.78rem); font-weight: 700; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); }
.bpage-foot span { color: color-mix(in srgb, var(--gc) 75%, white); }

.pocket { position: relative; display: block; padding: 0; border: 0; border-radius: 5px; background: rgba(255, 255, 255, 0.04); cursor: pointer; font: inherit; color: inherit; }
.pocket.is-empty { cursor: default; background: rgba(255, 255, 255, 0.025); }
.pocket.is-picked { z-index: 6; }
/* The plastic: a soft sheen over the card, and the open top edge. */
.pocket::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 5px; background: linear-gradient(115deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.05) 20%, transparent 38%, transparent 68%, rgba(255, 255, 255, 0.08) 84%, transparent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
.pocket::before { content: ""; position: absolute; left: 3%; right: 3%; top: 6%; height: 1.5px; z-index: 3; pointer-events: none; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35) 15%, rgba(255, 255, 255, 0.35) 85%, transparent); }
.pocket-card { position: absolute; left: 5.5%; right: 5.5%; top: 4%; bottom: 3%; z-index: 1; overflow: hidden; border-radius: 5% / 3.6%; background: #0d0c12; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); transition: transform 0.32s var(--ease), box-shadow 0.32s; }
.pocket-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pocket-card i { display: grid; place-items: center; height: 100%; padding: 8%; font-style: normal; font-size: 0.66rem; font-weight: 700; text-align: center; color: rgba(255, 255, 255, 0.7); }
.pocket-card.is-landscape img { position: absolute; left: -20%; top: 14.3%; width: 140%; height: 71.4%; transform: rotate(90deg); }
.pocket[data-k]:hover .pocket-card, .pocket[data-k]:focus-visible .pocket-card { transform: translateY(-6%); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); }
.pocket[data-k]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pocket-card.is-out { transform: translateY(-48%) !important; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55); }
/* Holo cards shimmer in their sleeves only when the pointer is on them: a soft
   rainbow sheen that drifts, and a bright band of light that crosses the card.
   At rest the card is left clean (no stripes sliding across the page). */
.pocket-card[data-foil]::after, .pocket-card[data-foil]::before { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 260%; pointer-events: none; z-index: 1; }
.pocket-card[data-foil]::after { mix-blend-mode: color-dodge; opacity: 0; transition: opacity 0.35s ease; filter: brightness(0.62) contrast(1.6) saturate(1.15); background: linear-gradient(112deg, hsl(2 100% 73%) 8%, hsl(53 100% 69%) 22%, hsl(93 100% 69%) 36%, hsl(176 100% 76%) 50%, hsl(228 100% 74%) 64%, hsl(283 100% 73%) 78%, hsl(2 100% 73%) 92%); }
.pocket-card[data-foil="gold"]::after { background: linear-gradient(112deg, #fff1b8 10%, #e3b04b 30%, #fff7d6 50%, #b98a2e 70%, #fff1b8 90%); }
.pocket-card[data-foil="etched"]::after { background: linear-gradient(112deg, #d9c7a0 10%, #8f7a52 35%, #f0e2c0 55%, #8f7a52 75%, #d9c7a0 90%); }
.pocket[data-k]:hover .pocket-card[data-foil]::after { opacity: 0.28; animation: pocket-holo 3.5s ease-in-out infinite alternate; }
.pocket[data-k]:hover .pocket-card[data-foil="etched"]::after { opacity: 0.22; }
.pocket-card[data-foil]::before { mix-blend-mode: screen; opacity: 0; background: linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.55) 48%, color-mix(in srgb, var(--tc) 50%, transparent) 52%, transparent 60%); transform: translateX(-30%); }
.pocket[data-k]:hover .pocket-card[data-foil]::before { opacity: 1; animation: pocket-glint 1.5s ease-in-out infinite; }
@keyframes pocket-holo { from { transform: translateX(-14%); } to { transform: translateX(20%); } }
@keyframes pocket-glint { from { transform: translateX(-30%); } to { transform: translateX(30%); } }

/* Divider tabs, one per game, standing out from the right edge. */
.book-tabs { position: absolute; z-index: 950; top: calc(20px + var(--ph) * 0.07); left: calc(50% + var(--pw)); display: grid; gap: 6px; transition: transform 0.7s var(--ease); }
.book-tabs button { writing-mode: vertical-rl; padding: 12px 6px; border: 0; border-radius: 0 10px 10px 0; background: var(--gc); color: var(--gi); font: inherit; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; cursor: pointer; box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.35); transform: translateX(-3px); transition: transform 0.25s var(--ease); }
.book-tabs button:hover, .book-tabs button[aria-current="true"] { transform: translateX(2px); }
.book-frame.is-double:has(.book.is-closed) .book-tabs { transform: translateX(calc(var(--pw) * -0.5)); }
.book-frame.is-single .book-tabs { position: static; order: -1; display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: -6px; transform: none; }
.book-frame.is-single .book-tabs button { writing-mode: horizontal-tb; padding: 6px 12px; border-radius: 999px; transform: none; }
.book-frame.is-single .book-tabs button[aria-current="true"] { outline: 2px solid #fff; outline-offset: 1px; }

.book-bar { display: flex; align-items: center; justify-content: center; gap: 14px; }
.book-bar .chip-btn:disabled { opacity: 0.4; pointer-events: none; }
.book-count { margin: 0; min-width: 12ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.book-help { margin: 0; font-size: 0.85rem; text-align: center; }

/* ---------------------------------------------------------------- empty */
.binder-empty { max-width: 640px; margin: 18px auto 0; padding: 24px; text-align: center; border-radius: 22px; background: var(--surface); border: 1px solid var(--edge); }
.binder-empty h2 { margin: 0 0 6px; font-family: var(--display); }
.binder-empty-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0; }
.binder-empty-games .game-btn { flex: 1 1 150px; max-width: 190px; }
.binder-page:not(.has-cards) .book-bar, .binder-page:not(.has-cards) .book-help { display: none; }

/* ---------------------------------------------------------------- the shelf */
.binder-shelf { margin-top: clamp(40px, 6vw, 72px); }
.shelf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.shelf-head h2 { margin: 0; font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2rem); }
.shelf-search input { width: min(320px, 70vw); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface); color: inherit; font: inherit; }
.shelf-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.shelf-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface); text-decoration: none; font-weight: 700; font-size: 0.88rem; }
.shelf-jump a b { color: var(--muted); font-weight: 700; }
.shelf-game { margin-top: 34px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.shelf-game header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-bottom: 8px; border-bottom: 2px solid color-mix(in srgb, var(--gc) 55%, transparent); }
.shelf-game h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--display); font-size: 1.3rem; }
.shelf-game h3 i { width: 12px; height: 12px; }
.shelf-game header p { margin: 0; color: var(--muted); }
.shelf-set { margin-top: 18px; }
.shelf-set h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-size: 1rem; }
.shelf-set h4 a { text-decoration: none; }
.shelf-set h4 a:hover { text-decoration: underline; }
.shelf-set h4 em { font-style: normal; color: var(--muted); font-weight: 600; }
.shelf-set h4 span { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.78rem; }
.shelf-grid { grid-template-columns: repeat(auto-fill, minmax(min(122px, 28vw), 1fr)); }
.shelf-grid .own-mark { display: none; }
.shelf-grid .card-meta strong { font-size: 0.8rem; }
.shelf-grid .card-meta em { font-size: 0.72rem; }

/* ---------------------------------------------------------------- the card viewer */
.bview { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: auto; }
.bview::backdrop { background: rgba(6, 5, 14, 0.66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.bview[open] .bview-info { animation: bview-in 0.45s var(--ease) both; }
.bview-shell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(16px, 4vw, 56px); max-width: 1100px; margin: 0 auto; padding: 64px var(--gutter) 40px; }
.bview-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.bview-card { position: relative; justify-self: center; margin: 0; width: min(100%, 400px, calc((100dvh - 150px) * 0.716)); aspect-ratio: 63 / 88; overflow: hidden; border-radius: 4.6% / 3.3%; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 70px color-mix(in srgb, var(--tc) 32%, transparent); }
.bview-card .card-img { width: 100%; height: 100%; }
/* Light, holo foil and the card's own effect, as on the set pages. The foil
   drifts by itself, and follows the pointer when it is on the card. */
.bview-card .card-img { position: relative; overflow: hidden; }
.bview-card .card-img::before, .bview-card .card-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity 0.35s; }
.bview-card:not([data-foil]) .card-img::before { background: radial-gradient(farthest-corner circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.12) 28%, transparent 60%); mix-blend-mode: soft-light; opacity: 0.25; }
.bview-card.is-lit:not([data-foil]) .card-img::before { opacity: calc(0.35 + var(--far, 0) * 0.3); }
.bview-card[data-foil] .card-img::before { opacity: 0.5; animation: bview-holo 6s ease-in-out infinite alternate; }
.bview-card[data-foil].is-lit .card-img::before { animation: none; opacity: calc(0.45 + var(--far, 0) * 0.25); }
.bview-card .card-img::after { --c: var(--tc); --hot: color-mix(in srgb, var(--tc) 45%, white); mix-blend-mode: screen; opacity: 0.6; }
@property --py { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@keyframes bview-holo { 0% { --px: 8%; --py: 18%; } 50% { --px: 92%; --py: 46%; } 100% { --px: 30%; --py: 92%; } }
.bview-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bview-card.is-landscape { aspect-ratio: 88 / 63; width: min(100%, 540px); }
.bview-card.is-swap { animation: bview-swap 0.4s var(--ease); }
@keyframes bview-swap { from { opacity: 0.2; transform: translateY(18px) scale(0.96); } }
@keyframes bview-in { from { opacity: 0; transform: translateY(14px); } }
.bview-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface); color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.bview-nav:hover, .bview-close:hover { border-color: var(--accent); }
.bview-close { position: fixed; top: 14px; right: 14px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface); color: inherit; font-size: 1.1rem; cursor: pointer; }
.bview-info { padding: 22px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bview-game { margin: 0; }
.bview-game .game-tag { background: color-mix(in srgb, var(--gc) 24%, transparent); color: color-mix(in srgb, var(--gc) 40%, white); }
.bview-name { margin: 0.25em 0 0.1em; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.08; }
.bview-set { margin: 0 0 16px; color: var(--muted); font-weight: 600; }
.bview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.bview-facts dt { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bview-facts dd { margin: 2px 0 0; font-weight: 700; }
.bview-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 760px) {
  .bview-shell { grid-template-columns: minmax(0, 1fr); align-content: start; padding-top: 70px; }
  .bview-card { width: min(70vw, 330px, calc((100dvh - 330px) * 0.716)); }
  .bview-nav { width: 38px; height: 38px; }
  .book-clip { padding: 14px 16px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .leaf, .book-inner, .pocket-card { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pocket-card[data-foil]::after, .pocket-card[data-foil]::before, .bview-card .card-img::before, .bview-card .card-img::after { animation: none !important; }
}
