/* MessageMediator UI v2 (redesign 2026-10-15). Everything is scoped under html[data-ui="v2"]:
   with the flag off this file changes nothing. Tokens = redesign-mock/design-tokens.css. */

/* ================= tokens (light) + classic token remap ================= */
:root[data-ui="v2"] {
  --brand-navy: #18244F; --brand-teal: #4A8BAE; --brand-violet: #6B65B8;
  --grad-brand: linear-gradient(135deg, #4A8BAE 0%, #6B65B8 100%);
  --grad-action: linear-gradient(135deg, #336F92 0%, #5D57AB 100%);
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: .75rem; --text-sm: .875rem; --text-base: 1rem; --text-md: 1.125rem; --text-lg: 1.375rem; --text-xl: 1.75rem; --text-2xl: 2.25rem;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 22px; --radius-xl: 28px; --touch: 44px;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --dur-1: 160ms; --dur-2: 280ms; --dur-3: 520ms;
  --sidebar-w: 272px;

  color-scheme: light;
  --surface: #FFFFFF; --surface-glass: rgba(255, 255, 255, .74); --surface-2: #EEF0F8; --surface-3: #E4E7F3;
  --line-strong: rgba(24, 36, 79, .18);
  --ink-2: #434B6B; --ink-3: #5A6280; --accent-text: #2D6889; --violet-text: #5550A6;
  --success: #17704D; --success-bg: #E2F3EA; --warning: #855400; --warning-bg: #FFF2D6; --danger: #A9203A; --danger-bg: #FCE7EB;
  --ins-bg: #DDF2E7; --ins-ink: #11573A; --del-bg: #FBE3E8; --del-ink: #8C1A30;
  --focus: #6B65B8; --tint: linear-gradient(135deg, rgba(74,139,174,.14), rgba(107,101,184,.17));
  --aura-1: rgba(74, 139, 174, .18); --aura-2: rgba(107, 101, 184, .18);
  --shadow-1: 0 1px 2px rgba(20, 27, 58, .04), 0 8px 24px -12px rgba(20, 27, 58, .14);
  --shadow-2: 0 2px 6px rgba(20, 27, 58, .05), 0 24px 48px -24px rgba(20, 27, 58, .28);
  --shadow-glow: 0 12px 30px -10px rgba(93, 87, 171, .55);

  /* classic names, remapped so every existing view picks up the new look */
  --bg: #F5F6FB; --bg2: var(--surface-2); --card: var(--surface); --ink: #141B3A; --ink2: var(--ink-2); --mut: var(--ink-3);
  --line: rgba(24, 36, 79, .10); --navy: var(--violet-text); --navy2: #0B1022; --accent: var(--violet-text); --accent2: #ECEBFA;
  --ok: var(--success); --ok-bg: var(--success-bg); --warn: var(--warning); --warn-bg: var(--warning-bg); --bad: var(--danger); --bad-bg: var(--danger-bg);
  --info-bg: #ECEBFA; --shadow: var(--shadow-1); --radius: var(--radius-lg);
  --sans: var(--font-sans); --serif: var(--font-display);
}
/* ================= dark ================= */
@media (prefers-color-scheme: dark) {
  :root[data-ui="v2"]:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #121933; --surface-glass: rgba(21, 29, 60, .66); --surface-2: #1A2246; --surface-3: #232C55; --line-strong: rgba(255, 255, 255, .16);
    --ink-2: #C3C8DF; --ink-3: #9CA3C2; --accent-text: #8CC6E0; --violet-text: #B0ABF2;
    --success: #6BD8A8; --success-bg: rgba(107, 216, 168, .13); --warning: #F3C46B; --warning-bg: rgba(243, 196, 107, .13); --danger: #FF94A8; --danger-bg: rgba(255, 148, 168, .13);
    --ins-bg: rgba(107, 216, 168, .16); --ins-ink: #9BE8C4; --del-bg: rgba(255, 148, 168, .16); --del-ink: #FFB3C1; --focus: #B0ABF2;
    --aura-1: rgba(74, 139, 174, .22); --aura-2: rgba(107, 101, 184, .26); --tint: linear-gradient(135deg, rgba(74,139,174,.22), rgba(107,101,184,.26));
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-2: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 56px -24px rgba(0, 0, 0, .7);
    --shadow-glow: 0 12px 32px -10px rgba(107, 101, 184, .6);
    --bg: #0A0F21; --ink: #EEF0FA; --line: rgba(255, 255, 255, .09); --accent2: #232A55; --info-bg: #232A55;
  }
}
:root[data-ui="v2"][data-theme="dark"] {
  color-scheme: dark;
  --surface: #121933; --surface-glass: rgba(21, 29, 60, .66); --surface-2: #1A2246; --surface-3: #232C55; --line-strong: rgba(255, 255, 255, .16);
  --ink-2: #C3C8DF; --ink-3: #9CA3C2; --accent-text: #8CC6E0; --violet-text: #B0ABF2;
  --success: #6BD8A8; --success-bg: rgba(107, 216, 168, .13); --warning: #F3C46B; --warning-bg: rgba(243, 196, 107, .13); --danger: #FF94A8; --danger-bg: rgba(255, 148, 168, .13);
  --ins-bg: rgba(107, 216, 168, .16); --ins-ink: #9BE8C4; --del-bg: rgba(255, 148, 168, .16); --del-ink: #FFB3C1; --focus: #B0ABF2;
  --aura-1: rgba(74, 139, 174, .22); --aura-2: rgba(107, 101, 184, .26); --tint: linear-gradient(135deg, rgba(74,139,174,.22), rgba(107,101,184,.26));
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-2: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 56px -24px rgba(0, 0, 0, .7);
  --shadow-glow: 0 12px 32px -10px rgba(107, 101, 184, .6);
  --bg: #0A0F21; --ink: #EEF0FA; --line: rgba(255, 255, 255, .09); --accent2: #232A55; --info-bg: #232A55;
}

/* ================= base ================= */
[data-ui="v2"] body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
[data-ui="v2"] body::before {   /* soft brand aura */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 60vmax at 0% 0%, var(--aura-1), transparent 60%), radial-gradient(60vmax 60vmax at 100% 100%, var(--aura-2), transparent 60%);
}
[data-ui="v2"] h1, [data-ui="v2"] h2, [data-ui="v2"] h3 { font-family: var(--font-display); font-weight: 750; letter-spacing: -.02em; color: var(--ink); }
[data-ui="v2"] h4 { font-family: var(--font-display); }
[data-ui="v2"] :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[data-ui="v2"] .note, [data-ui="v2"] .mut { color: var(--ink-3); }
[data-ui="v2"] .ptitle { margin-bottom: var(--space-6); }
[data-ui="v2"] .ptitle h1 { font-size: clamp(1.6rem, 4vw, var(--text-2xl)); line-height: 1.15; }

/* ================= shell ================= */
[data-ui="v2"] .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
[data-ui="v2"] .side {
  background: var(--surface-glass); border-right: 1px solid var(--line); padding: var(--space-6) var(--space-4) var(--space-4);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); overflow-y: auto; scrollbar-width: thin; gap: 2px; padding-bottom: 84px;
}
.v2-brand { display: flex; align-items: center; gap: 10px; min-height: var(--touch); padding: 0 var(--space-2); text-decoration: none; color: var(--ink); }
.v2-brand img { width: 40px; height: 30px; object-fit: contain; }
.v2-word { font-family: var(--font-display); font-weight: 750; font-size: 1.06rem; letter-spacing: -.015em; white-space: nowrap; color: var(--ink); }
.v2-word span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-ui="v2"] .side > .v2-brand { margin-bottom: var(--space-5); }
.v2-nav { display: grid; gap: 2px; }
.v2-tab, .v2-grp > summary {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: var(--touch); padding: 0 14px; border-radius: var(--radius-md);
  color: var(--ink-2); font-weight: 550; text-decoration: none; cursor: pointer; list-style: none;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.v2-grp > summary::-webkit-details-marker { display: none; }
[data-ui="v2"] details.v2-grp { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
[data-ui="v2"] .v2-grp > summary, [data-ui="v2"] .v2-sec > summary { padding-top: 0; padding-bottom: 0; font-weight: inherit; }
[data-ui="v2"] .v2-grp > summary::after, [data-ui="v2"] .v2-sec > summary::after { content: none; }
[data-ui="v2"] details.v2-sec { margin-bottom: 0; }
.v2-tab:hover, .v2-grp > summary:hover { background: var(--surface-2); color: var(--ink); }
.v2-tab.on { background: var(--tint); color: var(--ink); font-weight: 650; }
.v2-tab.on::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad-brand); }
.v2-tab.on svg { color: var(--violet-text); }
.v2-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.v2-ic.sm { width: 18px; height: 18px; }
.v2-cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--grad-action); color: #fff; font-size: var(--text-xs); font-weight: 750; display: inline-grid; place-items: center; }
.v2-navlabel { font-size: var(--text-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: var(--space-4) 14px var(--space-2); }
.v2-grp .chev { margin-left: auto; transition: transform var(--dur-2) var(--ease-out); }
.v2-grp[open] .chev { transform: rotate(90deg); }
.v2-grp .v2-subs { display: grid; gap: 2px; padding: 2px 0 var(--space-2) 34px; }
.v2-sub { display: flex; align-items: center; min-height: var(--touch); padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-size: var(--text-sm); font-weight: 550; text-decoration: none; }
.v2-sub:hover { background: var(--surface-2); color: var(--ink); }
.v2-sub.on { color: var(--ink); background: var(--tint); font-weight: 650; }
.v2-foot { margin-top: auto; padding-top: var(--space-6); display: grid; gap: var(--space-3); }
.v2-credits { display: block; padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--tint); color: var(--ink); text-decoration: none; }
.v2-credits .r { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-sm); color: var(--ink-2); font-weight: 600; }
.v2-credits strong { display: block; font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: -.02em; }
.v2-credits small { font-size: var(--text-xs); color: var(--ink-3); }
.v2-row { display: flex; gap: var(--space-2); align-items: center; }
.v2-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-glass); color: var(--ink-2); font: 600 var(--text-sm) var(--font-sans); text-decoration: none; cursor: pointer; position: relative; flex: 1; justify-content: center; }
.v2-pill:hover { background: var(--surface); color: var(--ink); }
.v2-pill .v2-dot { position: static; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--grad-action); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.v2-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.v2-me:hover { background: var(--surface-2); }
.v2-me b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--text-sm); }
.v2-me small { display: block; color: var(--ink-3); font-size: var(--text-xs); }
.v2-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 750; font-size: var(--text-sm); background: linear-gradient(135deg, var(--h1, #4A8BAE), var(--h2, #6B65B8)); }
.v2-iconbtn { position: relative; width: var(--touch); height: var(--touch); flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-glass); color: var(--ink-2); cursor: pointer; text-decoration: none; padding: 0; }
.v2-iconbtn:hover { background: var(--surface); color: var(--ink); }
.v2-iconbtn .v2-dot { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--grad-action); color: #fff; font-size: 11px; font-weight: 750; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.v2-sun { display: none; }
:root[data-ui="v2"][data-theme="dark"] .v2-sun { display: block; } :root[data-ui="v2"][data-theme="dark"] .v2-moon { display: none; }
@media (prefers-color-scheme: dark) { :root[data-ui="v2"]:not([data-theme="light"]) .v2-sun { display: block; } :root[data-ui="v2"]:not([data-theme="light"]) .v2-moon { display: none; } }

[data-ui="v2"] .mainp { max-width: 1120px; padding: 32px clamp(20px, 4vw, 56px) 96px; }
[data-ui="v2"] .mainp > * { animation: v2rise var(--dur-3) var(--ease-out) both; }
@keyframes v2rise { from { opacity: 0; transform: translateY(10px); } }

/* phone: header + bottom tab bar */
@media (max-width: 860px) {
  [data-ui="v2"] .shell { grid-template-columns: minmax(0, 1fr); }
  [data-ui="v2"] .mtop { gap: var(--space-2); padding: 8px 12px 8px 16px; background: var(--surface-glass); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); }
  [data-ui="v2"] .mtop .v2-brand { margin-right: auto; padding: 0; min-width: 0; }
  [data-ui="v2"] .mtop .v2-brand img { width: 34px; height: 26px; }
  [data-ui="v2"] .mtop .v2-word { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; }
  [data-ui="v2"] .mtop .v2-av { width: 36px; height: 36px; font-size: var(--text-xs); }
  [data-ui="v2"] .mtop .v2-acct { width: var(--touch); height: var(--touch); display: inline-grid; place-items: center; text-decoration: none; flex: none; }
  [data-ui="v2"] .bottom {
    grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 6px env(safe-area-inset-bottom); background: var(--surface-glass); border-top: 1px solid var(--line);
    backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  }
  [data-ui="v2"] .bottom a { min-height: 56px; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--ink-3); border-radius: 16px; padding: 4px 2px; }
  [data-ui="v2"] .bottom a .v2-ib { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background var(--dur-2) var(--ease-out); }
  [data-ui="v2"] .bottom a .v2-ib svg { width: 22px; height: 22px; }
  [data-ui="v2"] .bottom a.on { color: var(--ink); }
  [data-ui="v2"] .bottom a.on .v2-ib { background: var(--tint); color: var(--violet-text); }
  [data-ui="v2"] .mainp { padding: 20px 16px 112px; }
  [data-ui="v2"] .card { padding: 20px; border-radius: 20px; }
}

/* ================= cards, buttons, chips ================= */
[data-ui="v2"] .card, [data-ui="v2"] .panel {
  background: var(--surface-glass); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
[data-ui="v2"] .card h3 { font-size: var(--text-md); }
[data-ui="v2"] .modal .box { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-2); }
[data-ui="v2"] .btn { min-height: 48px; min-width: 44px; border-radius: 999px; padding: 0 22px; font-weight: 650; transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background var(--dur-1); }
[data-ui="v2"] .btn.sm { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: .92rem; }
[data-ui="v2"] .btn.primary, [data-ui="v2"] .btn.ok { background: var(--grad-action); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); position: relative; overflow: hidden; }
[data-ui="v2"] .btn.primary:hover { filter: brightness(1.05); transform: none; }   /* MMSEND1: steady on hover */
[data-ui="v2"] .btn.primary::after { content: none; animation: none; }   /* MMSEND1: no light band sweeping inside Send / Review (it read as the button glitching) */
@keyframes v2sheen { 0%, 75% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
[data-ui="v2"] .btn.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
[data-ui="v2"] .btn.ghost:hover, [data-ui="v2"] .btn.soft:hover { background: var(--surface-3); }
[data-ui="v2"] .btn.soft { background: var(--tint); color: var(--ink); }
[data-ui="v2"] .btn.danger { background: var(--danger-bg); color: var(--danger); }
[data-ui="v2"] .btn:active { transform: scale(.98); }
[data-ui="v2"] button:not(.link):not([class*="sx-"]):not(.v2-iconbtn) { min-height: 44px; }
[data-ui="v2"] .chip { border-radius: 999px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
[data-ui="v2"] .chip.info { background: var(--info-bg); color: var(--violet-text); }
[data-ui="v2"] .chip.ok { background: var(--success-bg); color: var(--success); }
[data-ui="v2"] .chip.warn { background: var(--warning-bg); color: var(--warning); }
[data-ui="v2"] .chip.bad { background: var(--danger-bg); color: var(--danger); }
[data-ui="v2"] button.chip, [data-ui="v2"] a.chip, [data-ui="v2"] .st-chip, [data-ui="v2"] .ev-chips .chip {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: var(--text-sm);
  transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-1), background var(--dur-1);
}
[data-ui="v2"] button.chip:hover, [data-ui="v2"] .st-chip:hover { transform: translateY(-1px); border-color: var(--brand-violet); }
[data-ui="v2"] .st-chip.on, [data-ui="v2"] button.chip.on, [data-ui="v2"] button.chip[aria-pressed="true"] { background: var(--grad-action); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
[data-ui="v2"] .st-chips { gap: 8px; padding: 6px 2px 10px; scrollbar-width: none; }
[data-ui="v2"] .st-chips::-webkit-scrollbar { display: none; }
[data-ui="v2"] .st-lock { background: var(--surface-3); color: var(--ink-2); }
[data-ui="v2"] .seg-row { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
[data-ui="v2"] .seg-row button, [data-ui="v2"] .choice .seg { min-height: 40px; border-radius: 999px; padding: 0 16px; color: var(--ink-2); white-space: nowrap; }
[data-ui="v2"] .seg-row button.on, [data-ui="v2"] .choice .seg.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
[data-ui="v2"] .mme-btn { min-width: 44px; min-height: 44px; }
[data-ui="v2"] .badge { background: var(--grad-action); }
[data-ui="v2"] .avatar { background: var(--grad-brand); color: #fff; width: 40px; height: 40px; }

/* ================= forms ================= */
[data-ui="v2"] input[type=text], [data-ui="v2"] input[type=email], [data-ui="v2"] input[type=tel], [data-ui="v2"] input[type=number], [data-ui="v2"] input[type=search],
[data-ui="v2"] input[type=date], [data-ui="v2"] input[type=datetime-local], [data-ui="v2"] input[type=time], [data-ui="v2"] input[type=password], [data-ui="v2"] select, [data-ui="v2"] textarea {
  min-height: 48px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--font-sans);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
[data-ui="v2"] textarea { font-size: var(--text-md); line-height: 1.6; }
[data-ui="v2"] input:focus, [data-ui="v2"] select:focus, [data-ui="v2"] textarea:focus { outline: none; border-color: var(--brand-violet); box-shadow: 0 0 0 4px rgba(107,101,184,.2); }
[data-ui="v2"] label, [data-ui="v2"] .field > label { color: var(--ink-2); }
[data-ui="v2"] .field > label { font-weight: 650; font-size: var(--text-sm); }
[data-ui="v2"] .check { min-height: 44px; align-items: center; }
[data-ui="v2"] .check input[type=checkbox], [data-ui="v2"] .check input[type=radio] { width: 20px; height: 20px; margin-top: 0; accent-color: var(--brand-violet); flex: none; }
[data-ui="v2"] input[type=range] { accent-color: var(--brand-violet); min-height: 44px; }
[data-ui="v2"] fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); }

[data-ui="v2"] details:not(.v2-grp):not(.v2-sec) { background: var(--surface-glass); border-color: var(--line); border-radius: var(--radius-md); }
[data-ui="v2"] summary { min-height: 44px; display: flex; align-items: center; }
[data-ui="v2"] details:not(.v2-grp):not(.v2-sec) > summary::after { margin-left: auto; }

/* ================= review (vet) card + diffs ================= */
[data-ui="v2"] .vet.card { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box; }
[data-ui="v2"] .vet-sum { font-size: var(--text-md); color: var(--ink); }
[data-ui="v2"] .issue { background: var(--surface-2); border-color: var(--line); border-radius: var(--radius-md); }
[data-ui="v2"] .final, [data-ui="v2"] .quote { border-radius: var(--radius-md); }
[data-ui="v2"] .cool { background: var(--warning-bg); border-radius: var(--radius-lg); }
[data-ui="v2"] .cool-ring { border-color: color-mix(in srgb, var(--brand-violet) 55%, transparent); }
[data-ui="v2"] .pol-cols { gap: var(--space-4); }
[data-ui="v2"] .pol-cols p { background: var(--surface); border-color: var(--line); border-radius: var(--radius-md); padding: var(--space-4); font-size: var(--text-base); line-height: 1.7; }
[data-ui="v2"] .pol-cols > div:last-child p, [data-ui="v2"] .pol-b { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box; }
[data-ui="v2"] .pol-a s, [data-ui="v2"] .pol-a del, [data-ui="v2"] .st-gfix del, [data-ui="v2"] .vet del { background: var(--del-bg); color: var(--del-ink); border-radius: 4px; padding: 0 2px; }
[data-ui="v2"] .pol-b ins, [data-ui="v2"] .st-gfix ins, [data-ui="v2"] .vet ins { background: var(--ins-bg); color: var(--ins-ink); text-decoration: none; border-radius: 4px; padding: 0 2px; }
@media (max-width: 560px) { [data-ui="v2"] .pol-cols { grid-template-columns: minmax(0, 1fr); } }

/* ================= lists, empty, alerts, bubbles ================= */
[data-ui="v2"] .tlist { gap: 10px; grid-template-columns: minmax(0, 1fr); }
[data-ui="v2"] .titem .meta { overflow-wrap: anywhere; }
[data-ui="v2"] .titem { background: var(--surface-glass); border-color: var(--line); border-radius: var(--radius-md); padding: 14px 16px; min-height: 64px; align-items: center; transition: background var(--dur-1), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2); }
[data-ui="v2"] a.titem:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); border-color: var(--line-strong); }
[data-ui="v2"] .titem.unread { border-left: 3px solid var(--brand-violet); }
[data-ui="v2"] .titem .last { color: var(--ink-2); }
[data-ui="v2"] .empty:not(.cal-d) { padding: 48px 20px; color: var(--ink-2); border-radius: var(--radius-lg); background: var(--surface-glass); border: 1px dashed var(--line-strong); }
[data-ui="v2"] .empty:not(.cal-d)::before { content: ""; display: block; width: 132px; height: 132px; margin: 0 auto 12px; background: no-repeat center / contain url("/img/v2/empty-calm.webp"); filter: drop-shadow(0 18px 24px rgba(40, 40, 90, .18)); animation: v2float 6s ease-in-out infinite; }
[data-ui="v2"] #tl .empty::before, [data-ui="v2"] #v2-recent .empty::before { background-image: url("/img/v2/empty-talk.webp"); }
[data-ui="v2"] .empty:not(.cal-d) h3 { font-size: var(--text-lg); color: var(--ink); }
@keyframes v2float { 50% { transform: translateY(-6px); } }
[data-ui="v2"] .alert { border-radius: var(--radius-md); padding: 14px 16px; }
[data-ui="v2"] .alert.info { background: var(--info-bg); color: var(--ink); }
[data-ui="v2"] .alert.ok { background: var(--success-bg); color: var(--success); }
[data-ui="v2"] .alert.warn { background: var(--warning-bg); color: var(--warning); }
[data-ui="v2"] .alert.bad { background: var(--danger-bg); color: var(--danger); }
[data-ui="v2"] .banner { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-lg); }
[data-ui="v2"] .bubble { border-radius: 18px; border-color: var(--line); background: var(--surface); }
[data-ui="v2"] .bubble.out { background: var(--grad-action); color: #fff; border-color: transparent; }
[data-ui="v2"] .bubble.out .foot, [data-ui="v2"] .bubble.out .foot *, [data-ui="v2"] .bubble.out button.link, [data-ui="v2"] .bubble.out a { color: rgba(255,255,255,.92); }
[data-ui="v2"] .bubble.out .orig { color: rgba(255,255,255,.88); border-left-color: rgba(255,255,255,.4); }
[data-ui="v2"] .bubble.draft { background: var(--warning-bg); color: var(--ink); }

/* ================= Home dashboard ================= */
.v2-hello { margin-bottom: var(--space-6); }
.v2-eyebrow { font-size: var(--text-sm); font-weight: 650; color: var(--violet-text); margin-bottom: var(--space-2); }
.v2-hello h1 { font-size: clamp(1.75rem, 4.5vw, var(--text-2xl)); line-height: 1.15; margin: 0; }
.v2-hello p { color: var(--ink-2); font-size: var(--text-md); margin: var(--space-2) 0 0; }
.v2-hero { position: relative; overflow: hidden; padding: var(--space-8) !important; border: 1.5px solid transparent !important; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box !important; }
.v2-hero { min-height: 260px; isolation: isolate; }
.v2-hero::after { content: ""; position: absolute; inset: 0 0 0 30%; z-index: -1; pointer-events: none; background: no-repeat right center / cover url("/img/v2/hero-light.webp"); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); animation: v2art 1.2s var(--ease-out) both; }
:root[data-ui="v2"][data-theme="dark"] .v2-hero::after { background-image: url("/img/v2/hero-dark.webp"); }
@media (prefers-color-scheme: dark) { :root[data-ui="v2"]:not([data-theme="light"]) .v2-hero::after { background-image: url("/img/v2/hero-dark.webp"); } }
@keyframes v2art { from { opacity: 0; transform: scale(1.04); } }
.v2-hero h2 { font-size: var(--text-xl); margin: 0; position: relative; }
.v2-hero p { color: var(--ink-2); max-width: 46ch; margin: var(--space-2) 0 0; position: relative; }
.v2-acts { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; margin-top: var(--space-6); position: relative; z-index: 1; }
.v2-acts .btn.primary { min-height: 56px; padding: 0 28px; font-size: var(--text-md); }
.v2-quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 650; color: var(--accent-text); text-decoration: none; }
.v2-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-6); margin-top: var(--space-6); }
.v2-stack { display: grid; gap: var(--space-6); align-content: start; min-width: 0; }
.v2-ch { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.v2-ch h2 { font-size: var(--text-md); margin: 0; }
.v2-ch a { font-size: var(--text-sm); font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.v2-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.v2-li { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; transition: background var(--dur-1); }
.v2-li + .v2-li { border-top: 1px solid var(--line); }
.v2-li:hover { background: var(--surface-2); }
.v2-li .b { flex: 1; min-width: 0; }
.v2-li .t { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-li .t span { color: var(--ink-3); font-weight: 550; font-size: var(--text-sm); margin-left: 6px; }
.v2-li .s { display: block; color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-li .m { display: grid; justify-items: end; gap: 6px; font-size: var(--text-xs); color: var(--ink-3); white-space: nowrap; }
.v2-li time { width: 64px; flex: none; font-weight: 650; color: var(--accent-text); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.v2-calm { color: var(--ink-3); font-size: var(--text-sm); padding: var(--space-3) 0; }
.v2-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.v2-tools h3 { font-family: var(--font-sans); font-size: var(--text-xs); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 var(--space-2); }
.v2-tools a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; margin: 0 -10px; border-radius: 12px; color: var(--ink); font-weight: 550; text-decoration: none; }
.v2-tools a:hover { background: var(--surface-2); }
.v2-skel { height: 64px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: v2shim 1.4s linear infinite; }
.v2-skel + .v2-skel { margin-top: 8px; }
@keyframes v2shim { to { background-position: -200% 0; } }
@media (max-width: 1100px) { .v2-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .v2-hero { padding: var(--space-6) var(--space-5) !important; }
  .v2-hero h2 { font-size: 1.45rem; }
  .v2-acts .btn.primary { width: 100%; }
  .v2-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-top: var(--space-4); }
  .v2-stack { gap: var(--space-4); }
  .v2-li .t span { display: none; }
}

/* ================= Account (settings grouped) ================= */
.v2-sec { padding: 0 !important; overflow: hidden; margin-top: 12px; }
.v2-sec > summary { list-style: none; display: flex; align-items: center; gap: var(--space-4); min-height: 76px; padding: var(--space-4) var(--space-6); cursor: pointer; }
.v2-sec > summary::-webkit-details-marker { display: none; }
.v2-sec .v2-sic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--violet-text); }
.v2-sec .tx { flex: 1; min-width: 0; }
.v2-sec .tx b { display: block; font-family: var(--font-display); font-size: var(--text-md); }
.v2-sec .tx small { display: block; color: var(--ink-3); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-sec .chev { color: var(--ink-3); transition: transform var(--dur-2) var(--ease-out); }
.v2-sec[open] > summary .chev { transform: rotate(90deg); }
.v2-sec-in { padding: 0 var(--space-6) var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow-wrap: anywhere; }
.v2-sec-in > .card { margin-top: 0 !important; box-shadow: none; background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
.v2-switch { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; justify-content: space-between; }
.v2-switch b { font-family: var(--font-display); }
@media (max-width: 860px) {
  .v2-sec > summary { padding: var(--space-4) var(--space-5); }
  .v2-sec-in { padding: 0 var(--space-3) var(--space-4); }
  .v2-sec-in > .card { padding: 16px; }
}

/* ================= Simple Text page (body.simple) ================= */
[data-ui="v2"] body.simple { background: var(--bg); }
[data-ui="v2"] body.simple .sx-h { font-family: var(--font-display); font-weight: 750; letter-spacing: -.02em; font-size: 1.6rem; }
[data-ui="v2"] .sx-person { border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface-glass); box-shadow: var(--shadow-1); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2); }
[data-ui="v2"] .sx-person:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
[data-ui="v2"] .sx-person.on { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box; box-shadow: var(--shadow-glow); }
[data-ui="v2"] .sx-person.add { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--line-strong); }
[data-ui="v2"] .sx-name { font-family: var(--font-display); color: var(--ink); }
[data-ui="v2"] .sx-addbtn .sx-name, [data-ui="v2"] .sx-link { color: var(--violet-text); }
[data-ui="v2"] .sx-num, [data-ui="v2"] .sx-note, [data-ui="v2"] .sx-pen, [data-ui="v2"] .sx-qt, [data-ui="v2"] .sx-prev-h, [data-ui="v2"] .sx-foot a { color: var(--ink-3); }
[data-ui="v2"] .sx-pen { border-left-color: var(--line); }
[data-ui="v2"] .sx-form textarea, [data-ui="v2"] .sx-edit input { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
[data-ui="v2"] .sx-form textarea:focus, [data-ui="v2"] .sx-edit input:focus { border-color: var(--brand-violet); box-shadow: 0 0 0 4px rgba(107,101,184,.2); outline: none; }
[data-ui="v2"] .sx-send, [data-ui="v2"] .sx-btn.primary { background: var(--grad-action); color: #fff; box-shadow: var(--shadow-glow); border-color: transparent; }
[data-ui="v2"] .sx-send { min-height: 64px; border-radius: 20px; font-family: var(--font-display); }
[data-ui="v2"] .sx-send.confirm { background: linear-gradient(135deg, #17704D, #2D6889); }
[data-ui="v2"] .sx-btn { background: var(--surface-2); color: var(--ink); border-color: var(--line); border-radius: 999px; }
[data-ui="v2"] .sx-btn.danger { background: var(--danger-bg); color: var(--danger); }
[data-ui="v2"] .sx-msg, [data-ui="v2"] .sx-qi { background: var(--surface-glass); color: var(--ink); border-color: var(--line); border-radius: 20px; box-shadow: var(--shadow-1); }
[data-ui="v2"] .sx-qi.scheduled, [data-ui="v2"] .sx-qi.ready { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box; }
[data-ui="v2"] .sx-cd { font-family: var(--font-display); font-weight: 750; color: var(--violet-text); }
[data-ui="v2"] .sx-topic { background: var(--surface-2); color: var(--ink-2); }
[data-ui="v2"] .sx-send:focus-visible, [data-ui="v2"] .sx-pick:focus-visible, [data-ui="v2"] .sx-pen:focus-visible { outline: 3px solid var(--focus); }

/* ================= v2.1 polish: depth, glass, motion (2026-10-15 b) ================= */
:root[data-ui="v2"] { --shadow-3: 0 1px 1px rgba(20,27,58,.04), 0 12px 24px -12px rgba(20,27,58,.18), 0 40px 80px -40px rgba(60,50,140,.28); --glass-edge: inset 0 1px 0 rgba(255,255,255,.7); }
:root[data-ui="v2"][data-theme="dark"] { --shadow-3: 0 1px 1px rgba(0,0,0,.3), 0 14px 30px -12px rgba(0,0,0,.6), 0 40px 90px -40px rgba(80,70,200,.35); --glass-edge: inset 0 1px 0 rgba(255,255,255,.07); }
@media (prefers-color-scheme: dark) { :root[data-ui="v2"]:not([data-theme="light"]) { --shadow-3: 0 1px 1px rgba(0,0,0,.3), 0 14px 30px -12px rgba(0,0,0,.6), 0 40px 90px -40px rgba(80,70,200,.35); --glass-edge: inset 0 1px 0 rgba(255,255,255,.07); } }
/* living aura behind the app */
[data-ui="v2"] body::before { background-size: 140% 140%; animation: v2aura 28s ease-in-out infinite alternate; }
@keyframes v2aura { from { background-position: 0% 0%, 100% 100%; } to { background-position: 18% 10%, 82% 88%; } }
/* glass: a lit top edge + layered depth; cards lift on hover */
[data-ui="v2"] .card, [data-ui="v2"] .panel, [data-ui="v2"] .titem, [data-ui="v2"] .sx-person, [data-ui="v2"] .sx-qi { box-shadow: var(--glass-edge), var(--shadow-1); }
[data-ui="v2"] .mainp > .card:not(.v2-sec):not(.vet):hover, [data-ui="v2"] .v2-grid .card:hover, [data-ui="v2"] .grid > .card:hover { box-shadow: var(--glass-edge), var(--shadow-3); transform: translateY(-2px); }
[data-ui="v2"] .mainp > .card, [data-ui="v2"] .v2-grid .card, [data-ui="v2"] .grid > .card { transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
[data-ui="v2"] .v2-hero { box-shadow: var(--glass-edge), var(--shadow-3) !important; }
/* staggered entrance for the dashboard and lists */
[data-ui="v2"] .v2-grid > *, [data-ui="v2"] .v2-stack > *, [data-ui="v2"] .tlist > * { animation: v2rise var(--dur-3) var(--ease-out) both; }
[data-ui="v2"] .v2-grid > :nth-child(2), [data-ui="v2"] .v2-stack > :nth-child(2), [data-ui="v2"] .tlist > :nth-child(2) { animation-delay: 70ms; }
[data-ui="v2"] .tlist > :nth-child(3) { animation-delay: 120ms; } [data-ui="v2"] .tlist > :nth-child(4) { animation-delay: 160ms; } [data-ui="v2"] .tlist > :nth-child(n+5) { animation-delay: 200ms; }
/* nav: the active pill glows softly; icons nudge on hover */
.v2-tab.on { box-shadow: var(--glass-edge), 0 6px 18px -10px rgba(93,87,171,.5); }
.v2-tab svg, .v2-sub { transition: transform var(--dur-1) var(--ease-out), background var(--dur-1), color var(--dur-1); }
.v2-tab:hover svg { transform: translateX(2px) scale(1.06); }
/* primary actions: gradient that breathes */
[data-ui="v2"] .btn.primary, [data-ui="v2"] .sx-send { background-size: 160% 160%; animation: v2grad 9s ease-in-out infinite alternate; }
@keyframes v2grad { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
[data-ui="v2"] .btn.primary:focus-visible, [data-ui="v2"] .sx-send:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* review card: animated gradient edge while it is the focus of the page */
[data-ui="v2"] .vet.card { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #4A8BAE, #6B65B8, #4A8BAE) border-box; background-size: 100% 100%, 240% 240%; animation: v2edge 8s linear infinite; }
@keyframes v2edge { to { background-position: 0 0, 240% 0; } }
/* style chips: selected chip pops */
[data-ui="v2"] .st-chip.on { animation: v2pop 360ms var(--ease-out); }
@keyframes v2pop { 40% { transform: scale(1.06); } }
/* Simple Text: the countdown card breathes while it waits */
[data-ui="v2"] .sx-qi.scheduled { animation: v2breathe 3.2s ease-in-out infinite; }
@keyframes v2breathe { 50% { box-shadow: var(--glass-edge), 0 0 0 6px rgba(107,101,184,.10), var(--shadow-2); } }
/* hero art on phones: smaller and softer so the text stays crisp */
@media (max-width: 860px) {
  .v2-hero::after { inset: auto -18% -18% 28%; height: 78%; background-image: url("/img/v2/hero-light-800.webp"); background-position: right bottom; opacity: .55; -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }
  :root[data-ui="v2"][data-theme="dark"] .v2-hero::after { background-image: url("/img/v2/hero-dark-800.webp"); }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) { :root[data-ui="v2"]:not([data-theme="light"]) .v2-hero::after { background-image: url("/img/v2/hero-dark-800.webp"); } }

/* ================= wow layer (2026-10-15 c): vibrant Home banner, page art headers, section accents ================= */
/* Home greeting becomes a vibrant banner with the ribbon art */
.v2-banner { position: relative; overflow: hidden; isolation: isolate; padding: 30px 34px; border-radius: 28px; color: #fff; background: linear-gradient(120deg, #18244F 0%, #2C3C7A 45%, #5D57AB 100%); box-shadow: 0 24px 60px -28px rgba(45,40,120,.65); }
.v2-banner::before { content: ""; position: absolute; inset: 0 0 0 40%; z-index: -1; background: no-repeat right center / cover url("/img/v2/hero-dark-800.webp"); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); opacity: .9; animation: v2drift 18s ease-in-out infinite alternate; }
@media (min-width: 861px) { .v2-banner::before { background-image: url("/img/v2/hero-dark.webp"); } }
.v2-banner::after { content: ""; position: absolute; width: 260px; height: 260px; left: -80px; bottom: -140px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(74,139,174,.55), transparent 65%); animation: v2drift 12s ease-in-out infinite alternate-reverse; }
@keyframes v2drift { to { transform: translate(-14px, 6px) scale(1.04); } }
.v2-banner h1 { color: #fff; }
.v2-banner .v2-eyebrow { color: #C9E6F2; }
.v2-banner p { color: rgba(255,255,255,.9) !important; max-width: 46ch; }
/* "Say it well" card: illustration instead of the ribbon backdrop */
.v2-hero::after { display: none; }
.v2-hero { padding-right: min(340px, 36%) !important; }
.v2-sayart { position: absolute; right: 20px; top: 20px; bottom: 20px; height: calc(100% - 40px); width: auto; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: 0 18px 40px -18px rgba(40,40,110,.45); animation: v2float 7s ease-in-out infinite; pointer-events: none; }
@media (max-width: 860px) {
  .v2-banner { padding: 24px 22px; border-radius: 22px; }
  .v2-banner::before { inset: 0 -30% 0 30%; opacity: .55; }
  .v2-hero { padding-right: var(--space-5) !important; padding-top: 160px !important; }
  .v2-sayart { top: 16px; bottom: auto; right: auto; left: calc(50% - 64px); width: 128px; height: 128px; }
}
/* a colour accent per section: a thin gradient bar and a tinted heading dot */
.v2-acc { position: relative; overflow: hidden; }
.v2-acc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--acc); }
.v2-acc .v2-ch h2 { display: flex; align-items: center; gap: 10px; }
.v2-acc .v2-ch h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc-solid) 18%, transparent); }
.v2-acc[data-acc="teal"] { --acc: linear-gradient(90deg, #4A8BAE, #6FB6CF); --acc-solid: #4A8BAE; }
.v2-acc[data-acc="violet"] { --acc: linear-gradient(90deg, #6B65B8, #9C95E8); --acc-solid: #6B65B8; }
.v2-acc[data-acc="amber"] { --acc: linear-gradient(90deg, #D9925A, #E9B97C); --acc-solid: #D9925A; }
.v2-acc[data-acc="navy"] { --acc: linear-gradient(90deg, #18244F, #5D57AB); --acc-solid: #5D57AB; }
.v2-tools > div { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.v2-tools a { margin: 0; }
/* page headers with art: Mediate, History, Contacts, Account, Credits, Alerts */
.v2-band { position: relative; overflow: hidden; isolation: isolate; min-height: 150px; padding: 28px 32px; border-radius: 26px; align-items: flex-end;
  background: linear-gradient(var(--surface-glass), var(--surface-glass)); border: 1px solid var(--line); box-shadow: var(--glass-edge, none), var(--shadow-1); }
.v2-band::before { content: ""; position: absolute; inset: 0 0 0 34%; z-index: -1; background: no-repeat right center / cover var(--band); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); animation: v2art 1.1s var(--ease-out) both, v2drift 22s ease-in-out 1.1s infinite alternate; }
.v2-band h1 { position: relative; }
[data-v2-band="compose"] { --band: url("/img/wow2/band-mediate-1200.webp"); }
[data-v2-band="threads"] { --band: url("/img/wow2/band-history-1200.webp"); }
[data-v2-band="contacts"] { --band: url("/img/wow2/band-contacts-1200.webp"); }
[data-v2-band="settings"], [data-v2-band="billing"] { --band: url("/img/wow2/band-account-1200.webp"); }
[data-v2-band="notifications"] { --band: url("/img/wow2/band-simple-1200.webp"); }
:root[data-ui="v2"][data-theme="dark"] .v2-band::before { opacity: .45; }
@media (prefers-color-scheme: dark) { :root[data-ui="v2"]:not([data-theme="light"]) .v2-band::before { opacity: .45; } }
@media (max-width: 860px) {
  .v2-band { min-height: 124px; padding: 20px; border-radius: 20px; }
  .v2-band::before { inset: 0 -20% 0 20%; opacity: .6; }
  [data-v2-band="compose"] { --band: url("/img/wow2/band-mediate-600.webp"); } [data-v2-band="threads"] { --band: url("/img/wow2/band-history-600.webp"); }
  [data-v2-band="contacts"] { --band: url("/img/wow2/band-contacts-600.webp"); } [data-v2-band="settings"], [data-v2-band="billing"] { --band: url("/img/wow2/band-account-600.webp"); }
  [data-v2-band="notifications"] { --band: url("/img/wow2/band-simple-600.webp"); }
}
/* Simple Text page header */
[data-ui="v2"] body.simple .sx-h { position: relative; overflow: hidden; isolation: isolate; padding: 26px 22px; min-height: 110px; display: flex; align-items: flex-end; border-radius: 22px; background: var(--surface-glass); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
[data-ui="v2"] body.simple .sx-h::before { content: ""; position: absolute; inset: 0 0 0 30%; z-index: -1; background: no-repeat right center / cover url("/img/wow2/band-simple-600.webp"); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
/* ================= reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  [data-ui="v2"] *, [data-ui="v2"] *::before, [data-ui="v2"] *::after { animation: none !important; transition: none !important; }
}

/* QA round 4: H24 Ask MM in the top bar */
.v2-ask{font:800 18px/1 var(--sans,system-ui);border:0;cursor:pointer}
@media (max-width:760px){ body .askmm-panel{bottom:calc(84px + env(safe-area-inset-bottom))!important} }

/* 10-17: fal photos in the signed-in app (Todd: photoreal people in the back end too) */
.v2-banner::before { background-image: url("/img/app/app-banner-720.webp"); background-position: right 30% center; animation: none; }
@media (min-width: 861px) { .v2-banner::before { background-image: url("/img/app/app-banner-1200.webp"); opacity: .95; } }
.v2-banner { background: linear-gradient(120deg, #18244F 0%, #2C3C7A 55%, #3d4a8a 100%); }
.v2-welcome { position: relative; margin-bottom: 24px; padding-right: 56px; }
.v2-welcome h2 { margin: 0 0 14px; font-size: 1.15rem; }
.v2-welcome .xbox-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: inherit; font: 400 26px/1 system-ui, sans-serif; cursor: pointer; }
.v2-welcome .xbox-x:hover { background: var(--surface-2, rgba(0,0,0,.05)); }
.v2-wel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.v2-wel a { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; border-radius: 16px; padding-bottom: 6px; }
.v2-wel a:hover b, .v2-wel a:focus-visible b { text-decoration: underline; }
.v2-wel img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.v2-wel b { font-size: 1rem; }
.v2-wel span { color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 860px) { .v2-welcome { padding-right: 16px; } .v2-welcome h2 { padding-right: 44px; } .v2-wel { grid-template-columns: 1fr; } .v2-wel a { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; align-items: center; } .v2-wel img { grid-row: span 2; margin: 0; } }
.v2-calm-pic { display: flex; align-items: center; gap: 12px; }
.v2-calm-pic img { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; object-fit: cover; }
[data-ui="v2"] .empty.empty-inbox::before { background: center / cover no-repeat url("/img/app/empty-inbox-480.webp"); border-radius: 50%; filter: none; animation: none; width: 120px; height: 120px; }
.help-head { display: flex; align-items: center; gap: 16px; }
.help-pic { width: 128px; height: 96px; flex: 0 0 128px; border-radius: 14px; object-fit: cover; }
@media (max-width: 600px) { .help-pic { width: 88px; height: 66px; flex-basis: 88px; } }
/* Focus Pkg A 10-17: calm mode toggle + end-of-day sweep */
.v2-calmbtn { margin-top: 14px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; font: 600 .92rem/1 inherit; cursor: pointer; }
.v2-calmbtn[aria-pressed="true"] { background: #fff; color: #18244F; }
.v2-sweep { position: relative; margin-bottom: 24px; padding-right: 56px; }
.v2-sweep .xbox-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: inherit; font: 400 26px/1 system-ui, sans-serif; cursor: pointer; }
.v2-sw { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.v2-sw .t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.v2-swb { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-swb .btn { min-height: 44px; }
.v2-swdone { color: var(--ink-2); font-weight: 500; }
@media (max-width: 860px) { .v2-sweep { padding-right: 16px; } .v2-sweep .v2-ch { padding-right: 44px; } }
/* calm mode: one column, fewer choices, bigger buttons, no counts or motion */
html.calm .v2-grid { grid-template-columns: 1fr !important; }
html.calm .v2-acc[data-acc="navy"], html.calm .v2-sayart, html.calm .v2-banner::after { display: none !important; }
html.calm .chip.info, html.calm .badge, html.calm .nav-badge, html.calm nav .count { display: none !important; }
html.calm .btn, html.calm button.btn { min-height: 52px; font-size: 1.05rem; }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
html.calm body { font-size: 1.04rem; }
/* tester notes 10-17: (e) app header brand never truncates on phones */
@media (max-width: 480px) { [data-ui="v2"] .mtop .v2-word { font-size: clamp(.8rem, 3.5vw, .98rem); letter-spacing: -.01em; overflow: visible; text-overflow: clip; white-space: nowrap; } [data-ui="v2"] .mtop .v2-brand img { width: 28px; height: 22px; } [data-ui="v2"] .mtop .v2-brand { gap: 6px; } }

/* MM-HERO1r3: the crisis card keeps its red styling whatever loads after it (v2.css flattened .sx-msg) */
#sx-crisis.sx-msg.sx-crisis, .sx-msg.sx-crisis { border: 2px solid #b4235a !important; background: #fff4f7 !important; color: #3a0a1c !important; margin: 10px 0; line-height: 1.5; }
#sx-crisis.sx-msg.sx-crisis b { color: #8f1240 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #sx-crisis.sx-msg.sx-crisis, :root:not([data-theme="light"]) .sx-msg.sx-crisis { background: #2a0f19 !important; color: #fde7ee !important; border-color: #e0507f !important; } :root:not([data-theme="light"]) #sx-crisis.sx-msg.sx-crisis b { color: #ffb3cb !important; } }
:root[data-theme="dark"] #sx-crisis.sx-msg.sx-crisis, :root[data-theme="dark"] .sx-msg.sx-crisis { background: #2a0f19 !important; color: #fde7ee !important; border-color: #e0507f !important; }
/* MMSEND1: action buttons in a composer never move: no press shrink, a steady width while the label counts down, 48 px tall */
[data-ui="v2"] form .btn.primary:active, [data-ui="v2"] .vet-actions .btn:active { transform: none; }
[data-ui="v2"] .btn.primary, [data-ui="v2"] .sx-send { animation: none; background-size: 100% 100%; }   /* the drifting gradient inside the button, too */
[data-ui="v2"] .vet.card { animation: none; }   /* and the moving border around the review card that holds Send */
.vet-actions [data-send] { min-width: 15.5em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) { .vet-actions [data-send], #rf .btns .btn.primary, form.card .btns .btn.primary { width: 100%; min-width: 0; } }
@media (prefers-reduced-motion: reduce) { [data-ui="v2"] .btn { transition: none; } }
