@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 200 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 200 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #08080A; --panel: #111114; --panel2: #17171B; --panel3: #1E1E23; --ink: #F2EFE9; --muted: #9A98A1;
  --gold: #C9A24B; --goldtx: #D4AE5B; --line: rgba(201,162,75,.2); --btnink: #08080A; --chip: rgba(201,162,75,.14);
  --danger: #E5604D; --radius: 16px; --nav-h: 64px;
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F1E8; --panel: #FFFFFF; --panel2: #FBF8F2; --panel3: #F0EBDF; --ink: #17140E; --muted: #6A655A;
  --gold: #C9A24B; --goldtx: #7A5F26; --line: rgba(23,20,14,.14); --btnink: #17140E; --chip: rgba(201,162,75,.22);
  --danger: #B93B2A; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2 { text-wrap: balance; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 12px 18px; border-radius: 12px; background: var(--gold); color: var(--btnink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
a { color: var(--goldtx); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex: none; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- botones y campos ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--gold); color: var(--btnink); font-weight: 700; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn.big { min-height: 56px; font-size: 1.05rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.linkbtn { background: none; border: 0; color: var(--goldtx); font-weight: 600; padding: 8px 0; text-align: left; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); transition: background .15s, color .15s; position: relative; }
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--panel2); color: var(--ink); font-size: .88rem; font-weight: 600; transition: background .15s; }
.chip:hover { background: var(--panel3); }
.chip .ico { width: 16px; height: 16px; }
.chip.layer { color: var(--muted); }
.chip.layer.on { background: color-mix(in srgb, var(--c) 28%, var(--panel2)); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: .85rem; font-weight: 600; padding: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; background: var(--panel2); border: 1px solid transparent; border-radius: 14px; outline: 0; transition: border-color .15s; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field input[readonly] { color: var(--muted); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.3em; }
.note { color: var(--muted); font-size: .9rem; }
.form { display: flex; flex-direction: column; gap: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.actions .btn { flex: 1 1 auto; }
.actions.row .btn { flex: 0 1 auto; }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c, var(--gold)); color: #0B0B0D; font-weight: 800; font-size: .85rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .68rem; }
a.inline { font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; background: var(--c, var(--panel2)); font-size: .7rem; font-weight: 700; color: var(--ink); padding: 0; }
.sw.on { border-color: var(--ink); }
.sw:not([data-c]) { width: auto; padding: 0 14px; border-radius: 999px; background: var(--panel2); border-color: transparent; }
.sw:not([data-c]).on { border-color: var(--ink); }

/* ---------- acceso ---------- */
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.15rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.brand em { font-style: normal; color: var(--goldtx); }
.brand span { font-weight: 500; color: var(--muted); letter-spacing: 0; }
.login { height: 100dvh; display: flex; flex-wrap: wrap; overflow: auto; }
.login-main { flex: 1 1 480px; min-width: 0; padding: 40px clamp(20px, 6vw, 88px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.login-form h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.login-form p { color: var(--muted); }
.login-form .error { color: var(--danger); }
.login-foot { font-size: .82rem; color: var(--muted); }
.login-side { flex: 1 1 420px; min-width: 0; margin: 16px; border-radius: 32px; background: var(--panel); padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 36px; min-height: 360px; }
.login-side h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; max-width: 12ch; }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.points li { display: flex; flex-direction: column; gap: 4px; max-width: 38ch; }
.points strong { font-size: 1.08rem; }
.points span { color: var(--muted); }

/* ---------- estructura ---------- */
.shell { height: 100dvh; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 18px; padding-top: max(8px, env(safe-area-inset-top)); flex: none; }
.top-r { display: flex; align-items: center; gap: 2px; }
.meBtn { background: none; border: 0; padding: 2px; border-radius: 50%; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
#view { flex: 1; overflow: auto; padding: 4px 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); outline: 0; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--panel); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 5; }
.navitem { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted); font-size: .72rem; font-weight: 600; min-height: 48px; }
.navitem.on { color: var(--goldtx); }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--gold); color: var(--btnink); display: flex; align-items: center; justify-content: center; z-index: 6; box-shadow: 0 10px 28px rgba(0,0,0,.45); transition: transform .12s; }
.fab:active { transform: scale(.94); }
.fab .ico { width: 26px; height: 26px; stroke-width: 2.3; }

/* ---------- calendario ---------- */
.calhead { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 12px; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titlebar h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.03em; font-weight: 800; }
.navbtns { display: flex; align-items: center; gap: 6px; }
.layers { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.layers::-webkit-scrollbar { display: none; }
.layers .chip { flex: none; }
.calbody { display: flex; flex-direction: column; gap: 18px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; min-width: 0; }
.dow { text-align: center; color: var(--muted); font-size: .78rem; font-weight: 700; padding: 6px 0; }
.cell { position: relative; min-height: 54px; padding: 6px 4px; background: var(--panel); border: 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: background .12s; }
.cell:hover { background: var(--panel2); }
.cell.out { opacity: .42; }
.cell .num { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .92rem; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cell.today .num { background: var(--gold); color: var(--btnink); }
.cell.sel { background: var(--chip); outline: 2px solid var(--gold); outline-offset: -2px; }
.cell .chips { display: none; }
.cell .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; min-height: 7px; }
.cell .dots b { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cell .dots b.busy { background: transparent; border: 1.5px solid var(--muted); width: 7px; height: 7px; }
.daypanel { background: var(--panel); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dayhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dayhead h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.evlist { display: flex; flex-direction: column; gap: 8px; }
.ev, .slot { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px 10px 0; background: var(--panel2); border: 0; border-radius: 14px; text-align: left; overflow: hidden; transition: background .12s; }
.ev:hover, .slot:hover { background: var(--panel3); }
.ev .bar { align-self: stretch; width: 5px; background: var(--c); flex: none; }
.ev .t, .slot .t { flex: none; width: 74px; font-weight: 700; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot { padding-left: 14px; }
.slot .t { color: var(--ink); width: 118px; }
.slot .go { margin-left: auto; color: var(--goldtx); font-weight: 700; font-size: .88rem; }
.ev .n, .slot .n { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ev .n strong, .slot .n strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small, .slot small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .tick { color: var(--goldtx); }
.ev.busy { opacity: .6; }
.ev.feed .bar { opacity: .7; }
.empty { color: var(--muted); padding: 12px 2px; }
.emptyhero { background: var(--panel); border-radius: 24px; padding: clamp(24px, 6vw, 48px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 560px; }
.emptyhero h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.1; letter-spacing: -.03em; }
.emptyhero p { color: var(--muted); }
.agenda { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.agday { display: flex; flex-direction: column; gap: 10px; }
.agday h2 { font-size: 1rem; color: var(--goldtx); letter-spacing: -.01em; }

/* ---------- grupos ---------- */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gcard { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 0; background: var(--panel); border: 0; border-radius: 18px; text-align: left; overflow: hidden; min-height: 84px; transition: background .12s; }
.gcard:hover { background: var(--panel2); }
.gbar { align-self: stretch; width: 6px; background: var(--c); flex: none; }
.gtxt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gtxt strong { font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtxt small { color: var(--muted); }
.faces { display: flex; }
.faces .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--panel); }
.block { display: flex; flex-direction: column; gap: 12px; padding: 18px 0; }
.block + .block { border-top: 1px solid var(--line); }
.block h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.people li > span:not(.avatar):not(.swatch) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.people .grow { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.people .grow small { color: var(--muted); }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.st { font-style: normal; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--goldtx); }
.st.no { background: var(--panel3); color: var(--muted); }
.st.yes { background: color-mix(in srgb, #5BA36B 25%, transparent); color: #7CC48C; }
:root[data-theme="light"] .st.yes { color: #2E6B3C; }
.invite input { width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--panel2); color: var(--muted); }
.gsheet { display: flex; flex-direction: column; }

/* ---------- planes ---------- */
.detail { display: flex; flex-direction: column; gap: 14px; }
.when { display: flex; align-items: flex-start; gap: 14px; }
.when > .ico { margin-top: 2px; color: var(--goldtx); }
.when > div { display: flex; flex-direction: column; gap: 2px; }
.when small { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.when small .ico { width: 14px; height: 14px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; background: var(--panel2); border-radius: 14px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: var(--panel2); font-weight: 700; transition: background .12s; }
.seg button.on { background: var(--gold); color: var(--btnink); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow: auto; padding: 2px; }
.chat[data-empty]::before { content: 'Aún no hay mensajes. Escriba el primero.'; color: var(--muted); font-size: .9rem; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg small { color: var(--muted); font-size: .72rem; }
.msg p { background: var(--panel2); padding: 9px 13px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine p { background: var(--chip); }
.chatform { display: flex; gap: 8px; }
.chatform input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: 24px; background: var(--panel2); outline: 0; }
.chatform input:focus { border-color: var(--gold); }
.chatform .btn { min-width: 48px; padding: 0; border-radius: 50%; }
.notifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notif { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; background: var(--panel2); border: 0; border-radius: 14px; text-align: left; }
.notif .dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.notif.new .dot { background: var(--gold); }
.notif .n { display: flex; flex-direction: column; }
.notif small { color: var(--muted); }
.settings { max-width: 720px; }

/* ---------- hojas ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(640px, 100%); max-height: 92dvh; display: flex; flex-direction: column; background: var(--panel); border-radius: 26px 26px 0 0; overflow: hidden; animation: up .24s cubic-bezier(.2,.8,.2,1); }
.sheet.small { width: min(480px, 100%); }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 8px 22px; flex: none; }
.sheet header h2 { font-size: 1.15rem; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbody { overscroll-behavior: contain; overflow: auto; padding: 8px 22px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 92px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; max-width: calc(100vw - 32px); box-shadow: 0 12px 34px rgba(0,0,0,.4); animation: up .2s ease-out; }
.toast button { background: none; border: 0; font-weight: 800; color: inherit; text-decoration: underline; }

/* ---------- escritorio ---------- */
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 22px; width: 264px; flex: none; padding: 22px 14px; background: var(--panel); height: 100dvh; overflow: auto; }
  .side-top { padding: 4px 10px 8px; }
  .nav { display: flex; flex-direction: column; gap: 4px; }
  .side .navitem { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 14px; min-height: 48px; border-radius: 14px; font-size: .98rem; }
  .side .navitem:hover { background: var(--panel2); }
  .side .navitem.on { background: var(--chip); }
  .side-groups { display: flex; flex-direction: column; gap: 2px; }
  .side-groups h3 { font-size: .8rem; color: var(--muted); padding: 0 14px 8px; font-weight: 700; }
  .sg { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 14px; background: none; border: 0; border-radius: 12px; text-align: left; }
  .sg:hover { background: var(--panel2); }
  .sg i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
  .top-brand, .bottom, .fab { display: none; }
  .top { justify-content: flex-end; padding: 14px 24px 4px; }
  #view { padding: 4px 28px 40px; }
  .calbody { flex-direction: row; align-items: flex-start; gap: 24px; }
  .month { flex: 1; min-width: 0; gap: 4px; }
  .cell { min-height: 112px; align-items: stretch; padding: 8px; border-radius: 14px; text-align: left; }
  .cell .num { align-self: flex-start; }
  .cell .chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .cell .chips i { font-style: normal; font-size: .76rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 30%, transparent); border-left: 3px solid var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cell .chips i.more { background: none; border: 0; color: var(--muted); padding: 0 4px; }
  .cell .dots { position: absolute; right: 8px; top: 12px; min-height: 0; }
  .cell .dots b:not(.busy) { display: none; }
  .daypanel { width: 340px; flex: none; position: sticky; top: 0; }
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 26px; max-height: 88dvh; }
  .toast { bottom: 32px; }
  .agenda { padding-top: 6px; }
}
@media (max-width: 899px) { .toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); } }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } .two.keep { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- asistente ---------- */
.consent { background: var(--panel2); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.consent p { color: var(--muted); }
.block h4 { font-size: .95rem; margin: 10px 0 0; }
.aisheet { height: min(720px, 92dvh); }
.aisheet .sbody { flex: 1; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.aichat { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.aimsgs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; min-height: 200px; overscroll-behavior: contain; }
.aimsg { max-width: 88%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel2); }
.aimsg.user { align-self: flex-end; background: var(--chip); }
.aimsg.wait { color: var(--muted); }
.aiprop { align-self: flex-start; max-width: 92%; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--panel2); border: 1px solid var(--gold); }
.aiprop small { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.aiprop small .ico { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aiform { display: flex; gap: 8px; align-items: flex-end; }
.aiform textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 120px; padding: 12px 16px; border: 1px solid transparent; border-radius: 24px; background: var(--panel2); outline: 0; resize: none; line-height: 1.4; }
.aiform textarea:focus { border-color: var(--gold); }
.aiform .btn { min-width: 48px; padding: 0; border-radius: 50%; }
.aifoot { text-align: center; }
