/* ================================================================
   生物课堂 · 免疫失调公开课
   教师端 / 学生端 / 开始页 共用样式
   ================================================================ */
:root {
    --night: #060b10;
    --night-2: #0a1219;
    --panel: rgba(255, 255, 255, .045);
    --panel-2: rgba(255, 255, 255, .07);
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .16);
    --ink: #e9f2f5;
    --dim: #86a0ab;
    --dim-2: #5f7883;
    --teal: #4fd1c5;
    --mint: #5eead4;
    --gold: #f0c25a;
    --red: #e26a5f;
    --violet: #a78bfa;
    --radius: 20px;
    --shadow: 0 30px 70px -40px #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
    background:
        radial-gradient(1100px 700px at 58% -12%, rgba(79, 209, 197, .10), transparent 62%),
        radial-gradient(900px 600px at 6% 108%, rgba(240, 194, 90, .055), transparent 60%),
        radial-gradient(800px 600px at 100% 110%, rgba(167, 139, 250, .05), transparent 60%),
        var(--night);
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.bio-top {
    position: sticky; top: 0; z-index: 30;
    height: 56px; display: flex; align-items: center; gap: 16px;
    padding: 0 22px;
    background: rgba(6, 11, 16, .82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.bio-back {
    font-size: 13px; color: var(--dim); letter-spacing: .04em;
    padding: 7px 11px; border-radius: 9px; border: 1px solid transparent;
    transition: .18s; white-space: nowrap;
}
.bio-back:hover { color: #fff; border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.bio-brand {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; letter-spacing: .08em; color: #dcebed;
    white-space: nowrap;
}
.bio-brand .mark {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(155deg, rgba(79, 209, 197, .3), rgba(79, 209, 197, .05));
    border: 1px solid rgba(79, 209, 197, .42);
    color: var(--mint); font-size: 15px; font-weight: 700;
}
.bio-brand b { color: var(--mint); font-weight: 600; }
.bio-user {
    margin-left: auto; display: flex; align-items: center; gap: 9px;
    font-size: 13px; color: var(--dim);
}
.bio-user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8e5e8; }
.bio-logout, .bio-login-link {
    font-size: 12px; color: var(--dim); background: transparent;
    border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px;
}
.bio-logout:hover, .bio-login-link:hover { color: #fff; border-color: var(--line-2); }
.bio-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    display: inline-grid; place-items: center; overflow: hidden;
    background: linear-gradient(155deg, rgba(79, 209, 197, .28), rgba(79, 209, 197, .05));
    border: 1px solid rgba(79, 209, 197, .3);
    color: #dffff8; font-size: 13px; font-weight: 700;
}
.bio-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 通用文字 / 按钮 ---------- */
.eyebrow {
    font-size: 12px; letter-spacing: .28em; color: var(--mint);
    text-transform: uppercase; font-weight: 600;
}
.sub { font-size: 14px; line-height: 1.8; color: var(--dim); }
.big-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px; border-radius: 999px; border: 1px solid rgba(94, 234, 212, .7);
    background: linear-gradient(155deg, rgba(94, 234, 212, .25), rgba(94, 234, 212, .06));
    color: #eafff9; font-size: 16px; letter-spacing: .12em; font-weight: 600;
    box-shadow: 0 18px 46px -26px rgba(94, 234, 212, .9);
    transition: .2s;
}
.big-btn:hover { background: linear-gradient(155deg, rgba(94, 234, 212, .38), rgba(94, 234, 212, .1)); transform: translateY(-1px); }
.big-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.big-btn.ghost {
    background: transparent; border-color: var(--line-2); color: #d8e5e8;
    box-shadow: none; letter-spacing: .08em;
}
.big-btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.big-btn.gold { border-color: rgba(240, 194, 90, .75); background: linear-gradient(155deg, rgba(240, 194, 90, .24), rgba(240, 194, 90, .05)); color: #fff5dc; box-shadow: 0 18px 46px -26px rgba(240, 194, 90, .7); }
.big-btn.danger { border-color: rgba(226, 106, 95, .7); background: linear-gradient(155deg, rgba(226, 106, 95, .22), rgba(226, 106, 95, .04)); color: #ffe9e6; box-shadow: none; }

/* ---------- 登录 ---------- */
.login-card {
    width: min(430px, 92vw); margin: 0 auto;
    padding: 34px 30px 28px;
    border-radius: 24px; border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .018));
    box-shadow: var(--shadow);
}
.login-card h1 { margin: 12px 0 8px; font-size: 26px; letter-spacing: .02em; }
.login-card .sub { margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; letter-spacing: .08em; color: var(--dim); }
.login-form input {
    height: 46px; padding: 0 14px; border-radius: 12px;
    background: rgba(0, 0, 0, .24); border: 1px solid var(--line-2);
    color: var(--ink); font-size: 16px; outline: none; transition: .18s;
}
.login-form input:focus { border-color: rgba(94, 234, 212, .7); box-shadow: 0 0 0 3px rgba(94, 234, 212, .1); }
.login-form .big-btn { margin-top: 4px; }
.login-msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--dim); }
.login-msg.error { color: #ff9d94; }
.login-msg.ok { color: var(--mint); }
.login-note { margin-top: 14px; font-size: 12px; color: var(--dim-2); line-height: 1.7; }
.login-note a { color: var(--mint); border-bottom: 1px solid rgba(94, 234, 212, .4); }

/* ---------- 提示 ---------- */
.bio-toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 2000;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    padding: 11px 20px; border-radius: 999px;
    background: rgba(12, 21, 28, .96); border: 1px solid rgba(94, 234, 212, .35);
    color: #eafff9; font-size: 13px; letter-spacing: .03em;
    box-shadow: 0 18px 40px -20px #000;
    transition: .24s;
}
.bio-toast.show { opacity: 1; transform: translate(-50%, 0); }
.bio-toast.error { border-color: rgba(226, 106, 95, .6); color: #ffe3df; }

/* ================================================================
   开始页
   ================================================================ */
.bio-lobby main { min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; padding: 44px 20px 70px; }
.lobby-wrap { width: min(1080px, 100%); text-align: center; }
.lobby-wrap h1 { margin: 14px 0 10px; font-size: clamp(30px, 4.4vw, 48px); letter-spacing: .04em; font-weight: 800; }
.lobby-wrap > .sub { max-width: 560px; margin: 0 auto; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; text-align: left; }
.role-card {
    position: relative; overflow: hidden; display: block;
    padding: 32px 30px 28px; border-radius: 26px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018));
    box-shadow: var(--shadow);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
}
.role-card::after {
    content: ""; position: absolute; inset: 0 0 auto; height: 3px;
    background: linear-gradient(90deg, transparent, rgba(var(--c), .9), transparent);
    opacity: .8;
}
.role-card:hover { transform: translateY(-7px); border-color: rgba(var(--c), .5); box-shadow: 0 40px 80px -40px rgba(var(--c), .5); }
.role-card .icon {
    width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
    background: rgba(var(--c), .13); border: 1px solid rgba(var(--c), .4);
    color: rgb(var(--c)); margin-bottom: 22px;
}
.role-card .icon svg { width: 28px; height: 28px; }
.role-card h2 { font-size: 25px; letter-spacing: .03em; margin-bottom: 8px; }
.role-card p { font-size: 13px; line-height: 1.8; color: var(--dim); min-height: 46px; }
.role-card .go {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 22px;
    font-size: 13px; letter-spacing: .12em; color: rgb(var(--c));
}
.role-card .go svg { width: 16px; height: 16px; transition: transform .25s; }
.role-card:hover .go svg { transform: translateX(4px); }
.role-card.teacher { --c: 94, 234, 212; }
.role-card.student { --c: 240, 194, 90; }
.lobby-tip { margin-top: 26px; font-size: 12px; color: var(--dim-2); letter-spacing: .05em; }
.lobby-foot { padding: 18px 20px 30px; text-align: center; font-size: 11px; color: #3f5059; letter-spacing: .12em; }

/* ================================================================
   教师控制台
   ================================================================ */
.console { width: min(1320px, 100%); margin: 0 auto; padding: 30px 24px 60px; }
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.console-head h1 { margin: 10px 0 6px; font-size: clamp(26px, 3vw, 38px); letter-spacing: .02em; }
.room-card {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 16px 20px; border-radius: 18px;
    border: 1px solid rgba(94, 234, 212, .3);
    background: linear-gradient(160deg, rgba(94, 234, 212, .1), rgba(94, 234, 212, .02));
}
.room-card .lab { font-size: 11px; letter-spacing: .2em; color: var(--dim); }
.room-card strong {
    font-size: 38px; line-height: 1; letter-spacing: .18em; color: #eafff9;
    font-variant-numeric: tabular-nums; font-weight: 800;
}
.room-card .copy {
    font-size: 12px; color: var(--mint); background: rgba(94, 234, 212, .1);
    border: 1px solid rgba(94, 234, 212, .35); border-radius: 9px; padding: 7px 11px;
}
.room-card .copy:hover { background: rgba(94, 234, 212, .2); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.stat {
    padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line);
    background: var(--panel);
}
.stat span { display: block; font-size: 11px; letter-spacing: .16em; color: var(--dim-2); }
.stat b { display: block; margin-top: 7px; font-size: 30px; font-variant-numeric: tabular-nums; color: #f0fafb; }
.stat.teal b { color: var(--mint); }
.stat.gold b { color: var(--gold); }
.console-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 20px; align-items: start; }
.panel {
    border-radius: 20px; border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
    box-shadow: 0 30px 60px -50px #000;
    padding: 20px 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; letter-spacing: .14em; color: #cfe0e4; font-weight: 600; }
.panel-head .meta { font-size: 12px; color: var(--dim-2); }
.member-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow: auto; padding-right: 4px; }
.member-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 13px; border-radius: 13px;
    background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .055);
}
.member-row .nm { flex: 1; min-width: 0; font-size: 14px; color: #dfeaec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-row .nm small { color: var(--dim-2); font-size: 11px; margin-left: 8px; }
.member-row .badge {
    flex: none; font-size: 11px; color: var(--gold); letter-spacing: .03em;
    border: 1px solid rgba(240, 194, 90, .35); background: rgba(240, 194, 90, .07);
    border-radius: 7px; padding: 3px 7px; font-variant-numeric: tabular-nums;
}
.member-row .badge.none { color: var(--dim-2); border-color: var(--line); background: transparent; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #3b4a52; flex: none; }
.online-dot.on { background: var(--mint); box-shadow: 0 0 9px rgba(94, 234, 212, .8); }
.kick-btn {
    flex: none; font-size: 11px; color: #9c7a76; background: transparent;
    border: 1px solid rgba(226, 106, 95, .22); border-radius: 7px; padding: 3px 7px;
}
.kick-btn:hover { color: #ffb0a8; border-color: rgba(226, 106, 95, .55); }
.empty-state { padding: 44px 16px; text-align: center; color: var(--dim-2); font-size: 13px; line-height: 1.9; }
.start-panel { position: sticky; top: 76px; }
.start-panel h2 { font-size: 18px; letter-spacing: .05em; margin-bottom: 10px; }
.start-panel .sub { margin-bottom: 20px; }
.start-panel .big-btn { width: 100%; padding: 17px 20px; font-size: 17px; }
.start-hint { margin-top: 12px; font-size: 12px; color: var(--dim-2); line-height: 1.8; min-height: 20px; }
.mini-actions { display: flex; gap: 8px; margin-top: 20px; }
.mini-actions button {
    flex: 1; font-size: 12px; color: var(--dim); padding: 8px;
    background: transparent; border: 1px solid var(--line); border-radius: 9px;
}
.mini-actions button:hover { color: #fff; border-color: var(--line-2); }
.floor-note { margin-top: 20px; font-size: 11px; color: #41535c; line-height: 1.9; }

/* ---------- 课件全屏 ---------- */
#deckView { position: fixed; inset: 0; z-index: 40; background: #000; }
#deckFrame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #080d12; }
.float-action {
    position: fixed; right: 22px; bottom: calc(92px + 22px); z-index: 50;
    padding: 14px 22px; border-radius: 999px;
    border: 1px solid rgba(240, 194, 90, .8);
    background: linear-gradient(155deg, rgba(240, 194, 90, .95), rgba(226, 156, 42, .95));
    color: #1a1206; font-size: 16px; font-weight: 800; letter-spacing: .06em;
    box-shadow: 0 18px 44px -18px rgba(240, 194, 90, .9);
    animation: floatIn .3s ease-out;
}
.float-action:hover { filter: brightness(1.06); }
.float-action.idea { border-color: rgba(94, 234, 212, .8); background: linear-gradient(155deg, #7ff3e1, #35bfb2); color: #052522; box-shadow: 0 18px 44px -18px rgba(94, 234, 212, .9); }
.float-action.end { border-color: rgba(226, 106, 95, .8); background: linear-gradient(155deg, #ff8a80, #d9544a); color: #2a0906; box-shadow: 0 18px 44px -18px rgba(226, 106, 95, .9); }
@keyframes floatIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 教师互动覆盖层 ---------- */
.bio-overlay {
    position: fixed; inset: 0; z-index: 60;
    display: flex; flex-direction: column;
    background:
        radial-gradient(900px 600px at 50% -10%, rgba(79, 209, 197, .12), transparent 60%),
        #060b10;
    backdrop-filter: blur(8px);
}
.overlay-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 26px;
    padding: 26px 34px 18px; border-bottom: 1px solid var(--line);
}
.overlay-head h2 { margin: 8px 0 6px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: .02em; }
.overlay-head .ov-sub { font-size: 13px; color: var(--dim); }
.ov-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.ov-stat {
    min-width: 110px; padding: 10px 16px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--panel);
}
.ov-stat span { font-size: 10px; letter-spacing: .16em; color: var(--dim-2); }
.ov-stat b { display: block; margin-top: 3px; font-size: 26px; font-variant-numeric: tabular-nums; }
.ov-stat b.teal { color: var(--mint); }
.ov-list { flex: 1; overflow: auto; padding: 18px 34px 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; align-content: start; }
.ov-member {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px; border-radius: 14px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.ov-member.submitted { border-color: rgba(94, 234, 212, .35); background: rgba(94, 234, 212, .06); }
.ov-member .nm { flex: 1; min-width: 0; }
.ov-member .nm b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-member .nm small { display: block; margin-top: 3px; font-size: 11px; color: var(--dim-2); }
.status-pill {
    flex: none; font-size: 11px; padding: 4px 9px; border-radius: 999px;
    color: #8fa4ad; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.status-pill.ok { color: #06201c; background: var(--mint); border-color: var(--mint); font-weight: 700; }
.view-answer-btn {
    flex: none; font-size: 11px; padding: 5px 9px; border-radius: 8px;
    color: var(--mint); border: 1px solid rgba(94, 234, 212, .35); background: transparent;
}
.view-answer-btn:hover { background: rgba(94, 234, 212, .12); }
.overlay-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 34px 22px; border-top: 1px solid var(--line);
}
.overlay-foot p { font-size: 12px; color: var(--dim-2); line-height: 1.7; }
.overlay-foot .btn-end {
    padding: 13px 26px; border-radius: 999px; border: 1px solid rgba(226, 106, 95, .6);
    background: rgba(226, 106, 95, .14); color: #ffd9d5; font-size: 15px; font-weight: 700; letter-spacing: .05em;
}
.overlay-foot .btn-end:hover { background: rgba(226, 106, 95, .26); }
.idea-item { grid-column: 1 / -1; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.idea-item .top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.idea-item .top b { font-size: 14px; }
.idea-item .top span { font-size: 11px; color: var(--dim-2); }
.idea-item p { font-size: 14px; line-height: 1.75; color: #d9e6e9; white-space: pre-wrap; word-break: break-word; }

/* ---------- 答案弹窗 ---------- */
.bio-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(3, 7, 10, .8); backdrop-filter: blur(9px); }
.bio-modal-card {
    width: min(980px, 96vw); max-height: calc(100vh - 44px);
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 22px; border: 1px solid var(--line-2);
    background: linear-gradient(180deg, #0d1720, #080f15);
    box-shadow: 0 60px 120px -40px #000;
}
.bio-modal-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.bio-modal-head h3 { font-size: 18px; }
.bio-modal-head .meta { font-size: 12px; color: var(--dim-2); margin-top: 3px; }
.bio-modal-close { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 18px; }
.bio-modal-close:hover { color: #fff; border-color: var(--line-2); }
.bio-modal-body { padding: 18px 20px 24px; overflow: auto; }
.answer-case { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); margin-bottom: 10px; }
.answer-case h4 { font-size: 15px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.answer-case h4 span.tag { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.answer-case h4 span.tag.ok { color: var(--mint); border-color: rgba(94, 234, 212, .4); }
.answer-block { margin-top: 10px; }
.answer-block .lab { font-size: 11px; letter-spacing: .14em; color: var(--dim-2); margin-bottom: 6px; }
.guess-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.guess-card { min-height: 76px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .16); }
.guess-card .t { font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; color: #dce8eb; }
.guess-card img { display: block; width: 100%; margin-top: 6px; border-radius: 6px; background: rgba(255, 255, 255, .02); }
.guess-card .none { font-size: 12px; color: #43555e; }
.answer-quiz { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 6px 11px; border-radius: 8px; background: rgba(94, 234, 212, .08); border: 1px solid rgba(94, 234, 212, .3); color: #d8fff9; }
.answer-tests { display: flex; flex-wrap: wrap; gap: 6px; }
.answer-tests span { font-size: 11px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); color: var(--dim); }
.treat-answer { margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.treat-answer b { display: block; margin-bottom: 4px; font-size: 13px; color: #cfe0e4; }
.treat-answer p { font-size: 14px; line-height: 1.7; color: #d9e6e9; white-space: pre-wrap; word-break: break-word; }
.treat-note { margin-top: 8px; font-size: 12px; line-height: 1.7; color: var(--dim); }

/* ================================================================
   学生端
   ================================================================ */
.bio-student { min-height: 100vh; display: flex; flex-direction: column; }
.student-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px 80px; }
.student-center .inner { width: min(480px, 100%); text-align: center; }
.student-center h1 { margin: 12px 0 8px; font-size: clamp(26px, 6vw, 36px); }
.join-form { display: flex; gap: 10px; margin: 30px auto 0; width: min(400px, 100%); }
.join-form input {
    flex: 1 1 0; min-width: 0; height: 62px; text-align: center;
    font-size: 32px; letter-spacing: .35em; font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, .26); border: 1px solid var(--line-2); border-radius: 16px;
    color: #eafff9; outline: none; padding-left: .35em;
}
.join-form input:focus { border-color: rgba(94, 234, 212, .7); box-shadow: 0 0 0 4px rgba(94, 234, 212, .1); }
.join-form button { flex: none; padding: 0 24px; border-radius: 16px; border: 1px solid rgba(94, 234, 212, .65); background: linear-gradient(155deg, rgba(94, 234, 212, .28), rgba(94, 234, 212, .08)); color: #eafff9; font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.join-msg { margin-top: 16px; font-size: 13px; color: #ff9d94; min-height: 20px; }
.join-tip { margin-top: 26px; font-size: 12px; color: var(--dim-2); line-height: 1.9; }

.student-wait { flex: 1; width: min(1080px, 100%); margin: 0 auto; padding: 24px 18px 100px; }
.wait-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.wait-head h1 { margin: 8px 0 6px; font-size: clamp(22px, 4.6vw, 32px); }
.wait-code { text-align: right; flex: none; }
.wait-code span { display: block; font-size: 10px; letter-spacing: .2em; color: var(--dim-2); }
.wait-code b { font-size: 30px; letter-spacing: .18em; color: var(--gold); font-variant-numeric: tabular-nums; }
.member-panel { margin-top: 24px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); padding: 18px; }
.member-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.member-panel-head h2 { font-size: 13px; letter-spacing: .16em; color: #bcd0d5; font-weight: 600; }
.member-panel-head span { font-size: 11px; color: var(--dim-2); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }
.stu-member { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .055); }
.stu-member.me { border-color: rgba(94, 234, 212, .35); background: rgba(94, 234, 212, .055); }
.stu-member .nm { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-member .nm small { display: block; font-size: 10px; color: var(--dim-2); margin-top: 2px; }
.stu-member .badge { flex: none; font-size: 10px; color: var(--gold); border: 1px solid rgba(240, 194, 90, .32); background: rgba(240, 194, 90, .06); border-radius: 6px; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.stu-member .badge.none { color: #4d6069; border-color: var(--line); background: transparent; }
.stu-member .me-tag { flex: none; font-size: 10px; color: var(--mint); }
.student-foot {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: rgba(6, 11, 16, .9); border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.student-foot #myBadge { font-size: 13px; color: var(--gold); letter-spacing: .06em; }
.student-foot #myBadge.none { color: var(--dim-2); }
.sync-state {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; color: var(--dim-2); letter-spacing: .04em;
}
.sync-state::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: var(--mint); opacity: .7; animation: syncPulse 2s infinite;
}
@keyframes syncPulse {
    0%, 100% { opacity: .35; }
    50% { opacity: .95; }
}
.student-foot button { font-size: 12px; color: var(--dim); background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; }
.student-foot button:hover { color: #fff; border-color: var(--line-2); }

/* ---------- 身份牌 ---------- */
.draw-view { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 18px 80px; }
.draw-inner { width: min(520px, 100%); text-align: center; }
.draw-inner h1 { margin: 12px 0 8px; font-size: clamp(28px, 7vw, 40px); letter-spacing: .1em; }
.draw-inner .sub { margin-bottom: 24px; }
.id-deck { position: relative; width: 260px; height: 388px; margin: 0 auto 26px; perspective: 1400px; }
.id-deck::before, .id-deck::after {
    content: ""; position: absolute; inset: 0; border-radius: 20px;
    background: linear-gradient(160deg, #0d2029, #071118);
    border: 1.5px solid rgba(94, 234, 212, .18);
}
.id-deck::before { transform: translate(-13px, 10px) rotate(-5deg); opacity: .5; z-index: 0; }
.id-deck::after { transform: translate(-6px, 5px) rotate(-2.2deg); opacity: .75; z-index: 1; }
.id-card { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.2, .8, .2, 1); }
.id-card.flip { transform: rotateY(180deg); }
.id-face {
    position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #0c2029, #061016);
    border: 1.5px solid rgba(94, 234, 212, .35);
    box-shadow: 0 30px 70px -40px #000, 0 0 70px -40px rgba(94, 234, 212, .7);
}
.id-face.back { font-size: 62px; color: rgba(94, 234, 212, .45); letter-spacing: .24em; }
.id-face.front {
    transform: rotateY(180deg);
    background: linear-gradient(165deg, #0e2a2a, #061418);
    border-color: rgba(94, 234, 212, .72);
}
.id-face.front .dept { position: absolute; top: 20px; font-size: 11px; letter-spacing: .18em; color: #5e8f88; }
.id-face.front .mark { width: 84px; height: 84px; border-radius: 50%; border: 2px solid rgba(94, 234, 212, .75); display: grid; place-items: center; color: var(--mint); font-size: 40px; margin-bottom: 16px; }
.id-face.front .en { font-size: 11px; letter-spacing: .36em; color: #6fa79f; margin-bottom: 9px; }
.id-face.front .cn { font-size: 34px; letter-spacing: .18em; color: #eafff9; font-weight: 700; }
.id-face.front .id { position: absolute; bottom: 20px; font-size: 18px; letter-spacing: .1em; color: #7fd8c8; font-variant-numeric: tabular-nums; }
.draw-hint { margin-top: 14px; font-size: 12px; color: var(--dim-2); min-height: 18px; letter-spacing: .04em; }
#drawDoneBtn { margin-top: 14px; }

/* ---------- 候诊区 ---------- */
.clinic-view { position: fixed; inset: 56px 0 0; z-index: 10; display: flex; flex-direction: column; background: #070c16; }
.clinic-bar {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 14px; border-bottom: 1px solid var(--line);
    background: rgba(6, 11, 16, .95);
}
.clinic-bar > div:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(94, 234, 212, .55); animation: livePulse 1.8s infinite; flex: none; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(94, 234, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); } }
.clinic-bar b { font-size: 13px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clinic-bar span { font-size: 11px; color: var(--dim-2); }
.clinic-bar-right { display: flex; align-items: center; gap: 9px; flex: none; }
#submitState { font-size: 11px; color: var(--dim); }
#submitState.ok { color: var(--mint); }
#submitBtn {
    padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(240, 194, 90, .75);
    background: linear-gradient(155deg, #ffd77a, #ecb53a); color: #1c1305;
    font-size: 13px; font-weight: 800; letter-spacing: .05em;
}
#submitBtn:disabled { opacity: .55; }
.clinic-view iframe { flex: 1; width: 100%; border: 0; background: #070c16; }
.clinic-submit { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(6, 11, 16, .96); border-top: 1px solid var(--line); }
.clinic-submit .hint { font-size: 11px; color: var(--dim-2); line-height: 1.5; }
.clinic-submit button { flex: none; padding: 12px 22px; border-radius: 999px; border: 1px solid rgba(240, 194, 90, .8); background: linear-gradient(155deg, #ffd77a, #ecb53a); color: #1c1305; font-size: 15px; font-weight: 800; letter-spacing: .05em; }
.clinic-submit button:disabled { opacity: .55; }

/* ---------- 想法 ---------- */
.idea-view { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 18px 70px; }
.idea-card { width: min(620px, 100%); padding: 30px 28px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)); box-shadow: var(--shadow); }
.idea-card h1 { margin: 10px 0 8px; font-size: clamp(26px, 6vw, 34px); }
.idea-card .sub { margin-bottom: 20px; }
.idea-card textarea {
    width: 100%; min-height: 160px; resize: vertical; padding: 14px 16px;
    border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .2);
    color: var(--ink); font-size: 15px; line-height: 1.75; outline: none;
}
.idea-card textarea:focus { border-color: rgba(94, 234, 212, .65); box-shadow: 0 0 0 3px rgba(94, 234, 212, .08); }
.idea-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.idea-actions span { font-size: 11px; color: var(--dim-2); font-variant-numeric: tabular-nums; }
.idea-actions button { padding: 11px 22px; border-radius: 999px; border: 1px solid rgba(94, 234, 212, .65); background: linear-gradient(155deg, rgba(94, 234, 212, .26), rgba(94, 234, 212, .06)); color: #eafff9; font-size: 14px; font-weight: 700; }
.idea-actions button:disabled { opacity: .55; }
.idea-msg { margin-top: 10px; font-size: 12px; color: var(--mint); min-height: 18px; }

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1000px) {
    .console-grid { grid-template-columns: 1fr; }
    .start-panel { position: static; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .bio-top { height: 50px; padding: 0 12px; gap: 8px; }
    .bio-brand { font-size: 13px; letter-spacing: .04em; gap: 6px; }
    .bio-brand .mark { width: 22px; height: 22px; border-radius: 7px; font-size: 13px; }
    .bio-back { font-size: 11px; padding: 5px 7px; }
    .bio-user-name { display: none; }
    .bio-user { gap: 6px; }
    .role-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
    .role-card { padding: 22px 20px; border-radius: 20px; }
    .role-card .icon { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 16px; }
    .role-card h2 { font-size: 21px; }
    .role-card p { min-height: 0; }
    .bio-lobby main { padding: 30px 14px 50px; }
    .console { padding: 20px 14px 50px; }
    .console-head { gap: 16px; }
    .room-card { width: 100%; justify-content: space-between; padding: 12px 14px; }
    .room-card strong { font-size: 32px; }
    .stats { gap: 8px; margin-top: 16px; }
    .stat { padding: 12px 14px; }
    .stat b { font-size: 24px; }
    .member-list { max-height: none; }
    .panel { padding: 15px; border-radius: 16px; }
    .overlay-head { padding: 18px 16px 14px; flex-direction: column; gap: 12px; }
    .ov-stats { width: 100%; }
    .ov-stat { flex: 1; min-width: 0; padding: 8px 10px; }
    .ov-stat b { font-size: 21px; }
    .ov-list { padding: 12px 14px 20px; grid-template-columns: 1fr; }
    .overlay-foot { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; }
    .overlay-foot .btn-end { width: 100%; }
    .float-action { right: 14px; bottom: calc(92px + 14px); padding: 12px 16px; font-size: 14px; }
    .guess-grid { grid-template-columns: 1fr; }
    .bio-modal { padding: 0; }
    .bio-modal-card { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
    .student-wait { padding: 18px 12px 92px; }
    .member-grid { grid-template-columns: 1fr; }
    .wait-code b { font-size: 26px; }
    .clinic-view { inset: 50px 0 0; }
    .clinic-bar { padding: 7px 10px; }
    .clinic-bar b { font-size: 12px; }
    .clinic-submit { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
    .clinic-submit .hint { display: none; }
    .clinic-submit button { width: 100%; }
    .idea-card { padding: 22px 18px; border-radius: 18px; }
    .id-deck { width: 220px; height: 330px; }
    .id-face.front .cn { font-size: 29px; }
    .id-face.front .mark { width: 70px; height: 70px; font-size: 34px; margin-bottom: 12px; }
    .login-card { padding: 26px 20px 22px; }
}
@media (max-width: 380px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .room-card strong { font-size: 28px; }
    .id-deck { width: 200px; height: 300px; }
    .sync-state { display: none; }
}
