/* JEV — design system Verticci: Grafite Carbono, Marfim Mineral, Azul Cobalto (docs/02-cor.md);
   Sora para títulos, Inter para texto, IBM Plex Mono para horários e rótulos (docs/03-tipografia.md). */
:root {
  --f-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-serif: 'Sora', 'Inter', sans-serif; /* display */
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --bg: #111315;            /* Grafite Carbono */
  --bg-2: #0D0F11;
  --surface: #181B1E;
  --raised: #202428;
  --overlay: #262A2F;
  --line: rgba(242, 240, 233, .07);
  --line-2: rgba(242, 240, 233, .13);
  --text: #F2F0E9;          /* Marfim Mineral */
  --text-2: #C9C7C0;
  --muted: #8D939A;         /* Cinza Metálico */
  --faint: #5C616A;
  --accent: #3657FF;        /* Azul Cobalto */
  --accent-ink: #FFFFFF;
  --accent-text: #6F82FF;
  --accent-soft: rgba(54, 87, 255, .14);
  --accent-line: rgba(111, 130, 255, .45);
  --ok: #3FC49B; --ok-soft: rgba(63, 196, 155, .12);
  --warn: #E8A93A; --warn-soft: rgba(232, 169, 58, .12);
  --bad: #F0705F; --bad-soft: rgba(240, 112, 95, .12);
  --info: #6F82FF;
  --shadow: 0 1px 0 rgba(242,240,233,.03) inset, 0 12px 32px -12px rgba(0,0,0,.6);
  --r-lg: 18px; --r: 12px; --r-sm: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2F0E9; --bg-2: #E8E5DC; --surface: #FAF9F5; --raised: #FFFFFF; --overlay: #FFFFFF;
    --line: rgba(17, 19, 21, .08); --line-2: rgba(17, 19, 21, .14);
    --text: #111315; --text-2: #3A3E44; --muted: #5C616A; --faint: #8D939A;
    --accent: #3657FF; --accent-ink: #FFFFFF; --accent-text: #2843D6; --accent-soft: rgba(54, 87, 255, .09); --accent-line: rgba(40, 67, 214, .4);
    --ok: #1A7358; --ok-soft: rgba(26, 115, 88, .09); --warn: #8F5F0B; --warn-soft: rgba(143, 95, 11, .09); --bad: #B33326; --bad-soft: rgba(179, 51, 38, .08); --info: #2843D6;
    --shadow: 0 1px 2px rgba(17,19,21,.04), 0 12px 32px -16px rgba(17,19,21,.18);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--f-ui); -webkit-font-smoothing: antialiased; overflow: hidden; letter-spacing: -.003em; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 224px minmax(0, 1fr) 320px; height: 100dvh; }
.rail { display: flex; flex-direction: column; padding: 18px 12px 16px; background: var(--bg-2); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 24px; font: 600 16px var(--f-serif); letter-spacing: .02em; }
.brand small { font: 400 11px var(--f-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-left: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav button { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 9px; color: var(--muted); font-weight: 500; text-align: left; transition: background .18s var(--ease), color .18s var(--ease); }
.nav button:hover { background: var(--line); color: var(--text); }
.nav button.on { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.nav button.on svg { color: var(--accent); }
.nav button em { margin-left: auto; font: 500 11px var(--f-mono); font-style: normal; color: var(--muted); background: var(--line); padding: 1px 7px; border-radius: 99px; }
.nav button em:empty { display: none; }
.nav button em.alert { color: var(--bad); background: var(--bad-soft); }
.nav-settings { margin-top: auto; }
.rail-foot { padding: 12px 10px 0; border-top: 1px solid var(--line); margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--faint); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

.main { position: relative; min-width: 0; overflow: hidden; }
.view { display: none; height: 100%; flex-direction: column; }
.view.on { display: flex; animation: rise .28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(20px + var(--safe-t)) 36px 14px; min-height: 72px; }
.top h1 { font: 600 19px/1.2 var(--f-serif); letter-spacing: -.015em; margin: 0; }
.top .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.page { flex: 1; overflow-y: auto; padding: 4px 36px 120px; }
.page > * { max-width: 760px; }

/* ---------- conversa ---------- */
.log { flex: 1; overflow-y: auto; padding: 8px 36px 28px; scroll-behavior: smooth; }
.log > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 26px auto 14px; color: var(--faint); font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.turn { display: flex; margin: 10px auto; animation: rise .3s var(--ease); }
.turn.user { justify-content: flex-end; }
.turn.user .bubble { background: var(--raised); border: 1px solid var(--line); padding: 9px 14px; border-radius: 16px 16px 4px 16px; max-width: min(560px, 85%); white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.assistant { gap: 12px; align-items: flex-start; }
.avatar { width: 26px; height: 26px; border-radius: 8px; flex: none; margin-top: 1px; background: url(/icon.svg) center/cover; }
.turn.assistant .content { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.content p { margin: 0 0 8px; } .content p:last-child { margin-bottom: 0; }
.content ul { margin: 6px 0 8px; padding: 0; list-style: none; }
.content li { position: relative; padding: 5px 0 5px 16px; border-bottom: 1px solid var(--line); }
.content li:last-child { border-bottom: 0; }
.content li::before { content: ''; position: absolute; left: 2px; top: 14px; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.content strong { font-weight: 600; }
.content em { color: var(--muted); font-style: normal; }
.content .h { font: 500 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 0 2px; }
.time { font: 400 12.5px var(--f-mono); color: var(--accent-text); }

/* Cartão de ação: o que o assistente fez */
.action { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.action .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.action.ok .ico { background: var(--ok-soft); color: var(--ok); }
.action.warn { border-color: var(--accent-line); }
.action.bad .ico, .action.err .ico { background: var(--bad-soft); color: var(--bad); }
.action .body { flex: 1; min-width: 0; }
.action .label { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.action .main-line { margin-top: 1px; }
.action.undone { opacity: .5; } .action.undone .main-line { text-decoration: line-through; }
.acts-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: all .16s var(--ease); }
.chipbtn svg { width: 14px; height: 14px; }
.chipbtn:hover { color: var(--text); border-color: var(--faint); }
.chipbtn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chipbtn.primary:hover { filter: brightness(1.06); }
.chipbtn:disabled { opacity: .45; pointer-events: none; }
.via { font: 400 11px var(--f-mono); color: var(--faint); margin-top: 6px; }

.thinking { display: flex; gap: 12px; align-items: center; margin: 12px auto; color: var(--muted); font-size: 13px; }
.thinking .avatar { animation: pulse 1.4s ease-in-out infinite; }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, var(--text) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .55; transform: scale(.94); } }

/* Estado vazio */
.hello { max-width: 640px; margin: 9vh auto 0; animation: rise .4s var(--ease); }
.hello h2 { font: 600 40px/1.1 var(--f-serif); letter-spacing: -.03em; margin: 0 0 10px; }
.hello h2 i { color: var(--accent-text); font-style: normal; }
.hello p { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.starter { text-align: left; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color .18s, transform .18s var(--ease), background .18s; }
.starter:hover { border-color: var(--line-2); background: var(--raised); transform: translateY(-1px); }
.starter b { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; }
.starter b svg { color: var(--accent-text); width: 16px; height: 16px; }
.starter span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Composer */
.composer-wrap { padding: 0 36px calc(18px + var(--safe-b)); }
.composer { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 12px 12px 10px 16px; box-shadow: var(--shadow); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.composer:focus-within { border-color: var(--accent-line); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.composer textarea { width: 100%; resize: none; border: 0; background: none; outline: none; padding: 2px 0 6px; max-height: 180px; font-size: 15px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; gap: 6px; }
.kbd-hint { flex: 1; font-size: 11.5px; color: var(--faint); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 0; background: none; color: var(--muted); transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--text); background: var(--line); }
.icon-btn.rec { color: var(--bad); background: var(--bad-soft); animation: pulse 1.2s infinite; }
.send { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); transition: transform .15s var(--ease), opacity .15s; }
.send svg { stroke-width: 2; }
.send:hover { transform: translateY(-1px); }
.send:disabled { opacity: .3; transform: none; cursor: default; }

/* ---------- listas ---------- */
.group { margin: 22px 0 6px; display: flex; align-items: baseline; gap: 10px; }
.group:first-child { margin-top: 6px; }
.group h3 { margin: 0; font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.group h3.bad { color: var(--bad); }
.group .count { font: 400 12px var(--f-mono); color: var(--faint); }
.rows { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 14px; border-bottom: 1px solid var(--line); transition: background .15s; animation: rise .25s var(--ease); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--raised); }
.row .when { font: 400 12.5px var(--f-mono); color: var(--accent-text); width: 96px; flex: none; }
.row .when.dim { color: var(--muted); }
.row .t { flex: 1; min-width: 0; }
.row .t > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.row .t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.row .kind { color: var(--muted); }
.row .kind svg { width: 16px; height: 16px; }
.row.late .t small { color: var(--bad); }
.row .rm { opacity: 0; transition: opacity .15s; }
.row:hover .rm, .row:focus-within .rm { opacity: 1; }
.tick { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--line-2); background: none; padding: 0; flex: none; display: grid; place-items: center; transition: all .18s var(--ease); }
.tick:hover { border-color: var(--ok); background: var(--ok-soft); }
.tick.done { background: var(--ok); border-color: var(--ok); }
.tick.done::after { content: ''; width: 8px; height: 4px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.prio { font: 500 11px var(--f-mono); padding: 2px 8px; border-radius: 99px; color: var(--muted); background: var(--line); flex: none; }
.prio.p2 { color: var(--warn); background: var(--warn-soft); } .prio.p3 { color: var(--bad); background: var(--bad-soft); }
.row.done .t span { text-decoration: line-through; color: var(--muted); }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.empty .chipbtn { margin-top: 14px; }
.skel { height: 52px; border-radius: var(--r-sm); margin-bottom: 8px; background: linear-gradient(90deg, var(--surface) 0%, var(--raised) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.errbox { padding: 16px; border: 1px solid var(--bad-soft); background: var(--bad-soft); color: var(--bad); border-radius: var(--r); display: flex; align-items: center; gap: 12px; }

.quick-add { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); margin: 4px 0 6px; transition: border-color .2s, box-shadow .2s; }
.quick-add:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.quick-add svg { color: var(--muted); }
.quick-add input { flex: 1; border: 0; background: none; outline: none; min-width: 0; height: 34px; }
.btn-primary { height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: none; color: var(--text-2); font-weight: 500; }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }
.btn-ghost svg { width: 15px; height: 15px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 4px 0 6px; color: var(--muted); }
.search input { flex: 1; border: 0; background: none; outline: none; color: var(--text); }
.tag { font: 500 11px var(--f-mono); padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--text-2); }
details.done-list summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 13px; margin: 22px 0 8px; display: flex; align-items: center; gap: 6px; }
details.done-list summary svg { width: 14px; height: 14px; transition: transform .2s; }
details.done-list[open] summary svg { transform: rotate(90deg); }

/* Ajustes */
.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 14px; overflow: hidden; }
.card > h3 { margin: 0; padding: 14px 16px 2px; font: 500 14px var(--f-ui); }
.card > p { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 13px; }
.setrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.setrow .t { flex: 1; min-width: 0; }
.setrow .t small { display: block; color: var(--muted); font-size: 12.5px; }
.state { font: 500 11.5px var(--f-mono); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.state.ok { color: var(--ok); background: var(--ok-soft); } .state.warn { color: var(--warn); background: var(--warn-soft); } .state.off { color: var(--muted); background: var(--line); } .state.bad { color: var(--bad); background: var(--bad-soft); }
.setrow input[type=number], .setrow input[type=time], .setrow select { height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); width: 110px; }
.mono-box { display: flex; align-items: center; gap: 8px; margin: 0 16px 14px; padding: 6px 6px 6px 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.mono-box code { flex: 1; font: 12px var(--f-mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .22s var(--ease); }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(16px); background: var(--accent-ink); }

/* ---------- painel Hoje ---------- */
.today { border-left: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; padding: 22px 20px 30px; }
.today-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.eyebrow { font: 500 11px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.today h2 { font: 600 28px/1.1 var(--f-serif); margin: 4px 0 0; letter-spacing: -.03em; }
.next { padding: 14px; border-radius: var(--r); background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--accent-line); margin-bottom: 20px; }
.next .eyebrow { color: var(--accent-text); }
.next b { display: block; font-weight: 500; font-size: 15px; margin: 4px 0 2px; }
.next span { color: var(--muted); font-size: 13px; }
.tl { position: relative; margin: 0 0 20px; padding-left: 16px; }
.tl::before { content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; padding: 6px 0; }
.tl-item::before { content: ''; position: absolute; left: -16px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--faint); }
.tl-item.now::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item.past { opacity: .5; }
.tl-item .time { font-size: 12px; }
.tl-item div { font-size: 13.5px; }
.tl-item.rem div { color: var(--text-2); }
.side-h { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 4px 0 8px; display: flex; justify-content: space-between; }
.side-h button { border: 0; background: none; color: var(--muted); font: inherit; letter-spacing: inherit; padding: 0; } .side-h button:hover { color: var(--text); }
.mini { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.mini .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini small { color: var(--muted); font: 400 11.5px var(--f-mono); }
.mini.late small { color: var(--bad); }
.quiet { color: var(--faint); font-size: 13px; padding: 4px 0 16px; }

.toast { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translate(-50%, 16px) scale(.98); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 12px; background: var(--overlay); border: 1px solid var(--line-2); padding: 10px 12px 10px 16px; border-radius: 12px; transition: all .28s var(--ease); z-index: 30; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); font-size: 13.5px; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast:not(:has(button)) { padding-right: 16px; }
.scrim { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13px; }
.pill svg { width: 15px; height: 15px; color: var(--accent-text); }
.only-mobile { display: none !important; }

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 208px minmax(0, 1fr); }
  .today { position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); z-index: 20; transform: translateX(100%); transition: transform .32s var(--ease); box-shadow: -20px 0 40px rgba(0,0,0,.35); padding-top: calc(22px + var(--safe-t)); }
  .app.today-open .today { transform: none; }
  .app.today-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 15; animation: fade .2s; }
  .only-mobile { display: inline-flex !important; }
}
@keyframes fade { from { opacity: 0; } }
@media (max-width: 760px) {
  body { font-size: 15px; }
  .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { grid-row: 2; flex-direction: row; padding: 4px 6px calc(4px + var(--safe-b)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .brand, .rail-foot, .kbd-hint { display: none; }
  .nav { flex-direction: row; gap: 0; }
  .nav button { flex: 1; flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0; font-size: 10.5px; font-weight: 500; }
  .nav button.on { background: none; box-shadow: none; }
  .nav button svg { width: 21px; height: 21px; }
  .nav button em { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; font-size: 10px; padding: 0 5px; }
  .nav-settings { margin-top: 0; }
  .top { padding: calc(12px + var(--safe-t)) 18px 8px; min-height: 0; }
  .top .sub { display: none; }
  #view-tarefas .top .sub, #view-memoria .top .sub { display: none; }
  .log { padding: 4px 16px 18px; }
  .page { padding: 4px 16px 40px; }
  .composer-wrap { padding: 0 10px 8px; }
  .composer { padding: 8px 8px 8px 14px; border-radius: 22px; display: flex; align-items: flex-end; gap: 6px; }
  .composer textarea { padding: 6px 0; font-size: 16px; }
  .composer-row { flex: none; }
  .hello { margin-top: 4vh; }
  .hello h2 { font-size: 32px; }
  .starters { grid-template-columns: 1fr; }
  .starter:nth-child(n+4) { display: none; }
  .turn.user .bubble { max-width: 88%; }
  .row { padding: 10px 12px; gap: 12px; }
  .row .when { width: 74px; font-size: 12px; }
  .row .rm { opacity: 1; }
  .setrow { flex-wrap: wrap; }
  .today { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Conteúdo centrado na mesma coluna da conversa em telas largas */
@media (min-width: 761px) {
  .top, .page { padding-left: max(36px, calc((100% - 760px) / 2)); padding-right: max(36px, calc((100% - 760px) / 2)); }
}
@media (max-width: 760px) { .row .kind { display: none; } .row .when { width: 82px; } }

/* Contas: quem está logado, sair, alternar para os dados do outro sócio, itens dos dois */
.user-box { display: flex; align-items: center; justify-content: space-between; color: var(--text); font-size: 13px; font-weight: 500; padding-bottom: 6px; }
.rail-status { display: flex; flex-direction: column; gap: 6px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px 0; }
.link-btn:hover { color: var(--text); text-decoration: underline; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); gap: 2px; flex: none; }
.seg button { border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; height: 28px; padding: 0 12px; border-radius: 7px; }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.top .seg { margin-left: auto; }
.top .btn-ghost + .seg { margin-left: 8px; }
.tag.share { background: var(--accent-soft); color: var(--accent-text); }
.icon-btn.rm.on { color: var(--accent-text); opacity: 1; }
.viewing-other .rm, .viewing-other .tick:not(.done), .viewing-other .quick-add, .viewing-other #view-agenda [data-prefill] { display: none !important; }
.viewing-other .page::before { content: 'Visualizando os dados do outro sócio · somente leitura'; display: block; max-width: 760px; margin: 0 auto 10px; font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
@media (max-width: 760px) { .user-box { display: none; } .seg button { padding: 0 9px; } }
a.chipbtn { text-decoration: none; }
