/* ============================================================
   JEEV · 即时执行与日常管家
   视觉系统：安静的夜，门口的一盏暖灯
   ============================================================ */

:root {
  --fs-blue: #3370FF;
  --fs-blue-hover: #245BDB;
  --fs-blue-light: #E1EAFF;
  --fs-bg: #F5F6F7;
  --fs-surface: #FFFFFF;
  --fs-hover: #F2F3F5;
  --fs-text: #1F2329;
  --fs-text-2: #646A73;
  --fs-text-3: #8F959E;
  --fs-border: #DEE0E3;
  --fs-divider: #EFF0F1;
  --fs-success: #34C724;
  --fs-warning: #FF8800;
  --fs-danger: #F54A45;
  --fs-now: #D46B08;
  --fs-now-bg: #FFF7E6;
  --fs-later: #245BDB;
  --fs-later-bg: #E1EAFF;
  --fs-silent: #646A73;
  --fs-silent-bg: #F2F3F5;
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-pill: 999px;
  --shadow-fs: 0 4px 12px rgba(31, 35, 41, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-fast: 200ms;
  --dur-base: 320ms;
  --dur-page: 380ms;
  --dur-push: 320ms;
  --dur-back: 300ms;
  --dur-week: 420ms;
  --dur-list: 260ms;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fs-bg);
  color: var(--fs-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 380px at 94% -8%, rgba(245, 185, 107, 0.10), transparent 62%),
    radial-gradient(680px 520px at 50% 112%, rgba(124, 147, 201, 0.045), transparent 70%);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(245, 185, 107, 0.55);
  outline-offset: 2px;
}

h1, h2, h3, p {
  margin: 0;
}

svg {
  display: block;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 21, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--fs-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 16px;
}

.brand {
  flex: none;
  min-width: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.17em;
  line-height: 1.1;
}

.brand-sub {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--fs-text-2);
  white-space: nowrap;
}

.mode-pill {
  display: flex;
  flex: none;
  gap: 1px;
  margin-left: auto;
  padding: 2px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-pill);
}

.mode-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--fs-text-2);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: color 0.25s ease, background 0.25s ease;
}

.mode-btn.active {
  color: var(--fs-blue);
  background: var(--fs-hover);
  border-color: rgba(245, 185, 107, 0.16);
}

.mode-pill.locked .mode-btn:not(.active) {
  opacity: 0.4;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--fs-text-2);
  transition: color 0.2s ease, background 0.2s ease;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:active {
  background: var(--fs-hover);
}

/* 演示提示条 */
.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 430px;
  margin: 0 auto;
  padding: 2px 16px 10px;
}

.demo-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 10px 2px rgba(245, 185, 107, 0.35);
  animation: breathe 2.6s ease-in-out infinite;
}

.demo-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fs-blue);
}

.demo-meta {
  font-size: 11px;
  color: var(--fs-text-2);
  white-space: nowrap;
}

.demo-stop {
  height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-btn);
  background: rgba(18, 24, 38, 0.7);
  color: var(--fs-text);
  font-size: 12px;
}

/* ============================== 主内容 ============================== */

.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-sub {
  margin-top: 5px;
  font-size: 12px;
  color: var(--fs-text-2);
  line-height: 1.6;
}

.page-intro {
  margin: 2px 2px 14px;
}

.page-foot {
  padding: 30px 0 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: rgba(140, 151, 171, 0.55);
}

.card {
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.dot {
  color: rgba(140, 151, 171, 0.45);
}

/* ============================== 按钮 / 表单 ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:active {
  filter: brightness(0.94);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  filter: none;
}

.btn-primary {
  background: linear-gradient(180deg, #F8C885 0%, #F0AE58 100%);
  border-color: rgba(255, 255, 255, 0.12);
  color: #241A0B;
  box-shadow: 0 8px 22px rgba(245, 185, 107, 0.14);
}

.btn-ghost {
  background: rgba(18, 24, 38, 0.6);
  border-color: var(--fs-border);
  color: var(--fs-text);
  font-weight: 500;
}

.btn-warm {
  background: rgba(245, 185, 107, 0.1);
  border-color: rgba(245, 185, 107, 0.3);
  color: var(--fs-blue);
}

.btn-quiet {
  background: transparent;
  border-color: var(--fs-border);
  color: var(--fs-text-2);
  font-weight: 500;
}

.btn-block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-size: 11px;
  color: var(--fs-text-2);
  letter-spacing: 0.04em;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-btn);
  background: #0D1320;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(140, 151, 171, 0.6);
}

.textarea {
  min-height: 68px;
  resize: none;
}

.select {
  color-scheme: dark;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(245, 185, 107, 0.42);
  box-shadow: 0 0 0 3px rgba(245, 185, 107, 0.07);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  opacity: 0.45;
  cursor: default;
}

input[type="datetime-local"],
input[type="time"] {
  color-scheme: dark;
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.form-title {
  font-size: 14px;
  font-weight: 600;
}

.form-hint {
  margin-top: 3px;
  font-size: 11px;
  color: var(--fs-text-2);
  line-height: 1.5;
}

.compose-engine {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-pill);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--fs-text-2);
  white-space: nowrap;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-error {
  margin-top: 8px;
  font-size: 11px;
  color: var(--fs-blue);
  min-height: 0;
}

.form-error:empty {
  display: none;
}

.form-note {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--fs-text-2);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-btn);
  background: #0D1320;
}

.seg {
  position: relative;
  display: block;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  color: var(--fs-text-2);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.seg input:checked + span {
  background: var(--fs-hover);
  color: var(--fs-blue);
  box-shadow: inset 0 0 0 1px rgba(245, 185, 107, 0.18);
}

.seg input:focus-visible + span {
  outline: 2px solid rgba(245, 185, 107, 0.55);
  outline-offset: 1px;
}

/* ============================== 消息台：状态卡 ============================== */

.status-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(245, 185, 107, 0.10), transparent 56%),
    linear-gradient(180deg, rgba(26, 34, 50, 0.7), rgba(18, 24, 38, 0.94));
}

.status-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(245, 185, 107, 0.08);
  pointer-events: none;
}

.status-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-mode {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 8px;
  padding: 0 7px;
  vertical-align: 6px;
  border: 1px solid rgba(245, 185, 107, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(245, 185, 107, 0.06);
  color: var(--fs-blue);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.status-desc {
  margin-top: 5px;
  font-size: 13px;
  color: var(--fs-text-2);
}

.beacon {
  flex: none;
  width: 8px;
  height: 8px;
  margin: 11px 7px 0 0;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow:
    0 0 0 5px rgba(245, 185, 107, 0.06),
    0 0 20px 5px rgba(245, 185, 107, 0.22);
}

.status-context {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--fs-text-2);
}

.ctx-sep {
  color: rgba(140, 151, 171, 0.4);
}

.ctx-ddl {
  color: rgba(233, 237, 245, 0.72);
}

.status-stats {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 34px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--fs-border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat-value {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.stat-value span {
  margin-left: 3px;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--fs-text-2);
}

.stat-label {
  font-size: 10.5px;
  color: var(--fs-text-2);
  letter-spacing: 0.04em;
}

.stat.pass .stat-value {
  color: var(--fs-blue);
}

/* 门口分隔带 */

.door {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 6px;
}

.door-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}

.door-label {
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.45em;
  padding-left: 0.45em;
  color: var(--fs-text-2);
}

.door-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 13px;
  font-size: 10px;
  letter-spacing: 0.09em;
  color: rgba(140, 151, 171, 0.72);
}

.pulse-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 8px rgba(245, 185, 107, 0.7);
  animation: breathe 2.8s ease-in-out infinite;
}

/* ============================== 消息卡片 ============================== */

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-card {
  --card-opacity: 1;
  position: relative;
  overflow: hidden;
  padding: 14px;
  background: linear-gradient(180deg, rgba(26, 34, 50, 0.5), rgba(18, 24, 38, 0.96));
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  opacity: var(--card-opacity);
  animation: card-in var(--dur-list) var(--ease-ios) both;
}

.msg-card.now {
  border-color: rgba(245, 185, 107, 0.38);
  box-shadow:
    0 8px 28px rgba(245, 185, 107, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.16);
}

.msg-card.later {
  border-color: rgba(124, 147, 201, 0.2);
}

.msg-card.silent {
  --card-opacity: 0.6;
}

.msg-card.judging {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
}

.msg-card.now::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(245, 185, 107, 0.105) 48%, transparent 64%);
  transform: translateX(-130%);
  animation: sweep 1.9s ease-out 0.35s 1 both;
}

.msg-card.hero.now {
  border-color: rgba(245, 185, 107, 0.64);
  box-shadow:
    0 0 0 1px rgba(245, 185, 107, 0.1),
    0 12px 46px rgba(245, 185, 107, 0.14),
    0 10px 30px rgba(0, 0, 0, 0.18);
}

.msg-card.hero.now::after {
  background: linear-gradient(105deg, transparent 26%, rgba(245, 185, 107, 0.22) 48%, transparent 66%);
  animation-duration: 2.5s;
  animation-delay: 0.2s;
}

.msg-card.hero .ring-progress {
  transition-duration: 1.6s;
}

.msg-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--fs-border);
  border-radius: 50%;
  background: var(--fs-hover);
  color: var(--fs-text);
  font-size: 13px;
  font-weight: 600;
}

.msg-card.now .avatar {
  color: var(--fs-blue);
  border-color: rgba(245, 185, 107, 0.22);
  background: rgba(245, 185, 107, 0.07);
}

.msg-card.later .avatar {
  color: var(--fs-later);
  border-color: rgba(124, 147, 201, 0.2);
  background: rgba(124, 147, 201, 0.07);
}

.msg-meta {
  flex: 1;
  min-width: 0;
}

.sender-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sender {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.sender-row .type-tag {
  flex: none;
}

.msg-time {
  flex: none;
  margin-left: auto;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--fs-text-2);
  white-space: nowrap;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border: 1px solid var(--fs-border);
  border-radius: 5px;
  color: var(--fs-text-2);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(140, 151, 171, 0.1);
  color: rgba(140, 151, 171, 0.9);
  font-size: 9px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ring-wrap {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}

.score-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3;
}

.msg-card .ring-track {
  stroke: #263041;
}

.ring-progress {
  fill: none;
  stroke: var(--accent, var(--fs-silent));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: var(--circ);
  stroke-dashoffset: var(--circ);
  transition: stroke-dashoffset 0.95s var(--ease-soft);
}

.msg-card.ring-on .ring-progress {
  stroke-dashoffset: var(--offset);
}

.ring-score {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fs-text);
  letter-spacing: -0.02em;
}

.judging-ring {
  display: grid;
  place-items: center;
}

.ring-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #263041;
  border-top-color: var(--fs-text-2);
  animation: spin 0.9s linear infinite;
}

.pending-dots {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--fs-text-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  animation: breathe 2s ease-in-out infinite;
}

.msg-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.58;
  color: var(--fs-text);
  overflow-wrap: anywhere;
}

.msg-card.silent .msg-content {
  padding-right: 30px;
}

.msg-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}

.msg-reason {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--fs-text-2);
  overflow-wrap: anywhere;
}

.reason-ico {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  color: var(--accent, var(--fs-text-2));
  opacity: 0.9;
}

.msg-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.msg-source {
  font-size: 8.5px;
  line-height: 1.2;
  color: rgba(140, 151, 171, 0.62);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.action-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 23px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-now {
  color: var(--fs-blue);
  background: rgba(245, 185, 107, 0.1);
  border-color: rgba(245, 185, 107, 0.28);
}

.tag-later {
  color: var(--fs-later);
  background: rgba(124, 147, 201, 0.1);
  border-color: rgba(124, 147, 201, 0.26);
}

.tag-silent {
  color: rgba(140, 151, 171, 0.9);
  background: rgba(95, 106, 125, 0.16);
  border-color: rgba(95, 106, 125, 0.25);
}

.tag-judging {
  color: var(--fs-text-2);
  background: rgba(140, 151, 171, 0.08);
  border-color: rgba(140, 151, 171, 0.18);
}

.stamp {
  position: absolute;
  top: 40px;
  right: 12px;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1.5px solid rgba(140, 151, 171, 0.22);
  border-radius: 6px;
  color: rgba(140, 151, 171, 0.24);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-12deg);
  pointer-events: none;
}

.gate-more {
  margin-top: 12px;
}

.gate-more:empty {
  display: none;
}

.gate-more-btn {
  width: 100%;
  min-height: 44px;
  font-size: 11.5px;
}

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

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 24px;
  text-align: center;
}

.empty-ico {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  color: rgba(140, 151, 171, 0.55);
}

.empty-title {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(233, 237, 245, 0.9);
}

.empty-sub {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--fs-text-2);
}

/* ============================== 模拟消息表单 ============================== */

.compose-form {
  margin-top: 18px;
  padding: 16px;
}

.compose-form .input {
  margin-bottom: 8px;
}

.compose-form .textarea {
  margin-bottom: 11px;
}

.compose-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.compose-actions .btn {
  min-width: 0;
}

/* ============================== 课表 ============================== */

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-pill);
  background: var(--fs-surface);
}

.day-btn {
  position: relative;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--fs-text-2);
  font-size: 11px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.day-btn.active {
  color: var(--fs-blue);
  border-color: rgba(245, 185, 107, 0.4);
  background: rgba(245, 185, 107, 0.08);
}

.day-btn.is-today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--fs-blue);
  opacity: 0.8;
}

.schedule-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-actions .btn {
  min-height: 44px;
  padding: 0 13px;
  font-size: 12.5px;
}

.add-course-btn {
  flex: 1;
  min-width: 0;
  color: var(--fs-blue);
  border-color: rgba(245, 185, 107, 0.18);
  background: rgba(245, 185, 107, 0.05);
}

.add-course-btn svg {
  width: 16px;
  height: 16px;
}

.restore-course-btn {
  flex: none;
  padding: 0 11px;
  font-size: 11px;
}

.schedule-card {
  padding: 15px 14px 10px;
}

.schedule-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 0 2px 13px;
  border-bottom: 1px solid var(--fs-border);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--fs-text-2);
}

.schedule-day {
  color: var(--fs-text);
  font-weight: 600;
}

.schedule-live {
  color: var(--fs-blue);
  font-weight: 600;
}

.timeline {
  position: relative;
  margin-top: 16px;
  margin-bottom: 4px;
}

.tl-hour {
  position: absolute;
  left: 0;
  width: 38px;
  transform: translateY(-50%);
  text-align: right;
  font-size: 9.5px;
  color: rgba(140, 151, 171, 0.55);
  letter-spacing: 0.02em;
}

.tl-line {
  position: absolute;
  left: 48px;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.045);
}

.tl-courses {
  position: absolute;
  inset: 0 0 0 48px;
}

.free-slot {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(140, 151, 171, 0.38);
  font-size: 10px;
  letter-spacing: 0.24em;
  pointer-events: none;
}

.free-slot::before,
.free-slot::after {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(140, 151, 171, 0.14);
}

.course {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(245, 185, 107, 0.2);
  border-left: 2px solid rgba(245, 185, 107, 0.55);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(245, 185, 107, 0.09), rgba(26, 34, 50, 0.7) 60%),
    var(--fs-hover);
  color: var(--fs-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.course.is-focused {
  border-color: rgba(245, 185, 107, 0.5);
  box-shadow:
    0 0 0 1px rgba(245, 185, 107, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

.course-main {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}

.course-main:active {
  filter: brightness(1.12);
}

.course.is-focused .course-main {
  padding-right: 54px;
}

.course-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.course-meta {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--fs-text-2);
}

.course-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(245, 185, 107, 0.38);
  border-radius: 9px;
  background: rgba(10, 14, 21, 0.92);
  color: var(--fs-blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tl-now {
  position: absolute;
  left: 48px;
  right: 0;
  z-index: 3;
  border-top: 1px dashed rgba(245, 185, 107, 0.48);
  pointer-events: none;
}

.tl-now::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 8px rgba(245, 185, 107, 0.55);
}

.tl-now span {
  position: absolute;
  top: -8px;
  right: 0;
  padding: 0 5px;
  background: var(--fs-surface);
  color: var(--fs-blue);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.timeline-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--fs-border);
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(140, 151, 171, 0.5);
}

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

.task-summary {
  padding: 16px;
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(245, 185, 107, 0.07), transparent 58%),
    var(--fs-surface);
}

.summary-kicker {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--fs-text-2);
}

.summary-line {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(233, 237, 245, 0.92);
  overflow-wrap: anywhere;
}

.summary-line strong {
  color: var(--fs-blue);
  font-weight: 600;
}

.summary-sub {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--fs-text-2);
}

.task-actions {
  margin-top: 12px;
  margin-bottom: 12px;
}

.add-task-btn {
  width: 100%;
  min-height: 44px;
  color: var(--fs-blue);
  border-color: rgba(245, 185, 107, 0.18);
  background: rgba(245, 185, 107, 0.05);
}

.add-task-btn svg {
  width: 16px;
  height: 16px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 8px;
}

.task-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.check-box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #211708;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check-box svg {
  width: 13px;
  height: 13px;
}

.task-item.done .check-box {
  background: var(--fs-blue);
  border-color: var(--fs-blue);
}

.task-main {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.task-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.task-item.done .task-title {
  color: rgba(140, 151, 171, 0.75);
  text-decoration: line-through;
  text-decoration-color: rgba(140, 151, 171, 0.4);
}

.imp-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(245, 185, 107, 0.22);
  border-radius: 5px;
  color: rgba(245, 185, 107, 0.85);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--fs-text-2);
}

.pressure {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 9px;
  letter-spacing: 0.03em;
}

.p-today {
  color: var(--fs-blue);
  background: rgba(245, 185, 107, 0.09);
  border-color: rgba(245, 185, 107, 0.22);
}

.p-tomorrow {
  color: var(--fs-later);
  background: rgba(124, 147, 201, 0.09);
  border-color: rgba(124, 147, 201, 0.2);
}

.p-week {
  color: rgba(233, 237, 245, 0.75);
  background: rgba(26, 34, 50, 0.9);
  border-color: var(--fs-border);
}

.p-later {
  color: var(--fs-silent);
  background: rgba(95, 106, 125, 0.1);
  border-color: rgba(95, 106, 125, 0.2);
}

.task-item.done {
  opacity: 0.55;
}

.task-delete {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -4px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(140, 151, 171, 0.72);
  transition: color 0.2s ease, background 0.2s ease;
}

.task-delete svg {
  width: 15px;
  height: 15px;
}

.task-delete:active {
  color: var(--fs-blue);
  background: var(--fs-hover);
}

/* ============================== 汇总 ============================== */

.digest-hero {
  padding: 18px;
  background:
    radial-gradient(120% 120% at 92% 0%, rgba(245, 185, 107, 0.08), transparent 55%),
    var(--fs-surface);
}

.digest-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--fs-text-2);
}

.digest-title {
  margin-top: 8px;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.72;
  color: var(--fs-text);
  overflow-wrap: anywhere;
}

.digest-title strong {
  color: var(--fs-blue);
  font-weight: 600;
}

.digest-subtitle {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--fs-text-2);
}

.digest-subtitle strong {
  color: var(--fs-text);
  font-weight: 600;
}

.digest-fixed-quote {
  position: fixed;
  left: 50%;
  bottom: calc(62px + var(--safe-bottom));
  z-index: 45;
  width: 100%;
  max-width: 430px;
  margin: 0;
  padding: 14px 16px 10px;
  transform: translateX(-50%);
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: rgba(140, 151, 171, 0.68);
  background: linear-gradient(180deg, rgba(10, 14, 21, 0) 0%, rgba(10, 14, 21, 0.92) 45%, rgba(10, 14, 21, 0.98) 100%);
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 2px 3px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-count {
  font-size: 10.5px;
  color: var(--fs-text-2);
}

.section-sub {
  margin: 0 2px 10px;
  font-size: 10.5px;
  color: rgba(140, 151, 171, 0.65);
}

.digest-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.digest-card {
  padding: 14px;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.digest-card .ring-progress {
  stroke-dashoffset: var(--offset);
}

.digest-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.digest-meta {
  flex: 1;
  min-width: 0;
}

.digest-meta .sender {
  font-size: 13px;
}

.digest-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(233, 237, 245, 0.82);
  overflow-wrap: anywhere;
}

.digest-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.digest-foot .msg-reason {
  font-size: 10.5px;
}

.ack-btn {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-btn);
  background: rgba(18, 24, 38, 0.6);
  color: var(--fs-text);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.ack-btn:active {
  background: var(--fs-hover);
}

.digest-card.leaving,
.silent-row.leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.silent-list {
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--fs-border);
  background: var(--fs-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.silent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.silent-row + .silent-row {
  border-top: 1px solid var(--fs-border);
}

.silent-main {
  flex: 1;
  min-width: 0;
}

.silent-sender {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 550;
  color: rgba(233, 237, 245, 0.82);
}

.silent-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-mini {
  flex: none;
  margin-left: auto;
  color: var(--fs-text-2);
  font-size: 10px;
  font-weight: 500;
}

.silent-text {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: rgba(140, 151, 171, 0.8);
}

.silent-row .ack-btn {
  padding: 0 10px;
  font-size: 10px;
}

.digest-empty {
  margin-top: 16px;
}

/* ============================== 演示旁白 / 结束提示 ============================== */

.narration {
  padding: 20px 16px;
  border: 1px dashed rgba(245, 185, 107, 0.3);
  border-radius: 16px;
  background: rgba(245, 185, 107, 0.035);
  text-align: center;
  transition: opacity 0.24s ease, transform 0.24s ease;
  animation: fade-in 0.4s ease both;
}

.narration-label {
  display: block;
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(245, 185, 107, 0.7);
}

.narration-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fs-text);
}

.narration.leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.end-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(62px + var(--safe-bottom));
  z-index: 55;
  width: 100%;
  max-width: 430px;
  transform: translateX(-50%);
  padding: 0 16px 10px;
  pointer-events: none;
}

.end-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(26, 34, 50, 0.98), rgba(20, 27, 42, 0.98));
  border: 1px solid rgba(245, 185, 107, 0.28);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--fs-text);
  font: inherit;
  text-align: left;
  pointer-events: auto;
  animation: rise-in var(--dur-base) var(--ease-ios) both;
}

.end-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fs-text);
}

/* ============================== 弹层 ============================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  background: rgba(4, 7, 12, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in var(--dur-fast) var(--ease-soft) both;
}

.sheet {
  width: 100%;
  max-width: 398px;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--fs-border);
  border-radius: 22px;
  background: var(--fs-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-up var(--dur-base) var(--ease-ios) both;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sheet-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sheet-desc {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--fs-text-2);
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 16px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 3px;
}

.ai-actions {
  grid-template-columns: repeat(3, 1fr);
}

.ai-actions .btn {
  min-width: 0;
  padding: 0 8px;
  font-size: 12.5px;
}

.ai-test-result {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--fs-text-2);
}

.ai-test-result:empty {
  display: none;
}

.ai-cors-hint {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(245, 185, 107, 0.72);
}

.sheet-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--fs-border);
}

.sheet-data {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-subtitle {
  font-size: 12px;
  font-weight: 600;
}

.sheet-data .btn {
  width: 100%;
}

.confirm-desc {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--fs-text-2);
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

/* ============================== 轻提示 ============================== */

.toast-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(78px + var(--safe-bottom));
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--fs-border);
  border-radius: var(--radius-pill);
  background: rgba(26, 34, 50, 0.97);
  color: var(--fs-text);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  animation: toast-in var(--dur-fast) var(--ease-soft) both;
}

body.has-end-banner .toast-root {
  bottom: calc(146px + var(--safe-bottom));
}

/* ============================== 动效 ============================== */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: var(--card-opacity);
    transform: translateY(0);
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@media (hover: hover) {
  .mode-btn:hover {
    color: var(--fs-text);
  }
  .icon-btn:hover {
    color: var(--fs-text);
    background: var(--fs-hover);
  }
  .tab:hover {
    color: rgba(233, 237, 245, 0.85);
  }
  .day-btn:hover {
    color: var(--fs-text);
  }
  .btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.14);
  }
  .ack-btn:hover {
    border-color: rgba(245, 185, 107, 0.28);
    color: var(--fs-blue);
  }
}

@media (max-width: 375px) {
  .header-inner {
    padding-left: 14px;
    padding-right: 14px;
    gap: 6px;
  }
  .brand-name {
    font-size: 16px;
    letter-spacing: 0.14em;
  }
  .mode-btn {
    padding: 0 8px;
  }
  .status-mode {
    font-size: 28px;
  }
  .end-text {
    font-size: 11px;
  }
}

/* ============================================================
   FEISHU EDITION · G1
   飞书工作台外壳 + 消息台样板
   ============================================================ */

body {
  min-height: 100dvh;
  background: var(--fs-bg);
  color: var(--fs-text);
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

body::before {
  display: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(51, 112, 255, 0.35);
  outline-offset: 2px;
}

/* ---------- segmented mode ---------- */

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 32px;
  margin-left: 0;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  background: var(--fs-hover);
}

.mode-btn {
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mode-btn.active {
  background: var(--fs-surface);
  color: var(--fs-blue);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
  font-weight: 500;
}

.mode-pill.locked .mode-btn:not(.active) {
  opacity: 0.4;
}

.mode-pill-compact {
  height: 28px;
}

.mode-pill-compact .mode-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

/* ---------- Feishu base components ---------- */

.card {
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  box-shadow: var(--shadow-fs);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--fs-blue);
  border-color: var(--fs-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--fs-blue-hover);
  border-color: var(--fs-blue-hover);
}

.btn-secondary {
  background: var(--fs-surface);
  border-color: var(--fs-border);
  color: var(--fs-text);
}

.btn-secondary:hover {
  background: var(--fs-hover);
}

.btn-text {
  height: 32px;
  padding: 0 8px;
  background: transparent;
  color: var(--fs-blue);
}

.btn-text:hover {
  background: var(--fs-blue-light);
}

.btn-ghost {
  background: var(--fs-surface);
  border-color: var(--fs-border);
  color: var(--fs-text-2);
}

.btn-ghost:hover {
  background: var(--fs-hover);
  color: var(--fs-text);
}

.btn-quiet {
  background: transparent;
  border-color: var(--fs-border);
  color: var(--fs-text-2);
}

.btn-quiet:hover {
  background: var(--fs-hover);
  color: var(--fs-text);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--fs-text-2);
}

.icon-btn:hover {
  background: var(--fs-hover);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 6px;
  color: var(--fs-text);
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input,
.select {
  height: 32px;
  padding: 0 10px;
}

.textarea {
  min-height: 64px;
  padding: 8px 10px;
  line-height: 20px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 0;
  border-color: var(--fs-blue);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
}

.form-note {
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.form-error {
  color: var(--fs-danger);
  font-size: 12px;
  line-height: 18px;
}

.tag-now,
.tag-later,
.tag-silent,
.tag-judging,
.type-tag,
.source-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.tag-now {
  color: var(--fs-now);
  background: var(--fs-now-bg);
  border-color: rgba(212, 107, 8, 0.2);
}

.tag-later {
  color: var(--fs-later);
  background: var(--fs-later-bg);
  border-color: rgba(36, 91, 219, 0.18);
}

.tag-silent,
.tag-judging {
  color: var(--fs-silent);
  background: var(--fs-silent-bg);
  border-color: var(--fs-border);
}

.type-tag {
  color: var(--fs-text-2);
  background: var(--fs-hover);
  border-color: var(--fs-border);
}

.source-badge {
  color: var(--fs-blue);
  background: var(--fs-blue-light);
  border-color: rgba(51, 112, 255, 0.12);
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.avatar-c0 { background: #6D9BF5; }
.avatar-c1 { background: #8B7CE8; }
.avatar-c2 { background: #4FB286; }
.avatar-c3 { background: #E0A05A; }
.avatar-c4 { background: #E17C7C; }

.page-title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--fs-text);
}

.page-sub {
  margin-top: 4px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.section-title {
  color: var(--fs-text);
}

.section-sub {
  color: var(--fs-text-3);
}

.page-foot {
  color: var(--fs-text-3);
}

/* ---------- 消息台：G1 工作台样板 ---------- */

.gate-page {
  width: 100%;
}

.gate-page-head {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 20px;
}

.gate-context-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 600px;
  margin-top: 4px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
  text-align: right;
}

.context-mode {
  color: var(--fs-blue);
  font-weight: 500;
}

.context-desc {
  color: var(--fs-text-3);
}

.context-dot {
  color: var(--fs-border);
}

.gate-workbench {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.gate-list-pane {
  min-width: 0;
}

.gate-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--fs-divider);
  margin-bottom: 12px;
}

.gate-list-title {
  color: var(--fs-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.gate-today-counts {
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.gate-today-counts strong {
  color: var(--fs-text);
  font-weight: 600;
}

.gate-count-sep {
  margin: 0 4px;
  color: var(--fs-text-3);
}

.gate-filter {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border-radius: 6px;
  background: var(--fs-hover);
  margin-bottom: 12px;
}

.gate-filter-btn {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.gate-filter-btn.active {
  background: var(--fs-surface);
  color: var(--fs-blue);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
  font-weight: 500;
}

#gateStream {
  min-width: 0;
}

.gate-more {
  margin-top: 10px;
}

.gate-more-btn {
  width: 100%;
  min-height: 32px;
  font-size: 12px;
}

.gate-detail-pane {
  position: sticky;
  top: 76px;
  min-width: 0;
}

.detail-card {
  padding: 24px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  box-shadow: var(--shadow-fs);
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-identity {
  flex: 1;
  min-width: 0;
}

.detail-sender {
  overflow: hidden;
  color: var(--fs-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 11px;
  line-height: 1;
}

.detail-type {
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.detail-time {
  flex: none;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.detail-score-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--fs-divider);
}

.detail-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
  display: grid;
  place-items: center;
}

.detail-ring svg {
  position: absolute;
  inset: 0;
  width: 72px;
  height: 72px;
}

.detail-ring-track {
  fill: none;
  stroke: var(--fs-divider);
  stroke-width: 4;
}

.detail-ring-progress {
  fill: none;
  stroke: var(--accent, var(--fs-blue));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: var(--circ);
  stroke-dashoffset: var(--circ);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.5s ease-out;
}

.detail-ring-progress.ring-on {
  stroke-dashoffset: var(--offset);
}

.detail-ring-score {
  position: relative;
  z-index: 1;
  color: var(--fs-text);
  font-size: 21px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-judgement {
  min-width: 0;
}

.detail-reason {
  margin-top: 8px;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.detail-basis {
  padding-top: 16px;
}

.detail-basis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

.judge-source {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--fs-hover);
  color: var(--fs-text-3);
  font-size: 11px;
  font-weight: 400;
}

.basis-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--fs-divider);
  font-size: 12px;
  line-height: 18px;
}

.basis-row:first-of-type {
  margin-top: 8px;
}

.basis-row > span {
  width: 84px;
  flex: none;
  color: var(--fs-text-3);
}

.basis-row > strong {
  color: var(--fs-text-2);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.detail-original {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--fs-bg);
}

.detail-original-label {
  display: block;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.detail-original p {
  margin-top: 5px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--fs-divider);
}

.detail-action-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-send {
  margin-left: auto;
}

.detail-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 6px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 13px;
  line-height: 20px;
}

.detail-pending .pending-dots {
  position: static;
  color: var(--fs-blue);
  font-size: 14px;
  letter-spacing: 0.08em;
  animation: breathe 2s ease-in-out infinite;
}

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 32px;
  border: 1px dashed var(--fs-border);
  border-radius: 8px;
  color: var(--fs-text-3);
  text-align: center;
}

.detail-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--fs-text-3);
  opacity: 0.6;
}

.detail-empty p {
  max-width: 260px;
  color: var(--fs-text-3);
  font-size: 14px;
  line-height: 22px;
}

/* 移动端消息卡片与详情抽屉 */

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-card {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  color: var(--fs-text);
  box-shadow: none;
  animation: msg-in 0.22s ease-out both;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.msg-card:hover {
  background: var(--fs-hover);
}

.msg-card.selected {
  background: var(--fs-blue-light);
  border-color: rgba(51, 112, 255, 0.22);
}

.msg-card.judging {
  border-style: dashed;
  border-color: var(--fs-border);
}

.msg-card.now {
  border-color: rgba(212, 107, 8, 0.2);
}

.msg-card.silent {
  opacity: 0.62;
}

.msg-card.silent .msg-content {
  padding-right: 28px;
}

.msg-card.just-in {
  animation: msg-in 0.22s ease-out both, row-flash 1s ease-out;
}

.msg-card.now.just-in {
  animation: msg-in 0.22s ease-out both, now-flash 1s ease-out;
}

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

.msg-meta {
  flex: 1;
  min-width: 0;
}

.sender-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sender {
  overflow: hidden;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-row .type-tag {
  flex: none;
}

.msg-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
  margin-left: auto;
}

.msg-time {
  margin-left: 0;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.row-score,
.row-dot,
.row-state {
  display: none;
}

.row-score {
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--fs-hover);
  color: var(--fs-text-2);
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
}

.msg-card.now .row-score {
  color: var(--fs-now);
  background: var(--fs-now-bg);
}

.msg-card.later .row-score {
  color: var(--fs-later);
  background: var(--fs-later-bg);
}

.msg-card.silent .row-score {
  color: var(--fs-silent);
  background: var(--fs-silent-bg);
}

.row-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.msg-card.now .row-dot { background: var(--fs-now); }
.msg-card.later .row-dot { background: var(--fs-later); }
.msg-card.silent .row-dot { background: var(--fs-silent); }

.row-state {
  color: var(--fs-blue);
  font-size: 10px;
  line-height: 14px;
}

.msg-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.msg-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}

.msg-foot .ring-wrap {
  flex: none;
}

.msg-card .ring-track {
  stroke: var(--fs-divider);
}

.ring-progress {
  transition-duration: 0.5s;
}

.msg-card.hero .ring-progress {
  transition-duration: 1.6s;
}

.msg-reason {
  flex: 1;
  min-width: 0;
  color: var(--fs-text-2);
  font-size: 11.5px;
  line-height: 17px;
}

.msg-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.msg-source {
  color: var(--fs-text-3);
  font-size: 9px;
  line-height: 12px;
}

.judging-ring {
  position: relative;
  display: grid;
  place-items: center;
}

.ring-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--fs-divider);
  border-top-color: var(--fs-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.pending-dots {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--fs-text-3);
  font-size: 11px;
  letter-spacing: 0.08em;
  animation: breathe 2s ease-in-out infinite;
}

.stamp {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(100, 106, 115, 0.18);
  border-radius: 6px;
  color: rgba(100, 106, 115, 0.22);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-12deg);
  pointer-events: none;
}

.msg-card.now::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 24%, rgba(212, 107, 8, 0.08) 48%, transparent 68%);
  transform: translateX(-100%);
  animation: sweep 1.6s ease-out 0.15s;
}

.msg-card.hero.now {
  border-color: rgba(212, 107, 8, 0.55);
  box-shadow: 0 6px 20px rgba(212, 107, 8, 0.12);
}

.msg-card.hero.now::after {
  background: linear-gradient(105deg, transparent 22%, rgba(212, 107, 8, 0.16) 48%, transparent 70%);
  animation-duration: 2s;
}

.score-ring {
  width: 44px;
  height: 44px;
}

.ring-score {
  color: var(--fs-text);
  font-size: 12px;
  font-weight: 600;
}

/* 移动端：保留原有卡片流 */

@media (max-width: 1023px) {
  .gate-page-head {
    display: none;
  }

  .status-card,
  .door,
  .door-sub {
    display: flex;
  }

  .gate-workbench {
    display: block;
  }

  .gate-list-head,
  .gate-filter,
  .gate-detail-pane {
    display: none;
  }

  .gate-list-pane {
    width: 100%;
  }

  .msg-list {
    gap: 8px;
  }

  .msg-card {
    padding: 13px 14px;
  }

  .msg-card .msg-content {
    -webkit-line-clamp: 3;
  }
}

/* 桌面端：消息流 + 判断详情 */

/* 状态卡（移动端） */

.status-card {
  position: relative;
  display: none;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  box-shadow: var(--shadow-fs);
  overflow: hidden;
}

.status-card::before {
  display: none;
}

.status-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-mode {
  color: var(--fs-text);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.status-desc {
  margin-top: 2px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.beacon {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 0 4px var(--fs-blue-light);
}

.status-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fs-divider);
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.ctx-ddl {
  color: var(--fs-text-2);
}

.ctx-sep {
  color: var(--fs-border);
}

.status-stats {
  display: flex;
  gap: 32px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fs-divider);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-value {
  color: var(--fs-text);
  font-size: 22px;
  line-height: 30px;
  font-weight: 600;
}

.stat-value span {
  margin-left: 2px;
  color: var(--fs-text-3);
  font-size: 11px;
  font-weight: 400;
}

.stat-label {
  color: var(--fs-text-3);
  font-size: 12px;
}

.door {
  display: none;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
}

.door-line {
  flex: 1;
  height: 1px;
  background: var(--fs-divider);
}

.door-label {
  color: var(--fs-text-3);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.door-sub {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 0 3px var(--fs-blue-light);
}

/* 空状态 */

.empty {
  padding: 44px 20px;
  background: var(--fs-surface);
  border: 1px dashed var(--fs-border);
  border-radius: 8px;
  box-shadow: none;
  text-align: center;
}

.empty-ico {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--fs-text-3);
  opacity: 0.6;
}

.empty-title {
  color: var(--fs-text-3);
  font-size: 14px;
  line-height: 22px;
}

.empty-sub {
  margin-top: 4px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

/* 模拟消息表单 */

.compose-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  box-shadow: none;
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.form-title {
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

.form-hint {
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.compose-engine {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 10px;
  white-space: nowrap;
}

.compose-form .input,
.compose-form .textarea {
  margin: 0;
}

.compose-actions {
  display: flex;
  gap: 8px;
}

.compose-actions .btn {
  flex: 1;
}

.compose-form .form-note {
  margin-top: 0;
}

/* 旁白 */

.narration {
  padding: 12px 14px;
  border: 1px solid rgba(51, 112, 255, 0.16);
  border-radius: 8px;
  background: var(--fs-blue-light);
  color: var(--fs-text);
}

.narration-label {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--fs-surface);
  color: var(--fs-blue);
  font-size: 10px;
}

.narration-text {
  margin-top: 6px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 21px;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: var(--card-opacity, 1); transform: translateY(0); }
}

@keyframes row-flash {
  0% { background: var(--fs-blue-light); }
  100% { background: transparent; }
}

@keyframes now-flash {
  0% { background: var(--fs-now-bg); }
  100% { background: transparent; }
}

@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes detail-ring-in {
  from { stroke-dashoffset: var(--circ); }
  to { stroke-dashoffset: var(--offset); }
}

.detail-ring-progress {
  stroke-dashoffset: var(--offset);
  animation: detail-ring-in 0.5s ease-out both;
}

/* 修正移动端状态卡与门分隔的显示方式 */
@media (max-width: 1023px) {
  .status-card {
    display: block;
  }

  .door,
  .door-sub {
    display: flex;
  }
}

/* ---------- 抽屉 / 弹层 / Toast ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(31, 35, 41, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sheet {
  width: 100%;
  max-width: 430px;
  max-height: 88dvh;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--fs-surface);
  color: var(--fs-text);
  border: 1px solid var(--fs-border);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 16px 48px rgba(31, 35, 41, 0.18);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title {
  color: var(--fs-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.sheet-desc {
  margin-top: 4px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.sheet-subtitle {
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sheet-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--fs-divider);
}

.sheet-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 2px;
}

.sheet-actions .btn {
  height: 32px;
}

.ai-actions {
  grid-template-columns: repeat(3, 1fr);
}

.ai-actions .btn {
  min-width: 0;
  padding: 0 6px;
  font-size: 12px;
}

.ai-test-result {
  margin-top: 2px;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 17px;
}

.ai-test-result:empty {
  display: none;
}

.ai-cors-hint {
  display: block;
  margin-top: 3px;
  color: var(--fs-warning);
  font-size: 10px;
  line-height: 16px;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 32px;
  padding: 2px;
  border-radius: 6px;
  background: var(--fs-hover);
}

.seg {
  position: relative;
  flex: 1;
  height: 28px;
}

.seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 4px;
  color: var(--fs-text-2);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.seg input:checked + span {
  background: var(--fs-surface);
  color: var(--fs-blue);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
  font-weight: 500;
}

.help-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.help-note {
  margin-top: 6px;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 17px;
}

.detail-drawer .detail-card {
  padding: 0 2px 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fs-divider);
}

.drawer-title {
  color: var(--fs-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.drawer-sub {
  margin-top: 2px;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.toast-root {
  position: fixed;
  right: 0;
  bottom: calc(72px + var(--safe-bottom));
  left: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 8px 14px;
  border-radius: 6px;
  background: rgba(31, 35, 41, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.16);
  animation: toast-in var(--dur-fast) var(--ease-soft) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 演示条 / 结束提示 ---------- */

#demoSlot {
  width: 100%;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px;
  background: var(--fs-blue-light);
  border-bottom: 1px solid rgba(51, 112, 255, 0.08);
}

.demo-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
  animation: breathe 2.6s ease-in-out infinite;
}

.demo-text {
  color: var(--fs-blue);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.demo-meta {
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.demo-stop {
  height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(51, 112, 255, 0.18);
  border-radius: 4px;
  background: var(--fs-surface);
  color: var(--fs-blue);
  font-size: 11px;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 10px;
  font-weight: 400;
  vertical-align: middle;
}

.end-wrap {
  position: fixed;
  right: 0;
  bottom: calc(68px + var(--safe-bottom));
  left: 0;
  z-index: 55;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.end-banner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 430px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  color: var(--fs-text);
  font: inherit;
  text-align: left;
  box-shadow: 0 8px 24px rgba(31, 35, 41, 0.12);
  pointer-events: auto;
  animation: rise-in 0.22s ease-out both;
}

.end-text {
  flex: 1;
  color: var(--fs-text);
  font-size: 12px;
  line-height: 18px;
}

/* ---------- 课表 / 任务 / 汇总：本阶段仅保证可用性 ---------- */

.task-summary,
.task-item,
.digest-hero,
.digest-card,
.silent-list {
  background: var(--fs-surface);
  border-color: var(--fs-border);
  box-shadow: var(--shadow-fs);
}

.summary-line,
.task-title,
.digest-title,
.section-title,
.silent-name {
  color: var(--fs-text);
}

.summary-sub,
.task-meta,
.digest-text,
.section-sub,
.silent-text,
.silent-sender {
  color: var(--fs-text-2);
}

.task-meta .dot {
  color: var(--fs-border);
}

.task-check .check-box {
  border-color: var(--fs-border);
}

.task-item.done .check-box {
  background: var(--fs-blue);
  border-color: var(--fs-blue);
  color: #fff;
}

.digest-hero {
  background: var(--fs-surface);
}

.digest-title strong {
  color: var(--fs-blue);
}

.digest-subtitle {
  color: var(--fs-text-2);
}

.digest-subtitle strong {
  color: var(--fs-text);
}

.digest-text {
  color: var(--fs-text-2);
}

.digest-card .ring-track {
  stroke: var(--fs-divider);
}

.digest-card .ring-score {
  color: var(--fs-text);
}

.digest-card .sender {
  color: var(--fs-text);
}

.digest-foot .msg-reason {
  color: var(--fs-text-2);
}

.silent-list {
  overflow: hidden;
}

.silent-name {
  color: var(--fs-text);
}

.silent-text {
  color: var(--fs-text-3);
}

.score-mini {
  color: var(--fs-text-3);
}

.ack-btn {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--fs-border);
  border-radius: 6px;
  background: var(--fs-surface);
  color: var(--fs-text-2);
  font-size: 11px;
}

.ack-btn:hover {
  background: var(--fs-hover);
  color: var(--fs-text);
}

.digest-fixed-quote {
  color: var(--fs-text-3);
  background: linear-gradient(180deg, rgba(245, 246, 247, 0) 0%, rgba(245, 246, 247, 0.96) 45%, var(--fs-bg) 100%);
}

.schedule-status {
  color: var(--fs-text-2);
}

.timeline {
  background: transparent;
}

.course {
  color: var(--fs-text);
  background: var(--fs-blue-light);
  border-color: rgba(51, 112, 255, 0.18);
  border-left-color: var(--fs-blue);
}

.course.is-focused {
  border-color: rgba(51, 112, 255, 0.5);
  box-shadow: 0 8px 22px rgba(31, 35, 41, 0.08);
}

.course-meta {
  color: var(--fs-text-2);
}

.day-btn {
  color: var(--fs-text-2);
}

.day-btn.active {
  color: var(--fs-blue);
  border-color: rgba(51, 112, 255, 0.3);
  background: var(--fs-blue-light);
}

.day-btn.is-today::after {
  background: var(--fs-blue);
}

.summary-line strong {
  color: var(--fs-blue);
}

.page-foot {
  padding: 24px 0 8px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mode-pill {
  margin-left: auto;
}

.mobile-more {
  width: 32px !important;
  height: 32px !important;
}

.mode-pill {
  flex: none;
}

.compose-form .input,
.compose-form .textarea {
  height: auto;
  min-height: 32px;
  margin: 0;
}

.compose-form .input {
  height: 32px;
}

.compose-form .textarea {
  min-height: 64px;
  height: auto;
  padding: 8px 10px;
  line-height: 20px;
}

@media (max-width: 1023px) {
  .msg-card.selected {
    background: var(--fs-surface);
    border-color: var(--fs-border);
  }

  .msg-card.now.selected {
    border-color: rgba(212, 107, 8, 0.2);
  }
}

.compose-actions .btn {
  height: 32px;
  min-height: 32px;
  flex: 1;
}

.btn-warm {
  background: var(--fs-blue);
  border-color: var(--fs-blue);
  color: #fff;
}

.btn-warm:hover {
  background: var(--fs-blue-hover);
  border-color: var(--fs-blue-hover);
}

.confirm-desc {
  margin-top: 12px;
  color: var(--fs-text-2);
  font-size: 13px;
  line-height: 21px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 18px;
}

.sheet-data .btn {
  width: auto;
  flex: none;
}

.detail-actions .btn {
  height: 32px;
}

.msg-side .action-tag {
  height: 20px;
  font-size: 11px;
}

.status-card .stat-value {
  color: var(--fs-text);
}

.status-card .stat.pass .stat-value {
  color: var(--fs-success);
}

.status-card .stat.pass .stat-label {
  color: var(--fs-text-3);
}

/* 页面底部在桌面与移动都不遮挡内容 */

/* ============================================================
   G2 · 课表 / 任务 / 汇总飞书化
   ============================================================ */

.source-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.source-feishu {
  color: var(--fs-blue);
  background: var(--fs-blue-light);
}

.source-manual {
  color: var(--fs-text-2);
  background: var(--fs-hover);
}

.source-focus {
  color: var(--fs-now);
  background: var(--fs-now-bg);
}

.toast-danger {
  background: var(--fs-danger);
}

/* ---------- 课表 ---------- */

.schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

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

.week-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 4px;
  border: 1px solid var(--fs-border);
  border-radius: 6px;
  background: var(--fs-surface);
}

.week-range {
  min-width: 138px;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.week-arrow {
  width: 24px !important;
  height: 24px !important;
  color: var(--fs-text-2);
  font-size: 18px;
  line-height: 1;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px;
  border-radius: 6px;
  background: var(--fs-hover);
}

.view-switch-btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fs-text-2);
  font-size: 12px;
}

.view-switch-btn.active {
  background: var(--fs-surface);
  color: var(--fs-blue);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
  font-weight: 500;
}

.schedule-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 9px 12px;
  border: 1px solid rgba(51, 112, 255, 0.12);
  border-radius: 6px;
  background: var(--fs-blue-light);
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
}

.schedule-now {
  color: var(--fs-blue);
  font-weight: 600;
}

.schedule-sep {
  color: var(--fs-text-3);
}

.schedule-focus-live {
  color: var(--fs-now);
  font-weight: 500;
}

.schedule-idle {
  color: var(--fs-text-3);
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.schedule-main {
  min-width: 0;
}

.schedule-view {
  display: none;
}

.schedule-view.active {
  display: block;
}

.schedule-agenda {
  position: sticky;
  top: 76px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  box-shadow: var(--shadow-fs);
}

.week-grid {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(0, 1fr));
  grid-template-rows: 44px var(--week-height);
  overflow: hidden;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  min-width: 0;
}

.week-corner {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--fs-divider);
  border-bottom: 1px solid var(--fs-divider);
  background: var(--fs-bg);
}

.week-day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  grid-row: 1;
  min-width: 0;
  padding: 5px 4px;
  border: 0;
  border-right: 1px solid var(--fs-divider);
  border-bottom: 1px solid var(--fs-divider);
  background: var(--fs-surface);
  color: var(--fs-text-2);
}

.week-day-head.selected {
  background: var(--fs-blue-light);
  color: var(--fs-blue);
}

.week-day-head.is-today .week-day-date {
  color: var(--fs-blue);
  font-weight: 600;
}

.week-day-name {
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;
}

.week-day-date {
  color: var(--fs-text-3);
  font-size: 9.5px;
  line-height: 13px;
}

.week-time {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid var(--fs-divider);
  background: var(--fs-surface);
}

.week-time-label {
  position: absolute;
  right: 6px;
  color: var(--fs-text-3);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.week-day-body {
  position: relative;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--fs-divider);
  background: var(--fs-surface);
}

.week-day-body.selected {
  background: rgba(51, 112, 255, 0.025);
}

.week-hour-line {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid var(--fs-divider);
}

.week-event {
  position: absolute;
  z-index: 2;
  min-width: 0;
  overflow: hidden;
  padding: 4px 5px;
  border-left: 3px solid var(--fs-blue);
  border-radius: 5px;
  background: var(--fs-blue-light);
  color: var(--fs-text);
  font-size: 9px;
  line-height: 1.25;
}

.week-event.focus {
  border-left-color: var(--fs-now);
  background: var(--fs-now-bg);
}

.week-event.focused {
  box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.28);
}

.week-event-btn {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 4px 5px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.week-event-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-event-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--fs-text-2);
  font-size: 8.5px;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-event-source {
  display: none;
}

.week-event-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--fs-border);
  border-radius: 4px;
  background: var(--fs-surface);
  color: var(--fs-danger);
}

.week-event-delete svg {
  width: 12px;
  height: 12px;
}

.week-now {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 3;
  border-top: 2px solid var(--fs-blue);
  pointer-events: none;
}

.week-now::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fs-blue);
}

.week-now span {
  position: absolute;
  top: -8px;
  right: 2px;
  padding: 1px 3px;
  border-radius: 2px;
  background: var(--fs-blue);
  color: #fff;
  font-size: 8px;
  line-height: 10px;
}

.agenda-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fs-divider);
}

.agenda-date {
  margin-top: 2px;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--fs-divider);
  border-radius: 6px;
}

.agenda-item:last-child {
  border-bottom: 0;
}

.agenda-item.focus {
  background: var(--fs-now-bg);
}

.agenda-time {
  display: flex;
  flex-direction: column;
  width: 44px;
  flex: none;
}

.agenda-time strong {
  color: var(--fs-text);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.agenda-time span {
  color: var(--fs-text-3);
  font-size: 10px;
  line-height: 14px;
}

.agenda-main {
  flex: 1;
  min-width: 0;
}

.agenda-name {
  overflow: hidden;
  color: var(--fs-text);
  font-size: 12.5px;
  line-height: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-meta {
  overflow: hidden;
  color: var(--fs-text-3);
  font-size: 10.5px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-empty {
  padding: 28px 8px;
  color: var(--fs-text-3);
  font-size: 12px;
  text-align: center;
}

/* 日视图：复用旧时间轴 DOM，换成飞书视觉 */

.schedule-day-view .day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
}

.schedule-day-view .day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--fs-text-2);
  font-size: 10px;
}

.schedule-day-view .day-btn span {
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;
}

.schedule-day-view .day-btn small {
  color: var(--fs-text-3);
  font-size: 9px;
  line-height: 12px;
}

.schedule-day-view .day-btn.active {
  border-color: transparent;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
}

.schedule-day-view .day-btn.active small {
  color: var(--fs-blue);
}

.schedule-day-view .day-btn.is-today::after {
  bottom: 3px;
  background: var(--fs-blue);
}

.schedule-day-card {
  padding: 14px;
}

.schedule-day-card .timeline {
  margin-top: 12px;
}

.schedule-day-card .tl-hour {
  color: var(--fs-text-3);
  font-size: 9.5px;
}

.schedule-day-card .tl-line {
  background: var(--fs-divider);
}

.schedule-day-card .free-slot {
  color: var(--fs-text-3);
  opacity: 0.7;
}

.schedule-day-card .free-slot::before,
.schedule-day-card .free-slot::after {
  background: var(--fs-border);
}

.schedule-day-card .course {
  min-height: 44px;
  border: 1px solid rgba(51, 112, 255, 0.16);
  border-left: 3px solid var(--fs-blue);
  border-radius: 8px;
  background: var(--fs-blue-light);
  color: var(--fs-text);
}

.schedule-day-card .course.focus {
  border-color: rgba(212, 107, 8, 0.2);
  border-left-color: var(--fs-now);
  background: var(--fs-now-bg);
}

.schedule-day-card .course.is-focused {
  border-color: rgba(51, 112, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
}

.schedule-day-card .course-main {
  padding: 6px 8px;
}

.schedule-day-card .course.is-focused .course-main {
  padding-right: 30px;
}

.schedule-day-card .course-name {
  font-size: 12px;
  line-height: 17px;
}

.schedule-day-card .course-meta {
  margin-top: 2px;
  color: var(--fs-text-2);
  font-size: 10px;
  line-height: 15px;
}

.schedule-day-card .course-source {
  display: inline-flex;
  margin-top: 3px;
}

.schedule-day-card .course-source .source-tag {
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
}

.schedule-day-card .course-delete {
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-color: var(--fs-border);
  border-radius: 4px;
  background: var(--fs-surface);
  color: var(--fs-danger);
  font-size: 9px;
}

.schedule-day-card .tl-now {
  border-top-color: var(--fs-blue);
}

.schedule-day-card .tl-now::before {
  background: var(--fs-blue);
  box-shadow: none;
}

.schedule-day-card .tl-now span {
  top: -9px;
  border-radius: 2px;
  background: var(--fs-blue);
  color: #fff;
  font-size: 9px;
}

.schedule-day-card .timeline-hint {
  border-top-color: var(--fs-divider);
  color: var(--fs-text-3);
}

@media (max-width: 1023px) {
  .schedule-toolbar .week-switch,
  .schedule-toolbar .view-switch {
    display: none;
  }

  .schedule-toolbar {
    align-items: center;
  }

  .schedule-toolbar-left {
    order: 1;
  }

  .schedule-toolbar-right {
    order: 2;
    margin-left: auto;
  }

  .schedule-layout {
    display: block;
  }

  .schedule-agenda {
    display: none;
  }

  .schedule-week-view {
    display: none !important;
  }

  .schedule-day-view {
    display: block !important;
  }

  .schedule-day-card {
    padding: 10px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .schedule-day-view .day-btn {
    height: 40px;
  }

  .schedule-day-card .timeline {
    margin-top: 8px;
  }

  .schedule-day-card .course {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(31, 35, 41, 0.06);
  }
}

/* ---------- 任务 ---------- */

.task-statbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(51, 112, 255, 0.12);
  border-radius: 8px;
  background: var(--fs-blue-light);
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
}

.task-statbar strong {
  color: var(--fs-blue);
  font-weight: 600;
}

.task-stat-next {
  color: var(--fs-text-3);
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.task-toolbar-title {
  color: var(--fs-text);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}

.task-table-wrap {
  overflow: hidden;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
}

.task-table-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 150px 80px 100px 80px 44px;
  align-items: center;
  height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid var(--fs-divider);
  background: var(--fs-bg);
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.task-table-head .task-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-sort-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fs-text-3);
  font: inherit;
  text-align: left;
}

.sort-mark {
  color: var(--fs-blue);
}

.task-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 150px 80px 100px 80px 44px;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 1px solid var(--fs-divider);
  background: var(--fs-surface);
  transition: background 0.18s ease;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row:hover {
  background: var(--fs-hover);
}

.task-cell {
  min-width: 0;
}

.task-check-cell {
  display: flex;
  align-items: center;
}

.task-row .task-check {
  width: 32px;
  height: 32px;
}

.task-row .check-box {
  width: 18px;
  height: 18px;
  border-color: var(--fs-border);
  border-radius: 4px;
  color: #fff;
}

.task-row .check-box svg {
  width: 12px;
  height: 12px;
}

.task-row.done .check-box {
  background: var(--fs-blue);
  border-color: var(--fs-blue);
  color: #fff;
}

.task-name-cell {
  min-width: 0;
}

.task-row .task-title {
  display: block;
  overflow: hidden;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-mobile-meta {
  display: none;
}

.task-due-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--fs-text-2);
}

.task-due {
  overflow: hidden;
  color: var(--fs-text);
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-remaining {
  color: var(--fs-text-3);
  font-size: 10px;
  line-height: 15px;
}

.task-due-cell .pressure {
  display: none;
}

.task-priority-cell .imp-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--fs-border);
  border-radius: 4px;
  background: var(--fs-hover);
  color: var(--fs-text-2);
  font-size: 11px;
  line-height: 1;
}

.task-priority-cell .imp-tag.is-important {
  border-color: rgba(212, 107, 8, 0.2);
  background: var(--fs-now-bg);
  color: var(--fs-now);
}

.task-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 11px;
  line-height: 1;
}

.task-status.done {
  background: var(--fs-hover);
  color: var(--fs-text-3);
}

.task-action-cell {
  display: flex;
  justify-content: flex-end;
}

.task-row .task-delete {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 4px;
}

.task-row .task-delete svg {
  width: 14px;
  height: 14px;
}

.task-row.done {
  opacity: 0.55;
}

.task-row.done .task-title {
  color: var(--fs-text-3);
  text-decoration: line-through;
  text-decoration-color: var(--fs-text-3);
}

.task-table-head .task-priority-cell,
.task-table-head .task-source-cell,
.task-table-head .task-status-cell {
  display: flex;
  align-items: center;
}

@media (max-width: 1023px) {
  .task-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .task-table-head {
    display: none;
  }

  .task-toolbar {
    margin-bottom: 10px;
  }

  .task-toolbar-title {
    font-size: 14px;
  }

  .task-list {
    gap: 8px;
    margin-top: 0;
  }

  .task-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--fs-border);
    border-radius: 8px;
    background: var(--fs-surface);
    box-shadow: var(--shadow-fs);
  }

  .task-row:last-child {
    border-bottom: 1px solid var(--fs-border);
  }

  .task-check-cell {
    order: 0;
    flex: none;
  }

  .task-name-cell {
    order: 1;
    flex: 1;
    min-width: 0;
  }

  .task-priority-cell {
    order: 2;
    flex: none;
  }

  .task-due-cell {
    order: 3;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding-left: 40px;
  }

  .task-due-cell .pressure {
    display: inline-flex;
  }

  .task-mobile-meta {
    display: block;
    margin-top: 2px;
    color: var(--fs-text-3);
    font-size: 10.5px;
    line-height: 16px;
  }

  .task-source-cell {
    order: 4;
    flex: none;
  }

  .task-status-cell {
    order: 5;
    flex: none;
  }

  .task-action-cell {
    order: 6;
    margin-left: auto;
  }

  .task-row .task-title {
    overflow: visible;
    font-size: 14px;
    line-height: 21px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .task-row .task-check {
    width: 36px;
    height: 36px;
  }

  .task-row .task-delete {
    width: 28px;
    height: 28px;
  }

  .task-row.done {
    opacity: 0.6;
  }
}

/* ---------- 汇总 ---------- */

.digest-statbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(51, 112, 255, 0.12);
  border-radius: 8px;
  background: var(--fs-blue-light);
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
}

.digest-statbar strong {
  color: var(--fs-blue);
  font-size: 16px;
  font-weight: 600;
}

.digest-statdot {
  color: var(--fs-text-3);
}

.digest-mobile-tabs {
  display: none;
}

.digest-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

.digest-section {
  min-width: 0;
}

.digest-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.digest-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  box-shadow: var(--shadow-fs);
  transition: background 0.18s ease, opacity 0.2s ease;
}

.digest-card:hover {
  background: var(--fs-hover);
}

.digest-card .digest-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.digest-card .avatar {
  width: 36px;
  height: 36px;
}

.digest-card .digest-meta {
  flex: 1;
  min-width: 0;
}

.digest-card .sender {
  overflow: hidden;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 19px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digest-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.judge-source-mini {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--fs-hover);
  color: var(--fs-text-3);
  font-size: 9px;
  line-height: 1;
}

.digest-card .action-tag {
  flex: none;
}

.digest-card .digest-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  color: var(--fs-text-2);
  font-size: 13px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.digest-card .digest-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--fs-divider);
}

.digest-card .ring-wrap {
  flex: none;
}

.digest-card .ring-track {
  stroke: var(--fs-divider);
}

.digest-card .ring-score {
  color: var(--fs-text);
}

.digest-card .digest-foot .msg-reason {
  flex: 1;
  min-width: 0;
  color: var(--fs-text-2);
  font-size: 11px;
  line-height: 16px;
}

.digest-card .ack-btn {
  flex: none;
  height: 28px;
  padding: 0 3px;
  color: var(--fs-blue);
  font-size: 12px;
}

.digest-card .ack-btn:hover {
  background: transparent;
  color: var(--fs-blue-hover);
}

.digest-card.leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.digest-section-empty {
  padding: 24px 16px;
  border: 1px dashed var(--fs-border);
  border-radius: 8px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.digest-fixed-quote {
  position: fixed;
  right: 0;
  bottom: calc(56px + var(--safe-bottom));
  left: 0;
  z-index: 20;
  margin: 0;
  padding: 12px 16px;
  background: rgba(245, 246, 247, 0.98);
  border-top: 1px solid var(--fs-divider);
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  transform: none;
}

.digest-columns {
  padding-bottom: 64px;
}

.task-row .task-delete {
  color: var(--fs-text-3);
}

.task-row .task-delete:hover {
  color: var(--fs-danger);
  background: var(--fs-hover);
}

@media (max-width: 1023px) {
  .digest-mobile-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 14px;
    padding: 2px;
    border-radius: 6px;
    background: var(--fs-hover);
  }

  .digest-mobile-tab {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--fs-text-2);
    font-size: 12px;
  }

  .digest-mobile-tab span {
    color: var(--fs-text-3);
    font-size: 10px;
  }

  .digest-mobile-tab.active {
    background: var(--fs-surface);
    color: var(--fs-blue);
    box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
    font-weight: 500;
  }

  .digest-mobile-tab.active span {
    color: var(--fs-blue);
  }

  .digest-columns {
    display: block;
  }

  .digest-section {
    display: none;
  }

  .digest-section.active {
    display: block;
  }

  .digest-grid {
    gap: 10px;
  }

  .digest-card {
    padding: 12px;
  }

  .digest-fixed-quote {
    bottom: calc(56px + var(--safe-bottom));
    font-size: 11px;
  }
}

/* 任务表格与移动卡片的最终校准 */

.task-row {
  box-shadow: none;
  border-radius: 0;
}

.task-table-wrap .task-list {
  display: block;
  gap: 0;
  margin: 0;
}

.task-table-head .task-due-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.task-mobile-meta {
  display: none;
}

.p-today {
  color: var(--fs-now);
  background: var(--fs-now-bg);
  border-color: rgba(212, 107, 8, 0.2);
}

.p-tomorrow {
  color: var(--fs-later);
  background: var(--fs-later-bg);
  border-color: rgba(36, 91, 219, 0.16);
}

.p-week {
  color: var(--fs-text-2);
  background: var(--fs-hover);
  border-color: var(--fs-border);
}

.p-later {
  color: var(--fs-text-3);
  background: var(--fs-hover);
  border-color: var(--fs-border);
}

@media (max-width: 1023px) {
  .task-table-wrap .task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .task-row {
    border: 1px solid var(--fs-border);
    border-radius: 8px;
    box-shadow: var(--shadow-fs);
  }

  .task-row:last-child {
    border-bottom: 1px solid var(--fs-border);
  }
}

/* ============================================================
   G3 · 飞书生态数据层 / 同步 / 环境标签
   ============================================================ */

.im-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(51, 112, 255, 0.2);
  border-radius: 3px;
  background: var(--fs-surface);
  color: var(--fs-blue);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.page-intro-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-source {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 22px;
  margin-top: 2px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .page-intro-split {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ---------- 侧栏连接入口 ---------- */

.side-user-button {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.side-user-button:hover {
  background: var(--fs-blue-light);
}

/* ---------- 环境标签 ---------- */

.env-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.breadcrumb .env-tag {
  margin-left: 4px;
}

.env-strip {
  display: none;
  align-items: center;
  height: 26px;
  padding: 0 16px;
  background: var(--fs-bg);
  border-bottom: 1px solid var(--fs-divider);
}

@media (max-width: 1023px) {
  .env-strip {
    display: flex;
  }
}

/* ---------- 同步按钮 loading ---------- */

.sync-btn.is-loading {
  opacity: 1;
  cursor: progress;
}

.sync-btn.is-loading svg {
  animation: sync-spin 0.9s linear infinite;
}

.sync-btn:disabled {
  filter: none;
}

@keyframes sync-spin {
  to { transform: rotate(360deg); }
}

.sync-btn-mobile {
  width: 32px;
  padding: 0;
  flex: none;
}

.sync-btn-mobile .sync-label {
  display: none;
}

/* 移动端加载文案由 Toast 呈现，按钮保持图标宽度以避免顶栏溢出 */
.sync-btn-mobile.is-loading .sync-label {
  display: none;
}

/* ---------- 飞书上下文卡 ---------- */

.feishu-context {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(51, 112, 255, 0.14);
  border-radius: 8px;
  background: #F7F9FF;
}

.feishu-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fs-text);
  font-size: 12px;
  font-weight: 600;
}

.feishu-context-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--fs-divider);
  font-size: 12px;
  line-height: 18px;
}

.feishu-context-row > span {
  flex: none;
  color: var(--fs-text-3);
}

.feishu-context-row strong {
  min-width: 0;
  color: var(--fs-text);
  font-weight: 500;
  text-align: right;
}

.feishu-context-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(51, 112, 255, 0.08);
  color: var(--fs-text-3);
  font-size: 10.5px;
  line-height: 16px;
}

/* ---------- 飞书连接弹层 ---------- */

.feishu-connection-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
}

.feishu-connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
}

.feishu-connection-status strong {
  font-weight: 500;
}

.feishu-connection-status .source-tag {
  margin-left: auto;
}

.feishu-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fs-divider);
}

.feishu-account-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.feishu-account-name {
  color: var(--fs-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.feishu-account-dept {
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.feishu-block-title {
  margin-top: 14px;
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--fs-hover);
  color: var(--fs-text-2);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.feishu-sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fs-divider);
  color: var(--fs-text-3);
  font-size: 12px;
  line-height: 18px;
}

.feishu-sync-row strong {
  color: var(--fs-text-2);
  font-weight: 500;
}

.feishu-connect-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.feishu-connect-actions .btn {
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.feishu-guide-lead {
  margin-top: 16px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 21px;
}

.feishu-guide-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 20px;
}

.feishu-guide-list li + li {
  margin-top: 6px;
}

@media (max-width: 1023px) {
  .feishu-context-row {
    gap: 10px;
  }
}

/* ============================================================
   G4 · 飞书机器人卡片
   ============================================================ */

.sheet-card-preview {
  background: var(--fs-bg);
}

.card-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-preview-title {
  color: var(--fs-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.feishu-bot-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #DEE0E3;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.06), 0 8px 24px rgba(31, 35, 41, 0.05);
}

.feishu-bot-stripe {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--fs-text-3);
}

.feishu-bot-now .feishu-bot-stripe {
  background: var(--fs-now);
}

.feishu-bot-later .feishu-bot-stripe {
  background: var(--fs-blue);
}

.feishu-bot-silent .feishu-bot-stripe {
  background: var(--fs-text-3);
}

.feishu-bot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.feishu-bot-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--fs-text);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}

.feishu-bot-brand svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--fs-blue);
}

.feishu-bot-time {
  flex: none;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.feishu-bot-body {
  padding: 12px 16px 0;
}

.feishu-bot-sender-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.feishu-bot-sender {
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.feishu-bot-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feishu-bot-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.feishu-bot-score {
  color: var(--fs-now);
  font-size: 36px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feishu-bot-later .feishu-bot-score {
  color: var(--fs-later);
}

.feishu-bot-silent .feishu-bot-score {
  color: var(--fs-text-2);
}

.feishu-bot-score-label {
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.feishu-bot-reason {
  margin-top: 8px;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
}

.feishu-bot-context {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--fs-bg);
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 17px;
}

.feishu-bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

.feishu-bot-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--fs-border);
  border-radius: 6px;
  background: var(--fs-surface);
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 1;
}

.feishu-bot-btn.is-primary {
  border-color: var(--fs-blue);
  background: var(--fs-blue);
  color: #fff;
}

.feishu-bot-btn.is-text {
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  color: var(--fs-text-3);
}

.feishu-bot-foot {
  margin-top: 14px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--fs-divider);
  color: var(--fs-text-3);
  font-size: 10.5px;
  line-height: 16px;
}

.card-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.card-preview-actions .btn {
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  font-size: 12px;
}

.card-preview-close {
  width: 100%;
  margin-top: 6px;
}

/* 汇总页顶部的机器人卡片系统消息 */
.digest-system-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--fs-hover);
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.digest-system-notice::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--fs-blue);
}

/* AI 设置：默认服务商 */
.ai-provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--fs-border);
  border-radius: 6px;
  background: var(--fs-bg);
}

.ai-provider-label {
  display: block;
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 16px;
}

.ai-provider-name {
  display: block;
  margin-top: 2px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

/* ============================================================
   G5 · 生态叙事 / 关于 / 首次引导
   ============================================================ */

.side-about {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  margin-top: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fs-text-3);
  font-size: 11px;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}

.side-about svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.side-about:hover {
  background: var(--fs-hover);
  color: var(--fs-text-2);
}

.privacy-note {
  margin: 8px 0 0;
  color: var(--fs-text-3);
  font-size: 10.5px;
  line-height: 16px;
}

/* ---------- 关于 JEEV ---------- */

.about-ecosystem {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.eco-card {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-bg);
}

.eco-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--fs-blue-light);
  color: var(--fs-blue);
}

.eco-icon svg {
  width: 18px;
  height: 18px;
}

.eco-icon .reason-ico {
  width: 18px;
  height: 18px;
  margin-top: 0;
  color: currentColor;
  opacity: 1;
}

.eco-name {
  margin-top: 10px;
  color: var(--fs-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

.eco-desc {
  min-height: 51px;
  margin-top: 3px;
  color: var(--fs-text-2);
  font-size: 11px;
  line-height: 17px;
}

.eco-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 6px;
  border: 1px solid var(--fs-border);
  border-radius: 4px;
  background: var(--fs-surface);
  color: var(--fs-text-3);
  font-size: 10px;
  line-height: 15px;
}

.about-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--fs-divider);
  color: var(--fs-text-3);
  font-size: 11px;
  line-height: 17px;
}

.about-meta-dot {
  color: var(--fs-border);
}

.about-quote {
  margin-top: 9px;
  color: var(--fs-text-2);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 600px) {
  .about-ecosystem {
    grid-template-columns: 1fr;
  }

  .eco-desc {
    min-height: 0;
  }
}

/* ---------- 移动端触控尺寸校准（≥44px） ---------- */

@media (max-width: 1023px) {
  .schedule-toolbar .btn,
  .task-toolbar .btn,
  .gate-more-btn,
  .compose-actions .btn,
  .help-panel .btn,
  .card-preview-actions .btn,
  .card-preview-close,
  .feishu-connect-actions .btn,
  .ai-actions .btn,
  .sheet-actions .btn,
  .sheet-data .btn,
  .confirm-actions .btn,
  .detail-actions .btn {
    height: 44px;
    min-height: 44px;
  }

  .sheet-head .icon-btn,
  .drawer-head .icon-btn,
  .card-preview-head .icon-btn {
    width: 44px !important;
    height: 44px !important;
  }

  .day-btn {
    min-height: 44px;
  }

  .digest-mobile-tab {
    height: 44px;
  }

  .ack-btn {
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
  }

  .task-row .task-check {
    width: 44px;
    height: 44px;
  }

  .task-row .task-delete {
    width: 44px;
    height: 44px;
  }

  .feishu-bot-btn {
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .input,
  .select {
    min-height: 44px;
  }

  .sheet-form > .btn-block {
    height: 44px;
    min-height: 44px;
  }

  .compose-form .input {
    height: 44px;
  }

  .compose-form .textarea {
    min-height: 72px;
  }

  .schedule-day-card .course-delete {
    width: 44px;
    height: 44px;
  }

  .schedule-day-card .course.is-focused .course-main {
    padding-right: 50px;
  }

  .segmented {
    height: 48px;
  }

  .seg,
  .seg span {
    height: 44px;
  }
}

/* ============================================================
   手机优先骨架：唯一壳层（390×844 基准）
   桌面只显示手机预览框，不再有侧栏 / 三栏 / 固定底栏
   ============================================================ */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #F5F6F7;
  color: #1F2329;
  font: 14px/22px -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: none;
  display: none;
}

.phone-shell {
  width: 100%;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #F5F6F7;
  overflow: hidden;
}

#app .topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(44px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
  z-index: 20;
}

.topbar-brand {
  flex: none;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #1F2329;
}

#app .topbar .mode-pill {
  flex: none;
  height: 32px;
  margin-left: auto;
  padding: 2px;
}

#app .topbar .mode-btn {
  height: 28px;
  min-width: 44px;
  padding: 0 6px;
  font-size: 11px;
}

#app .topbar-action {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #646A73;
}

#app .topbar-action svg {
  width: 20px;
  height: 20px;
}

#app .topbar-action.is-loading svg {
  animation: sync-spin 0.9s linear infinite;
}

#app .page-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px 12px calc(72px + env(safe-area-inset-bottom));
}

#app .tabbar {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: none;
  display: flex;
  width: 100%;
  height: calc(56px + env(safe-area-inset-bottom));
  padding: 0 0 env(safe-area-inset-bottom);
  background: #FFFFFF;
  border-top: 1px solid #EFF0F1;
  transform: none;
  z-index: 30;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#app .tabbar-inner {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
}

#app .tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 56px;
  height: 56px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #646A73;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0;
}

#app .tab svg {
  width: 24px;
  height: 24px;
}

#app .tab.active {
  color: #3370FF;
}

#app .tab:active {
  opacity: 0.7;
}

#app .tab.active::after {
  display: none;
}

#app .tab.has-dot::before {
  content: "";
  position: absolute;
  top: 8px;
  right: calc(50% - 16px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3370FF;
  box-shadow: none;
}

#app .tab-badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #F54A45;
  color: #FFFFFF;
  font-size: 9px;
  line-height: 1;
}

#app .tab-badge[hidden] {
  display: none;
}

/* 桌面：只显示 390×844 手机预览框 */

.phone-caption {
  display: none;
}

@media (min-width: 600px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 0;
    background: #E5E6EB;
  }

  .phone-shell {
    width: 410px;
    height: 864px;
    padding: 10px;
    flex: none;
    background: #1F2329;
    border-radius: 54px;
    box-shadow: 0 24px 64px rgba(31, 35, 41, 0.22);
  }

  .phone-shell #app {
    width: 390px;
    max-width: 390px;
    height: 844px;
    border-radius: 44px;
  }

  .phone-caption {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #8F959E;
  }
}

/* 桌面矮屏：等比缩小预览框，保证整机与「手机预览」小字都在首屏内 */
@media (min-width: 600px) and (max-height: 940px) {
  body {
    padding: 10px 0;
  }

  .phone-shell {
    transform: scale(0.84);
    transform-origin: top center;
  }

  .phone-caption {
    position: fixed;
    right: 0;
    bottom: 6px;
    left: 0;
    margin: 0;
    text-align: center;
  }

  /* 飞书内打开时不缩放，铺满可用视口 */
  html.in-feishu .phone-shell {
    transform: none;
  }
}

@media (max-width: 599px) {
  body {
    display: block;
    padding: 0;
    background: #F5F6F7;
  }

  .phone-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-shell #app {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .phone-caption {
    display: none;
  }
}

/* 飞书内打开：不再套桌面预览框 */

html.in-feishu .phone-shell,
html.in-feishu .phone-shell #app {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

html.in-feishu .phone-caption {
  display: none;
}

/* ---------- 页面在手机框架内强制单列 ---------- */

#app .gate-page-head {
  display: none;
}

#app .status-card {
  display: block;
}

#app .door,
#app .door-sub {
  display: flex;
}

#app .gate-workbench {
  display: block;
}

#app .gate-list-pane {
  width: 100%;
}

#app .gate-list-head,
#app .gate-filter {
  display: none;
}

#app .msg-list {
  gap: 8px;
}

#app .msg-card {
  padding: 13px 14px;
}

/* 课表：单日时间轴，不要桌面周表格 */

#app .schedule-toolbar .week-switch,
#app .schedule-toolbar .view-switch {
  display: none;
}

#app .schedule-layout {
  display: block;
}

#app .schedule-agenda {
  display: none;
}

#app .schedule-week-view {
  display: none !important;
}

#app .schedule-day-view {
  display: block !important;
}

#app .schedule-day-card {
  padding: 10px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* 任务：单列卡片，不要桌面对齐表格 */

#app .task-table-wrap {
  overflow: visible;
  border: 0;
  background: transparent;
}

#app .task-table-head {
  display: none;
}

#app .task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

#app .task-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  background: var(--fs-surface);
  box-shadow: var(--shadow-fs);
}

#app .task-row:last-child {
  border-bottom: 1px solid var(--fs-border);
}

#app .task-check-cell {
  order: 0;
  flex: none;
}

#app .task-name-cell {
  order: 1;
  flex: 1;
  min-width: 0;
}

#app .task-priority-cell {
  order: 2;
  flex: none;
}

#app .task-due-cell {
  order: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding-left: 40px;
}

#app .task-due-cell .pressure {
  display: inline-flex;
}

#app .task-mobile-meta {
  display: block;
  margin-top: 2px;
  color: var(--fs-text-3);
  font-size: 10.5px;
  line-height: 16px;
}

#app .task-source-cell {
  order: 4;
  flex: none;
}

#app .task-status-cell {
  order: 5;
  flex: none;
}

#app .task-action-cell {
  order: 6;
  margin-left: auto;
}

#app .task-row .task-title {
  overflow: visible;
  font-size: 14px;
  line-height: 21px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app .task-row .task-check {
  width: 44px;
  height: 44px;
}

#app .task-row .task-delete {
  width: 44px;
  height: 44px;
}

#app .task-row.done {
  opacity: 0.6;
}

/* 汇总：单列 + 分组切换 */

#app .digest-mobile-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  padding: 2px;
  border-radius: 6px;
  background: var(--fs-hover);
}

#app .digest-mobile-tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fs-text-2);
  font-size: 12px;
}

#app .digest-mobile-tab.active {
  background: var(--fs-surface);
  color: var(--fs-blue);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
  font-weight: 500;
}

#app .digest-columns {
  display: block;
}

#app .digest-section {
  display: none;
}

#app .digest-section.active {
  display: block;
}

#app .digest-grid {
  gap: 10px;
}

#app .digest-card {
  padding: 12px;
}

#app .digest-fixed-quote {
  position: static;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 8px 16px;
  transform: none;
  font-size: 11px;
  background: transparent;
}

/* 壳内浮层：跟随手机框，不跟随浏览器窗口 */

#app .overlay {
  position: absolute;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  z-index: 80;
}

#app .sheet {
  width: 100%;
  max-width: 100%;
  max-height: 88%;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
}

#app .toast-root {
  position: absolute;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom));
  left: 0;
  padding: 0 16px;
  z-index: 100;
}

#app #demoEnd {
  position: absolute;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 45;
  pointer-events: none;
}

#app .end-wrap {
  position: static;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: none;
  padding: 0 12px 8px;
  transform: none;
}

#app .end-banner {
  max-width: none;
}

body.has-end-banner #app .page-container {
  padding-bottom: 96px;
}

#app .demo-bar {
  max-width: none;
  margin: 0;
  padding: 10px 16px;
}

#app .demo-stop {
  height: 44px;
}

/* ============================================================
   消息台手机版重做（仅消息台）
   ============================================================ */

#app .topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.topbar-tag {
  flex: none;
  padding: 1px 5px;
  border-radius: 4px;
  background: #EAF2FF;
  color: #3370FF;
  font-size: 10px;
  line-height: 14px;
}

.topbar-env {
  flex: none;
  display: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: #EAF2FF;
  color: #3370FF;
  font-size: 10px;
  line-height: 14px;
}

html.in-feishu .topbar-tag {
  display: none;
}

html.in-feishu .topbar-env {
  display: inline-flex;
}

.demo-scene-tag {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #FFE0B2;
  border-radius: 11px;
  background: #FFF6E9;
  color: #D97706;
  font-size: 10px;
  line-height: 20px;
}

.demo-scene-tag[hidden] {
  display: none;
}

#app .topbar-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

#app .topbar-action:active {
  background: #F2F3F5;
  opacity: 0.9;
}

/* 页面左右 12px：抵消 page-container 的 16px */

#app .gate-page {
  width: auto;
  margin: 0;
}

/* 值守状态卡 */

#app .gate-status {
  position: relative;
  overflow: hidden;
  margin: 0 0 10px;
  padding: 16px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}

#app .gate-status::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -34px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 92, 0.18) 0%, rgba(255, 176, 92, 0) 70%);
  pointer-events: none;
}

#app .gate-status-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#app .gate-status-date {
  color: #1F2329;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

#app .gate-status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2EA121;
  font-size: 11px;
  line-height: 16px;
}

#app .gate-status-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C724;
  box-shadow: 0 0 0 3px rgba(52, 199, 36, 0.12);
}

#app .gate-mode {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 2px;
  width: 100%;
  height: 32px;
  margin: 12px 0 10px;
  padding: 2px;
  border-radius: 6px;
  background: #F2F3F5;
}

#app .gate-mode .mode-btn {
  flex: 1;
  height: 28px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #646A73;
  font-size: 12px;
  line-height: 28px;
}

#app .gate-mode .mode-btn.active {
  background: #FFFFFF;
  color: #3370FF;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
}

#app .gate-mode .mode-btn:active {
  opacity: 0.7;
}

#app .gate-status-context {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#app .gate-status-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #8F959E;
  font-size: 12px;
  line-height: 20px;
}

#app .gate-status-stats strong {
  margin-left: 2px;
  color: #1F2329;
  font-size: 17px;
  line-height: 20px;
  font-weight: 600;
}

#app .gate-status-stats strong.is-pass {
  color: #2EA121;
}

#app .gate-stat-sep {
  color: #C9CDD4;
}

/* 模拟消息入口 */

#app .gate-quick {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 2px;
}

#app .gate-quick-btn {
  min-height: 32px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
  line-height: 20px;
}

#app .gate-quick-btn:active {
  opacity: 0.6;
}

/* 门口 + 值守 + 筛选 */

#app .gate-door {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
}

#app .gate-door-line {
  flex: 1;
  height: 1px;
  background: #DEE0E3;
}

#app .gate-door-label {
  flex: none;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

#app .gate-watch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 8px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .gate-watch i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3370FF;
  animation: gate-pulse 2s ease-in-out infinite;
}

@keyframes gate-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

#app .gate-chips {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  padding: 2px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#app .gate-chips::-webkit-scrollbar {
  display: none;
}

#app .gate-chip {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #DEE0E3;
  border-radius: 14px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  line-height: 26px;
  white-space: nowrap;
}

#app .gate-chip span {
  margin-left: 4px;
  color: #8F959E;
  font-size: 11px;
}

#app .gate-chip.active {
  border-color: #C9DCFF;
  background: #EAF2FF;
  color: #3370FF;
}

#app .gate-chip.active span {
  color: #3370FF;
}

#app .gate-chip:active {
  transform: scale(0.97);
}

/* 消息卡 */

#app .msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#app .gate-msg {
  display: block;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F2329;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}

#app .gate-msg.now {
  border-color: #FFE3C2;
  border-left: 3px solid #FF9F45;
  background: #FFF9F1;
  padding-left: 9px;
  box-shadow: none;
}

#app .gate-msg.later {
  border-color: #EFF0F1;
  background: #FFFFFF;
}

#app .gate-msg.silent {
  opacity: 0.6;
  background: #FFFFFF;
}

#app .gate-msg.hero {
  box-shadow: 0 0 0 2px rgba(255, 159, 69, 0.16);
}

#app .gate-msg.selected {
  border-color: #BFD6FF;
  background: #F7FAFF;
}

#app .gate-msg.now.selected {
  border-color: #FFE3C2;
  border-left-color: #FF9F45;
  background: #FFF9F1;
  box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
}

#app .gate-msg.judging {
  border-style: dashed;
  border-color: #DEE0E3;
  background: #FFFFFF;
  opacity: 1;
}

#app .gate-msg:active {
  opacity: 0.92;
  transform: scale(0.985);
}

#app .gate-msg-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#app .gate-msg .avatar {
  flex: none;
  width: 36px;
  height: 36px;
  font-size: 13px;
}

#app .gate-msg-meta {
  flex: 1;
  min-width: 0;
}

#app .gate-msg-sender {
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .gate-msg-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  min-height: 18px;
}

#app .gate-msg-sub .source-tag {
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 18px;
}

#app .gate-msg-time {
  flex: none;
  color: #8F959E;
  font-size: 11px;
  line-height: 18px;
}

#app .gate-msg-content {
  display: -webkit-box;
  margin: 8px 0 10px;
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  line-height: 21px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

#app .gate-msg-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

#app .gate-ring {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}

#app .gate-ring svg {
  width: 40px;
  height: 40px;
}

#app .gate-ring .ring-score {
  color: #1F2329;
  font-size: 12px;
  font-weight: 600;
}

#app .gate-ring.judging-ring {
  width: 40px;
  height: 40px;
}

#app .gate-msg-reason {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #646A73;
  font-size: 12px;
  line-height: 17px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

#app .gate-msg .action-tag {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 20px;
  font-weight: 500;
  box-shadow: none;
}

#app .gate-msg .tag-now {
  border: 1px solid #FFE0B2;
  background: #FFF1DF;
  color: #D97706;
}

#app .gate-msg .tag-later {
  border: 1px solid #C9DCFF;
  background: #EAF2FF;
  color: #3370FF;
}

#app .gate-msg .tag-silent {
  border: 1px solid #EFF0F1;
  background: #F5F6F7;
  color: #8F959E;
}

#app .gate-msg .tag-judging {
  border: 1px solid #EFF0F1;
  background: #F5F6F7;
  color: #8F959E;
}

/* 新消息高亮 */

#app .gate-msg.now::after {
  display: none;
}

#app .gate-msg .ring-progress {
  transition-duration: 0.5s;
}

#app .gate-msg.just-in {
  animation: gate-just-in 1s ease-out both;
}

@keyframes gate-just-in {
  0% {
    background: #EAF2FF;
    border-color: #BFD6FF;
  }
  100% {
    background: #FFFFFF;
    border-color: #EFF0F1;
  }
}

#app .gate-msg.now.just-in {
  animation: gate-just-in-now 1s ease-out both;
}

@keyframes gate-just-in-now {
  0% { background: #EAF2FF; border-color: #BFD6FF; }
  100% { background: #FFF9F1; border-color: #FFE3C2; }
}

/* 空状态 */

#app .gate-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px;
  color: #C9CDD4;
}

#app .gate-empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
}

#app .gate-empty-title {
  margin: 0;
  color: #646A73;
  font-size: 14px;
  line-height: 22px;
}

#app .gate-empty-sub {
  margin: 2px 0 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 20px;
}

/* 演示旁白与结束卡 */

#app .narration {
  position: static;
  width: auto;
  max-width: none;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid #FFE0B2;
  border-radius: 8px;
  background: #FFF6E9;
  box-shadow: none;
}

#app .narration-label {
  display: block;
  margin-bottom: 4px;
  color: #D97706;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.08em;
}

#app .narration-text {
  margin: 0;
  color: #1F2329;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

#app .demo-end-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid #C9DCFF;
  border-radius: 8px;
  background: #EAF2FF;
  text-align: left;
}

#app .demo-end-card:active {
  opacity: 0.9;
}

#app .demo-end-label {
  width: 100%;
  color: #3370FF;
  font-size: 11px;
  line-height: 16px;
}

#app .demo-end-text {
  flex: 1;
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

#app .demo-end-arrow {
  color: #3370FF;
  font-size: 16px;
  line-height: 20px;
}

/* 全屏判断详情 */

#detailRoot {
  position: absolute;
  inset: 0;
  z-index: 75;
  pointer-events: none;
}

#detailRoot.open {
  pointer-events: auto;
}

#app.detail-open .tabbar {
  visibility: hidden;
}

#app .detail-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #F5F6F7;
  animation: detail-in 0.2s ease-out both;
}

@keyframes detail-in {
  from { transform: translateX(18px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#app .detail-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: calc(44px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 4px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
}

#app .detail-nav-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
}

#app .detail-nav-btn svg {
  width: 22px;
  height: 22px;
}

#app .detail-nav-btn:active {
  background: #F2F3F5;
}

#app .detail-nav-title {
  flex: 1;
  color: #1F2329;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  text-align: center;
}

#app .detail-nav-spacer {
  flex: none;
  width: 44px;
}

#app .detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 12px 120px;
}

#app .detail-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .detail-identity-main {
  flex: 1;
  min-width: 0;
}

#app .detail-identity .avatar {
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 15px;
}

#app .detail-sender {
  color: #1F2329;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

#app .detail-identity-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

#app .detail-identity-sub .source-tag {
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 18px;
}

#app .detail-time {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
  padding: 16px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .detail-hero-ring {
  flex: none;
}

#app .detail-hero-main {
  flex: 1;
  min-width: 0;
}

#app .detail-hero-main .action-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 20px;
}

#app .detail-hero-main .tag-now {
  border: 1px solid #FFE0B2;
  background: #FFF1DF;
  color: #D97706;
}

#app .detail-hero-main .tag-later {
  border: 1px solid #C9DCFF;
  background: #EAF2FF;
  color: #3370FF;
}

#app .detail-hero-main .tag-silent {
  border: 1px solid #EFF0F1;
  background: #F5F6F7;
  color: #8F959E;
}

#app .detail-hero-reason {
  margin: 8px 0 0;
  color: #1F2329;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

#app .detail-block {
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .detail-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#app .detail-block-head h2,
#app .detail-block-head span {
  margin: 0;
  color: #1F2329;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

#app .judge-source {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
}

#app .detail-basis-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #F2F3F5;
}

#app .detail-basis-row span {
  flex: none;
  width: 76px;
  color: #8F959E;
  font-size: 12px;
  line-height: 20px;
}

#app .detail-basis-row strong {
  flex: 1;
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

#app .detail-copy {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #DEE0E3;
  border-radius: 4px;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 11px;
  line-height: 26px;
}

#app .detail-copy:active {
  background: #F2F3F5;
}

#app .detail-original-text {
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: #F5F6F7;
  color: #1F2329;
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#app .detail-pending-block {
  margin: 0 0 10px;
  padding: 28px 16px;
  border: 1px dashed #DEE0E3;
  border-radius: 8px;
  background: #FFFFFF;
  color: #8F959E;
  text-align: center;
}

#app .detail-pending-block p {
  margin: 6px 0 0;
  font-size: 13px;
}

#app .detail-page .feishu-context {
  margin: 0 0 10px;
}

#app .detail-bar {
  flex: none;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid #EFF0F1;
}

#app .detail-bar-row {
  display: flex;
  gap: 8px;
}

#app .detail-choice {
  flex: 1;
  height: 44px;
  padding: 0;
  border: 1px solid #DEE0E3;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 14px;
}

#app .detail-choice.is-primary {
  border-color: #3370FF;
  background: #3370FF;
  color: #FFFFFF;
  font-weight: 500;
}

#app .detail-choice.is-secondary {
  border-color: #C9DCFF;
  background: #F7FAFF;
  color: #3370FF;
}

#app .detail-choice.is-text {
  flex: none;
  width: 56px;
  border-color: transparent;
  color: #646A73;
}

#app .detail-choice:active {
  opacity: 0.86;
}

#app .detail-send-link {
  display: block;
  width: 100%;
  height: 40px;
  margin: 4px 0 0;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
  line-height: 40px;
  text-align: center;
}

#app .detail-send-link:active {
  opacity: 0.6;
}

/* 更多菜单与模拟消息抽屉 */

#app .sheet-grabber {
  width: 36px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 2px;
  background: #DEE0E3;
}

#app .sheet.sheet-more {
  max-height: 72%;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom));
}

#app .more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 6px 16px;
}

#app .more-head .sheet-title {
  margin: 0;
}

#app .more-list {
  display: flex;
  flex-direction: column;
}

#app .more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 0;
  border-top: 1px solid #F2F3F5;
  background: #FFFFFF;
  text-align: left;
}

#app .more-item:active {
  background: #F5F6F7;
}

#app .more-item-main {
  flex: 1;
  min-width: 0;
}

#app .more-item-title {
  display: block;
  color: #1F2329;
  font-size: 15px;
  line-height: 22px;
}

#app .more-item-sub {
  display: block;
  margin-top: 1px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .more-item-arrow {
  flex: none;
  color: #C9CDD4;
  font-size: 18px;
  line-height: 24px;
}

#app .more-item.is-danger .more-item-title {
  color: #D83931;
}

#app .sheet.sheet-compose {
  display: flex;
  flex-direction: column;
  height: 85%;
  max-height: 85%;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}

#app .compose-sheet-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}

#app .compose-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
}

#app .compose-field .input,
#app .compose-field .textarea {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #DEE0E3;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 16px;
  line-height: 22px;
}

#app .compose-field .textarea {
  height: 96px;
  resize: none;
}

#app .compose-submit {
  flex: none;
  height: 44px;
  border-radius: 6px;
  font-size: 15px;
}

#app .compose-tip {
  margin: 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

/* ============================================================
   课表 / 任务 / 汇总：手机单列（不改消息台）
   ============================================================ */

/* 页头与通用卡片 */

#app .m-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 12px;
}

#app .m-page-title {
  margin: 0;
  color: #1F2329;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

#app .m-page-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

#app .m-head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3370FF;
  font-size: 14px;
  line-height: 20px;
}

#app .m-head-btn:active {
  background: #F2F3F5;
}

#app .m-head-icon {
  width: 44px;
  padding: 0;
  color: #1F2329;
}

#app .m-head-icon svg {
  width: 22px;
  height: 22px;
}

#app .m-page-quote {
  margin: 18px 0 4px;
  color: #8F959E;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-align: center;
}

#app .m-stat-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
}

#app .m-stat-text {
  margin: 0;
  color: #646A73;
  font-size: 13px;
  line-height: 20px;
}

#app .m-stat-text strong {
  color: #1F2329;
  font-weight: 600;
}

#app .m-stat-quote {
  margin: 4px 0 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

/* 课表 */

#app .week-pills {
  display: flex;
  gap: 4px;
  margin: 0 0 10px;
}

#app .week-pill {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 52px;
  padding: 0 2px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #646A73;
}

#app .week-pill-name {
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

#app .week-pill-date {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
}

#app .week-pill.active {
  border-color: #C9DCFF;
  background: #EAF2FF;
  color: #3370FF;
}

#app .week-pill.active .week-pill-date {
  color: #3370FF;
}

#app .week-pill:active {
  opacity: 0.75;
}

#app .sched-status {
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
}

#app .sched-status.is-focus {
  border-color: #FFE3C2;
  background: #FFF9F1;
}

#app .sched-status .schedule-now {
  color: #D97706;
  font-weight: 600;
}

#app .sched-status .schedule-sep {
  margin: 0 4px;
  color: #C9CDD4;
}

#app .sched-status .schedule-focus-live {
  color: #1F2329;
}

#app .sched-status .schedule-idle {
  color: #8F959E;
}

#app .sched-card {
  margin: 0;
  padding: 12px 12px 12px 10px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
}

#app .sched-card .timeline {
  margin: 0;
}

#app .timeline {
  position: relative;
}

#app .tl-hour {
  position: absolute;
  left: 0;
  width: 34px;
  transform: translateY(-50%);
  color: #8F959E;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0;
  text-align: right;
}

#app .tl-hour.first {
  transform: translateY(0);
}

#app .tl-hour.last {
  transform: translateY(-100%);
}

#app .tl-line {
  position: absolute;
  left: 42px;
  right: 0;
  height: 1px;
  background: #F2F3F5;
}

#app .tl-courses {
  position: absolute;
  inset: 0 0 0 42px;
}

#app .course {
  position: absolute;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-left: 3px solid #3370FF;
  border-radius: 8px;
  background: #EAF2FF;
  color: #1F2329;
}

#app .course.focus {
  border-left-color: #FF9F45;
  background: #FFF3E3;
}

#app .course-main {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}

#app .course-main-static {
  cursor: default;
}

#app .course-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #1F2329;
  font-size: 12.5px;
  line-height: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .course-meta {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  overflow: hidden;
  color: #646A73;
  font-size: 10.5px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .course.focus .course-name {
  color: #8A4B0F;
}

#app .course.focus .course-meta {
  color: #B4690E;
}

#app .tl-now {
  position: absolute;
  left: 42px;
  right: 0;
  z-index: 3;
  border-top: 1px solid #3370FF;
  pointer-events: none;
}

#app .tl-now::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3370FF;
  box-shadow: 0 0 0 2px #FFFFFF;
}

#app .tl-now span {
  display: none;
}

/* 任务 */

#app .task-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#app .task-card {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 12px 6px 6px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
}

#app .task-card.done {
  opacity: 0.6;
}

#app .task-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

#app .task-check .check-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #C9CDD4;
  border-radius: 50%;
  color: #FFFFFF;
}

#app .task-check[aria-checked="true"] .check-box {
  border-color: #3370FF;
  background: #3370FF;
}

#app .task-check .check-box svg {
  width: 13px;
  height: 13px;
}

#app .task-card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

#app .task-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#app .task-card-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1F2329;
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .task-card.done .task-card-title {
  color: #8F959E;
  text-decoration: line-through;
}

#app .task-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 11px;
  line-height: 20px;
}

#app .task-tag.is-important {
  background: #FFF7E6;
  color: #D46B08;
}

#app .task-card-meta {
  color: #8F959E;
  font-size: 12px;
  line-height: 17px;
}

#app .task-card-meta > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .task-card-meta .source-tag {
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 18px;
}

#app .task-done-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin: 12px 0 8px;
  padding: 0 4px;
  border: 0;
  border-top: 1px solid #EFF0F1;
  background: transparent;
  color: #646A73;
  font-size: 12px;
  line-height: 20px;
}

#app .task-done-action {
  color: #3370FF;
}

#app .task-empty {
  padding: 28px 12px;
  border: 1px dashed #DEE0E3;
  border-radius: 8px;
  color: #8F959E;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

/* 汇总 */

#app .digest-seg {
  display: flex;
  gap: 2px;
  width: 100%;
  margin: 0 0 12px;
  padding: 2px;
  border-radius: 8px;
  background: #F2F3F5;
}

#app .digest-seg-btn {
  flex: 1;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #646A73;
  font-size: 13px;
  line-height: 44px;
}

#app .digest-seg-btn.active {
  background: #FFFFFF;
  color: #3370FF;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
}

#app .digest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#app .digest-msg {
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#app .digest-msg.now {
  padding-left: 9px;
  border-left: 3px solid #FF9F45;
  background: #FFFDF9;
}

#app .digest-msg.silent {
  background: #FBFBFC;
}

#app .digest-msg.leaving {
  opacity: 0;
  transform: translateX(12px);
}

#app .digest-msg-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#app .digest-msg .avatar {
  flex: none;
  width: 36px;
  height: 36px;
  font-size: 13px;
}

#app .digest-msg-meta {
  flex: 1;
  min-width: 0;
}

#app .digest-msg-sender {
  display: block;
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .digest-msg-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  min-height: 18px;
}

#app .digest-msg-sub .source-tag {
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 18px;
}

#app .digest-msg-judge {
  color: #8F959E;
  font-size: 10px;
  line-height: 18px;
}

#app .digest-score {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 24px;
  font-weight: 600;
}

#app .digest-score small {
  font-size: 9px;
  font-weight: 400;
}

#app .digest-score.now {
  background: #FFF1DF;
  color: #D97706;
}

#app .digest-score.later {
  background: #EAF2FF;
  color: #3370FF;
}

#app .digest-score.silent {
  background: #F2F3F5;
  color: #8F959E;
}

#app .digest-msg-text {
  margin: 8px 0 0;
  color: #1F2329;
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

#app .digest-msg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #F7F8FA;
}

#app .digest-msg-reason {
  flex: 1;
  min-width: 0;
  color: #646A73;
  font-size: 12px;
  line-height: 17px;
}

#app .digest-ack {
  flex: none;
  min-width: 44px;
  height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 13px;
  line-height: 44px;
}

#app .digest-ack:active {
  opacity: 0.6;
}

#app .digest-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px;
  color: #C9CDD4;
}

#app .digest-empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
}

#app .digest-empty-title {
  margin: 0;
  color: #646A73;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}

/* 手机端抽屉表单与课程详情 */

#app .sheet .more-head {
  padding: 0 0 10px;
}

#app .sheet .icon-btn {
  width: 44px;
  height: 44px;
}

#app .sheet .input,
#app .sheet .select {
  height: 44px;
  padding: 0 12px;
  font-size: 16px;
  border-radius: 6px;
}

#app .sheet .textarea {
  font-size: 16px;
}

#app .sheet .btn-block {
  min-height: 44px;
  height: 44px;
  border-radius: 6px;
  font-size: 15px;
}

#app .sheet .segmented {
  height: 44px;
}

#app .sheet .seg span {
  height: 40px;
}

#app .course-detail {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

#app .course-detail-name {
  margin: 0 0 10px;
  color: #1F2329;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}

#app .course-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-top: 1px solid #F2F3F5;
  color: #646A73;
  font-size: 13px;
}

#app .course-detail-row strong {
  color: #1F2329;
  font-size: 14px;
  font-weight: 400;
  text-align: right;
}

#app .btn-danger {
  margin-top: 14px;
  border: 1px solid #F54A45;
  background: #FFFFFF;
  color: #F54A45;
}

#app .btn-danger:active {
  background: #FFF1F0;
}

/* ============================================================
   设置 / AI / 飞书 / 卡片预览 / 关于：手机全屏页
   ============================================================ */

#pageStackRoot {
  position: absolute;
  inset: 0;
  z-index: 76;
  display: none;
}

#pageStackRoot.open {
  display: block;
}

#app .m-fullpage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #F5F6F7;
  color: #1F2329;
  animation: pageStackIn var(--dur-push) var(--ease-ios);
}

@keyframes pageStackIn {
  from { opacity: 0.4; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

#app .m-fullpage-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
}

#app .m-fullpage-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
}

#app .m-fullpage-back svg {
  width: 22px;
  height: 22px;
}

#app .m-fullpage-back:active {
  background: #F2F3F5;
}

#app .m-fullpage-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1F2329;
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .m-fullpage-spacer {
  flex: none;
  width: 44px;
  height: 44px;
}

#app .m-fullpage-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px calc(24px + env(safe-area-inset-bottom));
}

#app .m-fullpage-footer {
  flex: none;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid #EFF0F1;
}

/* 设置主页 */

#app .m-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#app .m-settings-group {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .m-settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid #F2F3F5;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 15px;
  line-height: 22px;
  text-align: left;
}

#app .m-settings-group .m-settings-row:last-child {
  border-bottom: 0;
}

#app .m-settings-row:active {
  background: #F7F8FA;
}

#app .m-settings-label {
  flex: 1;
  min-width: 0;
}

#app .m-settings-value {
  color: #8F959E;
  font-size: 12px;
}

#app .m-settings-arrow {
  flex: none;
  color: #C9CDD4;
  font-size: 18px;
  line-height: 18px;
}

#app .m-settings-row.is-danger {
  color: #D83931;
}

#app .m-settings-note {
  margin: 20px 4px 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
}

/* AI 设置 */

#app .m-ai-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#app .m-provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #C9DCFF;
  border-radius: 8px;
  background: #F5F9FF;
}

#app .m-provider-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #3370FF;
  color: #FFFFFF;
}

#app .m-provider-icon svg {
  width: 20px;
  height: 20px;
}

#app .m-provider-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#app .m-provider-main strong {
  color: #1F2329;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

#app .m-provider-main small {
  color: #8F959E;
  font-size: 11px;
}

#app .m-provider-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3370FF;
  color: #FFFFFF;
}

#app .m-provider-check svg {
  width: 13px;
  height: 13px;
}

#app .m-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#app .m-field > span {
  color: #646A73;
  font-size: 12px;
  line-height: 17px;
}

#app .m-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #DEE0E3;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 16px;
  line-height: 44px;
}

#app .m-input:focus {
  outline: none;
  border-color: #3370FF;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

#app .m-input-wrap {
  position: relative;
  display: block;
}

#app .m-input-wrap .m-input {
  padding-right: 44px;
}

#app .m-eye {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8F959E;
}

#app .m-eye svg {
  width: 20px;
  height: 20px;
}

#app .m-help {
  margin: 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .m-ai-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#app .m-btn {
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
}

#app .m-btn-text {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #D83931;
  font-size: 13px;
}

#app .m-btn-block {
  width: 100%;
  min-height: 44px;
  height: 44px;
  border-radius: 6px;
  font-size: 15px;
}

#app .ai-test-result {
  margin: 0;
  min-height: 0;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
}

#app .ai-test-result:empty {
  display: none;
}

/* 飞书连接 */

#app .m-feishu-status {
  padding: 16px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .m-feishu-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
}

#app .m-status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34C724;
  box-shadow: 0 0 0 3px rgba(52, 199, 36, 0.12);
}

#app .m-feishu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F2F3F5;
}

#app .m-feishu-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 15px;
}

#app .m-feishu-user-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#app .m-feishu-user-main strong {
  color: #1F2329;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

#app .m-feishu-user-main small {
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .m-feishu-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F2F3F5;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .m-feishu-meta strong {
  color: #646A73;
  font-weight: 400;
}

#app .m-list-group {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .m-perm-list {
  margin-top: 12px;
}

#app .m-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #F2F3F5;
  color: #1F2329;
  font-size: 14px;
}

#app .m-perm-row:last-child {
  border-bottom: 0;
}

#app .m-perm-ok {
  flex: none;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: #E8F8E5;
  color: #2EA121;
  font-size: 11px;
  line-height: 20px;
}

#app .m-perm-ok.is-off {
  background: #F2F3F5;
  color: #8F959E;
}

#app .m-feishu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

#app .m-feishu-actions .btn-text {
  height: 44px;
  color: #3370FF;
  font-size: 14px;
}

#app .feishu-guide-lead {
  margin: 0 0 10px;
  color: #1F2329;
  font-size: 13px;
  line-height: 20px;
}

#app .feishu-guide-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: #646A73;
  font-size: 12px;
  line-height: 19px;
}

#app .feishu-guide-list li {
  margin-bottom: 8px;
}

/* 机器人卡片预览 */

#app .m-cardpreview-body {
  padding-top: 4px;
}

#app .m-cardpreview-body .feishu-bot-card {
  width: 100%;
  margin: 0;
}

#app .m-footer-row {
  display: flex;
  gap: 10px;
}

#app .m-footer-row .m-btn {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
}

/* 关于 JEEV */

#app .m-about-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px 22px;
}

#app .m-about-wordmark {
  color: #1F2329;
  font-size: 34px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

#app .m-about-tagline {
  margin-top: 6px;
  color: #646A73;
  font-size: 13px;
  line-height: 19px;
}

#app .m-about-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: 12px;
  background: #EAF2FF;
  color: #3370FF;
  font-size: 11px;
  line-height: 24px;
}

#app .m-eco-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#app .m-eco-card {
  padding: 14px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
}

#app .m-eco-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

#app .m-eco-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #F2F6FF;
  color: #3370FF;
}

#app .m-eco-icon svg {
  width: 17px;
  height: 17px;
}

#app .m-eco-name {
  color: #1F2329;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

#app .m-eco-desc {
  margin: 8px 0 10px;
  color: #646A73;
  font-size: 13px;
  line-height: 19px;
}

#app .m-eco-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 11px;
  line-height: 22px;
}

#app .m-about-meta {
  margin: 20px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
}

/* ============================================================
   手机端工程细节：触控、安全区、滚动、可访问性
   ============================================================ */

/* 触控与点击反馈 */

html,
body {
  touch-action: manipulation;
}

#app button,
#app [role="button"],
#app a,
#app input,
#app textarea,
#app select {
  touch-action: manipulation;
}

#app button:active,
#app [role="button"]:active,
#app a:active {
  opacity: 0.7;
}

#app .gate-chip {
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  line-height: 42px;
}

#app .gate-quick-btn {
  min-height: 44px;
  padding: 8px 6px;
}

#app .gate-filter-btn {
  height: 44px;
  padding: 0 12px;
}

#app .btn-text {
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
}

#app .detail-copy {
  height: 44px;
  padding: 0 12px;
  line-height: 42px;
}

#app .detail-send-link {
  height: 44px;
  line-height: 44px;
}

#app .feishu-bot-btn {
  height: 44px;
  padding: 0 14px;
}

#app .ack-btn {
  height: 44px;
  padding: 0 12px;
}

#app .task-card-main {
  min-height: 44px;
}

#app .icon-btn {
  width: 44px;
  height: 44px;
}

/* 模式切换胶囊：保证可点击高度 44px */
#app .gate-mode {
  height: 44px;
}

#app .gate-mode .mode-btn {
  height: 44px;
  line-height: 44px;
}

/* 输入框统一 16px，避免 iOS 聚焦放大 */

#app input,
#app textarea,
#app select,
#app .input,
#app .textarea,
#app .select {
  font-size: 16px;
}

/* 安全区与滚动 */

#app.modal-open .page-container {
  overflow: hidden;
}

#app .sheet {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#app .gate-msg.silent {
  --card-opacity: 0.85;
  opacity: 0.85;
}

/* 长文本与 URL 不撑破布局 */

#app .gate-msg-content,
#app .gate-msg-reason,
#app .digest-msg-text,
#app .digest-msg-reason,
#app .course-name,
#app .course-meta,
#app .m-input,
#app .m-settings-value,
#app .m-eco-desc,
#app .detail-original-text,
#app .detail-message-text,
#app .feishu-bot-summary {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 图标统一描边，按钮图标接近 24px */

#app .icon-btn svg,
#app .m-fullpage-back svg,
#app .m-head-icon svg,
#app .m-eye svg,
#app .detail-nav-btn svg,
#app .topbar-action svg {
  stroke-width: 1.5;
}

#app .icon-btn svg,
#app .m-fullpage-back svg,
#app .m-head-icon svg,
#app .m-eye svg,
#app .detail-nav-btn svg {
  width: 24px;
  height: 24px;
}

/* 横屏轻提示 */

@media (orientation: landscape) and (max-height: 500px) {
  #app::after {
    content: "建议竖屏使用";
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 200;
    transform: translateX(-50%);
    padding: 5px 12px;
    border-radius: 14px;
    background: rgba(31, 35, 41, 0.82);
    color: #FFFFFF;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
    pointer-events: none;
  }
}

/* ============================== 课表 · 手机周视图 ============================== */

#app[data-tab="schedule"] > .topbar {
  display: none;
}

#app[data-tab="schedule"] .page-container {
  padding: 0 8px calc(72px + env(safe-area-inset-bottom));
  background:
    radial-gradient(420px 260px at 88% -6%, rgba(245, 185, 107, 0.10), transparent 68%),
    linear-gradient(180deg, #EAF1FB 0%, #F5F6F7 42%, #F5F6F7 100%);
}

#app .m-sched-page {
  --sched-time-col: 44px;
  --sched-gap: 4px;
  --sched-row: 52px;
  padding-bottom: 10px;
}

#app .m-sched-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -8px;
  padding: env(safe-area-inset-top) 8px 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(31, 35, 41, 0.04);
}

#app .m-sched-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 48px;
}

#app .m-sched-heading {
  min-width: 0;
}

#app .m-sched-title {
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

#app .m-sched-sub {
  margin-top: 1px;
  color: #646A73;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
}

#app .m-sched-actions {
  display: flex;
  flex: none;
  gap: 2px;
}

#app .m-sched-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #646A73;
  transition: opacity 0.15s ease;
}

#app .m-sched-icon svg {
  width: 24px;
  height: 24px;
}

#app .m-sched-icon:active {
  opacity: 0.7;
}

#app .m-week-strip {
  display: grid;
  grid-template-columns: var(--sched-time-col) repeat(7, minmax(0, 1fr));
  gap: var(--sched-gap);
  align-items: center;
  height: 64px;
  padding-bottom: 2px;
}

#app .m-week-month {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

#app .m-week-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 52px;
  min-width: 0;
  border-radius: 12px;
  color: #646A73;
}

#app .m-week-day-name {
  font-size: 10px;
  line-height: 13px;
  white-space: nowrap;
}

#app .m-week-day-date {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#app .m-week-day.is-today {
  background: #3370FF;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(51, 112, 255, 0.24);
}

#app .m-week-day.is-today .m-week-day-name {
  color: rgba(255, 255, 255, 0.86);
}

#app .m-week-ddl-dot {
  position: absolute;
  right: 7px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #F58A5B;
}

#app .m-week-day.is-today .m-week-ddl-dot {
  background: #FFD08A;
}

#app .m-sched-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding-bottom: 4px;
}

#app .m-sched-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 150px;
  height: 44px;
  padding: 2px;
  border-radius: 11px;
  background: #EFF1F4;
}

#app .m-sched-seg button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #646A73;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

#app .m-sched-seg button.on {
  background: #FFFFFF;
  color: #3370FF;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.08);
}

#app .m-sched-seg button:active {
  opacity: 0.75;
}

#app .m-sched-today {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
  font-weight: 500;
}

#app .m-sched-today:active {
  opacity: 0.7;
}

#app .m-week-grid {
  position: relative;
  display: grid;
  grid-template-columns: var(--sched-time-col) repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(13, var(--sched-row));
  gap: var(--sched-gap);
  padding-top: 6px;
}

#app .m-week-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  color: #8F959E;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#app .m-week-time b {
  color: #646A73;
  font-size: 11px;
  font-weight: 600;
  line-height: 13px;
}

#app .m-week-time span {
  font-size: 8px;
  line-height: 10px;
  white-space: nowrap;
}

#app .m-week-block {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  padding: 4px 2px;
  overflow: hidden;
  border: 2px solid #FFFFFF;
  border-radius: 12px;
  background: var(--block-bg, #EAF2FF);
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.10);
  color: var(--block-ink, #1F2329);
  text-align: center;
  word-break: break-all;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#app .m-week-block:active {
  transform: scale(0.98);
  opacity: 0.86;
}

#app .m-week-block-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(9.5px, 2.6vw, 11px);
  font-weight: 600;
  line-height: 1.3;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

#app .m-week-block-room {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(8px, 2.2vw, 9px);
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.9;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#app .m-week-block.has-badge {
  padding-top: 12px;
}

#app .m-week-block-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: #1F2329;
  font-size: 7px;
  font-weight: 600;
  line-height: 11px;
  white-space: nowrap;
}

#app .m-week-block.is-focus {
  justify-content: center;
  padding-top: 18px;
  border: 2px dashed #F5A623;
  background: linear-gradient(180deg, #FFF4D6 0%, #FFE2B8 100%);
  color: #8A4B08;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.14);
}

#app .m-week-focus-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 3px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.66);
  color: #8A4B08;
  font-size: 7.5px;
  font-weight: 600;
  line-height: 10px;
  white-space: nowrap;
}

#app .m-week-focus-tag svg {
  width: 9px;
  height: 9px;
}

#app .m-week-free {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed rgba(51, 112, 255, 0.20);
  border-radius: 10px;
  background: rgba(51, 112, 255, 0.035);
  color: #A0A6B0;
  font-size: 8.5px;
  line-height: 1.1;
  text-align: center;
  transition: opacity 0.15s ease;
}

#app .m-week-free:active {
  opacity: 0.65;
}

#app .m-week-now-line {
  z-index: 6;
  align-self: start;
  height: 0;
  border-top: 1.5px solid #3370FF;
  transform: translateY(var(--now-offset, 0px));
  pointer-events: none;
}

#app .m-week-now-line::before {
  content: "";
  position: absolute;
  top: -3.5px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3370FF;
  box-shadow: 0 0 0 2px #FFFFFF;
}

#app .m-week-now-pill {
  z-index: 6;
  align-self: start;
  justify-self: end;
  margin-right: -2px;
  padding: 0 5px;
  border-radius: 999px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(51, 112, 255, 0.28);
  transform: translateY(var(--now-offset, 0px));
  pointer-events: none;
}

#app #scheduleFabRoot {
  position: absolute;
  right: 16px;
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 60;
  pointer-events: none;
}

#app .m-week-backnow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #DEE0E3;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(31, 35, 41, 0.12);
  color: #3370FF;
  font-size: 9px;
  font-weight: 600;
  line-height: 11px;
  text-align: center;
  pointer-events: auto;
}

#app .m-week-backnow[hidden] {
  display: none;
}

#app .m-week-backnow:active {
  opacity: 0.75;
  transform: scale(0.96);
}

#app .course-gate-stats {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #F7F9FC;
}

#app .course-gate-stats > div {
  flex: 1;
  color: #646A73;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

#app .course-gate-stats strong {
  margin: 0 2px;
  color: #1F2329;
  font-size: 15px;
  font-weight: 650;
}

#app .empty-slot-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 374px) {
  #app .m-sched-page {
    --sched-time-col: 40px;
    --sched-gap: 3px;
  }

  #app .m-week-block-name {
    font-size: clamp(9.5px, 2.9vw, 10.5px);
  }
}

/* 守门层 */
#app .m-week-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
  padding: 0 2px;
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  visibility: hidden;
}

#app .m-week-legend.is-on {
  visibility: visible;
}

#app .m-week-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

#app .m-week-legend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 12px;
  padding: 0 3px;
  border-radius: 3px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
  color: #646A73;
  font-size: 8px;
  font-style: normal;
}

#app .m-week-legend-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #F58A5B;
}

#app .m-week-legend-dash {
  width: 12px;
  height: 8px;
  border: 1px dashed rgba(51, 112, 255, 0.45);
  border-radius: 3px;
}

#app .m-week-slot {
  z-index: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

#app .m-week-block.has-badge {
  padding-top: 4px;
  padding-bottom: 13px;
}

#app .m-week-block-badge {
  position: absolute;
  top: auto;
  right: 2px;
  bottom: 2px;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  color: #1F2329;
  font-size: 9px;
  font-weight: 600;
  line-height: 12px;
  white-space: nowrap;
}

#app .m-week-block-badge.is-compact {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  font-size: 8px;
  line-height: 11px;
}

#app .m-week-block-badge.is-compact i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #1F2329;
}

#app .m-week-block.is-guarding {
  outline: 2px solid #3370FF;
  outline-offset: -1px;
}

#app .m-week-ddl-count {
  position: absolute;
  right: 12px;
  bottom: 2px;
  color: #F58A5B;
  font-size: 8px;
  font-style: normal;
  line-height: 10px;
  font-weight: 600;
}

/* 课程视图：只保留课程块与当前时间线，隐藏守门覆盖层 */
#app .m-sched-page:not(.is-gate) .m-week-block-badge,
#app .m-sched-page:not(.is-gate) .m-week-ddl-count {
  display: none;
}

#app .m-sched-page:not(.is-gate) .m-week-block.has-badge {
  padding-bottom: 4px;
}

#app .m-sched-page:not(.is-gate) .m-week-block.is-guarding {
  outline: none;
}

#app .m-sched-page:not(.is-gate) .m-week-free {
  border-color: transparent;
  background: transparent;
  color: transparent;
}

/* 课程详情抽屉 */
#app .sheet.sheet-course-detail {
  height: 64dvh;
  max-height: 70dvh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#app .course-detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

#app .course-color-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

#app .course-detail-head .course-detail-name {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-size: 17px;
}

#app .course-gate-card {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #F7F9FC;
}

#app .course-gate-title {
  margin-bottom: 8px;
  color: #646A73;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#app .course-gate-nums {
  display: flex;
  gap: 6px;
}

#app .course-gate-nums > div {
  flex: 1;
  padding: 6px 4px;
  border-radius: 8px;
  background: #FFFFFF;
  text-align: center;
}

#app .course-gate-nums strong {
  display: block;
  color: #1F2329;
  font-size: 17px;
  font-weight: 650;
  line-height: 20px;
}

#app .course-gate-nums span {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .course-gate-line {
  margin: 2px 0;
  color: #1F2329;
  font-size: 12px;
  line-height: 20px;
}

#app .course-gate-line strong {
  color: #3370FF;
  font-size: 15px;
  font-weight: 650;
}

#app .course-gate-example {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #E5E6EB;
  color: #646A73;
  font-size: 11px;
  line-height: 17px;
  word-break: break-all;
}

#app .course-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

#app .course-delete-link {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #F54A45;
  font-size: 12px;
  font-weight: 500;
}

#app .course-delete-link:active {
  opacity: 0.7;
}

/* 专注块表单开关 */
#app .switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: #1F2329;
  font-size: 13px;
}

#app .switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#app .switch-row i {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: #DEE0E3;
  transition: background 0.2s ease;
}

#app .switch-row i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.18);
  transition: transform 0.2s ease;
}

#app .switch-row input:checked + i {
  background: #3370FF;
}

#app .switch-row input:checked + i::after {
  transform: translateX(16px);
}

#app .switch-row input:focus-visible + i {
  outline: 2px solid rgba(51, 112, 255, 0.5);
  outline-offset: 2px;
}

/* ============================================================
   添加 / 编辑课程 —— 全屏表单
   ============================================================ */

#app .m-fullpage-actions {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  height: 44px;
}

#app .m-course-save {
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 15px;
  font-weight: 600;
}

#app .m-course-save:disabled {
  color: #BBBFC4;
}

#app .m-course-page .m-fullpage-scroll {
  padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
}

#app .m-course-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#app .m-course-sec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 14px;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .m-course-name {
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

#app .m-course-name::placeholder {
  color: #BBBFC4;
  font-weight: 400;
}

#app .m-course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 14px;
  text-align: left;
}

#app .m-course-row:active {
  opacity: 0.65;
}

#app .m-course-label {
  flex: none;
  color: #1F2329;
  font-size: 14px;
}

#app .m-course-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: #646A73;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .m-course-value i {
  flex: none;
  color: #BBBFC4;
  font-size: 15px;
  font-style: normal;
}

#app .m-course-colors {
  display: flex;
  gap: 12px;
}

#app .m-color-dot {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--dot-bg);
  box-shadow: inset 0 0 0 1px rgba(31, 35, 41, 0.06);
}

#app .m-color-dot.is-on {
  outline: 2px solid #3370FF;
  outline-offset: 2px;
}

#app .m-course-field-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  text-align: right;
  outline: none;
}

#app .m-course-field-input::placeholder {
  color: #BBBFC4;
}

#app .m-course-sec-title {
  padding-top: 8px;
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
}

#app .m-course-sec-sub {
  margin: 0 0 4px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .m-course-switch {
  min-height: 48px;
  font-size: 14px;
}

#app .m-course-hint {
  margin: 0 0 8px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .m-course-error {
  margin: 0;
  min-height: 0;
  color: #F54A45;
  font-size: 12px;
  line-height: 18px;
}

#app .m-course-error:not(:empty) {
  padding: 0 2px;
}

#app .m-course-delete {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #F54A45;
  font-size: 14px;
  font-weight: 500;
}

#app .m-course-delete:active {
  opacity: 0.7;
}

/* 时段卡 */

#app .m-course-sessions {
  gap: 10px;
  padding: 0;
  background: transparent;
}

#app .m-session-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 14px 8px;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .m-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

#app .m-session-title {
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .m-session-acts {
  display: flex;
  align-items: center;
  gap: 14px;
}

#app .m-session-act {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
}

#app .m-session-act.is-danger {
  color: #F54A45;
}

#app .m-session-act:active {
  opacity: 0.6;
}

#app .m-course-time {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#app .m-course-time em {
  color: #BBBFC4;
  font-style: normal;
}

#app .m-course-timeinput {
  width: 92px;
  box-sizing: border-box;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 16px;
  text-align: center;
}

/* 守门强度列表 */

#app .m-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

#app .m-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

#app .m-pick-item.is-on {
  border-color: #3370FF;
  background: #F5F8FF;
}

#app .m-pick-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#app .m-pick-main b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .m-pick-main em {
  color: #8F959E;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
}

#app .m-pick-check {
  flex: none;
  width: 20px;
  height: 20px;
  color: #3370FF;
}

#app .m-pick-check svg {
  width: 20px;
  height: 20px;
}

/* 白名单联系人 chips */

#app .m-contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

#app .m-contact-chip {
  position: relative;
}

#app .m-contact-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#app .m-contact-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #DEE0E3;
  border-radius: 16px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 13px;
}

#app .m-contact-chip input:checked + span {
  border-color: #3370FF;
  background: #F5F8FF;
  color: #3370FF;
  font-weight: 500;
}

/* ============================================================
   课表页 —— 更多菜单 / 粘贴导入
   ============================================================ */

#app .sheet.sheet-schedule-more {
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: #FFFFFF;
}

#app .m-sched-more-list {
  display: flex;
  flex-direction: column;
}

#app .m-sched-more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 14px;
  text-align: left;
}

#app .m-sched-more-item:active {
  background: #F7F8FA;
}

#app .m-sched-more-item:disabled {
  opacity: 0.6;
}

#app .m-sched-more-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  color: #8F959E;
}

#app .m-sched-more-icon svg {
  width: 20px;
  height: 20px;
}

#app .m-sched-more-item.is-primary .m-sched-more-icon {
  color: #3370FF;
}

#app .m-sched-more-item.is-loading .m-sched-more-icon svg {
  animation: sync-spin 0.9s linear infinite;
}

#app .m-sched-more-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .m-sched-more-arrow {
  flex: none;
  color: #BBBFC4;
  font-size: 16px;
}

#app .m-sched-more-note {
  flex: none;
  color: #8F959E;
  font-size: 11px;
}

#app .m-sched-more-item.is-danger .m-sched-more-main,
#app .m-sched-more-item.is-danger .m-sched-more-icon {
  color: #F54A45;
}

#app .m-sched-more-divider {
  height: 8px;
  background: #F5F6F7;
}

#app .m-sched-more-cancel {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 0;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 15px;
}

#app .m-sched-more-cancel:active {
  background: #F7F8FA;
}

#app .m-sched-more-foot {
  margin: 0;
  padding: 6px 16px 0;
  color: #BBBFC4;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

#app .sheet.sheet-schedule-paste {
  border-radius: 16px 16px 0 0;
}

#app .sheet-schedule-paste .textarea {
  font-size: 16px;
}

#app .m-paste-hint {
  margin: 4px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

#app .m-paste-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 11px;
}

#app .m-import-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

#app .m-import-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F7F8FA;
}

#app .m-import-row b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .m-import-row span {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .m-import-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}


/* ============================================================
   v2 · 周切换 / 导入课表 / 状态联动 / 任务专注块
   ============================================================ */

#app .m-sched-head {
  gap: 2px;
}

#app .m-sched-heading {
  flex: 1;
}

#app .m-sched-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

#app .m-week-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #646A73;
  font-size: 28px;
  line-height: 28px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

#app .m-week-arrow:active {
  background: #F2F3F5;
}

#app .m-week-grid,
#app .m-week-strip {
  touch-action: pan-y;
}

@keyframes weekInNext {
  from { opacity: 0.2; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes weekInPrev {
  from { opacity: 0.2; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

#app .m-week-grid.is-sliding-next {
  animation: weekInNext 180ms ease;
}

#app .m-week-grid.is-sliding-prev {
  animation: weekInPrev 180ms ease;
}

#app .m-week-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8F959E;
  font-size: 12px;
  pointer-events: none;
}

/* 专注块：虚线覆盖在课程之上，四周留 2px 透出课程边缘 */
#app .m-week-block.is-focus {
  z-index: 3;
  margin: 2px;
  border: 2px dashed #F5A623;
  background: rgba(255, 244, 214, 0.82);
  color: #8A4B08;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.12);
  justify-content: center;
  padding-top: 18px;
  padding-bottom: 13px;
}

#app .m-week-block.is-focus.is-done {
  opacity: 0.4;
  filter: grayscale(1);
}

#app .m-week-block.is-focus .m-week-focus-tag svg {
  width: 9px;
  height: 9px;
}

#app .m-week-live {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 4;
  padding: 0 4px;
  border-radius: 4px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 600;
  line-height: 13px;
  white-space: nowrap;
}

#app .m-week-live.is-focus {
  background: #F5A623;
  color: #5B3A00;
}

#app .m-week-done {
  position: absolute;
  bottom: 2px;
  left: 2px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8F959E;
  color: #FFFFFF;
}

#app .m-week-done svg {
  width: 8px;
  height: 8px;
}

#app .m-week-overlap {
  position: absolute;
  bottom: 2px;
  left: 2px;
  z-index: 4;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #8A4B08;
  font-size: 8px;
  font-weight: 700;
  line-height: 13px;
}

/* 消息台状态卡 */
#app .gate-presence {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 4px;
}

#app .gate-presence-title {
  color: #1F2329;
  font-size: 20px;
  font-weight: 650;
  line-height: 26px;
}

#app .gate-source {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
}

#app .gate-source-schedule {
  background: #E1EAFF;
  color: #245BDB;
}

#app .gate-source-task {
  background: #FFF1D9;
  color: #8A4B08;
}

#app .gate-source-manual {
  background: #F2F3F5;
  color: #646A73;
}

#app .gate-auto-tag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: #E8F8E5;
  color: #2EA121;
  font-size: 9px;
  font-weight: 600;
}

#app .gate-complete-task {
  margin-left: auto;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #F5A623;
  border-radius: 6px;
  background: #FFF7E6;
  color: #8A4B08;
  font-size: 12px;
  font-weight: 500;
}

#app .gate-complete-task:active {
  opacity: 0.75;
}

#app .gate-status-note {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .gate-status .gate-mode {
  height: 36px;
}

#app .gate-status .gate-mode .mode-btn {
  height: 32px;
  line-height: 32px;
  font-size: 12px;
}

#app .gate-status .gate-mode .mode-btn.is-disabled {
  opacity: 0.55;
}

#app .gate-status .gate-mode .mode-btn.is-disabled.active {
  opacity: 1;
}

/* 任务卡联动 */
#app .task-card.is-active {
  border-color: #F5C56B;
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.25);
}

#app .task-live {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: #FFF1D9;
  color: #8A4B08;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
}

#app .task-card-focus {
  overflow: hidden;
  color: #8A4B08;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 导入课表抽屉 */
#app .sheet.sheet-schedule-import {
  border-radius: 16px 16px 0 0;
}

#app .m-import-list {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

#app .m-import-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .m-import-item:active {
  opacity: 0.7;
}

#app .m-import-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F2F3F5;
  color: #646A73;
}

#app .m-import-item.is-primary .m-import-icon {
  background: #E1EAFF;
  color: #3370FF;
}

#app .m-import-icon svg {
  width: 18px;
  height: 18px;
}

#app .m-import-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .m-import-main b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

#app .m-import-main small {
  color: #8F959E;
  font-size: 11px;
  line-height: 15px;
}

#app .m-import-arrow {
  flex: none;
  color: #C9CDD4;
  font-size: 20px;
}

#app .m-import-apply {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
}

/* 导入预览 */
#app .sheet.sheet-import-preview {
  max-height: 72dvh;
  overflow-y: auto;
}

#app .m-import-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #EFF0F1;
}

#app .m-import-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #3370FF;
}

#app .m-import-check-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .m-import-check-main b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

#app .m-import-check-main span {
  overflow: hidden;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .m-import-check-main em {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0 5px;
  border-radius: 3px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  font-style: normal;
  line-height: 15px;
}

/* 导入子页 */
#app .m-import-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 2px 20px;
}

#app .m-import-desc {
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
}

#app .m-import-desc code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #1F2329;
  font-size: 11px;
}

#app .m-import-foot {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

#app .m-file-pick {
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 1px dashed #DEE0E3;
  border-radius: 8px;
  background: #FAFBFC;
  color: #646A73;
  font-size: 13px;
}

#app .m-file-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#app .m-import-textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px;
  border: 1px solid #DEE0E3;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 13px;
  line-height: 18px;
  resize: vertical;
}

#app .m-import-rowbtns {
  display: flex;
  gap: 8px;
}

#app .m-import-rowbtns .m-btn {
  flex: 1;
}

#app .m-school-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#app .m-school-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px 10px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

#app .m-school-row.is-on {
  border-color: #3370FF;
  background: #F5F9FF;
}

#app .m-school-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #E1EAFF;
  color: #3370FF;
  font-size: 13px;
  font-weight: 600;
}

#app .m-school-name {
  flex: 1;
  color: #1F2329;
  font-size: 14px;
}

#app .m-school-check {
  flex: none;
  visibility: hidden;
  color: #3370FF;
}

#app .m-school-check svg {
  width: 16px;
  height: 16px;
}

#app .m-school-row.is-on .m-school-check {
  visibility: visible;
}

#app .m-import-success {
  padding: 12px;
  border-radius: 8px;
  background: #E8F8E5;
  color: #2EA121;
  font-size: 13px;
  text-align: center;
}

#app .m-import-success::before {
  content: "✓ ";
}

@media (max-width: 374px) {
  #app .m-jweek-arrow {
    width: 36px;
  }
}

#app .m-sched-actions {
  gap: 0;
}

#app .m-sched-actions .m-sched-icon {
  position: relative;
  width: 40px;
}

#app .m-sched-actions .m-sched-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
}

#app .m-week-now-line,
#app .m-week-now-pill {
  z-index: 10;
}

#app .m-sched-actions {
  gap: 2px;
}

#app .m-sched-actions .m-sched-icon {
  width: 36px;
}

#app .m-sched-actions .m-sched-icon::after {
  inset: -4px;
}

#app .m-sched-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}

#app .m-sched-actions .m-sched-icon {
  width: 44px;
  margin: 0 -2px;
}

#app .m-sched-actions .m-sched-icon::after {
  display: none;
}

#app .m-sched-actions .m-sched-icon:last-child {
  margin-right: 0;
}

@media (max-width: 400px) {
  #app .m-sched-title {
    font-size: 15px;
  }
}

@keyframes weekBounce {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  85% { transform: translateX(2px); }
}

#app .m-week-grid.is-bounce {
  animation: weekBounce 200ms ease;
}

/* ============================================================
   v3 · 笔记 Tab 首页
   ============================================================ */

#app .tab {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

#app .tab svg {
  width: 22px;
  height: 22px;
}

#app .tab span {
  white-space: nowrap;
}

#app[data-tab="notes"] .page-container {
  padding-bottom: calc(136px + env(safe-area-inset-bottom));
}

#app .notes-page {
  padding-bottom: 2px;
}

#app .notes-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 14px;
}

#app .notes-head-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1F2329;
}

#app .notes-head-btn:active {
  background: #F2F3F5;
}

#app .notes-head-btn svg {
  width: 21px;
  height: 21px;
}

#app .notes-head-titles {
  flex: 1;
  min-width: 0;
}

#app .notes-head-titles h1 {
  margin: 0;
  color: #1F2329;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.01em;
}

#app .notes-head-titles p {
  margin: 2px 0 0;
  overflow: hidden;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .notes-head-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0;
}

#app .notes-head-actions .notes-head-btn {
  width: 40px;
  height: 40px;
  color: #646A73;
}

#app .notes-type-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .notes-type-tabs::-webkit-scrollbar {
  display: none;
}

#app .notes-type-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #646A73;
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
}

#app .notes-type-tab em {
  margin-left: 3px;
  color: #8F959E;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

#app .notes-type-tab.is-on {
  background: #E1EAFF;
  color: #3370FF;
  font-weight: 500;
}

#app .notes-type-tab.is-on em {
  color: #3370FF;
  opacity: 0.7;
}

#app .notes-filter-caption {
  margin: -4px 0 10px;
  color: #3370FF;
  font-size: 11px;
  line-height: 16px;
}

#app .notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#app .note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 160px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.045);
  text-align: left;
}

#app .note-card:active {
  opacity: 0.92;
}

#app .note-card-menu {
  position: absolute;
  top: 5px;
  right: 4px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #646A73;
  font-size: 18px;
  line-height: 1;
}

#app .note-card-menu:active {
  background: #F2F3F5;
}

#app .note-board-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 90px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(to right, rgba(51, 112, 255, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 112, 255, 0.085) 1px, transparent 1px);
  background-size: 14px 14px;
  color: #5A8DEE;
}

#app .note-board-warm {
  background-color: #FFF9E6;
  background-image:
    linear-gradient(to right, rgba(214, 178, 94, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(214, 178, 94, 0.18) 1px, transparent 1px);
  color: #C7861F;
}

#app .note-board-dark {
  background-color: #2A2D33;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  color: #9DBBFF;
}

#app .note-board-plain {
  background-color: #FAFBFC;
  background-image: none;
  color: #5A8DEE;
}

#app .note-board-thumb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

#app .note-board-image {
  background-size: cover;
  background-position: center;
  background-image: none;
}

#app .note-card-board .note-card-menu {
  top: 13px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
}

#app .note-card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

#app .note-card-title.is-two-line {
  -webkit-line-clamp: 2;
}

#app .note-card-sub {
  margin: 3px 0 0;
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
  margin-bottom: 5px;
  padding-right: 24px;
}

#app .note-type-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 17px;
}

#app .note-card-time {
  overflow: hidden;
  color: #8F959E;
  font-size: 9px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#app .note-card-excerpt.is-two-line {
  -webkit-line-clamp: 2;
}

#app .note-card-foot {
  display: flex;
  align-items: flex-end;
  min-height: 17px;
  margin-top: auto;
  padding-top: 6px;
  overflow: hidden;
}

#app .note-chips {
  display: flex;
  gap: 4px;
  overflow: hidden;
}

#app .note-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 17px;
  padding: 0 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-chip.is-link {
  background: #E1EAFF;
  color: #3370FF;
}

#app .note-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  margin: 2px 0 7px;
  padding-right: 24px;
}

#app .note-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
}

#app .note-wave i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: #3370FF;
  opacity: 0.8;
}

#app .note-wave.is-animated i {
  animation: noteWave 0.9s ease-in-out infinite alternate;
}

#app .note-wave.is-animated i:nth-child(2n) { animation-delay: 0.15s; }
#app .note-wave.is-animated i:nth-child(3n) { animation-delay: 0.3s; }

@keyframes noteWave {
  from { transform: scaleY(0.55); opacity: 0.55; }
  to { transform: scaleY(1.15); opacity: 1; }
}

#app .note-voice-duration {
  color: #646A73;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

#app .notes-list {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .note-list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  padding: 10px 12px;
  border-bottom: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .note-list-row:last-child {
  border-bottom: 0;
}

#app .note-list-row:active {
  background: #FAFBFC;
}

#app .note-list-thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(to right, rgba(51, 112, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 112, 255, 0.08) 1px, transparent 1px);
  background-size: 10px 10px;
  color: #5A8DEE;
}

#app .note-list-thumb.is-text {
  background-image: none;
  background-color: #F5F9FF;
  color: #3370FF;
}

#app .note-list-thumb.is-text svg {
  width: 24px;
  height: 24px;
}

#app .note-list-thumb.is-voice {
  background-image: none;
  background-color: #F5F9FF;
}

#app .note-list-thumb .note-wave {
  gap: 1.5px;
  transform: scale(0.78);
}

#app .note-list-thumb .note-wave i {
  width: 2px;
}

#app .note-list-thumb > i {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

#app .note-list-grid {
  display: block;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to right, rgba(51, 112, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 112, 255, 0.1) 1px, transparent 1px);
  background-size: 10px 10px;
}

#app .note-list-main {
  flex: 1;
  min-width: 0;
}

#app .note-list-title {
  overflow: hidden;
  margin: 0;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-list-excerpt {
  overflow: hidden;
  margin: 1px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-list-meta {
  overflow: hidden;
  margin: 2px 0 0;
  color: #B0B5BD;
  font-size: 9px;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-card-menu.is-list {
  top: 25px;
  right: 8px;
  background: transparent;
}

#app .notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 24px 24px;
  text-align: center;
}

#app .notes-empty-art {
  width: 120px;
  height: 110px;
  color: #C9CDD4;
}

#app .notes-empty-art svg {
  width: 100%;
  height: 100%;
}

#app .notes-empty-text {
  max-width: 260px;
  margin: 12px 0 0;
  color: #8F959E;
  font-size: 13px;
  line-height: 20px;
}

#app .notes-empty-btn {
  width: auto;
  min-width: 112px;
  height: 40px;
  margin-top: 16px;
  padding: 0 20px;
}

/* 浮动新建栏 */
#notesFabRoot {
  position: absolute;
  right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 35;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#notesFabRoot.is-keyboard {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

#notesFabRoot.is-keyboard .notes-fab {
  pointer-events: none;
}

#notesFabRoot .notes-fab {
  display: flex;
  align-items: stretch;
  height: 52px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(31, 35, 41, 0.14);
  pointer-events: auto;
}

#notesFabRoot .notes-fab-main,
#notesFabRoot .notes-fab-voice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 52px;
}

#notesFabRoot .notes-fab-main {
  flex: 1;
  color: #1F2329;
  font-weight: 500;
}

#notesFabRoot .notes-fab-main svg {
  width: 16px;
  height: 16px;
  color: #3370FF;
}

#notesFabRoot .notes-fab-voice {
  flex: 0 0 auto;
  color: #3370FF;
}

#notesFabRoot .notes-fab-voice svg {
  width: 17px;
  height: 17px;
}

#notesFabRoot .notes-fab-divider {
  align-self: center;
  flex: none;
  width: 1px;
  height: 22px;
  background: #EFF0F1;
}

#notesFabRoot .notes-fab-main:active,
#notesFabRoot .notes-fab-voice:active {
  background: #F7F8FA;
}

/* 笔记库抽屉 */
#app .sheet.sheet-notes-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 78%;
  max-width: 78%;
  height: 100%;
  max-height: none;
  padding: 0;
  border-radius: 0 16px 16px 0;
  background: #FFFFFF;
  animation: notesDrawerIn var(--dur-base) var(--ease-ios);
}

@keyframes notesDrawerIn {
  from { transform: translateX(-100%); }
  to { transform: none; }
}

#app .notes-drawer {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(26px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
}

#app .notes-drawer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid #EFF0F1;
}

#app .notes-drawer-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #E1EAFF;
  color: #3370FF;
  font-size: 16px;
  font-weight: 600;
}

#app .notes-drawer-user-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#app .notes-drawer-user-main b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

#app .notes-drawer-user-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

#app .notes-drawer-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}

#app .notes-drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
  font-size: 13px;
  text-align: left;
}

#app .notes-drawer-item:active {
  background: #F5F6F7;
}

#app .notes-drawer-item.is-on {
  background: #E1EAFF;
  color: #3370FF;
  font-weight: 500;
}

#app .notes-drawer-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  color: #646A73;
}

#app .notes-drawer-item.is-on .notes-drawer-icon {
  color: #3370FF;
}

#app .notes-drawer-icon svg {
  width: 18px;
  height: 18px;
}

#app .notes-drawer-foot {
  margin: 8px 8px 0;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

/* 新建菜单 */
#app .sheet.sheet-note-create {
  max-height: 86%;
}

#app .notes-create-list {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

#app .notes-create-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 3px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .notes-create-item:active {
  opacity: 0.7;
}

#app .notes-create-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  color: #646A73;
}

#app .notes-create-icon svg {
  width: 20px;
  height: 20px;
}

#app .notes-create-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .notes-create-main b {
  color: #1F2329;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

#app .notes-create-main small {
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .notes-create-arrow {
  flex: none;
  color: #B0B5BD;
  font-size: 11px;
}

#app .notes-create-divider {
  height: 8px;
  margin: 4px -18px;
  background: #F5F6F7;
}

#app .notes-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

#app .notes-template-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

#app .notes-template-card:active {
  border-color: #3370FF;
}

#app .notes-template-preview {
  display: block;
  height: 72px;
  border-radius: 7px;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(to right, rgba(51, 112, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 112, 255, 0.1) 1px, transparent 1px);
  background-size: 12px 12px;
}

#app .notes-template-preview.is-warm {
  background-color: #FFF9E6;
  background-image:
    linear-gradient(to right, rgba(214, 178, 94, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(214, 178, 94, 0.2) 1px, transparent 1px);
}

#app .notes-template-preview.is-dark {
  background-color: #2A2D33;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

#app .notes-template-preview.is-plain {
  background-color: #FAFBFC;
  background-image: none;
}

#app .notes-template-card b {
  color: #1F2329;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

/* 搜索页 */
#app .notes-search-page .m-fullpage-nav {
  display: none;
}

#app .notes-search-page .m-fullpage-scroll {
  padding: 0;
  background: #FFFFFF;
}

#app .notes-search {
  min-height: 100%;
  background: #FFFFFF;
}

#app .notes-search-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
}

#app .notes-search-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
}

#app .notes-search-back svg {
  width: 21px;
  height: 21px;
}

#app .notes-search-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #F5F6F7;
  color: #1F2329;
  font-size: 16px;
  line-height: 36px;
  outline: none;
}

#app .notes-search-input::placeholder {
  color: #B0B5BD;
}

#app .notes-search-cancel {
  flex: none;
  height: 40px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 13px;
}

#app .notes-search-types {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .notes-search-types::-webkit-scrollbar {
  display: none;
}

#app .notes-search-type {
  flex: none;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 14px;
  background: #F5F6F7;
  color: #646A73;
  font-size: 11px;
  line-height: 28px;
  white-space: nowrap;
}

#app .notes-search-type.is-on {
  background: #E1EAFF;
  color: #3370FF;
  font-weight: 500;
}

#app .notes-search-scope {
  flex: none;
  width: 84px;
  height: 28px;
  margin-left: auto;
  padding: 0 4px;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 10px;
  outline: none;
}

#app .notes-search-results {
  padding: 0 12px 18px;
}

#app .notes-search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .notes-search-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#app .notes-search-result-title {
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .notes-search-result-type {
  flex: none;
  color: #8F959E;
  font-size: 9px;
  line-height: 14px;
}

#app .notes-search-result-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: #8F959E;
  font-size: 12px;
  line-height: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#app .notes-search-result-link {
  align-self: flex-start;
  padding: 0 5px;
  border-radius: 4px;
  background: #E1EAFF;
  color: #3370FF;
  font-size: 9px;
  line-height: 17px;
}

#app .notes-search-results mark {
  padding: 0 1px;
  border-radius: 2px;
  background: #FFF1D9;
  color: #8A4B08;
}

#app .notes-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 52px 20px;
}

#app .notes-search-empty p {
  margin: 0;
  color: #8F959E;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

#app .notes-search-page .m-fullpage-footer {
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid #EFF0F1;
}

#app .notes-search-hint {
  margin: 0;
  color: #B0B5BD;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}

/* 扫描页 */
#app .notes-scan-page .m-fullpage-scroll {
  padding: 0;
  background: #17181C;
}

#app .notes-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 24px 20px calc(30px + env(safe-area-inset-bottom));
  background: #17181C;
}

#app .notes-scan-frame {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 4;
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

#app .notes-scan-paper {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
  height: 100%;
  padding: 26px 22px;
  border-radius: 6px;
  background: #FFFFFF;
}

#app .notes-scan-paper span {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: #E5E6EB;
}

#app .notes-scan-paper span:first-child {
  width: 56%;
  height: 10px;
  background: #C9CDD4;
}

#app .notes-scan-paper span.is-short {
  width: 68%;
}

#app .notes-scan-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #FFFFFF;
  border-style: solid;
}

#app .notes-scan-corner.is-tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; border-radius: 8px 0 0 0; }
#app .notes-scan-corner.is-tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; }
#app .notes-scan-corner.is-bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; }
#app .notes-scan-corner.is-br { right: -1px; bottom: -1px; border-width: 0 3px 3px 0; border-radius: 0 0 8px 0; }

#app .notes-scan-hint {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

#app .notes-scan-shutter {
  display: block;
  width: 64px;
  height: 64px;
  margin-top: 22px;
  border: 4px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}

#app .notes-scan-shutter:active {
  transform: scale(0.94);
}

#app .notes-scan-demo {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  line-height: 15px;
}

/* 语音录制页 */
#app .notes-voice-page .m-fullpage-scroll {
  padding: 0;
}

#app .notes-voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 54px 24px calc(30px + env(safe-area-inset-bottom));
  background: #FFFFFF;
}

#app .notes-voice-kicker {
  color: #B0B5BD;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 14px;
}

#app .notes-voice-timer {
  margin: 18px 0 0;
  color: #1F2329;
  font-size: 38px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  line-height: 44px;
}

#app .notes-voice-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin-top: 24px;
}

#app .notes-voice-wave i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #3370FF;
  opacity: 0.55;
  transition: height 0.2s ease, opacity 0.2s ease;
}

#app .notes-voice-wave.is-live i {
  animation: noteWave 0.8s ease-in-out infinite alternate;
  opacity: 0.9;
}

#app .notes-voice-wave.is-live i:nth-child(2n) { animation-delay: 0.12s; }
#app .notes-voice-wave.is-live i:nth-child(3n) { animation-delay: 0.25s; }

#app .notes-voice-status {
  margin: 22px 0 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .notes-voice-record {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 96px;
  height: 96px;
  margin-top: 26px;
  border: 0;
  border-radius: 50%;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(51, 112, 255, 0.28);
}

#app .notes-voice-record svg {
  width: 26px;
  height: 26px;
}

#app .notes-voice-record.is-recording {
  background: #F54A45;
  box-shadow: 0 10px 24px rgba(245, 74, 69, 0.24);
}

#app .notes-voice-stop {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #FFFFFF;
}

#app .notes-voice-hint {
  max-width: 260px;
  margin: 22px 0 0;
  color: #B0B5BD;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* 笔记编辑页（首页占位版） */
#app .note-editor-page .m-fullpage-scroll {
  padding: 14px 16px 24px;
}

#app .note-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#app .note-editor-meta {
  min-height: 18px;
}

#app .note-editor-title {
  margin: 0;
}

#app .note-editor-title .input {
  font-size: 17px;
  font-weight: 600;
}

#app .note-editor-content {
  min-height: 220px;
}

#app .note-editor-board {
  position: relative;
  height: 230px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  color: #5A8DEE;
}

#app .note-editor-board svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

#app .note-editor-board-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

#app .note-editor-board-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}

#app .note-editor-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: #F5F9FF;
  color: #3370FF;
  font-size: 12px;
}

/* 笔记设置 / 卡片菜单小补充 */
#app .notes-settings-list {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  overflow: hidden;
}

#app .notes-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 13px;
  text-align: left;
}

#app .notes-settings-row:last-child {
  border-bottom: 0;
}

#app .notes-settings-row strong {
  color: #646A73;
  font-size: 11px;
  font-weight: 400;
}

#app .notes-settings-row.is-action:active {
  background: #FAFBFC;
}

#app .notes-settings-row.is-danger {
  color: #F54A45;
}

#app .notes-settings-row[disabled] {
  opacity: 0.42;
}

#app .notes-settings-note {
  margin: 12px 2px 0;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

@media (max-width: 374px) {
  #app .notes-head-titles h1 {
    font-size: 22px;
  }

  #app .notes-head-actions .notes-head-btn {
    width: 36px;
  }

  #notesFabRoot .notes-fab-main,
  #notesFabRoot .notes-fab-voice {
    padding: 0 12px;
    font-size: 12px;
  }
}

#app .notes-drawer-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8F959E;
}

#app .notes-drawer-close svg {
  width: 18px;
  height: 18px;
}

/* 卡片菜单固定在右下角 */
#app .note-card-menu {
  top: auto;
  right: 4px;
  bottom: 5px;
}

#app .note-card-board .note-card-menu {
  top: auto;
  right: 4px;
  bottom: 5px;
}

#app .note-card-foot {
  padding-right: 28px;
}

#app .note-card-menu.is-list {
  top: 25px;
  right: 8px;
  bottom: auto;
}

#notesFabRoot .notes-fab-voice {
  flex: 1 1 0;
  justify-content: center;
}

@media (max-width: 374px) {
  #app .notes-head-titles h1 {
    font-size: 24px;
  }

  #app .notes-head-actions .notes-head-btn {
    width: 40px;
    height: 40px;
  }
}

#app .note-list-main {
  padding-right: 20px;
}

/* ============================================================
   v3.1 · 新建白板 / JEEV 模板
   ============================================================ */

#app .notes-create-group {
  margin: 4px 2px 2px;
  color: #8F959E;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 16px;
}

#app .sheet.sheet-note-create {
  max-height: 88%;
  overflow-y: auto;
}

#app .sheet.sheet-note-template,
#app .sheet.sheet-board-color {
  max-height: 86%;
}

/* 新建白板全屏页 */
#app .board-create-page .m-fullpage-nav {
  display: none;
}

#app .board-create-page .m-fullpage-scroll {
  padding: 0;
  background: #F5F6F7;
}

#app .board-create-page .m-fullpage-footer {
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid #EFF0F1;
}

#app .board-create {
  min-height: 100%;
  padding: 0 16px 20px;
}

#app .board-create-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(56px + env(safe-area-inset-top));
  margin: 0 -16px;
  padding: env(safe-area-inset-top) 8px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
}

#app .board-create-head h1 {
  flex: 1;
  overflow: hidden;
  color: #1F2329;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .board-create-cancel,
#app .board-create-top-submit {
  flex: none;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 14px;
}

#app .board-create-cancel {
  color: #646A73;
}

#app .board-create-top-submit {
  color: #3370FF;
  font-weight: 500;
}

#app .board-title-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  margin: 14px 0 20px;
  padding: 0 14px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.04);
}

#app .board-title-card > span {
  flex: none;
  color: #1F2329;
  font-size: 13px;
  line-height: 20px;
}

#app .board-title-card input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  line-height: 44px;
  outline: none;
}

#app .board-title-card input::placeholder {
  color: #B0B5BD;
}

#app .board-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

#app .board-create-preview {
  width: 140px;
  height: 180px;
  border: 1px solid #DEE0E3;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(31, 35, 41, 0.12);
}

#app .board-create-caption {
  margin: 8px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .board-create-section {
  margin-top: 20px;
}

#app .board-create-section h2,
#app .board-spacing-head h2 {
  margin: 0 0 10px;
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

#app .board-pattern-row {
  display: flex;
  gap: 10px;
}

#app .board-pattern-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 6px 7px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
}

#app .board-pattern-card.is-on {
  border: 2px solid #3370FF;
  padding: 7px 5px 6px;
}

#app .board-pattern-mini {
  display: block;
  width: 100%;
  height: 62px;
  border: 1px solid #F2F3F5;
  border-radius: 7px;
  background-color: #FFFFFF;
}

#app .board-pattern-mini.is-line {
  background-image: repeating-linear-gradient(to bottom, #DCE8FF 0 1px, transparent 1px 14px);
}

#app .board-pattern-mini.is-grid {
  background-image:
    linear-gradient(to right, #DCE8FF 1px, transparent 1px),
    linear-gradient(to bottom, #DCE8FF 1px, transparent 1px);
  background-size: 14px 14px;
}

#app .board-pattern-mini.is-dot {
  background-image: radial-gradient(#BBD4FF 1.2px, transparent 1.3px);
  background-size: 14px 14px;
}

#app .board-pattern-card b {
  color: #646A73;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

#app .board-pattern-card.is-on b {
  color: #3370FF;
}

#app .board-pattern-check {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3370FF;
  color: #FFFFFF;
}

#app .board-pattern-check svg {
  width: 10px;
  height: 10px;
}

#app .board-pattern-card.is-on .board-pattern-check {
  display: grid;
}

#app .board-color-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 38px;
}

#app .board-color-dot {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #DEE0E3;
  border-radius: 50%;
  background: #FFFFFF;
}

#app .board-color-dot.is-on {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #3370FF;
}

#app .board-color-dot.is-custom {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: #8F959E;
  font-size: 17px;
  line-height: 1;
}

#app .board-spacing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

#app .board-spacing-head h2 {
  margin-bottom: 0;
}

#app .board-spacing-head span {
  color: #3370FF;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

#app .board-spacing-range {
  width: 100%;
  height: 28px;
  margin: 4px 0 0;
  accent-color: #3370FF;
}

#app .board-create-submit {
  height: 48px;
}

#app .sheet-board-color .board-color-sheet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 16px;
}

#app .sheet-board-color .board-color-sheet input[type="color"] {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #DEE0E3;
  border-radius: 10px;
  background: #FFFFFF;
}

#app .sheet-board-color .board-color-sheet p {
  margin: 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .note-editor-board.is-dark .note-editor-board-hint {
  color: rgba(255, 255, 255, 0.56);
}

/* ============================================================
   v3.2 · 白板笔记编辑器
   ============================================================ */

#app .wb-editor-page .m-fullpage-nav {
  display: none;
}

#app .wb-editor-page .m-fullpage-scroll {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #E9EBEF;
}

#app .wb-editor {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #E9EBEF;
}

#app .wb-head {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 6px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
}

#app .wb-head-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
  font-size: 20px;
}

#app .wb-head-btn svg {
  width: 20px;
  height: 20px;
}

#app .wb-head-btn:active {
  background: #F2F3F5;
}

#app .wb-title {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .wb-save-status {
  flex: none;
  padding: 0 4px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
  white-space: nowrap;
}

#app .wb-top-tools {
  position: absolute;
  top: calc(48px + env(safe-area-inset-top) + 6px);
  left: 50%;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 52px;
  padding: 4px 6px;
  border: 1px solid #EFF0F1;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(31, 35, 41, 0.12);
  transform: translateX(-50%);
}

#app .wb-top-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #646A73;
}

#app .wb-top-btn svg {
  width: 18px;
  height: 18px;
}

#app .wb-top-btn.is-on {
  background: #E1EAFF;
  color: #3370FF;
}

#app .wb-top-btn:disabled {
  opacity: 0.28;
}

#app .wb-rail {
  position: absolute;
  top: calc(48px + env(safe-area-inset-top) + 64px);
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 8px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #EFF0F1;
  border-radius: 28px;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(31, 35, 41, 0.12);
  scrollbar-width: none;
}

#app .wb-rail::-webkit-scrollbar {
  display: none;
}

#app .wb-rail-tools,
#app .wb-rail-colors,
#app .wb-rail-widths {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

#app .wb-rail-colors {
  gap: 6px;
}

#app .wb-rail-widths {
  gap: 4px;
}

#app .wb-tool {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #4E5969;
}

#app .wb-tool svg {
  width: 19px;
  height: 19px;
}

#app .wb-tool.is-on {
  background: #E1EAFF;
  color: #3370FF;
}

#app .wb-rail-divider {
  flex: none;
  width: 28px;
  height: 1px;
  margin: 6px 0;
  background: #EFF0F1;
}

#app .wb-color {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

#app .wb-color i {
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 50%;
  background: var(--dot, #3370FF);
}

#app .wb-color.is-on {
  box-shadow: none;
}

#app .wb-color.is-on i {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #3370FF;
}

#app .wb-width {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

#app .wb-width i {
  display: block;
  border-radius: 50%;
  background: #4E5969;
}

#app .wb-width.is-on {
  background: #E1EAFF;
}

#app .wb-width.is-on i {
  background: #3370FF;
}

#app .wb-scroll {
  position: absolute;
  inset: 0;
  padding-top: calc(48px + env(safe-area-inset-top) + 72px);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: #E9EBEF;
}

#app .wb-page-wrap {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 3px 14px rgba(31, 35, 41, 0.14);
}

#app .wb-page-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

#app .wb-fit {
  position: absolute;
  right: 10px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 44px;
  height: 50px;
  padding: 0;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 8px;
  line-height: 10px;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.12);
}

#app .wb-fit svg {
  width: 17px;
  height: 17px;
}

#app .wb-fit.is-on {
  border-color: #3370FF;
  color: #3370FF;
}

#app .wb-eraser-fab {
  position: absolute;
  right: 12px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 16;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #EFF0F1;
  border-radius: 50%;
  background: #FFFFFF;
  color: #4E5969;
  box-shadow: 0 6px 18px rgba(31, 35, 41, 0.14);
}

#app .wb-eraser-fab svg {
  width: 20px;
  height: 20px;
}

#app .wb-eraser-fab.is-on {
  border-color: #3370FF;
  background: #E1EAFF;
  color: #3370FF;
}

/* 白板搜索 */
#app .wb-search-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
}

#app .wb-search-layer[hidden] {
  display: none;
}

#app .wb-search-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  border-bottom: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .wb-search-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1F2329;
}

#app .wb-search-back svg {
  width: 21px;
  height: 21px;
}

#app .wb-search-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #F5F6F7;
  color: #1F2329;
  font-size: 16px;
  outline: none;
}

#app .wb-search-cancel {
  flex: none;
  height: 40px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 13px;
}

#app .wb-search-filter {
  display: flex;
  padding: 10px 14px 4px;
}

#app .wb-search-scope {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #EFF0F1;
  border-radius: 15px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
}

#app .wb-search-results {
  flex: 1;
  padding: 4px 14px 20px;
  overflow-y: auto;
}

#app .wb-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .wb-search-result-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .wb-search-result-main b {
  overflow: hidden;
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .wb-search-result-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

#app .wb-search-result-type {
  flex: none;
  padding: 0 5px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 17px;
}

#app .wb-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: #8F959E;
}

#app .wb-search-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #F5F6F7;
  color: #C9CDD4;
}

#app .wb-search-empty-icon svg {
  width: 28px;
  height: 28px;
}

#app .wb-search-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

#app .wb-search-empty p.is-hint {
  margin-top: 4px;
  color: #B0B5BD;
  font-size: 10px;
}

#app .wb-search-hint {
  flex: none;
  margin: 0;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #EFF0F1;
  color: #B0B5BD;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}

/* 笔设置抽屉 */
#app .sheet.sheet-wb-pen {
  max-height: 82%;
}

#app .wb-pen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

#app .wb-pen-head h2 {
  color: #1F2329;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

#app .wb-pen-head-actions {
  display: flex;
  gap: 10px;
}

#app .wb-pen-link {
  height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
}

#app .wb-pen-preview {
  height: 96px;
  margin: 8px 0 12px;
  border-radius: 10px;
  background-color: #FAFBFC;
  background-image:
    linear-gradient(to right, #EFF0F1 1px, transparent 1px),
    linear-gradient(to bottom, #EFF0F1 1px, transparent 1px);
  background-size: 16px 16px;
}

#app .wb-pen-preview svg {
  width: 100%;
  height: 100%;
}

#app .wb-pen-sliders {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#app .wb-pen-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

#app .wb-pen-slider > span {
  flex: none;
  width: 74px;
  color: #646A73;
  font-size: 12px;
}

#app .wb-pen-slider input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #3370FF;
}

#app .wb-pen-slider em {
  flex: none;
  width: 42px;
  color: #1F2329;
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

#app .wb-pen-colors {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #EFF0F1;
}

#app .wb-pen-color {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 50%;
}

#app .wb-pen-color.is-on {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #3370FF;
}

#app .wb-pen-custom {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px dashed #B0B5BD;
  border-radius: 50%;
  color: #8F959E;
  font-size: 16px;
}

#app .wb-pen-custom input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#app .wb-pen-back {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 13px;
}

/* 页面面板 */
#app .wb-pages-strip {
  display: flex;
  gap: 12px;
  padding: 8px 2px 6px;
  overflow-x: auto;
}

#app .wb-page-item {
  position: relative;
  flex: none;
}

#app .wb-page-select {
  display: block;
  width: 96px;
  height: 122px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #F5F6F7;
}

#app .wb-page-item.is-on .wb-page-select {
  border-color: #3370FF;
}

#app .wb-page-thumb {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background-color: #FFFFFF;
  background-size: cover;
  background-position: top center;
}

#app .wb-page-num {
  position: absolute;
  bottom: 7px;
  left: 8px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(31, 35, 41, 0.42);
  color: #FFFFFF;
  font-size: 9px;
  line-height: 15px;
}

#app .wb-page-menu {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #4E5969;
  font-size: 15px;
}

#app .wb-page-add {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 96px;
  height: 122px;
  border: 1px dashed #C9CDD4;
  border-radius: 10px;
  background: #FAFBFC;
  color: #8F959E;
}

#app .wb-page-add span {
  font-size: 22px;
  font-weight: 300;
  line-height: 24px;
}

#app .wb-page-add b {
  font-size: 10px;
  font-weight: 400;
}

/* 添加页面 / 更多面板 */
#app .wb-add-page-list,
#app .wb-shape-list,
#app .wb-template-list {
  display: flex;
  flex-direction: column;
}

#app .wb-add-page-label {
  margin: 6px 2px 2px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

#app .wb-add-page-divider {
  height: 8px;
  margin: 4px -18px;
  background: #F5F6F7;
}

#app .wb-add-page-row,
#app .wb-shape-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .wb-add-page-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  color: #646A73;
}

#app .wb-add-page-icon svg {
  width: 20px;
  height: 20px;
}

#app .wb-add-page-row > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .wb-add-page-row b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

#app .wb-add-page-row small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

#app .wb-add-page-row em {
  flex: none;
  color: #B0B5BD;
  font-size: 10px;
  font-style: normal;
}

#app .wb-shape-row {
  justify-content: space-between;
}

#app .wb-shape-row span {
  color: #1F2329;
  font-size: 13px;
}

#app .wb-shape-row i {
  display: block;
  width: 60px;
  height: 20px;
  border-color: #3370FF;
  border-style: solid;
}

#app .wb-shape-line { border-width: 0 0 2px; transform: rotate(-18deg); }
#app .wb-shape-rect { border-width: 2px; }
#app .wb-shape-arrow { border-width: 0 2px 2px 0; transform: rotate(-45deg); }

/* 图层面板 */
#app .wb-layer-list {
  display: flex;
  flex-direction: column;
}

#app .wb-layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 4px 6px;
  border-bottom: 1px solid #EFF0F1;
  border-radius: 8px;
}

#app .wb-layer-row.is-on {
  background: #3370FF;
  color: #FFFFFF;
}

#app .wb-layer-thumb {
  flex: none;
  width: 28px;
  height: 34px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 5px;
}

#app .wb-layer-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .wb-layer-home,
#app .wb-layer-eye,
#app .wb-layer-menu {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 16px;
}

#app .wb-layer-home svg,
#app .wb-layer-eye svg {
  width: 16px;
  height: 16px;
}

#app .wb-layer-add {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: 1px dashed #C9CDD4;
  border-radius: 8px;
  background: #FAFBFC;
  color: #3370FF;
  font-size: 12px;
}

/* 更多面板 */
#app .sheet.sheet-wb-more {
  max-height: 86%;
  padding-top: 14px;
}

#app .wb-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#app .wb-more-head h2 {
  color: #1F2329;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

#app .wb-more-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 0 4px;
  padding: 3px;
  border-radius: 9px;
  background: #F5F6F7;
}

#app .wb-more-tab {
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #646A73;
  font-size: 11px;
}

#app .wb-more-tab.is-on {
  background: #FFFFFF;
  color: #3370FF;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
}

#app .wb-more-list {
  display: flex;
  flex-direction: column;
  margin-top: 3px;
}

#app .wb-more-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 3px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

#app .wb-more-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  color: #646A73;
}

#app .wb-more-icon svg {
  width: 20px;
  height: 20px;
}

#app .wb-more-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .wb-more-main b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 400;
  line-height: 19px;
}

#app .wb-more-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .wb-more-desc {
  flex: none;
  color: #8F959E;
  font-size: 11px;
}

#app .wb-more-arrow {
  flex: none;
  color: #B0B5BD;
  font-size: 18px;
}

#app .wb-switch {
  position: relative;
  flex: none;
  width: 36px;
  height: 22px;
  border-radius: 11px;
  background: #DEE0E3;
  transition: background 0.18s ease;
}

#app .wb-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.18);
  transition: transform 0.18s ease;
}

#app .wb-switch.is-on {
  background: #3370FF;
}

#app .wb-switch.is-on i {
  transform: translateX(14px);
}

#app .wb-template-list {
  gap: 8px;
  padding-top: 4px;
}

#app .wb-template-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

#app .wb-template-preview {
  display: block;
  width: 72px;
  height: 54px;
  border-radius: 7px;
  background-color: #FFFFFF;
}

#app .wb-template-preview.is-line {
  background-image: repeating-linear-gradient(to bottom, #DCE8FF 0 1px, transparent 1px 12px);
}

#app .wb-template-preview.is-grid {
  background-image:
    linear-gradient(to right, #DCE8FF 1px, transparent 1px),
    linear-gradient(to bottom, #DCE8FF 1px, transparent 1px);
  background-size: 12px 12px;
}

#app .wb-template-preview.is-dot {
  background-image: radial-gradient(#BBD4FF 1.2px, transparent 1.3px);
  background-size: 12px 12px;
}

#app .wb-template-row b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
}

#app .wb-info-list,
#app .wb-gesture-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  overflow: hidden;
}

#app .wb-info-list > div,
#app .wb-gesture-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid #EFF0F1;
  font-size: 12px;
}

#app .wb-info-list > div:last-child,
#app .wb-gesture-list > div:last-child {
  border-bottom: 0;
}

#app .wb-info-list span,
#app .wb-gesture-list span {
  color: #646A73;
}

#app .wb-info-list strong,
#app .wb-gesture-list strong {
  color: #1F2329;
  font-weight: 500;
}

#app .sheet-wb-text .form-note {
  margin-top: 2px;
}

@media (max-width: 374px) {
  #app .wb-top-tools {
    gap: 0;
    padding: 4px;
  }

  #app .wb-top-btn {
    width: 34px;
    height: 36px;
  }
}

@media (max-width: 374px) {
  #app .wb-top-tools {
    gap: 2px;
    padding: 4px 5px;
  }

  #app .wb-top-btn {
    width: 33px;
    height: 36px;
  }
}

/* ============================================================
   v3.3 · 文字笔记编辑器 / 语音笔记
   ============================================================ */

/* 文字笔记编辑器 */
#app .text-note-editor-page .m-fullpage-nav {
  display: none;
}

#app .text-note-editor-page .m-fullpage-scroll {
  padding: 0;
  background: #FFFFFF;
}

#app .text-note-editor-page .m-fullpage-footer {
  flex: none;
  padding: 0 0 env(safe-area-inset-bottom);
  border-top: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .text-note-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #FFFFFF;
}

#app .text-note-page.is-locked .text-note-rich {
  background: #FAFBFC;
}

#app .text-note-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 6px 0;
  border-bottom: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .text-note-head-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1F2329;
  font-size: 20px;
}

#app .text-note-head-btn svg {
  width: 20px;
  height: 20px;
}

#app .text-note-title {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
  line-height: 40px;
  outline: none;
  text-overflow: ellipsis;
}

#app .text-note-title::placeholder {
  color: #B0B5BD;
  font-weight: 500;
}

#app .text-note-title:disabled {
  color: #646A73;
}

#app .text-note-save {
  flex: none;
  padding: 0 3px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
  white-space: nowrap;
}

#app .text-note-context {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 32px);
  min-height: 34px;
  margin: 10px 16px 2px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: #EEF4FF;
  color: #3370FF;
  font-size: 12px;
  line-height: 18px;
  text-align: left;
}

#app .text-note-context-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
}

#app .text-note-context-icon svg {
  width: 14px;
  height: 14px;
}

#app .text-note-context-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .text-note-context-more {
  flex: none;
  font-size: 10px;
  opacity: 0.75;
}

#app .text-note-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 6px;
  border-bottom: 1px solid #EFF0F1;
}

#app .text-note-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 6px 0 7px;
  border-radius: 11px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 10px;
  line-height: 22px;
}

#app .text-note-tag button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8F959E;
  font-size: 13px;
  line-height: 1;
}

#app .text-note-add-tag {
  height: 22px;
  padding: 0 8px;
  border: 1px dashed #C9CDD4;
  border-radius: 11px;
  background: transparent;
  color: #3370FF;
  font-size: 10px;
  line-height: 20px;
}

#app .text-note-lock {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: #FFF1D9;
  color: #8A4B08;
  font-size: 10px;
}

#app .text-note-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#app .text-note-rich {
  min-height: calc(100dvh - 230px);
  padding: 12px 16px 40px;
  color: #1F2329;
  font-size: 16px;
  line-height: 1.75;
  outline: none;
  word-break: break-word;
}

#app .text-note-rich:empty::before {
  content: attr(data-placeholder);
  color: #B0B5BD;
  pointer-events: none;
}

#app .text-note-rich img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: 8px;
}

#app .text-note-rich blockquote {
  margin: 8px 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid #BBD4FF;
  color: #646A73;
}

#app .text-note-rich ul {
  margin: 6px 0;
  padding-left: 22px;
}

#app .text-note-rich b,
#app .text-note-rich strong {
  font-weight: 600;
}

#app .text-note-rich i,
#app .text-note-rich em {
  font-style: italic;
}

#app .text-note-rich .text-note-todo {
  display: inline-block;
  min-width: 18px;
  cursor: pointer;
  user-select: none;
}

#app .text-note-rich .text-note-todo.is-done {
  color: #3370FF;
}

#app .text-note-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
  padding: 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .text-note-toolbar::-webkit-scrollbar {
  display: none;
}

#app .text-note-toolbar.is-locked {
  opacity: 0.42;
  pointer-events: none;
}

#app .text-note-tool {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4E5969;
}

#app .text-note-tool svg {
  width: 22px;
  height: 22px;
}

#app .text-note-tool:active {
  background: #F2F3F5;
}

/* 文字 AI / 提取结果 */
#app .text-note-ai-summary {
  margin: 4px 0 18px;
  padding: 12px;
  border-radius: 10px;
  background: #F5F9FF;
  color: #1F2329;
  font-size: 14px;
  line-height: 1.7;
}

#app .text-note-extract-list,
#app .text-note-info-list {
  display: flex;
  flex-direction: column;
  margin: 4px 0 14px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  overflow: hidden;
}

#app .text-note-extract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 6px 12px;
  border-bottom: 1px solid #EFF0F1;
}

#app .text-note-extract-row:last-child {
  border-bottom: 0;
}

#app .text-note-extract-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .text-note-extract-main b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

#app .text-note-extract-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

#app .text-note-info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid #EFF0F1;
  font-size: 12px;
}

#app .text-note-info-list > div:last-child {
  border-bottom: 0;
}

#app .text-note-info-list span {
  color: #646A73;
}

#app .text-note-info-list strong {
  color: #1F2329;
  font-weight: 500;
  text-align: right;
}

/* 语音录音页 */
#app .voice-rec-page-wrap .m-fullpage-nav {
  display: none;
}

#app .voice-rec-page-wrap .m-fullpage-scroll {
  padding: 0;
  background: #FFFFFF;
}

#app .voice-rec-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #FFFFFF;
}

#app .voice-rec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  border-bottom: 1px solid #EFF0F1;
}

#app .voice-rec-head h1 {
  flex: 1;
  overflow: hidden;
  color: #1F2329;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .voice-rec-head-btn {
  flex: none;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #646A73;
  font-size: 14px;
}

#app .voice-rec-head-btn.is-primary {
  color: #3370FF;
  font-weight: 500;
}

#app .voice-rec-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 46px 24px calc(28px + env(safe-area-inset-bottom));
}

#app .voice-rec-kicker {
  color: #B0B5BD;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 14px;
}

#app .voice-rec-duration {
  margin-top: 20px;
  color: #1F2329;
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 40px;
}

#app .voice-rec-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  margin-top: 24px;
}

#app .voice-rec-wave i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: #3370FF;
  opacity: 0.85;
  transition: height 0.12s linear;
}

#app .voice-rec-wave.is-live i {
  background: #3370FF;
}

#app .voice-rec-wave.is-static i {
  opacity: 0.7;
}

#app .voice-rec-status {
  margin: 20px 0 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

#app .voice-rec-record {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 28px;
  border: 0;
  border-radius: 50%;
  background: #F54A45;
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(245, 74, 69, 0.26);
}

#app .voice-rec-record svg {
  width: 26px;
  height: 26px;
}

#app .voice-rec-pause {
  display: flex;
  gap: 5px;
}

#app .voice-rec-pause::before,
#app .voice-rec-pause::after {
  content: "";
  display: block;
  width: 5px;
  height: 20px;
  border-radius: 2px;
  background: #FFFFFF;
}

#app .voice-rec-stop {
  margin-top: 14px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #646A73;
  font-size: 12px;
}

#app .voice-rec-stop-placeholder {
  display: block;
  height: 36px;
  margin-top: 14px;
}

#app .voice-rec-hint {
  max-width: 280px;
  margin: 24px 0 0;
  color: #B0B5BD;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

#app .voice-rec-preview {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px calc(28px + env(safe-area-inset-bottom));
}

#app .voice-rec-preview .voice-rec-wave {
  margin-top: 18px;
}

#app .voice-rec-audio,
#app .voice-detail-audio {
  width: 100%;
  margin: 14px 0 4px;
}

#app .voice-rec-transcript-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}

#app .voice-rec-transcript-label > span {
  color: #646A73;
  font-size: 12px;
}

#app .voice-rec-transcript {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FAFBFC;
  color: #1F2329;
  font-size: 16px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
}

#app .voice-rec-save-btn {
  height: 48px;
  margin-top: 16px;
}

#app .voice-rec-extract {
  height: 40px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
}

@media (max-width: 374px) {
  #app .text-note-rich {
    padding-right: 16px;
    padding-left: 16px;
  }

  #app .voice-rec-main {
    padding-right: 18px;
    padding-left: 18px;
  }
}

#app .voice-rec-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 64px;
  margin-top: 28px;
}

#app .voice-rec-actions .voice-rec-record {
  margin-top: 0;
}

#app .voice-rec-actions .voice-rec-stop,
#app .voice-rec-actions .voice-rec-stop-placeholder {
  margin-top: 0;
}

#app .text-note-editor-page .m-fullpage-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app .text-note-page {
  flex: 1;
  min-height: 0;
}

#app .text-note-scroll {
  flex: 1;
  min-height: 0;
}

#app .text-note-rich {
  min-height: 100%;
}

/* 笔记来源筛选 */
#app .notes-source-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .notes-source-tabs::-webkit-scrollbar {
  display: none;
}

#app .notes-source-tab {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #EFF0F1;
  border-radius: 999px;
  background: #F7F8FA;
  color: #646A73;
  font-size: 12px;
  line-height: 26px;
}

#app .notes-source-tab.is-on {
  border-color: #C9D8FF;
  background: #EEF4FF;
  color: #3370FF;
  font-weight: 500;
}

/* 关联横幅：白板浮层 / 语音详情内嵌 */
#app .wb-context-banner {
  position: absolute;
  top: calc(48px + env(safe-area-inset-top) + 66px);
  right: 16px;
  left: 16px;
  z-index: 18;
  width: auto;
  margin: 0;
  background: #EEF4FF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.10);
}

#app .note-editor .text-note-context {
  width: 100%;
  margin: 0;
}

/* AI 摘要抽屉 */
#app .text-note-ai-summary.is-three-line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

#app .text-note-ai-actions {
  display: flex;
  gap: 10px;
}

#app .text-note-ai-actions .btn {
  flex: 1;
}

/* 可编辑任务草稿 */
#app .text-note-extract-row.is-editable {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
}

#app .text-note-extract-title {
  width: 100%;
  font-size: 13px;
}

#app .text-note-extract-fields {
  display: flex;
  gap: 8px;
}

#app .text-note-extract-fields .text-note-extract-due {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}

#app .text-note-extract-fields .text-note-extract-priority {
  flex: none;
  width: 84px;
  font-size: 12px;
}

/* 笔记设置页 */
#app .note-settings-page .m-fullpage-scroll {
  background: #F5F6F7;
  padding: 12px 16px calc(28px + env(safe-area-inset-bottom));
}

#app .note-settings {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#app .note-settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#app .note-settings-group-title {
  margin: 0 2px;
  color: #8F959E;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

#app .note-settings-card {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
}

#app .note-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid #F2F3F5;
  background: #FFFFFF;
  color: #1F2329;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

#app .note-settings-card > .note-settings-row:last-child {
  border-bottom: 0;
}

#app .note-settings-row.is-action:active {
  background: #F7F8FA;
}

#app .note-settings-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

#app .note-settings-main b {
  font-weight: 400;
}

#app .note-settings-main small {
  margin-top: 1px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .note-settings-row > span:first-child:not(.note-settings-main) {
  flex: 1;
}

#app .note-settings-row strong {
  color: #646A73;
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

#app .note-settings-value {
  flex: none;
  color: #8F959E;
  font-size: 12px;
}

#app .note-settings-arrow {
  flex: none;
  color: #C9CDD4;
  font-size: 16px;
  line-height: 16px;
}

#app .note-settings-demo {
  flex: none;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: #FFF7E6;
  color: #F5A623;
  font-size: 10px;
  line-height: 15px;
}

#app .note-settings-demo + .note-settings-arrow {
  margin-left: 0;
}

#app .note-settings-row.is-block {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
}

#app .note-settings-row.is-block .note-settings-main {
  flex: none;
}

#app .note-settings-seg {
  display: flex;
  gap: 6px;
}

#app .note-settings-seg button {
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: #F5F6F7;
  color: #646A73;
  font-family: inherit;
  font-size: 12px;
}

#app .note-settings-seg button.is-on {
  background: #EEF4FF;
  color: #3370FF;
  font-weight: 500;
}

#app .note-settings-switch {
  margin-left: 8px;
}

#app .note-settings-switch.is-disabled {
  opacity: 0.35;
}

#app .note-settings-footnote {
  margin: 0 2px;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

#app .note-settings-row:disabled {
  opacity: 0.45;
}

/* 笔记锁数字键盘 */
#app .note-lock-sheet {
  padding: 8px 18px calc(12px + env(safe-area-inset-bottom));
  text-align: center;
}

#app .note-lock-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 6px auto 10px;
  border-radius: 50%;
  background: #EEF4FF;
  color: #3370FF;
}

#app .note-lock-icon svg {
  width: 22px;
  height: 22px;
}

#app .note-lock-title {
  margin: 0;
  color: #1F2329;
  font-size: 18px;
  font-weight: 600;
}

#app .note-lock-note {
  margin: 4px 0 16px;
  overflow: hidden;
  color: #8F959E;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .note-lock-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

#app .note-lock-dots i {
  width: 12px;
  height: 12px;
  border: 1px solid #C9CDD4;
  border-radius: 50%;
  background: #FFFFFF;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#app .note-lock-dots i.is-on {
  border-color: #3370FF;
  background: #3370FF;
}

#app .note-lock-dots.is-shake {
  animation: noteLockShake 0.36s ease;
}

@keyframes noteLockShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

#app .note-lock-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 12px;
}

#app .note-lock-pad button {
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: #F5F6F7;
  color: #1F2329;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
}

#app .note-lock-pad button:active {
  background: #E9EBEF;
}

#app .note-lock-pad .is-delete {
  background: transparent;
  color: #646A73;
  font-size: 18px;
}

#app .note-lock-cancel {
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #646A73;
  font-family: inherit;
  font-size: 13px;
}

#app .note-lock-hint {
  margin: 6px 0 0;
  color: #B0B5BD;
  font-size: 10px;
  line-height: 15px;
}

#app .note-lock-input {
  font-size: 20px;
  letter-spacing: 8px;
  text-align: center;
}

/* 历史版本 */
#app .note-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 12px;
}

#app .note-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
}

#app .note-history-main {
  flex: 1;
  min-width: 0;
}

#app .note-history-main b {
  display: block;
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
}

#app .note-history-main small {
  display: block;
  margin-top: 2px;
  color: #8F959E;
  font-size: 10px;
}

#app .note-history-main p {
  margin: 4px 0 0;
  color: #646A73;
  font-size: 11px;
  line-height: 16px;
}

#app .note-history-restore {
  flex: none;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

#app .note-history-empty {
  margin: 8px 0 14px;
  color: #8F959E;
  font-size: 12px;
  line-height: 19px;
}

/* ============================================================
   任务页 · iOS 提醒事项风格（仅任务 Tab）
   ============================================================ */

#app[data-tab="tasks"] {
  background: #F2F2F7;
}

#app[data-tab="tasks"] .topbar {
  display: none;
}

#app[data-tab="tasks"] .page-container {
  padding: calc(6px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom));
  background: #F2F2F7;
}

#app .tp-editor-page,
#app .tp-list-editor-page,
#app .tp-lists-edit-page,
#app .tp-search-page {
  font-family: -apple-system, "SF Pro Text", "PingFang SC", sans-serif;
}

#app[data-tab="tasks"] .tabbar {
  border-top-color: #E5E5EA;
}

#tasksFabRoot {
  position: absolute;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 36;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#tasksFabRoot.is-keyboard {
  opacity: 0;
  transform: translateY(10px);
}

#tasksFabRoot .tp-fab {
  pointer-events: auto;
}

.tp-page {
  font-family: -apple-system, "SF Pro Text", "PingFang SC", sans-serif;
  color: #1C1C1E;
}

/* 大标题头部 */

.tp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 18px;
}

.tp-title {
  margin: 0;
  color: #1C1C1E;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tp-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.tp-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}

.tp-circle svg {
  width: 19px;
  height: 19px;
}

.tp-circle:active {
  transform: scale(0.96);
}

.tp-edit-pill {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #FFFFFF;
  color: #007AFF;
  font-size: 13px;
  line-height: 32px;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}

.tp-edit-pill:active {
  transform: scale(0.96);
}

/* 2×2 智能卡片 */

.tp-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.tp-smart {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 104px;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  color: #FFFFFF;
  text-align: left;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.tp-smart:active {
  transform: scale(0.98);
}

.tp-smart.is-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.tp-smart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tp-smart-ico {
  display: inline-flex;
  color: #FFFFFF;
  opacity: 0.95;
}

.tp-smart-ico svg {
  width: 20px;
  height: 20px;
}

.tp-smart-num {
  font-size: 28px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tp-smart-label {
  margin-top: auto;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
}

/* 分组标题 */

.tp-section {
  margin-bottom: 24px;
}

.tp-section:last-child {
  margin-bottom: 4px;
}

.tp-section-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 2px 10px;
}

.tp-section-head h2 {
  margin: 0;
  color: #1C1C1E;
  font-size: 20px;
  line-height: 25px;
  font-weight: 700;
}

.tp-count {
  color: #8E8E93;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
}

.tp-update {
  height: 28px;
  margin-left: auto;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  font-size: 12px;
  line-height: 28px;
  font-weight: 600;
  transition: opacity 0.18s ease;
}

.tp-update.is-loading {
  opacity: 0.55;
}

.tp-link {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #007AFF;
  font-size: 13px;
  line-height: 18px;
}

/* 白色卡片与列表行 */

.tp-card-block {
  overflow: hidden;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  background: #FFFFFF;
}

.tp-list-row,
.tp-task,
.tp-pick-row,
.tp-edit-row {
  position: relative;
}

.tp-list-row + .tp-list-row::before,
.tp-task + .tp-task::before,
.tp-pick-row + .tp-pick-row::before,
.tp-edit-row + .tp-edit-row::before,
.tp-row + .tp-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 1px;
  background: #E5E5EA;
  pointer-events: none;
}

.tp-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  background: #FFFFFF;
  text-align: left;
}

.tp-list-row.is-active {
  background: #F7F7F9;
}

.tp-list-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #FFFFFF;
}

.tp-list-ico svg {
  width: 17px;
  height: 17px;
}

.tp-list-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-list-count {
  flex: none;
  color: #8E8E93;
  font-size: 14px;
  line-height: 20px;
}

.tp-chev {
  flex: none;
  color: #C7C7CC;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

/* 即将到期 / 筛选任务行 */

.tp-task {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 12px 6px 16px;
  background: #FFFFFF;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tp-task.is-removing {
  opacity: 0;
  transform: translateX(10px);
}

.tp-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1.5px solid #007AFF;
  border-radius: 50%;
  background: transparent;
  color: #FFFFFF;
}

.tp-check svg {
  width: 14px;
  height: 14px;
}

.tp-check.is-checked {
  background: #007AFF;
  border-color: #007AFF;
}

.tp-task-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.tp-task-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 21px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-task-sub {
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
  color: #8E8E93;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-sub-dot {
  color: #C7C7CC;
}

.tp-overdue {
  color: #FF3B30;
}

.tp-task.is-done .tp-task-title {
  color: #8E8E93;
  text-decoration: line-through;
}

.tp-task.is-done .tp-check {
  background: #007AFF;
  border-color: #007AFF;
}

.tp-task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding-left: 2px;
}

.tp-live {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.tp-imp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.12);
  color: #FF3B30;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.tp-focus {
  display: inline-flex;
  color: #8E8E93;
}

.tp-focus svg {
  width: 14px;
  height: 14px;
}

.tp-empty-line {
  margin: 0;
  padding: 8px 4px;
  color: #8E8E93;
  font-size: 12px;
  line-height: 18px;
}

/* 悬浮 + 按钮 */

.tp-fab {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #007AFF;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
  transition: transform 0.15s ease;
}

.tp-fab svg {
  width: 24px;
  height: 24px;
}

.tp-fab:active {
  transform: scale(0.96);
}

/* 全屏编辑页：导航 */

#app .tp-editor-page,
#app .tp-list-editor-page,
#app .tp-lists-edit-page {
  background: #F2F2F7;
}

#app .tp-editor-page .m-fullpage-nav,
#app .tp-list-editor-page .m-fullpage-nav,
#app .tp-lists-edit-page .m-fullpage-nav {
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  background: #F2F2F7;
  border-bottom: 0;
}

#app .tp-editor-page .m-fullpage-back,
#app .tp-list-editor-page .m-fullpage-back,
#app .tp-lists-edit-page .m-fullpage-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

#app .tp-editor-page .m-fullpage-back svg,
#app .tp-list-editor-page .m-fullpage-back svg,
#app .tp-lists-edit-page .m-fullpage-back svg {
  width: 16px;
  height: 16px;
}

#app .tp-editor-page .m-fullpage-title,
#app .tp-list-editor-page .m-fullpage-title,
#app .tp-lists-edit-page .m-fullpage-title {
  font-size: 17px;
  font-weight: 600;
  color: #1C1C1E;
}

#app .tp-editor-page .m-fullpage-actions,
#app .tp-list-editor-page .m-fullpage-actions,
#app .tp-lists-edit-page .m-fullpage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 32px;
}

#app .tp-nav-check {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFFFFF;
  color: #007AFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

#app .tp-nav-check svg {
  width: 18px;
  height: 18px;
}

#app .tp-nav-check.is-disabled {
  color: #C7C7CC;
}

#app .tp-editor-page .m-fullpage-scroll,
#app .tp-list-editor-page .m-fullpage-scroll,
#app .tp-lists-edit-page .m-fullpage-scroll {
  padding: 12px 16px calc(32px + env(safe-area-inset-bottom));
}

/* 表单卡片 */

.tp-editor-card {
  padding: 16px;
  border-radius: 14px;
  background: #FFFFFF;
}

.tp-title-input {
  display: block;
  width: 100%;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 24px;
  outline: none;
}

.tp-title-input::placeholder {
  color: #C7C7CC;
}

.tp-notes-input {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid #F2F2F7;
  background: transparent;
  color: #1C1C1E;
  font-size: 14px;
  line-height: 21px;
  resize: none;
  outline: none;
}

.tp-notes-input::placeholder {
  color: #C7C7CC;
}

.tp-group-title {
  margin: 20px 4px 8px;
  color: #8E8E93;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  background: #FFFFFF;
}

.tp-row-btn {
  width: 100%;
  border: 0;
  text-align: left;
}

.tp-row-ico {
  display: inline-flex;
  flex: none;
  color: #8E8E93;
}

.tp-row-ico svg {
  width: 20px;
  height: 20px;
}

.tp-row-ico-blue {
  color: #007AFF;
}

.tp-row-label {
  flex: 1;
  min-width: 0;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 22px;
}

.tp-row-value {
  flex: none;
  max-width: 46%;
  overflow: hidden;
  color: #8E8E93;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-value-row {
  justify-content: flex-end;
  padding-left: 52px;
}

.tp-native {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #007AFF;
  font-size: 16px;
  line-height: 22px;
  text-align: right;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.tp-inline-hint {
  margin: 0;
  padding: 0 16px 12px;
  color: #8E8E93;
  font-size: 12px;
  line-height: 18px;
}

.tp-delete-btn {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  background: #FFFFFF;
  color: #FF3B30;
  font-size: 16px;
  line-height: 52px;
  text-align: center;
}

/* iOS 开关 */

.tp-switch {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
}

.tp-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.tp-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #E9E9EA;
  transition: background 0.2s ease;
}

.tp-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.tp-switch input:checked + span {
  background: #34C759;
}

.tp-switch input:checked + span::after {
  transform: translateX(20px);
}

.tp-switch input:disabled + span {
  opacity: 0.45;
}

/* 选择列表 / 详细信息 */

.tp-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  background: #FFFFFF;
  text-align: left;
}

.tp-pick-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-blue-check {
  display: inline-flex;
  flex: none;
  color: #007AFF;
}

.tp-blue-check svg {
  width: 18px;
  height: 18px;
}

.tp-add-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  background: #FFFFFF;
  color: #007AFF;
  font-size: 16px;
}

.tp-add-list-row svg {
  width: 20px;
  height: 20px;
}

.tp-tag-card {
  padding: 12px 16px;
}

.tp-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tp-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 4px 0 10px;
  border-radius: 999px;
  background: #F2F2F7;
  color: #1C1C1E;
  font-size: 13px;
  line-height: 26px;
}

.tp-tag button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #C7C7CC;
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1;
}

.tp-tag-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-tag-input-row input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #E5E5EA;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1C1C1E;
  font-size: 14px;
  outline: none;
}

.tp-tag-input-row button {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  font-size: 14px;
  font-weight: 500;
}

.tp-tag-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tp-tag-suggest button {
  height: 24px;
  padding: 0 9px;
  border: 1px solid #E5E5EA;
  border-radius: 999px;
  background: #FFFFFF;
  color: #8E8E93;
  font-size: 12px;
  line-height: 22px;
}

.tp-tag-suggest button:active {
  background: #F2F2F7;
}

.tp-focus-preview {
  margin: 0;
  padding: 0 16px 14px;
  color: #007AFF;
  font-size: 12px;
  line-height: 18px;
}

/* 新建列表 */

.tp-list-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #FFFFFF;
}

.tp-list-hero-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #FFFFFF;
}

.tp-list-hero-ico svg {
  width: 34px;
  height: 34px;
}

.tp-list-hero input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #E5E5EA;
  background: transparent;
  color: #1C1C1E;
  font-size: 20px;
  line-height: 40px;
  outline: none;
}

.tp-list-hero input::placeholder {
  color: #C7C7CC;
}

.tp-color-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #FFFFFF;
}

.tp-color-dot {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.tp-color-dot.is-on::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #C7C7CC;
  border-radius: 50%;
}

/* 编辑列表 */

.tp-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  background: #FFFFFF;
}

.tp-edit-spacer {
  flex: none;
  width: 24px;
  height: 24px;
}

.tp-minus {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FF3B30;
  color: #FFFFFF;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

.tp-edit-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tp-info-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #007AFF;
}

.tp-info-btn svg {
  width: 18px;
  height: 18px;
}

.tp-drag {
  display: inline-flex;
  flex: none;
  color: #C7C7CC;
}

.tp-drag svg {
  width: 18px;
  height: 18px;
}

.tp-add-group {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 18px;
  border: 1px solid #E5E5EA;
  border-radius: 999px;
  background: #FFFFFF;
  color: #007AFF;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
}

/* 搜索页 */

#app .tp-search-page .m-fullpage-scroll {
  padding: 12px 16px calc(32px + env(safe-area-inset-bottom));
  background: #F2F2F7;
}

.tp-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  margin-bottom: 14px;
  padding: 0 12px;
  border-radius: 12px;
  background: #FFFFFF;
  color: #8E8E93;
}

.tp-search-field svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.tp-search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 22px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.tp-search-hint {
  margin: 8px 4px;
  color: #8E8E93;
  font-size: 12px;
  line-height: 18px;
}

/* ============================================================
   消息台 v5 · 通知守门员 + 未读工作台
   ============================================================ */

#app .gate5-page {
  display: flex;
  flex-direction: column;
  font-family: -apple-system, "SF Pro Text", "PingFang SC", sans-serif;
}

.gate5-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0 12px;
}

.gate5-head-main {
  flex: 1;
  min-width: 0;
}

.gate5-head-main h1 {
  margin: 0;
  color: #1F2329;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.gate5-head-main p {
  margin: 4px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.gate5-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  line-height: 28px;
  font-weight: 500;
  white-space: nowrap;
}

.gate5-phone-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C9CDD4;
}

.gate5-phone-pill.is-active {
  border-color: #C9D8FF;
  background: #F2F6FF;
  color: #3370FF;
}

.gate5-phone-pill.is-active i {
  background: #3370FF;
}

.gate5-head-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #E5E6EB;
  border-radius: 50%;
  background: #FFFFFF;
  color: #646A73;
}

.gate5-head-icon svg {
  width: 17px;
  height: 17px;
}

.gate5-head-icon:active {
  background: #F2F3F5;
}

/* 值守状态卡 */

#app .gate5-status {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 12px;
}

#app .gate5-status-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.gate5-status-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

#app .gate5-status .gate-presence-title {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
}

.gate5-auto-tag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: #E8F8E5;
  color: #2EA121;
  font-size: 9px;
  font-weight: 600;
}

.gate5-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  margin-top: 6px;
  color: #2EA121;
  font-size: 10px;
  line-height: 16px;
}

.gate5-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C724;
  box-shadow: 0 0 0 3px rgba(52, 199, 36, 0.12);
}

.gate5-mode-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 3px;
  margin: 12px 0 14px;
  padding: 3px;
  border-radius: 8px;
  background: #F2F3F5;
}

.gate5-mode-btn {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #646A73;
  font-size: 12px;
  line-height: 32px;
}

.gate5-mode-btn.active {
  background: #FFFFFF;
  color: #3370FF;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
}

.gate5-mode-btn.is-disabled {
  opacity: 0.45;
}

.gate5-mode-btn.is-disabled.active {
  opacity: 0.7;
}

#app .gate5-status-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  padding: 12px 0 2px;
  border-top: 1px solid #F2F3F5;
}

.gate5-status-stats span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gate5-status-stats strong {
  color: #1F2329;
  font-size: 22px;
  line-height: 26px;
  font-weight: 700;
}

.gate5-status-stats small {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

.gate5-status-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.gate5-lock-btn,
.gate5-complete-task {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
}

.gate5-lock-btn svg {
  width: 14px;
  height: 14px;
}

.gate5-complete-task {
  border-color: #FFD9A8;
  background: #FFF7E6;
  color: #8A4B08;
}

.gate5-status-time {
  margin-left: auto;
  color: #8F959E;
  font-size: 10px;
}

/* 来源与状态筛选 */

.gate5-source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.gate5-source-tab {
  height: 30px;
  padding: 0 14px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  line-height: 28px;
}

.gate5-source-tab.active {
  border-color: #C9D8FF;
  background: #E1EAFF;
  color: #245BDB;
  font-weight: 600;
}

.gate5-chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px 10px;
  padding: 0 16px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gate5-chips::-webkit-scrollbar {
  display: none;
}

.gate5-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 28px;
  padding: 0 11px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  line-height: 26px;
  white-space: nowrap;
}

.gate5-chip span {
  margin-left: 4px;
  color: #8F959E;
  font-size: 10px;
}

.gate5-chip.active {
  border-color: #C9D8FF;
  background: #E1EAFF;
  color: #245BDB;
  font-weight: 600;
}

.gate5-chip.active span {
  color: #245BDB;
}

/* 群聊摘要 */

.gate5-group-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  text-align: left;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
}

.gate5-group-avatars {
  position: relative;
  flex: none;
  width: 48px;
  height: 32px;
}

.gate5-group-avatar {
  position: absolute;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
}

.gate5-group-avatar:nth-child(1) {
  left: 0;
  z-index: 3;
  background: #3370FF;
}

.gate5-group-avatar:nth-child(2) {
  left: 14px;
  z-index: 2;
  background: #FF9500;
}

.gate5-group-avatar:nth-child(3) {
  left: 28px;
  z-index: 1;
  background: #AF52DE;
}

.gate5-group-avatar.is-single {
  position: static;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: #3370FF;
}

.gate5-group-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-group-main strong {
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.gate5-group-main small {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-chev {
  flex: none;
  color: #C9CDD4;
  font-size: 18px;
  line-height: 1;
}

.gate5-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate5-group-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

.gate5-group-row-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-group-row-main strong {
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.gate5-group-row-main small {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-rule-tag {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 14px;
  font-weight: 600;
}

.gate5-rule-tag.is-all {
  background: #E8F8E5;
  color: #2EA121;
}

.gate5-rule-tag.is-muted {
  background: #F2F3F5;
  color: #8F959E;
}

/* 消息行 */

#app .gate5-msg-list {
  gap: 8px;
}

#app .gate5-msg {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
  color: #1F2329;
  text-align: left;
  -webkit-touch-callout: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

#app .gate5-msg.is-pressing {
  transform: scale(0.99);
  background: #F7F8FA;
}

#app .gate5-msg.is-hero {
  box-shadow: 0 0 0 2px rgba(255, 159, 69, 0.14);
}

.gate5-unread-dot {
  position: absolute;
  top: 20px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3370FF;
}

.gate5-source-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.gate5-source-ico.is-feishu {
  background: #E1EAFF;
  color: #3370FF;
}

.gate5-source-ico.is-email {
  background: #FFF1E0;
  color: #E37318;
}

.gate5-source-ico svg {
  width: 18px;
  height: 18px;
}

.gate5-msg-main {
  flex: 1;
  min-width: 0;
}

.gate5-msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.gate5-source-name {
  flex: none;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

.gate5-msg-sender {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gate5-msg-time {
  flex: none;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

.gate5-msg-content {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: #646A73;
  font-size: 12px;
  line-height: 17px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gate5-mail-subject {
  display: block;
  color: #1F2329;
  font-weight: 600;
}

.gate5-msg-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.gate5-mini-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 17px;
  font-weight: 600;
}

.gate5-mini-tag.is-mention {
  background: #E1EAFF;
  color: #245BDB;
}

.gate5-mini-tag.is-auth {
  background: #E8F8E5;
  color: #2EA121;
}

.gate5-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 18px;
  font-weight: 600;
}

.gate5-status-tag svg {
  width: 11px;
  height: 11px;
}

.gate5-status-tag.is-notify {
  background: #FFF1E0;
  color: #B25E00;
}

.gate5-status-tag.is-later {
  background: #E1EAFF;
  color: #245BDB;
}

.gate5-status-tag.is-silent {
  background: #F2F3F5;
  color: #8F959E;
}

.gate5-status-tag.is-pending {
  background: #F2F3F5;
  color: #8F959E;
}

.gate5-msg-side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  padding-left: 2px;
}

.gate5-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 12px;
  font-weight: 700;
}

.gate5-score.is-notify {
  background: #FFF1E0;
  color: #B25E00;
}

.gate5-score.is-later {
  background: #E1EAFF;
  color: #245BDB;
}

.gate5-score.is-silent {
  background: #F2F3F5;
  color: #8F959E;
}

.gate5-more {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8F959E;
  font-size: 18px;
  line-height: 1;
}

.gate5-more:active {
  background: #F2F3F5;
}

.gate5-foot {
  margin: 16px 0 4px;
  color: #8F959E;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

#app .gate5-empty {
  padding: 42px 16px;
}

#app .gate5-source-empty {
  margin: 0;
  padding: 28px 12px;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* 上下文面板 */

#app .sheet-gate-context {
  max-height: 88vh;
  overflow-y: auto;
}

.gate5-context-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 2px;
  margin-bottom: 10px;
}

.gate5-context-identity {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-context-identity strong {
  color: #1F2329;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

.gate5-context-identity small {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-context-content {
  padding: 12px;
  border-radius: 10px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 14px;
  line-height: 22px;
}

.gate5-context-judge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
}

.gate5-context-judge strong {
  display: block;
  color: #1F2329;
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
}

.gate5-basis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.gate5-basis-chips span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 9px;
  line-height: 12px;
}

.gate5-basis-chips b {
  color: #8F959E;
  font-weight: 500;
}

.gate5-context-source {
  margin: 12px 2px 10px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-context-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.gate5-context-rule {
  height: 38px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 13px;
}

/* 评分环 */

.gate5-ring {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(#3370FF calc(var(--p) * 1%), #EFF0F1 0);
}

.gate5-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #FFFFFF;
}

.gate5-ring span {
  position: relative;
  z-index: 1;
  color: #1F2329;
  font-size: 16px;
  font-weight: 700;
}

.gate5-ring.is-notify {
  background: conic-gradient(#FF9F45 calc(var(--p) * 1%), #FFE8CC 0);
}

.gate5-ring.is-later {
  background: conic-gradient(#3370FF calc(var(--p) * 1%), #E1EAFF 0);
}

.gate5-ring.is-silent {
  background: conic-gradient(#8F959E calc(var(--p) * 1%), #EFF0F1 0);
}

/* 消息详情页 */

#app .gate5-detail-page .m-fullpage-scroll {
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom));
  background: #F5F6F7;
}

#app .gate5-detail-source {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #E1EAFF;
  color: #245BDB;
  font-size: 11px;
  font-weight: 600;
}

#app .gate5-detail-source.is-email {
  background: #FFF1E0;
  color: #B25E00;
}

.gate5-detail-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  text-align: left;
}

.gate5-detail-source-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gate5-detail-source-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-detail-source-main strong {
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.gate5-detail-source-main small {
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-detail-time {
  flex: none;
  color: #8F959E;
  font-size: 11px;
}

.gate5-detail-sender-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gate5-detail-sender {
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
}

.gate5-detail-subject {
  margin: 0 0 8px;
  color: #1F2329;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.gate5-detail-content {
  margin: 0;
  color: #1F2329;
  font-size: 14px;
  line-height: 23px;
  white-space: pre-wrap;
}

.gate5-detail-account {
  margin: 10px 0 0;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-judge-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gate5-judge-main {
  flex: 1;
  min-width: 0;
}

.gate5-judge-main small {
  color: #8F959E;
  font-size: 10px;
}

.gate5-judge-main p {
  margin: 3px 0 0;
  color: #1F2329;
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
}

.gate5-rule-entry {
  display: flex;
  align-items: center;
  width: 100%;
}

.gate5-rule-entry-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.gate5-rule-entry-main strong {
  color: #1F2329;
  font-size: 14px;
}

.gate5-rule-entry-main small {
  color: #8F959E;
  font-size: 11px;
}

.gate5-detail-note {
  margin: 4px 4px 12px;
  color: #C9CDD4;
  font-size: 9px;
  line-height: 14px;
  word-break: break-all;
}

.gate5-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gate5-detail-primary {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}

.gate5-detail-secondary {
  flex: none;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 13px;
}

#app .m-fullpage-footer .gate5-detail-secondary {
  width: 100%;
}

.gate5-detail-text {
  flex: none;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #8F959E;
  font-size: 12px;
}

/* 模拟来源页 */

#app .gate5-sim-page .m-fullpage-scroll {
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  background: #F2F3F5;
}

.gate5-sim-banner {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-bottom: 12px;
  padding: 0 9px;
  border-radius: 6px;
  background: #E1EAFF;
  color: #245BDB;
  font-size: 10px;
  font-weight: 600;
}

.gate5-mail-sheet,
.gate5-feishu-sheet {
  padding: 16px;
  border: 1px solid #E5E6EB;
  border-radius: 12px;
  background: #FFFFFF;
}

.gate5-mail-eyebrow {
  margin: 0;
  color: #8F959E;
  font-size: 10px;
}

.gate5-mail-sheet h2 {
  margin: 8px 0;
  color: #1F2329;
  font-size: 20px;
  line-height: 27px;
  font-weight: 700;
}

.gate5-mail-meta {
  margin: 0;
  color: #646A73;
  font-size: 12px;
}

.gate5-mail-body {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #EFF0F1;
  color: #1F2329;
  font-size: 14px;
  line-height: 23px;
  white-space: pre-wrap;
}

.gate5-feishu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #EFF0F1;
}

.gate5-feishu-head strong {
  color: #1F2329;
  font-size: 16px;
}

.gate5-feishu-head small {
  color: #8F959E;
  font-size: 10px;
}

.gate5-feishu-day {
  margin: 12px 0 8px;
  color: #8F959E;
  font-size: 10px;
  text-align: center;
}

.gate5-feishu-bubble {
  padding: 12px;
  border-radius: 10px;
  background: #F2F3F5;
}

.gate5-feishu-bubble.is-target {
  background: #EAF1FF;
  box-shadow: inset 0 0 0 2px #3370FF;
}

.gate5-feishu-sender {
  color: #8F959E;
  font-size: 10px;
}

.gate5-feishu-bubble p {
  margin: 5px 0 0;
  color: #1F2329;
  font-size: 14px;
  line-height: 21px;
}

.gate5-feishu-highlight {
  display: inline-flex;
  margin-top: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 9px;
}

.gate5-sim-note {
  margin: 12px 4px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

.gate5-sim-back {
  width: 100%;
  height: 44px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 14px;
}

/* 群聊摘要页 */

#app .gate5-digest-page .m-fullpage-scroll,
#app .gate5-group-detail-page .m-fullpage-scroll {
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  background: #F5F6F7;
}

.gate5-page-note {
  margin: 0 2px 12px;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

.gate5-group-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
}

.gate5-group-detail-head > div {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-group-detail-head strong {
  color: #1F2329;
  font-size: 15px;
}

.gate5-group-detail-head small {
  color: #8F959E;
  font-size: 11px;
}

.gate5-digest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.gate5-digest-item {
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 10px;
  background: #FFFFFF;
  -webkit-touch-callout: none;
}

.gate5-digest-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gate5-digest-top strong {
  flex: 1;
  min-width: 0;
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

.gate5-digest-top span {
  color: #8F959E;
  font-size: 10px;
}

.gate5-digest-item p {
  margin: 5px 0 0;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
}

.gate5-sim-message-btn {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border: 1px dashed #C9D8FF;
  border-radius: 8px;
  background: #F5F8FF;
  color: #3370FF;
  font-size: 13px;
}

/* 群聊规则抽屉 */

#app .sheet-gate-rule {
  max-height: 86vh;
  overflow-y: auto;
}

.gate5-rule-sub {
  margin: 3px 0 0;
  color: #8F959E;
  font-size: 11px;
}

.gate5-rule-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.gate5-rule-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #E5E6EB;
  border-radius: 10px;
  background: #FFFFFF;
  text-align: left;
}

.gate5-rule-option.is-active {
  border-color: #3370FF;
  background: #F2F6FF;
}

.gate5-rule-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.gate5-rule-main strong {
  color: #1F2329;
  font-size: 14px;
}

.gate5-rule-main small {
  color: #8F959E;
  font-size: 11px;
}

.gate5-blue-check {
  display: inline-flex;
  flex: none;
  color: #3370FF;
}

.gate5-blue-check svg {
  width: 18px;
  height: 18px;
}

.gate5-rule-note {
  margin: 4px 2px 12px;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

.gate5-rule-save {
  width: 100%;
}

.gate5-rule-sim {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border: 1px dashed #C9D8FF;
  border-radius: 8px;
  background: #F5F8FF;
  color: #3370FF;
  font-size: 12px;
}

/* 来源设置 */

#app .gate5-settings-page .m-fullpage-scroll {
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  background: #F5F6F7;
}

.gate5-settings-group-title {
  margin: 16px 4px 8px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

.gate5-settings-card {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
}

.gate5-setting-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
}

.gate5-setting-row + .gate5-setting-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 1px;
  background: #EFF0F1;
}

.gate5-setting-row.is-disabled {
  opacity: 0.62;
}

.gate5-setting-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate5-setting-main strong {
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.gate5-setting-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

.gate5-setting-connected {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E8F8E5;
  color: #2EA121;
  font-size: 9px;
  font-weight: 600;
}

.gate5-setting-off {
  flex: none;
  color: #8F959E;
  font-size: 10px;
}

.gate5-setting-value {
  flex: none;
  color: #646A73;
  font-size: 12px;
}

.gate5-settings-empty {
  padding: 12px 14px;
  color: #8F959E;
  font-size: 11px;
}

.gate5-revoke {
  flex: none;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #F54A45;
  font-size: 11px;
}

.gate5-settings-note {
  margin: 14px 4px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

/* iOS 开关 */

.gate5-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
}

.gate5-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.gate5-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #E9E9EA;
  transition: background 0.2s ease;
}

.gate5-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.gate5-switch input:checked + span {
  background: #34C759;
}

.gate5-switch input:checked + span::after {
  transform: translateX(18px);
}

/* 锁屏预览 */

#lockPreviewRoot {
  position: absolute;
  inset: 0;
  z-index: 88;
  display: none;
}

#lockPreviewRoot.open {
  display: block;
}

.gate5-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: calc(48px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(160deg, #0B1220 0%, #1A2232 100%);
  color: #FFFFFF;
  transition: opacity 0.26s ease;
}

.gate5-lock::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 120, 0.16) 0%, rgba(255, 196, 120, 0) 70%);
  pointer-events: none;
}

#lockPreviewRoot.is-unlocking .gate5-lock {
  opacity: 0;
}

.gate5-lock-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.gate5-lock-close svg {
  width: 16px;
  height: 16px;
}

.gate5-lock-time {
  margin-top: 10px;
  font-size: 64px;
  line-height: 68px;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.gate5-lock-date {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.gate5-lock-guard {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.gate5-lock-notifications {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 26px;
}

.gate5-lock-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  color: #1F2329;
  text-align: left;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.gate5-lock-card.is-unlocking {
  transform: translateY(-28px) scale(1.02);
  opacity: 0;
}

.gate5-lock-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: #8F959E;
  font-size: 10px;
}

.gate5-lock-card-head .gate5-source-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.gate5-lock-card-head .gate5-source-ico svg {
  width: 13px;
  height: 13px;
}

.gate5-lock-card-head time {
  margin-left: auto;
}

.gate5-lock-card strong {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.gate5-lock-card p {
  display: -webkit-box;
  width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  color: #646A73;
  font-size: 12px;
  line-height: 17px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gate5-lock-important {
  display: inline-flex;
  align-self: flex-end;
  margin-top: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #FFF1E0;
  color: #B25E00;
  font-size: 10px;
  font-weight: 600;
}

.gate5-lock-quiet {
  margin: 54px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  text-align: center;
}

.gate5-lock-unlock {
  margin-top: auto;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* 使用中顶部横幅 */

#notifyBannerRoot {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: 12px;
  left: 12px;
  z-index: 86;
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

#notifyBannerRoot.show {
  opacity: 1;
  transform: none;
}

.gate5-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(31, 35, 41, 0.16);
  text-align: left;
  pointer-events: auto;
}

.gate5-banner .gate5-source-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.gate5-banner .gate5-source-ico svg {
  width: 15px;
  height: 15px;
}

.gate5-banner-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.gate5-banner-main strong {
  color: #1F2329;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.gate5-banner-main small {
  overflow: hidden;
  color: #646A73;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gate5-banner-score {
  flex: none;
  padding: 2px 5px;
  border-radius: 4px;
  background: #FFF1E0;
  color: #B25E00;
  font-size: 9px;
  font-weight: 600;
}

/* 长按 */

.gate5-msg.is-pressing,
.gate5-digest-item.is-pressing {
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 374px) {
  .gate5-head-main h1 {
    font-size: 22px;
  }

  .gate5-phone-pill {
    padding: 0 8px;
  }

  .gate5-status-stats {
    gap: 18px;
  }

  .gate5-lock {
    padding-right: 16px;
    padding-left: 16px;
  }

  .gate5-lock-time {
    font-size: 58px;
    line-height: 62px;
  }
}

/* ============================================================
   课表 v6 · 跟手周分页
   ============================================================ */

#app .m-week-viewport {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  background: transparent;
}

#app .m-week-viewport::before,
#app .m-week-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 8px;
  pointer-events: none;
  opacity: 0.55;
}

#app .m-week-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(31, 35, 41, 0.08), transparent);
}

#app .m-week-viewport::after {
  right: 0;
  background: linear-gradient(270deg, rgba(31, 35, 41, 0.08), transparent);
}

#app .m-week-track {
  display: flex;
  width: 300%;
  will-change: transform;
}

#app .m-week-page {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  min-width: 0;
  background: transparent;
}

#app .m-week-page .m-week-strip {
  height: 64px;
}

#app .m-week-page .m-week-grid {
  width: 100%;
}

#app .m-week-page.is-edge {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 560px;
  padding-top: 140px;
  color: #8F959E;
}

#app .m-week-edge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

#app .m-week-edge small {
  color: #C9CDD4;
  font-size: 10px;
}

#app .m-sched-title.is-week-fading {
  animation: schedWeekFade 0.12s ease;
}

@keyframes schedWeekFade {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

#pageRoot.is-week-dragging {
  overflow-y: hidden;
}

#app .m-week-viewport.is-bounce {
  animation: weekViewportBounce 0.2s ease;
}

@keyframes weekViewportBounce {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); }
  70% { transform: translateX(3px); }
}

/* ============================================================
   任务 v6 · 四卡独立列表页
   ============================================================ */

#app .page-container {
  transition: transform var(--dur-push) var(--ease-ios);
}

#app.page-closing .page-container {
  transition-duration: var(--dur-back);
}

#app.task-list-open .page-container {
  transform: translateX(-24px) scale(0.98);
  transform-origin: center top;
}

#app .m-fullpage.task-page {
  background: #F2F2F7;
  animation: taskPageIn var(--dur-push) var(--ease-ios);
}

@keyframes taskPageIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

#app .task-page .m-fullpage-nav {
  min-height: calc(48px + env(safe-area-inset-top));
  background: #F2F2F7;
  border-bottom: 0;
}

#app .task-page .m-fullpage-title {
  display: none;
}

#app .task-page .m-fullpage-scroll {
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
  background: #F2F2F7;
}

.task-page-inner {
  padding-top: 2px;
}

.task-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 16px;
}

.task-page-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.task-page-title-row h1 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.task-page-title-row span {
  color: #8E8E93;
  font-size: 14px;
  line-height: 20px;
}

.task-page-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.task-page-group {
  margin-bottom: 20px;
}

.task-page-group-title {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 8px;
  padding: 6px 4px;
  background: #F2F2F7;
  color: #8E8E93;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.task-page-empty {
  padding: 12px 4px;
}

/* ============================================================
   白板 v6 · 整体缩放 / 笔盘 / 图片页
   ============================================================ */

#app .wb-scroll {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

#app .wb-page-wrap {
  transform-origin: 0 0;
  will-change: transform;
}

#app .wb-tool {
  position: relative;
}

#app .wb-tool-color {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border: 1px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(31, 35, 41, 0.12);
}

#app .wb-pen-tray {
  position: absolute;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 24;
  padding: 12px;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#app .wb-pen-tray[hidden] {
  display: none;
}

#app .wb-pen-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

#app .wb-pen-tray-head strong {
  color: #1F2329;
  font-size: 13px;
}

#app .wb-pen-tray-more {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 10px;
}

#app .wb-pen-chips {
  display: flex;
  gap: 6px;
  margin: 0 -12px 10px;
  padding: 0 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .wb-pen-chips::-webkit-scrollbar {
  display: none;
}

#app .wb-pen-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  white-space: nowrap;
}

#app .wb-pen-chip svg {
  width: 15px;
  height: 15px;
}

#app .wb-pen-chip.is-on {
  border-color: #C9D8FF;
  background: #E1EAFF;
  color: #245BDB;
  font-weight: 600;
}

#app .wb-pen-tray-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

#app .wb-pen-tray-row > span {
  flex: none;
  width: 28px;
  color: #8F959E;
  font-size: 10px;
}

#app .wb-pen-tray-colors,
#app .wb-pen-tray-widths {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .wb-pen-tray-colors::-webkit-scrollbar,
#app .wb-pen-tray-widths::-webkit-scrollbar {
  display: none;
}

#app .wb-pen-tray-color {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--dot);
}

#app .wb-pen-tray-color.is-on::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid #3370FF;
  border-radius: 50%;
}

#app .wb-pen-tray-width {
  flex: none;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid #E5E6EB;
  border-radius: 6px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 10px;
}

#app .wb-pen-tray-width.is-on {
  border-color: #3370FF;
  background: #E1EAFF;
  color: #3370FF;
  font-weight: 600;
}

#app .wb-zoom-capsule {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 17;
  display: flex;
  align-items: center;
  gap: 1px;
  height: 38px;
  padding: 0 6px;
  border: 1px solid #EFF0F1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 18px rgba(31, 35, 41, 0.14);
}

#app .wb-zoom-capsule button {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 30px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4E5969;
  font-size: 18px;
  line-height: 1;
}

#app .wb-zoom-capsule .wb-zoom-value {
  min-width: 44px;
  color: #1F2329;
  font-size: 12px;
  font-weight: 600;
}

#app .wb-zoom-sep {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: #EFF0F1;
}

#app .wb-zoom-capsule .wb-zoom-fit svg {
  width: 16px;
  height: 16px;
}

#app .wb-zoom-capsule button:active {
  background: #F2F3F5;
}

#app .wb-zoom-capsule button:disabled {
  opacity: 0.35;
}

#app .m-sched-heading {
  flex: 1;
  min-width: 0;
}

#app .m-sched-title,
#app .m-sched-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 400px) {
  #app .m-week-arrow {
    width: 24px;
    height: 40px;
    font-size: 24px;
  }

  #app .m-sched-icon {
    width: 34px;
    height: 40px;
  }

  #app .m-sched-icon svg {
    width: 21px;
    height: 21px;
  }

  #app .m-sched-actions {
    gap: 0;
  }

  #app .m-sched-title {
    font-size: 15px;
  }

  #app .m-sched-sub {
    font-size: 10px;
  }
}

/* ============================================================
   JEEV v7 · 主分页 / 固定头部 / 消息台高分分类
   ============================================================ */

#app[data-tab="tasks"] .topbar {
  display: flex;
}

#app .page-container.main-pager-root {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #F5F6F7;
}

#app .main-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#app .main-track {
  display: flex;
  width: 400%;
  height: 100%;
  will-change: transform;
}

#app .main-page {
  flex: 0 0 25%;
  width: 25%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #F5F6F7;
}

/* 任务：固定头部 + 内容滚动 */

#app .tp-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#app .tp-head {
  flex: none;
  padding: 10px 16px 18px;
  background: #F2F2F7;
}

#app .tp-main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

/* 笔记：固定头部 + 列表滚动 */

#app .notes-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#app .notes-fixed-head {
  flex: none;
  padding: 0 16px;
  background: #F5F6F7;
}

#app .notes-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

/* 课表：固定头部 + 周条同步轨道 + 网格滚动 */

#app .m-sched-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#app .m-sched-fixed {
  flex: none;
  padding: 0 16px;
  background: #F5F6F7;
}

#app .m-week-strip-viewport {
  position: relative;
  overflow: hidden;
  margin-top: 2px;
}

#app .m-week-strip-track {
  display: flex;
  width: 300%;
  will-change: transform;
}

#app .m-week-strip-page {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  min-width: 0;
}

#app .m-week-strip-page .m-week-strip {
  height: 64px;
}

#app .m-week-strip-page.is-edge .m-week-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8BEC8;
  font-size: 11px;
}

#app .schedule-grid-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

#app .m-week-grid-track {
  display: flex;
  width: 300%;
  will-change: transform;
}

#app .m-week-grid-page {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  min-width: 0;
}

#app .m-week-grid-page .m-week-grid {
  width: 100%;
}

#app .m-week-grid-page.is-edge {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 520px;
  padding-top: 140px;
  color: #8F959E;
}

#app .m-week-grid-page.is-edge .m-week-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 520px;
  padding-top: 140px;
}

#app .m-week-strip-page .m-week-edge {
  flex-direction: row;
  gap: 4px;
}

/* 消息台：固定头部 + 分类分页 */

#app .gate5-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#app .gate5-fixed {
  flex: none;
  padding: 0 16px;
}

#app .gate5-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 10px;
}

#app .gate5-cat-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 7px;
  flex: 1;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
  touch-action: pan-y;
}

#app .gate5-cat-chips::-webkit-scrollbar {
  display: none;
}

#app .gate5-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  line-height: 28px;
  white-space: nowrap;
}

#app .gate5-cat-chip.is-on {
  border-color: #C9D8FF;
  background: #E1EAFF;
  color: #245BDB;
  font-weight: 600;
}

#app .gate5-cat-chip em {
  padding: 1px 4px;
  border-radius: 3px;
  background: #F2F3F5;
  color: #8F959E;
  font-size: 8px;
  font-style: normal;
  line-height: 11px;
}

#app .gate5-cat-add {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #E5E6EB;
  border-radius: 50%;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 20px;
  line-height: 1;
}

#app .gate-cat-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}

#app .gate-cat-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

#app .gate-cat-page {
  height: 100%;
  flex: none;
  overflow: hidden;
}

#app .gate-cat-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

#app .gate-high-empty {
  margin: 10px 0;
  color: #8F959E;
  font-size: 12px;
  line-height: 18px;
}

/* 添加来源 */

.gate-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #EFF0F1;
  background: transparent;
  text-align: left;
}

.gate-source-row:last-child {
  border-bottom: 0;
}

.gate-source-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gate-source-main strong {
  color: #1F2329;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.gate-source-main small {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

.gate-source-state {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F2F3F5;
  color: #8F959E;
  font-size: 9px;
}

.gate-source-state.is-on {
  background: #E8F8E5;
  color: #2EA121;
}

.gate-source-demo {
  width: 100%;
  height: 38px;
  margin-top: 10px;
  border: 1px dashed #C9D8FF;
  border-radius: 8px;
  background: #F5F8FF;
  color: #3370FF;
  font-size: 12px;
}

/* v7 补充：统一顶栏、滚动留白与手势约束 */

#app[data-tab="schedule"] > .topbar {
  display: flex;
}

#app .main-viewport,
#app .main-page,
#app .gate5-fixed,
#app .gate5-cat-chips,
#app .tp-main-scroll,
#app .notes-list-scroll {
  touch-action: pan-y;
}

#app .gate5-fixed {
  padding: 12px 16px 0;
  background: #F5F6F7;
}

#app .notes-fixed-head {
  padding: 12px 16px 0;
}

#app .m-sched-fixed {
  padding: 8px 16px 0;
}

#app .tp-main-scroll,
#app .notes-list-scroll,
#app .gate-cat-scroll,
#app .schedule-grid-scroll {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

#app .gate5-msg.is-blocked-out {
  animation: gateMsgBlockedOut 0.44s ease forwards;
  pointer-events: none;
}

@keyframes gateMsgBlockedOut {
  0% { opacity: 1; transform: translateX(0); }
  55% { opacity: 0.5; transform: translateX(18px); }
  100% { opacity: 0; transform: translateX(26px); }
}

/* ============================================================
   JEEV v8 · 启动页 / 苹果式动效基线
   ============================================================ */

#app .jeev-splash {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background:
    radial-gradient(420px 320px at 50% 38%, rgba(51, 112, 255, 0.10), transparent 70%),
    #F5F6F7;
  opacity: 1;
  transition: opacity var(--dur-fast) var(--ease-soft);
  touch-action: none;
}

#app .jeev-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

#app .jeev-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
  text-align: center;
}

#app .jeev-splash-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(11, 18, 32, 0.18);
}

#app .jeev-splash-name {
  margin-top: 24px;
  color: #1F2329;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

#app .jeev-splash-sub {
  max-width: 272px;
  margin-top: 8px;
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.01em;
}

#app .m-about-tagline {
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.01em;
}

#app .topbar,
#app .tabbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#app .page-container {
  transition: transform var(--dur-push) var(--ease-ios);
}

#app.page-closing .page-container {
  transition-duration: var(--dur-back);
}

#app.page-open .page-container {
  transform: translateX(-24px) scale(0.98);
  transform-origin: center top;
}

#app .m-fullpage {
  animation: jeevPageIn var(--dur-push) var(--ease-ios) both;
}

#app .m-fullpage.is-leaving {
  animation: jeevPageOut var(--dur-back) var(--ease-ios) both;
  pointer-events: none;
}

#app .m-fullpage.task-page {
  animation: jeevPageIn var(--dur-push) var(--ease-ios) both;
}

#app .m-fullpage.task-page.is-leaving {
  animation: jeevPageOut var(--dur-back) var(--ease-ios) both;
}

@keyframes jeevPageIn {
  from { opacity: 0.98; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes jeevPageOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0.98; transform: translateX(100%); }
}

#app.page-returning .m-fullpage {
  animation: jeevPageReturn var(--dur-back) var(--ease-ios) both;
  transform-origin: center top;
}

#app.page-returning .m-fullpage.task-page {
  animation: jeevPageReturn var(--dur-back) var(--ease-ios) both;
}

@keyframes jeevPageReturn {
  from { opacity: 0.94; transform: translateX(-24px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

#app .jeev-fade-snapshot,
#app .jeev-fade-snapshot * {
  animation: none !important;
  transition: none !important;
  pointer-events: none !important;
}

@keyframes reducedPageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes reducedPageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #app .m-fullpage,
  #app .m-fullpage.task-page,
  #app.page-returning .m-fullpage,
  #app.page-returning .m-fullpage.task-page {
    animation-name: reducedPageFadeIn;
    animation-duration: 150ms;
  }

  #app .m-fullpage.is-leaving,
  #app .m-fullpage.task-page.is-leaving {
    animation-name: reducedPageFadeOut;
    animation-duration: 150ms;
  }

  #app.page-open .page-container {
    transition: none !important;
  }
}

#app .overlay {
  animation: jeevFadeIn var(--dur-fast) var(--ease-soft) both;
}

#app .sheet {
  animation: jeevSheetUp var(--dur-base) var(--ease-ios) both;
}

#app .sheet-grabber {
  padding: 12px 0;
  margin: -12px auto -2px;
  box-sizing: content-box;
  background-clip: content-box;
  touch-action: none;
}

@keyframes jeevSheetUp {
  from { opacity: 0.85; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

#app .sheet.sheet-notes-drawer {
  animation: jeevDrawerIn var(--dur-base) var(--ease-ios) both;
}

@keyframes jeevDrawerIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

#app .toast {
  animation: jeevToastIn var(--dur-fast) var(--ease-soft) both;
}

@keyframes jeevToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jeevFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes jeevFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

#app .msg-card {
  animation: jeevListIn var(--dur-list) var(--ease-ios) both;
}

#app .msg-card.just-in {
  animation: jeevListIn var(--dur-list) var(--ease-ios) both;
}

@keyframes jeevListIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: var(--card-opacity, 1); transform: translateY(0); }
}

#app .gate5-msg.is-blocked-out {
  animation: jeevListOut var(--dur-list) var(--ease-ios) forwards;
}

@keyframes jeevListOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 150ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
    scroll-behavior: auto !important;
  }

  :root {
    --dur-fast: 150ms;
    --dur-base: 150ms;
    --dur-page: 150ms;
    --dur-push: 150ms;
    --dur-back: 150ms;
    --dur-week: 150ms;
    --dur-list: 150ms;
  }

  #app .main-track,
  #app .gate-cat-track,
  #app .m-week-track,
  #app .m-week-strip-track {
    transition: none !important;
  }

  #app.page-open .page-container {
    transform: none;
  }

  #app .m-fullpage {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }

  #app .m-fullpage.is-leaving {
    animation: jeevFadeOut 150ms var(--ease-soft) both;
  }

  #app .m-fullpage.task-page,
  #app .m-fullpage.task-page.is-leaving {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }

  #app .m-fullpage.task-page.is-leaving {
    animation: jeevFadeOut 150ms var(--ease-soft) both;
  }

  #app .sheet,
  #app .sheet.sheet-notes-drawer {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }

  #app .toast {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }

  #app .msg-card,
  #app .msg-card.just-in {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }

  #app .gate5-msg.is-blocked-out {
    animation: jeevFadeOut 150ms var(--ease-soft) forwards;
  }

  #app .is-reduced-fade {
    animation: jeevFadeIn 150ms var(--ease-soft) both;
  }
}

/* ============================================================
   JEEV batch2 · 课表：紧凑头部 / 独立周滚动 / 定位点
   ============================================================ */

#app .m-sched-page {
  --sched-time-col: 64px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 0;
}

#app .m-sched-fixed {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  padding: 8px 16px 0;
  background: #F5F6F7;
  box-shadow: 0 1px 0 rgba(31, 35, 41, 0.04);
}

#app .m-week-viewport {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

#app .m-week-track {
  height: 100%;
}

#app .m-week-grid-page {
  height: 100%;
}

#app .week-grid-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: calc(var(--sched-fixed-h, 188px) + 0px) 16px calc(76px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}

#app .week-grid-scroll .m-week-grid {
  width: 100%;
  overflow: visible;
}

#app .m-week-grid-page.is-edge {
  display: block;
  min-height: 0;
  padding-top: 0;
}

#app .m-week-grid-page.is-edge .week-grid-scroll {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#app .m-week-grid-page.is-edge .m-week-grid {
  min-height: 520px;
  padding-top: 140px;
}

/* 当前时间线：位于课程块/专注块之上，固定头部之下 */
#app .m-week-now-line {
  position: relative;
  z-index: 7;
  height: 0;
  border-top: 1.5px solid #F26B1D;
  box-shadow: -2px 0 0 rgba(255, 255, 255, 0.96), 0 0 6px rgba(242, 107, 29, 0.30);
  transform: translateY(var(--now-offset, 0px));
  scroll-margin-top: calc(var(--sched-fixed-h, 188px) + 12px);
  pointer-events: none;
}

#app .m-week-now-line::before {
  top: -4px;
  left: -3px;
  width: 7px;
  height: 7px;
  background: #F26B1D;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px rgba(242, 107, 29, 0.16);
}

#app .m-week-now-pill {
  z-index: 7;
  align-self: start;
  justify-self: center;
  max-width: 100%;
  margin-right: 0;
  padding: 0 5px;
  border: 1px solid rgba(242, 107, 29, 0.18);
  border-radius: 999px;
  background: #FFFFFF;
  color: #D8560F;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.14);
  transform: translateY(var(--now-offset, 0px));
  pointer-events: none;
}

/* 右下角定位点 */
#app #scheduleFabRoot {
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 60;
}

#app .m-week-locate {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.18), 0 0 0 4px rgba(51, 112, 255, 0.08);
  pointer-events: auto;
}

#app .m-week-locate-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3370FF;
  box-shadow: 0 0 0 4px rgba(51, 112, 255, 0.16);
}

#app .m-week-locate:active {
  transform: scale(0.96);
}

/* ============================================================
   JEEV batch3 · 消息台自动/手动 · AI 管家
   ============================================================ */

#app .topbar-action.is-compact {
  width: 36px;
  height: 36px;
  border: 1px solid #E5E6EB;
  border-radius: 50%;
}

#app .topbar-action.is-compact svg {
  width: 18px;
  height: 18px;
}

#app .gate5-presence-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

#app .gate5-live-mode {
  color: #8F959E;
  font-weight: 500;
}

#app .gate5-presence-toggle {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #F7F8FA;
  color: #646A73;
  font-size: 11px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
}

#app .gate5-presence-toggle.is-auto {
  border-color: #C9EBC3;
  background: #E8F8E5;
  color: #2EA121;
}

#app .gate5-presence-toggle.is-manual {
  border-color: #FFD9A8;
  background: #FFF3E0;
  color: #B25E00;
}

#app .gate5-manual-hint {
  margin: 8px 0 0;
  color: #8F959E;
  font-size: 10px;
  line-height: 15px;
}

#app .gate-ai-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(31, 35, 41, 0.05);
  text-align: left;
}

#app .gate-ai-entry:active {
  background: #F7F8FA;
}

#app .gate-ai-entry-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

#app .gate-ai-entry-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

#app .gate-ai-entry-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #646A73;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .gate-ai-entry-chev {
  flex: none;
  color: #C9CDD4;
  font-size: 20px;
  line-height: 20px;
}

/* AI 管家聊天页 */

#app .ai-butler-page {
  background: #F5F6F7;
}

#app .ai-butler-page .m-fullpage-scroll {
  display: flex;
  flex-direction: column;
  padding: 0;
}

#app .ai-butler-page .m-fullpage-footer {
  padding: 0;
  border: 0;
  background: transparent;
}

#app .ai-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid #C9D8FF;
  border-radius: 999px;
  background: #F2F6FF;
  color: #245BDB;
  font-size: 10px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}

#app .ai-context-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34C724;
}

#app .ai-context-panel {
  max-height: 0;
  margin: 0 16px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #FFFFFF;
  transition: max-height var(--dur-base) var(--ease-ios), margin var(--dur-base) var(--ease-ios), padding var(--dur-base) var(--ease-ios), border-color var(--dur-base) var(--ease-ios);
}

#app .ai-context-panel.is-open {
  max-height: 360px;
  margin-top: 10px;
  padding: 10px 12px;
  border-color: #EFF0F1;
}

#app .ai-context-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#app .ai-context-grid > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 16px;
}

#app .ai-context-grid span {
  flex: none;
  width: 28px;
  color: #8F959E;
}

#app .ai-context-grid strong {
  flex: 1;
  min-width: 0;
  color: #1F2329;
  font-weight: 500;
}

#app .ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 4px;
}

#app .ai-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#app .ai-msg.is-user {
  justify-content: flex-end;
}

#app .ai-msg-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 8px;
}

#app .ai-msg-avatar svg {
  display: block;
  width: 28px;
  height: 28px;
}

#app .ai-msg-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 78%;
  min-width: 0;
}

#app .ai-msg.is-user .ai-msg-main {
  align-items: flex-end;
}

#app .ai-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 20px;
  white-space: normal;
  word-break: break-word;
}

#app .ai-msg.is-assistant .ai-bubble {
  border-top-left-radius: 4px;
  background: #FFFFFF;
  color: #1F2329;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.06);
}

#app .ai-msg.is-user .ai-bubble {
  border-top-right-radius: 4px;
  background: #3370FF;
  color: #FFFFFF;
}

#app .ai-typing {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
}

#app .ai-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C9CDD4;
  animation: aiTyping 1s ease-in-out infinite;
}

#app .ai-typing i:nth-child(2) { animation-delay: 0.15s; }
#app .ai-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiTyping {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

#app .ai-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#app .ai-action-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #E5E6EB;
  border-radius: 10px;
  background: #FFFFFF;
}

#app .ai-action-card.is-done {
  border-color: #D9EFD4;
  background: #F7FBF6;
}

#app .ai-action-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

#app .ai-action-main strong {
  overflow: hidden;
  color: #1F2329;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .ai-action-main small {
  overflow: hidden;
  color: #8F959E;
  font-size: 9px;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .ai-action-btns {
  display: flex;
  flex: none;
  gap: 6px;
}

#app .ai-action-btns button {
  height: 28px;
  padding: 0 9px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
}

#app .ai-action-btns button.is-primary {
  border-color: #3370FF;
  background: #3370FF;
  color: #FFFFFF;
}

#app .ai-action-state {
  flex: none;
  color: #8F959E;
  font-size: 10px;
}

#app .ai-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 14px;
}

#app .ai-quick-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  line-height: 26px;
  white-space: nowrap;
}

#app .ai-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #EFF0F1;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#app .ai-input-bar input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #E5E6EB;
  border-radius: 20px;
  outline: none;
  background: #F2F3F5;
  font-size: 13px;
}

#app .ai-send-btn {
  flex: none;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
}

#app .ai-vocab-page .m-fullpage-scroll {
  padding: 16px;
}

#app .ai-vocab-card {
  padding: 24px 18px;
  border: 1px solid #EFF0F1;
  border-radius: 16px;
  background: #FFFFFF;
  text-align: center;
}

#app .ai-vocab-card strong {
  color: #3370FF;
  font-size: 42px;
  line-height: 48px;
  font-weight: 700;
}

#app .ai-vocab-card p {
  margin-top: 4px;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .ai-vocab-card small {
  display: block;
  margin-top: 10px;
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

/* ============================================================
   VOCAB —— 记单词独立模块
   ============================================================ */

#app .vocab-page {
  background: #F5F6F7;
}

#app .vocab-page .m-fullpage-nav {
  display: none;
}

#app .vocab-page .m-fullpage-scroll {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

#app .vocab-page .m-fullpage-footer {
  padding: 0;
  border: 0;
  background: #FFFFFF;
}

#app .vocab-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#app .vocab-tab {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#app .vocab-tab.vocab-page-scroll {
  display: block;
}

#app .vocab-page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: #F5F6F7;
}

/* ---------- 通用头部 ---------- */

#app .vocab-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(245, 246, 247, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#app .vocab-topbar-back {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1F2329;
}

#app .vocab-topbar-back svg {
  width: 20px;
  height: 20px;
}

#app .vocab-topbar-titles {
  flex: 1;
  min-width: 0;
}

#app .vocab-topbar-titles h1 {
  overflow: hidden;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-topbar-titles p {
  margin-top: 2px;
  overflow: hidden;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-topbar-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFFFFF;
  color: #646A73;
  font-size: 19px;
  line-height: 1;
}

#app .vocab-topbar-text {
  flex: none;
  height: 36px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #2A9D8F;
  font-size: 13px;
  font-weight: 600;
}

#app .vocab-topbar-spacer {
  flex: none;
  width: 36px;
  height: 36px;
}

/* ---------- 选词页 ---------- */

#app .vocab-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin: 2px 16px 14px;
  padding: 0 12px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  color: #8F959E;
}

#app .vocab-search svg {
  flex: none;
  width: 17px;
  height: 17px;
}

#app .vocab-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #1F2329;
  font-size: 13px;
}

#app .vocab-search input::placeholder {
  color: #A7ADB5;
}

#app .vocab-today-card {
  margin: 0 16px 12px;
  padding: 15px 16px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.05);
}

#app .vocab-today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#app .vocab-today-number {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

#app .vocab-today-number strong {
  color: #1F2329;
  font-size: 42px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#app .vocab-today-number span {
  padding-bottom: 6px;
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

#app .vocab-mode-pill {
  flex: none;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 11px;
  font-weight: 600;
  line-height: 26px;
}

#app .vocab-today-formula {
  margin-top: 2px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

#app .vocab-today-rows {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #F5F6F7;
  color: #646A73;
  font-size: 11px;
}

#app .vocab-today-rows b {
  margin-left: 4px;
  color: #1F2329;
  font-weight: 600;
}

#app .vocab-book-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 15px;
  border: 0;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.05);
  text-align: left;
}

#app .vocab-book-card:active {
  background: #FBFCFC;
}

#app .vocab-book-cover {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 66px;
  border-radius: 10px;
  background: linear-gradient(160deg, #3DBDB0 0%, #2A9D8F 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(42, 157, 143, 0.24);
}

#app .vocab-book-cover svg {
  width: 26px;
  height: 26px;
}

#app .vocab-book-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#app .vocab-book-title {
  overflow: hidden;
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-book-sub {
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-book-progress {
  height: 5px;
  margin-top: 1px;
  overflow: hidden;
  border-radius: 999px;
  background: #EEF1F2;
}

#app .vocab-book-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2FB6A8;
}

#app .vocab-book-mastery {
  overflow: hidden;
  color: #646A73;
  font-size: 9.5px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-book-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-book-foot b {
  color: #2A9D8F;
  font-weight: 600;
}

#app .vocab-book-foot em {
  font-style: normal;
}

#app .vocab-chev {
  flex: none;
  color: #C9CDD4;
  font-size: 20px;
  line-height: 20px;
}

#app .vocab-block {
  margin: 0 16px 16px;
}

#app .vocab-block-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

#app .vocab-block-title h2 {
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
}

#app .vocab-block-title span {
  color: #8F959E;
  font-size: 10px;
}

#app .vocab-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 4px;
}

#notesFabRoot .notes-fab-vocab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  line-height: 52px;
}

#notesFabRoot .notes-fab-vocab:active {
  background: #F7F8FA;
}

@media (prefers-reduced-motion: reduce) {
  #app .vocab-review-stage,
  #app .vocab-card-answer,
  #app .vocab-hero-progress i,
  #app .vocab-bar {
    transition-duration: 150ms;
    animation-duration: 150ms;
  }
}

#app .vocab-chip {
  flex: none;
  height: 28px;
  padding: 0 11px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  white-space: nowrap;
}

#app .vocab-chip em {
  margin-left: 3px;
  color: #A7ADB5;
  font-style: normal;
  font-size: 9px;
}

#app .vocab-chip.is-on {
  border-color: #2FB6A8;
  background: #EAF7F4;
  color: #1F7F74;
  font-weight: 600;
}

#app .vocab-chip.is-on em {
  color: #2A9D8F;
}

#app .vocab-word-list {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-word-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid #F5F6F7;
}

#app .vocab-word-row:last-child {
  border-bottom: 0;
}

#app .vocab-word-main {
  flex: 1;
  min-width: 0;
}

#app .vocab-word-main b {
  display: block;
  overflow: hidden;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-word-main small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-status {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #F2F3F5;
  color: #8F959E;
  font-size: 9px;
  line-height: 22px;
  white-space: nowrap;
}

#app .vocab-status.is-familiar {
  background: #E6F6EE;
  color: #2E9E6B;
}

#app .vocab-status.is-general {
  background: #FFF6DE;
  color: #B77B10;
}

#app .vocab-status.is-unknown {
  background: #FFF0E8;
  color: #C46A2E;
}

#app .vocab-status.is-paused {
  background: #F2F3F5;
  color: #8F959E;
}

#app .vocab-status.is-skip {
  background: #FFECEC;
  color: #D9453F;
}

#app .vocab-lib-list {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-lib-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #F5F6F7;
}

#app .vocab-lib-row:last-child {
  border-bottom: 0;
}

#app .vocab-lib-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

#app .vocab-lib-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #EAF7F4;
  color: #2A9D8F;
}

#app .vocab-lib-icon svg {
  width: 18px;
  height: 18px;
}

#app .vocab-lib-text {
  flex: 1;
  min-width: 0;
}

#app .vocab-lib-text b {
  display: block;
  overflow: hidden;
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-lib-text small {
  display: block;
  margin-top: 1px;
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-lib-count {
  flex: none;
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-lib-add {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #D5EDE9;
  border-radius: 9px;
  background: #EAF7F4;
  color: #2A9D8F;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

#app .vocab-lib-add svg {
  width: 13px;
  height: 13px;
}

#app .vocab-lib-add.is-added {
  border-color: #2FB6A8;
  background: #2FB6A8;
  color: #FFFFFF;
}

#app .vocab-empty-row {
  margin: 0;
  padding: 18px 12px;
  color: #8F959E;
  font-size: 12px;
  text-align: center;
}

/* ---------- 复习页 ---------- */

#app .vocab-review-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #F5F6F7;
}

#app .vocab-review-hero {
  flex: none;
  padding: calc(8px + env(safe-area-inset-top)) 18px 30px;
  background: linear-gradient(160deg, #3DBDB0 0%, #2A9D8F 100%);
  color: #FFFFFF;
}

#app .vocab-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

#app .vocab-hero-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

#app .vocab-hero-back svg {
  width: 22px;
  height: 22px;
}

#app .vocab-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#app .vocab-long-pill {
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(229, 77, 66, 0.92);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  line-height: 24px;
  transition: transform 160ms var(--ease-ios), background 160ms ease;
}

#app .vocab-long-pill.is-pressing {
  transform: scale(0.94);
  background: #D9453F;
}

#app .vocab-long-pill.is-fired {
  background: #FFFFFF;
  color: #D9453F;
}

#app .vocab-hero-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

#app .vocab-hero-icon svg {
  width: 18px;
  height: 18px;
}

#app .vocab-hero-progress {
  height: 3px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

#app .vocab-hero-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #FFFFFF;
  transition: width 260ms var(--ease-ios);
}

#app .vocab-hero-count {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
}

#app .vocab-word {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

#app .vocab-phonetic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

#app .vocab-speak {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

#app .vocab-speak svg {
  width: 16px;
  height: 16px;
}

#app .vocab-review-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: -20px;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
}

#app .vocab-review-stage {
  transition: opacity 260ms var(--ease-ios), transform 260ms var(--ease-ios);
}

#app .vocab-review-stage.is-out {
  opacity: 0;
  transform: translateX(-46px);
}

#app .vocab-review-stage.is-in {
  animation: vocabCardIn 260ms var(--ease-ios) both;
}

@keyframes vocabCardIn {
  from { opacity: 0; transform: translateX(46px); }
  to { opacity: 1; transform: none; }
}

#app .vocab-card {
  padding: 18px 16px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(31, 35, 41, 0.07);
}

#app .vocab-card-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 210px;
  text-align: center;
}

#app .vocab-hint-main {
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
}

#app .vocab-hint-sub {
  color: #8F959E;
  font-size: 12px;
}

#app .vocab-card-answer {
  animation: vocabAnswerIn 220ms var(--ease-ios) both;
}

@keyframes vocabAnswerIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

#app .vocab-answer-word {
  margin-bottom: 10px;
  color: #1F2329;
  font-size: 24px;
  font-weight: 700;
}

#app .vocab-answer-word span {
  margin-left: 8px;
  color: #8F959E;
  font-size: 12px;
  font-weight: 400;
}

#app .vocab-meaning-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#app .vocab-meaning {
  display: flex;
  gap: 8px;
  color: #1F2329;
  font-size: 15px;
  line-height: 24px;
}

#app .vocab-meaning em {
  flex: none;
  color: #2A9D8F;
  font-style: normal;
  font-weight: 600;
}

#app .vocab-answer-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #F2F3F5;
}

#app .vocab-answer-label {
  display: block;
  margin-bottom: 6px;
  color: #8F959E;
  font-size: 10px;
  letter-spacing: 0.08em;
}

#app .vocab-example {
  margin-bottom: 8px;
}

#app .vocab-example:last-child {
  margin-bottom: 0;
}

#app .vocab-example p {
  font-size: 12px;
  line-height: 18px;
}

#app .vocab-example .is-en {
  color: #1F2329;
}

#app .vocab-example .is-cn {
  margin-top: 2px;
  color: #8F959E;
  font-size: 11px;
}

#app .vocab-mnemonic {
  padding: 10px 12px;
  border-radius: 10px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 12px;
  line-height: 18px;
}

#app .vocab-family {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#app .vocab-family-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 9px;
  background: #F7F8FA;
}

#app .vocab-family-item b {
  color: #1F2329;
  font-size: 11px;
  font-weight: 600;
}

#app .vocab-family-item em {
  color: #2A9D8F;
  font-style: normal;
  font-size: 9px;
}

#app .vocab-family-item small {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-rating-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

#app .vocab-rate {
  min-height: 64px;
  padding: 6px 2px;
  border: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #1F2329;
}

#app .vocab-rate:active {
  filter: brightness(0.96);
}

#app .vocab-rate strong {
  font-size: 14px;
  font-weight: 600;
}

#app .vocab-rate small {
  color: rgba(31, 35, 41, 0.56);
  font-size: 10px;
}

#app .vocab-rate.is-know {
  background: #7ECBA5;
}

#app .vocab-rate.is-fuzzy {
  background: #F6C453;
}

#app .vocab-rate.is-forget {
  background: #F49B63;
}

/* ---------- 完成页 ---------- */

#app .vocab-complete {
  padding: 28px 20px 40px;
  text-align: center;
}

#app .vocab-complete-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 8px auto 14px;
  border-radius: 50%;
  background: #EAF7F4;
  color: #2FB6A8;
}

#app .vocab-complete-icon svg {
  width: 28px;
  height: 28px;
}

#app .vocab-complete h2 {
  color: #1F2329;
  font-size: 22px;
  font-weight: 700;
}

#app .vocab-complete-sub {
  margin-top: 6px;
  color: #8F959E;
  font-size: 12px;
}

#app .vocab-complete-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 20px 0;
  padding: 16px 8px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .vocab-complete-stats strong {
  display: block;
  color: #2A9D8F;
  font-size: 24px;
  font-weight: 700;
}

#app .vocab-complete-stats span {
  display: block;
  margin-top: 3px;
  color: #8F959E;
  font-size: 10px;
}

#app .vocab-primary-btn,
#app .vocab-secondary-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

#app .vocab-primary-btn {
  border: 0;
  background: #2FB6A8;
  color: #FFFFFF;
}

#app .vocab-secondary-btn {
  margin-top: 8px;
  border: 1px solid #E5E6EB;
  background: #FFFFFF;
  color: #646A73;
}

/* ---------- 词书详情 ---------- */

#app .vocab-book-summary {
  margin: 2px 16px 12px;
  padding: 14px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .vocab-book-summary-top {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  text-align: center;
}

#app .vocab-book-summary-top b {
  display: block;
  color: #1F2329;
  font-size: 17px;
  font-weight: 700;
}

#app .vocab-book-summary-top small {
  display: block;
  margin-top: 2px;
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-book-summary-note {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #F5F6F7;
  color: #8F959E;
  font-size: 9.5px;
  line-height: 15px;
}

#app .vocab-book-filters {
  margin: 0 16px 10px;
}

#app .vocab-batch-bar {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #1F2329;
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.2);
  color: #FFFFFF;
  font-size: 10px;
}

#app .vocab-batch-bar > div {
  display: flex;
  gap: 6px;
}

#app .vocab-batch-bar button {
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 10px;
}

#app .vocab-batch-hint {
  margin: 0 16px 10px;
  color: #8F959E;
  font-size: 10px;
}

#app .vocab-book-list {
  margin: 0 16px;
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #F5F6F7;
  background: #FFFFFF;
  text-align: left;
}

#app .vocab-book-row:last-child {
  border-bottom: 0;
}

#app .vocab-book-row.is-selected {
  background: #F1FAF8;
}

#app .vocab-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid #D5D9DE;
  border-radius: 50%;
  color: #FFFFFF;
}

#app .vocab-book-row.is-selected .vocab-check {
  border-color: #2FB6A8;
  background: #2FB6A8;
}

#app .vocab-check svg {
  width: 12px;
  height: 12px;
}

#app .vocab-book-word-main {
  flex: 1;
  min-width: 0;
}

#app .vocab-book-word-main b {
  display: block;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .vocab-book-word-main small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #8F959E;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 统计页 ---------- */

#app .vocab-stat-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 2px 16px 12px;
  padding: 16px 8px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3DBDB0 0%, #2A9D8F 100%);
  color: #FFFFFF;
  text-align: center;
}

#app .vocab-stat-hero strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

#app .vocab-stat-hero span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
}

#app .vocab-stat-card {
  margin: 0 16px 12px;
  padding: 15px 16px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .vocab-stat-card h2 {
  margin-bottom: 10px;
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

#app .vocab-bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 112px;
}

#app .vocab-bar-col {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: 14px 1fr 16px;
  align-items: end;
  justify-items: center;
  gap: 2px;
}

#app .vocab-bar-col b {
  color: #8F959E;
  font-size: 9px;
  font-weight: 500;
}

#app .vocab-bar {
  width: 100%;
  max-width: 22px;
  min-height: 4px;
  border-radius: 6px 6px 3px 3px;
  background: #CFEDE8;
}

#app .vocab-bar.is-today {
  background: #2FB6A8;
}

#app .vocab-bar-col small {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-mastery-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #F2F3F5;
}

#app .vocab-mastery-bar i {
  display: block;
  height: 100%;
}

#app .vocab-mastery-bar .is-familiar,
#app .vocab-mastery-legend .is-familiar {
  background: #7ECBA5;
}

#app .vocab-mastery-bar .is-general,
#app .vocab-mastery-legend .is-general {
  background: #F6C453;
}

#app .vocab-mastery-bar .is-unknown,
#app .vocab-mastery-legend .is-unknown {
  background: #F49B63;
}

#app .vocab-mastery-bar .is-untouched,
#app .vocab-mastery-legend .is-untouched {
  background: #E5E6EB;
}

#app .vocab-mastery-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

#app .vocab-mastery-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #646A73;
  font-size: 10px;
}

#app .vocab-mastery-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

#app .vocab-estimate {
  margin: 0 16px 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 11px;
  line-height: 18px;
}

/* ---------- 我的 ---------- */

#app .vocab-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 16px 12px;
  padding: 15px 16px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .vocab-profile-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(160deg, #3DBDB0 0%, #2A9D8F 100%);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 600;
}

#app .vocab-profile-main {
  flex: 1;
  min-width: 0;
}

#app .vocab-profile-main b {
  display: block;
  color: #1F2329;
  font-size: 15px;
  font-weight: 600;
}

#app .vocab-profile-main small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-setting-group {
  margin: 0 16px 12px;
  padding: 0 14px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .vocab-setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #F5F6F7;
}

#app .vocab-setting-row:last-child {
  border-bottom: 0;
}

#app .vocab-setting-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#app .vocab-setting-top b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
}

#app .vocab-setting-top small {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-setting-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#app .vocab-setting-inline .vocab-setting-top {
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

#app .vocab-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: #F2F3F5;
}

#app .vocab-seg button {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #646A73;
  font-size: 11px;
}

#app .vocab-seg button.is-on {
  background: #FFFFFF;
  color: #1F7F74;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
}

#app .vocab-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #E5E6EB;
  transition: background 200ms ease;
}

#app .vocab-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 200ms var(--ease-ios);
}

#app .vocab-switch.is-on {
  background: #2FB6A8;
}

#app .vocab-switch.is-on i {
  transform: translateX(18px);
}

#app .vocab-time {
  flex: none;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 12px;
}

#app .vocab-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #F5F6F7;
  background: transparent;
  text-align: left;
}

#app .vocab-link-row:last-child {
  border-bottom: 0;
}

#app .vocab-link-row b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
}

#app .vocab-link-row span {
  overflow: hidden;
  color: #8F959E;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-row-danger b,
#app .vocab-row-danger span {
  color: #D9453F;
}

#app .vocab-about {
  margin: 0 16px 24px;
  padding: 14px;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-about b {
  color: #1F2329;
  font-size: 12px;
  font-weight: 600;
}

#app .vocab-about p {
  margin-top: 4px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

/* ---------- 词书管理 / 更多弹层 ---------- */

#app .vocab-sheet-list {
  display: flex;
  flex-direction: column;
}

#app .vocab-sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid #F5F6F7;
}

#app .vocab-sheet-row:last-child {
  border-bottom: 0;
}

#app .vocab-sheet-main {
  flex: 1;
  min-width: 0;
}

#app .vocab-sheet-main b {
  display: block;
  color: #1F2329;
  font-size: 13px;
  font-weight: 500;
}

#app .vocab-sheet-main small {
  display: block;
  margin-top: 1px;
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-sheet-tag {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 9px;
  line-height: 22px;
}

#app .vocab-sheet-btn {
  flex: none;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 9px;
}

#app .vocab-sheet-btn.is-danger {
  border-color: #FFD7D5;
  color: #D9453F;
}

#app .vocab-sheet-hint {
  margin-top: 12px;
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

#app .vocab-more-list {
  display: flex;
  flex-direction: column;
}

#app .vocab-more-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid #F5F6F7;
  background: transparent;
  color: #1F2329;
  font-size: 13px;
  text-align: left;
}

#app .vocab-more-list button:last-child {
  border-bottom: 0;
}

#app .vocab-more-list em {
  color: #8F959E;
  font-style: normal;
  font-size: 10px;
}

/* ---------- 模块底部导航 ---------- */

#app .vocab-nav {
  display: flex;
  align-items: stretch;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .vocab-nav-item {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8F959E;
  font-size: 10px;
}

#app .vocab-nav-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

#app .vocab-nav-ico svg {
  width: 21px;
  height: 21px;
}

#app .vocab-nav-item.is-on {
  color: #2FB6A8;
  font-weight: 600;
}

#app .vocab-nav-badge {
  position: absolute;
  top: -3px;
  left: 14px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #F54A45;
  color: #FFFFFF;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  line-height: 15px;
  text-align: center;
}

/* ---------- 笔记页三段悬浮栏 ---------- */

#notesFabRoot .notes-fab-main,
#notesFabRoot .notes-fab-vocab,
#notesFabRoot .notes-fab-voice {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  gap: 4px;
  font-size: 12px;
}

#notesFabRoot .notes-fab-vocab {
  color: #2A9D8F;
}

#notesFabRoot .notes-fab-abc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 17px;
  border: 1.4px solid currentColor;
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

#notesFabRoot .notes-fab-divider {
  height: 20px;
}

@media (max-width: 374px) {
  #notesFabRoot .notes-fab-main,
  #notesFabRoot .notes-fab-vocab,
  #notesFabRoot .notes-fab-voice {
    padding: 0 4px;
    gap: 3px;
    font-size: 11px;
  }

  #notesFabRoot .notes-fab-abc {
    width: 18px;
    height: 15px;
    font-size: 7px;
  }

  #app .vocab-hero-count {
    font-size: 10px;
  }

  #app .vocab-book-mastery {
    font-size: 9px;
  }

  #app .vocab-book-foot {
    font-size: 9px;
  }

  #app .vocab-batch-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  #app .vocab-batch-bar > div {
    width: 100%;
  }

  #app .vocab-batch-bar button {
    flex: 1;
  }
}

/* ============================================================
   VOCAB batch5a —— 完整词条、详情、词典、导入与统计
   ============================================================ */

#app .vocab-today-goal-btn {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

#app .vocab-today-goal-btn i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: #EAF7F4;
  color: #2A9D8F;
}

#app .vocab-today-goal-btn i svg {
  width: 12px;
  height: 12px;
}

#app .vocab-today-predict {
  margin-top: 8px;
  color: #8F959E;
  font-size: 11px;
  line-height: 16px;
}

#app .vocab-import-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  min-height: 56px;
  margin: 0 16px 16px;
  padding: 8px 12px;
  border: 1px dashed #BFE8E2;
  border-radius: 14px;
  background: #F7FCFB;
  text-align: left;
}

#app .vocab-import-entry:active {
  background: #EFFAF8;
}

#app .vocab-import-entry-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #EAF7F4;
  color: #2A9D8F;
}

#app .vocab-import-entry-icon svg {
  width: 18px;
  height: 18px;
}

#app .vocab-import-entry-main {
  flex: 1;
  min-width: 0;
}

#app .vocab-import-entry-main b {
  display: block;
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

#app .vocab-import-entry-main small {
  display: block;
  margin-top: 1px;
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-import-entry-arrow {
  flex: none;
  color: #9FBDB8;
  font-size: 20px;
  line-height: 20px;
}

#app .vocab-library-import .vocab-import-entry {
  width: 100%;
  margin: 12px 0 0;
}

#app .vocab-my-books {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-my-book {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #F5F6F7;
  background: #FFFFFF;
  text-align: left;
}

#app .vocab-my-book:last-child {
  border-bottom: 0;
}

#app .vocab-my-book.is-current {
  background: #F7FCFB;
}

#app .vocab-my-book-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#app .vocab-my-book-main b {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #1F2329;
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-my-book-main b em {
  flex: none;
  padding: 1px 5px;
  border-radius: 999px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 8px;
  font-style: normal;
  font-weight: 600;
}

#app .vocab-my-book-main small {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-my-book-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #EEF2F2;
}

#app .vocab-my-book-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2FB6A8;
}

#app .vocab-search-results.is-hidden {
  display: none;
}

/* 单词列表行可点击 */
#app .vocab-word-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #F5F6F7;
  background: #FFFFFF;
  text-align: left;
}

#app .vocab-word-row:last-child {
  border-bottom: 0;
}

#app .vocab-word-row:active {
  background: #F7FCFB;
}

/* 词书列表复选框与正文分离 */
#app .vocab-check {
  padding: 0;
  background: transparent;
  appearance: none;
}

#app .vocab-check.is-checked {
  border-color: #2FB6A8;
  background: #2FB6A8;
}

#app .vocab-book-word-main {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

#app .vocab-book-row:active {
  background: #F7FCFB;
}

#app .vocab-book-detail-progress {
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #EEF2F2;
}

#app .vocab-book-detail-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2FB6A8;
}

#app .vocab-book-current-btn {
  width: 100%;
  height: 34px;
  margin-top: 12px;
  border: 1px solid #2FB6A8;
  border-radius: 10px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 11px;
  font-weight: 600;
}

#app .vocab-book-current-btn.is-current,
#app .vocab-book-current-btn:disabled {
  border-color: #E5E6EB;
  background: #F2F3F5;
  color: #8F959E;
}

#app .vocab-dict-actions {
  display: flex;
  gap: 6px;
  margin: 0 16px 10px;
}

#app .vocab-dict-actions button {
  flex: 1;
  height: 32px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 10px;
}

#app .vocab-dict-actions button.is-danger {
  border-color: #FFD7D5;
  color: #D9453F;
}

/* 单词缺失内容提示 */
#app .vocab-missing {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed #D5EDE9;
  border-radius: 10px;
  background: #F7FCFB;
  color: #2A9D8F;
  font-size: 11px;
  line-height: 17px;
  text-align: left;
}

#app .vocab-missing.is-static {
  border-color: #EFF0F1;
  background: #F7F8FA;
  color: #8F959E;
}

/* 单词详情页 */
#app .vocab-word-page {
  background: #F5F6F7;
}

#app .vocab-word-page .m-fullpage-scroll {
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
}

#app .vocab-word-nav-speak {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #EAF7F4;
  color: #2A9D8F;
}

#app .vocab-word-nav-speak svg {
  width: 18px;
  height: 18px;
}

#app .vocab-word-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#app .vocab-word-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}

#app .vocab-word-detail-title {
  min-width: 0;
}

#app .vocab-word-detail-title h1 {
  overflow-wrap: anywhere;
  color: #1F2329;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
}

#app .vocab-word-detail-title p {
  margin-top: 3px;
  color: #8F959E;
  font-size: 12px;
}

#app .vocab-word-detail-card {
  padding: 16px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.05);
}

#app .vocab-word-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

#app .vocab-word-action {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 12px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  font-weight: 500;
}

#app .vocab-word-action.is-primary {
  grid-column: span 2;
  border-color: #2FB6A8;
  background: #2FB6A8;
  color: #FFFFFF;
  font-weight: 600;
}

/* 词条编辑 */
#app .sheet.sheet-vocab-editor {
  max-height: 90dvh;
  overflow-y: auto;
}

#app .vocab-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

#app .vocab-editor-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#app .vocab-editor-field > span {
  color: #646A73;
  font-size: 10px;
  font-weight: 600;
}

#app .vocab-editor-field input,
#app .vocab-editor-field textarea,
#app .vocab-editor-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 12px;
  line-height: 18px;
  outline: none;
}

#app .vocab-editor-field textarea {
  resize: vertical;
}

#app .vocab-editor-field small {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-editor-save {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #2FB6A8;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}

/* 数字设置抽屉 */
#app .sheet.sheet-vocab-number {
  max-height: 82dvh;
  overflow-y: auto;
}

#app .vocab-number-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

#app .vocab-number-current {
  color: #646A73;
  font-size: 12px;
}

#app .vocab-number-current b {
  color: #1F2329;
  font-size: 22px;
  font-weight: 700;
}

#app .vocab-goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#app .vocab-goal-chips .vocab-chip {
  height: 30px;
}

#app .vocab-number-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

#app .vocab-number-stepper button {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #E5E6EB;
  border-radius: 12px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 20px;
}

#app .vocab-number-stepper input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid #E5E6EB;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

#app .vocab-number-stepper input::-webkit-outer-spin-button,
#app .vocab-number-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#app .vocab-goal-preview {
  padding: 10px 12px;
  border-radius: 10px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 11px;
  line-height: 17px;
}

#app .vocab-number-hint {
  color: #8F959E;
  font-size: 10px;
  line-height: 16px;
}

/* 导入词典 */
#app .vocab-import-page {
  background: #F5F6F7;
}

#app .vocab-import-page .m-fullpage-scroll {
  padding: 14px 16px calc(26px + env(safe-area-inset-bottom));
}

#app .vocab-import {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#app .vocab-import-intro {
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

#app .vocab-import-name,
#app .vocab-import-target {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .vocab-import-name span,
#app .vocab-import-target span {
  color: #8F959E;
  font-size: 9px;
}

#app .vocab-import-name input {
  height: 36px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  background: #F7F8FA;
  padding: 0 10px;
  color: #1F2329;
  font-size: 13px;
  outline: none;
}

#app .vocab-import-target b {
  color: #1F2329;
  font-size: 14px;
}

#app .vocab-import-target small {
  color: #8F959E;
  font-size: 9.5px;
}

#app .vocab-import-tools {
  display: flex;
  gap: 8px;
}

#app .vocab-import-file,
#app .vocab-import-tools > button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #CFEDE8;
  border-radius: 10px;
  background: #F7FCFB;
  color: #1F7F74;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

#app .vocab-import-file input {
  display: none;
}

#app .vocab-import-format {
  color: #8F959E;
  font-size: 10px;
}

#app .vocab-import-text {
  width: 100%;
  min-height: 132px;
  padding: 10px 12px;
  border: 1px solid #E5E6EB;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 11px;
  line-height: 17px;
  resize: vertical;
  outline: none;
}

#app .vocab-import-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 10px;
}

#app .vocab-import-stats b {
  font-weight: 700;
}

#app .vocab-import-stats b.is-danger {
  color: #D9453F;
}

#app .vocab-import-list {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .vocab-import-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-bottom: 1px solid #F5F6F7;
}

#app .vocab-import-row:last-child {
  border-bottom: 0;
}

#app .vocab-import-row b {
  color: #1F2329;
  font-size: 12px;
}

#app .vocab-import-row span {
  color: #646A73;
  font-size: 10px;
}

#app .vocab-import-row small {
  color: #C46A2E;
  font-size: 9px;
}

#app .vocab-import-errors {
  padding: 9px 12px;
  border-radius: 12px;
  background: #FFF2F0;
  color: #D9453F;
  font-size: 9.5px;
  line-height: 16px;
}

#app .vocab-import-page .vocab-primary-btn {
  width: 100%;
}

#app .vocab-import-page .vocab-primary-btn:disabled {
  opacity: 0.42;
}

/* 统计页：掌握分布 + 学习情况 */
#app .vocab-stat-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#app .vocab-stat-card-head h2 {
  margin: 0;
}

#app .vocab-stat-card-head span {
  overflow: hidden;
  color: #8F959E;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .vocab-mastery-bar .is-general,
#app .vocab-mastery-legend .is-general {
  background: #6FA8DC;
}

#app .vocab-study-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 9px;
}

#app .vocab-study-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #646A73;
  font-size: 9px;
}

#app .vocab-study-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

#app .vocab-study-legend .is-familiar {
  background: #7ECBA5;
}

#app .vocab-study-legend .is-general {
  background: #6FA8DC;
}

#app .vocab-study-legend .is-unknown {
  background: #F49B63;
}

#app .vocab-study-chart-wrap {
  position: relative;
}

#app .vocab-study-chart-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 18px;
  left: 0;
  z-index: 2;
  width: 24px;
  background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

#app .vocab-study-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#app .vocab-study-scroll::-webkit-scrollbar {
  display: none;
}

#app .vocab-study-days {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  height: 150px;
  padding: 0 4px 0 2px;
}

#app .vocab-study-day {
  flex: none;
  width: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

#app .vocab-study-bar-area {
  flex: 1;
  width: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#app .vocab-study-bar {
  display: flex;
  flex-direction: column;
  width: 18px;
  min-height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #EDF1F2;
}

#app .vocab-study-bar i {
  display: block;
  width: 100%;
  min-height: 0;
}

#app .vocab-study-bar .is-familiar {
  background: #7ECBA5;
}

#app .vocab-study-bar .is-general {
  background: #6FA8DC;
}

#app .vocab-study-bar .is-unknown {
  background: #F49B63;
}

#app .vocab-study-base {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #E5E6EB;
}

#app .vocab-study-day small {
  color: #A7ADB5;
  font-size: 8px;
  line-height: 10px;
  white-space: nowrap;
}

#app .vocab-study-day.is-selected .vocab-study-bar {
  outline: 2px solid rgba(47, 182, 168, 0.25);
  outline-offset: 2px;
}

#app .vocab-chart-tip {
  position: absolute;
  z-index: 6;
  width: 132px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #1F2329;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(31, 35, 41, 0.2);
  transform: translateX(-50%);
  font-size: 9px;
  line-height: 15px;
  pointer-events: none;
}

#app .vocab-chart-tip strong {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
}

#app .vocab-chart-tip span {
  display: block;
  color: rgba(255, 255, 255, 0.8);
}

/* 课表：单词复习提醒块 */
#app .m-week-block.is-vocab {
  z-index: 3;
  justify-content: center;
  padding-top: 18px;
  border: 2px dashed #2FB6A8;
  background: linear-gradient(180deg, #E9FAF7 0%, #D5F3EE 100%);
  color: #176B62;
  box-shadow: 0 2px 8px rgba(47, 182, 168, 0.16);
}

#app .m-week-block.is-vocab .m-week-focus-tag {
  background: rgba(255, 255, 255, 0.72);
  color: #176B62;
}

#app .m-week-block.is-vocab .m-week-block-name {
  font-size: 9px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
}

#app .m-week-block.is-vocab .m-week-block-badge {
  display: none;
}

#app .m-week-block.is-vocab.is-done {
  border-color: #B9C6C3;
  background: #EEF2F1;
  color: #6B7A77;
  box-shadow: none;
  filter: grayscale(0.6);
  opacity: 0.8;
}

#app .m-week-block.is-vocab.is-done .m-week-focus-tag {
  background: rgba(255, 255, 255, 0.7);
  color: #6B7A77;
}

@media (max-width: 374px) {
  #app .vocab-study-days {
    gap: 8px;
  }

  #app .vocab-study-day,
  #app .vocab-study-bar-area,
  #app .vocab-study-bar,
  #app .vocab-study-base {
    width: 16px;
  }

  #app .vocab-import-tools {
    flex-direction: column;
  }

  #app .vocab-word-action {
    font-size: 11px;
  }
}

/* ============================================================
   JEEV batch6a · 固定壳层 / 键盘 / 课表时间 / 精确任务块
   ============================================================ */

html,
body {
  position: fixed;
  inset: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

body {
  margin: 0;
  background: #F5F6F7;
}

body::before {
  content: none !important;
  display: none !important;
}

.phone-shell {
  width: 100%;
  height: 100%;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
}

#app .page-container,
#app .m-fullpage-scroll,
#app .week-grid-scroll,
#app .tp-main-scroll,
#app .notes-list-scroll,
#app .gate-cat-scroll,
#app .vocab-page-scroll,
#app .vocab-review-scroll,
#app .ai-butler-page .m-fullpage-scroll,
#app .sheet,
#app .overlay {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#app input,
#app textarea,
#app select {
  font-size: 16px !important;
}

#app .m-week-time.is-empty {
  color: #C9CDD4;
}

#app .m-week-time.is-empty b {
  color: #B7BDC6;
}

#app .periods-page {
  background: #F5F6F7;
}

#app .periods-page .m-fullpage-scroll {
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
}

#app .periods-save {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #EAF7F4;
  color: #1F7F74;
  font-size: 12px;
  font-weight: 600;
}

#app .periods-page-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#app .periods-hint {
  color: #8F959E;
  font-size: 11px;
  line-height: 17px;
}

#app .periods-quick {
  padding: 12px;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .periods-quick-title {
  margin-bottom: 8px;
  color: #1F2329;
  font-size: 12px;
  font-weight: 600;
}

#app .periods-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#app .periods-quick-grid label,
#app .tp-plan-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#app .periods-quick-grid span,
#app .tp-plan-field span {
  color: #8F959E;
  font-size: 9px;
}

#app .periods-quick-grid input,
#app .tp-plan-field input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 16px;
}

#app .periods-secondary-btn {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border: 1px solid #CFEDE8;
  border-radius: 10px;
  background: #F7FCFB;
  color: #1F7F74;
  font-size: 12px;
  font-weight: 600;
}

#app .periods-list {
  overflow: hidden;
  border: 1px solid #EFF0F1;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .periods-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #F5F6F7;
}

#app .periods-row:last-child {
  border-bottom: 0;
}

#app .periods-row b {
  flex: none;
  width: 52px;
  color: #1F2329;
  font-size: 11px;
  font-weight: 600;
}

#app .periods-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  background: #F7F8FA;
  color: #1F2329;
  font-size: 16px;
}

#app .periods-row > span {
  color: #8F959E;
  font-size: 10px;
}

#app .periods-delete {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFF0F0;
  color: #D9453F;
  font-size: 16px;
}

#app .periods-delete-space {
  flex: none;
  width: 26px;
}

#app .periods-actions {
  display: flex;
  gap: 8px;
}

#app .periods-actions .periods-secondary-btn {
  margin-top: 0;
}

#app .tp-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 0;
}

#app .tp-plan-grid .tp-plan-field:first-child {
  grid-column: 1 / -1;
}

#app .vocab-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 16px 14px;
}

#app .vocab-search-row .vocab-search {
  flex: 1;
  margin: 0;
}

#app .vocab-search-cancel {
  flex: none;
}

#app .m-paste-notice {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #FFF7E6;
  color: #B76E00;
  font-size: 11px;
  line-height: 17px;
}

#app.keyboard-open .ai-input-bar {
  padding-bottom: 8px;
}

/* 课表定位点：32px 视觉 / 40px 热区 */
#app .m-week-locate {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#app .m-week-locate::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(31, 35, 41, 0.18), 0 0 0 3px rgba(51, 112, 255, 0.08);
}

#app .m-week-locate-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.16);
}

/* AI 输入栏 */
#app .ai-input-bar {
  flex: none;
  align-items: flex-end;
}

#app .ai-input-jeev {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
  color: #2FB6A8;
}

#app .ai-input-jeev svg {
  width: 26px;
  height: 26px;
}

#app .ai-input-bar textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 106px;
  padding: 9px 14px;
  border: 1px solid #E5E6EB;
  border-radius: 20px;
  outline: none;
  background: #F2F3F5;
  color: #1F2329;
  font-size: 16px;
  line-height: 22px;
  resize: none;
  overflow-y: auto;
}

#app .ai-send-btn {
  flex: none;
  width: 60px;
  height: 44px;
  border-radius: 22px;
  font-size: 14px;
}

#app .ai-butler-page .m-fullpage-scroll {
  min-height: 0;
  overflow-y: auto;
}

/* 记单词搜索聚焦：隐藏底部导航，显示取消 */
#app .vocab-search-cancel {
  display: none;
  flex: none;
  height: 42px;
  margin-left: 8px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #2A9D8F;
  font-size: 14px;
  font-weight: 600;
}

#app.vocab-searching .vocab-search-cancel {
  display: inline-flex;
  align-items: center;
}

#app.vocab-searching .vocab-nav {
  display: none;
}

#app.vocab-searching .vocab-search {
  margin-right: 8px;
}

/* 课表：任务/专注覆盖层与精确时间 */
#app .m-week-task-layer {
  position: relative;
  z-index: 3;
  min-width: 0;
  align-self: stretch;
  pointer-events: none;
}

#app .m-week-task-layer .m-week-block {
  position: absolute;
  left: 0;
  right: 0;
  width: auto;
  margin: 0;
  pointer-events: auto;
  justify-content: flex-start;
  padding-top: 4px;
}

#app .m-week-block.is-focus,
#app .m-week-block.is-vocab {
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.82) 0%, rgba(255, 226, 184, 0.82) 100%);
}

#app .m-week-block.is-vocab {
  background: linear-gradient(180deg, rgba(233, 250, 247, 0.82) 0%, rgba(213, 243, 238, 0.82) 100%);
}

#app .m-week-task-layer .m-week-block.is-compact {
  padding-top: 3px;
}

#app .m-week-task-layer .m-week-focus-tag {
  display: none;
}

#app .m-week-block-time {
  display: block;
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  line-height: 11px;
  text-align: left;
  text-overflow: clip;
  opacity: 0.82;
  white-space: nowrap;
}

#app .m-week-task-layer .m-week-block-name {
  width: 100%;
  margin-top: 1px;
  font-size: 9.5px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
}

#app .m-week-now-line {
  position: absolute;
  left: calc(var(--sched-time-col) + var(--sched-gap));
  right: 0;
  z-index: 10;
  height: 0;
  margin: 0;
}

#app .m-week-now-pill {
  position: absolute;
  left: 0;
  z-index: 10;
  transform: none;
}

#app .m-week-grid .m-week-block:not(.is-overlay) {
  z-index: 2;
}

#app .m-sched-fixed {
  z-index: 30;
}

/* ============================================================
   JEEV batch6b · 记单词返回 / 添加词典 / 多词典 / 签到日历
   ============================================================ */

#app .vocab-topbar-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

#app .vocab-add-dict {
  position: relative;
  color: #2A9D8F;
}

#app .vocab-add-dict::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
}

#app .vocab-add-dict svg {
  width: 18px;
  height: 18px;
}

#app .vocab-today-books {
  margin: 6px 0 0;
  color: #2A9D8F;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

#app .vocab-book-card.is-pressing,
#app .vocab-my-book.is-pressing {
  transform: scale(0.985);
  background: #F0FBF9;
}

/* ---------- 添加词典抽屉 ---------- */

#app .vocab-add-sheet {
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
}

#app .vocab-add-section {
  margin: 14px 2px 6px;
  color: #8F959E;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

#app .vocab-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .vocab-add-row + .vocab-add-row {
  margin-top: 6px;
}

#app .vocab-add-row.is-local {
  background: linear-gradient(180deg, #F0FBF9 0%, #FFFFFF 100%);
}

#app .vocab-add-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#app .vocab-add-row-main b {
  color: #1F2329;
  font-size: 13.5px;
  font-weight: 600;
}

#app .vocab-add-row-main small {
  color: #8F959E;
  font-size: 10.5px;
}

#app .vocab-add-lib {
  border-radius: 12px;
  background: #FFFFFF;
  overflow: hidden;
}

#app .vocab-add-lib .vocab-add-row {
  border-radius: 0;
  border-bottom: 1px solid #EFF0F1;
}

#app .vocab-add-lib .vocab-add-row:last-child {
  border-bottom: 0;
}

#app .vocab-add-sheet .vocab-import-entry {
  width: 100%;
  margin: 0;
}

#app .vocab-sheet-cancel {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  border: 1px solid #DEE0E3;
  border-radius: 10px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 自动选词抽屉 ---------- */

#app .vocab-auto-sheet {
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
}

#app .vocab-auto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#app .vocab-auto-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  text-align: left;
}

#app .vocab-auto-row.is-on {
  border-color: rgba(42, 157, 143, 0.42);
  background: #F0FBF9;
}

#app .vocab-auto-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #DEE0E3;
  border-radius: 7px;
  color: #FFFFFF;
  background: #FFFFFF;
}

#app .vocab-auto-check svg {
  width: 13px;
  height: 13px;
}

#app .vocab-auto-row.is-on .vocab-auto-check {
  border-color: #2FB6A8;
  background: #2FB6A8;
}

#app .vocab-auto-summary {
  margin: 12px 2px;
  color: #646A73;
  font-size: 12px;
  text-align: center;
}

/* ---------- 词书详情操作 ---------- */

#app .vocab-book-summary-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#app .vocab-book-summary-actions .vocab-book-current-btn {
  flex: 1;
  margin-top: 0;
}

#app .vocab-book-auto-btn {
  flex: none;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(42, 157, 143, 0.32);
  border-radius: 10px;
  background: #F0FBF9;
  color: #2A9D8F;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 签到日历 ---------- */

#app .vocab-calendar-card {
  margin-top: 12px;
}

#app .vocab-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#app .vocab-calendar-head h2 {
  margin: 0;
}

#app .vocab-calendar-head p {
  margin: 4px 0 0;
  color: #8F959E;
  font-size: 10.5px;
  line-height: 1.5;
}

#app .vocab-calendar-arrows {
  flex: none;
  display: flex;
  gap: 4px;
}

#app .vocab-calendar-arrows button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #F5F6F7;
  color: #646A73;
  font-size: 18px;
  line-height: 1;
}

#app .vocab-calendar-monthline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  margin-top: 4px;
}

#app .vocab-calendar-monthline b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

#app .vocab-calendar-monthline button {
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: #F0FBF9;
  color: #2A9D8F;
  font-size: 10.5px;
  font-weight: 600;
}

#app .vocab-calendar-viewport {
  margin-top: 6px;
  overflow: hidden;
  touch-action: pan-y;
}

#app .vocab-calendar-week,
#app .vocab-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 2px;
}

#app .vocab-calendar-week span {
  padding: 2px 0;
  color: #8F959E;
  font-size: 10px;
  text-align: center;
}

#app .vocab-calendar-grid {
  will-change: transform;
}

#app .vocab-cal-blank {
  min-height: 42px;
}

#app .vocab-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 42px;
}

#app .vocab-cal-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #1F2329;
  font-size: 11px;
  font-weight: 600;
}

#app .vocab-cal-circle svg {
  width: 14px;
  height: 14px;
}

#app .vocab-cal-day small {
  height: 9px;
  color: #2A9D8F;
  font-size: 8px;
  line-height: 9px;
}

#app .vocab-cal-day.is-signed .vocab-cal-circle {
  background: #2FB6A8;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(47, 182, 168, 0.28);
}

#app .vocab-cal-day.is-today .vocab-cal-circle {
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.22);
}

#app .vocab-cal-day.is-today.is-signed .vocab-cal-circle {
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.22), 0 3px 8px rgba(47, 182, 168, 0.28);
}

#app .vocab-cal-day.is-partial .vocab-cal-circle {
  background: rgba(47, 182, 168, 0.14);
  color: #2A9D8F;
}

#app .vocab-cal-day.is-partial .vocab-cal-circle::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #2FB6A8;
}

#app .vocab-cal-day.is-muted .vocab-cal-circle,
#app .vocab-cal-day.is-future .vocab-cal-circle {
  color: #C9CDD4;
}

#app .vocab-cal-day.is-future .vocab-cal-circle {
  opacity: 0.7;
}

/* ============================================================
   JEEV batch7a · 课表周页整体滑动
   ============================================================ */

#app .m-sched-fixed {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  flex: none;
  padding: 8px 16px 0;
  background: #F5F6F7;
}

#app .m-week-viewport {
  flex: 1;
  min-height: 0;
  height: auto;
}

#app .m-week-track {
  height: 100%;
}

#app .m-week-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

#app .week-page-head {
  flex: none;
  display: grid;
  grid-template-columns: var(--sched-time-col) repeat(7, minmax(0, 1fr));
  gap: var(--sched-gap);
  align-items: center;
  height: 64px;
  padding: 0 16px;
  box-sizing: border-box;
}

#app .week-page-head .m-week-month {
  text-align: center;
}

#app .week-page-head .m-week-day {
  width: auto;
}

#app .week-grid-scroll {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 0 16px calc(76px + env(safe-area-inset-bottom));
}

#app .m-week-page.is-edge {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  padding-top: 0;
}

#app .week-page-head.is-edge {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8BEC8;
  font-size: 11px;
}

#app .m-week-page.is-edge .week-grid-scroll {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 140px;
}

#app .m-week-now-line {
  scroll-margin-top: 12px;
}

#app .week-page-title {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 24px;
  padding: 0 16px;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .week-page-title b {
  color: #646A73;
  font-size: 10.5px;
  font-weight: 600;
}

#app .week-page-title.is-edge {
  justify-content: center;
}

#app .week-page-title.is-edge b {
  color: #B8BEC8;
}

#app .week-page-head {
  height: 56px;
}

#app .week-page-time-spacer {
  display: block;
  width: 100%;
}

/* ============================================================
   JEEV batch7a · 六模式轮盘 / 阈值 / 稍后提醒 / 消息分组
   ============================================================ */

#app .gate5-status-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

#app .gate5-status-main {
  flex: 1;
  min-width: 0;
}

#app .gate5-mini-wheel {
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 6px 18px rgba(31, 35, 41, 0.14);
}

#app .gate5-mini-wheel-disc,
#app .gate5-mini-wheel-highlight {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

#app .gate5-mini-wheel-highlight {
  pointer-events: none;
}

#app .gate5-mini-wheel-center {
  position: absolute;
  inset: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1F2329;
}

#app .gate5-mini-wheel-center b {
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
}

#app .gate5-mini-wheel-center small {
  color: #8F959E;
  font-size: 7.5px;
  line-height: 10px;
}

#app .mode-wheel-sheet {
  padding: 0 18px calc(18px + env(safe-area-inset-bottom));
}

#app .mode-wheel-mode-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0 10px;
}

#app .mode-wheel-mode {
  height: 34px;
  padding: 0 16px;
  border: 1px solid #DEE0E3;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  font-weight: 600;
}

#app .mode-wheel-mode.is-on {
  border-color: #3370FF;
  background: #E1EAFF;
  color: #245BDB;
}

#app .mode-wheel-lock {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #F2F3F5;
  color: #646A73;
  font-size: 10px;
  font-weight: 600;
}

#app .mode-wheel-lock.is-manual {
  background: #EAF7F4;
  color: #2A9D8F;
}

#app .mode-wheel {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 6px auto 0;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#app .mode-wheel-rotor {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
  box-shadow: inset 0 0 0 8px #FFFFFF, 0 10px 26px rgba(31, 35, 41, 0.16);
}

#app .mode-wheel-highlight {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

#app .mode-wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 26px;
  margin: -13px 0 0 -33px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  line-height: 26px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--label-angle)) translateY(-88px);
  transform-origin: center;
}

#app .mode-wheel-label span {
  display: block;
  transform: rotate(calc(-1 * var(--label-angle) - var(--wheel-rot)));
  pointer-events: none;
  white-space: nowrap;
}

#app .mode-wheel-label.is-on {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: rotate(var(--label-angle)) translateY(-88px) scale(1.1);
}

#app .mode-wheel-label.is-locked {
  opacity: 0.55;
}

#app .mode-wheel-center {
  position: absolute;
  inset: 62px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.12);
  pointer-events: none;
}

#app .mode-wheel-center b {
  color: #1F2329;
  font-size: 16px;
  font-weight: 650;
  line-height: 20px;
}

#app .mode-wheel-center small {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .mode-wheel-thresholds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border: 1px solid #DEE0E3;
  border-radius: 12px;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 13px;
  font-weight: 600;
}

#app .mode-wheel-thresholds em {
  font-style: normal;
  color: #8F959E;
}

#app .mode-thresholds-body {
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom));
}

#app .mode-thresholds-hint {
  margin: 0 2px 12px;
  color: #8F959E;
  font-size: 11px;
  line-height: 1.6;
}

#app .mode-threshold-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #FFFFFF;
}

#app .mode-threshold-row + .mode-threshold-row {
  margin-top: 8px;
}

#app .mode-threshold-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

#app .mode-threshold-main {
  flex: 1;
  min-width: 0;
}

#app .mode-threshold-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#app .mode-threshold-title b {
  color: #1F2329;
  font-size: 13px;
  font-weight: 600;
}

#app .mode-threshold-title small {
  color: #8F959E;
  font-size: 10px;
}

#app .mode-threshold-main input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: #3370FF;
}

#app .mode-threshold-value {
  flex: none;
  width: 30px;
  color: #3370FF;
  font-size: 16px;
  font-weight: 650;
  text-align: right;
}

#app .mode-custom-name {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  padding: 0 8px;
  border: 1px solid #DEE0E3;
  border-radius: 8px;
  font-size: 16px;
}

#app .mode-color-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

#app .mode-color-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
}

#app .mode-color-swatch.is-on {
  border-color: #1F2329;
  box-shadow: 0 0 0 2px #FFFFFF inset;
}

#app .mode-thresholds-actions {
  margin-top: 14px;
}

#app .mode-thresholds-secondary {
  width: 100%;
  height: 44px;
  border: 1px solid #DEE0E3;
  border-radius: 10px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 13px;
  font-weight: 600;
}

#app .mode-thresholds-save {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
}

/* 稍后提醒时间轮盘 */
#app .snooze-wheel-wrap {
  position: relative;
  height: 220px;
  margin: 0 20px;
}

#app .snooze-wheel-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  margin-top: -22px;
  border: 1px solid rgba(42, 157, 143, 0.24);
  border-radius: 10px;
  background: #F0FBF9;
  pointer-events: none;
}

#app .snooze-wheel {
  position: relative;
  height: 220px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#app .snooze-wheel::-webkit-scrollbar {
  display: none;
}

#app .snooze-wheel-pad {
  height: 88px;
}

#app .snooze-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  color: #B8BEC8;
  font-size: 13px;
  scroll-snap-align: center;
}

#app .snooze-option.is-on {
  color: #1F2329;
  font-size: 17px;
  font-weight: 650;
}

#app .snooze-actions {
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
}

#app .snooze-confirm {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #2FB6A8;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
}

/* 消息日期分组与低分可读性 */
#app .gate5-day-group {
  padding: 8px 2px 2px;
  color: #8F959E;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#app .gate5-msg.is-silent,
#app .gate5-msg.is-silent .gate5-msg-content,
#app .gate5-msg.is-silent .gate5-msg-sender {
  color: #1F2329;
  opacity: 1;
}

#app .gate5-msg.is-snoozed {
  box-shadow: inset 3px 0 0 #2FB6A8;
}

#app .gate5-mini-tag.is-snooze {
  background: #EAF7F4;
  color: #2A9D8F;
}

/* 任务专注模式 */
#app .tp-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#app .tp-mode-chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #DEE0E3;
  border-radius: 999px;
  background: #FFFFFF;
  color: #646A73;
  font-size: 12px;
  font-weight: 600;
}

#app .tp-mode-chip.is-on {
  border-color: #3370FF;
  background: #E1EAFF;
  color: #245BDB;
}

/* ============================================================
   JEEV 首页 —— AI 管家聊天
   ============================================================ */

#app .jeev-home {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #F5F6F7;
}

#app .jeev-home-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(245, 246, 247, 0.96);
  border-bottom: 1px solid rgba(31, 35, 41, 0.05);
  z-index: 2;
}

#app .jeev-home-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
}

#app .jeev-home-avatar svg {
  display: block;
  width: 34px;
  height: 34px;
}

#app .jeev-home-title {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

#app .jeev-home-title b {
  color: #1F2329;
  font-size: 17px;
  font-weight: 650;
  line-height: 22px;
  letter-spacing: 0.02em;
}

#app .jeev-home-title small {
  color: #8F959E;
  font-size: 11px;
  line-height: 15px;
}

#app .jeev-home-actions {
  display: flex;
  flex: none;
  gap: 2px;
}

#app .jeev-head-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #646A73;
}

#app .jeev-head-btn:active {
  background: rgba(31, 35, 41, 0.06);
}

#app .jeev-head-btn.is-on {
  color: #245BDB;
  background: #E1EAFF;
}

#app .jeev-head-btn svg {
  width: 20px;
  height: 20px;
}

#app .jeev-context-panel {
  flex: none;
  max-height: 0;
  margin: 0 16px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #FFFFFF;
  transition: max-height 220ms cubic-bezier(0.32, 0.72, 0, 1), margin 220ms cubic-bezier(0.32, 0.72, 0, 1), padding 220ms cubic-bezier(0.32, 0.72, 0, 1), border-color 220ms;
}

#app .jeev-context-panel.is-open {
  max-height: 320px;
  margin-top: 10px;
  padding: 10px 12px;
  border-color: #EFF0F1;
}

#app .jeev-context-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#app .jeev-context-grid > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 16px;
}

#app .jeev-context-grid span {
  flex: none;
  width: 28px;
  color: #8F959E;
}

#app .jeev-context-grid b {
  flex: 1;
  min-width: 0;
  color: #1F2329;
  font-weight: 500;
}

#app .jeev-chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: 8px;
}

#app .jeev-welcome[hidden],
#app .jeev-quick-chips[hidden] {
  display: none !important;
}

#app .jeev-welcome {
  padding: 18px 16px 4px;
}

#app .jeev-welcome h1 {
  margin: 0;
  color: #1F2329;
  font-size: 21px;
  font-weight: 650;
  line-height: 28px;
}

#app .jeev-welcome p {
  margin: 6px 0 0;
  color: #646A73;
  font-size: 13px;
  line-height: 19px;
}

#app .jeev-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 16px 10px;
  overflow: hidden;
  border-radius: 16px;
  background: #EFF0F1;
  box-shadow: 0 2px 12px rgba(31, 35, 41, 0.05);
}

#app .jeev-overview-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 66px;
  padding: 12px;
  border: 0;
  background: #FFFFFF;
  text-align: left;
}

#app .jeev-overview-item:active {
  background: #F7F8FA;
}

#app .jeev-overview-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

#app .jeev-overview-icon svg {
  width: 15px;
  height: 15px;
}

#app .jeev-overview-icon.is-blue { background: #E1EAFF; color: #245BDB; }
#app .jeev-overview-icon.is-orange { background: #FFF3E0; color: #C76A00; }
#app .jeev-overview-icon.is-teal { background: #E3F6F2; color: #1F7F74; }
#app .jeev-overview-icon.is-purple { background: #F0EAFF; color: #5B3FD1; }

#app .jeev-overview-text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

#app .jeev-overview-text small {
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .jeev-overview-text b {
  display: -webkit-box;
  overflow: hidden;
  color: #1F2329;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

#app .jeev-quick-chips {
  display: flex;
  gap: 8px;
  padding: 4px 16px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#app .jeev-quick-chips::-webkit-scrollbar {
  display: none;
}

#app .jeev-quick-chip {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #E5E6EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #4E5969;
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
}

#app .jeev-quick-chip:active {
  border-color: #C9D8FF;
  background: #F2F6FF;
  color: #245BDB;
}

#app .jeev-chat-messages {
  padding: 8px 16px 4px;
}

#app .jeev-chat-messages .ai-msg {
  animation: jeevMsgIn 220ms cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

#app .jeev-chat-messages .ai-action-card {
  animation: jeevCardIn 200ms cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes jeevMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jeevCardIn {
  from { opacity: 0; max-height: 0; transform: translateY(4px); }
  to { opacity: 1; max-height: 120px; transform: translateY(0); }
}

#app .jeev-input-bar {
  flex: none;
  position: relative;
  z-index: 3;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #EFF0F1;
  background: rgba(255, 255, 255, 0.96);
}

#app .jeev-input-bar .ai-send-btn {
  width: 56px;
  height: 44px;
  border-radius: 22px;
}

#app.keyboard-open .tabbar {
  display: none;
}

#app.keyboard-open .jeev-input-bar {
  padding-bottom: 8px;
}

@media (max-width: 374px) {
  #app .jeev-overview {
    margin-left: 12px;
    margin-right: 12px;
  }

  #app .jeev-overview-item {
    padding: 10px;
  }

  #app .jeev-welcome,
  #app .jeev-quick-chips {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ============================================================
   思维导图 —— 悬浮栏、卡片、创建页与编辑器
   ============================================================ */

#notesFabRoot .notes-fab-mindmap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 5px;
  min-width: 0;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #3370FF;
  font-size: 12px;
  line-height: 52px;
}

#notesFabRoot .notes-fab-mindmap svg {
  width: 17px;
  height: 17px;
}

#notesFabRoot .notes-fab-mindmap:active {
  background: #F7F8FA;
}

@media (max-width: 374px) {
  #notesFabRoot .notes-fab-mindmap {
    padding: 0 4px;
    gap: 3px;
    font-size: 11px;
  }
}

#app .note-mindmap-thumb {
  display: block;
  width: 100%;
  height: 90px;
  margin-bottom: 8px;
  border: 1px solid #EFF0F1;
  border-radius: 8px;
  background-color: #FFFFFF;
  background-size: cover;
  background-position: center;
}

#app .note-mindmap-thumb.is-empty {
  display: grid;
  place-items: center;
  color: #3370FF;
  background: linear-gradient(135deg, #F2F6FF, #EAF7F4);
}

#app .note-mindmap-thumb.is-empty svg {
  width: 28px;
  height: 28px;
}

#app .note-card-mindmap .note-card-menu {
  top: 13px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
}

#app .note-list-thumb.is-mindmap {
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  background-color: #F2F6FF;
  color: #3370FF;
}

#app .note-list-thumb.is-mindmap svg {
  width: 20px;
  height: 20px;
}

/* 新建思维导图 */

#app .mindmap-create-page .m-fullpage-scroll {
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom));
  background: #F5F6F7;
}

#app .mm-create {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#app .mm-create-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #FFFFFF;
}

#app .mm-create-title span {
  flex: none;
  color: #646A73;
  font-size: 12px;
}

#app .mm-create-title input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
}

#app .mm-ai-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #EEF4FF 0%, #F1FBF8 100%);
}

#app .mm-ai-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

#app .mm-ai-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
}

#app .mm-ai-icon svg {
  width: 30px;
  height: 30px;
}

#app .mm-ai-card-head b {
  display: block;
  color: #1F2329;
  font-size: 13px;
  line-height: 18px;
}

#app .mm-ai-card-head small {
  display: block;
  color: #8F959E;
  font-size: 10px;
  line-height: 14px;
}

#app .mm-ai-card textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #D9E4FF;
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: #1F2329;
  font-size: 16px;
  line-height: 22px;
  resize: none;
}

#app .mm-ai-generate {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 9px;
  border: 0;
  border-radius: 20px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
}

#app .mm-ai-generate:disabled {
  opacity: 0.6;
}

#app .mm-create-section {
  padding: 14px;
  border-radius: 16px;
  background: #FFFFFF;
}

#app .mm-create-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

#app .mm-create-section-head h2 {
  margin: 0;
  color: #1F2329;
  font-size: 14px;
  font-weight: 600;
}

#app .mm-create-section-head span {
  color: #8F959E;
  font-size: 10px;
}

#app .mm-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#app .mm-template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1.5px solid #EFF0F1;
  border-radius: 12px;
  background: #FFFFFF;
  text-align: left;
}

#app .mm-template-card.is-on {
  border-color: #3370FF;
  background: #F7FAFF;
}

#app .mm-template-preview {
  display: block;
  width: 100%;
  height: 68px;
  overflow: hidden;
  border-radius: 8px;
  background: #F7F9FC;
}

#app .mm-template-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

#app .mm-template-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

#app .mm-template-main b {
  overflow: hidden;
  color: #1F2329;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .mm-template-main small {
  overflow: hidden;
  color: #8F959E;
  font-size: 9px;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .mm-template-group {
  position: absolute;
  top: 11px;
  right: 10px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #8F959E;
  font-size: 8px;
  line-height: 14px;
}

#app .mm-theme-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

#app .mm-theme-row::-webkit-scrollbar {
  display: none;
}

#app .mm-theme-dot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  padding: 4px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
}

#app .mm-theme-dot.is-on {
  border-color: #3370FF;
  background: #F2F6FF;
}

#app .mm-theme-dot span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

#app .mm-theme-dot b {
  color: #646A73;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

#app .mm-create-submit {
  height: 46px;
  border-radius: 23px;
}

/* 编辑器 */

#app .mindmap-editor-page .m-fullpage-nav {
  display: none;
}

#app .mindmap-editor-page .m-fullpage-scroll {
  padding: 0;
  overflow: hidden;
  background: #F5F6F7;
}

#app .mm-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #F5F6F7;
}

#app .mm-topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 4px 0 6px;
  background: #FFFFFF;
  border-bottom: 1px solid #EFF0F1;
  z-index: 4;
}

#app .mm-icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1F2329;
  font-size: 18px;
  line-height: 1;
}

#app .mm-icon-btn svg {
  width: 19px;
  height: 19px;
}

#app .mm-icon-btn:active {
  background: #F2F3F5;
}

#app .mm-icon-btn.is-primary {
  color: #3370FF;
}

#app .mm-icon-btn.is-ai {
  color: #2FB6A8;
}

#app .mm-icon-btn:disabled {
  opacity: 0.28;
}

#app .mm-title-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

#app .mm-top-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0;
}

#app .mm-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  background-color: #F7F8FA;
  background-image: radial-gradient(rgba(31, 35, 41, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: grab;
}

#app .mm-canvas:active {
  cursor: grabbing;
}

#app .mm-viewport {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

#app .mm-lines {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}

#app .mm-node-layer {
  position: absolute;
  inset: 0;
}

#app .mm-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 0;
  box-shadow: 0 3px 10px rgba(31, 35, 41, 0.1);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  transform: translateZ(0);
  transition: left 200ms cubic-bezier(0.25, 0.1, 0.25, 1), top 200ms cubic-bezier(0.25, 0.1, 0.25, 1), width 200ms, height 200ms, box-shadow 160ms;
  user-select: none;
  -webkit-user-select: none;
}

#app .mm-node.is-capsule { border-radius: 999px; }
#app .mm-node.is-rounded { border-radius: 10px; }
#app .mm-node.is-rect { border-radius: 4px; }

#app .mm-node.is-root {
  border: 1.5px solid #D7DCE3;
  font-weight: 650;
  box-shadow: 0 5px 16px rgba(31, 35, 41, 0.1);
}

#app .mm-node.is-selected {
  outline: 2px solid #3370FF;
  outline-offset: 2px;
  box-shadow: 0 5px 16px rgba(51, 112, 255, 0.22);
}

#app .mm-node.is-editing {
  outline: 2px solid #3370FF;
  outline-offset: 2px;
}

#app .mm-node-text {
  display: block;
  width: 100%;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
}

#app .mm-node-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
}

#app .mm-node-toggle {
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #D7DCE3;
  border-radius: 50%;
  background: #FFFFFF;
  color: #646A73;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.12);
}

#app .mm-node.is-left .mm-node-toggle {
  right: auto;
  left: -9px;
}

#app .mm-node-add {
  position: absolute;
  right: -11px;
  bottom: -11px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #3370FF;
  border-radius: 50%;
  background: #FFFFFF;
  color: #3370FF;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(51, 112, 255, 0.2);
}

#app .mm-node.is-left .mm-node-add {
  right: auto;
  left: -11px;
}

#app .mm-zoom-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1px;
  height: 34px;
  padding: 0 3px;
  border: 1px solid #E5E6EB;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#app .mm-zoom-pill button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #1F2329;
  font-size: 16px;
}

#app .mm-zoom-pill span {
  min-width: 42px;
  color: #646A73;
  font-size: 10px;
  text-align: center;
}

#app .mm-zoom-pill .mm-fit-btn {
  font-size: 13px;
}

#app .mm-canvas-hint {
  position: absolute;
  right: 12px;
  bottom: 16px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #A8ADB6;
  font-size: 9px;
  pointer-events: none;
}

#app .mm-selection-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 7px 10px;
  overflow-x: auto;
  border-top: 1px solid #EFF0F1;
  background: #FFFFFF;
  scrollbar-width: none;
}

#app .mm-selection-bar::-webkit-scrollbar {
  display: none;
}

#app .mm-selection-bar button {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #E5E6EB;
  border-radius: 16px;
  background: #FFFFFF;
  color: #4E5969;
  font-size: 11px;
  white-space: nowrap;
}

#app .mm-selection-bar button.is-danger {
  border-color: #FFE0DE;
  color: #F54A45;
}

#app .mm-selection-bar button:active {
  background: #F2F6FF;
  border-color: #C9D8FF;
  color: #245BDB;
}

#app .mm-select-hint {
  color: #8F959E;
  font-size: 11px;
}

#app .mm-ai-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #EFF0F1;
  background: #FFFFFF;
}

#app .mm-ai-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 8px;
}

#app .mm-ai-avatar svg {
  width: 30px;
  height: 30px;
}

#app .mm-ai-bar input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #E5E6EB;
  border-radius: 20px;
  outline: none;
  background: #F2F3F5;
  color: #1F2329;
  font-size: 16px;
}

#app .mm-ai-send {
  flex: none;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
}

#app .mm-ai-send:disabled {
  opacity: 0.55;
}

/* 样式与信息弹层 */

#app .mm-style-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 2px 8px;
}

#app .mm-style-sheet section h3 {
  margin: 0 0 8px;
  color: #646A73;
  font-size: 11px;
  font-weight: 600;
}

#app .mm-seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#app .mm-seg button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #E5E6EB;
  border-radius: 17px;
  background: #FFFFFF;
  color: #4E5969;
  font-size: 12px;
}

#app .mm-seg button.is-on {
  border-color: #3370FF;
  background: #E1EAFF;
  color: #245BDB;
  font-weight: 600;
}

#app .mm-color-row,
#app .mm-color-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}

#app .mm-color-dot {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #E5E6EB;
}

#app .mm-color-dot.is-default {
  background: repeating-linear-gradient(135deg, #FFFFFF 0 5px, #EFF0F1 5px 10px);
}

#app .mm-info-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 10px;
}

#app .mm-info-sheet p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
}

#app .mm-info-sheet span {
  flex: none;
  width: 42px;
  color: #8F959E;
}

#app .mm-info-sheet b {
  flex: 1;
  min-width: 0;
  color: #1F2329;
  font-weight: 500;
}

#app .mm-ai-suggest {
  padding: 2px 2px 10px;
}

#app .mm-ai-suggest p {
  margin: 0 0 12px;
  color: #1F2329;
  font-size: 13px;
  line-height: 20px;
}

#app .mm-ai-suggest-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

#app .mm-ai-suggest-nodes span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #F2F6FF;
  color: #245BDB;
  font-size: 11px;
  line-height: 16px;
}

#app .mm-ai-suggest-actions {
  display: flex;
  gap: 8px;
}

#app .mm-ai-suggest-actions .btn {
  flex: 1;
}

/* 课表 AI 识别 */

#app .m-paste-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

#app .m-paste-actions .btn {
  height: 44px;
}

#app .m-ai-warnings {
  max-height: 104px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  overflow-y: auto;
  border: 1px solid #FFE2B8;
  border-radius: 10px;
  background: #FFF9ED;
}

#app .m-ai-warnings p {
  margin: 0;
  color: #A65E00;
  font-size: 10px;
  line-height: 16px;
}

#app .m-ai-warnings p + p {
  margin-top: 3px;
}

#app .m-ai-import-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 48vh;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

#app .m-ai-import-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border: 1px solid #EFF0F1;
  border-radius: 12px;
  background: #F7F8FA;
}

#app .m-ai-input,
#app .m-ai-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  outline: none;
  background: #FFFFFF;
  color: #1F2329;
  font-size: 16px;
}

#app .m-ai-import-row .m-ai-name {
  height: 40px;
  font-weight: 600;
}

#app .m-ai-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
}

#app .m-ai-period {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #E5E6EB;
  border-radius: 9px;
  background: #FFFFFF;
}

#app .m-ai-period .m-ai-input {
  flex: 1;
  width: 0;
  padding: 0;
  border: 0;
  text-align: center;
}

#app .m-ai-period em {
  color: #8F959E;
  font-size: 12px;
  font-style: normal;
}

#app .m-ai-period small {
  flex: none;
  color: #8F959E;
  font-size: 10px;
}

#app .m-ai-import-row .m-ai-select {
  appearance: none;
  -webkit-appearance: none;
}
