/* Campus · 学生档案, 放榜仪式, 掷骰公示栏 (records.js). Palette tokens only; mustard is never text except on navy;
   touch targets ≥44px; one thing per phone screen. */
.record-page { display: grid; gap: 18px; max-width: 560px; margin: 0 auto; }
.rec-head { text-align: center; color: var(--p-paper); }
.rec-head.left { text-align: left; }
.rec-head h2 { margin: 2px 0 0; font-family: var(--zh); font-weight: 900; font-size: 24px; color: var(--p-paper); }
.rec-head .muted { color: var(--p-frost); margin: 6px 0 0; }
.rec-en { font-family: var(--type); font-size: 13px; letter-spacing: .24em; color: var(--p-frost); margin: 0; }
.rec-en.gold { color: var(--p-gold); } /* on navy */
.rec-en.navy { color: var(--p-navy); }
.rec-label { font-size: 12px; letter-spacing: .1em; color: var(--p-wine); }
.rec-count { font-size: 13px; font-weight: 400; color: var(--muted); }
.rec-note { font-size: 13px; margin: 6px 0 0; }
.as-who { margin: 0; font-size: 14px; color: inherit; opacity: .9; }
.as-who b { font-weight: 700; }
.rec-ph { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--p-frost) 0 6px, var(--d-frost-white-80) 6px 12px); color: var(--p-navy); font-family: var(--zh); font-weight: 900; }

/* 学生证 */
.student-card { position: relative; background: var(--card-paper, var(--p-paper)); color: var(--p-bark); border-radius: 10px; overflow: hidden; transform: rotate(calc(var(--tilt-max, .5deg) * -1));
  box-shadow: 0 2px 0 color-mix(in srgb, var(--p-bark) 12%, transparent), 0 10px 24px color-mix(in srgb, var(--p-bark) 18%, transparent); }
.student-card::before { content: ""; position: absolute; left: 50%; top: -6px; width: 96px; height: 24px; margin-left: -48px; background: var(--tape); transform: rotate(-4deg); z-index: 2; }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 16px; background: var(--p-wine); color: var(--p-paper); font-size: 13px; letter-spacing: .12em; }
.sc-school { font-family: var(--type); font-size: 20px; letter-spacing: .02em; }
.sc-body { display: flex; gap: 14px; padding: 16px; }
.sc-photo { flex: none; width: 104px; height: 132px; border-radius: 6px; font-size: 40px; }
.sc-lines { min-width: 0; display: grid; gap: 4px; align-content: start; font-size: 14px; }
.sc-lines p { margin: 0; }
.sc-name { margin: 0; font-family: var(--zh); font-weight: 900; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.sc-en { font-family: var(--type); font-style: italic; font-size: 17px; color: var(--p-pine); }
.sc-no { font-family: var(--type); letter-spacing: .06em; color: var(--p-navy); }
.sc-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px dashed color-mix(in srgb, var(--p-bark) 30%, transparent); font-size: 12.5px; color: var(--muted); }
.rec-slip { padding: 14px 16px; background: var(--card-paper, var(--p-paper)); color: var(--p-bark); border-radius: 4px; transform: rotate(var(--tilt-max, .5deg)); box-shadow: 0 4px 12px color-mix(in srgb, var(--p-bark) 14%, transparent); }
.rec-motto { margin: 4px 0 0; font-size: 16px; line-height: 1.6; font-family: var(--zh); }

/* 贴纸 */
.rec-stickers { color: var(--p-paper); }
.rec-h { display: flex; justify-content: space-between; align-items: baseline; }
.rec-h h3 { margin: 0; font-size: 15px; font-family: var(--zh); color: var(--p-paper); }
.rec-stickers .rec-count, .rec-stickers .rec-note { color: var(--p-frost); }
.rec-sticker-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.rec-sticker { display: grid; justify-items: center; gap: 2px; min-height: 76px; padding: 8px 0 6px; border: 2px solid transparent; border-radius: 10px; background: var(--card-paper, var(--p-paper)); color: var(--p-bark); box-shadow: none; cursor: pointer; }
.rec-sticker img { width: 44px; height: 44px; object-fit: contain; }
.rec-sticker.on { border-color: var(--p-wine); }
.rec-sticker.on .rec-n::after { content: " · 你贴的"; font-size: 11px; color: var(--p-wine); }
.rec-sticker:disabled { cursor: default; opacity: 1; }
.rec-n { font-size: 13px; font-weight: 700; }

/* 操作 */
.rec-actions { display: grid; gap: 10px; }
.rec-row { display: flex; gap: 10px; }
.rec-row > * { flex: 1; min-width: 0; }
.rec-primary { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--p-pine); color: var(--p-paper); font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: none; cursor: pointer; }
.rec-primary.gold { background: var(--p-gold); color: var(--p-navy); font-weight: 900; } /* button on navy: navy text on mustard */
.rec-primary:disabled { opacity: .6; }
.rec-secondary { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--p-paper); border-radius: 12px; color: var(--p-paper); font-size: 15px; text-decoration: none; text-align: center; }
.rec-primary:focus-visible, .rec-secondary:focus-visible, .rec-sticker:focus-visible, .rec-skip:focus-visible, .rec-close:focus-visible { outline: 2px dashed var(--p-gold); outline-offset: 3px; }

/* 完整设定 */
.rec-details { display: grid; gap: 14px; scroll-margin-top: 130px; }
.rec-section { padding: 16px 18px; }
.rec-section h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-family: var(--zh); font-size: 16px; }
.rec-section h3 .rec-en { color: var(--p-wine); font-size: 12px; }
.rec-grid { display: grid; grid-template-columns: 72px minmax(0, 1fr); row-gap: 8px; margin: 0; font-size: 14.5px; }
.rec-grid dt { color: var(--muted); }
.rec-grid dd { margin: 0; overflow-wrap: anywhere; }
.rec-story { margin: 0; font-size: 14.5px; line-height: 1.85; white-space: pre-line; }
.rec-story.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rec-more { min-height: 44px; }
.rec-rels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rec-rel { display: flex; align-items: center; gap: 10px; min-height: 52px; flex-wrap: wrap; }
.rec-rel.pending { opacity: .85; }
.rec-dot { width: 44px; height: 44px; border-radius: 50%; font-size: 17px; flex: none; }
.rec-rel-who { flex: 1; min-width: 0; display: grid; }
.rec-rel-who a { color: inherit; font-size: 15px; }
.rec-rel-who small { color: var(--muted); font-size: 12px; }
.rec-pill { padding: 4px 10px; border-radius: 99px; background: var(--p-pine); color: var(--p-paper); font-size: 13px; }
.rec-pill.dashed { background: transparent; color: var(--p-navy); border: 1.5px dashed var(--p-navy); }
.rec-rel .small-btn, .rec-rel .link-btn { min-height: 44px; }
.rec-rel-form { display: grid; gap: 8px; margin-top: 12px; }
.rec-rel-form select, .rec-rel-form input { min-height: 44px; }
.rec-dashed { min-height: 48px; border: 1.5px dashed var(--p-pine); border-radius: 10px; background: transparent; color: var(--p-pine); font: inherit; box-shadow: none; cursor: pointer; }
.rec-works { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.rec-lock { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-top: 1px dashed color-mix(in srgb, var(--p-bark) 30%, transparent); color: inherit; text-decoration: none; }

/* 一次一问 */
.rec-editor { max-width: 560px; margin: 0 auto; padding: 14px 20px 24px; background: var(--card-paper, var(--p-paper)); color: var(--p-bark); border-radius: 12px; display: grid; gap: 8px; }
.rec-editor-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.rec-close { display: grid; place-items: center; width: 44px; height: 44px; color: var(--p-bark); font-size: 26px; text-decoration: none; }
.rec-step { font-size: 13px; color: var(--muted); text-align: right; }
.rec-progress { display: flex; gap: 6px; }
.rec-progress i { flex: 1; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--p-bark) 18%, transparent); }
.rec-progress i.on { background: var(--p-pine); }
.rec-editor .as-who { color: var(--muted); margin-top: 6px; }
.rec-editor .rec-en { color: var(--p-wine); margin-top: 18px; }
.rec-question { margin: 0; font-family: var(--zh); font-weight: 900; font-size: 24px; line-height: 1.4; }
.rec-hint { margin: 0; font-size: 14px; line-height: 1.7; }
.rec-answer { display: grid; gap: 12px; margin-top: 10px; }
.rec-field { display: grid; gap: 4px; }
.rec-field label { font-size: 13.5px; color: var(--muted); }
.rec-field input, .rec-field select, .rec-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--p-bark) 25%, transparent); border-radius: 10px; background: var(--d-paper-white-50); color: var(--p-bark); font: inherit; font-size: 16px; }
.rec-field textarea { line-height: 1.6; resize: vertical; }
.rec-counter { justify-self: end; font-size: 12px; color: var(--muted); }
.rec-upload { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed color-mix(in srgb, var(--p-navy) 45%, transparent); border-radius: 10px; }
.rec-upload p { margin: 0; font-size: 13.5px; color: var(--p-navy); }
.rec-upload-ph { width: 64px; height: 64px; border-radius: 10px; font-size: 26px; flex: none; }
.rec-reassure { margin: 6px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--p-frost); color: var(--p-navy); font-size: 13.5px; }
.form-error { margin: 0; min-height: 1.2em; color: var(--p-wine); font-size: 14px; }
.form-error:not(:empty)::before { content: "没保存："; font-weight: 700; }
.rec-editor-actions { display: grid; gap: 6px; margin-top: 10px; }
.rec-skip { display: grid; place-items: center; min-height: 44px; color: var(--p-bark); font-size: 14px; }
.rec-skip.light { color: var(--p-frost); }

/* 公示栏 */
.ledger-list { display: grid; gap: 10px; }
.ledger-row { padding: 12px 14px; border-radius: 10px; background: var(--card-paper, var(--p-paper)); color: var(--p-bark); box-shadow: 0 3px 10px color-mix(in srgb, var(--p-bark) 10%, transparent); }
.lr-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lr-top time { font-size: 12px; color: var(--muted); }
.lr-school { margin: 2px 0 0; font-size: 13.5px; }
.lr-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lr-dice { font-family: var(--type); font-size: 18px; letter-spacing: .06em; }
.lr-calc { font-size: 13.5px; color: var(--muted); }
.lr-result { padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--p-paper); background: var(--p-navy); }
.lr-result.r-offer { background: var(--p-pine); }
.lr-result.r-lucky { background: var(--p-wine); }
.lr-result.r-pending { background: transparent; color: var(--p-navy); border: 1.5px dashed var(--p-navy); }
.lr-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* 放榜仪式 */
.decision { max-width: 560px; margin: 0 auto; padding: 24px 20px 28px; border-radius: 12px; background: var(--p-navy); color: var(--p-paper); display: grid; gap: 12px; justify-items: center; text-align: center; }
.decision .back-link { justify-self: start; color: var(--p-frost); }
.decision h2 { margin: 0; font-family: var(--zh); font-weight: 900; font-size: 26px; color: var(--p-paper); }
.decision-lead { margin: 0; font-size: 14px; line-height: 1.7; color: var(--p-frost); max-width: 34em; }
.envelope { position: relative; width: min(300px, 100%); height: 200px; margin: 18px 0 6px; border-radius: 6px; background: var(--p-paper); color: var(--p-bark); transform: rotate(-2deg); box-shadow: 0 18px 36px color-mix(in srgb, var(--d-bark-black-10) 70%, transparent); text-align: left; }
.envelope .flap { position: absolute; left: 0; right: 0; top: 0; height: 110px; background: var(--d-paper-gold-90, var(--p-paper)); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 6px 6px 0 0; filter: brightness(.94); }
.envelope .seal { position: absolute; left: 50%; top: 76px; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: var(--p-wine); color: var(--p-paper); display: grid; place-items: center; font-family: var(--type); font-size: 22px; }
.env-to, .env-from { position: absolute; left: 20px; right: 20px; font-size: 13px; }
.env-to { bottom: 36px; }
.env-from { bottom: 14px; font-family: var(--type); font-size: 15px; color: var(--p-navy); }
.decision-tokens { margin: 0; font-size: 13px; color: var(--p-frost); }
.decision-actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.decision.result { background: var(--p-navy); }
.dice-row { display: flex; justify-content: center; gap: 16px; margin-top: 6px; }
.die-box { display: grid; justify-items: center; gap: 4px; }
.die-face { width: 72px; height: 72px; padding: 10px; border-radius: 14px; background: var(--p-paper); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); box-shadow: 0 3px 0 color-mix(in srgb, var(--p-bark) 35%, transparent); }
.die-box.t0 .die-face { transform: rotate(-6deg); } .die-box.t1 .die-face { transform: rotate(3deg); } .die-box.t2 .die-face { transform: rotate(8deg); }
.rolling .die-box.t0 .die-face { transform: rotate(14deg) translateY(-6px); } .rolling .die-box.t1 .die-face { transform: rotate(-10deg) translateY(-10px); } .rolling .die-box.t2 .die-face { transform: rotate(-16deg) translateY(-4px); }
.die-face i { display: grid; place-items: center; }
.die-face i.pip::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--p-bark); }
.die-label { font-size: 13px; color: var(--p-frost); }
.die-box s { font-size: 12px; color: var(--p-frost); }
.die-box .link-btn { min-height: 44px; color: var(--p-paper); }
.breakdown { width: 100%; padding: 14px 18px; text-align: left; color: var(--p-bark); }
.breakdown dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; margin: 0; font-size: 15px; }
.breakdown dd { margin: 0; font-weight: 700; text-align: right; }
.breakdown .total { padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--p-bark) 30%, transparent); font-weight: 900; }
.breakdown .line { font-size: 13px; color: var(--muted); font-weight: 400; }
.offer-letter { position: relative; width: 100%; padding: 22px 20px 20px; border-radius: 6px; background: var(--p-paper); color: var(--p-bark); text-align: left; transform: rotate(-1deg); box-shadow: 0 10px 24px color-mix(in srgb, var(--d-bark-black-10) 55%, transparent); }
.offer-letter h3 { margin: 6px 96px 0 0; font-family: var(--zh); font-weight: 900; font-size: 19px; }
.offer-letter p { margin: 8px 0 0; font-size: 14px; line-height: 1.75; }
.offer-stamp { position: absolute; right: 14px; top: -14px; width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--p-wine); color: var(--p-wine); display: grid; place-items: center; transform: rotate(12deg); font-family: var(--zh); font-size: 20px; font-weight: 900; letter-spacing: .1em; background: color-mix(in srgb, var(--p-paper) 60%, transparent); }
.offer-stamp.s-lucky { font-family: var(--type); font-size: 18px; }
.offer-stamp.s-rejected { border-color: var(--p-navy); color: var(--p-navy); }
.offer-stamp.waiting { visibility: hidden; }
.decision .rec-secondary { border-color: var(--p-paper); color: var(--p-paper); }

@media (max-width: 640px) {
  .record-page, .decision, .rec-editor { max-width: none; }
  .rec-sticker-row { gap: 6px; }
  .dice-row { gap: 10px; }
  .die-face { width: 64px; height: 64px; padding: 9px; }
}
html[data-reduced-motion] .rolling .die-face { transform: none; }

/* 4-9 生日小蛋糕: a three-layer paper cake with one candle, drawn in CSS from palette colours (no new artwork). */
.sc-birthday { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 3px 10px 3px 6px; border-radius: 99px; background: var(--p-wine); color: var(--p-paper); font-size: 13px; font-weight: 700; width: fit-content; }
.cake { position: relative; display: grid; width: 18px; height: 18px; align-content: end; }
.cake i { display: block; height: 4px; margin: 0 auto 1px; border-radius: 2px; background: var(--p-paper); }
.cake i:nth-child(1) { width: 8px; } .cake i:nth-child(2) { width: 12px; background: var(--p-frost); } .cake i:nth-child(3) { width: 16px; }
.cake::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 5px; margin-left: -1px; background: var(--p-gold); box-shadow: 0 -3px 0 1px var(--p-ember); border-radius: 1px; }

/* 头像 / 立绘 (uploaded pictures) */
.rec-ph.has-pic { overflow: hidden; background: var(--p-frost); }
.rec-ph.has-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rec-pick { align-items: flex-start; }
.rec-pick-img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--p-frost); }
.rec-pick-portrait .rec-pick-img { height: 108px; }
.rec-pick-img.pending { opacity: .55; outline: 2px dashed var(--p-navy); outline-offset: 2px; }
.rec-pick-text { display: grid; gap: 4px; min-width: 0; }
.rec-pick-text small { color: var(--muted); }
.rec-pick .small-btn { min-height: 44px; }
.rec-art { margin: 0 0 14px; }
.rec-art img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
.rec-art figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.rec-takedown { margin-left: 8px; color: var(--red); }

/* 同学录 */
.rec-filter { width: 100%; max-width: 360px; margin: 4px 0 8px; font-size: 16px; }
.rec-classmates { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rec-mate { display: flex; gap: 12px; align-items: center; min-height: 72px; padding: 10px 12px; border-radius: 10px; background: var(--paper, var(--p-paper)); color: inherit; text-decoration: none; box-shadow: 0 1px 0 color-mix(in srgb, var(--p-navy) 18%, transparent); }
.rec-mate:hover, .rec-mate:focus-visible { outline: 2px solid var(--p-navy); outline-offset: 2px; }
.rec-mate-ph { flex: none; width: 52px; height: 52px; border-radius: 10px; font-size: 22px; }
.rec-mate-text { display: grid; gap: 2px; min-width: 0; }
.rec-mate-text b { display: flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.rec-mate-text small { color: var(--muted); font-size: 12.5px; }
.rec-mate-motto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.record-page > .rec-note { color: var(--p-frost); } /* on the tartan, like the heading line (同学录 count) */

/* ---------- 关系线 quick slip (2026-11-19) ---------- */
.rec-bond { display: grid; gap: 10px; }
.rec-bond[hidden] { display: none; }
.rec-bond h3 { font-size: 15px; }
.rec-bond-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.rec-bond-line small { color: var(--muted); font-size: 12px; }
.rec-bond-btns { display: flex; align-items: center; gap: 12px; }
.rec-bond .small-btn, .rec-bond .link-btn, .rec-rel-form .link-btn { min-height: 44px; }
.rec-bond-open { width: 100%; }
.rec-sub { margin: 4px 0 0; font-family: var(--zh); font-size: 14px; }
.rec-chip-wrap { display: grid; gap: 8px; }
.rec-chip-wrap input[type="text"] { min-height: 44px; }
.rec-mate-pick { display: grid; gap: 4px; }
.rec-pick-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rec-pick-row:hover, .rec-pick-row:focus-visible { background: color-mix(in srgb, var(--p-pine) 8%, transparent); }
.rec-pick-row[disabled] { opacity: .55; cursor: default; }
.rec-pick-row small { margin-left: auto; color: var(--muted); font-size: 12px; }
.rec-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: var(--p-wine); color: var(--p-paper); font-size: 11px; line-height: 1; vertical-align: 2px; }
