/* ==========================================================================
   forms-desk.css — 默认皮肤（一日编辑台）这一轮新增的「生活入口」
   --------------------------------------------------------------------------
   1) 主屏附近地点：探测条 + 雷达动画（复用 radar.js 的真数据 SVG）
   2) 步骤清单：一眼看全、直接勾，不再左右翻页
   3) 我的：头像 + 名字 + 统计，先像一个人的主页
   4) 日记：月历 + 趋势 + 徽章 + 明信片墙 + 最近旁白
   5) 深色 token 只给 desk；其他皮肤由另一条线处理，别在这里抢
   （「显示与模式」整页连同它的 CSS 已于 2026-10-27 删除：
     导航收放 / 深色都已在右上角同一条功能栏里，不再单开一页。）
   ========================================================================== */

/* ---------- 1. 主屏「附近」探测条 ---------- */
.fe-locate-bar {
  display: flex; align-items: center; gap: 11px;
  min-height: 52px; padding: 8px 11px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--sq-paper-2) 76%, transparent);
}
.fe-locate-radar {
  position: relative; width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--sq-paper-3) 72%, transparent);
}
.fe-locate-radar::before {
  content: ""; position: absolute; inset: -2px;
  background: conic-gradient(from 0deg, transparent 0 66%,
    color-mix(in srgb, var(--accent) 46%, transparent) 84%, transparent 100%);
  opacity: .18; animation: fe-radar-sweep 2.4s linear infinite;
}
.fe-locate-bar.is-scanning .fe-locate-radar::before { opacity: .95; animation-duration: 1.35s; }
.fe-locate-radar::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
}
.fe-locate-dot {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 30%, transparent);
}
.fe-locate-bar.is-scanning .fe-locate-dot { animation: fe-radar-pulse 1.35s ease-out infinite; }
.fe-locate-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.fe-locate-copy strong { font-size: 12px; font-weight: 500; }
.fe-locate-copy small { font-size: 10px; line-height: 1.4; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-locate-bar .fe-btn { flex: none; min-height: 34px; padding: 6px 10px; font-size: 11px; border: 1px solid var(--line); }
.fe-locate-bar .fe-locate-open { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.fe-locate-bar.is-ok .fe-locate-radar::before { opacity: .28; }
@keyframes fe-radar-sweep { to { transform: rotate(360deg); } }
@keyframes fe-radar-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* 定位抽屉里的雷达舞台：真 POI 用 radar.js 画，扫描层叠在上面 */
.fe-locate-sheet { display: grid; gap: 14px; }
.fe-locate-stage {
  position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: 4px auto;
  color: var(--accent);
}
.fe-locate-stage .radar { width: 100%; height: 100%; display: block; }
.fe-locate-stage .fe-locate-sweep {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%,
    color-mix(in srgb, var(--accent) 26%, transparent) 88%, transparent 100%);
  animation: fe-radar-sweep 2.2s linear infinite;
}
.fe-locate-stage.is-scanning .fe-locate-sweep { animation-duration: 1.3s; }
.fe-locate-meta { display: grid; gap: 5px; text-align: center; font-size: 11px; line-height: 1.6; }
.fe-locate-meta strong { font-size: 15px; font-weight: 500; }
.fe-locate-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* 默认皮肤的版心多了一条「附近」，行数从 3 行变 4 行 */
.fe-app[data-form="desk"] .fe-desk-page { grid-template-rows: 36px auto minmax(0, 1fr) 34px; }

/* ---------- 2. 步骤清单：一屏全看，直接勾 ---------- */
.fe-step-block { display: grid; gap: 6px; min-height: 0; }
.fe-step-list { display: grid; gap: 7px; }
.fe-step-list .fe-step {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 9px 10px; min-height: 42px; text-align: left;
  border: 1px solid var(--line); border-radius: 3px;
  background: color-mix(in srgb, var(--sq-paper-2) 62%, transparent);
}
.fe-step-list .fe-step-no {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 10px; line-height: 1;
}
.fe-step-list .fe-step-text { flex: 1; font-size: 13px; line-height: 1.65; }
.fe-step-list .fe-step[aria-pressed="true"] .fe-step-no {
  border-color: var(--accent); background: var(--accent); color: var(--sq-paper);
}
.fe-step-list .fe-step[aria-pressed="true"] .fe-step-text { text-decoration: line-through; opacity: .58; }
.fe-step-list-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; opacity: .72; }
.fe-step-list-head strong { font-weight: 500; }

/* ---------- 3. 我的：先是一个人，再是一列设置 ---------- */
.fe-profile-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--sq-paper-2) 74%, transparent);
}
.fe-avatar {
  width: 58px; height: 58px; flex: none; overflow: hidden; border-radius: 50%;
  border: 1px solid var(--line); background: var(--sq-paper-3);
  display: grid; place-items: center;
}
.fe-avatar svg { width: 100%; height: 100%; display: block; }
.fe-profile-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.fe-profile-copy strong { font-size: 17px; font-weight: 500; }
.fe-profile-copy small { font-size: 10px; opacity: .72; }
.fe-profile-stats { display: flex; gap: 10px; font-size: 10px; opacity: .8; flex-wrap: wrap; }
.fe-profile-stats b { font-weight: 600; color: var(--accent); }

/* ---------- 5. 日记 ---------- */
.fe-journal-page { display: flex; flex-direction: column; gap: 16px; padding: 22px 0 28px; min-height: 0; }
.fe-journal-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fe-journal-hero h1 { font-size: 27px; }
.fe-journal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fe-journal-stat {
  display: grid; gap: 3px; padding: 10px 11px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--sq-paper-2) 56%, transparent);
}
.fe-journal-stat strong { font: 500 22px/1.15 Georgia, serif; }
.fe-journal-stat small { font-size: 9px; letter-spacing: .08em; opacity: .62; }
.fe-journal-card { border: 1px solid var(--line); padding: 12px; display: grid; gap: 10px; }
.fe-journal-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fe-journal-card > header h2 { font-size: 13px; font-weight: 500; }
.fe-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.fe-calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 9px; opacity: .55; text-align: center; padding-bottom: 2px; }
.fe-calendar-cell {
  position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center;
  min-height: 0; padding: 0; font-size: 11px;
  border: 1px solid transparent; border-radius: 50%;
}
.fe-calendar-cell.is-out { opacity: .2; }
.fe-calendar-cell.is-today { border-color: var(--accent); }
.fe-calendar-cell.is-picked { background: var(--accent); color: var(--sq-paper); }
.fe-calendar-cell.has-entry::after,
.fe-calendar-cell.has-ticket::before {
  content: ""; position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent);
}
.fe-calendar-cell.has-entry::after { left: calc(50% + 2px); }
.fe-calendar-cell.has-ticket::before { left: calc(50% - 5px); opacity: .55; }
.fe-calendar-cell.is-picked::before, .fe-calendar-cell.is-picked::after { background: var(--sq-paper); }
.fe-chart { display: flex; align-items: flex-end; gap: 5px; height: 82px; padding-top: 8px; }
.fe-chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; font-size: 8px; opacity: .72; }
.fe-chart-bar i { display: block; width: 100%; height: calc(var(--h, 0) * 1%); min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.fe-chart-bar.is-today i { background: var(--ink); }
.fe-spark { width: 100%; height: 46px; display: block; overflow: visible; }
.fe-spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fe-spark-area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.fe-badge-strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.fe-badge-strip::-webkit-scrollbar { display: none; }
.fe-badge { flex: none; width: 62px; display: grid; justify-items: center; gap: 4px; font-size: 9px; opacity: .9; text-align: center; }
.fe-badge-icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--sq-paper-2) 66%, transparent); }
.fe-badge.is-locked { opacity: .3; filter: grayscale(1); }
.fe-postcard-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fe-postcard {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; padding: 0; min-height: 0;
  border: 1px solid var(--line); background: var(--sq-paper-3); text-align: left; border-radius: 0;
}
.fe-postcard img { width: 100%; height: 100%; object-fit: cover; }
.fe-postcard span {
  position: absolute; left: 7px; bottom: 7px; right: 7px;
  padding: 4px 7px; font-size: 9px; line-height: 1.4;
  background: color-mix(in srgb, var(--ink) 74%, transparent); color: var(--sq-paper);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fe-postcard.is-wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.fe-journal-entry {
  display: grid; gap: 6px; width: 100%; text-align: left; padding: 11px 0;
  border-bottom: 1px solid var(--line); border-radius: 0;
}
.fe-journal-entry:last-child { border-bottom: 0; }
.fe-journal-entry small { font-size: 9px; opacity: .6; }
.fe-journal-entry p { font-size: 13px; line-height: 1.7; }
.fe-journal-entry .fe-entry-thumb { width: 100%; max-height: 130px; object-fit: cover; border: 1px solid var(--line); }
.fe-entry-audio { width: 100%; height: 38px; }
.fe-entry-video { width: 100%; max-height: 240px; background: #000; border: 1px solid var(--line); }
.fe-journal-empty { font-size: 11px; line-height: 1.7; opacity: .62; padding: 10px 0; }
.fe-journal-add { align-self: flex-start; }

/* ---------- 6. 深色只给默认皮肤 ---------- */
/* 完成层 / 对话框挂在 .fe-app 外面，用的是根上的 --paper/--ink；这里同步一份。
   只绑 desk：其他皮肤的色板是它们自己的，不能被这条暗档盖掉。 */
html[data-theme="dark"][data-skin="desk"] {
  --paper: #171c1a; --paper-2: #1e2523; --paper-3: #262e2b;
  --ink: #ece7db; --line: rgba(236, 231, 219, .22);
  --sq-paper: #171c1a; --sq-paper-2: #1e2523; --sq-paper-3: #262e2b;
  --sq-ink: #ece7db; --sq-accent: #8fbfae; --sq-accent-2: #8fbfae;
  --sq-line: rgba(236, 231, 219, .22);
}
html[data-theme="dark"][data-skin="desk"] body.forms-only { background-color: #171c1a; color: #ece7db; }
html[data-theme="dark"][data-skin="desk"] body.forms-only::after { opacity: .35; }

/* ---------- 7. 导航收放 ---------- */
.fe-app[data-nav-collapsed="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 66px minmax(0, 1fr); }
.fe-app[data-nav-collapsed="1"] .fe-nav { display: none; }
.fe-app[data-nav-collapsed="1"] .fe-header,
.fe-app[data-nav-collapsed="1"] .fe-main { grid-column: 1; }
.fe-app[data-nav-collapsed="1"] .fe-main { grid-row: 2; }
.fe-nav-restore {
  position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9996; min-height: 36px; padding: 6px 12px; font-size: 11px;
  border: 1px solid var(--line); background: var(--sq-paper-2); color: var(--ink);
  box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
}

/* ---------- 8. 明信片详情 ---------- */
.fe-postcard-detail { display: grid; gap: 12px; min-height: 0; }
.fe-postcard-detail img { width: 100%; max-height: 58dvh; object-fit: contain; background: var(--sq-paper-3); border: 1px solid var(--line); }
.fe-postcard-detail p { font-size: 11px; line-height: 1.7; opacity: .72; }

/* ---------- 9. 小屏 ---------- */
@media (max-width: 700px) {
  .fe-app[data-form="desk"] .fe-desk-page { grid-template-rows: 30px auto minmax(0, 1fr) 26px; }
  .fe-locate-bar { min-height: 48px; padding: 7px 9px; gap: 9px; }
  .fe-locate-copy strong { font-size: 11px; }
  .fe-locate-copy small { font-size: 9px; }
  .fe-locate-bar .fe-btn { padding: 5px 8px; font-size: 10px; }
  .fe-journal-page { padding: 16px 0 20px; gap: 13px; }
  .fe-journal-hero h1 { font-size: 23px; }
  .fe-journal-stat strong { font-size: 19px; }
  .fe-locate-stage { width: min(240px, 70vw); }
}

@media (prefers-reduced-motion: reduce) {
  .fe-locate-radar::before, .fe-locate-dot, .fe-locate-stage .fe-locate-sweep { animation: none !important; }
}
