/* ★ 2026-09-18f（叶谭截图才发现「上传 / 更换资料按钮不见了」）：
   底部 sheet 是 appendChild 到 body 的，**不在 .location-study-page 里面** →
   原来 --ls-accent 只定义在 .location-study-page 上，sheet 里的 .study-chip.primary
   取不到变量 → background 失效 + color:#fff → **白字白底彻底隐形**（探针查不出，得用眼睛看）。
   提到 :root 让全页（含 body 下的 sheet）都取得到。 */
:root { --ls-accent: var(--monet-blue, #8FAFBF); }

.location-study-page {
  --ls-accent: var(--monet-blue, #6f91a4);
  /* ★ 2026-09-25 兜底（用户反馈「点开自习室能看见透明背景 / 直接看到下面的页面」）：
     color-mix() 要 Chrome 111+ 才有。老 WebView 不认这个函数 → **整条声明在解析期就被丢掉**，
     于是这一页拿不到自己的背景，直接透出下层页面。
     写法是渐进增强：先给一条不依赖 color-mix 的实色，再用 color-mix 覆盖 ——
     支持的浏览器用后者，不支持的用前者，任何情况下都不会是透明的。
     ⚠️ 这文件里另外 18 处 color-mix 全是装饰（光斑/圆环/阴影），失效只是少个装饰，不影响可读性，不用改。 */
  background: var(--surface-page, #EEF4F6);
  background: color-mix(in srgb, var(--surface-bg, #f7f7f5) 92%, var(--ls-accent) 8%);
}

.location-nav-action {
  width: auto;
  min-width: 48px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--ls-accent);
}

.location-app-content,
.study-app-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ls-loading,
.ls-empty {
  min-height: 220px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--ink-subtle);
}

.ls-empty-icon { font-size: 34px; }
.ls-empty strong { color: var(--ink); font-size: 16px; }
.ls-empty p { max-width: 270px; margin: 0; font-size: 12px; line-height: 1.7; }

.ls-contact-list {
  height: 100%;
  overflow-y: auto;
  padding: 12px;
}

.ls-contact-intro {
  padding: 10px 6px 14px;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.6;
}

.ls-contact {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  background: var(--surface-card);
  text-align: left;
  cursor: pointer;
}

.ls-contact:first-of-type { border-radius: 16px 16px 0 0; }
.ls-contact:last-child { border-bottom: 0; border-radius: 0 0 16px 16px; }
.ls-contact:only-of-type { border-radius: 16px; }
.ls-contact:active { background: var(--surface-input); transform: scale(.99); }
.ls-contact-avatar,
.study-teacher-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ls-accent);
  background: color-mix(in srgb, var(--ls-accent) 13%, var(--surface-card));
  font-weight: 650;
}
.ls-contact-avatar img,
.study-teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ls-contact-copy { flex: 1; min-width: 0; }
.ls-contact-name { font-size: 14px; font-weight: 600; }
.ls-contact-meta { margin-top: 3px; overflow: hidden; color: var(--ink-subtle); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ls-contact-arrow { color: var(--ink-subtle); }

.location-shell {
  height: 100%;
  overflow-y: auto;
  padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
}

.location-summary {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.location-summary-copy { flex: 1; min-width: 0; }
.location-summary-name { color: var(--ink); font-size: 15px; font-weight: 650; }
.location-summary-status { margin-top: 3px; color: var(--ink-subtle); font-size: 11px; }
.location-distance {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ls-accent);
  background: color-mix(in srgb, var(--ls-accent) 12%, var(--surface-card));
  font-size: 12px;
  font-weight: 650;
}

.location-map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ls-accent) 18%, var(--border-light));
  border-radius: 20px;
  background: #eef1ea;
  box-shadow: 0 12px 30px rgba(44, 59, 67, .08);
}
.location-map-card svg { width: 100%; max-height: 53vh; display: block; }
.location-map-card.is-selecting { outline: 2px solid color-mix(in srgb, var(--ls-accent) 60%, transparent); outline-offset: 2px; }
.location-map-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  padding: 7px 11px;
  border-radius: 999px;
  color: #304651;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(38,54,62,.13);
  font-size: 11px;
  white-space: nowrap;
}
.location-detail-card {
  margin-top: 10px;
  padding: 13px;
  border-radius: 16px;
  background: var(--surface-card);
}
.location-line { display: flex; align-items: center; gap: 9px; min-height: 34px; color: var(--ink); font-size: 13px; }
.location-line + .location-line { border-top: 1px solid var(--border-light); }
.location-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #4d9bd8; }
.location-dot.friend { background: #e8738a; }
.location-line-text { flex: 1; min-width: 0; }
.location-line-sub { color: var(--ink-subtle); font-size: 11px; }
.location-actions { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.location-action {
  min-height: 42px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface-card);
  font-size: 13px;
  cursor: pointer;
}
.location-action.primary { border-color: transparent; color: white; background: var(--ls-accent); }
.location-action:disabled { opacity: .55; cursor: wait; }
.location-action:active:not(:disabled) { transform: scale(.98); }
.location-note {
  margin-top: 10px;
  padding: 0 3px;
  color: var(--ink-subtle);
  font-size: 11px;
  line-height: 1.7;
}
.location-action.wide { grid-column: 1 / -1; }

.location-name-form { margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--surface-card); }
.location-name-form label { display: block; margin-bottom: 7px; color: var(--ink-subtle); font-size: 11px; }
.location-name-row { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════════════════════════
   自习室 · 2026-09-18 V2（设计稿：自习室UI优化方案_20260918.md）
   层级：陪学角色行 → 学习上下文行 → 专注卡（唯一视觉中心）→ 陪学对话 → 输入区
   常驻文字按钮只剩：顶栏「计划」、主按钮、输入区「发送」。
   新增挂件（资料 / 章节 / 快捷提问 / 完成本节）一律进底部面板，不占页面高度。
   ══════════════════════════════════════════════════════════════════ */

.study-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.study-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 12px 18px;
  -webkit-overflow-scrolling: touch;
}
.study-chip {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-card);
  font-size: 11px;
  cursor: pointer;
}
.study-chip:active { transform: scale(.97); }
.study-chip.primary { border-color: transparent; color: #fff; background: var(--ls-accent, #8FAFBF); }
.study-chip.danger { color: var(--monet-red, #e74c3c); }
.study-chip:disabled { opacity: .55; cursor: default; }
.study-chev { flex: 0 0 auto; color: var(--ink-subtle); font-size: 18px; line-height: 1; }

/* ── 陪学角色行（整行可点 → 换角色；原来顶栏那个「换老师」收在这里）── */
.study-presence {
  width: 100%;
  padding: 10px 4px 13px;
  border: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.study-presence:active { transform: scale(.99); }
.study-presence-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ls-accent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ls-accent) 24%, transparent);
  font-size: 15px;
  font-weight: 650;
}
.study-presence-avatar img { width: 100%; height: 100%; object-fit: cover; }
.study-presence-copy { flex: 1; min-width: 0; }
.study-presence-name { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }
.study-presence-sub { display: block; margin-top: 4px; color: var(--ink-light); font-size: 11px; }

/* ── 学习上下文行（资料 + 当前章节 + 完成数，只出现这一次）── */
.study-context {
  width: 100%;
  min-height: 54px;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  color: inherit;
  background: color-mix(in srgb, var(--surface-card) 80%, transparent);
  box-shadow: 0 2px 10px rgba(100, 120, 135, .045);
  text-align: left;
  cursor: pointer;
}
.study-context:active { transform: scale(.99); }
.study-context-main { min-width: 0; }
.study-context-label { display: block; color: var(--ink-light); font-size: 10px; letter-spacing: .5px; }
.study-context-title {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-context-count {
  flex: 0 0 auto;
  color: var(--monet-deepwater, var(--ls-accent));
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
/* 进度线：打勾就长一截（★ 2026-09-18b 叶谭要的「进度逐渐显示出来」） */
.study-context-bar {
  display: block;
  margin-top: 7px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ls-accent) 14%, var(--surface-card));
}
.study-context-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ls-accent);
  transition: width .3s ease;
}

/* ── 专注卡：全页唯一视觉中心，只有 目标 / 时钟 / 一个实底主按钮 ── */
.study-focus-card {
  position: relative;
  margin-top: 10px;
  padding: 20px 18px 17px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ls-accent) 13%, var(--border-light));
  border-radius: 22px;
  background: var(--surface-card);
  box-shadow: 0 5px 18px rgba(100, 120, 135, .07);
  text-align: center;
}
.study-focus-card:before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  left: -108px;
  top: -126px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--monet-paleblue, #D6E2EA) 45%, transparent);
  pointer-events: none;
}
.study-focus-goal {
  position: relative;
  margin: 0 auto;
  color: var(--ink-light);
  font-size: 12px;
  line-height: 1.6;
}
.study-focus-goal strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 15px; font-weight: 600; }

.study-clock {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 14px auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ls-accent) 28%, var(--border-light));
  border-radius: 50%;
  background: linear-gradient(145deg, var(--monet-ice, #E8EFF4), color-mix(in srgb, var(--monet-ice, #E8EFF4) 70%, var(--surface-card)));
  box-shadow: inset 0 0 0 10px color-mix(in srgb, var(--surface-card) 62%, transparent);
}
.study-clock:after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid color-mix(in srgb, var(--ls-accent) 14%, var(--border-light));
  border-radius: 50%;
}
.study-clock-time { color: var(--ink); font-size: 35px; font-weight: 300; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.study-clock-caption { margin-top: 5px; color: var(--ink-light); font-size: 10px; }

/* 专注中 / 暂停：圆环走 conic-gradient，角度由 JS 每秒写进 --study-ring（不重渲染整页） */
.study-focus-card.is-running .study-clock,
.study-focus-card.is-paused .study-clock {
  background: conic-gradient(
    var(--ls-accent) 0 var(--study-ring, 0deg),
    color-mix(in srgb, var(--ls-accent) 14%, var(--surface-card)) var(--study-ring, 0deg) 360deg
  );
  border-color: transparent;
}
.study-focus-card.is-running .study-clock:before,
.study-focus-card.is-paused .study-clock:before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface-card), color-mix(in srgb, var(--ls-accent) 6%, var(--surface-card)));
}
.study-focus-card.is-running .study-clock-copy,
.study-focus-card.is-paused .study-clock-copy { position: relative; z-index: 1; }

.study-primary {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--ls-accent);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--ls-accent) 26%, transparent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.study-primary:active { transform: scale(.985); }
.study-focus-note { position: relative; margin-top: 9px; color: var(--ink-subtle); font-size: 10px; }
/* ★ 2026-09-19 「结束这一轮」——低强调文字入口（不做同级主按钮，避免误点；守方案 §4 的意图） */
.study-end-link {
  margin: 12px auto 0;
  display: block;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-subtle);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.study-end-link:active { color: var(--monet-red, #e74c3c); }

/* ── 陪学对话 ── */
.study-conversation { padding: 18px 1px 0; }
.study-section-title { margin: 0 0 12px 3px; color: var(--ink); font-size: 13px; font-weight: 600; }
.study-message-list { min-height: 40px; }
.study-msg { margin: 10px 0; display: flex; align-items: flex-start; gap: 8px; }
.study-msg-user { justify-content: flex-end; }
.study-avatar { width: 30px; height: 30px; flex: 0 0 30px; overflow: hidden; border-radius: 10px; display: grid; place-items: center; color: var(--ls-accent); background: var(--surface-card); font-size: 11px; }
.study-msg-name { margin: 0 0 3px 2px; color: var(--ink-subtle); font-size: 10px; }
/* ★ 2026-09-18f（叶谭：「角色条数长短都不一样，莫名其妙就分行了」）：
   原来 max-width:78% 是相对「被内容撑开的父 div」算的 → 循环依赖 → 气泡永远被压到
   78% 的 78%…（实测 12 个字的气泡只有 130px、被迫换成两行，每条都"一行半"）。
   修法学主聊天：父 div 给明确宽度（flex:1 + min-width:0），气泡收缩到内容宽、上限按父算。 */
.study-msg-char > div { flex: 1; min-width: 0; }
.study-bubble { display: block; width: fit-content; max-width: 100%; padding: 9px 11px; border-radius: 5px 14px 14px 14px; color: var(--ink); background: var(--surface-card); font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; box-shadow: 0 3px 12px rgba(51, 72, 84, .045); }
.study-msg-user .study-bubble { max-width: 78%; border-radius: 14px 5px 14px 14px; color: #fff; background: var(--ls-accent); }
.study-quiet { padding: 22px 8px 12px; color: var(--ink-light); text-align: center; font-size: 12px; line-height: 1.8; }
.study-typing-dots span { display: inline-block; animation: study-dot 1.1s infinite ease-in-out; }
.study-typing-dots span:nth-child(2) { animation-delay: .15s; }
.study-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes study-dot { 0%,60%,100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-3px); opacity: 1; } }

/* ── 输入区（＋ 工具 / 输入框 / 发送）── */
.study-compose {
  flex: 0 0 auto;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 7px;
  border-top: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--surface-card) 92%, transparent);
}
/* ★ 2026-09-18c（叶谭）：「底部输入框大小好奇怪，都不是统一高度」——
   实测原来是 ＋38 / 输入框 70 / 发送 44。70 是 phone.css 的 `textarea.form-input{min-height:70px}` 顶的，
   同特异性（0,1,1）比不过它，得写 `textarea.form-input` 这种 (0,2,1) 才压得住。三个统一 42。 */
.study-tool-trigger {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 12px;
  color: var(--monet-deepwater, var(--ls-accent));
  background: var(--monet-ice, #E8EFF4);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.study-tool-trigger:active { transform: scale(.96); }
.study-compose textarea.form-input {
  flex: 1 1 auto; min-width: 0;
  height: 42px; min-height: 42px; max-height: 90px;
  padding: 9px 13px; line-height: 1.4; border-radius: 12px;
  resize: none;
}
/* ⚠️ .form-btn 全局是 width:100%，在 flex 行里会把输入框挤成「有问…」——
   必须提权收回宽度（同特异性的单类选择器会输给 phone.css 的 .form-btn） */
.study-compose .study-send { width: auto; flex: 0 0 auto; min-width: 58px; height: 42px; min-height: 42px; padding: 0 14px; line-height: 42px; }

/* 矮屏（650px 上下）：先把计时环收小，保证输入区和主按钮都在 */
@media (max-height: 720px) {
  .study-clock { width: 124px; height: 124px; margin: 10px auto 12px; }
  .study-clock-time { font-size: 31px; }
  .study-focus-card { padding-top: 15px; }
  .study-conversation { padding-top: 12px; }
}

/* ── 底部 sheet（项目里原来没有这个组件，为资料 / 计划 / 开始专注新增）── */
.study-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  background: rgba(18, 28, 34, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.study-sheet-mask.show { opacity: 1; pointer-events: auto; }
.study-sheet-panel {
  width: 100%;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: var(--surface-card);
  transform: translateY(16px);
  transition: transform .2s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.study-sheet-mask.show .study-sheet-panel { transform: translateY(0); }
.study-sheet-head {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}
.study-sheet-title { flex: 1; min-width: 0; color: var(--ink); font-size: 15px; font-weight: 650; }
.study-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 16px; }
.study-sheet-foot { padding: 10px 16px 14px; border-top: 1px solid var(--border-light); }
.study-sheet-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }

html.dark-mode .study-sheet-panel { background: #1c2327; }
body.dark-mode .study-sheet-panel { background: #1c2327; }

.study-plan-list { max-height: 56vh; overflow-y: auto; }
.study-plan-row { padding: 10px 3px; display: flex; align-items: flex-start; gap: 9px; border-bottom: 1px solid var(--border-light); }
.study-plan-copy { flex: 1; min-width: 0; }
.study-plan-title { color: var(--ink); font-size: 13px; line-height: 1.45; }
.study-plan-row.is-done .study-plan-title { color: var(--ink-subtle); text-decoration: line-through; }
.study-plan-current { margin-left: 5px; color: var(--ls-accent); font-size: 10px; text-decoration: none; }
.study-plan-goal { margin-top: 3px; color: var(--ink-light); font-size: 11px; line-height: 1.5; }
.study-plan-points { margin-top: 5px; color: var(--ink-light); font-size: 11px; line-height: 1.75; }
.study-plan-comment { margin-top: 4px; color: var(--ls-accent); font-size: 11px; line-height: 1.5; }

/* ── 资料与章节面板（资料 + 章节 + 进度合并成同一个上下文）── */
/* ★ 2026-09-18f（叶谭横屏实测）：原来 min-height:130 + .ls-empty 自带的 28px 内边距，
   在横屏小屏（视口高 ~330px → 面板被 72vh 压到 238px）下面板需要滚动、
   「上传资料」被推出可视区，用户「压根找不到上传」。空状态收紧 + 按钮挪进空状态区。 */
.study-sheet-empty { min-height: 0; padding: 18px 16px; }
.study-empty-btn { margin-top: 6px; }
.study-plan-head {
  margin: 16px 2px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.study-plan-head span { color: var(--ls-accent); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ── 学习工具面板（三个快捷提问收进 ＋）── */
.study-tool-list { padding-top: 2px; }
.study-tool-row {
  width: 100%;
  min-height: 54px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.study-tool-row:last-child { border-bottom: 0; }
.study-tool-row:active { background: var(--surface-input); }
.study-tool-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--monet-deepwater, var(--ls-accent));
  background: var(--monet-ice, #E8EFF4);
  font-size: 12px;
  font-weight: 650;
}
.study-tool-copy { flex: 1; min-width: 0; }
.study-tool-copy strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.study-tool-copy small { display: block; margin-top: 3px; color: var(--ink-light); font-size: 10px; }

/* ── 专注结束面板（「完成本节」只在这里和计划面板出现）── */
.study-result { padding: 6px 2px 2px; }
.study-result-goal { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.5; }
.study-result-sub { margin: 7px 0 0; color: var(--ink-light); font-size: 12px; line-height: 1.7; }

.takeout-card-msg {
  /* ★ 2026-09-30 叶谭：「原版大小外观都是好看的，只是靠右盖住头像」——
     width 必须是视口单位（72vw），不能写 100%：父容器 .message-content 的宽度由内容撑出来，
     写 100% 就是循环依赖 → 实测被压到 191px。宽度回到设计值，盖头像的问题在 chat.css 修。 */
  width: min(244px, 72vw);
  overflow: hidden;
  border: 1px solid rgba(231, 139, 69, .28);
  border-radius: 18px;
  color: #283934;
  background: #f7fff9;
  box-shadow: 0 8px 24px rgba(56, 80, 68, .1);
}
.takeout-card-top { padding: 13px 14px 11px; background: linear-gradient(135deg, #dff4e7, #f3fbf5); }
.takeout-card-label { display: flex; align-items: center; gap: 6px; color: #3d7c61; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.takeout-card-store { margin-top: 7px; font-size: 15px; font-weight: 700; }
.takeout-card-items { margin-top: 4px; color: #5f706a; font-size: 12px; line-height: 1.5; }
.takeout-card-body { padding: 10px 14px 12px; }
.takeout-card-row { display: flex; justify-content: space-between; gap: 10px; color: #6c7773; font-size: 11px; line-height: 1.7; }
.takeout-card-price { color: #df7c35; font-size: 15px; font-weight: 750; }
.takeout-card-note { margin-top: 5px; padding-top: 7px; border-top: 1px dashed #cfe2d6; color: #66736e; font-size: 11px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .ls-contact,
  .location-action,
  .study-chip,
  .study-typing-dots span { animation: none !important; transition: none !important; }
}

body.dark-mode .location-map-card { filter: brightness(.82) saturate(.82); }
body.dark-mode .takeout-card-msg { border-color: rgba(231,139,69,.25); color: #e6f1eb; background: #263631; }
body.dark-mode .takeout-card-top { background: linear-gradient(135deg, #2c4d3d, #30453d); }
body.dark-mode .takeout-card-label { color: #9bd6b6; }
body.dark-mode .takeout-card-items,
body.dark-mode .takeout-card-row,
body.dark-mode .takeout-card-note { color: #b7c9c0; }
body.dark-mode .takeout-card-note { border-color: #415b4e; }

html.dark-mode .location-study-page { --ls-accent: #9fb8c4; background: #161a1c; }

.location-chat-card {
  /* 同 .takeout-card-msg：宽度用视口单位，别用 100%（会被压成 125px） */
  width: min(246px, 73vw);
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ls-accent) 22%, var(--border-light));
  border-radius: 16px;
  color: var(--ink);
  background: var(--surface-card);
  box-shadow: 0 8px 22px rgba(47, 67, 77, .09);
  text-align: left;
  cursor: pointer;
}
.location-chat-card:active { transform: scale(.985); }
.location-chat-map { position: relative; height: 112px; display: block; overflow: hidden; background: #e9efea; }
.location-chat-road { position: absolute; display: block; height: 12px; width: 125%; left: -10%; background: rgba(255,255,255,.88); border-top: 1px solid #d5ddd6; border-bottom: 1px solid #d5ddd6; }
.location-chat-road.road-a { top: 32px; transform: rotate(-8deg); }
.location-chat-road.road-b { top: 72px; transform: rotate(13deg); }
.location-chat-river { position: absolute; width: 34px; height: 150%; left: 32px; top: -24%; transform: rotate(18deg); border-radius: 50%; background: #c7dfe8; }
.location-chat-pin { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 5px solid #fff; border-radius: 50% 50% 50% 0; background: var(--ls-accent); box-shadow: 0 3px 10px rgba(42,65,76,.22); transform: rotate(-45deg); }
.location-chat-copy { padding: 11px 13px 8px; display: block; }
.location-chat-copy strong { display: block; overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.location-chat-copy > span { display: block; margin-top: 3px; color: var(--ink-subtle); font-size: 11px; }
.location-chat-foot { padding: 7px 13px 9px; display: flex; justify-content: space-between; border-top: 1px solid var(--border-light); color: var(--ink-subtle); font-size: 10px; }
html.dark-mode .location-chat-map, body.dark-mode .location-chat-map { filter: brightness(.76) saturate(.8); }

/* ═══════════════ 自习室 · 单元阅读器 + 点句标记（★ 2026-09-18d）═══════════════ */

/* 单元阅读器（sheet 里的原文铺开） */
.study-reader { padding: 2px 0 6px; }
.study-reader-tip {
  margin: 4px 0 12px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--surface-input, #f2f5f7);
  color: var(--ink-light);
  font-size: 11px;
  line-height: 1.65;
}
.study-reader-text {
  color: var(--ink);
  font-size: var(--study-reader-font, 16px);
  line-height: 1.95;
  word-break: break-word;
}
.study-sent {
  cursor: pointer;
  border-radius: 3px;
  padding: 1px 0;
  transition: background .12s ease;
  white-space: pre-wrap;
}
.study-sent.is-marked {
  background: rgba(196, 149, 106, .22);
  box-shadow: inset 2px 0 0 var(--ls-accent, #8FAFBF);
}
html.dark-mode .study-sent.is-marked,
body.dark-mode .study-sent.is-marked { background: rgba(196, 149, 106, .3); }
.study-reader #studyReaderMore { margin-top: 14px; }
.study-reader-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.study-reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.study-reader-ask { width: 100%; }
.study-reader-count { color: var(--ink-light); font-size: 12px; }
.study-chip.is-off,
.study-chip:disabled { opacity: .45; }

/* 资料阅读器独占屏幕，正文和字号随系统安全区排布。 */
.study-sheet-mask.study-reader-fullscreen { align-items: stretch; background: var(--surface-page); }
.study-reader-fullscreen .study-sheet-panel { height: 100%; max-height: none; border-radius: 0; padding-top: var(--sat, env(safe-area-inset-top, 0px)); }
.study-reader-fullscreen .study-sheet-body { padding: 0 18px 28px; background: var(--surface-page); }
.study-reader-fullscreen .study-sheet-head,
.study-reader-fullscreen .study-sheet-foot { background: var(--surface-card); }
.study-reader-fullscreen .study-sheet-foot { padding-bottom: calc(12px + var(--sab, env(safe-area-inset-bottom, 0px))); }
.study-reader-fullscreen .study-reader { padding-top: 16px; }
.study-reader-fullscreen .study-reader-text { padding: 6px 2px 30px; line-height: 1.85; }
.study-reader-teacher { display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin-bottom: 14px; border-radius: 14px; background: var(--surface-card); border: 1px solid var(--border-light); }
.study-reader-teacher-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--ls-accent); color: #fff; font-size: 14px; }
.study-reader-teacher > div { min-width: 0; flex: 1; }
.study-reader-teacher strong { display: block; color: var(--ink); font-size: 12px; }
.study-reader-teacher p { margin: 4px 0 0; color: var(--ink); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.study-reader-teacher .study-chip { flex: none; padding: 6px 8px; font-size: 10px; }
.study-reader-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 0 0 12px; color: var(--ink-light); font-size: 11px; }
.study-reader-tools button { width: 36px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); color: var(--ink); font: inherit; font-size: 13px; }
.study-reader-tools #studyReaderFontValue { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }

/* 我的标记（资料与章节面板里的列表） */
.study-mark-list { margin-top: 2px; }
.study-mark-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border-light);
}
.study-mark-copy { flex: 1; min-width: 0; }
.study-mark-text { color: var(--ink); font-size: 12px; line-height: 1.65; }
.study-mark-meta { margin-top: 3px; color: var(--ink-light); font-size: 10px; }

/* 章节行右侧按钮组（读原文 / 学到这 竖排） */
.study-plan-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* 输入区上方的标记引用条（点句标记 → 问老师） */
.study-quote-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 10px 0;
  padding: 7px 11px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: rgba(143, 175, 191, .16);
  font-size: 11px;
  color: var(--ink-subtle);
}
.study-quote-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--ls-accent, #8FAFBF);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.study-quote-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink);
}
.study-quote-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-light);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.study-quote-close:active { background: rgba(0, 0, 0, .06); }
@media (prefers-reduced-motion: reduce) { .location-chat-card { transition: none !important; } }
