:root {
    --cream: #fff8ef;
    --cream-2: #fff1e2;
    --ink: #3d2f45;
    --ink-2: #6b5b74;
    --muted: #9c8ca6;
    --line: #ffe4d3;
    --card: #ffffff;
    --pink: #ff7aa8;
    --pink-d: #ff5c92;
    --peach: #ffb26b;
    --mint: #3fc9a8;
    --sky: #5ec8e5;
    --sun: #ffc94a;
    --purple: #a78bfa;
    --red: #f0616f;
    --shadow-sm: 0 4px 14px -6px rgba(123, 85, 110, .18);
    --shadow-md: 0 18px 40px -22px rgba(123, 85, 110, .35);
    --shadow-lg: 0 32px 70px -34px rgba(123, 85, 110, .45);
    --radius: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }

/* ==================== 背景装饰 ==================== */

.bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 6%, rgba(255, 201, 74, .18), transparent 32%),
        radial-gradient(circle at 92% 10%, rgba(167, 139, 250, .14), transparent 34%),
        radial-gradient(circle at 84% 92%, rgba(94, 200, 229, .16), transparent 36%),
        radial-gradient(circle at 12% 90%, rgba(255, 122, 168, .14), transparent 34%),
        var(--cream);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
}
.blob-1 { width: 360px; height: 360px; left: -120px; top: -80px; background: rgba(255, 201, 74, .42); }
.blob-2 { width: 300px; height: 300px; right: -80px; top: 24%; background: rgba(255, 122, 168, .34); }
.blob-3 { width: 340px; height: 340px; left: 28%; bottom: -180px; background: rgba(94, 200, 229, .32); }

.dot-field {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 140, 175, .18) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%);
    opacity: .7;
}

/* ==================== 顶栏 ==================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(14px, 3vw, 34px);
    background: rgba(255, 251, 245, .86);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid rgba(255, 228, 211, .8);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    min-width: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    font-size: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff0d9, #ffd7e5);
    box-shadow: inset 0 1px 0 #fff, 0 8px 18px -12px rgba(255, 92, 146, .8);
}

.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-text strong {
    font-size: 16px;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-text small {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
    padding: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
    white-space: nowrap;
    transition: all .18s ease;
}
.nav-pill:hover { background: #fff; color: var(--pink-d); }
.nav-pill.active {
    color: #fff;
    background: linear-gradient(135deg, #ff9fbe, #ff7aa8 55%, #ffb26b);
    box-shadow: 0 10px 20px -12px rgba(255, 92, 146, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.nav-ico { font-size: 14px; }

.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.teacher-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 5px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-2);
    white-space: nowrap;
}
.teacher-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffb26b, #ff7aa8);
}

.ghost-btn {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s ease;
}
.ghost-btn:hover { background: #fff; border-color: var(--line); color: var(--pink-d); }
.ghost-btn.danger:hover { color: var(--red); }

.inline-form { margin: 0; display: inline; }

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    cursor: pointer;
}

/* ==================== 页面容器 ==================== */

.page {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 22px auto 0;
    padding-bottom: 30px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -.01em;
    line-height: 1.25;
}

.page-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.page-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px 28px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.page-footer .dot { opacity: .5; }

/* ==================== 提示条 ==================== */

.flash {
    margin-bottom: 14px;
    padding: 11px 16px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid;
    animation: slideIn .24s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.flash-success { color: #0f7a5f; background: #e9fbf4; border-color: #bdeedd; }
.flash-error { color: #b4233a; background: #fff0f2; border-color: #ffd0d7; }
.flash-info { color: #146a8a; background: #eaf8ff; border-color: #c9ecf9; }

/* ==================== 按钮 ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 13px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #ff9fbe, #ff6f9f 55%, #ff9a6b);
    box-shadow: 0 14px 26px -14px rgba(255, 92, 146, .85), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-primary:hover { transform: translateY(-2px); filter: saturate(108%); }

.btn-mint {
    color: #fff;
    background: linear-gradient(135deg, #6fe0c2, #3fc9a8);
    box-shadow: 0 14px 26px -14px rgba(63, 201, 168, .8);
}
.btn-mint:hover { transform: translateY(-2px); }

.btn-soft {
    color: var(--pink-d);
    background: #fff0f5;
    border-color: #ffd8e5;
}
.btn-soft:hover { background: #ffe5ef; }

.btn-ghost {
    color: var(--ink-2);
    background: #fff;
    border-color: var(--line);
}
.btn-ghost:hover { border-color: #ffc9da; color: var(--pink-d); }

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff8b8b, #f0616f);
    box-shadow: 0 14px 26px -14px rgba(240, 97, 111, .8);
}

.btn-sm { padding: 7px 12px; font-size: 11.5px; border-radius: 10px; }
.btn-xs { padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ==================== 卡片 / 统计 ==================== */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-pad { padding: clamp(16px, 2.2vw, 24px); }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}
.section-title h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.section-title span { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    position: relative;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -34px;
    bottom: -46px;
    border-radius: 50%;
    background: var(--accent, #ff7aa8);
    opacity: .12;
}
.stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .04em;
}
.stat-value {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.stat-sub { margin-top: 3px; font-size: 10.5px; color: var(--muted); font-weight: 500; }

/* ==================== 宠物形象 ==================== */

.pet-orb {
    --size: 84px;
    position: relative;
    width: var(--size);
    height: var(--size);
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 32% 26%, #fff 0%, var(--c1, #ffe6bd) 46%, var(--c2, #ffb26b) 118%);
    box-shadow:
        inset 0 -6px 14px rgba(94, 45, 70, .08),
        0 12px 22px -14px var(--c2, #ffb26b);
    isolation: isolate;
}

.pet-halo {
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c1, #ffe6bd), transparent 68%);
    filter: blur(10px);
    opacity: .75;
    z-index: -1;
}

.pet-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(var(--c2, #ffb26b) var(--p, 40%), rgba(255, 255, 255, .5) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
    opacity: .9;
}

.pet-emoji {
    position: relative;
    z-index: 2;
    font-size: calc(var(--size) * .5);
    line-height: 1;
    filter: drop-shadow(0 6px 8px rgba(120, 60, 80, .18));
    animation: petBob 3.4s ease-in-out infinite;
    transform-origin: 50% 80%;
}

@keyframes petBob {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-4px) rotate(1deg); }
}

.pet-lv {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 9.5px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ff9fbe, #ff6f9f);
    border: 1.5px solid #fff;
    white-space: nowrap;
    z-index: 3;
    box-shadow: 0 4px 8px -4px rgba(255, 92, 146, .8);
}

.pet-orb--xs { --size: 38px; }
.pet-orb--sm { --size: 54px; }
.pet-orb--md { --size: 84px; }
.pet-orb--lg { --size: 116px; }
.pet-orb--xl { --size: 150px; }

.pet-orb.is-sick .pet-emoji { filter: grayscale(.45) brightness(.94); animation-duration: 6s; }
.pet-orb.is-sick::after {
    content: "!";
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: #f0616f;
    border: 2px solid #fff;
    z-index: 4;
}

.pet-orb.lvl-7 .pet-halo,
.pet-orb.lvl-8 .pet-halo,
.pet-orb.lvl-9 .pet-halo,
.pet-orb.lvl-10 .pet-halo {
    background: radial-gradient(circle, var(--sun), transparent 66%);
    opacity: .95;
    animation: haloPulse 3s ease-in-out infinite;
}

@keyframes haloPulse {
    50% { transform: scale(1.12); opacity: .65; }
}

/* ==================== 学生卡片 ==================== */

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 12px;
}

.student-card {
    position: relative;
    padding: 14px 13px 12px;
    background: #fff;
    border: 1.5px solid #fff1e6;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}

.student-card::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 50%;
    width: 140px;
    height: 90px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--glow, #ffe6bd);
    opacity: .35;
    filter: blur(20px);
    pointer-events: none;
}

.student-card:hover {
    transform: translateY(-4px);
    border-color: #ffd6e4;
    box-shadow: var(--shadow-md);
}

.student-card.is-selected {
    border-color: #ff9fbe;
    box-shadow: 0 0 0 3px rgba(255, 159, 190, .18), var(--shadow-md);
}

.card-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    margin-bottom: 4px;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 9.5px;
    font-weight: 800;
    color: var(--gc, #ff6f9f);
    background: var(--gbg, #fff0f5);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-btn {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.more-btn:hover { background: #fff4f8; color: var(--pink-d); }

.student-orb { margin: 2px auto 6px; position: relative; z-index: 2; }

.stu-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stu-pet {
    margin-top: 2px;
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stu-score {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}
.stu-score b {
    font-size: 21px;
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.stu-score span { font-size: 9.5px; color: var(--muted); font-weight: 600; }

.stu-bar {
    height: 5px;
    margin: 7px 2px 9px;
    border-radius: 99px;
    background: #fff1e6;
    overflow: hidden;
}
.stu-bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #ffc94a, #ff9fbe);
}

.quick-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.quick-btn {
    padding: 6px 0;
    border-radius: 9px;
    border: 1px solid #ffe1ea;
    background: #fff7fa;
    color: var(--pink-d);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all .14s ease;
}
.quick-btn:hover { background: #ff9fbe; border-color: #ff9fbe; color: #fff; transform: translateY(-1px); }
.quick-btn.minus { border-color: #e9eef5; background: #f8fafc; color: #8494a8; }
.quick-btn.minus:hover { background: #f0616f; border-color: #f0616f; color: #fff; }

.sick-tag {
    position: absolute;
    top: 34px;
    right: 10px;
    z-index: 3;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    color: #b4233a;
    background: #ffe8ec;
    border: 1px solid #ffd0d7;
}

/* ==================== 工具栏 ==================== */

.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }

.input, .select, .textarea {
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    padding: 9px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: #ffb0c9;
    box-shadow: 0 0 0 3px rgba(255, 159, 190, .18);
}
.input { min-width: 180px; }
.textarea { width: 100%; min-height: 120px; resize: vertical; line-height: 1.8; }

.chip-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip-tab {
    padding: 7px 12px;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .16s ease;
    white-space: nowrap;
}
.chip-tab:hover { border-color: #ffc9da; color: var(--pink-d); }
.chip-tab.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff9fbe, #ff6f9f);
    box-shadow: 0 8px 16px -10px rgba(255, 92, 146, .9);
}

/* ==================== 弹窗 ==================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.modal[hidden] { display: none; }

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(61, 47, 69, .42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .2s ease;
}
.modal.open .modal-mask { opacity: 1; }

.modal-card {
    position: relative;
    width: min(560px, 100%);
    max-height: min(88vh, 860px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 40px 90px -30px rgba(61, 47, 69, .55);
    transform: translateY(14px) scale(.97);
    opacity: 0;
    transition: all .22s cubic-bezier(.34, 1.3, .64, 1);
    overflow: hidden;
}
.modal.open .modal-card { transform: none; opacity: 1; }

.modal-wide { width: min(760px, 100%); }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff4e9, #fff0f6);
    border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}
.modal-close:hover { color: var(--red); }

.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: #fffaf6;
}

/* ==================== 表单 ==================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="email"],
.field select {
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
}
.field input:focus, .field select:focus {
    border-color: #ffb0c9;
    box-shadow: 0 0 0 3px rgba(255, 159, 190, .18);
}
.field small { font-size: 10.5px; color: var(--muted); font-weight: 500; line-height: 1.6; }
.field em { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 500; }

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fffaf6;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
}
.checkbox-line input { width: 15px; height: 15px; accent-color: var(--pink); }

/* ==================== 表格 ==================== */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

table.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--muted);
    background: #fffaf5;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #fff2ea;
    vertical-align: middle;
}

table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table tbody tr:hover { background: #fffcf9; }

.td-name { font-weight: 700; }
.td-muted { color: var(--muted); font-size: 11.5px; }

/* ==================== 徽章 ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.badge-pink { color: #c42f5f; background: #ffe8ef; }
.badge-mint { color: #0f7a5f; background: #e5faf3; }
.badge-sky { color: #146a8a; background: #e8f7ff; }
.badge-sun { color: #96620a; background: #fff5d9; }
.badge-gray { color: #7b8794; background: #f1f4f8; }
.badge-red { color: #b4233a; background: #ffe9ed; }

/* ==================== 进步条 ==================== */

.progress {
    height: 7px;
    border-radius: 99px;
    background: #fff1e6;
    overflow: hidden;
}
.progress i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #ffc94a, #ff9fbe);
    transition: width .4s ease;
}
.progress.mint i { background: linear-gradient(90deg, #7ee0c6, #3fc9a8); }

/* ==================== 积分浮动 ==================== */

.float-score {
    position: fixed;
    z-index: 120;
    pointer-events: none;
    font-size: 18px;
    font-weight: 900;
    color: var(--pink-d);
    text-shadow: 0 2px 8px rgba(255, 255, 255, .9);
    animation: scoreFloat .9s ease-out forwards;
}
.float-score.minus { color: var(--red); }

@keyframes scoreFloat {
    0% { transform: translate(-50%, 0) scale(.8); opacity: 0; }
    20% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
    100% { transform: translate(-50%, -46px) scale(1); opacity: 0; }
}

/* 卡片加分弹跳 */
.pop { animation: pop .36s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.045); }
    100% { transform: scale(1); }
}

/* ==================== 空状态 ==================== */

.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}
.empty .empty-emoji { font-size: 38px; display: block; margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ==================== 提示 / 彩带 ==================== */

.toast-stack {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 140;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: min(92vw, 420px);
}

.toast {
    padding: 10px 18px;
    border-radius: 13px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(61, 47, 69, .93);
    box-shadow: 0 16px 34px -18px rgba(61, 47, 69, .9);
    opacity: 0;
    transform: translateY(8px);
    transition: all .26s ease;
    text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { background: rgba(180, 35, 58, .95); }
.toast-success { background: rgba(15, 122, 95, .95); }
.toast-info { background: rgba(80, 60, 110, .95); }

.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 110;
}

/* ==================== 登录 / 落地页 ==================== */

.landing {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 40px;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
}

.hero {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 36px;
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #b45309;
    background: #fff3d6;
    border: 1px solid #ffe1a8;
}

.hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 5.2vw, 54px);
    line-height: 1.18;
    letter-spacing: -.02em;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, #ff6f9f, #ff9a5b 55%, #ffc94a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--ink-2);
    max-width: 480px;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.hero-stat b { display: block; font-size: 22px; font-weight: 800; }
.hero-stat span { font-size: 10.5px; color: var(--muted); font-weight: 600; }

.hero-visual {
    position: relative;
    min-height: 380px;
    display: grid;
    place-items: center;
}

.hero-card {
    position: relative;
    width: min(360px, 100%);
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(255, 201, 74, .25), rgba(255, 122, 168, .22));
    z-index: -1;
    filter: blur(6px);
}
.hero-pet-row { display: flex; align-items: center; gap: 14px; }
.hero-pet-row h3 { margin: 0; font-size: 18px; }
.hero-pet-row p { margin: 2px 0 0; font-size: 11px; color: var(--muted); font-weight: 600; }

.hero-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hero-mini {
    padding: 8px;
    border-radius: 12px;
    background: #fffaf6;
    border: 1px solid var(--line);
    text-align: center;
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}
.hero-mini b { display: block; font-size: 15px; color: var(--ink); }

.floating-pet {
    position: absolute;
    font-size: 34px;
    filter: drop-shadow(0 8px 10px rgba(120, 60, 80, .18));
    animation: floaty 5s ease-in-out infinite;
    z-index: 2;
}
.fp-1 { top: 6%; left: 4%; animation-delay: -1s; }
.fp-2 { bottom: 10%; right: 2%; animation-delay: -2.4s; }
.fp-3 { top: 16%; right: 8%; font-size: 24px; animation-delay: -3.2s; }
.fp-4 { bottom: 18%; left: 8%; font-size: 26px; animation-delay: -.6s; }

@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 48px;
}

.role-card {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .2s ease;
}
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.role-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: #fff3e6;
    margin-bottom: 12px;
}
.role-card h3 { margin: 0 0 6px; font-size: 16px; }
.role-card p { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.role-card a { font-size: 12px; font-weight: 800; color: var(--pink-d); }

.feature-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 30px;
}
.feature-item {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--ink-2);
    line-height: 1.65;
}
.feature-item b { display: block; color: var(--ink); font-size: 12.5px; }
.feature-ico { font-size: 20px; flex: none; }

/* ==================== 认证页 ==================== */

.auth-wrap {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
}

.auth-side h1 { margin: 12px 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; }
.auth-side p { color: var(--ink-2); font-size: 13px; line-height: 1.85; max-width: 380px; }
.auth-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.auth-points span {
    width: 26px; height: 26px; border-radius: 9px;
    display: grid; place-items: center;
    background: #fff; border: 1px solid var(--line);
    font-size: 13px;
}

.auth-card {
    padding: clamp(24px, 3.4vw, 36px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card .sub { margin: 0 0 22px; font-size: 12px; color: var(--muted); }

.auth-form { display: grid; gap: 13px; }

.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.role-option {
    padding: 10px 6px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: #fffaf6;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .16s ease;
}
.role-option input { display: none; }
.role-option .emoji { display: block; font-size: 20px; margin-bottom: 2px; }
.role-option.active { border-color: #ff9fbe; background: #fff0f5; color: var(--pink-d); box-shadow: 0 0 0 3px rgba(255, 159, 190, .12); }

.auth-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--pink-d); font-weight: 700; }

.demo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 13px;
    background: #fff7e2;
    border: 1px dashed #ffd98a;
    color: #8a5a00;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ==================== 排行榜 ==================== */

.podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: end;
    margin-bottom: 18px;
}
.podium-item {
    position: relative;
    padding: 18px 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.podium-item.first {
    padding-top: 26px;
    background: linear-gradient(180deg, #fff9e8, #fff);
    border-color: #ffe1a8;
    box-shadow: 0 22px 44px -26px rgba(255, 201, 74, .8);
}
.podium-rank {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: #fff;
    border: 2px solid #ffe1a8;
    box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .3);
}
.podium-item .pet-orb { margin: 8px auto 8px; }
.podium-name { font-size: 14px; font-weight: 800; }
.podium-points { font-size: 18px; font-weight: 800; color: var(--pink-d); margin-top: 2px; }
.podium-points span { font-size: 9.5px; color: var(--muted); font-weight: 600; }

.rank-list { display: grid; gap: 8px; }
.rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.rank-row .rank-no {
    width: 26px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    flex: none;
}
.rank-row.top1 .rank-no { color: #d4a017; }
.rank-row.top2 .rank-no { color: #8a9bb0; }
.rank-row.top3 .rank-no { color: #c07a45; }
.rank-info { flex: 1; min-width: 0; }
.rank-info strong { display: block; font-size: 13px; }
.rank-info small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.rank-points { text-align: right; flex: none; }
.rank-points b { display: block; font-size: 15px; font-weight: 800; }
.rank-points span { font-size: 9.5px; color: var(--muted); }

/* ==================== 商店 ==================== */

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.shop-card {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .2s ease;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shop-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 26px;
    background: #fff6ea;
    margin-bottom: 10px;
}
.shop-card h3 { margin: 0 0 4px; font-size: 14px; }
.shop-card p { margin: 0 0 12px; font-size: 11px; color: var(--muted); line-height: 1.6; min-height: 34px; }
.shop-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.shop-cost { font-size: 16px; font-weight: 800; color: var(--pink-d); }
.shop-cost span { font-size: 10px; color: var(--muted); font-weight: 600; }

/* ==================== 任务 ==================== */

.task-list { display: grid; gap: 10px; }
.task-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.task-badge {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #96620a;
    background: #fff5d9;
}
.task-main { flex: 1; min-width: 0; }
.task-main h3 { margin: 0; font-size: 13.5px; }
.task-main p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.task-reward { flex: none; font-size: 12px; font-weight: 800; color: var(--pink-d); }

/* ==================== 勋章 ==================== */

.medal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.medal-card {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.medal-card.locked { opacity: .45; filter: grayscale(.6); }
.medal-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: var(--mbg, #fff5d9);
    box-shadow: inset 0 -4px 10px rgba(0, 0, 0, .05);
}
.medal-card h3 { margin: 0; font-size: 12.5px; }
.medal-card p { margin: 3px 0 0; font-size: 10px; color: var(--muted); line-height: 1.5; }

.medal-wall { display: grid; gap: 8px; }
.medal-wall-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
}
.medal-wall-row .mw-name { flex: 1; font-size: 12.5px; font-weight: 700; }
.medal-pill { font-size: 18px; }

/* ==================== 学生端宠物页 ==================== */

.pet-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    align-items: stretch;
}

.pet-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px 20px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, .9), transparent 55%),
        linear-gradient(160deg, #fff3e0, #ffe9f1 55%, #eaf8ff);
    border: 1px solid #ffe0ea;
    overflow: hidden;
}
.pet-stage::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 180px;
    height: 60px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(255, 159, 190, .28);
    filter: blur(14px);
}
.pet-stage h2 { margin: 12px 0 2px; font-size: 20px; }
.pet-stage p { margin: 0; font-size: 11.5px; color: var(--muted); }

.stat-bars { display: grid; gap: 12px; }
.stat-bar-row { display: grid; gap: 5px; }
.stat-bar-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.stat-bar-head span:last-child { color: var(--muted); font-weight: 600; }

.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.care-btn {
    padding: 12px 8px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffaf6;
    text-align: center;
    cursor: pointer;
    transition: all .16s ease;
}
.care-btn:hover { transform: translateY(-2px); border-color: #ffc9da; box-shadow: var(--shadow-sm); }
.care-btn .ico { display: block; font-size: 22px; margin-bottom: 2px; }
.care-btn b { font-size: 11.5px; }
.care-btn small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }

/* ==================== 家长端 ==================== */

.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.child-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}
.child-card h3 { margin: 0; font-size: 15px; }
.child-card p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.report-card { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-align: center; }
.report-card b { display: block; font-size: 22px; font-weight: 800; }
.report-card span { font-size: 10.5px; color: var(--muted); font-weight: 600; }

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding: 10px 4px 0;
}
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar-chart .bar-fill {
    width: 100%;
    max-width: 26px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #ffc94a, #ff9fbe);
    min-height: 3px;
}
.bar-chart .bar-label { font-size: 9px; color: var(--muted); font-weight: 600; }

/* ==================== 大屏模式 ==================== */

.kiosk-body { background: #1f1a2e; }
.kiosk-body .bg-decor { display: none; }
.kiosk {
    min-height: 100vh;
    padding: 22px clamp(14px, 3vw, 34px);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 159, 190, .22), transparent 34%),
        radial-gradient(circle at 88% 6%, rgba(94, 200, 229, .2), transparent 34%),
        radial-gradient(circle at 50% 100%, rgba(255, 201, 74, .16), transparent 40%),
        linear-gradient(160deg, #241d36, #1b1729 55%, #221d33);
    color: #fff;
}
.kiosk-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.kiosk-head h1 { margin: 0; font-size: clamp(24px, 3.4vw, 38px); letter-spacing: .02em; }
.kiosk-head p { margin: 4px 0 0; color: rgba(255, 255, 255, .55); font-size: 12px; letter-spacing: .16em; }
.kiosk-clock { font-size: 12px; color: rgba(255, 255, 255, .6); font-weight: 600; }
.kiosk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.kiosk-card {
    position: relative;
    padding: 16px 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.kiosk-card .stu-name { color: #fff; }
.kiosk-card .stu-pet { color: rgba(255, 255, 255, .55); }
.kiosk-card .stu-score b { color: #ffd166; }
.kiosk-card .stu-score span { color: rgba(255, 255, 255, .5); }
.kiosk-card .stu-bar { background: rgba(255, 255, 255, .1); }
.kiosk-card .pet-orb { margin: 4px auto 8px; }
.kiosk-legend { margin-top: 18px; font-size: 10.5px; color: rgba(255, 255, 255, .4); text-align: center; }

/* ==================== 响应式 ==================== */

@media (max-width: 1080px) {
    .hero { grid-template-columns: 1fr; gap: 20px; }
    .hero-visual { min-height: 300px; }
    .hero p.lead { max-width: none; }
    .pet-hero { grid-template-columns: 1fr; }
    .role-grid { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; max-width: 460px; gap: 20px; }
    .auth-side { text-align: center; }
    .auth-side p { margin: 0 auto; }
    .auth-points { display: none; }
}

@media (max-width: 860px) {
    .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .main-nav {
        order: 3;
        width: 100%;
        margin: 0;
        justify-content: flex-start;
        border-radius: 14px;
    }
    .top-actions { margin-left: auto; }
    .nav-toggle { display: none; }
    .brand-text small { display: none; }
    .page { width: calc(100% - 20px); margin-top: 14px; }
    .student-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
    .student-card { border-radius: 18px; padding: 12px 9px 10px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .podium { gap: 6px; }
    .podium-item { padding: 14px 8px 10px; }
    .podium-item .pet-orb { --size: 62px; }
    .rank-row { padding: 9px 10px; gap: 8px; }
    .form-grid { grid-template-columns: 1fr; }
    .care-grid { grid-template-columns: repeat(3, 1fr); }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .student-grid { grid-template-columns: repeat(2, 1fr); }
    .student-card { padding: 11px 8px 9px; }
    .pet-orb--md { --size: 72px; }
    .quick-btn { font-size: 10.5px; padding: 6px 0; }
    .card-pad { padding: 15px; }
    .toolbar { width: 100%; }
    .input { min-width: 0; flex: 1; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .medal-grid { grid-template-columns: repeat(2, 1fr); }
    .page-head h1 { font-size: 23px; }
    .btn { padding: 9px 14px; }
    .hero h1 { font-size: 32px; }
    .hero-card { transform: none; }
    .auth-card { padding: 22px 18px; border-radius: 22px; }
    .main-nav { border-radius: 12px; }
    .nav-pill { padding: 7px 10px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* 补充：积分胶囊 / 班级切换 / 批量选择 */
.point-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 99px;
    background: #fff5d9;
    border: 1px solid #ffe1a8;
    color: #94630a;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.child-switch select {
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-2);
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    outline: none;
}

.pick-box {
    display: none;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pick-box input { width: 16px; height: 16px; accent-color: var(--pink); }

.student-grid.batch-mode .pick-box { display: inline-flex; }

.batch-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 70;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 16px;
    background: rgba(61, 47, 69, .94);
    color: #fff;
    box-shadow: 0 20px 44px -20px rgba(61, 47, 69, .9);
    opacity: 0;
    pointer-events: none;
    transition: all .24s ease;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 24px);
}
.batch-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.batch-count { font-size: 11.5px; font-weight: 700; padding: 0 4px; }
.batch-bar .btn { padding: 6px 10px; font-size: 11px; border-radius: 9px; }

@media (max-width: 560px) {
    .batch-bar { gap: 5px; padding: 8px; }
    .batch-count { width: 100%; text-align: center; }
    .point-chip { display: none; }
}

/* 通用提示盒 */
.hint-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fffaf6;
    border: 1px solid var(--line);
    font-size: 11.5px;
    line-height: 1.85;
    color: var(--ink-2);
}
.hint-box code {
    background: rgba(61, 47, 69, .06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}

/* ==================== 通用卡片区块 ==================== */
.section-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: #fffdfb;
}
.section-head h2 { margin: 0; font-size: 14.5px; letter-spacing: -.01em; }
.section-head p { margin: 2px 0 0; font-size: 10.5px; color: var(--muted); }
.section-body { padding: 16px 18px; }
.section-card > .table-wrap:last-child { border-radius: 0 0 22px 22px; }
.section-card > .empty:last-child { border-radius: 0 0 22px 22px; }

.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.mini-list { display: grid; gap: 8px; }
.mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #fffaf6;
    border: 1px solid var(--line);
    font-size: 12px;
}
.mini-item .mi-main { flex: 1; min-width: 0; }
.mini-item .mi-main b { display: block; font-size: 12px; }
.mini-item .mi-main small { color: var(--muted); font-size: 10px; }
.mini-item .mi-val { font-weight: 800; color: var(--pink-d); font-size: 12.5px; }

@media (max-width: 1000px) {
    .two-col { grid-template-columns: 1fr; }
    .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .three-col { grid-template-columns: 1fr; }
    .section-body { padding: 13px; }
    .section-head { padding: 12px 13px; }
}

/* 大屏可读性 */
.kiosk-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kiosk-card .stu-name { font-size: 17px; }
.kiosk-card .stu-score b { font-size: 24px; }
.kiosk-card .pet-orb--md { --size: 92px; }

/* ==================== 防泄密水印 ==================== */
.cp-watermark {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 260px 170px;
  user-select: none;
  -webkit-user-select: none;
}
@media print {
  .cp-watermark { display: block; }
}
