/* ============================================================
   七语之旅 · 移动端适配 + 应用样式
   加载顺序:styles.css → mobile.css(本文件)
   ============================================================ */

/* ---------- 通用移动端优化 ---------- */
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .hero { padding: 26px 16px 24px; }
  .hero h1 { font-size: clamp(22px, 6vw, 30px); letter-spacing: .5px; }
  .hero .sub { font-size: 14px; }
  .hero .crumbs { font-size: 12px; margin-top: 12px; }
  .hero .stats span { padding: 5px 10px; font-size: 12px; }
  nav {
    justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; padding: 8px 6px;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a {
    padding: 9px 14px; font-size: 13.5px; white-space: nowrap; min-height: 38px;
    display: inline-flex; align-items: center; flex-shrink: 0;
  }
  .wrap { padding: 0 14px 60px; }
  h2.sec { font-size: 21px; }
  h2.sec .num { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
  .lead { font-size: 13.5px; }
  section { margin-top: 40px; }
  .notice, .tip, .warn, .answer { padding: 12px 14px; font-size: 13.5px; }
  th, td { padding: 9px 10px; font-size: 13px; }
  .grid { gap: 12px; }
  .card { padding: 15px 16px; }
  .week { margin-top: 14px; }
  .week-bar { padding: 12px 14px; gap: 10px; }
  .week-bar .wno { font-size: 12px; padding: 5px 12px; }
  .week-bar h3 { font-size: 15px; flex: 1; min-width: 0; }
  .week-bar .goal { font-size: 11.5px; padding: 3px 10px; }
  .week-body { padding: 14px 14px 16px; }
  .week-body h4 { font-size: 13px; }
  .days { grid-template-columns: 1fr; gap: 10px; }
  .day { padding: 11px 12px; }
  .day h6 { font-size: 13px; }
  .vlist li { font-size: 13.5px; padding: 6px 0; }
  .milestone { font-size: 13px; padding: 11px 13px; }
}

/* ---------- 周课折迭(应用在全部设备) ---------- */
details.week-details {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-top: 20px; overflow: hidden; scroll-margin-top: 70px;
}
details.week-details > .week-bar { border-bottom: 1px solid var(--line); }
details.week-details > summary { cursor: pointer; -webkit-tap-highlight-color: transparent; list-style: none; }
details.week-details > summary::-webkit-details-marker { display: none; }
details.week-details > summary .chev {
  margin-left: auto; color: var(--hero3); font-weight: 800; font-size: 13px;
  transition: transform .2s; flex-shrink: 0;
}
details.week-details[open] > summary .chev { transform: rotate(180deg); }

/* ---------- 首页「今日面板」 ---------- */
.appbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.appbar .app-name { font-weight: 800; color: var(--hero2); font-size: 17px; }
.appbar .today { font-size: 12px; color: var(--muted); }

.day-banner {
  border-radius: 16px; padding: 18px; color: #fff; margin-top: 16px;
  background: linear-gradient(135deg, var(--hero1), var(--hero2) 55%, var(--hero3));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.day-banner .dn { font-size: 21px; font-weight: 800; }
.day-banner .dsub { font-size: 12.5px; opacity: .92; margin-top: 2px; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.pill.ie  { background: #dbeafe; color: #1d4ed8; }
.pill.cjk { background: #fee2e2; color: #b91c1c; }
.pill.sun { background: #ecfdf5; color: #065f46; }

.plan { background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-top: 10px; overflow: hidden; }
.task {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.task:last-child { border-bottom: none; }
.task .box {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid #c7cbe0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; transition: .15s;
}
.task.done .box { background: var(--good); border-color: var(--good); }
.task.done .t { color: var(--muted); text-decoration: line-through; }
.task .meta { flex: 1; min-width: 0; }
.task .meta .t { font-size: 14.5px; font-weight: 600; }
.task .meta .s { font-size: 12px; color: var(--muted); }
.task .go { font-size: 12.5px; color: var(--hero3); font-weight: 700; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.task .go:hover { text-decoration: underline; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quick a {
  display: flex; flex-direction: column; gap: 3px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px; text-decoration: none; color: var(--ink);
  border-top: 4px solid var(--hero3);
}
.quick a .l { font-weight: 800; font-size: 15px; }
.quick a .w { font-size: 12px; color: var(--muted); }

.stepper { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 10px 14px; margin-top: 12px; }
.stepper button {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: #f6f7fb; font-size: 22px; font-weight: 800; color: var(--hero2); flex-shrink: 0;
}
.stepper .cur { flex: 1; text-align: center; }
.stepper .cur b { font-size: 20px; color: var(--hero3); }
.stepper .cur small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- 打卡驱动 ---------- */
.checkin {
  display: block; width: 100%; margin-top: 14px; padding: 16px 16px 14px;
  border: none; border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(135deg, var(--good), #16a34a);
  color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 8px 20px rgba(22,163,74,.28);
  transition: transform .12s, box-shadow .12s;
}
.checkin:active { transform: scale(.97); }
.checkin .sub { display: block; font-size: 11.5px; font-weight: 500; opacity: .9; margin-top: 4px; }

.checkin-actions { display: flex; flex-direction: column; align-items: stretch; }
.ghost-btn {
  background: #fff; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 9px; margin-top: 12px; font-size: 12.5px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back-today {
  display: block; text-align: center; background: #eef2ff; color: var(--hero2);
  border-radius: 10px; padding: 9px; margin-top: 12px; font-size: 12.5px;
  text-decoration: none; font-weight: 600;
}

.progress-line {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.progress-line b { color: var(--hero3); font-size: 13px; }

.week-strip { display: flex; gap: 6px; margin-top: 12px; justify-content: center; }
.week-strip .d {
  flex: 1; max-width: 46px; text-align: center; padding: 8px 2px; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow); font-size: 11px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.week-strip .d b { display: block; font-size: 14px; }
.week-strip .d.today { background: linear-gradient(135deg, var(--hero2), var(--hero3)); color: #fff; }
.week-strip .d.sel { outline: 2px solid var(--hero3); }
.week-strip .d.ok { box-shadow: inset 0 -3px 0 var(--good); }

.linklist { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.linklist a {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line);
}
.linklist a:last-child { border-bottom: none; }
.linklist a .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.linklist a .tt { font-weight: 600; font-size: 14px; flex: 1; }
.linklist a .dd { font-size: 12px; color: var(--muted); }

.btn-ghost {
  display: block; text-align: center; background: #fff; border: 1px solid var(--line);
  color: var(--hero2); border-radius: 12px; padding: 13px; margin-top: 12px;
  text-decoration: none; font-weight: 700; font-size: 14px;
}
.install-hint {
  background: #fffbeb; border: 1px dashed var(--gold); border-radius: 12px;
  padding: 12px 14px; font-size: 12.5px; color: #78350f; margin-top: 12px;
}
