/* Binder covers (js/covers.js) and the binder's pockets. Everything is drawn here, no pictures.
   A cover: .v-cover.c-<id> > .v-cover-board (stitching, crest, title, small line, VAULT) + .v-cover-spine (three ring rivets).
   The board is a size container, so the same cover scales from the big closed binder down to the picker's small ones. */

/* ---------- The cover ---------- */
.v-cover {
  --c1: #26366f; --c2: #0e1534; --st: rgba(245, 197, 66, 0.62); --ink: #eef0ff; --acc: #f5c542; --lining: #141a3e;
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.3; border-radius: 12px 16px 16px 12px;
  transform-style: preserve-3d; transform-origin: left center;
  box-shadow: 3px 4px 0 -1px #0a0d20, 6px 8px 0 -2px #06081a, 0 26px 44px rgba(0, 0, 0, 0.55);
}
.v-cover-board {
  container-type: inline-size;
  position: absolute; inset: 0; overflow: hidden; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 9% 6% 16%;
  color: var(--ink); text-align: center;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.045) 0 0.6px, transparent 0.8px) 0 0 / 4px 4px, /* leatherette grain */
    radial-gradient(ellipse 90% 65% at 42% 28%, rgba(255, 255, 255, 0.16), transparent 62%), /* the padding catching the light */
    linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -10px 30px rgba(0, 0, 0, 0.4), inset 0 0 26px rgba(0, 0, 0, 0.35);
}
/* The inside of the cover, seen once it swings open. */
.v-cover::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px 12px 12px 16px; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 6px, transparent 6px 12px), var(--lining);
  box-shadow: inset 0 0 0 5px var(--c2), inset 0 0 40px rgba(0, 0, 0, 0.5);
}
.v-cover-stitch { position: absolute; inset: 4.5% 4.5% 4.5% 13%; border: 2px dashed var(--st); border-radius: 10px; pointer-events: none; }
.v-cover-crest {
  display: grid; place-items: center; width: 32cqw; aspect-ratio: 1; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 40% 32%, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.28) 70%);
  box-shadow: 0 0 0 0.9cqw var(--acc), 0 0 0 1.8cqw rgba(0, 0, 0, 0.22), inset 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.45);
}
.v-cover-crest .logo-mark { width: 9cqw; height: 12cqw; border-width: 1.1cqw; border-color: var(--acc); border-radius: 1.3cqw; box-shadow: 0 0.6cqw 1.2cqw rgba(0, 0, 0, 0.5); }
.v-cover-crest svg { width: 62%; height: auto; filter: drop-shadow(0 0.8cqw 1cqw rgba(0, 0, 0, 0.45)); }
/* Stamped into the cover: a dark edge above and a light one below. */
.v-cover-title {
  max-width: 100%; margin-top: 6cqw; font: 700 8.4cqw/1.1 var(--pixel); letter-spacing: 0.02em; overflow-wrap: anywhere;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.14);
}
.v-cover-sub { margin-top: 2cqw; font: 600 4.3cqw/1.3 var(--body); opacity: 0.78; }
.v-cover-brand { position: absolute; left: 16%; right: 9%; bottom: 7.5%; font: 700 4.2cqw var(--pixel); letter-spacing: 0.42em; text-indent: 0.42em; color: var(--st); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); }
.v-cover-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 10%; border-radius: 12px 0 0 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.1) 48%, rgba(0, 0, 0, 0.42) 78%, rgba(0, 0, 0, 0.12));
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.45), 1px 0 0 rgba(255, 255, 255, 0.07);
}
.v-cover-spine i {
  position: absolute; left: 28%; width: 44%; aspect-ratio: 1; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #f1f4fa, #9aa4b6 50%, #3e4659);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.v-cover-spine i:nth-child(1) { top: 18%; }
.v-cover-spine i:nth-child(2) { top: 50%; }
.v-cover-spine i:nth-child(3) { top: 82%; }

/* Gold, stamped like foil (Gold Trim, Master Set, Legend). */
.c-gold .v-cover-title, .c-master .v-cover-title, .c-legend .v-cover-title {
  background: linear-gradient(180deg, #fff3c4 10%, #f5c542 48%, #b8862a 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}
/* Metal corners on the open side (Gold Trim, Vault Steel, Master Set, Legend). */
.c-gold .v-cover-board::after, .c-steel .v-cover-board::after, .c-master .v-cover-board::after, .c-legend .v-cover-board::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(225deg, var(--corner, #f5c542) 0 7%, rgba(0, 0, 0, 0.35) 7% 7.6%, transparent 7.6%),
    linear-gradient(315deg, var(--corner, #f5c542) 0 7%, rgba(0, 0, 0, 0.35) 7% 7.6%, transparent 7.6%);
}

/* ---------- The ten covers ---------- */
.c-crimson { --c1: #a02a3d; --c2: #3c0811; --st: rgba(255, 214, 160, 0.66); --acc: #ffd6a0; --lining: #22080e; }
.c-forest { --c1: #2a7a50; --c2: #08241a; --st: rgba(222, 240, 200, 0.6); --acc: #dcefc8; --lining: #08190f; }
.c-gold { --c1: #2c2b33; --c2: #0b0b10; --st: #f5c542; --acc: #f5c542; --lining: #121116; --corner: linear-gradient(225deg, #fff3c4, #f5c542 40%, #b8862a); }
.c-gold .v-cover-stitch { border: 2px solid rgba(245, 197, 66, 0.85); outline: 1px solid rgba(245, 197, 66, 0.45); outline-offset: 0.9cqw; }
.c-gold .v-cover-board::after { background: linear-gradient(225deg, #f5c542 0 7%, rgba(0, 0, 0, 0.35) 7% 7.6%, transparent 7.6%), linear-gradient(315deg, #d9a934 0 7%, rgba(0, 0, 0, 0.35) 7% 7.6%, transparent 7.6%); }
/* Starlight: a night sky that twinkles. */
.c-starlight { --c1: #2c2180; --c2: #06061c; --st: rgba(205, 214, 255, 0.6); --acc: #cdd6ff; --lining: #0b0a26; }
.c-starlight .v-cover-board::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 22% 14%, #fff 0 0.7px, transparent 1.4px), radial-gradient(circle at 78% 22%, #fff 0 1px, transparent 1.8px),
    radial-gradient(circle at 64% 70%, #fff 0 0.7px, transparent 1.4px), radial-gradient(circle at 30% 84%, #dfe6ff 0 1px, transparent 1.8px),
    radial-gradient(circle at 86% 58%, #fff 0 0.6px, transparent 1.2px), radial-gradient(circle at 44% 38%, #e8ecff 0 0.6px, transparent 1.2px),
    radial-gradient(circle at 12% 48%, #fff 0 0.8px, transparent 1.6px), radial-gradient(circle at 70% 90%, #fff 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 0.5px, transparent 1px) 0 0 / 23px 29px,
    radial-gradient(ellipse 70% 40% at 70% 30%, rgba(140, 120, 255, 0.28), transparent 70%);
  animation: vTwinkle 3.2s ease-in-out infinite;
}
@keyframes vTwinkle { 50% { opacity: 0.55; } }
/* Holo: a rainbow sheen that drifts across silver. */
.c-holo { --c1: #e3e7f0; --c2: #9aa3b8; --st: rgba(30, 36, 66, 0.4); --ink: #1b2036; --acc: #ffffff; --lining: #2a2f45; }
.c-holo .v-cover-board::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: 0.75;
  background: linear-gradient(115deg, transparent 18%, #ff3d8b 30%, #ffd23d 40%, #3dffb1 50%, #3db4ff 60%, #b23dff 70%, transparent 82%) 0 0 / 260% 260%;
  animation: vHolo 5s ease-in-out infinite alternate;
}
.c-holo .v-cover-title { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(0, 0, 0, 0.25); }
.c-holo .v-cover-brand { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
@keyframes vHolo { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
/* Vault Steel: brushed metal with rivets, like the Vault's door. */
.c-steel { --c1: #c9d0dc; --c2: #5d677b; --st: rgba(22, 27, 40, 0.42); --ink: #1d2331; --acc: #3c4457; --lining: #262c3b; --corner: #8e98aa; }
/* (The rivets are drawn by a child, ::before, so their size can follow the cover: cqw only measures from inside it.) */
.c-steel .v-cover-board::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 19% 5.5%, #eef1f6 0 2.2cqw, #5d677b 2.8cqw, transparent 3.3cqw), radial-gradient(circle at 84% 5.5%, #eef1f6 0 2.2cqw, #5d677b 2.8cqw, transparent 3.3cqw),
    radial-gradient(circle at 19% 94.5%, #eef1f6 0 2.2cqw, #5d677b 2.8cqw, transparent 3.3cqw), radial-gradient(circle at 84% 94.5%, #eef1f6 0 2.2cqw, #5d677b 2.8cqw, transparent 3.3cqw);
}
.c-steel .v-cover-board {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 90% 65% at 38% 26%, rgba(255, 255, 255, 0.45), transparent 62%),
    linear-gradient(160deg, var(--c1), var(--c2));
}
.c-steel .v-cover-crest { background: radial-gradient(circle at 38% 30%, #f4f6fa, #9aa4b6 55%, #4b5468); }
.c-steel .v-cover-crest .logo-mark { border-color: #f5c542; }
.c-steel .v-cover-title { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 -1px 0 rgba(0, 0, 0, 0.3); }
.c-steel .v-cover-brand { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
/* Master Set: royal purple and gold, with a ribbon. */
.c-master { --c1: #52249a; --c2: #150630; --st: rgba(245, 197, 66, 0.72); --acc: #f5c542; --lining: #140724; }
.c-master .v-cover-board::before {
  content: '★'; position: absolute; top: 0; right: 13%; width: 11%; height: 17%; display: grid; place-items: center; padding-bottom: 3%;
  font-size: 5cqw; color: #4a3207; background: linear-gradient(180deg, #fff3c4, #f5c542 50%, #b8862a);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}
/* Team: the member's team colour (style="--team"). */
.c-team {
  --c1: color-mix(in srgb, var(--team, #6390f0) 78%, #000); --c2: color-mix(in srgb, var(--team, #6390f0) 22%, #05060f);
  --st: rgba(255, 255, 255, 0.55); --acc: var(--team, #6390f0); --lining: color-mix(in srgb, var(--team, #6390f0) 12%, #05060f);
}
/* Legend: obsidian with a foil edge that slowly runs around it. */
@property --v-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.c-legend { --c1: #221a14; --c2: #050403; --st: rgba(255, 184, 77, 0.75); --acc: #ffb84d; --lining: #0c0806; --corner: #f5c542; }
.c-legend .v-cover-board::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.6cqw; pointer-events: none;
  background: conic-gradient(from var(--v-ang), #ff6b57, #f5c542, #fff3c4, #f5c542, #ff6b57, #b8862a, #ff6b57);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: vLegend 6s linear infinite;
}
.c-legend .v-cover-crest { box-shadow: 0 0 0 0.9cqw var(--acc), 0 0 5cqw rgba(255, 184, 77, 0.45), inset 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.45); }
@keyframes vLegend { to { --v-ang: 360deg; } }

/* ---------- The closed binder ---------- */
.v-cover-view { text-align: center; }
/* As big as fits: the whole closed binder, its hint and buttons on the first screen (also on a phone). */
.v-cover-stage { width: min(380px, 80vw, max(220px, calc((100dvh - 330px) / 1.3))); margin: 4px auto 0; perspective: 1800px; }
.v-cover-view .v-save-card { margin: 22px 0 0; text-align: left; }
.v-cover-open {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.3; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  transform-style: preserve-3d; -webkit-tap-highlight-color: transparent; transition: transform 0.8s cubic-bezier(0.5, 0.05, 0.3, 1);
}
.v-cover-open:focus-visible { outline: 3px solid var(--gold); outline-offset: 8px; border-radius: 16px; }
/* The first page waits under the cover. */
.v-cover-under.v-page { position: absolute; inset: 1.5% 2% 1.5% 4%; height: auto; padding: 5%; transform: translateZ(-1px); border-radius: 6px 10px 10px 6px; box-shadow: inset 14px 0 20px -12px rgba(0, 0, 0, 0.6); text-align: left; }
.v-cover-open > .v-cover { position: absolute; inset: 0; transition: transform 0.8s cubic-bezier(0.5, 0.05, 0.3, 1); }
/* Hover: the cover lifts a little, a peek at the page under it. */
@media (hover: hover) { .v-cover-open:hover > .v-cover { transform: rotateY(-9deg); } }
.v-cover-open.opening > .v-cover { transform: rotateY(-165deg); }
@media (min-width: 760px) { .v-cover-open.opening { transform: translateX(32%); } }
.v-cover-open > .v-cover.swap { animation: vCoverSwap 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes vCoverSwap { from { transform: rotateY(-24deg) scale(0.96); filter: brightness(1.5); } }
.v-cover-hint { margin: 18px 0 4px; color: var(--muted); font: 600 15px var(--pixel); letter-spacing: 0.03em; animation: vCoverHint 2.4s ease-in-out infinite; }
@keyframes vCoverHint { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.v-cover-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.v-cover-view .v-tools { text-align: left; }

/* ---------- The cover picker ---------- */
.v-cover-picker { max-width: 860px; margin: 20px auto 0; padding: 4px 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; text-align: left; }
.v-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.v-cover-pick {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 10px; text-align: center;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font: inherit; cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.v-cover-pick:hover { border-color: var(--gold); transform: translateY(-2px); }
.v-cover-pick.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(245, 197, 66, 0.25); }
.v-cover-pick > .v-cover { width: 74%; margin-bottom: 6px; border-radius: 6px 8px 8px 6px; box-shadow: 2px 3px 0 -1px #0a0d20, 0 8px 16px rgba(0, 0, 0, 0.45); }
.v-cover.mini .v-cover-board { justify-content: center; padding-bottom: 10%; }
.v-cover.mini .v-cover-crest { width: 46cqw; }
.v-cover.mini .v-cover-crest .logo-mark { width: 13cqw; height: 17cqw; border-width: 1.6cqw; }
.v-cover.mini .v-cover-stitch { border-width: 1px; border-radius: 5px; }
.v-cover.mini .v-cover-brand { font-size: 7cqw; }
.v-cover.mini .v-cover-spine { border-radius: 6px 0 0 6px; }
.v-cover.mini::before { display: none; }
.v-cover-pick b { font: 700 14px var(--pixel); }
.v-cover-pick small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.v-cover-pick.on small { color: var(--gold); font-weight: 700; }
.v-cover-pick.locked { cursor: help; }
.v-cover-pick.locked > .v-cover { filter: grayscale(0.85) brightness(0.5); }
.v-cover-pick.locked > .v-cover::after { content: '🔒'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 26px; filter: brightness(2.2) grayscale(1); }
.v-cover-prog { display: block; width: 100%; margin-top: 4px; }
.v-cover-prog::before { content: ''; display: block; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.v-cover-prog i { display: block; height: 5px; margin-top: -5px; border-radius: 99px; background: linear-gradient(90deg, #f5c542, #ffe9a8); }
.v-cover-prog b { display: block; margin-top: 3px; font: 600 11px var(--body); color: var(--muted); }

/* ---------- Inside: cards in sleeves, the valuable ones in top loaders ---------- */
/* A clear penny sleeve, a little bigger than the card, open at the top. */
.v-sleeve {
  position: absolute; inset: 4% 5% 3%; display: block; padding: 3% 4% 4%; border-radius: 4px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.v-sleeve::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(255, 255, 255, 0.45); }
.v-sleeve::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, 0.26), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.08)); }
.v-pocket.full .v-sleeve img { border-radius: 3.5% / 2.5%; }
.v-sleeve .v-noimg { background: rgba(0, 0, 0, 0.25); border-radius: 3px; }
/* A top loader: rigid clear plastic with thick edges and the thumb notch at the top. */
.v-sleeve.tl {
  inset: 2% 3% 2%; padding: 8% 8% 7%; border-radius: 5px;
  background: linear-gradient(160deg, rgba(205, 228, 255, 0.24), rgba(205, 228, 255, 0.08) 45%, rgba(205, 228, 255, 0.16));
  box-shadow: inset 0 0 0 2px rgba(222, 236, 255, 0.4), inset 0 0 0 5px rgba(255, 255, 255, 0.05), inset 0 0 12px rgba(160, 200, 255, 0.18), 0 3px 9px rgba(0, 0, 0, 0.5);
}
.v-sleeve.tl::before { left: 37%; right: 37%; top: 0; height: 6%; background: #20264b; border-radius: 0 0 50% 50% / 0 0 100% 100%; box-shadow: inset 0 -1.5px 0 rgba(222, 236, 255, 0.4); }
.v-pocket.full:hover .v-sleeve { transform: translateY(-4%); }
/* The pocket itself is the page's clear plastic: its shine goes over the sleeve. */
.v-pocket.full::after { z-index: 1; }
.v-pocket.full i, .v-pocket.full .v-own { z-index: 2; }
/* After the last page: the inside of the back cover. */
.v-pockets.inside { display: block; border-radius: 6px; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 6px, transparent 6px 12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.v-book { animation: vBookIn 0.4s ease-out; }
@keyframes vBookIn { from { opacity: 0; transform: scale(0.97); } }

/* ---------- Folders (js/folders.js) ---------- */
.v-folder-form[hidden], .v-pick[hidden] { display: none; }
/* The shelf under the closed binder: the whole collection, each folder (its own small binder) and a new one. */
.v-shelf { max-width: 860px; margin: 26px auto 0; text-align: left; }
.v-shelf .v-h3 { margin: 0 0 10px; }
.v-shelf .v-fine { margin: 2px 0 0; }
.v-shelf-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.v-shelf-item {
  flex: 0 0 118px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 12px 8px 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font: inherit; text-align: center; text-decoration: none; cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.v-shelf-item:hover { border-color: var(--gold); transform: translateY(-2px); }
/* (No glow: the scrolling row would clip it into a box.) */
.v-shelf-item.on { background: radial-gradient(circle at 50% 30%, rgba(245, 197, 66, 0.14), var(--panel2) 70%); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.v-shelf-item > .v-cover { width: 70%; margin-bottom: 6px; border-radius: 6px 8px 8px 6px; box-shadow: 2px 3px 0 -1px #0a0d20, 0 8px 16px rgba(0, 0, 0, 0.45); }
.v-shelf-item b { max-width: 100%; font: 700 13px/1.25 var(--pixel); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-shelf-item small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.v-shelf-item.new { justify-content: flex-start; background: transparent; border-style: dashed; }
.v-shelf-plus { display: grid; place-items: center; width: 70%; aspect-ratio: 1 / 1.3; margin-bottom: 6px; border: 2px dashed var(--line); border-radius: 6px 8px 8px 6px; color: var(--gold); font: 700 34px var(--pixel); }
.v-shelf-item.new:hover .v-shelf-plus { border-color: var(--gold); }
/* A folder's name: new, or renamed. */
.v-folder-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
.v-folder-form input { flex: 1 1 220px; min-width: 0; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; font-size: 16px; }
.v-folder-form input:focus { outline: 2px solid var(--gold); }
.v-cover-view > .v-folder-form { max-width: 520px; margin: 14px auto 0; }
/* Over an open folder or its list: which folder this is. */
.v-folder-label { display: inline-flex; gap: 6px; align-items: center; max-width: 100%; padding: 6px 12px; background: var(--panel2); border: 1px solid var(--gold); border-radius: 999px; color: var(--text); font: 700 13px var(--pixel); text-decoration: none; }
.v-folder-label span[translate] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Add cards: tap a card to put it in the folder or take it out. */
.v-folder-add-top .v-h1 { margin: 2px 0 6px; overflow-wrap: anywhere; }
/* Stuck right at the top of the scrolling Vault (top: minus its 18px padding), a little wider than the grid so the
   picked cards' gold edges don't peek out beside it. Search and Done on one line, the count under them. */
.v-folder-add-bar {
  position: sticky; top: -18px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  margin: 6px -16px 14px; padding: 12px 16px 10px; background: var(--bg); box-shadow: 0 12px 14px -12px rgba(0, 0, 0, 0.85);
}
.v-folder-add-bar .v-dex-find { flex: 1 1 0; min-width: 0; font-size: 16px; }
.v-folder-add-bar .btn { flex: none; }
.v-folder-add-bar .v-total { order: 3; flex-basis: 100%; margin: 0; font-size: 12px; }
.v-pick { padding: 0; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.v-pick:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.v-pick:not(.on) .v-tile-img img { opacity: 0.55; filter: saturate(0.7); }
.v-pick.on .v-tile-img { box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(245, 197, 66, 0.3); }
.v-pick-mark {
  position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10, 12, 28, 0.75); border: 2px solid rgba(255, 255, 255, 0.6); color: transparent; font: 800 14px var(--body); transition: transform 0.2s, background 0.2s;
}
.v-pick.on .v-pick-mark { background: var(--gold); border-color: var(--gold); color: #1d1d2b; transform: scale(1.06); }
/* On a card page: the folders it's in. */
.v-card-folders { margin-top: 16px; }
.v-card-folders h2 { margin: 0 0 8px; font: 700 18px var(--pixel); text-transform: none; letter-spacing: 0; }
.v-folder-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-folder-chip { max-width: 100%; padding: 6px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 700 13px var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.v-folder-chip:hover { border-color: var(--gold); color: var(--text); }
.v-folder-chip.on { background: var(--gold); border-color: var(--gold); color: #1d1d2b; }
.v-folder-chip.new { background: transparent; border-style: dashed; color: var(--gold); }
@media (max-width: 640px) {
  .v-list-row.in-folder .v-qty { display: none; }
  .v-unfile { padding: 6px 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .v-cover-open, .v-cover-open > .v-cover, .v-sleeve { transition: none; }
  .c-starlight .v-cover-board::before, .c-holo .v-cover-board::before, .c-legend .v-cover-board::before, .v-cover-hint, .v-cover.swap, .v-book { animation: none; }
}
