/* =========================================================================
   Components — cards, chat, controls.  Shared by M0 mockups and M1 console.
   glass v2: every surface is a translucent material over the ambient wallpaper.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body {
  margin: 0; background: transparent; color: var(--text); position: relative; isolation: isolate;
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
/* ambient wallpaper — fixed behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--ambient); background-color: var(--bg); pointer-events: none; }

/* ---------- materials ----------
   regular: cards, bubbles, receipts      thick: rail, drawer, composer      notify: toast
   Each = translucent fill + top sheen + backdrop blur/saturate + 1px gradient rim (bright top, faint bottom) + soft tinted shadow. */
.glass, .card, .receipt, .bubble, .suggest, .notify, .composer, .liveview, .dev-row, .glass-thick {
  position: relative;
  background-color: var(--mat-regular); background-image: var(--sheen);
  -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur);
  box-shadow: var(--shadow-card), var(--inner-hi);
}
.composer, .liveview, .glass-thick { background-color: var(--mat-thick); -webkit-backdrop-filter: var(--mat-blur-thick); backdrop-filter: var(--mat-blur-thick); }
.glass::after, .card::after, .receipt::after, .bubble::after, .notify::after, .composer::after, .liveview::after, .dev-row::after, .glass-thick::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px;
      stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic--sm { width: 14px; height: 14px; vertical-align: -2px; }
.ic--xs { width: 12px; height: 12px; stroke-width: 2; vertical-align: -1px; }
.ic--lg { width: 20px; height: 20px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.spacer { flex: 1; }

/* ---------- app icons (official-ish marks, simplified) ---------- */
.appicon { width: 20px; height: 20px; border-radius: 5px; flex: none; display: inline-grid; place-items: center; overflow: hidden; }
.appicon svg { width: 100%; height: 100%; display: block; }
.appicon--round { border-radius: 50%; }

/* ---------- chips / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
        border-radius: var(--r-chip); font-size: var(--fs-micro); font-weight: 550; letter-spacing: .01em; white-space: nowrap; }
.pill--accent { background: color-mix(in srgb, var(--accent) 14%, var(--pill-base)); color: var(--accent-text); }
.pill--ok { background: color-mix(in srgb, var(--ok-fill) 16%, var(--pill-base)); color: var(--ok); }
.pill--warn { background: color-mix(in srgb, #FF9500 16%, var(--pill-base)); color: var(--warn); }
.pill--danger { background: color-mix(in srgb, var(--danger-fill) 13%, var(--pill-base)); color: var(--danger); }
.pill--neutral { background: var(--surface-3); color: var(--text-2); }
.pill { box-shadow: inset 0 0 0 .5px color-mix(in srgb, currentColor 14%, transparent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot--ok { color: var(--ok); } .dot--off { color: var(--text-4); } .dot--accent { color: var(--accent); }
.dot--live { color: var(--accent); box-shadow: 0 0 0 0 currentColor; animation: pulse 1.6s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); }
                   100% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 0%, transparent); } }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 4px;
        border-radius: var(--r-chip); background: var(--ctl-fill); box-shadow: 0 0 0 .5px var(--line-strong) inset, var(--inner-hi);
        font-size: 12.5px; color: var(--text); white-space: nowrap; max-width: 100%; }
.chip .sub { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.chip--plain { padding: 0 11px; }
.avatar { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
          font-size: 10.5px; font-weight: 650; color: #fff; letter-spacing: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 .5px rgba(0,0,0,.08); }
.avatar--lg { width: 32px; height: 32px; font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px;
       border-radius: 999px; border: 0; font-size: 13.5px; font-weight: 590; white-space: nowrap; letter-spacing: -0.005em;
       transition: background-color var(--t-fast) var(--ease-out), transform 260ms var(--ease-spring), box-shadow var(--t-fast), filter var(--t-fast); }
.btn:active { transform: scale(0.96); }
.btn--primary { background: var(--accent-grad); color: var(--on-accent);
                box-shadow: inset 0 1px 0 rgba(255,255,255,.30), inset 0 0 0 .5px rgba(0,40,120,.18), var(--accent-glow); }
.btn--primary:hover { filter: brightness(1.06) saturate(1.05); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--soft { background: var(--ctl-fill); color: var(--text); box-shadow: 0 0 0 .5px var(--line-strong), var(--inner-hi), var(--shadow-btn);
             -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
.btn--soft:hover { background: var(--ctl-fill-hover); }
.btn--accent-soft { background: var(--accent-soft); color: var(--accent-text); }
.btn--sm { height: 30px; padding: 0 13px; font-size: 13px; }
.btn--icon { width: 34px; padding: 0; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 13px; font-weight: 520; white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- toggle ---------- */
.toggle { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); flex: none; box-shadow: inset 0 0 0 .5px var(--line);
          transition: background-color var(--t-base) var(--ease-out); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
                 background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 0 0 .5px rgba(0,0,0,.05);
                 transition: transform var(--t-base) var(--ease-spring); }
.toggle.on { background: var(--accent); box-shadow: inset 0 0 0 .5px rgba(0,40,120,.15); }
.toggle.on::after { transform: translateX(16px); }
.toggle.disabled { opacity: .45; }

/* ---------- card base ---------- */
.card { border-radius: var(--r-card); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; font-size: 13px; font-weight: 520; color: var(--text-2); min-height: 34px; }
.card__head .title { color: var(--text); font-size: var(--fs-title); font-weight: 620; letter-spacing: -0.005em; }
.card__body { padding: 12px 18px 18px; }
.card__foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px 14px; border-top: .5px solid var(--line-strong); font-size: var(--fs-meta); color: var(--text-3); }
.inset { background: var(--inset-fill); border-radius: var(--r-inner); box-shadow: 0 0 0 .5px var(--line) inset, var(--inner-hi); }
.label { font-size: var(--fs-micro); font-weight: 600; color: var(--text-3); letter-spacing: .04em; }
.enter { animation: enter 420ms var(--ease-spring) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- 1 · proactive reminder (glass, floating) ---------- */
.notify { width: 364px; padding: 14px 16px 14px 14px; border-radius: 24px; display: grid; grid-template-columns: 36px 1fr; gap: 12px;
          background-color: var(--mat-notify); -webkit-backdrop-filter: var(--mat-blur-notify); backdrop-filter: var(--mat-blur-notify);
          box-shadow: var(--shadow-float), var(--inner-hi); }
.notify__mark { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(0,40,120,.35); }
.notify__top { display: flex; align-items: baseline; gap: 8px; }
.notify__title { font-size: 14.5px; font-weight: 640; letter-spacing: -0.005em; line-height: 1.35; }
.notify__time { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.notify__body { margin-top: 3px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.notify__actions { display: flex; gap: 8px; margin-top: 12px; }
.notify__actions .btn { height: 30px; font-size: 13px; }
.notify__actions .btn--soft { background: var(--ctl-fill); }
.notify.is-entering { animation: notifyIn 380ms var(--ease-spring) both; }
@keyframes notifyIn { from { opacity: 0; transform: translateY(-14px) scale(.97); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* in-chat (solid) reminder */
.remind { padding: 16px 18px; display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.remind__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 .5px var(--accent-soft-2), var(--inner-hi); }
.remind__eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); font-weight: 520; }
.remind__title { margin-top: 2px; font-size: var(--fs-title); font-weight: 630; line-height: 1.4; }
.remind__body { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.remind__evidence { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.remind__actions { margin-top: 14px; display: flex; gap: 8px; align-items: center; }

/* ---------- 2 · confirm card ---------- */
.confirm { padding: 6px; }
.confirm .card__head { padding: 10px 12px 10px; min-height: 0; }
.confirm__panel { padding: 16px 16px 14px; position: relative; overflow: hidden; }
.confirm__panel::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; border-radius: 0 0 2px 2px;
                          background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent)); opacity: .85; }
.confirm__object { font-size: 16.5px; font-weight: 640; letter-spacing: -0.01em; line-height: 1.35; }
.confirm__rows { margin-top: 12px; display: grid; gap: 10px; }
.confirm__row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; font-size: 13.5px; }
.confirm__row > .label { letter-spacing: .02em; }
.diff { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.diff__old { color: var(--text-3); }
.diff__arrow { color: var(--accent); }
.diff__new { color: var(--accent-text); font-weight: 620; }
.meta-row { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.confirm__actions { display: flex; align-items: center; gap: 8px; padding: 8px 6px 4px 6px; }
.edit { flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
        background: var(--field-fill); box-shadow: 0 0 0 .5px var(--line-strong) inset, inset 0 1px 2px rgba(0,0,0,.05); color: var(--text-3); font-size: 13.5px; min-width: 0;
        transition: box-shadow var(--t-fast); }
.edit input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.edit input::placeholder { color: var(--text-3); }
.edit:focus-within { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 0 4px var(--accent-soft); }
.quote { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--field-fill); box-shadow: 0 0 0 .5px var(--line) inset;
         font-size: 13px; color: var(--text-2); line-height: 1.6; }
.file { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 6px; border-radius: 9px;
        background: var(--ctl-fill); box-shadow: 0 0 0 .5px var(--line-strong) inset, var(--inner-hi); font-size: 12.5px; }
.file__badge { height: 18px; padding: 0 5px; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-size: 10px; font-weight: 700; display: grid; place-items: center; letter-spacing: .03em; }
.amount { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.amount__v { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.amount__u { font-size: 13px; color: var(--text-3); }

/* collapse confirm → receipt (grid-row trick, ≤250ms) */
.swap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t-slow) var(--ease-out), opacity var(--t-base) var(--ease-out); }
.swap > * { overflow: hidden; min-height: 0; }
.swap.is-gone { grid-template-rows: 0fr; opacity: 0; }

/* ---------- 3 · receipt ---------- */
.receipt { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 18px; max-width: 100%; }
.receipt__icon { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--inset-fill); color: var(--text-2); flex: none;
                 box-shadow: inset 0 0 0 .5px var(--line-strong), var(--inner-hi); }
.receipt__check { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-fill); color: #fff;
                  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 2px 4px rgba(20,120,50,.3); }
.receipt__check .ic { width: 10px; height: 10px; stroke-width: 3; vertical-align: 0; }
.receipt__title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.receipt__sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.receipt .link { margin-left: 18px; }
.receipt.is-entering { animation: receiptIn var(--t-slow) var(--ease-out) both; }
@keyframes receiptIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 4 · task progress ---------- */
.task { overflow: hidden; }
.task__bar { height: 3px; background: var(--surface-3); position: relative; overflow: hidden; margin: 0 18px; border-radius: 0 0 3px 3px; }
.task__bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); box-shadow: 0 0 8px var(--accent); border-radius: 0 3px 3px 0; transition: width 400ms var(--ease-out), background-color var(--t-slow); }
.task.is-done .task__bar > i { background: var(--ok-fill); box-shadow: 0 0 8px var(--ok-fill); }
.task.is-stopped .task__bar > i { background: var(--text-4); box-shadow: none; }
.task__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.task__name { font-size: var(--fs-title); font-weight: 630; letter-spacing: -0.005em; }
.task__state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-text);
               transition: color var(--t-slow); }
.task.is-done .task__state { color: var(--ok); }
.task__toggle { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.task__toggle:hover { background: var(--surface-3); }
.task__toggle .ic { transition: transform var(--t-base) var(--ease-out); }
.task.is-collapsed .task__toggle .ic { transform: rotate(-90deg); }
.steps { list-style: none; margin: 0; padding: 6px 18px 4px; display: grid; gap: 0; }
.step { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; min-height: 32px; font-size: 13.5px;
        color: var(--text-3); transition: color var(--t-base) var(--ease-out); }
.step::before { content: ""; position: absolute; left: 10.5px; top: 28px; bottom: -4px; width: 1px; background: var(--line-strong); }
.step:last-child::before { display: none; }
.step__ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: transparent; position: relative; z-index: 1; color: var(--text-3); }
.step__ic .ic { width: 14px; height: 14px; }
.step__t { font-size: 12px; color: var(--text-3); }
.step.is-done .step__ic { color: var(--text-3); }
.step.is-now { color: var(--text); font-weight: 520; }
.step.is-now .step__ic { color: var(--accent); }
.step.is-todo { color: var(--text-4); }
.step.is-todo .step__ic::after { content: ""; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--text-4) inset; }
.shimmer { background: linear-gradient(90deg, var(--text) 0%, var(--text) 40%, var(--text-3) 50%, var(--text) 60%, var(--text) 100%);
           background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.8px solid var(--accent-soft-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.task__live { margin: 8px 12px 12px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 540; box-shadow: inset 0 0 0 .5px var(--accent-soft-2); }
.task__live .btn { height: 28px; padding: 0 11px; font-size: 12px; background: var(--ctl-fill) !important; }
.task__summary { display: flex; align-items: center; gap: 8px; padding: 2px 18px 0; font-size: 13px; color: var(--text-3); }
.task__done { margin: 10px 12px 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--ok-fill) 25%, transparent); }
.task__done .link { margin-left: auto; color: var(--ok); }

/* ---------- 5 · data card ---------- */
.stats { display: grid; grid-template-columns: 172px 1fr; gap: 0; padding: 6px 18px 16px; }
.stats__big { padding: 8px 18px 4px 0; border-right: .5px solid var(--line-strong); display: flex; flex-direction: column; }
.stats__v { font-size: 52px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin-top: 14px; color: var(--text); }
.stats__v small { font-size: 15px; font-weight: 550; letter-spacing: 0; margin-left: 4px; color: var(--text-3); }
.stats__delta { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--accent-text); line-height: 1.4; }
.stats__note { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding-left: 18px; }
.bar { display: grid; grid-template-rows: auto 112px auto; gap: 8px; text-align: left; }
.bar__day { font-size: 11px; color: var(--text-3); font-weight: 560; letter-spacing: .02em; padding-bottom: 6px; border-bottom: .5px solid var(--line-strong); white-space: nowrap; }
.bar__day b { color: var(--text-2); font-weight: 600; }
.bar__col { display: flex; align-items: flex-end; }
.bar__fill { width: 100%; border-radius: 8px; transform-origin: bottom; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
             background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 70%, transparent) 0%, color-mix(in srgb, var(--accent) 22%, transparent) 70%, color-mix(in srgb, var(--accent) 10%, transparent) 100%);
             animation: grow 900ms var(--ease-out) both; }
.bar.is-today .bar__fill { background: radial-gradient(120% 90% at 50% 100%, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, transparent) 75%, color-mix(in srgb, var(--accent) 30%, transparent) 100%); }
.bar__v { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.bar.is-today .bar__v { color: var(--accent-text); }
@keyframes grow { from { transform: scaleY(0.02); opacity: .3; } to { transform: none; opacity: 1; } }
.split { margin: 0 18px 16px; }
.split__track { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.split__track > i { display: block; height: 100%; }
.split__legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.split__legend span { display: inline-flex; align-items: center; gap: 6px; }
.split__legend b { color: var(--text); font-weight: 600; }
.sw { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- 6 · result list ---------- */
.results { list-style: none; margin: 0; padding: 4px 8px 6px; }
.result { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 11px 10px; border-radius: 12px; }
.result + .result { box-shadow: 0 -.5px 0 var(--line-strong); border-top-left-radius: 0; border-top-right-radius: 0; }
.result.is-best { background: var(--accent-soft); box-shadow: inset 0 0 0 .5px var(--accent-soft-2); }
.result.is-best + .result { box-shadow: none; }
.result__logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 750; color: #fff; letter-spacing: .02em;
                box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 0 .5px rgba(0,0,0,.12), 0 2px 6px -2px rgba(0,0,0,.25); }
.result__name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.result__sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.result__right { text-align: right; }
.result__price { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.result.is-miss .result__name, .result.is-miss .result__price { color: var(--text-3); font-weight: 500; }
.result.is-miss .result__logo { filter: grayscale(1); opacity: .45; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }

/* ---------- 7 · call ---------- */
.call__done { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 4px; font-size: 13.5px; }
.call__done + .call__done { border-top: .5px solid var(--line-strong); }
.call__now { margin-top: 8px; display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 14px 14px 16px; border-radius: 14px;
             background: var(--inset-fill); box-shadow: 0 0 0 .5px var(--line) inset, var(--inner-hi); }
.call__who { font-size: 15px; font-weight: 620; }
.call__timer { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 34px; }
.wave i { width: 2.5px; border-radius: 2px; background: var(--accent); opacity: .85; animation: wave 1.1s var(--ease-out) infinite alternate; }
@keyframes wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.hangup { width: 40px; height: 40px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #FF6259, var(--danger-fill)); color: #fff; display: grid; place-items: center;
          box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px -6px color-mix(in srgb, var(--danger-fill) 75%, transparent); transition: transform var(--t-fast) var(--ease-out); }
.hangup:hover { transform: scale(1.06); }
.hangup .ic { transform: rotate(135deg); width: 18px; height: 18px; }

/* ---------- 8 · devices ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 .5px var(--line); }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-size: 12.5px; color: var(--text-2); font-weight: 560; }
.seg button.on { background: var(--seg-on); color: var(--text); box-shadow: 0 2px 6px -1px rgba(20,30,60,.14), 0 0 0 .5px var(--line), var(--inner-hi); }
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px 18px; }
.device { padding: 14px; border-radius: 16px; background: var(--inset-fill); box-shadow: 0 0 0 .5px var(--line) inset, var(--inner-hi); display: grid; gap: 12px;
          transition: background-color var(--t-base) var(--ease-out); }
.device.is-on { background: var(--ctl-fill-hover); box-shadow: 0 0 0 .5px var(--line-strong) inset, var(--inner-hi), 0 6px 16px -8px rgba(30,40,80,.18); }
.device__top { display: flex; align-items: center; gap: 10px; }
.device__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); box-shadow: var(--inner-hi); }
.device.is-on .device__ic { background: var(--accent-soft); color: var(--accent-text); }
.device__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.device__room { font-size: 12px; color: var(--text-3); }
.device__bottom { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.device__state { display: inline-flex; align-items: center; gap: 6px; }
.device.is-offline { opacity: .72; }
.device__val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }

/* ---------- 9 · summary ---------- */
.sum { padding: 4px 18px 6px; }
.sum__sec { padding: 12px 0; }
.sum__sec + .sum__sec { border-top: .5px solid var(--line-strong); }
.sum__h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sum__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sum__list li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: start; font-size: 14px; line-height: 1.5; }
.sum__list li > .ic { margin-top: 3px; color: var(--ok); }
.check { width: 16px; height: 16px; margin-top: 3px; border-radius: 5px; box-shadow: 0 0 0 1.5px var(--line-strong) inset; display: grid; place-items: center; }
.check.on { background: var(--accent); box-shadow: none; color: #fff; }
.todo-meta { font-size: 12px; color: var(--text-3); white-space: nowrap; margin-top: 2px; }
.memory { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--inset-fill); box-shadow: 0 0 0 .5px var(--line) inset, var(--inner-hi); font-size: 13.5px; color: var(--text-2); }
.memory .ic { margin-top: 3px; color: var(--accent-text); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 0; }

/* ---------- 10 · action log ---------- */
.log { list-style: none; margin: 0; padding: 6px 8px 4px; }
.log__row { display: grid; grid-template-columns: 46px 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; }
.log__row + .log__row { box-shadow: 0 -.5px 0 var(--line-strong); border-radius: 0; }
.log__time { color: var(--text-3); font-size: 12.5px; }
.log__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); box-shadow: var(--inner-hi); }
.log__ic .ic { width: 14px; height: 14px; }
.log__ic.ok { background: var(--ok-soft); color: var(--ok); }
.log__ic.bad { background: var(--danger-soft); color: var(--danger); }
.log__what { min-width: 0; }
.log__what b { font-weight: 600; }
.log__what .sub { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log__who { font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.log__who .faint { display: block; font-size: 11.5px; }

/* ---------- blocked (red line) ---------- */
.blocked { padding: 16px 18px; display: grid; grid-template-columns: 34px 1fr; gap: 12px;
           background-image: linear-gradient(180deg, color-mix(in srgb, var(--danger-fill) 7%, transparent), transparent 60%), var(--sheen);
           box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger-fill) 26%, transparent), var(--shadow-card), var(--inner-hi); }
.blocked__ic { width: 34px; height: 34px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; }
.blocked__title { font-size: var(--fs-title); font-weight: 640; }
.blocked__body { margin-top: 4px; color: var(--text-2); font-size: 14px; }

/* ---------- voice bubble ---------- */
.voice { display: grid; gap: 8px; }
.voice__pill { display: flex; align-items: center; gap: 10px; }
.voice__play { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--surface); flex: none; }
.voice__wave { display: flex; align-items: center; gap: 2px; height: 22px; }
.voice__wave i { width: 2.5px; border-radius: 2px; background: currentColor; opacity: .55; }
.voice__wave i.p { opacity: 1; }
.voice__len { font-size: 12px; color: var(--text-3); }
.voice__text { font-size: 14px; color: var(--text); }

/* ---------- chat ---------- */
.msg-user { display: flex; justify-content: flex-end; }
.bubble { max-width: 78%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-size: var(--fs-chat); line-height: 1.55; }
.msg-ai { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.msg-ai__mark { width: 22px; height: 22px; border-radius: 7px; margin-top: 1px; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(0,40,120,.35); }
.msg-ai__body { display: grid; gap: 12px; min-width: 0; }
.prose { font-size: var(--fs-chat); line-height: 1.7; color: var(--text); }
.prose p { margin: 0; }
.prose p + p { margin-top: 8px; }
.prose b { font-weight: 620; }
.thinking { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); }
.thinking .sq { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); animation: think 1.2s ease-in-out infinite; }
@keyframes think { 50% { transform: scale(.6) rotate(45deg); opacity: .5; } }
.suggests { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; font-size: 13px; color: var(--text); font-weight: 520;
           background-color: var(--ctl-fill); box-shadow: 0 0 0 .5px var(--line-strong), var(--inner-hi), var(--shadow-btn);
           -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); transition: background-color var(--t-fast), transform 260ms var(--ease-spring); }
.suggest:hover { background-color: var(--ctl-fill-hover); }
.suggest:active { transform: scale(.96); }
.msg-tools { display: flex; gap: 2px; color: var(--text-3); }
.msg-tools button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; }

.composer { border-radius: 26px; box-shadow: var(--shadow-raise), var(--inner-hi); padding: 14px 12px 10px 20px; }
.composer__input { font-size: 15px; color: var(--text-3); min-height: 24px; }
.composer__row { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.composer__btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; transition: background-color var(--t-fast); }
.composer__btn:hover { background: var(--surface-3); }
.composer__send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent-grad); color: #fff; display: grid; place-items: center;
                  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), var(--accent-glow); transition: transform 260ms var(--ease-spring); }
.composer__send:active { transform: scale(.92); }
.composer__send.is-empty { background: var(--surface-3); color: var(--text-3); box-shadow: inset 0 0 0 .5px var(--line); }

/* solid fallback: drop blur, keep the fills (tokens switch to opaque) */
@media (prefers-reduced-transparency: reduce) {
  .glass, .card, .receipt, .bubble, .suggest, .notify, .composer, .liveview, .dev-row, .glass-thick, .btn--soft { -webkit-backdrop-filter: none; backdrop-filter: none; background-image: none; }
  body::before { background: var(--bg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* narrow containers (phone, side panels) */
.msg-ai { grid-template-columns: 22px minmax(0, 1fr); }
.confirm { container-type: inline-size; }
@container (max-width: 440px) {
  .confirm__actions { flex-wrap: wrap; }
  .confirm__actions .edit { flex-basis: 100%; }
  .confirm__actions .btn { flex: 1; }
  .confirm__row { grid-template-columns: 48px minmax(0, 1fr); }
}
