/* 指令卡(09-08):浮在输入栏上方的倒计时卡 + 他气泡下的摘要 + 她那条的结果胶囊。
   卡片和摘要固定用淡金色;超时用 --red。不写 hover(iOS 第一下轻触只算 hover)。 */
.cmd-line {
  --cmd-line-gold: #d8bd7e;
  --cmd-line-muted: #bca873;
  align-items: flex-start; gap: 9px;
  max-width: min(560px, calc(100% - 22px));
  color: var(--cmd-line-gold); text-align: left; line-height: 1.55;
  white-space: normal;
}
[data-theme="day"] .cmd-line {
  --cmd-line-gold: #a3813e;
  --cmd-line-muted: #aa9362;
}
.cmd-line > svg { margin-top: 3px; }
.cmd-line-copy { display: grid; min-width: 0; gap: 2px; }
.cmd-line-main { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.cmd-line-main b { font-weight: 650; }
.cmd-line-meta {
  color: var(--cmd-line-muted); font-size: 10.5px; line-height: 1.45;
  letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.cmd-line.done { color: var(--cmd-line-muted); opacity: .78; }
.cmd-line.over { color: var(--red, #c25454); opacity: 1; }
.cmd-line.over .cmd-line-meta { color: var(--red, #c25454); opacity: .82; }
.bubble .cmd-res { display: block; min-width: 0; max-width: 100%; margin: 6px 0 0; font-family: var(--serif); font-size: 11.5px; line-height: 1.65; letter-spacing: .06em; color: var(--gold); font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.bubble .cmd-res.no { color: var(--ink-faint); }

.cmd-float { position: fixed; left: 10px; right: 10px; z-index: 58; max-width: 640px; margin: 0 auto; box-sizing: border-box;
  background: var(--door); border-radius: 22px; padding: 10px 14px 12px 16px;
  box-shadow: 0 -6px 40px rgba(0,0,0,.22), 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent);
  transform: translateY(calc(100% + 40px)); visibility: hidden;
  transition: transform .38s cubic-bezier(.2,.8,.2,1), visibility 0s linear .38s, box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cmd-float.on { transform: none; visibility: visible; transition-delay: 0s; }
.cmd-float.over { box-shadow: 0 -6px 40px rgba(0,0,0,.22), 0 0 0 1px color-mix(in srgb, var(--red, #c25454) 45%, transparent); }

.cf-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.cf-eye { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 10.5px; letter-spacing: .18em; color: var(--gold); flex-shrink: 0; }
.cf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.cmd-float.over .cf-eye { color: var(--red, #c25454); }
.cmd-float.over .cf-dot { background: var(--red, #c25454); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red, #c25454) 22%, transparent); }
.cf-mini { display: none; flex: 1; min-width: 0; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-since { flex: 1; text-align: right; font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.cf-min { width: 28px; height: 28px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-dim); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: transform .25s ease; }
.cf-min:active { background: var(--press); }
.cmd-float.min .cf-min { transform: rotate(180deg); }

.cf-body { font-size: 16.5px; line-height: 1.45; color: var(--ink); margin: 6px 0 2px; word-break: break-word; }
.cf-time { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.cf-num { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.cf-lab { font-size: 12.5px; color: var(--ink-dim); letter-spacing: .08em; }
.cmd-float.over .cf-num, .cmd-float.over .cf-lab { color: var(--red, #c25454); }

.cf-bar { height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 10%, transparent); margin: 10px 0 12px; overflow: hidden; }
.cf-bar i { display: block; height: 100%; width: 100%; border-radius: 2px; background: var(--gold); transform-origin: left center; transform: scaleX(1); transition: transform .9s linear; will-change: transform; }
.cmd-float.over .cf-bar i { background: var(--red, #c25454); transition: none; }

.cf-acts { display: flex; gap: 10px; }
.cf-acts button { font: inherit; font-size: 14.5px; letter-spacing: .04em; border-radius: 999px; padding: 10px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cf-done { flex: 1.4; border: 0; background: var(--gold); color: var(--paper); font-weight: 600; }
.cf-done:active { filter: brightness(.9); }
.cf-cancel { flex: 1; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); background: transparent; color: var(--ink-dim); position: relative; overflow: hidden; }
.cf-cancel small { font-size: 10px; margin-left: 4px; color: var(--ink-faint); letter-spacing: .1em; }
.cf-cancel::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: color-mix(in srgb, var(--ink) 12%, transparent); transform: scaleX(0); transform-origin: left center; }
.cf-cancel.holding::after { transform: scaleX(1); transition: transform .65s linear; }

.cmd-float.min { padding: 8px 12px 8px 16px; }
.cmd-float.min .cf-body, .cmd-float.min .cf-time, .cmd-float.min .cf-bar, .cmd-float.min .cf-acts { display: none; }
.cmd-float.min .cf-mini { display: block; }
.cmd-float.min .cf-since { flex: 0 0 auto; }

/* Compact pale-gold note. Local palette stays gold even with rose wallpaper accents.
   Keep all existing timer/action hooks; leave the Clawd perch below the card clear. */
.cmd-float {
  --cmd-accent: #d8bd7e;
  --cmd-ink: #f1e7cf;
  --cmd-muted: #c4b596;
  --cmd-edge: rgba(223,198,140,.27);
  left: auto; right: max(14px, env(safe-area-inset-right));
  width: min(320px, calc(100% - 28px)); max-width: 320px;
  margin: 0 0 72px; padding: 14px 17px 12px;
  border: 1px solid var(--cmd-edge); border-radius: 24px;
  background: linear-gradient(145deg, #332e25, #28251f);
  box-shadow: 0 12px 32px rgba(25,20,12,.17), inset 0 1px rgba(255,240,205,.09);
}
[data-theme="day"] .cmd-float {
  --cmd-accent: #a3813e;
  --cmd-ink: #51432b;
  --cmd-muted: #8d7c60;
  --cmd-edge: rgba(190,158,91,.28);
  background: linear-gradient(145deg, #fffdf5, #f8efd9);
  box-shadow: 0 12px 32px rgba(103,80,35,.12), inset 0 1px rgba(255,255,255,.9);
}
.cmd-float .cf-head { gap: 7px; min-height: 26px; }
.cmd-float .cf-eye { color: var(--cmd-accent); font-size: 10px; }
.cmd-float .cf-dot { background: var(--cmd-accent); box-shadow: 0 0 0 3px rgba(194,160,83,.13); width: 5px; height: 5px; }
.cmd-float .cf-since { color: var(--cmd-muted); font-size: 10px; }
.cmd-float .cf-min { width: 32px; height: 32px; color: var(--cmd-muted); background: transparent; }
.cmd-float .cf-body { margin: 8px 0 9px; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--cmd-ink); max-height: 24dvh; overflow-y: auto; }
.cmd-float .cf-time { gap: 9px; }
.cmd-float .cf-num { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 34px; font-weight: 600; letter-spacing: -.04em; color: var(--cmd-ink); }
.cmd-float .cf-lab { color: var(--cmd-muted); font-size: 11px; }
.cmd-float .cf-bar { height: 3px; margin: 13px 0 7px; background: rgba(166,139,83,.16); }
.cmd-float .cf-bar i { background: linear-gradient(90deg, #b99a57, #e3cc90); }
.cmd-float .cf-acts { gap: 9px; }
.cmd-float .cf-acts button { min-height: 40px; padding: 7px 10px; font-size: 12px; }
.cmd-float .cf-done { flex: 1; background: rgba(194,160,83,.17); color: var(--cmd-ink); border: 1px solid var(--cmd-edge); font-weight: 600; }
.cmd-float .cf-cancel { flex: 1; border-color: transparent; color: var(--cmd-muted); }
.cmd-float .cf-cancel small { color: var(--cmd-muted); font-size: 9px; }
.cmd-float.min { width: min(222px, calc(100% - 28px)); padding: 7px 10px 7px 13px; border-radius: 19px; }
.cmd-float.min .cf-mini { color: var(--cmd-ink); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.cmd-float.min .cf-since { display: none; }
.cmd-float.over { border-color: rgba(191,112,79,.48); box-shadow: 0 12px 32px rgba(103,62,35,.14); }
.cmd-float.over .cf-num, .cmd-float.over .cf-lab, .cmd-float.over .cf-eye { color: #c77f5c; }
[data-theme="day"] .cmd-float.over .cf-num,
[data-theme="day"] .cmd-float.over .cf-lab,
[data-theme="day"] .cmd-float.over .cf-eye { color: #ab6344; }
.cmd-float.over .cf-dot, .cmd-float.over .cf-bar i { background: #c77f5c; }
@media (prefers-reduced-motion: reduce) {
  .cmd-float, .cmd-float .cf-min, .cmd-float .cf-bar i { transition: none; }
}
