/* Campus · 美术征集 and 枫叶集市 (public/art.js), and the wardrobe marks on 学生证 / 档案 / 纸条. Phone first. */

/* ---------- small pieces ---------- */
.art-coins { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 40px; box-sizing: border-box; border-radius: 999px;
  background: var(--p-wine); color: var(--p-paper); font-weight: 700; text-decoration: none; white-space: nowrap; }
.art-coins b { font-size: 17px; }
.art-leaf { width: 16px; height: 16px; background: var(--p-paper); clip-path: polygon(50% 0, 61% 26%, 86% 16%, 76% 42%, 100% 50%, 76% 58%, 84% 82%, 58% 72%, 54% 100%, 46% 100%, 42% 72%, 16% 82%, 24% 58%, 0 50%, 24% 42%, 14% 16%, 39% 26%); }
.art-market-link { display: grid; gap: 2px; padding: 14px 16px; margin: 0 0 14px; text-decoration: none; color: var(--p-bark); border-left: 5px solid var(--p-wine); }
.art-market-link b { font-family: var(--zh); font-size: 18px; color: var(--p-wine); }
.art-events { display: grid; gap: 12px; }
.art-event-card { display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--p-bark); }
.art-event-card h3 { margin: 0; font-family: var(--zh); color: var(--green-deep); }
.art-event-card p { margin: 0; color: var(--brown); font-size: 14px; }
.art-phase { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--gold-soft); font-size: 14px; }
.art-votes-line { color: var(--gold-soft); }
.art-grid > .empty-note { grid-column: 1 / -1; }
.art-intro { white-space: pre-wrap; line-height: 1.75; padding: 12px 14px; margin: 0 0 12px; }
.art-templates { padding: 10px 14px; margin: 0 0 12px; }
.art-templates summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--green-deep); }
.art-templates ul { margin: 6px 0 4px; padding-left: 18px; line-height: 1.9; font-size: 14px; }
.art-submit { display: flex; justify-content: center; align-items: center; min-height: 52px; margin: 0 0 14px; border-radius: 6px; background: var(--p-wine); color: var(--p-paper); font-size: 17px; font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 color-mix(in srgb, var(--p-bark) 35%, transparent); }

/* tabs (also the 种类 radio chips) */
.art-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin: 0 0 4px; scrollbar-width: none; }
.art-tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--paper-2); color: var(--p-bark); font-weight: 700; box-shadow: none; }
.art-tab[aria-selected="true"], .art-tab[aria-checked="true"] { background: var(--p-pine); border-color: var(--p-pine); color: var(--p-paper); }
.art-votes-line { margin: 0 0 8px; min-height: 1em; font-weight: 700; }

/* cards */
.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.art-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .art-grid.small { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.art-card { display: grid; align-content: start; gap: 8px; padding: 10px; min-width: 0; }
.art-card-body { display: grid; gap: 4px; min-width: 0; }
.art-card h3 { margin: 0; font-size: 15.5px; color: var(--green-deep); overflow-wrap: anywhere; }
.art-card .inline-actions { margin-top: 4px; }
.art-card .inline-actions button { width: 100%; min-height: 44px; }
.art-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--brown); white-space: pre-wrap; overflow-wrap: anywhere; }
.art-vote { background: var(--paper-2); color: var(--p-wine); border: 2px solid var(--p-wine); box-shadow: none; }
.art-vote.on { background: var(--p-wine); color: var(--p-paper); }

/* previews: how a piece looks where it is used */
.art-pv { display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  background: repeating-conic-gradient(var(--paper-2) 0 25%, var(--p-paper) 0 50%) 0 0 / 16px 16px; }
.art-pv > img { max-width: 86%; max-height: 86%; object-fit: contain; display: block; }
.art-pv-token > img { border-radius: 50%; }
.art-face { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; color: var(--p-navy); font-size: 13px; font-family: var(--zh); font-weight: 900;
  background: repeating-linear-gradient(135deg, var(--p-frost) 0 6px, var(--d-frost-white-80, var(--p-paper)) 6px 12px); }
.art-pv-frame .art-frame-host { width: 46%; aspect-ratio: 104 / 132; }
.art-pv-bubble { padding: 10px; }
.art-bubbled { margin: 0; width: 100%; box-sizing: border-box; font-family: var(--zh); font-size: 13px; line-height: 1.6; color: var(--p-bark); text-align: center; }
.art-stage { display: grid; place-items: center; min-height: 160px; padding: 8px; border-radius: 6px; background: var(--paper-2); }
.art-stage .art-pv { width: min(260px, 100%); }
.art-consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; line-height: 1.6; font-size: 14px; }
.art-consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

.art-closet, .art-history { margin-top: 18px; padding: 12px 14px; }
.art-closet h3 { margin: 0 0 10px; font-family: var(--zh); color: var(--green-deep); }
.art-closet .art-card { padding: 0; }
.art-history summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.art-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.art-history .plus { color: var(--p-pine); } .art-history .minus { color: var(--p-wine); }

/* previews of the 2026-11-19 kinds (信笺, 底纹, 档案背景); 火漆印 uses the plain checkerboard one */
.art-pv-letter, .art-pv-pattern { padding: 8px; }
.art-letter-sample { display: grid; gap: 7px; align-content: center; width: 100%; height: 100%; box-sizing: border-box; background: var(--p-paper); border-width: 18px; border-image-width: 18px; }
.art-letter-sample span { display: block; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--p-bark) 30%, transparent); }
.art-letter-sample span.short { width: 60%; }
.art-pattern-sample { display: grid; align-content: center; justify-items: center; gap: 2px; width: 92%; aspect-ratio: 1.58; border-radius: 6px; color: var(--p-bark);
  background-color: var(--p-paper); 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, 48px 48px; }
.art-pattern-sample b { font-family: var(--zh); font-size: 14px; } .art-pattern-sample span { font-size: 10px; letter-spacing: .1em; }
.art-pv-backdrop > img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 社团 · 宿舍 (public/houses.js) ---------- */
.hs-list { display: grid; gap: 12px; }
@media (min-width: 700px) { .hs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hs-card { display: grid; gap: 10px; padding: 14px 16px; min-width: 0; }
.hs-card.mine { box-shadow: inset 0 0 0 2px var(--p-gold); }
.hs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-head h3 { margin: 0; font-family: var(--zh); color: var(--green-deep); font-size: 18px; }
.hs-people { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-person { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--paper-2); color: var(--p-bark); text-decoration: none; font-size: 14px; }
.hs-person.me { background: color-mix(in srgb, var(--p-gold) 30%, var(--paper-2)); }
.hs-face { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--p-frost); color: var(--p-navy); font-family: var(--zh); font-weight: 900; font-size: 14px; }
.hs-empty { margin: 0; font-size: 14px; }
.hs-note { padding: 10px 14px; margin: 0 0 12px; font-size: 14px; line-height: 1.6; }
.hs-card .inline-actions button { width: 100%; min-height: 44px; }

/* ---------- 圣诞集市 · 摊位 (public/stalls.js) ---------- */
.stall-mine, .stall-card { display: grid; gap: 10px; padding: 14px 16px; margin: 0 0 14px; min-width: 0; }
.stall-mine { box-shadow: inset 0 0 0 2px var(--p-gold); }
.stall-mine h3, .stall-card h3 { margin: 0; font-family: var(--zh); color: var(--green-deep); font-size: 18px; }
.stall-form { display: grid; gap: 6px; }
.stall-form label { font-size: 14px; color: var(--p-bark); margin-top: 4px; }
.stall-form input, .stall-form textarea, .stall-form select { width: 100%; min-height: 44px; }
.stall-pick { max-width: 220px; }
.stall-add summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--green-deep); font-weight: 700; }
.stall-row { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.stall-row .actions input { flex: 1 1 200px; min-height: 40px; }
.stall-thing { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- 宿舍: streets of little houses (public/houses.js paintDorms) ---------- */
.dh-kind { display: grid; gap: 0; margin: 0 0 18px; }
.dh-sign { display: grid; gap: 6px; padding: 14px 16px; }
.dh-en { font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dh-motto { margin: 0; font-size: 15px; line-height: 1.6; }
.dh-about summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--link); font-weight: 700; font-size: 14px; }
.dh-about p { margin: 0 0 10px; line-height: 1.8; }
.dh-about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 14px; line-height: 1.7; }
.dh-about dt { font-weight: 700; color: var(--green-deep); } .dh-about dd { margin: 0; }
.dh-status { margin: 0 0 14px; }
.dh-ask { margin: 0 0 12px; box-shadow: inset 0 0 0 2px var(--p-gold); }
/* The rooms of one kind of 宿舍: plain cards, two to a row on a phone (Lavro 2026-11-20: simple first, pictures later). */
.dh-kind, .dh-sign { min-width: 0; max-width: 100%; }
.dr-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (min-width: 720px) { .dr-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dr-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dr-room { align-content: start; padding: 12px; gap: 8px; }
.dr-room.full { background: var(--paper-2); }
.dr-name { margin: 0; flex: 1 0 100%; font-family: var(--zh); color: var(--green-deep); font-size: 16px; }
.dr-room .hs-person { min-width: 0; max-width: 100%; } .dr-room .hs-person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-room .inline-actions { margin-top: auto; }

/* ---------- 社团 (public/clubs.js) ---------- */
a.hs-tab { display: inline-flex; align-items: center; text-decoration: none; }
a.cl-card, a.cl-topic { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.cl-intro, .cl-body { margin: 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-open { min-height: 44px; margin: 0 0 12px; }
.cl-form { display: grid; gap: 4px; padding: 14px 16px; margin: 0 0 12px; } .cl-form h3 { margin: 0; }
.cl-form[hidden] { display: none; }
.cl-check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400; } .cl-check input { width: 20px; height: 20px; flex: none; }
.cl-top { margin: 0 0 16px; } .cl-top h2 { margin: 0; font-size: 22px; }
.cl-manage { border-top: 1px dashed var(--line); padding-top: 4px; }
.cl-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 10px; }
.cl-section form { flex-basis: 100%; }
.cl-title { margin: 0; font-family: var(--zh); font-size: 19px; color: var(--p-paper); } h3.cl-title:not(.cl-section h3) { margin: 18px 0 10px; }
.cl-list { display: grid; gap: 10px; }
.cl-notice, .cl-topic, .cl-reply { display: grid; gap: 8px; padding: 14px 16px; }
.cl-notice { border-top-color: var(--gold); } .cl-topic { border-top-color: var(--green); } .cl-reply { border-top: 0; }
.cl-notice h3, .cl-topic h3 { margin: 0; font-size: 17px; } .cl-post h2 { margin: 0; font-size: 20px; flex-basis: 100%; }
.cl-controls button, .cl-small { min-height: 40px; font-size: 14px; }
.cl-reply .hs-head { justify-content: space-between; }
.cl-section > button.secondary { min-height: 44px; background: var(--p-paper); color: var(--p-pine); }

/* ---------- 贴纸墙 on the 学生档案 (public/wall.js): a card that classmates decorate ----------
   The card is a postcard-shaped sheet (4:3) with a paper mount. Stickers are die-cut: a paper edge all round and a
   small shadow, each at its own size (--s, 0.5–2) and turn (--a). The one in the visitor's hand has a dashed frame and
   a round grip. Stop-motion only: a sticker that has just gone on is pressed down in two held frames. */
.wall-board { position: relative; aspect-ratio: 4 / 3; margin: 8px 0 12px; border: 7px solid var(--surface-paper-max); border-radius: 5px; overflow: hidden;
  background: var(--surface-paper) repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--p-navy) 7%, transparent) 23px 24px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--p-bark) 22%, transparent), 3px 4px 0 color-mix(in srgb, var(--shadow-color) 22%, transparent), 0 16px 22px -12px color-mix(in srgb, var(--shadow-color) 60%, transparent); }
.wall-board.has-bg { background: var(--wall-bg) center / cover no-repeat, var(--paper-2); }
.wall-board.placing { overflow: visible; touch-action: none; box-shadow: 0 0 0 3px var(--p-gold), 3px 4px 0 color-mix(in srgb, var(--shadow-color) 22%, transparent); }
.wall-board.busy { opacity: .7; pointer-events: none; }
.wall-sticker, .wall-hand { position: absolute; width: calc(11% * var(--s, 1)); aspect-ratio: 1; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  transform: translate(-50%, -50%) rotate(var(--a, 0deg)); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wall-sticker:hover:not(:disabled), .wall-sticker:active:not(:disabled) { background: none; box-shadow: none; transform: translate(-50%, -50%) rotate(var(--a, 0deg)); }
.wall-sticker img, .wall-hand img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(1.5px 0 0 var(--surface-paper-max)) drop-shadow(-1.5px 0 0 var(--surface-paper-max)) drop-shadow(0 1.5px 0 var(--surface-paper-max)) drop-shadow(0 -1.5px 0 var(--surface-paper-max))
    drop-shadow(0 2px 1.5px color-mix(in srgb, var(--p-bark) 45%, transparent)); }
/* a small sticker still answers a whole fingertip */
.wall-sticker::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
/* tapped: a dashed gold ring that does not turn the sticker's own outline into a box */
.wall-sticker.on::after, .wall-hand::after { content: ""; position: absolute; inset: -6px; border: 2px dashed var(--p-gold); border-radius: 8px; pointer-events: none; }
.wall-sticker:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wall-board.placing .wall-sticker { pointer-events: none; opacity: .82; }
/* in the hand: above everything, grabbed anywhere, sized and turned by the grip */
.wall-hand { z-index: 5; cursor: grab; touch-action: none; }
.wall-hand:focus-visible { outline: none; }
.wall-hand:focus-visible::after { border-style: solid; }
.wall-grip { position: absolute; right: -24px; bottom: -24px; z-index: 6; width: 30px; height: 30px; border-radius: 50%; background: var(--p-gold); cursor: nwse-resize; touch-action: none;
  box-shadow: 0 0 0 2px var(--surface-paper-max), 0 2px 3px color-mix(in srgb, var(--shadow-color) 55%, transparent); }
.wall-grip::before { content: ""; position: absolute; inset: 9px; border-right: 2px solid var(--p-bark); border-bottom: 2px solid var(--p-bark); }
/* a finger needs more than 30px: the grip answers 44px, grown away from the sticker so a small sticker can still be grabbed */
.wall-grip::after { content: ""; position: absolute; inset: -2px -12px -12px -2px; }
@keyframes wall-slap { 0% { scale: 1.22; } 50% { scale: .94; } 100% { scale: 1; } }
.wall-sticker.wall-slap { animation: wall-slap calc(var(--frame) * 2) steps(2, end); }
html[data-reduced-motion] .wall-sticker.wall-slap { animation: none; }
@media (prefers-reduced-motion: reduce) { .wall-sticker.wall-slap { animation: none; } }
/* the line under the card: what can be done right now, one thing at a time */
.wall-bar { display: grid; gap: 8px; }
.wall-bar .rec-row { flex-wrap: wrap; }
.wall-bar .rec-row > * { flex: 1 1 0; min-width: 96px; }
.wall-how { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-frost); }
/* the one line that goes with a sticker: a strip of paper to write on */
.wall-note { width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-bottom: 2px dashed color-mix(in srgb, var(--p-bark) 45%, transparent); border-radius: 4px; background: var(--p-paper); color: var(--p-bark); font: inherit; font-size: 16px; }
.wall-note::placeholder { color: color-mix(in srgb, var(--p-bark) 62%, var(--p-paper)); }
.wall-note:focus-visible { outline: 2px dashed var(--p-gold); outline-offset: 3px; }
/* the slip under the card: a paper tag for the sticker that was tapped (第 N 张, who, what they wrote, when) */
.wall-slip { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 48px 12px 14px; border-radius: 4px; background: var(--p-paper); color: var(--p-bark);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--p-bark) 22%, transparent), 3px 4px 0 color-mix(in srgb, var(--shadow-color) 22%, transparent); }
.wall-slip-pic { display: grid; place-items: center; width: 56px; height: 56px; }
.wall-slip-pic img { width: 100%; height: 100%; object-fit: contain; }
.wall-slip-text { display: grid; gap: 2px; min-width: 0; }
.wall-slip p { margin: 0; }
.wall-no { font-family: var(--zh); font-weight: 900; font-size: 18px; color: var(--p-wine); }
.wall-who { font-size: 14px; line-height: 1.5; color: var(--p-bark); overflow-wrap: anywhere; }
.wall-who b, .wall-who a { font-family: var(--zh); font-size: 15px; font-weight: 700; color: var(--p-navy); }
.wall-who a { display: inline-block; min-width: 44px; padding: 12px 0; margin: -12px 0; text-decoration: underline; text-underline-offset: 3px; }
.wall-who small { margin-left: 8px; font-size: 12.5px; color: color-mix(in srgb, var(--p-bark) 78%, var(--p-paper)); white-space: nowrap; }
.wall-said { font-family: var(--zh); font-size: 15.5px; line-height: 1.6; color: var(--p-bark); overflow-wrap: anywhere; }
.wall-slip .wall-x { position: absolute; top: 2px; right: 2px; color: var(--p-bark); }
.wall-slip .wall-x:hover:not(:disabled) { background: color-mix(in srgb, var(--p-bark) 12%, transparent); }
.wall-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px -34px 0 0; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--p-bark) 35%, transparent); }
.wall-act { flex: 1 1 0; min-width: 88px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--p-bark); border-radius: 10px; background: none; box-shadow: none; color: var(--p-bark); font: inherit; font-size: 14.5px; }
.wall-act:hover:not(:disabled) { background: color-mix(in srgb, var(--p-bark) 10%, transparent); }
.wall-act.wall-off { border-color: var(--p-wine); color: var(--p-wine); }
.wall-act:disabled { opacity: .55; }
.wall-act:focus-visible, .wall-who a:focus-visible { outline: 2px dashed var(--p-wine); outline-offset: 3px; }
.wall-open { width: 100%; }
.wall-tray-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wall-tray-h .rec-label { margin: 0; color: var(--p-frost); }
.wall-x { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; color: var(--p-paper); font-size: 24px; line-height: 1; }
.wall-x:hover:not(:disabled) { background: color-mix(in srgb, var(--p-paper) 14%, transparent); }
.wall-choices { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.wall-choice { flex: none; display: grid; justify-items: center; align-content: start; gap: 2px; width: 76px; min-height: 84px; padding: 8px 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); color: var(--p-bark); font-size: 12px; box-shadow: none; }
.wall-choice:hover:not(:disabled) { background: var(--surface-paper); }
.wall-choice img { width: 44px; height: 44px; object-fit: contain; }
.wall-choice span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-choice small { font-size: 11.5px; color: var(--p-wine); font-weight: 700; }

/* 投稿成功 (public/art.js submitted): stays until the member moves on */
.art-done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 18px 16px; }
.art-done .art-pv { width: min(260px, 100%); }
.art-done .inline-actions { justify-content: center; flex-wrap: wrap; }
.art-done .inline-actions button { min-height: 44px; }
