/* 学生主页面：课堂 + 画布仓库抽屉 / 宠物。
   只借 3.0 的布局骨架；数据全部来自 4.0 的 task / scene / practice / versions。 */

/* 底部给抽屉引导带留一条。 */
.学生主体 {
  flex: 1; display: grid; min-height: 0;
  grid-template-columns: 92px minmax(0, 1fr) minmax(340px, 30%);
  background: #e9e4d8;
  /* 抽屉收起时只在屏幕顶部留一条引导带。 */
  padding-top: 1.7rem;
}

/* ── 左轨：两个画布槽 ── */
.控件轨 {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 8px; background: rgba(255,255,255,.55);
  border-right: 1px solid rgba(120,100,70,.18); min-height: 0;
}
.轨标 { font-size: 10px; letter-spacing: .18em; color: #9a8f7c; writing-mode: vertical-rl; }
.槽 {
  position: relative;
  width: 68px; padding: 10px 4px; border: 1px solid rgba(120,100,70,.22);
  border-radius: 12px; background: #fbf9f4; color: #6b6152;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: inherit; font-size: 12px; cursor: pointer;
}
.槽:hover { background: #fff; }
.槽.选 { background: #2f6fed; border-color: #2f6fed; color: #fff; box-shadow: 0 6px 16px rgba(47,111,237,.25); }
.槽图标 { font-size: 17px; line-height: 1; }
/* 某个画布背后的同事正在干活：槽角转圈 */
.槽.忙::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(47,111,237,.22); border-top-color: var(--blue);
  animation: 转圈 .8s linear infinite;
}
.槽.选.忙::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes 转圈 { to { transform: rotate(360deg) } }

/* 宠物位：左侧切换栏底部的停靠位 */
.宠物位 {
  margin-top: auto; width: 68px; min-height: 68px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px dashed rgba(120,100,70,.3); border-radius: 12px;
  background: rgba(255,255,255,.35); color: #9a8f7c;
  font-family: inherit; font-size: 10px; cursor: pointer;
}
.宠物位:hover { border-color: var(--blue); color: var(--blue); }
.宠物位.有宠物 { border-style: solid; border-color: rgba(47,111,237,.5); }
.宠物位图标 { font-size: 16px; line-height: 1; }

/* ── 黑板墙 ── */
.黑板墙 {
  display: flex; flex-direction: column; min-height: 0;
  padding: 14px 18px 10px;
  overflow-y: auto;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.5), transparent 60%),
    repeating-linear-gradient(90deg, rgba(120,100,70,.045) 0 1px, transparent 1px 56px),
    #e9e4d8;
}
/* 黑板、说明、页条同一个宽度，居中挂在墙上。 */
.课堂列 {
  width: 50vw;
  max-width: 100%;
  margin: 0 auto;
  display: flex; flex-direction: column; min-height: 0;
}
.黑板框 {
  flex: 0 0 auto;
  width: 100%;
  height: 68vh;          /* 原 ~80vh，缩 15% */
  max-height: 68vh;
  min-height: 220px;
  display: flex; position: relative; overflow: hidden;
  border: 2px solid #7a5a3c;   /* 只留一道细木线 */
  border-radius: 10px;
  background: #14261e;
  box-shadow:
    0 12px 28px rgba(60,45,30,.22),
    inset 0 0 0 1px rgba(255,255,255,.06),
    inset 0 0 48px rgba(0,0,0,.28);
}
.黑板框 .画布舞台 { flex: 1; margin: 0; border-radius: 0; min-height: 0; }
.黑板框 .画布空态 { color: rgba(232,226,210,.62); }

.黑板墙 .画布说明 { padding: 8px 4px 0; font-size: 12px; color: #7b7060; }
.黑板墙 .画布说明.错 { color: #a33; }
.黑板墙 .步骤区 { padding: 6px 4px 0; }
.黑板墙 .控件区 { padding: 6px 4px 4px; max-height: 120px; }

/* ── 画布页托盘 ── */
.页条 { margin-top: 8px; padding: 4px 4px 0; }
.页条头 { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.页条题 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.页条标 { font-size: 10px; letter-spacing: .14em; color: #9a8f7c; flex: none; }
.页条数 {
  flex: none; padding: 1px 7px; border-radius: 999px;
  background: rgba(120,100,70,.1); color: #8b806d; font-size: 10px;
}
.页条态 {
  flex: none; border: 1px solid rgba(47,111,237,.35); border-radius: 999px;
  background: #eef3ff; color: #2f6fed; font: inherit; font-size: 10px;
  padding: 2px 8px; cursor: pointer;
}
.页条态:hover { background: #2f6fed; color: #fff; }
.页条态[hidden] { display: none; }
.更新中 { color: #b07a26; font-size: 10.5px; }
.页条动 { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.收藏提示 { font-size: 10.5px; color: #2f8f5b; white-space: nowrap; }
.收藏提示[hidden] { display: none; }
.页钮 {
  border: 1px solid rgba(120,100,70,.28); border-radius: 7px;
  background: #fbf9f4; color: #6b6152; font: inherit; font-size: 11px;
  padding: 4px 10px; cursor: pointer; white-space: nowrap;
}
.页钮:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); background: #fff; }
.页钮.主 { border-color: rgba(47,111,237,.45); background: #eef3ff; color: #2f6fed; }
.页钮.主:hover:not(:disabled) { background: #2f6fed; color: #fff; }
.页钮:disabled { opacity: .4; cursor: default; }

.页轨 {
  display: flex; align-items: stretch; gap: 8px;
  overflow-x: auto; overflow-y: hidden; padding: 6px 0 2px;
  scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain;
}
.页轨::-webkit-scrollbar { display: none; }
.页卡 {
  position: relative; flex: 0 0 auto; width: 118px;
  border: 1px solid rgba(120,100,70,.22); border-radius: 9px;
  background: #fbf9f4; padding: 4px; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.页卡:hover { border-color: #b9a98c; background: #fff; }
.页卡.选 { border-color: #2f6fed; background: #eef3ff; box-shadow: 0 0 0 1px rgba(47,111,237,.35); }
.页卡.拖 { opacity: .45; }
.页缩 {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 5px; overflow: hidden; background: #14261e;
}
.页缩 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.页缩.空 {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1c3b30, #10231c);
  color: #9fbfae; font-size: 9px; letter-spacing: .1em;
}
.页卡脚 { display: flex; align-items: center; gap: 4px; padding: 4px 2px 0; }
.页名 {
  flex: 1; min-width: 0; font-size: 10.5px; color: #5f574a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.页卡.选 .页名 { color: #2f6fed; }
.页徽 {
  flex: none; padding: 0 4px; border-radius: 999px;
  background: rgba(47,143,91,.12); color: #2f8f5b; font-size: 9px;
}
.页删 {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: rgba(20,24,35,.55);
  color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.页卡:hover .页删 { opacity: 1; }
.页删:hover { background: #b33; }
@media (hover: none) {
  .页删 { opacity: .8; }
}
.页柄 {
  flex: none; width: 16px; height: 16px; display: grid; place-items: center;
  color: #b3a892; font-size: 12px; cursor: grab; user-select: none; touch-action: none;
}
.页柄:active { cursor: grabbing; }

/* 聊天室：占满中间黑板，展示后台群聊；下面的说明/页条在聊天室态收起 */
.黑板墙.聊天室 .画布说明,
.黑板墙.聊天室 .步骤区,
.黑板墙.聊天室 .控件区,
.黑板墙.聊天室 .页条 { display: none; }

.聊天室页 {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; min-height: 0;
  background: #0f1a14; color: #e8e2d6;
}
.聊天室页[hidden] { display: none; }
.聊天室头 {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.聊天室题 { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.聊天室数 { font-size: 11px; color: #9db3a4; }
.聊天室注 { font-size: 11px; color: #7f9488; }
.聊天室灯 {
  width: 6px; height: 6px; border-radius: 50%; background: #2f9e63;
  margin-left: auto; box-shadow: 0 0 8px #2f9e63;
}
.聊天室成员 {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 11px; color: #9db3a4; flex-shrink: 0;
}
.聊天室成员 b { color: #e8e2d6; font-weight: 500; }
.聊天室流 { flex: 1; overflow-y: auto; padding: 12px 16px 20px; }
.聊天室条 { margin: 0 0 9px; font-size: 12.5px; line-height: 1.65; }
.聊天室条 .谁 { font-size: 11px; color: #9db3a4; margin-bottom: 2px; }
.聊天室条 .说 { white-space: pre-wrap; word-break: break-word; }
.聊天室条.肥鱼 .谁 { color: #a99cff; }
.聊天室条.绘图 .谁 { color: #7dd3a0; }
.聊天室条.出题 .谁 { color: #f0b45a; }
.聊天室条.学生 .谁 { color: #7fb5ff; }
.聊天室条.访客 .谁 { color: #d9a7ff; }
.聊天室条.系统 { text-align: center; color: #7f9488; font-size: 11px; }
.聊天室条.系统 .谁 { display: none; }
.聊天室条.系统 .说 {
  display: inline-block; background: rgba(255,255,255,.04);
  border-radius: 999px; padding: 2px 10px;
}
.聊天室空 { color: #7f9488; text-align: center; margin-top: 40px; font-size: 13px; }

/* ── 右对话 ── */
.对话区 {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-left: 1px solid rgba(120,100,70,.16);
}
.对话头 {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.对话头 .鱼 {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c5cff, #2f6fed); font-size: 15px;
}
.对话头 b { font-size: 13px; }
.对话头 .提示 { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.对话区 .会话内容 { flex: 1 1 auto; min-height: 0; padding: 16px 0 18px; }
.对话区 .会话内 { max-width: none; padding: 0 18px; }
.对话区 .空态 { margin-top: 30px; }
.对话区 .条 { margin-bottom: 12px; }
.对话区 .泡 { font-size: 13.5px; }
.对话区 .输入区 { padding: 10px 14px 14px; }
.对话区 .输入行 { max-width: none; }

/* ── 过夜遮罩：课堂默认不可用，学生可以继续或新开 ── */
.过夜遮罩 {
  position: fixed; inset: 0; z-index: 8;
  display: grid; place-items: center; padding: 2rem;
  background: rgba(246,242,233,.9);
}
.过夜遮罩[hidden] { display: none; }
.过夜卡 {
  width: min(28rem, 100%); padding: 2rem;
  background: #fff; border: 1px solid #ddd3c2; border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(60,45,30,.16); text-align: center;
}
.过夜签 { margin: 0 0 .4rem; font-size: .7rem; letter-spacing: .2em; color: #a39884; }
.过夜卡 h2 { margin: 0 0 .6rem; font-size: 1.35rem; font-weight: 650; }
.过夜卡 p { margin: 0; font-size: .85rem; line-height: 1.75; color: #7b7060; }
.过夜动 { display: flex; justify-content: center; gap: .6rem; margin-top: 1.2rem; }

/* ── 画布仓库（全屏抽屉：从上面推出来，底部只留引导带）── */
.抽屉 {
  --拉手高: 1.7rem;
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  background: #f6f2e9;
  transform: translateY(calc(-100% + var(--拉手高)));
  transition: transform .34s cubic-bezier(.22,.8,.24,1);
}
.抽屉.开 { transform: translateY(0); }

/* 抽屉壳：关闭 / 首页 / 子页面 */
.抽屉收起 {
  position: absolute; top: 1.7rem; right: 2.4rem; z-index: 6;
  display: inline-flex; align-items: center; height: 2.15rem;
  padding: 0 .85rem; border: 1px solid #ddd3c2; border-radius: .7rem;
  background: rgba(255,255,255,.9); color: #6b6152; font: inherit; font-size: .78rem;
  cursor: pointer;
}
.抽屉收起:hover { border-color: var(--blue); color: var(--blue); }

.抽屉首页, .抽屉页 { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.抽屉首页[hidden], .抽屉页[hidden] { display: none; }
.抽屉页:not([hidden]) { animation: 页进 .22s ease-out; }
@keyframes 页进 {
  from { opacity: .35; transform: translateX(1.4rem); }
  to { opacity: 1; transform: none; }
}

.首页头, .页头 {
  flex: none; border-bottom: 1px solid #e2d9c8;
  background: rgba(246,242,233,.94);
}
.页头 { padding: 2.2rem 3rem 1.1rem; padding-right: 9.5rem; }
.首页头 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; padding: 1.05rem 2.6rem .75rem; padding-right: 9.5rem;
}
.首页题, .页题 { min-width: 0; }
.抽屉签 { margin: 0 0 .15rem; font-size: .68rem; letter-spacing: .2em; color: #a39884; }
.抽屉大标 { margin: 0; font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
.抽屉副 { margin: .3rem 0 0; font-size: .78rem; color: #8d8270; }
.抽屉工具 { flex: none; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.抽屉工作间 {
  flex: none; display: inline-flex; align-items: center; height: 2.15rem;
  padding: 0 .8rem; border: 1px solid #ddd3c2; border-radius: .7rem;
  background: #fff; color: #6b6152; font: inherit; font-size: .78rem;
  text-decoration: none; cursor: pointer;
}
.抽屉工作间:hover { border-color: var(--blue); color: var(--blue); }

.仓库数 {
  display: inline-block; padding: .05rem .5rem;
  border-radius: 999px; background: #e9e1d2; color: #7d7261;
  font-size: .72rem; font-weight: 500; vertical-align: .1em;
}

.首页身, .页身 { flex: 1; min-height: 0; overflow-y: auto; padding: 1.6rem 3rem 3rem; }
.首页身 { display: flex; flex-direction: column; }

/* 首页模块：2 列，行数自动增长；仓库占左上，后面依次排 */
.抽屉模块区 {
  flex: 1; min-height: 33rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(12rem, auto);
  gap: 1.2rem; align-items: start; align-content: start;
}
.抽屉块 {
  min-width: 0; align-self: start;
  background: rgba(255,255,255,.55); border: 1px solid #e2d9c8;
  border-radius: 1rem; padding: 1.05rem 1.15rem 1.15rem;
}
.块头 { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.块题 h3 { display: flex; align-items: baseline; gap: .5rem; margin: 0; font-size: 1.05rem; font-weight: 650; }
.块题 p { margin: .2rem 0 0; font-size: .75rem; color: #a39884; }
.块更多 {
  flex: none; display: inline-flex; align-items: center; height: 2rem; padding: 0 .75rem;
  border: 1px solid #ddd3c2; border-radius: .6rem; background: #fff;
  color: #6b6152; font: inherit; font-size: .75rem; cursor: pointer; text-decoration: none;
}
.块更多:hover { border-color: var(--blue); color: var(--blue); }
.块更多[hidden] { display: none; }

/* 课堂管理 */
.课堂现状 { margin: 0 0 .45rem; font-size: .84rem; font-weight: 600; color: #5f574a; }
.课堂列表 {
  display: flex; flex-direction: column; gap: .35rem;
  max-height: 7.5rem; overflow-y: auto; margin: 0 0 .55rem;
}
.课堂行 {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  padding: .4rem .55rem; border: 1px solid #ddd3c2; border-radius: .55rem;
  background: #fff; font: inherit; font-size: .78rem; color: #5f574a;
  text-align: left; cursor: pointer;
}
.课堂行:hover { border-color: var(--blue); color: var(--blue); }
.课堂行.在 { border-color: var(--blue); background: #eef3ff; }
.课堂名 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.课堂态 { flex: none; font-size: .68rem; color: #a39884; }
.课堂新 { display: flex; flex-direction: column; gap: .5rem; }
.新课堂表[hidden] { display: none; }
.新课堂表.紧凑 { margin-top: .1rem; padding-top: .55rem; border-top: 1px solid #e2d9c8; }
.新课堂表.紧凑 textarea { min-height: 2.2rem; }

/* 今日简报 / 新建课堂 / 系统对话 */
.简报文 {
  margin: 0; min-height: 4.6em; font-size: .85rem; line-height: 1.75; color: #5f574a;
  white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.简报去 { margin-top: .8rem; }
.新课堂表 { display: flex; flex-direction: column; gap: .45rem; }
.新课堂表 textarea, .新课堂表 input {
  width: 100%; padding: .5rem .6rem; border: 1px solid #ddd3c2; border-radius: .6rem;
  font: inherit; font-size: .8rem; background: #fff; color: var(--text); outline: none;
  resize: vertical;
}
.新课堂表 textarea:focus, .新课堂表 input:focus { border-color: var(--blue); }
.新课堂开 { align-self: flex-end; }
.系统说明 { margin: 0 0 .8rem; font-size: .82rem; line-height: 1.7; color: #7b7060; }
.系统身 { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }
.系统流 { flex: 1; min-height: 12rem; overflow-y: auto; padding: .4rem .2rem; }
.系统条 {
  max-width: 80%; margin: 0 0 .7rem; padding: .6rem .8rem;
  border-radius: .8rem; font-size: .85rem; line-height: 1.65; white-space: pre-wrap;
}
.系统条.用户 { margin-left: auto; background: var(--blue); color: #fff; }
.系统条.助手 { background: #fff; border: 1px solid #ddd3c2; color: #5f574a; }
.系统输入行 {
  display: flex; gap: .5rem; padding-top: .6rem; border-top: 1px solid #e2d9c8;
}
.系统输入行 input {
  flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid #ddd3c2; border-radius: .6rem;
  font: inherit; font-size: .85rem; background: #fff; color: var(--text); outline: none;
}
.系统输入行 input:focus { border-color: var(--blue); }
.系统输入行 button {
  flex: none; padding: 0 1rem; border: 1px solid var(--blue); border-radius: .6rem;
  background: var(--blue); color: #fff; font: inherit; font-size: .82rem; cursor: pointer;
}
.系统输入行 button:disabled { opacity: .45; cursor: default; }

/* 首页卡片展览只占左下一半，露两张小卡 */
.模块卡片 { max-width: 50%; }
.仓库预览 { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start; }
.仓库预览卡 {
  position: relative; flex: 0 0 6.8rem; width: 6.8rem;
  padding: 0; background: #fff; border: 1px solid #ddd3c2; border-radius: .7rem;
  overflow: hidden; cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.仓库预览卡:hover {
  transform: translateY(-2px); border-color: #c9bda8;
  box-shadow: 0 8px 18px rgba(60,45,20,.10);
}
.预览图 { display: block; width: 100%; aspect-ratio: 16 / 10; background: #0d1624; overflow: hidden; position: relative; }
.预览图 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.预览图.空 {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #14243c, #0b1422 55%, #182c48);
}
.预览空 {
  width: 100%; margin: 0; padding: 1.1rem 1rem; text-align: center;
  border: 1px dashed #d8cdba; border-radius: .7rem; color: #a39884; font-size: .8rem;
}

/* 仓库子页面 */
.页头 { display: flex; align-items: center; gap: 1rem; }
.页返 {
  flex: none; height: 2.15rem; padding: 0 .8rem;
  border: 1px solid #ddd3c2; border-radius: .7rem; background: #fff;
  color: #6b6152; font: inherit; font-size: .78rem; cursor: pointer;
}
.页返:hover { border-color: var(--blue); color: var(--blue); }
.页题 h2 { display: flex; align-items: baseline; gap: .5rem; margin: 0; font-size: 1.3rem; font-weight: 650; }
.页题 p { margin: .2rem 0 0; font-size: .75rem; color: #a39884; }
.仓库搜 {
  display: flex; align-items: center; gap: .35rem; margin-left: auto;
  background: #fff; border: 1px solid #ddd3c2; border-radius: .7rem;
  padding: .38rem .6rem; transition: border-color .15s;
}
.仓库搜:focus-within { border-color: var(--blue); }
.仓库搜镜 { font-size: .85rem; color: #a39884; }
.仓库搜 input {
  width: 13rem; border: 0; outline: none; background: transparent;
  font: inherit; font-size: .82rem; color: var(--text);
}
.仓库格 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem; align-content: start;
}
.仓库卡 {
  position: relative; min-width: 0; max-width: 23rem;
  background: #fff; border: 1px solid #ddd3c2; border-radius: .9rem;
  overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 0 rgba(80,60,30,.03);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.仓库卡:hover {
  transform: translateY(-2px); border-color: #c9bda8;
  box-shadow: 0 10px 24px rgba(60,45,20,.10);
}
.仓库图 {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  background: #0d1624; overflow: hidden; position: relative;
}
.仓库图 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.仓库图.空 {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #14243c, #0b1422 55%, #182c48);
}
.仓库占 {
  font-size: .72rem; letter-spacing: .12em; color: #7f95bb;
  border: 1px solid rgba(127,149,187,.4); border-radius: 999px; padding: .25rem .7rem;
}
.仓库删 {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(20,24,35,.62); color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity .15s;
}
.仓库预览卡:hover .仓库删, .仓库卡:hover .仓库删 { opacity: 1; }
.仓库删:hover { background: #b33; }
.仓库下 {
  position: absolute; left: 4px; bottom: 4px; z-index: 2;
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.9); color: #6b6152;
  font-size: 13px; text-decoration: none; opacity: 0; transition: opacity .15s;
}
.仓库卡:hover .仓库下 { opacity: 1; }
.仓库下:hover { background: #2f6fed; color: #fff; }
@media (hover: none) {
  .仓库删 { opacity: .8; }
  .仓库下 { opacity: .85; }
}
.仓库空 { margin: 2rem 0; text-align: center; font-size: .88rem; color: #a39884; }
.仓库空态 { display: flex; flex-direction: column; align-items: center; padding: 4.5rem 0 3rem; text-align: center; }
.仓库空帧 { width: 5.6rem; height: 4.2rem; position: relative; margin-bottom: 1.2rem; }
.仓库空帧 span {
  position: absolute; inset: 0; border: 2px solid #d8cdba; border-radius: .6rem; background: #fff;
}
.仓库空帧 span:nth-child(1) { transform: rotate(-7deg) translate(-.5rem, .2rem); opacity: .6; }
.仓库空帧 span:nth-child(2) { transform: rotate(4deg) translate(.4rem, -.1rem); opacity: .8; }
.仓库空帧 span:nth-child(3) { border-color: #c7baa4; }
.仓库空题 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 600; color: #6b6152; }
.仓库空说 { margin: 0; font-size: .82rem; color: #a39884; }
.仓库补图框 {
  position: fixed; left: 0; bottom: 0; width: 640px; height: 400px;
  border: 0; opacity: .01; pointer-events: none; z-index: 1;
}

/* 引导带 */
.拉手 {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--拉手高);
  display: grid; place-items: center; padding: 0;
  background: transparent; border: 0; cursor: pointer;
}
.拉手角 {
  width: .58rem; height: .58rem;
  border-right: 2px solid #a39884; border-bottom: 2px solid #a39884;
  transform: rotate(45deg); margin-top: -.28rem;
  opacity: .55; transition: transform .2s, margin .2s, opacity .15s;
}
.拉手:hover .拉手角 { opacity: .95; }
.抽屉.开 .拉手角 { transform: rotate(-135deg); margin-top: .28rem; }

/* ── 肥鱼（3.0 的宠物；素材来自 dsh-pet，许可见 /pet/LICENSE-dsh-pet.txt）── */
.宠物 {
  position: fixed; z-index: 30;
  transform: translate(-50%, -50%);
  width: min(20rem, 24vw); aspect-ratio: 16 / 9; height: auto;
  cursor: grab; user-select: none; -webkit-user-drag: none;
  touch-action: none; outline: none;
  transition: filter .25s, opacity .25s;
}
.宠物.on { filter: drop-shadow(0 0 14px rgba(47,111,237,.45)); }
.宠物.dragging { cursor: grabbing; }
/* 停进左侧切换栏：缩小到轨道宽，不再挡黑板 */
.宠物.在轨 {
  width: 76px;
  cursor: grab;
  filter: drop-shadow(0 4px 10px rgba(20,24,35,.18));
}
.宠物鱼 {
  width: 100%; height: 100%; object-fit: contain; pointer-events: none;
  display: block;
}
.宠物.sleeping { opacity: .62; }
.宠物.error { opacity: .5; }
.宠物.waiting { animation: 摆 2.6s ease-in-out infinite; }
.宠物.thinking .宠物鱼 { filter: saturate(1.06); }
@keyframes 摆 {
  0%, 100% { transform: translate(-50%, -50%) }
  50% { transform: translate(calc(-50% + .3rem), -50%) }
}

/* 画图 / 出题进行中：宠物旁边的小转圈 + 字 */
.宠物忙 {
  position: absolute; top: -8px; right: -10px; z-index: 2;
  display: flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 5px; border-radius: 999px;
  background: rgba(15,26,20,.88); color: #e8e2d6;
  font-size: 10px; line-height: 1.5; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(20,24,35,.2);
  pointer-events: none;
}
.宠物忙[hidden] { display: none; }
.宠物忙环 {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #7dd3a0;
  animation: 转圈 .8s linear infinite;
}

.宠物气泡 {
  position: absolute; right: calc(100% + .6rem); top: 50%;
  transform: translateY(-50%); margin: 0;
  width: max-content; max-width: 15rem;
  padding: .5rem .75rem; border-radius: .9rem;
  background: var(--panel); color: var(--text);
  font-size: .82rem; line-height: 1.7;
  box-shadow: 0 6px 20px rgba(20,24,35,.16);
  pointer-events: none; white-space: pre-wrap; overflow-wrap: anywhere;
  animation: 冒 .22s ease-out;
}
.宠物气泡[hidden] { display: none; }
.宠物气泡.left { right: auto; left: calc(100% + .6rem); }
@keyframes 冒 {
  from { opacity: 0; transform: translateY(-50%) scale(.92) }
  to { opacity: 1; transform: translateY(-50%) scale(1) }
}

@media (max-width: 1080px) {
  .学生主体 { grid-template-columns: 80px minmax(0, 1fr) minmax(320px, 30%); }
  .槽 { width: 58px; font-size: 11px; }
  .页头 { padding: 1.8rem 1.8rem 1rem; padding-right: 8rem; }
  .首页头 { padding: 1rem 1.8rem .7rem; padding-right: 8rem; }
  .首页身, .页身 { padding: 1.2rem 1.8rem 2.4rem; }
  .抽屉收起 { top: 1.4rem; right: 1.8rem; }
}
@media (max-width: 820px) {
  .学生主体 {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(300px, 52vh) minmax(320px, 1fr);
    overflow-y: auto;
  }
  .控件轨 {
    flex-direction: row; justify-content: center; padding: 8px;
    border-right: 0; border-bottom: 1px solid rgba(120,100,70,.18);
  }
  .轨标 { writing-mode: horizontal-tb; }
  .槽 { flex-direction: row; width: auto; padding: 7px 14px; }
  .黑板墙 { padding: 10px 12px 6px; }
  .课堂列 { width: 100%; flex: 1 1 auto; }
  .黑板框 { height: auto; max-height: none; flex: 1 1 auto; }
  .对话区 { border-left: 0; border-top: 1px solid rgba(120,100,70,.16); }
  .对话区 .会话内容 { min-height: 220px; }
  .抽屉收起 { top: 1rem; right: 1rem; }
  .首页头 { flex-direction: column; align-items: stretch; gap: .6rem; padding: 1rem 1.2rem .8rem; padding-right: 5.4rem; }
  .首页头 .抽屉工作间 { align-self: flex-start; }
  .页头 { flex-wrap: wrap; align-items: center; padding: 1.3rem 1.2rem 1rem; padding-right: 5.4rem; }
  .仓库搜 { width: 100%; margin-left: 0; order: 3; }
  .仓库搜 input { width: 100%; }
  .首页身, .页身 { padding: 1rem 1.2rem 2rem; }
  .抽屉模块区 { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .抽屉块 { align-self: stretch; }
  .页条头 { flex-wrap: wrap; }
  .页条题 { width: 100%; }
  .页条动 { margin-left: 0; width: 100%; justify-content: flex-end; }
  .仓库格 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; }
  .仓库预览 { gap: .8rem; }
  .宠物 { width: min(16rem, 40vw); }
}
