/* ==========================================================================
   记忆助手 · Memory Assistant v1.1
   设计语言：晨光书案（Warm & Focused）
   - 暖纸质感背景 + 深墨蓝品牌色 + 琥珀金"记忆/复习"专属强调色
   - 移动优先 · BEM 命名 · 设计令牌 tokens
   ========================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* 品牌色（深墨蓝） */
  --c-brand: #1B2A4A;
  --c-brand-hover: #27406E;
  --c-brand-deep: #12203C;
  --c-brand-ink: #0D1830;

  /* 交互强调（靛蓝） */
  --c-accent: #4F6DF5;
  --c-accent-hover: #3D5BE0;
  --c-accent-soft: #EDF1FE;
  --c-accent-ring: rgba(79, 109, 245, .18);

  /* 记忆专属强调（琥珀金） */
  --c-gold: #C87E1A;
  --c-gold-strong: #A86510;
  --c-gold-soft: #FCF4E3;
  --c-gold-line: #F0D9AC;

  /* 表面与背景（暖纸感） */
  --c-bg: #F6F4EF;
  --c-bg-deep: #EFECE4;
  --c-surface: #FFFFFF;
  --c-surface-warm: #FDFCFA;
  --c-border: #E7E2D8;
  --c-border-strong: #D5CDBE;

  /* 文字 */
  --c-text: #20263A;
  --c-text-sub: #5C6370;
  --c-text-faint: #8E8F96;

  /* 语义色 */
  --c-success: #15803D;
  --c-success-soft: #E9F8EF;
  --c-success-border: #B9E5C8;
  --c-danger: #D92D20;
  --c-danger-soft: #FEF0EF;
  --c-danger-border: #FACDC9;
  --c-warn: #B45309;
  --c-warn-soft: #FDF3E3;
  --c-warn-border: #F2D9A6;

  /* 字体 */
  --font-body: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 阴影（柔和多层） */
  --shadow-xs: 0 1px 2px rgba(27, 42, 74, .04);
  --shadow-sm: 0 2px 6px -1px rgba(27, 42, 74, .05), 0 1px 2px rgba(27, 42, 74, .03);
  --shadow-md: 0 10px 24px -12px rgba(27, 42, 74, .14), 0 3px 8px -2px rgba(27, 42, 74, .06);
  --shadow-lg: 0 24px 48px -20px rgba(27, 42, 74, .22), 0 8px 20px -8px rgba(27, 42, 74, .10);

  /* 间距 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 28px; --sp-8: 32px;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.58;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 氛围背景：暖纸基底 + 三团柔光（靛蓝冷光 + 琥珀暖光） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(640px 460px at 8% -8%, rgba(79, 109, 245, .14), transparent 64%),
    radial-gradient(720px 560px at 104% 0%, rgba(200, 126, 26, .10), transparent 60%),
    radial-gradient(560px 480px at 90% 106%, rgba(79, 109, 245, .07), transparent 64%),
    var(--c-bg);
}

/* 细密点阵纹理（更淡、范围收窄，避免干扰阅读） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(27, 42, 74, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 44%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 44%);
  pointer-events: none;
}

.page {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 40px);
}

/* 页面顶部柔光装饰 */
.page__glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 320px;
  background: radial-gradient(closest-side, rgba(79, 109, 245, .13), transparent);
  pointer-events: none;
}

/* ---------- 3. Header / Brand ---------- */
.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 34px 2px 26px;
}

.app-header__glow {
  position: absolute;
  left: -40px;
  top: -30px;
  width: 260px;
  height: 180px;
  background: radial-gradient(closest-side, rgba(200, 126, 26, .09), transparent);
  pointer-events: none;
}

.app-brand { display: flex; align-items: center; gap: 15px; min-width: 0; position: relative; }

.app-brand__mark {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #33508A 0%, var(--c-brand) 52%, var(--c-brand-deep) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 22px -8px rgba(27, 42, 74, .55),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(0, 0, 0, .18);
  position: relative;
}

/* logo 上的微光扫过效果 */
.app-brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .16) 46%, transparent 62%);
  animation: markSweep 5.5s ease-in-out infinite;
}

@keyframes markSweep {
  0%, 60% { transform: translateX(-110%); }
  85%, 100% { transform: translateX(110%); }
}

.app-brand__title {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1.18;
  color: var(--c-brand-ink);
}

.app-brand__subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--c-text-sub);
  letter-spacing: .2px;
}

.hdr-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-gold-strong);
  background: var(--c-gold-soft);
  border: 1px solid var(--c-gold-line);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.hdr-chip svg { opacity: .9; }

/* ---------- 4. Card ---------- */
.card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}

/* 卡片顶部细高光线 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
}

.card + .card { margin-top: var(--sp-4); }

@media (hover: hover) and (min-width: 640px) {
  .card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--c-border-strong);
    transform: translateY(-1px);
  }
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: 20px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--c-text);
}

.card__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* 入场 stagger 动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.reveal { animation: fadeUp .6s cubic-bezier(.22, .61, .36, 1) both; }
.reveal--0 { animation-delay: .02s; }
.reveal--1 { animation-delay: .12s; }
.reveal--2 { animation-delay: .22s; }

/* ---------- 5. Status Chip ---------- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}

.status-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.status-chip--off {
  color: var(--c-text-faint);
  background: #F1F0EC;
  border: 1px solid #E3E1DA;
}

.status-chip--on {
  color: var(--c-success);
  background: var(--c-success-soft);
  border: 1px solid var(--c-success-border);
}

.status-chip--on .status-chip__dot { animation: pulse 1.8s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.82); }
}

/* ---------- 6. Form ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }

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

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-row--stack { grid-template-columns: 1fr; }

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sub);
  display: flex;
  align-items: baseline;
  gap: 4px;
  letter-spacing: .2px;
}

.req { color: var(--c-danger); font-weight: 700; }
.opt { font-size: 11.5px; color: var(--c-text-faint); font-weight: 500; }

.input-wrap { position: relative; display: flex; align-items: center; }

.input-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-faint);
  pointer-events: none;
  transition: color .18s, transform .18s;
}

.input-wrap:focus-within > svg { color: var(--c-accent); transform: translateY(-50%) scale(1.06); }

.input-wrap > input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-surface-warm);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.input-wrap--togglable > input { padding-right: 48px; }

.input-wrap > input::placeholder { color: var(--c-text-faint); }

.input-wrap > input:hover:not(:focus) { border-color: var(--c-border-strong); }

.input-wrap > input:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--c-accent-ring);
}

.input-wrap > input[type="date"],
.input-wrap > input[type="time"] { font-family: var(--font-mono); font-size: 14.5px; }

.input-wrap__action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--c-text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.input-wrap__action:hover { color: var(--c-text-sub); background: #F1F0EC; }
.input-wrap__action:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.input-wrap__action.is-active { color: var(--c-accent); }

textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.62;
  color: var(--c-text);
  background: var(--c-surface-warm);
  resize: vertical;
  min-height: 92px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

textarea::placeholder { color: var(--c-text-faint); }

textarea:hover:not(:focus) { border-color: var(--c-border-strong); }

textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--c-accent-ring);
}

.field__error {
  margin: 0;
  font-size: 12.5px;
  color: var(--c-danger);
}

.field.is-invalid .input-wrap > input {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, .12);
}

.field.is-invalid .input-wrap > svg { color: var(--c-danger); }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, color .18s, opacity .18s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #33508A 0%, var(--c-brand) 60%, var(--c-brand-deep) 100%);
  box-shadow:
    0 6px 16px -6px rgba(27, 42, 74, .5),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #3D5C99 0%, var(--c-brand-hover) 60%, var(--c-brand) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px -8px rgba(27, 42, 74, .55),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn--primary:active:not(:disabled) { transform: translateY(0) scale(.99); }

.btn--ghost {
  color: var(--c-brand);
  background: var(--c-surface);
  border-color: var(--c-border);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--c-border-strong);
  background: #FBF9F5;
}

.btn--block { width: 100%; height: 50px; font-size: 15px; }

.btn--submit {
  margin-top: 6px;
  background: linear-gradient(135deg, #33508A 0%, var(--c-brand) 52%, var(--c-brand-deep) 100%);
  box-shadow:
    0 12px 26px -10px rgba(27, 42, 74, .6),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  position: relative;
  overflow: hidden;
}

/* 提交按钮流光扫过 */
.btn--submit::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60%;
  left: -80%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.8s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 55% { left: -80%; }
  85%, 100% { left: 130%; }
}

.btn--submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #3D5C99 0%, var(--c-brand-hover) 52%, var(--c-brand) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px -12px rgba(27, 42, 74, .62),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn__icon { display: inline-flex; align-items: center; }

.spin { animation: rotate 1s linear infinite; }

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

/* ---------- 8. Form hint ---------- */
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.form-actions .btn--ghost { flex: 1; min-width: 128px; }
.form-actions .btn--primary { flex: 1; min-width: 128px; }

.form-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  animation: hintIn .3s ease both;
}

@keyframes hintIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.form-hint--success { color: var(--c-success); background: var(--c-success-soft); border: 1px solid var(--c-success-border); }
.form-hint--error { color: var(--c-danger); background: var(--c-danger-soft); border: 1px solid var(--c-danger-border); }
.form-hint--info { color: var(--c-text-sub); background: #F1F0EC; border: 1px solid #E3E1DA; }

/* 小号 / 危险按钮 */
.btn--sm { height: 40px; padding: 0 16px; font-size: 13.5px; }

.btn--danger {
  color: #fff;
  background: linear-gradient(180deg, #E5484D 0%, var(--c-danger) 60%, #B42318 100%);
  box-shadow:
    0 6px 14px -6px rgba(217, 45, 32, .5),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn--danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #F2555A 0%, #C1251A 60%, #9E1E14 100%);
  transform: translateY(-1px);
  box-shadow:
    0 10px 20px -8px rgba(217, 45, 32, .55),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn--danger:active:not(:disabled) { transform: translateY(0) scale(.99); }

.btn--ghost-danger {
  color: var(--c-danger);
  background: var(--c-surface);
  border-color: var(--c-danger-border);
}

.btn--ghost-danger:hover:not(:disabled) {
  background: var(--c-danger-soft);
  border-color: var(--c-danger);
}

/* ---------- 9. Ebbinghaus Box（记忆专区） ---------- */
.ebb-box {
  position: relative;
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  background: linear-gradient(180deg, #FCFBF7, #FAF8F3);
  transition: border-color .25s, background .25s, box-shadow .25s;
  overflow: hidden;
}

.ebb-box.is-on {
  border-style: solid;
  border-color: var(--c-gold-line);
  background: linear-gradient(180deg, #FFFDF7, var(--c-gold-soft));
  box-shadow: 0 0 0 4px rgba(200, 126, 26, .09);
}

/* 记忆专区角标（激活时出现） */
.ebb-box.is-on::after {
  content: "";
  position: absolute;
  top: -26px;
  right: -26px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 126, 26, .14), transparent);
  pointer-events: none;
}

.ebb-box__toggle {
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.ebb-box__check { display: flex; flex: none; }

.ebb-box__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.ebb-box__checkmark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--c-border-strong);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}

.ebb-box__input:checked + .ebb-box__checkmark {
  background: linear-gradient(145deg, #D9922E, var(--c-gold-strong));
  border-color: var(--c-gold-strong);
  color: #fff;
  box-shadow: 0 3px 8px -2px rgba(200, 126, 26, .5);
}

.ebb-box__input:focus-visible + .ebb-box__checkmark {
  box-shadow: 0 0 0 4px rgba(200, 126, 26, .22);
}

.ebb-box__toggle:active .ebb-box__checkmark { transform: scale(.93); }

.ebb-box__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.ebb-box__text strong { font-size: 15px; font-weight: 700; color: var(--c-text); }

.ebb-box__text em { font-style: normal; font-size: 12.5px; color: var(--c-text-sub); }

.ebb-box__brain {
  margin-left: auto;
  color: var(--c-gold);
  flex: none;
  opacity: .85;
  transition: transform .25s ease;
}

.ebb-box.is-on .ebb-box__brain { transform: scale(1.08) rotate(-4deg); opacity: 1; }

.ebb-timeline {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(200, 126, 26, .16);
  position: relative;
  z-index: 1;
}

.ebb-timeline__head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-gold-strong);
  margin-bottom: 11px;
}

.ebb-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.ebb-timeline__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12.5px;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.ebb-timeline__item:hover {
  border-color: var(--c-gold-line);
  box-shadow: 0 4px 12px -4px rgba(200, 126, 26, .22);
  transform: translateY(-1px);
}

.ebb-timeline__idx {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(145deg, #E8A23C, var(--c-gold));
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px -1px rgba(200, 126, 26, .45);
}

.ebb-timeline__label { color: var(--c-text); font-weight: 600; white-space: nowrap; }

.ebb-timeline__at {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-text-sub);
  white-space: nowrap;
}

.ebb-timeline__note {
  margin: 11px 0 0;
  font-size: 11.5px;
  color: var(--c-text-faint);
}

/* ---------- 10. Feedback ---------- */
.feedback { margin-top: var(--sp-4); animation: fadeUp .4s cubic-bezier(.22, .61, .36, 1) both; }

.feedback-card {
  border-radius: var(--radius-lg);
  padding: 17px 18px 15px;
  border: 1px solid transparent;
  border-left-width: 4px;
  box-shadow: var(--shadow-sm);
}

.feedback-card--success {
  background: var(--c-success-soft);
  border-color: var(--c-success-border);
  border-left-color: var(--c-success);
}
.feedback-card--error {
  background: var(--c-danger-soft);
  border-color: var(--c-danger-border);
  border-left-color: var(--c-danger);
}
.feedback-card--warn {
  background: var(--c-warn-soft);
  border-color: var(--c-warn-border);
  border-left-color: var(--c-warn);
}

.feedback-card__head { display: flex; align-items: flex-start; gap: 12px; }

.feedback-card__icon { flex: none; display: flex; margin-top: 1px; }
.feedback-card--success .feedback-card__icon { color: var(--c-success); }
.feedback-card--error .feedback-card__icon { color: var(--c-danger); }
.feedback-card--warn .feedback-card__icon { color: var(--c-warn); }

.feedback-card__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--c-text); }

.feedback-card__desc { margin: 3px 0 0; font-size: 13px; color: var(--c-text-sub); }

.feedback-list {
  list-style: none;
  margin: 13px 0 0;
  padding: 11px 0 0;
  border-top: 1px dashed rgba(27, 42, 74, .13);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feedback-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-width: 0;
  flex-wrap: wrap;
}

.feedback-item__status { flex: none; display: flex; color: var(--c-success); }

.feedback-item--fail .feedback-item__status { color: var(--c-danger); }

.feedback-item__at {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-text-sub);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(27, 42, 74, .09);
  border-radius: 6px;
  padding: 2px 8px;
}

.feedback-item__title { color: var(--c-text); font-weight: 600; overflow-wrap: anywhere; }

.feedback-item__reason {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--c-danger);
  padding-left: 24px;
  overflow-wrap: anywhere;
}

/* ---------- 10.5 日程管理 ---------- */
.mgmt-body { display: flex; flex-direction: column; }

/* 同步状态条 */
.sync-status {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #FCFBF7, #FAF8F3);
  margin-bottom: 14px;
}

.sync-status__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--c-text-faint);
  transition: background .2s, box-shadow .2s;
}

.sync-status__dot--on {
  background: var(--c-success);
  box-shadow: 0 0 0 4px var(--c-success-soft);
  animation: pulse 1.8s ease-in-out infinite;
}

.sync-status__dot--off {
  background: var(--c-warn);
  box-shadow: 0 0 0 4px var(--c-warn-soft);
}

.sync-status__dot--warn { background: var(--c-text-faint); }

.sync-status__info { flex: 1; min-width: 0; }

.sync-status__line {
  margin: 0;
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.5;
}

.sync-status__line strong { font-weight: 700; }

.sync-status__sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--c-text-faint);
}

.sync-status__refresh {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
  color: var(--c-text-sub);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.sync-status__refresh:hover {
  color: var(--c-brand);
  border-color: var(--c-border-strong);
  background: #FBF9F5;
}

.sync-status__refresh:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.sync-status__refresh:disabled { opacity: .5; cursor: not-allowed; }

.mgmt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; }

.mgmt-toolbar .mgmt-load { flex: 1 1 150px; }

.mgmt-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border: 1px solid rgba(79, 109, 245, .22);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 2px;
  white-space: nowrap;
}

.mgmt-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed rgba(27, 42, 74, .13);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mgmt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface-warm);
  font-size: 13.5px;
  min-width: 0;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.mgmt-item:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-xs);
}

.mgmt-item__at {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-text-sub);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(27, 42, 74, .09);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.mgmt-item__title {
  flex: 1;
  min-width: 0;
  color: var(--c-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mgmt-item__del {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--c-text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, background .15s, transform .15s;
}

.mgmt-item__del:hover:not(:disabled) { color: var(--c-danger); background: var(--c-danger-soft); }
.mgmt-item__del:active:not(:disabled) { transform: scale(.92); }
.mgmt-item__del:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.mgmt-item__del:disabled { opacity: .4; cursor: not-allowed; }

.mgmt-empty {
  margin: 16px 0 0;
  padding: 22px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--c-text-faint);
  border: 1.5px dashed var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface-warm);
}

.mgmt-note {
  margin: 13px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-text-faint);
}

/* ---------- 10.6 Select 下拉选择 ---------- */
.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-faint);
  pointer-events: none;
  transition: color .18s, transform .18s;
  z-index: 1;
}

.select-wrap:focus-within > svg {
  color: var(--c-accent);
  transform: translateY(-50%) scale(1.06);
}

.select-wrap > select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-surface-warm);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.select-wrap > select:hover:not(:focus) {
  border-color: var(--c-border-strong);
}

.select-wrap > select:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--c-accent-ring);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--c-text-faint);
  border-bottom: 2px solid var(--c-text-faint);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color .18s;
}

.select-wrap:focus-within .select-arrow {
  border-color: var(--c-accent);
}

/* ---------- 10.7 Switch 开关 ---------- */
.field--switch {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.field--switch .field__label {
  margin-bottom: 0;
}

.switch-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #E3E1DA;
  cursor: pointer;
  transition: background .2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
  transition: transform .2s ease;
}

.switch-input:checked + .switch-track {
  background: var(--c-accent);
}

.switch-input:checked + .switch-track .switch-thumb {
  transform: translateX(18px);
}

.switch-input:focus-visible + .switch-track {
  box-shadow: 0 0 0 4px var(--c-accent-ring);
}

.switch-label {
  font-size: 13px;
  color: var(--c-text-sub);
  font-weight: 500;
  min-width: 32px;
  text-align: right;
}

/* ---------- 10.8 附件上传区 ---------- */
.field__hint {
  font-size: 11.5px;
  color: var(--c-text-faint);
  font-weight: 400;
  margin-left: 4px;
}

.attach-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attach-drop {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  background: var(--c-surface-warm);
  transition: border-color .2s, background .2s;
}

.attach-drop.is-dragover {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}

.attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-brand);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.attach-btn:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  transform: translateY(-1px);
}

.attach-btn:active {
  transform: translateY(0);
}

.attach-btn__icon {
  display: inline-flex;
  color: inherit;
}

.attach-drop__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--c-text-faint);
}

.attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface-warm);
  font-size: 13px;
  min-width: 0;
  animation: attachIn .25s ease both;
}

@keyframes attachIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.attach-item__icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attach-item__name {
  flex: 1;
  min-width: 0;
  color: var(--c-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-item__size {
  flex: none;
  font-size: 11.5px;
  color: var(--c-text-faint);
  font-family: var(--font-mono);
}

.attach-item__del {
  flex: none;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 7px;
  color: var(--c-text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.attach-item__del:hover {
  color: var(--c-danger);
  background: var(--c-danger-soft);
}

/* ---------- 11. Footer ---------- */
.app-footer {
  margin-top: var(--sp-7);
  text-align: center;
  font-size: 12px;
  color: var(--c-text-faint);
}

.app-footer p { margin: 0; }

.noscript {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid var(--c-danger-border);
  color: var(--c-danger);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
}

/* ---------- 12. Responsive ---------- */
@media (min-width: 640px) {
  .card { padding: 26px; }
  .field-row--stack { grid-template-columns: 1fr 1fr; }
  .app-header { padding: 44px 2px 30px; }
  .app-brand__title { font-size: 27px; }
  .app-brand__mark { width: 54px; height: 54px; border-radius: 17px; }
  .ebb-timeline__list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 400px) {
  .hdr-chip { display: none; }
  .ebb-timeline__list { grid-template-columns: repeat(2, 1fr); }
  .app-brand__subtitle { font-size: 11.5px; }
}

/* 无障碍：减弱动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
