/* AI Supers App (Open Source Edition) — styles.
   One set of colour / size tokens for both themes; components only use the tokens.
   Phones: fixed top bar + bottom bar, safe areas, no page bounce, no double-tap zoom. */

:root {
  --gold: #B8872B; --gold-tx: #8F6A1F; --gold-bg: rgba(184,135,43,.12); --on-gold: #FFFFFF;
  --red: #E5484D; --red-bg: rgba(229,72,77,.10); --green: #2E9E5B;
  --bg: #FAFAFA; --list: #FFFFFF; --bar: #F7F7F7; --bubble: #FFFFFF; --mine: #F4E6C2;
  --set-bg: #F2F2F2; --set-card: #FFFFFF;
  --text: #191919; --sub: #8C8C8C; --sub2: #9A9A9A; --time: #B0B0B0;
  --line: #ECECEC; --line-dash: #E2E2E2; --field: #F5F5F6; --field-line: #DADADA;
  --btn2: #F5F5F5; --btn2-line: #DCDCDC; --chip: #F0F0F0; --press: rgba(0,0,0,.05);
  --scrim: rgba(0,0,0,.45); --shadow: 0 8px 28px rgba(0,0,0,.10);
  --r-card: 16px; --r-btn: 14px; --r-input: 12px; --r-btn-sm: 10px; --r-tag: 6px;
  --h-lg: 52px; --h-sm: 36px; --h-input: 48px; --bar-h: 50px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gold: #D8B45A; --gold-tx: #D8B45A; --gold-bg: rgba(216,180,90,.15); --on-gold: #1E1E1E;
    --red: #FF6B66; --red-bg: rgba(255,107,102,.12); --green: #4CC27E;
    --bg: #1E1E1E; --list: #262626; --bar: #1E1E1E; --bubble: #2C2C2C; --mine: #4A3E24;
    --set-bg: #151515; --set-card: #262626;
    --text: #E5E5E5; --sub: #7D7D7D; --sub2: #8A8A8A; --time: #6E6E6E;
    --line: #303030; --line-dash: #383838; --field: #1C1C1C; --field-line: #4D4D4D;
    --btn2: #2C2C2C; --btn2-line: #444444; --chip: #333333; --press: rgba(255,255,255,.06);
    --shadow: 0 8px 28px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --gold: #D8B45A; --gold-tx: #D8B45A; --gold-bg: rgba(216,180,90,.15); --on-gold: #1E1E1E;
  --red: #FF6B66; --red-bg: rgba(255,107,102,.12); --green: #4CC27E;
  --bg: #1E1E1E; --list: #262626; --bar: #1E1E1E; --bubble: #2C2C2C; --mine: #4A3E24;
  --set-bg: #151515; --set-card: #262626;
  --text: #E5E5E5; --sub: #7D7D7D; --sub2: #8A8A8A; --time: #6E6E6E;
  --line: #303030; --line-dash: #383838; --field: #1C1C1C; --field-line: #4D4D4D;
  --btn2: #2C2C2C; --btn2-line: #444444; --chip: #333333; --press: rgba(255,255,255,.06);
  --shadow: 0 8px 28px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--list); color: var(--text);
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", sans-serif; }
#app { height: 100%; height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--gold-tx); }
.hidden { display: none !important; }
/* the app's own chrome can't be selected or long-pressed like a web page; messages and fields can */
.shell, .auth { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.bubble, input, textarea, .keybox, pre.code, .sel { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- buttons, fields ---------- */
.btn { min-height: var(--h-sm); padding: 0 14px; border-radius: var(--r-btn-sm); border: 1px solid var(--btn2-line); background: var(--btn2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .08s, opacity .12s; }
.btn:active { transform: scale(.97); opacity: .85; }
.btn.pri { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn.dan { color: var(--red); }
.btn.lg { width: 100%; min-height: var(--h-lg); border-radius: var(--r-btn); font-size: 17px; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; }
.field { display: block; width: 100%; min-height: var(--h-input); padding: 10px 14px; border: 1px solid var(--field-line); border-radius: var(--r-input); background: var(--field); outline: none; font-size: 16px; }
textarea.field { min-height: 0; }
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
label.lb { display: block; font-size: 14px; color: var(--sub); margin: 14px 0 6px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 12px; color: var(--text); flex: none; position: relative; }
.icon-btn:active { background: var(--press); }
.icon-btn svg { width: 24px; height: 24px; }
.hint { color: var(--sub); font-size: 14px; margin: 6px 0 0; overflow-wrap: anywhere; }
.err { color: var(--red); font-size: 14px; margin-top: 8px; min-height: 0; }
.err:empty { margin: 0; }
.tag { display: inline-flex; align-items: center; height: 20px; font-size: 12px; padding: 0 6px; border-radius: var(--r-tag); background: var(--gold-bg); color: var(--gold-tx); margin-left: 6px; vertical-align: 2px; font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-left: 6px; vertical-align: 1px; }
.badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; border: 1.5px solid var(--list); box-sizing: content-box; }

/* avatars: round; a person's first letter on a colour; groups use the group's first character */
.avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 19px; position: relative; }
.avatar .ai-mark { position: absolute; left: -4px; top: -4px; font-size: 10px; line-height: 14px; padding: 0 3px; border-radius: 4px; background: var(--gold); color: var(--on-gold); font-weight: 700; }
.avatar .badge { top: -4px; right: -4px; }

/* ---------- sign-in / sign-up ---------- */
.auth { height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: calc(24px + var(--sat)) calc(16px + var(--sar)) calc(24px + var(--sab)) calc(16px + var(--sal)); }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.brand img { width: 72px; height: 72px; border-radius: 22%; box-shadow: var(--shadow); }
.brand h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: .2px; }
.brand p { margin: 0; color: var(--sub); font-size: 15px; }
.auth-card { width: 100%; max-width: 400px; background: var(--list); border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 4px; font-size: 20px; }
.auth-card .note { margin: 0 0 4px; color: var(--sub); font-size: 14px; }
.auth-card .btn.lg { margin-top: 20px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 15px; }
.auth-links button { border: 0; background: none; padding: 6px 0; color: var(--gold-tx); text-decoration: underline; text-underline-offset: 3px; }
.madeby { text-align: center; color: var(--sub); font-size: 13px; margin: 18px 0 0; line-height: 1.7; }

/* ---------- app shell ---------- */
.shell { height: 100%; display: grid; grid-template-columns: 72px 340px 1fr; background: var(--list); padding: 0 var(--sar) 0 var(--sal); }
.shell.tab-page { grid-template-columns: 72px 1fr; }
.shell.tab-page .list { display: none; }
.rail { background: var(--bar); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: calc(12px + var(--sat)) 0 12px; gap: 6px; }
.rail .tab { width: 56px; height: 56px; border: 0; border-radius: 14px; background: transparent; color: var(--sub); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; position: relative; }
.rail .tab.on { color: var(--gold); background: var(--gold-bg); }
.rail .tab svg { width: 24px; height: 24px; }
.rail .tab .badge { top: 4px; right: 6px; }
.list { background: var(--list); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }

/* top bar: same on every screen; the status-bar area above it is part of it */
.topbar { flex: none; display: flex; align-items: center; gap: 4px; padding: var(--sat) 6px 0; height: calc(var(--bar-h) + var(--sat)); background: var(--list); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.topbar.plain { border-bottom-color: transparent; }
.topbar .ttl { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.topbar .ttl b { display: block; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .ttl small { display: block; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .side-slot { width: 88px; display: flex; align-items: center; flex: none; }
.topbar .side-slot.r { justify-content: flex-end; }
.search { flex: none; padding: 8px 16px; background: var(--list); }
.search input { width: 100%; height: 38px; border: 0; border-radius: 10px; background: var(--field); padding: 0 12px; font-size: 16px; outline: none; }

/* ---------- chat list ---------- */
.list-body { flex: 1; min-height: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 0 16px; border: 0; background: none; width: 100%; text-align: left; color: var(--text); }
.row:active, .row.on { background: var(--press); }
.row .row-main { min-width: 0; flex: 1; padding: 14px 0; border-bottom: 1px dashed var(--line-dash); display: flex; flex-direction: column; gap: 3px; }
.row:last-child .row-main { border-bottom-color: transparent; }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row-name { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { color: var(--time); font-size: 13px; flex: none; }
.row-sub { color: var(--sub2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub .at { color: var(--red); }

/* ---------- chat ---------- */
.msgs { flex: 1; min-height: 0; padding: 12px 0 16px; display: flex; flex-direction: column; }
.day { align-self: center; font-size: 12px; color: var(--sub); margin: 14px 0 6px; }
.msg { display: flex; gap: 12px; padding: 8px 16px; max-width: 920px; }
.msg .avatar { width: 40px; height: 40px; font-size: 16px; }
.msg-body { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.who { display: flex; align-items: center; font-size: 14px; color: var(--sub); min-height: 22px; }
.meta { font-size: 12px; color: var(--time); margin-top: 1px; }
.acts { display: flex; gap: 14px; margin: 6px 0 6px 2px; }
.acts button { border: 0; background: none; padding: 2px 0; font-size: 14px; color: var(--sub); }
.acts button:active { color: var(--gold-tx); }
.acts button.dan { color: var(--red); }
.bubble { background: var(--bubble); border-radius: 16px; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; max-width: min(560px, 100%); font-size: 16px; line-height: 1.55; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-body { align-items: flex-end; }
.msg.mine .acts { margin: 6px 2px 6px 0; }
.msg.mine .bubble { background: var(--mine); box-shadow: none; }
.bubble .mention { color: var(--gold-tx); font-weight: 600; }
.bubble.recalled { color: var(--sub); font-style: italic; background: transparent; box-shadow: none; padding: 2px 0; font-size: 14px; }
.quote { font-size: 13px; color: var(--sub); border-left: 3px solid var(--gold); padding: 2px 0 2px 8px; margin-bottom: 6px; cursor: pointer; }
.att { margin-top: 6px; }
.att img, .att video { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; cursor: zoom-in; }
.att .file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--list); text-decoration: none; color: var(--text); }
.compose { flex: none; background: var(--bg); padding: 8px 12px calc(10px + var(--sab)); position: relative; }
.compose-row { display: flex; align-items: flex-end; gap: 6px; background: var(--list); border-radius: 26px; padding: 4px 4px 4px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.06); border: 1px solid var(--line); }
.compose textarea { flex: 1; resize: none; max-height: 140px; min-height: 44px; padding: 11px 0; border: 0; background: transparent; outline: none; font-size: 16px; line-height: 22px; }
.compose .icon-btn { color: var(--sub); }
.compose .send { width: 40px; height: 40px; margin: 2px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; flex: none; }
.compose .send svg { width: 20px; height: 20px; }
.compose .send:active { transform: scale(.94); }
.replying { font-size: 13px; color: var(--sub); padding: 0 8px 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pending-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 6px; }
.pending-files:empty, #replying:empty { display: none; }
.chip { font-size: 13px; padding: 2px 4px 2px 10px; border-radius: 10px; background: var(--chip); display: inline-flex; align-items: center; gap: 4px; }
.mention-pop { position: absolute; bottom: calc(100% - 4px); left: 12px; right: 12px; max-width: 320px; background: var(--list); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; z-index: 5; }
.mention-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font-size: 15px; }
.mention-pop button.on, .mention-pop button:active { background: var(--gold-bg); }
.more-btn { align-self: center; margin: 6px 0 10px; }

/* empty states: say what this is and what to do — never a blank screen */
.empty { margin: auto; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: var(--sub); }
.empty .ico { width: 72px; height: 72px; border-radius: 50%; background: var(--gold-bg); color: var(--gold); display: grid; place-items: center; }
.empty .ico svg { width: 34px; height: 34px; }
.empty b { color: var(--text); font-size: 17px; font-weight: 600; }

/* ---------- settings-style pages (todos, members, settings) ---------- */
.page { flex: 1; min-height: 0; padding: 12px 16px 24px; background: var(--set-bg); }
.page-inner { max-width: 720px; margin: 0 auto; }
.card { background: var(--set-card); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--sub); letter-spacing: .2px; }
.card > p { margin: 6px 0; }
.sec-title { font-size: 13px; color: var(--sub); margin: 18px 4px 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; }
.pick .avatar { width: 44px; height: 44px; font-size: 17px; }
.pick-main { flex: 1; min-width: 0; }
.pick-main b { font-size: 16px; font-weight: 500; }
.pick-main .row-sub { display: block; }
.pick input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.row-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.todo { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo-title { flex: 1; min-width: 0; word-break: break-word; font-size: 16px; }
.todo-title small { display: block; color: var(--sub); font-size: 13px; }
.st { font-size: 12px; padding: 1px 8px; border-radius: var(--r-tag); flex: none; margin-top: 3px; }
.st.todo { background: var(--chip); color: var(--sub); }
.st.doing { background: var(--gold-bg); color: var(--gold-tx); }
.st.blocked { background: var(--red-bg); color: var(--red); }
.st.done { background: var(--chip); color: var(--green); }
.todo.done .todo-title { color: var(--sub); text-decoration: line-through; }
.todo-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 14px; color: var(--sub); }
.seg button.on { background: var(--list); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.keybox { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--field); border-radius: 10px; padding: 10px; word-break: break-all; }
pre.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--field); border-radius: 10px; padding: 10px; white-space: pre-wrap; word-break: break-all; }
.me-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 4px; }
.me-head .avatar { width: 60px; height: 60px; font-size: 24px; }
.me-head b { font-size: 20px; }

/* settings menu (rows with an icon and a chevron, grouped in cards) */
.mcard { padding: 0 0 0 16px; overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 12px 0 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 17px; color: var(--text); }
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: var(--press); }
.mrow .mi { width: 24px; height: 24px; display: grid; color: var(--text); flex: none; }
.mrow .mi svg, .mrow .mc svg { width: 22px; height: 22px; }
.mrow .ml { flex: 1; min-width: 0; }
.mrow .mc { color: var(--time); display: grid; flex: none; }
.mrow.dan, .mrow.dan .mi { color: var(--red); }
.mrow.me-row { min-height: 88px; gap: 14px; }
.mrow.me-row .avatar { width: 60px; height: 60px; font-size: 24px; }
.mrow.me-row b { font-size: 20px; font-weight: 600; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.push-in { animation: in-right .22s cubic-bezier(.2,.8,.2,1); }

/* ---------- side panel, dialogs, sheets ---------- */
.side { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100%; background: var(--set-bg); box-shadow: -8px 0 24px rgba(0,0,0,.12); display: flex; flex-direction: column; z-index: 20; animation: in-right .22s ease-out; }
.dlg-back { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 40; padding: calc(16px + var(--sat)) 16px calc(16px + var(--sab)); animation: fade .15s; }
.dlg { background: var(--list); border-radius: 18px; width: 100%; max-width: 440px; max-height: 100%; overflow: auto; overscroll-behavior: contain; padding: 20px; }
.dlg h3 { margin: 0 0 8px; font-size: 18px; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.sheet-list { display: grid; gap: 8px; }
.sheet-list .btn { min-height: var(--h-lg); border-radius: var(--r-btn); font-size: 17px; }
.viewer { position: fixed; inset: 0; background: #000; display: grid; place-items: center; z-index: 50; cursor: zoom-out; animation: fade .15s; padding: var(--sat) 0 var(--sab); }
.viewer img { max-width: 100vw; max-height: 100%; }
#toast { position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%); background: rgba(30,30,30,.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; }

/* update banner (owner / admins) */
.upd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 10px 16px; background: var(--gold-bg); font-size: 14px; }
.upd b { margin-right: 4px; }
.upd .btn { margin-left: auto; }
.upd.sec { background: var(--red-bg); color: var(--red); }
.upd.sec a { color: var(--red); font-weight: 600; }

/* ---------- motion ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes in-right { from { transform: translateX(28%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes in-left { from { transform: translateX(-12%); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.anim-fade { animation: fade .18s ease-out; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- phones ---------- */
.bottom-bar { display: none; }
@media (max-width: 759px), (orientation: portrait) and (pointer: coarse) and (max-width: 1100px) {
  .shell, .shell.tab-page { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 0; }
  .rail { display: none; }
  .list, .main { grid-column: 1; grid-row: 1; border-right: 0; }
  .shell.tab-page .list { display: none; }
  .shell.chats:not(.in-chat) .main { display: none; }
  .shell.in-chat .list { display: none; }
  .shell.in-chat { grid-template-rows: minmax(0, 1fr); }
  .shell.in-chat .bottom-bar { display: none; }
  .shell.in-chat .main { animation: in-right .24s cubic-bezier(.2,.8,.2,1); }
  .shell.back-anim .list { animation: in-left .22s ease-out; }
  .bottom-bar { display: flex; grid-row: 2; background: var(--bar); border-top: 1px solid var(--line); padding: 0 var(--sar) var(--sab) var(--sal); }
  .bottom-bar .tab { flex: 1; height: 56px; border: 0; background: none; color: var(--sub); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; }
  .bottom-bar .tab:active { opacity: .6; }
  .bottom-bar .tab.on { color: var(--gold); }
  .bottom-bar .tab .ic { position: relative; display: grid; }
  .bottom-bar .tab svg { width: 26px; height: 26px; }
  .side { width: 100%; animation: in-right .24s cubic-bezier(.2,.8,.2,1); }
  .dlg-back { align-items: end; padding: var(--sat) 0 0; }
  .dlg { max-width: none; border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + var(--sab)); animation: up .22s cubic-bezier(.2,.8,.2,1); }
  .dlg-acts .btn { flex: 1; min-height: 48px; border-radius: var(--r-btn); font-size: 16px; }
  .topbar .back { display: inline-grid; }
  /* buttons go on their own line under the name, so names don't get squeezed */
  .pick .row-acts { flex-basis: 100%; justify-content: flex-start; padding-left: 56px; }
  .todo { flex-wrap: wrap; }
  .todo .todo-acts { flex-basis: 100%; justify-content: flex-start; padding-left: 46px; }
}
@media (min-width: 760px) and (hover: hover) {
  .topbar .back { display: none; }
  .row:hover { background: var(--press); }
  .btn:hover { filter: brightness(.98); }
  .acts { opacity: 0; transition: opacity .12s; }
  .msg:hover .acts, .acts:focus-within { opacity: 1; }
}
