/* ============================================================
   Mobile v2 — "Clubhouse" skin (iteration 71)
   Tokens + keyframes ported from
   planning/design/design_handoff_mobile_v2_clubhouse/mobile_v2/theme.css
   (source of truth). Scope: mobile breakpoint (max-width: 768px).
   Tokens and keyframes live at top level (inert without markup);
   every visual class is gated to the mobile breakpoint.
   ============================================================ */

:root {
  --m2-emerald:      #016c47;
  --m2-emerald-deep: #014d2d;
  --m2-emerald-lite: #3da97b;
  --m2-ink:    #19231b;
  --m2-body:   #4b564d;
  --m2-muted:  #787567;
  --m2-cream:  #edfbef;
  --m2-paper:  #fcfbf5;
  --m2-bg:     #f2efde;
  --m2-line:   #dfdbce;
  --m2-dark:   #14231c;
  --m2-dark-2: #1c2f25;
  --m2-dark-line: #2c4234;

  /* availability = amber, live/friends = green, accent = action */
  --m2-amber:     oklch(0.74 0.16 82);
  --m2-amber-ink: oklch(0.48 0.13 78);
  --m2-amber-bg:  oklch(0.96 0.05 85);
  --m2-green:     oklch(0.62 0.15 148);
  --m2-green-ink: oklch(0.40 0.13 148);
  --m2-heat:      oklch(0.86 0.11 155);   /* light heat ramp target */

  --m2-accent: #cd5924;                    /* terracotta — the only shipped accent */
  --m2-accent-ink: color-mix(in oklch, var(--m2-accent) 78%, black);
  --m2-accent-bg: color-mix(in oklch, var(--m2-accent) 12%, white);

  --m2-font-head: 'Spectral', Georgia, serif;
  --m2-font-body: 'DM Sans', system-ui, sans-serif;

  --m2-card-shadow: 0 8px 24px rgba(20, 30, 20, .08);

  --mo: 1; /* global motion speed multiplier — every m2 duration divides by this */
}

/* ── keyframes (handoff §7) ── */
@keyframes m2cellpop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes m2fadeup  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes m2sheet   { from { transform: translateY(105%); } 62% { transform: translateY(-1.2%); } to { transform: translateY(0); } }
@keyframes m2dim     { from { opacity: 0; } to { opacity: 1; } }
@keyframes m2blink   { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.06); } }
@keyframes m2hop     { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-26%) scale(1.04,0.96); } 55% { transform: translateY(0) scale(0.97,1.03); } 70% { transform: translateY(-8%); } 85% { transform: translateY(0); } }
@keyframes m2wiggle  { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes m2poplate { 0%, 55% { opacity: 0; transform: scale(.4) translateY(8px); } 80% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes m2sparkle { 0% { opacity: 0; transform: scale(.2) rotate(0deg); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15) rotate(40deg); } }
@keyframes m2breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes m2panel   { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes m2ring {
  0%, 100% { transform: rotate(0); }
  4%  { transform: rotate(13deg); }
  8%  { transform: rotate(-11deg); }
  12% { transform: rotate(8deg); }
  16% { transform: rotate(-5deg); }
  20% { transform: rotate(2.5deg); }
  24% { transform: rotate(0); }
}
@keyframes m2clapper {
  0%, 100% { transform: translateX(0); }
  5%  { transform: translateX(-1.6px); }
  10% { transform: translateX(1.6px); }
  15% { transform: translateX(-1.1px); }
  20% { transform: translateX(0.6px); }
  25% { transform: translateX(0); }
}
@keyframes m2badgepop { 0% { transform: scale(0); } 65% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes m2badgering {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--m2-accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}

@media (max-width: 768px) {

  /* ── notification bell (live only when unread > 0) ── */
  .m2-bell { transform-origin: 50% 15%; }
  .m2-bell--live { animation: m2ring calc(5s / var(--mo)) ease-in-out infinite; animation-delay: 1.2s; }
  .m2-bell--live .m2-bell-clapper { animation: m2clapper calc(5s / var(--mo)) ease-in-out infinite; animation-delay: 1.25s; }
  .m2-badge { animation: m2badgepop calc(.5s / var(--mo)) cubic-bezier(.25,1.4,.4,1) both .4s; }
  .m2-badge::after { content: ''; position: absolute; inset: 0; border-radius: inherit; animation: m2badgering calc(5s / var(--mo)) ease-out infinite 1.2s; }

  /* ── toad moods ── */
  .m2-pupil { transform-box: fill-box; transform-origin: center; }
  .m2-toad--idle .m2-pupil { animation: m2blink calc(4.6s / var(--mo)) ease-in-out infinite; }
  .m2-toad--hop { animation: m2hop calc(.9s / var(--mo)) cubic-bezier(.3,.7,.3,1) both; }
  .m2-toad--hop .m2-pupil { animation: m2blink calc(1.8s / var(--mo)) ease-in-out infinite; }
  .m2-toad--bob { animation: m2breathe calc(2.8s / var(--mo)) ease-in-out infinite; }

  /* ── entrances (stagger via inline animation-delay, never JS timers) ── */
  .m2-pop  { animation: m2cellpop calc(.42s / var(--mo)) cubic-bezier(.25,1,.4,1) both; }
  .m2-rise { animation: m2fadeup calc(.5s / var(--mo)) cubic-bezier(.2,.8,.3,1) both; }

  /* ── day sheet ── */
  .m2-dim   { animation: m2dim calc(.3s / var(--mo)) ease both; }
  .m2-sheet { animation: m2sheet calc(.52s / var(--mo)) cubic-bezier(.22,.9,.32,1) both; }
  .m2-celebrate { animation: m2poplate calc(1.1s / var(--mo)) cubic-bezier(.25,1,.4,1) both; }

  /* ── interactive feedback ── */
  .m2-cellbtn { transition: transform calc(.12s / var(--mo)) ease, box-shadow calc(.12s / var(--mo)) ease; }
  .m2-cellbtn:active { transform: scale(.92); }
  .m2-btn { transition: transform calc(.12s / var(--mo)) ease, filter .12s ease; }
  .m2-btn:active { transform: scale(.96); }
  .m2-btn:hover { filter: brightness(1.05); }
  .m2-seg { transition: background calc(.2s / var(--mo)) ease, color calc(.2s / var(--mo)) ease, box-shadow calc(.2s / var(--mo)) ease; }

  /* ── segmented tabs (sliding emerald indicator) ── */
  .m2-segwrap { position: relative; }
  .m2-segind {
    position: absolute; top: 4px; left: 4px; height: 36px; border-radius: 10px;
    width: calc((100% - 16px) / 3);
    background: var(--m2-emerald);
    transition: transform calc(.34s / var(--mo)) cubic-bezier(.3,1.4,.4,1);
    box-shadow: 0 2px 6px rgba(1,77,45,.25);
  }
  .m2-segbtn { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; transition: color calc(.2s / var(--mo)) ease, transform calc(.15s / var(--mo)) ease; }
  .m2-segbtn:active { transform: scale(.95); }
  .m2-panel { animation: m2panel calc(.32s / var(--mo)) cubic-bezier(.2,.8,.3,1) both; }

  /* ── toggle ── */
  .m2-toggle { position: relative; width: 46px; height: 27px; border-radius: 27px; border: none; padding: 0; flex-shrink: 0; background: var(--m2-line); transition: background calc(.18s / var(--mo)) ease; }
  .m2-toggle i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 21px; background: #fff; box-shadow: 0 1px 3px rgba(20,30,20,.25); transition: left calc(.18s / var(--mo)) cubic-bezier(.2,.8,.3,1.3); }
  .m2-toggle[aria-checked="true"] { background: var(--m2-amber); }
  .m2-toggle[aria-checked="true"] i { left: 22px; }

  /* ── inputs ── */
  .m2-input, .m2-select {
    width: 100%; height: 42px; padding: 0 12px; border-radius: 10px;
    border: 1.5px solid var(--m2-line); background: #fff; font: 600 14px var(--m2-font-body); color: var(--m2-ink);
  }
  .m2-input:focus, .m2-select:focus { outline: none; border-color: var(--m2-emerald); box-shadow: 0 0 0 3px color-mix(in oklch, var(--m2-emerald) 16%, transparent); }

  /* ── stepper +/- ── */
  .m2-step { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--m2-line); background: #fff; font: 800 16px var(--m2-font-body); color: var(--m2-ink); display: inline-flex; align-items: center; justify-content: center; transition: transform calc(.12s / var(--mo)) ease; }
  .m2-step:active { transform: scale(.9); }

  /* ════════════════════════════════════════════════════════════════
     Shared mobile chrome (handoff §5)
     ════════════════════════════════════════════════════════════════ */

  /* ── top bar (.mobile-masthead — markup in partials/mobile-masthead.ejs) ── */
  .mobile-masthead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 60px;
    background: var(--m2-paper);
    border-bottom: 1px solid var(--m2-line);
    position: sticky;
    top: 0;
    z-index: 99;
    flex-shrink: 0;
  }

  .mobile-masthead__mark { flex-shrink: 0; line-height: 0; }

  .mobile-masthead__lockup { gap: 2px; }

  .mobile-masthead__lockup .gg-lockup__name {
    font-size: 17px;
    color: var(--m2-ink);
  }

  .mobile-masthead__lockup .gg-lockup__name i { color: var(--m2-accent); }

  .mobile-masthead__lockup .gg-lockup__desc {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.26em;
    color: var(--m2-accent-ink);
  }

  .mobile-masthead__spacer { flex: 1; }

  /* bell — filled + smiling + ringing when there are unreads */
  .mobile-masthead__bell {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--m2-line);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--m2-muted);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
    transition: transform calc(.12s / var(--mo)) ease, filter .12s ease;
  }

  .mobile-masthead__bell:active { transform: scale(0.96); }
  .mobile-masthead__bell:hover { filter: brightness(1.05); }

  .mobile-masthead__bell--live { background: var(--m2-cream); }

  .mobile-masthead__bell-icon {
    display: block;
    overflow: visible;
    transform-origin: 50% 15%;
  }

  .mobile-masthead__bell--live .mobile-masthead__bell-icon {
    animation: m2ring calc(5s / var(--mo)) ease-in-out 1.2s infinite;
  }

  .mobile-masthead__bell-body,
  .mobile-masthead__bell-clapper { fill: var(--m2-emerald); }

  .mobile-masthead__bell-smile {
    fill: none;
    stroke: var(--m2-cream);
    stroke-width: 1.7;
    stroke-linecap: round;
  }

  .mobile-masthead__bell-clapper {
    animation: m2clapper calc(5s / var(--mo)) ease-in-out 1.25s infinite;
  }

  .mobile-masthead__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    border-radius: 16px;
    padding: 0 4px;
    background: var(--m2-accent);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--m2-paper);
    font-variant-numeric: tabular-nums;
    animation: m2badgepop calc(.5s / var(--mo)) cubic-bezier(0.25, 1.4, 0.4, 1) 0.4s both;
  }

  .mobile-masthead__badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    animation: m2badgering calc(5s / var(--mo)) ease-out 1.2s infinite;
  }

  .mobile-masthead__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--m2-emerald);
    color: var(--m2-cream);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    overflow: hidden;
    padding: 0;
  }

  .mobile-masthead__avatar img {
    width: 100%;
    height: 100%;
    display: block;
  }

  .mobile-masthead__dropdown {
    right: 14px;
    left: auto;
  }

  /* ── accent masthead block (partials/m2-masthead.ejs) ── */
  .m2-masthead {
    background: var(--m2-accent);
    color: #fff;
    padding: 14px 18px 30px;
  }

  .m2-masthead__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .m2-masthead__eyebrow {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    opacity: 0.8;
    margin: 0;
  }

  .m2-masthead__title {
    font-family: var(--m2-font-head);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.1;
    margin: 2px 0 0;
    color: #fff;
  }

  .m2-masthead__status {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.85;
    margin: 6px 0 0;
  }

  .m2-masthead__nav { display: flex; gap: 8px; flex-shrink: 0; }

  .m2-masthead__navbtn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform calc(.12s / var(--mo)) ease, filter .12s ease;
  }

  .m2-masthead__navbtn:active { transform: scale(0.96); }
  .m2-masthead__navbtn[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
  }

  /* ── overlapping paper card + flow cards (handoff §5) ── */
  .m2-card {
    margin: -18px 12px 0;
    background: var(--m2-paper);
    border: 1px solid var(--m2-line);
    border-radius: 18px;
    box-shadow: var(--m2-card-shadow);
    position: relative;
  }

  .m2-card--flow {
    margin: 12px 14px 0;
    border-radius: 16px;
  }

  /* ── next-session card (partials/cal-next-session-mobile.ejs) —
     shared by the calendar and mobile Home ── */
  .cal-mobile-session__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .cal-mobile-session__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--m2-accent);
    flex-shrink: 0;
  }

  .cal-mobile-session__label {
    font-size: 10px;
    font-weight: 800;
    color: var(--m2-accent-ink);
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }

  .cal-mobile-session__days {
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--m2-muted);
  }

  .cal-mobile-session__main {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .cal-mobile-session__title {
    font-family: var(--m2-font-head);
    font-size: 18.5px;
    font-weight: 700;
    color: var(--m2-ink);
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  .cal-mobile-session__meta {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--m2-muted);
  }

  .cal-mobile-session__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .cal-mobile-session__friends {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--m2-green-ink);
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .cal-mobile-session__btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-decoration: none;
    background: var(--m2-accent);
    color: #fff;
  }

  .cal-mobile-session__btn--in {
    background: color-mix(in oklch, var(--m2-green) 14%, white);
    color: var(--m2-green-ink);
    border: 1px solid color-mix(in oklch, var(--m2-green) 30%, white);
  }

  .cal-mobile-session__empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
  }

  .cal-mobile-session__empty-heading {
    font-family: var(--m2-font-head);
    font-size: 19px;
    font-weight: 700;
    color: var(--m2-ink);
  }

  .cal-mobile-session__empty-sub {
    font-size: 13px;
    color: var(--m2-muted);
  }

  .cal-mobile-session__empty-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
  }

  /* avatar stack used inside the session card (mobile scope) */
  .cal-avatar-stack {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .cal-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--m2-emerald);
    color: var(--m2-cream);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--m2-paper);
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .cal-avatar + .cal-avatar,
  .cal-avatar + .cal-avatar-overflow { margin-left: -9px; }

  .cal-avatar-overflow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--m2-cream);
    color: var(--m2-muted);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--m2-paper);
    box-sizing: border-box;
    flex-shrink: 0;
    margin-left: -9px;
  }

  .cal-avatar--img {
    overflow: hidden;
    padding: 0;
  }

  .cal-avatar--img img {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* ── micro heat cell (home week strip, landing specimens) ── */
  .m2-heatcell {
    height: 44px;
    border-radius: 11px;
    padding: 4px 5px 3px;
    display: flex;
    flex-direction: column;
    background: color-mix(in oklch, var(--m2-heat) var(--heat, 0%), white);
    border: 1px solid color-mix(in oklch, var(--m2-heat) calc(var(--heat, 0%) * 0.5), var(--m2-line));
    text-decoration: none;
    transition: transform calc(.12s / var(--mo)) ease;
  }

  .m2-heatcell:active { transform: scale(.92); }

  .m2-heatcell--today {
    border: 2px solid var(--m2-accent);
    box-shadow: 0 0 0 2px color-mix(in oklch, var(--m2-accent) 14%, transparent);
  }

  .m2-heatcell__num {
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1;
    color: var(--m2-ink);
    font-variant-numeric: tabular-nums;
  }

  .m2-heatcell__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .m2-heatcell__tick {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--m2-amber);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .m2-heatcell__count {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--m2-green-ink);
    margin-left: auto;
    line-height: 1;
  }

  /* ── tilted date tile — the −3° signature detail ── */
  .m2-datetile {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--m2-emerald);
    color: var(--m2-cream);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(-3deg);
    flex-shrink: 0;
  }

  .m2-datetile--amber {
    background: var(--m2-amber);
    color: var(--m2-amber-ink);
  }

  .m2-datetile__dow {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.85;
  }

  .m2-datetile__num {
    font-family: var(--m2-font-head);
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
  }

}

/* ── motion kill-switch (handoff: [data-motion="off"] → prefers-reduced-motion).
   All m2 animations use `both` fill and animate from hidden to base style, so
   zeroed durations render every element in its final state. ── */
@media (prefers-reduced-motion: reduce) {
  [class*="m2-"], [class*="m2-"]::before, [class*="m2-"]::after,
  [class*="mobile-masthead"], [class*="mobile-masthead"]::before, [class*="mobile-masthead"]::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
}

/* ── watch face "When times line up" (iteration 72, day sheet Details tab).
   Mobile-only: hidden at all widths, revealed inside the media block below —
   the day dialog itself is shared desktop+mobile with no JS gating.
   Dynamic values arrive as style-attribute custom properties
   (--wf-x/-t/-l/-w/-hue/-stops) set by the renderers in calendar.ejs. ── */
.m2-wf { display: none; }

@media (max-width: 768px) {

  .m2-wf { display: block; }

  .m2-wf__label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--m2-muted);
    margin: 0 0 8px;
  }

  .m2-wf__card {
    background: var(--m2-paper);
    border: 1px solid var(--m2-line);
    border-radius: 14px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* flip board */
  .m2-wf-flip { position: relative; width: 100%; }

  .m2-wf-flip__stage {
    display: grid;
    width: 100%;
    align-items: center;
    perspective: 900px;
  }

  .m2-wf-face {
    grid-area: 1 / 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform calc(0.75s / var(--mo)) cubic-bezier(0.4, 0.1, 0.25, 1);
  }

  .m2-wf-face--front { transform: rotateY(0); }
  .m2-wf-face--back  { transform: rotateY(-180deg); pointer-events: none; }
  .m2-wf-flip--flipped .m2-wf-face--front { transform: rotateY(180deg); pointer-events: none; }
  .m2-wf-flip--flipped .m2-wf-face--back  { transform: rotateY(0); pointer-events: auto; }

  .m2-wf-flipbtn {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1.5px solid var(--m2-line);
    background: var(--m2-paper);
    color: var(--m2-emerald-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(20, 30, 20, 0.12);
    cursor: pointer;
  }

  .m2-wf-flipbtn__icon {
    transition: transform calc(0.75s / var(--mo)) cubic-bezier(0.4, 0.1, 0.25, 1);
  }

  .m2-wf-flip--flipped .m2-wf-flipbtn__icon { transform: rotate(180deg); }

  /* front · round dial */
  .m2-wf-dial { position: relative; width: 196px; height: 196px; }

  .m2-wf-dial__svg { display: block; overflow: visible; }

  .m2-wf-tick { stroke: var(--m2-line); stroke-width: 1.2; stroke-linecap: round; }
  .m2-wf-tick--major { stroke: var(--m2-muted); stroke-width: 2; }

  .m2-wf-hlabel { font: 800 9px var(--m2-font-body); fill: var(--m2-muted); }

  .m2-wf-ring-track { fill: none; stroke: var(--m2-bg); stroke-width: 16; }
  .m2-wf-arc { fill: none; stroke-width: 16; } /* stroke = heat color attribute */

  .m2-wf-mark { stroke: var(--m2-accent); stroke-width: 2.4; stroke-linecap: round; }

  .m2-wf-dial__readout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  /* digital readout (both faces) */
  .m2-wf-digital { text-align: center; }

  .m2-wf-digital__range {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    color: var(--m2-ink);
  }

  .m2-wf-digital--sm .m2-wf-digital__range { font-size: 19px; }

  .m2-wf-digital__cap {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 3px;
    color: var(--m2-green-ink);
  }

  .m2-wf-digital__range--none,
  .m2-wf-digital__cap--none { color: var(--m2-muted); }

  /* back · strap lanes */
  .m2-wf-lanes { width: 100%; }

  .m2-wf-axis { position: relative; height: 12px; margin: 0 0 4px 60px; }

  .m2-wf-axis__tick {
    position: absolute;
    left: var(--wf-x);
    transform: translateX(-50%);
    font-size: 8.5px;
    font-weight: 800;
    color: var(--m2-muted);
    font-variant-numeric: tabular-nums;
  }

  .m2-wf-plot { position: relative; }

  .m2-wf-guide {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(60px + (100% - 60px) * var(--wf-t));
    width: 0;
    border-left: 1.5px dashed var(--m2-accent);
    z-index: 2;
  }

  .m2-wf-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
  }

  .m2-wf-row:first-of-type { margin-bottom: 7px; } /* overlap bar row */

  .m2-wf-rowlabel {
    width: 52px;
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .m2-wf-rowlabel--overlap {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--m2-green-ink);
  }

  .m2-wf-rowlabel__id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
  }

  .m2-wf-name {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--m2-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m2-wf-av {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .m2-wf-allday-cap {
    font-style: normal;
    font-size: 8px;
    font-weight: 700;
    color: var(--m2-muted);
    opacity: 0.75;
  }

  .m2-wf-overlap {
    flex: 1;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, var(--wf-stops));
  }

  .m2-wf-lane {
    flex: 1;
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--m2-bg);
  }

  .m2-wf-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--wf-l);
    width: var(--wf-w);
    border-radius: 4px;
    background: oklch(0.56 0.12 var(--wf-hue));
  }

  /* all-day: fills the crop and dissolves off both edges — "free the whole
     visible range and beyond" */
  .m2-wf-bar--allday {
    left: 0;
    width: 100%;
    border-radius: 0;
    background: linear-gradient(90deg,
      transparent,
      oklch(0.56 0.12 var(--wf-hue)) 14%,
      oklch(0.56 0.12 var(--wf-hue)) 86%,
      transparent);
  }

  .m2-wf-lanes__readout {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

}
