/* The 枫叶集市 wardrobe (public/wardrobe.js), on the campus and mail pages. Phone first. Palette tokens only. */
/* 头像框: the frame picture is 1000×1250 with the photo area 680×863 in the middle (assets/art/template-frame.png). */
.art-frame-host, .art-frame-slot { position: relative; display: inline-block; flex: none; }
.art-frame-host > .art-frame-img { position: absolute; left: -23.53%; top: -22.42%; width: 147.06%; height: 144.84%; max-width: none; pointer-events: none; z-index: 1; }
/* 气泡框: a 9-slice picture (600×600, corners 150px; assets/art/template-bubble.png). */
.art-bubble-on { border: 22px solid transparent; border-image-slice: 25% fill; border-image-width: 22px; border-image-repeat: stretch; background-clip: padding-box; }
.note-card.art-bubble-on, .rec-slip.art-bubble-on { box-shadow: none; }
/* token (top right) and up to three 贴纸 (bottom right) on the 学生证 */
.art-pins { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.art-pin-token { position: absolute; top: 40px; right: 10px; width: 52px; height: 52px; object-fit: contain; border-radius: 50%; transform: rotate(6deg); }
.art-pin-sticker { position: absolute; bottom: 8px; width: 46px; height: 46px; object-fit: contain; }
.art-pin-sticker.s0 { right: 10px; transform: rotate(-8deg); } .art-pin-sticker.s1 { right: 58px; transform: rotate(5deg); } .art-pin-sticker.s2 { right: 106px; transform: rotate(-3deg); }

/* 底纹: a tile (assets/art/template-pattern.png, 400×400, repeats seamlessly) under a paper wash so the words stay readable. */
.student-card.art-pattern-on { background-image: linear-gradient(color-mix(in srgb, var(--p-paper) 70%, transparent), color-mix(in srgb, var(--p-paper) 70%, transparent)), var(--art-pattern);
  background-size: auto, 120px 120px; background-repeat: repeat; }
.cp-badge.art-pattern-on .cp-paper i { background-image: linear-gradient(color-mix(in srgb, var(--p-paper) 62%, transparent), color-mix(in srgb, var(--p-paper) 62%, transparent)), var(--art-pattern);
  background-size: auto, 64px 64px; background-repeat: repeat; }
/* 信笺: a 9-slice border round the letter (800×800, corners 200px; assets/art/template-letter.png); 火漆印 sits on its top right. */
.art-letter-on { border: 26px solid transparent; border-image-slice: 25%; border-image-width: 26px; border-image-repeat: round; }
@media (min-width: 761px) { .art-letter-on { border-width: 40px; border-image-width: 40px; } }
.art-seal { position: absolute; top: -18px; right: 10px; width: 64px; height: 64px; object-fit: contain; transform: rotate(-12deg); pointer-events: none; z-index: 2; }
@media (min-width: 761px) { .art-seal { width: 84px; height: 84px; top: -26px; right: 18px; } }
/* 档案背景: a wide picture (1600×900; assets/art/template-backdrop.png) as the cover of the 学生档案. wardrobe.js puts it in
   .art-bd right after the title. On arrival it fills a tall stage (a bit zoomed in); scrolling down it shrinks back to the
   whole picture (the edges come into view), then fades while the 学生证 slides over it. wardrobe.js only writes --bd-s
   (scale) and --bd-o (opacity) on one element per frame: transform + opacity, nothing that re-lays out the page.
   Reduced motion: the whole picture, still, with the card overlapping its faded bottom. */
.record-page.art-backdrop-on { --bd-overlap: 56px; }
.record-page.art-backdrop-on > .rec-head { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.art-bd { position: sticky; top: 12px; z-index: 0; aspect-ratio: 100 / 82; margin-bottom: calc(-18px - var(--bd-overlap)); overflow: hidden;
  border-radius: 12px; pointer-events: none; contain: paint; }
.art-bd > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transform-origin: 50% 0; will-change: transform, opacity;
  transform: scale(var(--bd-s, 1)); opacity: var(--bd-o, 1);
  -webkit-mask-image: linear-gradient(to bottom, var(--p-bark) 62%, transparent); mask-image: linear-gradient(to bottom, var(--p-bark) 62%, transparent); }
.art-bd[data-gone] > img { visibility: hidden; }
.record-page.art-backdrop-on > :not(.art-bd):not(.rec-head) { position: relative; z-index: 1; }
@media (max-width: 699.98px) {
  .art-bd { top: 66px; margin-inline: calc(50% - 50vw); border-radius: 0; }
}
:root[data-reduced-motion] .art-bd, .art-bd[data-still] { position: relative; top: 0; aspect-ratio: auto; }
:root[data-reduced-motion] .art-bd > img, .art-bd[data-still] > img { transform: none; opacity: 1; will-change: auto; }
