@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; --ink: #F2EFE9; --muted: #8A8992;
  --gold: #C9A24B; --goldtx: #C9A24B; --line: rgba(201,162,75,.22); --btnink: #08080A; --chip: rgba(201,162,75,.14);
  --danger: #E5604D; --radius: 16px;
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F1E8; --panel: #FFFFFF; --panel2: #FBF8F2; --ink: #17140E; --muted: #6E695E;
  --gold: #C9A24B; --goldtx: #7A5F26; --line: rgba(23,20,14,.12); --btnink: #17140E; --chip: rgba(201,162,75,.2);
  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 { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--goldtx); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.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 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; 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.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.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; }
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.icon-btn.on { color: var(--goldtx); }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--chip); color: var(--goldtx); font-weight: 800; font-size: .9rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; }

/* Login */
.login { min-height: 100%; height: 100vh; display: flex; flex-wrap: wrap; overflow: auto; }
.login-main { flex: 1 1 480px; min-width: 0; padding: 48px clamp(24px, 6vw, 88px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.3rem; 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-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.login-form h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.login-form p { margin: 8px 0 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .85rem; font-weight: 600; }
.input { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.input:focus-within { border-color: var(--gold); }
.input svg { color: var(--muted); }
.input input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; }
.input input::placeholder { color: var(--muted); }
.login-form .btn { height: 56px; font-size: 1.05rem; margin-top: 4px; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.3em; margin: 0; }
.login-foot { margin: 0; font-size: .8rem; color: var(--muted); }
.login-side { flex: 1 1 420px; min-width: 0; margin: 16px; border-radius: 32px; border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 48px; text-align: center; min-height: 420px; }
.login-side .pill { position: absolute; right: -120px; bottom: -60px; opacity: .14; }
.login-side img.client { max-width: min(320px, 70%); max-height: 200px; object-fit: contain; position: relative; }
.login-side h2 { margin: 0; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.03em; font-weight: 800; max-width: 340px; position: relative; }
.login-side p { margin: 10px 0 0; color: var(--muted); max-width: 340px; position: relative; }
.login-side.branded { border-color: rgba(255,255,255,.1); }
.login-side.branded h2, .login-side.branded p { color: #F2EFE9; }
.login-side.branded p { opacity: .65; }

/* App */
.shell { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 264px minmax(340px, 420px) 1fr; }
.side { display: flex; flex-direction: column; padding: 0 12px; min-height: 0; border-right: 1px solid var(--line); }
.side .brand { padding: 24px 8px 20px; font-size: 1.15rem; }
.compose-btn { height: 52px; margin-bottom: 20px; font-size: 1rem; }
.folders { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.folder { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; text-align: left; }
.folder:hover { background: var(--chip); color: var(--ink); }
.folder.active { background: var(--chip); color: var(--goldtx); font-weight: 700; }
.folder .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder .count { font-size: .78rem; font-weight: 700; color: var(--goldtx); }
.usercard { margin: 8px 0 16px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.usercard .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.usercard .avatar { width: 40px; height: 40px; }
.usercard .txt { min-width: 0; display: flex; flex-direction: column; }
.usercard strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usercard small { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usercard .tools { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.usercard .icon-btn { width: 40px; height: 40px; }

.listcol { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.list-head { padding: 22px 20px 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.list-head h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; font-weight: 800; }
.list-head small { color: var(--muted); font-size: .8rem; }
.search { margin: 4px 16px 10px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.search:focus-within { border-color: var(--gold); }
.search svg { color: var(--muted); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; height: 100%; font-size: .95rem; }
.chips { display: flex; gap: 8px; padding: 0 16px 10px; overflow-x: auto; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.chip.active { border-color: var(--gold); background: var(--chip); color: var(--ink); }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 13px 10px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; text-align: left; transition: background .15s; }
.msg:hover { background: var(--panel); }
.msg.active { background: var(--panel2); border-color: var(--line); }
.msg .body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msg .top { display: flex; align-items: center; gap: 8px; }
.msg .from { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; font-weight: 500; }
.msg .time { flex: none; font-size: .75rem; color: var(--muted); }
.msg .subj, .msg .prev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.msg .prev { color: var(--muted); font-size: .85rem; }
.msg.unseen .from, .msg.unseen .subj { font-weight: 700; }
.msg .dot { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--gold); }
.msg .clip { flex: none; margin-top: 4px; color: var(--muted); }
.empty { margin: auto; padding: 24px; text-align: center; color: var(--muted); }
.more { margin: 8px auto; }

.readcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.read-empty { margin: auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.toolbar { display: flex; align-items: center; gap: 4px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1; }
.back { display: none; }
.read-head { padding: 22px 28px 14px; }
.read-head h2 { margin: 0 0 16px; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1.25; font-weight: 800; }
.sender { display: flex; align-items: center; gap: 14px; }
.sender .info { min-width: 0; display: flex; flex-direction: column; }
.sender strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 28px; gap: 10px; }
.paper { flex: 1; min-height: 260px; border: 0; border-radius: 14px; background: #fff; }
.plain { flex: 1; overflow: auto; margin: 0; padding: 4px 0; white-space: pre-wrap; word-wrap: break-word; font: inherit; }
.notice { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--chip); font-size: .85rem; }
.notice button { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--gold); background: transparent; font-weight: 700; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; }
.att { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); text-decoration: none; color: var(--ink); font-size: .85rem; }
.att:hover { border-color: var(--gold); }
.replybar { display: flex; gap: 10px; padding: 14px 28px 22px; }
.replybar .reply-input { flex: 1; height: 52px; padding: 0 18px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--muted); }
.replybar .reply-input:hover { border-color: var(--gold); }

/* Redactar */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: flex-end; padding: 20px; }
.sheet { width: min(640px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--line); font-weight: 800; }
.sheet .rows { display: flex; flex-direction: column; }
.sheet .row { display: flex; align-items: center; gap: 12px; padding: 0 22px; min-height: 52px; border-bottom: 1px solid var(--line); }
.sheet .row label { width: 64px; color: var(--muted); font-size: .85rem; flex: none; }
.sheet .row input { flex: 1; min-width: 0; height: 52px; background: transparent; border: 0; outline: 0; }
.sheet textarea { flex: 1; min-height: 220px; padding: 18px 22px; background: transparent; border: 0; outline: 0; resize: none; line-height: 1.55; }
.sheet footer { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); }
.sheet footer .error { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; padding: 12px 20px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: up .2s ease-out; }
.skeleton { height: 76px; margin: 4px 0; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sh 1.3s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }

.bottomnav { display: none; }
.fab { display: none; }

/* Tableta: lista + lectura sin columna de carpetas visible */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 220px minmax(300px, 380px) 1fr; }
}
/* Movil */
@media (max-width: 820px) {
  .shell { display: block; position: relative; }
  .side { display: none; }
  .listcol, .readcol { position: absolute; inset: 0; border: 0; }
  .readcol { transform: translateX(100%); transition: transform .25s ease; z-index: 5; }
  .shell.reading .readcol { transform: none; }
  .back { display: inline-flex; }
  .listcol { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .list-head { padding-top: calc(18px + env(safe-area-inset-top)); }
  .read-head, .read-body, .replybar { padding-left: 18px; padding-right: 18px; }
  .toolbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .bottomnav { display: flex; position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
  .shell.reading ~ .bottomnav { display: none; }
  .bottomnav button { flex: 1; min-height: 52px; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .7rem; font-weight: 600; }
  .bottomnav button.active { color: var(--goldtx); font-weight: 700; }
  .fab { display: flex; position: fixed; z-index: 4; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border: 0; border-radius: 20px; background: var(--gold); color: var(--btnink); align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
  .shell.reading ~ .fab { display: none; }
  .sheet-bg { padding: 0; align-items: stretch; }
  .sheet { width: 100%; max-height: none; height: 100dvh; border-radius: 0; border: 0; }
  .login-main { padding: 28px 22px; gap: 28px; }
  .login-side { margin: 0 16px 16px; padding: 32px 20px; min-height: 0; border-radius: 24px; }
  .login-side h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Evitar que textos largos ensanchen la pagina en movil */
.search { position: relative; }
.messages { overflow-x: hidden; }
.msg { min-width: 0; max-width: 100%; overflow: hidden; }
.msg .body > span { min-width: 0; }
.listcol, .readcol { min-width: 0; overflow-x: hidden; }
@media (max-width: 820px) { .shell { overflow: hidden; width: 100%; } }
.msg { flex: none; }

/* ===== Ronda 2: funciones ===== */
.ico.fill { fill: currentColor; }
.avatar.pick { border: 0; padding: 0; position: relative; cursor: pointer; }
.avatar.pick .tick { display: none; }
.msg.selected .avatar.pick { background: var(--gold); color: var(--btnink); }
.msg.selected .avatar.pick .ini { display: none; }
.msg.selected .avatar.pick .tick { display: inline-flex; }
.msg.selected { background: var(--chip); border-color: var(--line); }
.msg { position: relative; cursor: pointer; align-items: flex-start; }
.msg.cursor:not(.active) { border-color: var(--line); }
.msg .badge { margin-left: 8px; padding: 0 7px; border-radius: 999px; background: var(--chip); color: var(--goldtx); font-size: .72rem; font-weight: 800; line-height: 1.6; }
.msg .tag { margin-left: 8px; padding: 0 7px; border-radius: 6px; background: rgba(229,96,77,.15); color: var(--danger); font-size: .7rem; font-weight: 700; }
.msg .side-col { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 18px; }
.msg .side-col .star { color: var(--gold); } .msg .side-col .star svg { fill: currentColor; width: 16px; height: 16px; }
.msg .side-col .dot { margin: 0; }
.msg .clip { margin: 0; }
.msg .quick { position: absolute; right: 8px; bottom: 6px; display: none; gap: 2px; padding: 2px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.msg .quick .icon-btn { width: 36px; height: 36px; }
@media (hover: hover) { .msg:hover .quick, .msg:focus-within .quick { display: flex; } .msg:hover .side-col { visibility: hidden; } }
.msg .body { overflow: hidden; }
.msg .top .time { flex: none; }

.selbar { display: flex; align-items: center; gap: 2px; padding: 12px 12px 8px 12px; min-height: 66px; }
.selbar[hidden], .list-head[hidden] { display: none; }
.selbar strong { margin-left: 4px; font-size: .95rem; }
.selbar .grow { flex: 1; }

/* Lectura con conversacion */
.read-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.read-head { padding: 22px 28px 6px; }
.read-head h2 { margin: 0; }
.thread-n { color: var(--muted); font-size: .8rem; }
.cards { display: flex; flex-direction: column; gap: 10px; padding: 8px 28px 22px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel2); overflow: hidden; }
.card.open { background: transparent; border-color: transparent; }
.card-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent; text-align: left; }
.card.open .card-head { display: none; }
.card-head .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-head strong, .card-head .sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head .sum { color: var(--muted); font-size: .85rem; }
.card-head .time { color: var(--muted); font-size: .78rem; flex: none; }
.card-body { display: none; flex-direction: column; gap: 12px; }
.card.open .card-body { display: flex; }
.card.open + .card.open { border-top: 1px solid var(--line); padding-top: 14px; border-radius: 0; }
.paper { flex: none; width: 100%; min-height: 80px; border-radius: 14px; background: #fff; border: 0; }
.plain { overflow: visible; }
.replybar { flex-wrap: wrap; }
.replybar .reply-input { min-width: 180px; }
.read-head, .read-body { padding-left: 28px; padding-right: 28px; }

.popmenu { position: fixed; z-index: 50; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.45); display: flex; flex-direction: column; animation: up .12s ease-out; }
.popmenu button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.popmenu button:hover, .popmenu button:focus-visible { background: var(--chip); }
.popmenu hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.toast { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 20px; z-index: 60; }
.toast button { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--gold); color: var(--btnink); font-weight: 800; }
.icon-btn.on { color: var(--goldtx); }

/* Redactar */
.sheet { position: relative; }
.sheet header { gap: 12px; }
.sheet header .saved { flex: 1; font-weight: 500; font-size: .8rem; color: var(--muted); }
.sheet .row { position: relative; }
.sheet .row.rcpt { align-items: flex-start; padding-top: 0; }
.sheet .row.rcpt label { padding-top: 17px; }
.sheet .row.rcpt:is(:nth-child(2), :nth-child(3)) { display: none; }
.sheet .row.rcpt.open { display: flex; }
.chipbox { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; min-height: 52px; }
.chipbox input { flex: 1; min-width: 120px; height: 36px; background: transparent; border: 0; outline: 0; }
.rchip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 0 4px 0 12px; height: 32px; border-radius: 999px; background: var(--chip); font-size: .88rem; }
.rchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip.bad { background: rgba(229,96,77,.18); color: var(--danger); }
.rchip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.rchip button .ico { width: 14px; height: 14px; }
.ccbtns { display: flex; gap: 2px; padding-top: 10px; }
.ccbtns button { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; }
.ccbtns button:hover { background: var(--chip); color: var(--ink); }
.suggest { position: absolute; left: 86px; right: 22px; top: 100%; z-index: 5; padding: 6px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.suggest[hidden] { display: none; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.suggest button.on, .suggest button:hover { background: var(--chip); }
.suggest .avatar { width: 32px; height: 32px; font-size: .75rem; }
.suggest .t { display: flex; flex-direction: column; min-width: 0; } .suggest small { color: var(--muted); }
.editor-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.editor-tools .icon-btn { width: 38px; height: 38px; } .editor-tools .ico { width: 18px; height: 18px; }
.tool-text { margin-left: auto; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; }
.editor { flex: 1; min-height: 200px; overflow-y: auto; padding: 18px 22px; outline: 0; line-height: 1.55; }
.editor blockquote { margin: 8px 0 8px .4em; padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted); }
.editor a { color: var(--goldtx); }
.cfiles { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px; }
.cfiles:not(:empty) { padding-top: 8px; padding-bottom: 8px; border-top: 1px solid var(--line); }
.cfile { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); font-size: .85rem; max-width: 100%; }
.cfile .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; } .cfile small { color: var(--muted); }
.cfile button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.sheet footer { flex-wrap: wrap; padding: 12px 16px 12px 22px; gap: 8px; }
.sheet footer .error { flex: 1; min-width: 0; font-size: .82rem; }
.drop { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 2px dashed var(--gold); border-radius: 24px; font-weight: 700; pointer-events: none; }
.drop[hidden] { display: none; }

/* Ayuda de atajos */
.keys { max-width: 520px; }
.keys-bg { align-items: center; justify-content: center; }
.keys-body { padding: 8px 22px 22px; overflow: auto; }
.keys dl { margin: 0; } .keys dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.keys dt { white-space: nowrap; } .keys dd { margin: 0; color: var(--muted); text-align: right; }
kbd { display: inline-block; min-width: 26px; padding: 2px 8px; margin: 0 2px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 8px; background: var(--panel2); font: 600 .8rem var(--font); text-align: center; }
.keys h3 { margin: 18px 0 6px; font-size: .95rem; } .keys .hint { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.7; }
code { padding: 1px 6px; border-radius: 6px; background: var(--chip); font-size: .8rem; }

@media (max-width: 820px) {
  .selbar { padding-top: calc(12px + env(safe-area-inset-top)); }
  .read-head { padding: 18px 18px 4px; } .cards { padding: 8px 18px 18px; }
  .msg .quick { display: none !important; }
  .suggest { left: 16px; right: 16px; }
  .sheet .row label { width: 52px; }
  .keys-bg { align-items: stretch; }
}

.selbar strong { white-space: nowrap; font-size: .9rem; }
.selbar .icon-btn { width: 40px; height: 40px; }
