/* ---------- v0.32: perks, the grail shrine, shelf decor, mailboxes ---------- */

/* badges */
.pill.sup { background: linear-gradient(180deg, #fff3b0, #f2c230); color: #5a3a00; box-shadow: inset 0 0 0 1.5px #b8860b; }
.pill.sup.mail { background: linear-gradient(180deg, #ffd6ea, #ff7ab8); color: #5a0030; box-shadow: inset 0 0 0 1.5px #c4006a; }
.cp-foot .pill { vertical-align: middle; margin-left: 6px; }
.mail-dot { font-style: normal; font: 400 11px/1 'DotGothic16', monospace; background: #ff2e93; color: #fff; border-radius: 999px; padding: 3px 6px; margin-left: 4px; animation: mailBob 1.6s ease-in-out infinite; }
@keyframes mailBob { 50% { transform: translateY(-2px) rotate(-4deg); } }

/* locked skins */
.swatch.locked { opacity: .78; }
.swatch.locked i { filter: saturate(.85); }
.sw-lock { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: linear-gradient(180deg, #fff3b0, #f2c230); color: #5a3a00; font-size: 14px; box-shadow: inset 0 0 0 1.5px #b8860b; }

/* ---------- the grail shrine ---------- */
.shrine-panel { margin-bottom: 18px; overflow: hidden; }
.shrine-panel .panel-bar { background: repeating-linear-gradient(90deg, #f2c230 0 10px, #ffe48a 10px 20px); color: #5a3a00; }
.shrine-panel .panel-body { padding: 0; background:
  radial-gradient(circle at 30% 45%, rgba(255,240,170,.9) 0, rgba(255,240,170,0) 55%),
  radial-gradient(circle, color-mix(in srgb, #f2c230 30%, transparent) 1px, transparent 1.6px) 0 0 / 14px 14px,
  linear-gradient(180deg, #fffaf0, color-mix(in srgb, var(--soft) 55%, #fff6dc)); }
.shrine { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .shrine { grid-template-columns: 300px minmax(0, 1fr); align-items: center; } }
.shrine-stage { position: relative; height: 300px; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; isolation: isolate; overflow: hidden; }
.shrine-rays { position: absolute; left: 50%; top: 46%; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: -3; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(242,194,48,.55) 0 7deg, rgba(255,250,225,0) 7deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation: shrineSpin 60s linear infinite; }
@keyframes shrineSpin { to { transform: rotate(360deg); } }
.shrine-halo { position: absolute; left: 50%; top: 40%; width: 210px; height: 210px; margin: -105px 0 0 -105px; z-index: -2; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, rgba(255,236,150,.85) 48%, rgba(255,236,150,0) 70%); animation: shrineGlow 3.2s ease-in-out infinite; }
@keyframes shrineGlow { 50% { transform: scale(1.08); opacity: .85; } }
.shrine-sparkles { position: absolute; inset: 10px; z-index: 2; pointer-events: none; }
.shrine-sparkles i { position: absolute; font-style: normal; color: #f2c230; font-size: 20px; text-shadow: 0 0 6px #fff, 0 0 2px #b8860b; animation: twinkle 2.4s ease-in-out infinite; }
.shrine-sparkles i:nth-child(even) { color: #ff7ab8; font-size: 15px; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
.shrine-crown { position: absolute; top: 14px; left: 50%; width: 60px; margin-left: -30px; z-index: 3; filter: drop-shadow(0 3px 0 rgba(122,74,0,.35)); animation: crownFloat 3.2s ease-in-out infinite; }
@keyframes crownFloat { 50% { transform: translateY(-5px) rotate(-3deg); } }
.shrine-doll { position: relative; z-index: 1; height: 228px; width: 180px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 26px; transition: transform .25s ease; }
.shrine-stage:hover .shrine-doll { transform: translateY(-4px) scale(1.02); }
.shrine-doll img.cut { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255,236,150,.95)) drop-shadow(0 4px 3px rgba(0,0,0,.25)); }
.shrine-frame { display: block; width: 150px; height: 200px; padding: 8px; border-radius: 80px 80px 10px 10px; background: linear-gradient(135deg, #ffe48a, #f2c230 45%, #b8860b 55%, #ffe48a); box-shadow: 0 4px 0 #7a4a00; }
.shrine-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 72px 72px 4px 4px; }
.shrine-cushion { position: absolute; bottom: 14px; left: 50%; width: 210px; height: 40px; margin-left: -105px; z-index: 0; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--accent) 70%, #fff) 0, var(--accent) 55%, color-mix(in srgb, var(--accent) 60%, #000) 100%);
  box-shadow: 0 0 0 3px #f2c230, 0 0 0 5px #7a4a00, 0 8px 0 2px rgba(0,0,0,.12); }
.shrine-cushion::before, .shrine-cushion::after { content: ''; position: absolute; top: 22px; width: 10px; height: 22px; border-radius: 3px 3px 6px 6px; background: repeating-linear-gradient(90deg, #f2c230 0 2px, #b8860b 2px 3px); }
.shrine-cushion::before { left: 6px; transform: rotate(14deg); } .shrine-cushion::after { right: 6px; transform: rotate(-14deg); }
.shrine-plaque { margin: 0 14px 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; text-align: center; border-radius: 14px; position: relative;
  background: linear-gradient(180deg, #fffdf3, #fff6d6); border: 3px solid #f2c230; box-shadow: 0 0 0 2px #7a4a00, 4px 4px 0 2px #7a4a00; }
@media (min-width: 640px) { .shrine-plaque { margin: 16px 18px 16px 0; text-align: left; } }
.shrine-kicker { color: #8a5a00; letter-spacing: .18em; }
.shrine-name { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 42px); line-height: 1; color: var(--wm-fill, #ff2e93); -webkit-text-stroke: 2px var(--wm-line, #7a0f45); paint-order: stroke fill; text-shadow: 3px 3px 0 #f2c230; }
.shrine-note { font-size: 16px; color: var(--text); font-style: italic; padding: 6px 0; }
.shrine-count { color: var(--v-ink, var(--ink)); }
.shrine-plaque .linkbtn { align-self: center; } @media (min-width: 640px) { .shrine-plaque .linkbtn { align-self: flex-start; } }
.shrine-empty { display: flex; gap: 14px; align-items: center; }
.shrine-empty-crown { font-size: 34px; color: #f2c230; text-shadow: 2px 2px 0 #7a4a00; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .shrine-rays, .shrine-halo, .shrine-sparkles i, .shrine-crown, .mail-dot { animation: none; } }

/* ---------- shelf tools, arranging, decor ---------- */
.list-tools { align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.list-tools .viewtoggle { margin: 0; }
.shelf-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.shelf-tools label.chip { cursor: pointer; }
.arrange-hint { flex: 1 1 100%; color: var(--v-ink, var(--ink)); }
.shelf-decor .stand { padding-bottom: 12px; }
.shelf-decor .cut.decor { filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.shelf-decor.size-s .cut { max-height: 34%; } .shelf-decor.size-m .cut { max-height: 62%; } .shelf-decor.size-l .cut { max-height: 96%; }
.shelf.arranging { outline: 3px dashed var(--v-ink, var(--ink)); outline-offset: 4px; }
.shelf.arranging [data-tok] { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; position: relative; animation: jiggle .5s ease-in-out infinite alternate; }
.shelf.arranging [data-tok]:nth-child(2n) { animation-delay: -.25s; }
@keyframes jiggle { from { transform: rotate(-1deg); } to { transform: rotate(1deg); } }
.shelf.arranging .dragging { opacity: .45; cursor: grabbing; animation: none; pointer-events: none; }
.shelf.arranging img { pointer-events: none; -webkit-user-drag: none; }
.arr-ctl { position: absolute; top: 2px; left: 0; right: 0; z-index: 3; display: flex; gap: 3px; justify-content: center; }
.arr-ctl button { font: 400 12px/1 'DotGothic16', monospace; min-width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; padding: 0 5px; }
.cp-decor { pointer-events: none; display: flex; align-items: flex-end; justify-content: center; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.cp-decor .cp-pic { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.cp-decor img { object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.cp-decor.size-s img { max-height: 40%; } .cp-decor.size-m img { max-height: 70%; } .cp-decor.size-l img { max-height: 100%; }
@media (prefers-reduced-motion: reduce) { .shelf.arranging [data-tok] { animation: none; } }

/* ---------- mailbox ---------- */
.mailbox-panel { margin-bottom: 18px; }
.mailbox-panel .panel-bar { background: repeating-linear-gradient(135deg, #ff2e93 0 8px, #fff 8px 16px, #4fa3ff 16px 24px, #fff 24px 32px); }
.mailbox-panel .panel-bar .pb-title, .mailbox-panel .panel-bar .pb-meta { background: #fff; padding: 1px 6px; border-radius: 4px; }
.mailbox { display: flex; gap: 18px; align-items: center; }
.mb-box { flex: none; width: 120px; height: 160px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; transition: transform .2s ease; }
.mb-box:hover { transform: translateY(-3px) rotate(-2deg); }
.mb-box.got { animation: gotMail .6s ease; }
@keyframes gotMail { 30% { transform: scale(1.08, .94); } 60% { transform: scale(.96, 1.05) rotate(2deg); } }
.mailbox-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mailbox-svg.sm { width: 72px; height: 96px; }
.mb-letter { animation: letterPeek 1.8s ease-in-out infinite; transform-box: fill-box; }
@keyframes letterPeek { 50% { translate: 0 -4px; } }
.mb-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mb-side p { margin: 0; }
.mb-title { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; color: var(--v-ink, var(--ink)); }
.mb-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 16px; }
.mb-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 2px solid var(--rule, rgba(0,0,0,.15)); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.mb-opt b { font-size: 13px; }
.mb-opt.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.mb-opt.locked .mailbox-svg { opacity: .55; filter: saturate(.7); }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 16px; }
.notecard { position: relative; padding: 18px 16px 12px; border-radius: 6px; color: #3a1a2a; box-shadow: 3px 4px 0 rgba(58,26,42,.18); border: 1.5px solid rgba(58,26,42,.25); min-height: 150px; display: flex; flex-direction: column; gap: 8px; }
.notecard:nth-child(odd) { transform: rotate(-1.2deg); } .notecard:nth-child(even) { transform: rotate(1deg); }
.notecard p { margin: 0; flex: 1; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 30px; }
.notecard footer { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.notecard footer a { color: inherit; } .notecard footer time { font: 400 11px 'DotGothic16', monospace; margin-left: auto; opacity: .7; }
.notecard footer .linkbtn { color: inherit; opacity: .6; font-size: 18px; padding: 0 4px; }
.notecard .stamp { position: absolute; top: 8px; right: 8px; width: 34px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #fff; border: 2px dashed #ff7ab8; border-radius: 3px; transform: rotate(6deg); }
.notecard.new::after { content: 'NEW'; position: absolute; top: -8px; left: 12px; font: 400 11px 'DotGothic16', monospace; background: #ff2e93; color: #fff; padding: 2px 6px; border-radius: 4px; }
.paper-gingham { background: linear-gradient(90deg, rgba(255,122,184,.22) 50%, transparent 0) 0 0 / 16px 16px, linear-gradient(0deg, rgba(255,122,184,.22) 50%, #fff 0) 0 0 / 16px 16px; }
.paper-hearts { background: #fff0f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 20c-5-3-7-6-7-8.5C7 9 9 8 10.5 8S13 9 14 10.5C15 9 16 8 17.5 8S21 9 21 11.5C21 14 19 17 14 20z' fill='%23ffb3d4'/%3E%3C/svg%3E"); }
.paper-lined { background: repeating-linear-gradient(180deg, #fffdf5 0 23px, #a8d8ff 23px 24px) 0 10px, #fffdf5; border-left: 6px double #ff7ab8; }
.paper-stars { background: #fffbe0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M15 6l2.4 5.6 6 .5-4.6 4 1.4 5.9L15 19l-5.2 3 1.4-5.9-4.6-4 6-.5z' fill='%23ffe23b' stroke='%23f2c230'/%3E%3C/svg%3E"); }
.paper-chip.paper-gingham, .paper-chip.paper-hearts, .paper-chip.paper-lined, .paper-chip.paper-stars { color: #3a1a2a; border-left-width: 1.5px; }
.note-compose { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) { .note-compose { grid-template-columns: 280px minmax(0, 1fr); align-items: start; } }
.note-compose .notecard { transform: rotate(-1deg); transition: transform .8s cubic-bezier(.5, -0.4, .7, 1), opacity .8s ease; }
.note-compose .notecard textarea { flex: 1; border: 0; background: transparent; font: 16px/1.45 var(--font); color: #3a1a2a; resize: none; padding: 0 30px 0 0; outline: none; min-height: 96px; }
.note-compose .notecard.posting { transform: translate(-40px, -120px) rotate(-30deg) scale(.2); opacity: 0; }
.note-opts { display: flex; flex-direction: column; gap: 12px; }
.note-opts .stepper { flex-wrap: wrap; }
@media (max-width: 480px) { .mailbox { flex-direction: column; text-align: center; } .mb-side .row { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .mb-letter, .mb-box.got { animation: none; } .note-compose .notecard { transition: none; } }
.swatch > span.sw-lock { flex: 0 0 26px; }
.pill.sup.admin { background: linear-gradient(180deg, #e9fbc8, #9fe02a); color: #1f3d00; box-shadow: inset 0 0 0 1.5px #4f8a10; }

/* ---------- v0.36: collectors directory ---------- */
.coll-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.coll-tools input { height: 46px; border-radius: 999px; border: 2px solid var(--ink); padding: 0 18px; font: 500 16px var(--font); background: #fff; color: var(--text); }
.coll-tools .chips { margin: 0; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.coll-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; transition: transform .15s ease; }
.coll-card:hover { transform: translateY(-3px); }
.coll-shelf { height: 132px; display: flex; align-items: flex-end; justify-content: center; gap: 0; padding: 10px 10px 0; overflow: hidden;
  background: linear-gradient(180deg, transparent calc(100% - 10px), var(--accent) calc(100% - 10px)), linear-gradient(180deg, color-mix(in srgb, var(--soft) 60%, #fff), var(--soft)); border-bottom: 3px solid color-mix(in srgb, var(--accent) 60%, #000); }
.coll-shelf img.cut { height: 112px; max-width: 18%; object-fit: contain; object-position: bottom; margin-bottom: 8px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.coll-shelf .mini-box { width: 40px; height: 74px; margin: 0 3px 10px; border: 2px solid var(--ink); border-radius: 14px 14px 4px 4px; overflow: hidden; background: #fff; flex: none; }
.coll-shelf .mini-box img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.coll-shelf .sysmini { align-self: center; margin-bottom: 30px; }
.coll-info { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.coll-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.coll-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-grail { font-size: 12.5px; font-weight: 700; color: #8a5a00; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-info .pill { flex: none; }
#their-shelf .shelf { margin-top: 4px; }
.tabbar { grid-template-columns: repeat(6, 1fr); padding-left: 2px; padding-right: 2px; } .tabbar a { font-size: 10.5px; min-width: 0; }
