.collection-heading { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem 1rem; flex-wrap:wrap; }
@font-face {
  font-family:Silkscreen;
  src:url('/Assets/Silkscreen-Regular.ttf') format('truetype');
  font-display:swap;
}
.profile-journal {
  --pixel:Silkscreen,"Courier New",monospace;
  --frame:#251917;
  --gilt:#d6aa61;
  --parchment:#fff1d2;
  background-color:#243631;
  background-image:radial-gradient(#ffffff0a 1px,transparent 1px);
  background-size:5px 5px;
  color:#ffe7ad;
  min-width:0;
  padding:clamp(10px,3vw,27px);
  border:1px solid var(--ink);
  border-radius:12px;
}
.profile-journal > h2 {
  font:400 clamp(1.45rem,4vw,2.4rem)/1.15 var(--pixel);
  letter-spacing:-.055em; margin:0 0 1.15rem; text-shadow:0 3px #161c18;
}
.quest-journal { display:grid; gap:1.35rem; }
.quest-journal h3 { margin:0; font:400 clamp(1.2rem,2.8vw,1.65rem)/1.25 var(--pixel); letter-spacing:-.045em; }
.wallet-cover,.quest-log,.quest-guide,.quest-history,.quest-pending {
  border:3px solid var(--frame); outline:1px solid #91754f;
  box-shadow:inset 0 0 0 2px var(--gilt),inset 0 0 0 5px #392924,0 4px #17231f;
}
.wallet-cover {
  --link-focus: var(--mint);
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center;
  padding:clamp(1.25rem,4vw,2.1rem); gap:clamp(.8rem,3vw,2rem);
  color:#ffefcc;
  background:repeating-linear-gradient(0deg,transparent 0 3px,#210b180d 3px 4px),linear-gradient(110deg,#59313b,#3d232c 72%);
}
.wallet-cover h3,.wallet-cover p,.wallet-cover strong { color:inherit; }
.wallet-total { display:block; color:#ffdc83; font:400 clamp(2.4rem,6vw,4.25rem)/1.08 var(--pixel); letter-spacing:-.07em; overflow-wrap:anywhere; }
.wallet-cover .wallet-total { color:#ffdc83; }
.wallet-caption { font-size:1rem; }
.quest-coin { width:clamp(3.75rem,10vw,6rem); aspect-ratio:1;
  background:url('/Assets/peely-points-coin.png') center / contain no-repeat; }
.wallet-meta { border-left:3px double #af8875; padding-left:1.3rem; }
.wallet-meta p { margin:.4em 0 0; }
.wallet-meta .quest-buttons { margin-top:.6rem; }
.quest-toolbar,.quest-foot,.quest-label { display:flex; align-items:center; justify-content:space-between; gap:.55rem; flex-wrap:wrap; }
.quest-log { background:#352c29; color:var(--parchment); padding:clamp(.75rem,2.4vw,1.3rem); }
.quest-toolbar { padding:.25rem .35rem .85rem; }
.quest-toolbar h3 { color:#ffe4a2; }.quest-toolbar label { font-weight:650; }
.quest-toolbar select,.quest-buttons button,.redeem-box :is(input,button,textarea) { box-sizing:border-box; min-height:44px; max-width:100%; font:inherit; }
.quest-toolbar select,.quest-buttons button,.redeem-box button { padding:.5em .85em; color:var(--ink); background:var(--paper); border:1px solid var(--edge); border-radius:6px; }
.quest-toolbar select,.quest-buttons button {
  border:2px solid #3a2922; border-radius:0; background:#f6e8c9;
  box-shadow:inset 1px 1px #fff9e9,inset -1px -1px #bd9a65;
}
.quest-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap:.65rem; }
.quest-card,.quest-pending,.quest-history,.quest-guide { color:#35261e; background:var(--parchment); padding:1rem 1.15rem; }
.quest-card {
  display:flex; flex-direction:column; min-width:0; border:2px solid #aa8760;
  box-shadow:inset 1px 1px #fff9e9,inset -2px -2px #dbc296;
}
.quest-entry-heading { display:flex; align-items:center; gap:.8rem; margin-bottom:.75rem; }
.quest-titles { min-width:0; }
.quest-slot {
  flex:none; width:3.5rem; height:3.5rem; display:grid; place-items:center;
  background:#483d37; border:2px solid #38241f;
  box-shadow:inset 2px 2px #261e1b,inset -2px -2px #9e825d;
}
.quest-icon {
  width:100%; height:100%; background:url('/Assets/quest-items.png') left top / 300% 300% no-repeat;
  image-rendering:pixelated;
}
.quest-icon[data-quest="fivePrints"] { background-position:center top; }
.quest-icon[data-quest="bindBook"] { background-position:right top; }
.quest-icon[data-quest="library"] { background-position:left center; }
.quest-icon[data-quest="alchemist"] { background-position:center; }
.quest-icon[data-quest="curator"] { background-position:right center; }
.quest-icon[data-quest="archive"] { background-position:left bottom; }
.quest-icon[data-quest="firstOrder"] { background-position:center bottom; }
.quest-icon[data-quest="fiveOrders"] { background-position:right bottom; }
.quest-label,.quest-foot { font-size:.875rem; }
.quest-label { justify-content:flex-start; color:#654a32; font-weight:700; line-height:1.25; }
.quest-label strong { color:#784212; }
.quest-card h4 { color:#3c2523; font:700 clamp(1.25rem,2.4vw,1.5rem)/1.12 Georgia,serif; margin:.18em 0 0; }
.quest-card p { margin:0 0 1em; font-size:1rem; line-height:1.45; }
.quest-card progress {
  --meter:repeating-linear-gradient(90deg,transparent 0 9px,#2f302d55 9px 11px);
  --fill:var(--meter),linear-gradient(#e49445 50%,#b76329 50%);
  appearance:none; width:100%; height:.8rem; margin:auto 0 .55rem;
  border:2px solid #554635; border-radius:0; background:var(--meter),#e0d3b4;
}
.quest-card.earned progress { --fill:var(--meter),linear-gradient(#78ad78 50%,#43805b 50%); }
.quest-card progress::-webkit-progress-bar { background:var(--meter),#e0d3b4; }
.quest-card progress::-webkit-progress-value { background:var(--fill); }
.quest-card progress::-moz-progress-bar { background:var(--fill); }
.quest-foot b { color:#65381b; }.quest-card.earned .quest-foot span { color:#245a40; font-weight:700; }
.quest-guide summary { cursor:pointer; display:list-item; align-content:center; min-height:44px; font-weight:750; }
.quest-guide { padding-block:.55rem; }.quest-guide p,.quest-pending p { line-height:1.5; }
.quest-history ul { padding:0; margin:.6rem 0 0; list-style:none; }.quest-history li { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.8rem 0; border-top:1px solid var(--line); }
.quest-history small { display:block; margin-top:.2rem; color:var(--muted); }
.quest-buttons { display:flex; gap:.5rem; flex-wrap:wrap; }.quest-pending>div { padding-top:1rem; }
.redeem-box { min-width:0; display:grid; gap:.6rem; margin:1rem 0; padding:1rem; border:1px solid var(--edge); border-radius:7px; background:#fff4d7; }
.redeem-box legend { font-weight:750; }.redeem-box label,.redeem-box input,.redeem-box textarea { display:block; width:100%; }
.redeem-box [hidden] { display:none; }.redeem-box output { font-weight:700; }.redeem-box small { line-height:1.45; }.redeem-box textarea { resize:vertical; }
.quest-journal :focus-visible,.redeem-box :focus-visible,.quest-nav:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
@media(max-width:38rem){.wallet-cover { grid-template-columns:auto minmax(0,1fr); }.wallet-meta { grid-column:1/-1; border:0; border-top:1px solid #af8875; padding:1rem 0 0; }.quest-toolbar { align-items:flex-start; }}

.reward-intro { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.75rem 1.25rem; }
.reward-intro h2,.reward-card h3 { margin:0; }
.reward-intro p { max-width:55ch; margin:.4rem 0; }
.reward-status:empty { display:none; }.reward-status { padding:.7rem; border-left:4px solid #317459; }
.reward-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap:1rem; margin-block:1.2rem; }
.reward-card { min-width:0; display:flex; flex-direction:column; gap:.5rem; background:#fff7e3; color:#34261e;
  border:2px solid #715543; padding:.9rem; box-shadow:2px 3px #bc9970; }
.reward-card p { margin:0; }
.reward-card>a,.reward-card>button { padding:.6rem .8rem; min-height:44px; align-content:center; font:inherit; font-weight:700; }
.reward-card>a,.reward-card>button { margin-top:auto; background:#423131; border:2px solid #231b19; color:#ffedbc; text-align:center; }
.reward-card>a { justify-content:center; text-decoration:none; }
.reward-card>button:disabled { background:#e0d6bc; color:#51473c; }
.cover-preview { display:grid; place-items:center; background:#e9dec5; padding:1.25rem .5rem; }
.cover-preview { --cover-height:9.5rem; margin-bottom:.4rem; }
.collector-cover {
  position:relative; display:block; width:min(88%,calc(var(--cover-height) * var(--book-ratio))); aspect-ratio:var(--book-ratio);
  background:#2c221b; border:2px solid #2c221b; border-radius:3px 7px 7px 3px; box-sizing:border-box; overflow:hidden;
  box-shadow:1px 2px #ddc7a6,2px 4px #876c53,3px 6px #382b24;
}
.collector-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.collector-cover::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(90deg,#29150f55,#ffcc8a20 4px,#23140e80 9px,#ffcc8a28 10px,transparent 14px),
    radial-gradient(#25110e42 .55px,transparent .9px) 0 0 / 3px 4px,
    radial-gradient(#fff7e22e .5px,transparent .9px) 1px 1px / 4px 3px;
  box-shadow:inset 0 1px #fff7e24a,inset -2px -2px #29150f40;
}
.collector-front { position:relative; display:block; margin-inline:auto; padding:0; border-radius:4px 12px 12px 4px; }
.collector-front .collector-cover {
  width:100%; aspect-ratio:var(--album-ratio);
  border-radius:4px 12px 12px 4px;
  box-shadow:2px 3px #35291f,4px 5px #d9c6a5,5px 7px #a99172,7px 9px #35291f,9px 14px 19px #35291f40;
}

.book-shelf { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,132px),1fr)); gap:12px; }
.book-shelf .book-choice {
  --cover-height:6rem;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  min-height:64px; padding:12px 6px; border:1px solid var(--edge); border-radius:8px;
  background:var(--cream); color:var(--ink); text-align:center; text-decoration:none; overflow-wrap:anywhere;
}
.book-choice:hover,.book-choice:focus-visible { background:var(--mint-light); }
.book-choice .collector-cover { margin-bottom:6px; }

.album-sheet[data-edition="peely-club"] {
  background-color:#fff3da;
  background-image:radial-gradient(#ad55282b .8px,transparent 1px),linear-gradient(90deg,#e6af83,transparent 9%);
  --edge:#d39b65;
}
.album-sheet[data-edition="arcade"] {
  background-color:#f1edfa;
  background-image:linear-gradient(#57437b12 1px,transparent 1px),linear-gradient(90deg,#57437b12 1px,transparent 1px),
    linear-gradient(90deg,#b3cfcc,transparent 8%);
  background-size:16px 16px,16px 16px,100% 100%;
  --edge:#9385ad;
}
.album-sheet[data-edition="gilded"] {
  background-color:#faf5e3;
  background-image:repeating-linear-gradient(45deg,#826c3710 0 1px,transparent 1px 4px),
    linear-gradient(90deg,#789088,transparent 5%),linear-gradient(270deg,#d6b66d60,transparent 6%);
  background-size:auto;
  --edge:#b49b5b;
}
.mascot-wardrobe { margin-top:2rem; }
.mascot-wardrobe h2,.mascot-wardrobe p { margin-block:0 .5rem; }
.mascot-wardrobe .reward-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); }
.mascot-preview { display:grid; place-items:center; padding:1rem; background:#eee3cb; }
.mascot-preview img { display:block; width:100%; height:clamp(8rem,18vw,12rem); object-fit:contain; }
