/* =========================================================
   Ted · Cockpit Maki — « l'agence qui donne la banane »
   ========================================================= */

:root {
  --banana: #FFD23F;
  --banana-2: #FFE68A;
  --banana-deep: #F2B705;
  --on-banana: #17161C;
  --ink: #17161C;
  --ink-2: #3A3945;
  --bg: #FAF6EC;
  --surface: #FFFFFF;
  --surface-2: #F4EFE2;
  --line: #ECE5D3;
  --line-2: #DAD1BA;
  --muted: #77736A;
  --red: #E8452F;
  --orange: #FF9A1F;
  --orange-ink: #B35C00;
  --green: #1F9D5F;
  --blue: #3D7BFF;
  --nav: #17161C;
  --shadow: 0 1px 2px rgba(23, 22, 28, .04), 0 10px 28px -14px rgba(23, 22, 28, .16);
  --shadow-lg: 0 30px 70px -24px rgba(23, 22, 28, .38);
  --r: 22px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --tab-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F5F1E6; --ink-2: #D8D3C5; --bg: #111015; --surface: #1A1920; --surface-2: #23222B;
    --line: #2C2B34; --line-2: #3B3A45; --muted: #9D988B; --orange-ink: #FFB25C; --nav: #0B0B0E;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 30px -16px rgba(0,0,0,.7);
    --shadow-lg: 0 30px 70px -24px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F5F1E6; --ink-2: #D8D3C5; --bg: #111015; --surface: #1A1920; --surface-2: #23222B;
  --line: #2C2B34; --line-2: #3B3A45; --muted: #9D988B; --orange-ink: #FFB25C; --nav: #0B0B0E;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 30px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100dvh;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 105% -8%, rgba(255, 210, 63, .22), transparent 62%),
    radial-gradient(700px 380px at -10% 110%, rgba(255, 154, 31, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
::selection { background: var(--banana); color: var(--on-banana); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--banana-deep) 80%, transparent); outline-offset: 2px; border-radius: 10px; }

.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }

/* ---------- Typo ---------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 6.4vw, 46px);
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 6px 0 0;
}
.display small { font-size: .42em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.eyebrow { margin: 0; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.lead { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; max-width: 62ch; }
h2 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
h3 { margin: 0; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100dvh; }
.main { flex: 1; min-width: 0; }
.sidebar { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
}
.brand-mini { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 20px; }
.brand-mini img { border-radius: 10px; }

.view { padding: 6px 16px calc(var(--tab-h) + 120px + var(--safe-b)); max-width: 1240px; margin: 0 auto; }

.tabbar {
  position: fixed; z-index: 30;
  left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
  height: var(--tab-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  background: var(--nav);
  border-radius: 24px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: rgba(255, 255, 255, .55);
  font-size: 10.5px; font-weight: 700; border-radius: 18px;
  transition: color .2s, background .2s;
}
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.active { color: var(--on-banana); background: var(--banana); }

@media (min-width: 980px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 24px;
    position: sticky; top: 0; height: 100dvh; width: 252px; flex: none;
    padding: 24px 16px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 55%, transparent);
  }
  .tabbar, .topbar { display: none; }
  .view { padding: 42px 44px 100px; }
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 8px; }
.brand img { border-radius: 13px; box-shadow: 0 8px 20px -8px rgba(242, 183, 5, .8); }
.brand strong { display: block; font-family: var(--display); font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.brand small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.nav { display: grid; gap: 4px; }
.nav a, .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 14px; border: 0; background: none; width: 100%;
  font-weight: 650; font-size: 14.5px; color: var(--ink-2); text-decoration: none; cursor: pointer; text-align: left;
  transition: background .18s, color .18s;
}
.nav a:hover, .nav-link:hover { background: var(--surface-2); }
.nav a.active, .nav-link.active { background: var(--banana); color: var(--on-banana); }
.nav a .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; }

/* ---------- Blocs ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
}
@media (min-width: 760px) { .card { padding: 22px; } }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.link { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 13px; color: var(--muted); text-decoration: none; }
.link:hover { color: var(--ink); }
.link .ic { width: 16px; height: 16px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 880px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 18px; } }
.stack { display: grid; gap: 16px; }

.hero { padding: 8px 2px 20px; }
.bob { display: inline-block; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes bob { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(11deg) translateY(-2px); } }

.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }

/* Briefing */
.brief {
  position: relative; overflow: hidden; margin-bottom: 16px;
  background: linear-gradient(135deg, #FFE68A 0%, #FFD23F 48%, #FFBE1A 100%);
  border: 0; color: var(--on-banana);
  box-shadow: 0 22px 50px -26px rgba(242, 160, 5, .9);
}
.brief::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 65%); pointer-events: none;
}
.brief .muted { color: rgba(23, 22, 28, .62); }
.brief-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brief-head h2 { color: var(--on-banana); }
.brief-head p { margin: 0; }
.brief-actions { margin-left: auto; display: flex; gap: 6px; }
.brief .icon-btn { background: rgba(255, 255, 255, .5); color: var(--on-banana); }
.brief .icon-btn:hover { background: rgba(255, 255, 255, .8); }
.brief-text { position: relative; z-index: 1; margin-top: 14px; font-size: 16.5px; line-height: 1.6; font-weight: 500; }
.brief-text p { margin: 0 0 8px; }
.mini-orb { position: relative; width: 42px; height: 42px; flex: none; }
.mini-orb .orb-core { inset: 4px; }

.shimmer {
  display: block; height: 14px; border-radius: 8px; margin: 10px 0;
  background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.14), rgba(0,0,0,.06));
  background-size: 200% 100%; animation: sh 1.2s linear infinite;
}
.w80 { width: 80%; } .w60 { width: 60%; }
@keyframes sh { to { background-position: -200% 0; } }
.skel {
  height: 130px; border-radius: var(--r); margin-bottom: 14px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2));
  background-size: 200% 100%; animation: sh 1.3s linear infinite;
}

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); }
.kpi b { display: block; font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.kpi.hot b { color: var(--red); }
.kpi.warn b { color: var(--orange); }

/* ---------- Tâches & cases à cocher ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px dashed var(--line);
  animation: none;
}
.task:last-child { border-bottom: 0; }
.check {
  flex: none; width: 30px; height: 30px; padding: 0; border: 0; background: none;
  cursor: pointer; border-radius: 50%;
}
.check svg { width: 30px; height: 30px; display: block; overflow: visible; }
.c-ring { fill: transparent; stroke: var(--line-2); stroke-width: 2.2; transition: fill .25s, stroke .25s; }
.lvl-haute .c-ring { stroke: color-mix(in srgb, var(--red) 60%, var(--line-2)); }
.lvl-moyenne .c-ring { stroke: color-mix(in srgb, var(--orange) 55%, var(--line-2)); }
.check:hover .c-ring { stroke: var(--banana-deep); fill: color-mix(in srgb, var(--banana) 22%, transparent); }
.c-tick {
  fill: none; stroke: var(--on-banana); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset .32s .06s cubic-bezier(.6, 0, .3, 1);
}
.is-done .c-ring, .is-done .check:hover .c-ring { fill: var(--banana); stroke: var(--banana-deep); }
.is-done .c-tick { stroke-dashoffset: 0; }
.check.pop { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.32) rotate(-8deg); } 100% { transform: scale(1); } }

.task-main { flex: 1; min-width: 0; cursor: pointer; display: grid; gap: 5px; }
.task-title-wrap { display: block; font-weight: 650; line-height: 1.35; }
.task-title {
  display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 1.8px;
  transition: background-size .38s cubic-bezier(.6, 0, .3, 1), color .3s;
}
.is-done .task-title { background-size: 100% 1.8px; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.is-done .task-meta { opacity: .55; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, #999) 18%, transparent); color: var(--ink-2);
  white-space: nowrap;
}
.tag.ghost { background: var(--surface-2); }
.tag .ic { width: 13px; height: 13px; }
.tag.due.late { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.tag.due.today { background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange-ink); }

.heat { display: flex; gap: 3px; align-items: flex-end; height: 16px; flex: none; padding: 0 2px; }
.heat i { width: 4px; border-radius: 2px; background: var(--line-2); }
.heat i:nth-child(1) { height: 6px; } .heat i:nth-child(2) { height: 10px; } .heat i:nth-child(3) { height: 15px; }
.h-basse i:nth-child(1) { background: var(--green); }
.h-moyenne i:nth-child(-n+2) { background: var(--orange); }
.h-haute i { background: var(--red); }
.is-done .heat { opacity: .3; }

.group-h { display: flex; align-items: center; gap: 8px; margin: 20px 0 2px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.group-h:first-of-type { margin-top: 8px; }
.group-h span { background: var(--surface-2); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; }
.done-group summary { cursor: pointer; margin-top: 18px; color: var(--muted); font-weight: 700; font-size: 14px; list-style: none; }
.done-group summary::-webkit-details-marker { display: none; }

/* Saisie rapide */
.quick, .capture { display: flex; gap: 8px; margin-top: 12px; }
.quick input, .capture input, .in {
  flex: 1; min-width: 0; height: 48px; border-radius: 15px;
  border: 1px solid var(--line); background: var(--surface-2);
  padding: 0 15px; font: 500 16px var(--font); color: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.quick input:focus, .capture input:focus, .in:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--banana-deep); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--banana) 35%, transparent);
}
.hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.hint kbd { font: 700 11.5px var(--font); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 700 14.5px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--line-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--banana); border-color: var(--banana-deep); color: var(--on-banana); box-shadow: 0 10px 22px -12px rgba(242, 160, 5, .9); }
.btn.primary:hover { background: #FFDA5C; }
.btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.danger, .btn-sm.danger { color: var(--red); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; font-size: 13.5px; padding: 0 14px; border-radius: 12px; }
.btn:disabled, .btn-sm:disabled { opacity: .55; pointer-events: none; }
.btn-sm {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); font: 700 13px var(--font); cursor: pointer;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn-sm.yellow { background: var(--banana); border-color: var(--banana-deep); color: var(--on-banana); }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-round {
  width: 48px; height: 48px; flex: none; border-radius: 15px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
  transition: background .2s, color .2s, transform .15s;
}
.btn-round:hover { background: var(--banana); color: var(--on-banana); }
.btn-round:active { transform: scale(.94); }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 13px; border: 0; cursor: pointer;
  background: var(--surface-2); color: inherit; display: grid; place-items: center; text-decoration: none;
  transition: background .2s;
}
.icon-btn:hover { background: var(--line); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

/* ---------- Puces / filtres ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.chip-f {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 700 13px var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip-f:hover { border-color: var(--line-2); }
.chip-f.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-f em { font-style: normal; opacity: .55; font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #999); flex: none; }

.chip { position: relative; display: inline-flex; }
.chip input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.chip input:checked + span { background: var(--banana); border-color: var(--banana-deep); color: var(--on-banana); }
.chip input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--banana-deep); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.seg label { position: relative; }
.seg span { display: block; text-align: center; padding: 9px 4px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .2); }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 12px 14px; font: 500 16px var(--font); color: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; gap: 15px; }
@media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
.due-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.due-row input { flex: 1 1 160px; }
.sheet-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.sheet-actions .primary { margin-left: auto; }
.alert { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); padding: 11px 14px; border-radius: 13px; font-weight: 600; font-size: 14px; }
.note { background: var(--surface-2); padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--ink-2); }
.note code, .code { font-size: 12.5px; word-break: break-all; }
.code { display: block; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-top: 6px; user-select: all; }

/* ---------- Pipe (kanban) ---------- */
.strip { display: flex; gap: 10px; overflow-x: auto; align-items: center; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.stat { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 15px; }
.stat b { display: block; font-family: var(--display); font-size: 20px; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 650; }
.switch { flex: none; display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0 6px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + i { background: var(--banana-deep); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 3px solid var(--banana-deep); outline-offset: 2px; }

.board {
  display: flex; gap: 12px; overflow-x: auto; align-items: flex-start;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding: 10px 16px 18px; scroll-padding: 0 16px;
}
@media (min-width: 980px) { .board { margin: 0; padding: 10px 0 18px; scroll-padding: 0; } }
.col {
  flex: 0 0 min(84vw, 286px); scroll-snap-align: start;
  background: var(--surface-2); border-radius: 22px; padding: 12px;
  border: 2px dashed transparent; transition: border-color .2s, background .2s;
}
.col.over { border-color: var(--banana-deep); background: color-mix(in srgb, var(--banana) 16%, var(--surface-2)); }
.col-h { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; padding: 2px 4px 0; }
.count { min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface); display: grid; place-items: center; font-size: 12px; }
.col-sum { margin: 2px 4px 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; min-height: 18px; }
.col-body { display: grid; gap: 10px; min-height: 70px; }
.col-empty { margin: 0; padding: 20px 6px; text-align: center; font-size: 13px; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: 15px; }
.deal {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 17px;
  padding: 13px 14px; cursor: pointer; box-shadow: var(--shadow); user-select: none;
  transition: transform .18s, box-shadow .18s, opacity .18s;
}
@media (hover: hover) { .deal { cursor: grab; } .deal:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(23, 22, 28, .35); } }
.deal.dragging { opacity: .4; transform: rotate(-2deg) scale(.98); }
.deal.due { border-color: color-mix(in srgb, var(--orange) 60%, var(--line)); }
.deal.land { animation: land .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes land { from { transform: scale(.9); } }
.deal-top { display: flex; align-items: center; gap: 8px; }
.deal h3 { font-size: 15px; font-weight: 750; line-height: 1.25; }
.deal-sub { margin: 4px 0 0 17px; font-size: 13px; color: var(--muted); }
.deal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.amount { font-family: var(--display); font-weight: 750; font-size: 15px; }
.silence { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.s-orange { background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange-ink); }
.s-red { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.due-badge { position: absolute; top: -9px; right: 12px; background: var(--orange); color: var(--on-banana); font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; box-shadow: 0 6px 14px -6px rgba(255, 154, 31, .9); letter-spacing: .02em; }

/* Relances & agenda */
.follow { list-style: none; margin: 0; padding: 0; }
.fr { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.fr:last-child { border-bottom: 0; }
.fr div { flex: 1; min-width: 0; display: grid; }
.fr strong { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 9px 0; align-items: start; }
.ev time { font-family: var(--display); font-weight: 750; font-size: 15px; padding-top: 1px; }
.ev-card { border-left: 3px solid var(--banana); padding: 1px 0 1px 12px; min-width: 0; }
.ev-card strong { display: block; font-weight: 700; }
.ev-card span { font-size: 13px; color: var(--muted); }
.ev-card a { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.ev.past { opacity: .45; }
.ev.now .ev-card { border-color: var(--red); }
.ev.now time::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: middle; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.captures { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.captures li { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 13px; padding: 8px 8px 8px 14px; font-size: 14px; }
.captures li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cap-act { display: flex; gap: 4px; }
.cap-act .icon-btn { background: var(--surface); }

.empty { padding: 22px 8px; color: var(--muted); text-align: center; font-weight: 550; }
.empty-big { text-align: center; padding: 36px 22px; }
.empty-big .em { font-size: 42px; display: block; margin-bottom: 8px; }
.empty-big p { color: var(--ink-2); max-width: 46ch; margin: 8px auto 18px; }

/* ---------- Mails ---------- */
.mail-list { display: grid; gap: 12px; }
@media (min-width: 880px) { .mail-list { grid-template-columns: 1fr 1fr; } }
.mail { background: var(--surface); border: 1px solid var(--line); border-radius: 19px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mail.unread { box-shadow: inset 4px 0 0 var(--banana), var(--shadow); }
.mail.gone { animation: gone .35s forwards; }
@keyframes gone { to { opacity: 0; transform: translateX(24px); } }
.mail-top { display: flex; align-items: center; gap: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 13px; background: var(--banana); color: var(--on-banana); display: grid; place-items: center; font: 800 16px var(--display); flex: none; }
.mail-who { display: grid; min-width: 0; }
.mail-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-who time { font-size: 12px; color: var(--muted); }
.mail h3 { font-size: 15.5px; margin: 12px 0 4px; line-height: 1.32; font-weight: 750; }
.mail-sum { margin: 0; color: var(--ink-2); font-size: 14px; }
.mail-next { margin: 9px 0 0; font-size: 13px; font-weight: 700; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 13px; }

/* ---------- Pouls ---------- */
.goal { background: linear-gradient(135deg, #FFE68A, #FFD23F 55%, #FFBE1A); color: var(--on-banana); border: 0; }
.goal .muted { color: rgba(23, 22, 28, .65); }
.goal-num { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 8vw, 52px); letter-spacing: -.04em; line-height: 1; margin: 6px 0 2px; }
.bar { position: relative; height: 18px; border-radius: 999px; background: rgba(23, 22, 28, .12); margin: 18px 0 8px; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--on-banana); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); position: relative; }
.bar i::after { content: "🍌"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); font-size: 22px; }
.bars { width: 100%; height: auto; display: block; }
.bars rect { fill: var(--line-2); transition: fill .2s; }
.bars rect.cur { fill: var(--banana-deep); }
.bars text { font: 600 11px var(--font); fill: var(--muted); }
.bars .val { font: 800 10.5px var(--font); fill: var(--ink-2); }
.fn { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: 13px; margin: 9px 0; font-weight: 600; }
.fn .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.fn .track i { display: block; height: 100%; background: var(--banana-deep); border-radius: inherit; }
.fn b { font-weight: 800; min-width: 22px; text-align: right; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.big-stats div { background: var(--surface-2); border-radius: 16px; padding: 12px; }
.big-stats b { display: block; font-family: var(--display); font-size: 24px; letter-spacing: -.02em; }
.big-stats span { font-size: 12px; color: var(--muted); font-weight: 650; }

/* ---------- Réglages ---------- */
.settings { display: grid; gap: 16px; }
@media (min-width: 900px) { .settings { grid-template-columns: 1fr 1fr; align-items: start; } }
.act-row { display: grid; grid-template-columns: 56px 1fr 46px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.act-row .in { height: 46px; padding: 0 12px; }
.emoji-in { text-align: center; font-size: 21px !important; padding: 0 !important; }
input[type="color"] { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 13px; padding: 4px; background: var(--surface-2); cursor: pointer; }
.row-actions { display: flex; gap: 4px; }
.g-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 15px; margin-bottom: 12px; }
.g-status .led { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.g-status .led.on { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.set-line:last-child { border-bottom: 0; }

/* ---------- Feuille (sheet) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 14, 20, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .28s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(26px + var(--safe-b));
  transform: translateY(105%); transition: transform .42s cubic-bezier(.2, .9, .25, 1);
  box-shadow: var(--shadow-lg); overscroll-behavior: contain; visibility: hidden;
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 0 auto 12px; }
.sheet.open { transform: none; visibility: visible; }
@media (min-width: 760px) {
  .sheet { left: auto; top: 12px; bottom: 12px; right: 12px; width: 500px; max-height: none; border-radius: 28px; transform: translateX(112%); padding: 24px 26px; }
  .sheet::before { display: none; }
}
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet-h h2 { font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.sec-h { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 24px 0 8px; }
.stage-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.stage-chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 700 12.5px var(--font); cursor: pointer; color: var(--ink-2); transition: background .2s, color .2s; }
.stage-chip:hover { border-color: var(--line-2); }
.stage-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 13px 6px 11px; border-radius: 17px; border: 0; background: var(--surface-2); font-size: 21px; color: var(--ink); text-decoration: none; cursor: pointer; transition: background .2s, transform .15s; }
.qa span { font: 700 12px var(--font); text-align: center; }
.qa:hover { background: var(--line); }
.qa:active { transform: scale(.96); }
.qa.yellow { background: var(--banana); color: var(--on-banana); }
.client-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 15px 14px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--surface); }
.timeline .t-contact::before { background: var(--green); }
.timeline .t-stage::before { background: var(--banana-deep); }
.timeline .t-note::before { background: var(--blue); }
.timeline time { font-size: 12px; color: var(--muted); font-weight: 700; }
.timeline p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Ted : l'orbe ---------- */
.ted-orb {
  position: fixed; z-index: 40; right: 18px; bottom: calc(var(--tab-h) + 22px + var(--safe-b));
  width: 64px; height: 64px; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer;
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .25s;
}
@media (min-width: 980px) { .ted-orb { right: 30px; bottom: 30px; width: 72px; height: 72px; } }
.ted-orb:hover { transform: scale(1.06); }
.ted-orb:active { transform: scale(.94); }
body.ted-open .ted-orb { transform: scale(0); opacity: 0; pointer-events: none; }
.orb-core {
  position: absolute; inset: 7px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFFBE6 0%, #FFE680 20%, #FFD23F 44%, #F7A600 78%, #C47500 100%);
  box-shadow: 0 12px 30px -6px rgba(245, 163, 0, .7), inset 0 -7px 14px rgba(150, 80, 0, .35), inset 0 4px 10px rgba(255, 255, 255, .65);
  transition: transform .3s;
}
.orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 14%, rgba(255, 210, 63, .95) 32%, transparent 50%, rgba(255, 154, 31, .85) 70%, transparent 88%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 73%);
  mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 73%);
  animation: spin 7s linear infinite;
}
.orb-label { display: none; position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font: 800 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 980px) { .orb-label { display: block; } }
.ted-orb::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--banana); opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.1); } }
@keyframes halo { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }
@keyframes talk { to { transform: scale(1.09); } }
body[data-ted="listening"] .orb-core { animation: breathe 1s ease-in-out infinite; }
body[data-ted="listening"] .ted-orb::after,
body[data-ted="listening"] .ted-avatar::after { animation: halo 1.2s ease-out infinite; }
body[data-ted="thinking"] .orb-ring { animation-duration: 1s; }
body[data-ted="speaking"] .orb-core { animation: talk .38s ease-in-out infinite alternate; }

/* ---------- Ted : panneau ---------- */
.ted-panel {
  position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column;
  background: var(--bg); visibility: hidden;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1), visibility 0s linear .45s;
}
.ted-panel.open { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2, .9, .25, 1); }
@media (min-width: 760px) {
  .ted-panel {
    inset: auto 22px 22px auto; width: 430px; height: min(740px, calc(100dvh - 44px));
    border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden;
    transform: translateY(24px) scale(.96); opacity: 0;
    transition: transform .32s cubic-bezier(.2, .9, .25, 1), opacity .25s, visibility 0s linear .32s;
  }
  .ted-panel.open { transform: none; opacity: 1; transition: transform .32s cubic-bezier(.2, .9, .25, 1), opacity .25s; }
}
.ted-head { display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-t)) 16px 13px; border-bottom: 1px solid var(--line); background: var(--surface); }
@media (min-width: 760px) { .ted-head { padding-top: 16px; } }
.ted-head h2 { font-size: 21px; line-height: 1.1; }
.ted-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ted-avatar { position: relative; width: 46px; height: 46px; flex: none; }
.ted-avatar .orb-core { inset: 5px; }
.ted-avatar::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--banana); opacity: 0; }
.ted-msgs { flex: 1; overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; max-width: 88%; animation: msgIn .35s cubic-bezier(.2, .9, .3, 1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.ted { align-self: flex-start; }
.bubble { padding: 11px 15px; border-radius: 21px; font-size: 15px; line-height: 1.52; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 7px; }
.bubble p:last-child { margin: 0; }
.msg.user .bubble { background: var(--ink); color: var(--bg); border-bottom-right-radius: 7px; }
.msg.ted .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 7px; }
.msg.err .bubble { border-color: var(--red); color: var(--red); }
.msg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.msg-acts span { font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--banana) 35%, transparent); padding: 4px 11px; border-radius: 999px; }
.typing { display: inline-flex; gap: 5px; padding: 15px 16px !important; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tdot 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.ted-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; flex: none; }
.ted-chips::-webkit-scrollbar { display: none; }
.ted-chips .chip-f { height: 36px; }
.ted-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.ted-composer textarea {
  flex: 1; min-width: 0; resize: none; max-height: 150px; min-height: 48px; border-radius: 17px;
  border: 1px solid var(--line); background: var(--surface-2); padding: 12px 15px; font: 500 16px/1.4 var(--font); color: inherit;
}
.ted-composer textarea:focus { outline: none; border-color: var(--banana-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--banana) 35%, transparent); }
.mic, .send { width: 48px; height: 48px; flex: none; border-radius: 16px; border: 0; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .15s; }
.mic { background: var(--banana); color: var(--on-banana); }
.send { background: var(--ink); color: var(--bg); }
.mic:active, .send:active { transform: scale(.93); }
body[data-ted="listening"] .mic { background: var(--red); color: #fff; animation: breathe 1s ease-in-out infinite; }

/* ---------- Toasts & confettis ---------- */
.toasts { position: fixed; z-index: 100; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: #17161C; color: #fff; padding: 12px 18px; border-radius: 15px; font-weight: 700; font-size: 14px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .25s, transform .3s cubic-bezier(.3, 1.4, .5, 1); text-align: center; }
.toast.in { opacity: 1; transform: none; }
.toast.err { background: var(--red); }
.toast.party { background: var(--banana); color: var(--on-banana); font-size: 16px; padding: 14px 22px; }
.confetti { position: fixed; inset: 0; z-index: 120; pointer-events: none; overflow: hidden; }
.bit { position: absolute; width: 7px; height: 7px; border-radius: 2px; animation: bit .9s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes bit { from { transform: translate(-50%, -50%); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(.5); opacity: 0; } }
.fall { position: absolute; top: -30px; width: 9px; height: 15px; border-radius: 3px; animation: fall 2.4s cubic-bezier(.3, .4, .55, 1) forwards; }
.fall.emoji { width: auto; height: auto; font-size: 26px; background: none !important; }
@keyframes fall { to { transform: translate(var(--dx), 112vh) rotate(var(--r)); } }

/* ---------- Entrée des vues ---------- */
.view.enter > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; }
.view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; }
.view.enter > *:nth-child(5) { animation-delay: .16s; }
.view.enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Connexion / installation ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 34px 26px 28px; box-shadow: var(--shadow-lg); }
.auth-card > .eyebrow, .auth-card > .display, .auth-card > .lead { text-align: center; margin-left: auto; margin-right: auto; }
.auth-card .form { margin-top: 22px; }
.auth-orb { position: relative; width: 92px; height: 92px; margin: 0 auto 16px; }
.install .auth-card { width: min(640px, 100%); }
.install fieldset { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 14px; }
.install legend { font: 800 17px var(--display); margin-bottom: 4px; padding: 0; }
.checks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.checks .ok::before { content: "✅ "; }
.checks .ko::before { content: "❌ "; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--banana-deep); margin-top: 1px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Mode conversation ---------- */
.convo-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 13px; border: 0; cursor: pointer;
  background: var(--banana); color: var(--on-banana); font: 800 13.5px var(--font);
  box-shadow: 0 8px 18px -10px rgba(242, 160, 5, .9); transition: background .2s, transform .15s;
}
.convo-btn:active { transform: scale(.95); }
.convo-btn .ic { width: 18px; height: 18px; }
body.convo-on .convo-btn { background: var(--red); color: #fff; box-shadow: 0 8px 18px -10px rgba(232, 69, 47, .9); }
.convo-bar {
  display: none; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(90deg, #FFE68A, #FFD23F); color: var(--on-banana); font-weight: 700; font-size: 14px;
}
.convo-bar #convoText { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-bar .btn-sm { background: rgba(255, 255, 255, .65); border-color: transparent; color: var(--on-banana); }
body.convo-on .convo-bar { display: flex; }
.convo-wave { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.convo-wave i { width: 4px; height: 6px; border-radius: 3px; background: var(--on-banana); opacity: .75; }
body[data-ted="listening"] .convo-wave i { animation: wave .9s ease-in-out infinite; }
body[data-ted="speaking"] .convo-wave i { animation: wave .55s ease-in-out infinite; }
body[data-ted="thinking"] .convo-wave i { animation: wave 1.4s ease-in-out infinite; opacity: .4; }
.convo-wave i:nth-child(2) { animation-delay: .1s !important; }
.convo-wave i:nth-child(3) { animation-delay: .2s !important; }
.convo-wave i:nth-child(4) { animation-delay: .3s !important; }
.convo-wave i:nth-child(5) { animation-delay: .4s !important; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.brief .talk { background: var(--on-banana); color: #FFE68A; border-color: transparent; height: 40px; padding: 0 14px; border-radius: 13px; }
@media (max-width: 520px) {
  .brief-head { flex-wrap: wrap; }
  .brief-actions { width: 100%; margin-left: 0; }
  .brief .talk { flex: 1; justify-content: center; }
  .convo-btn span { display: none; }
  .convo-btn { padding: 0 11px; }
}
.auth-logo { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 16px; border-radius: 22px; }
