:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #fafafa;
  --panel-2: #f1f1f1;
  --line: #e6e6e6;
  --line-strong: #d3d3d3;
  --text: #111111;
  --muted: #767676;
  --faint: #a2a2a2;
  --bubble-in: #f1f1f1;
  --bubble-out: #111111;
  --on-out: #ffffff;
  --accent: #111111;
  --on-accent: #ffffff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.13);
  --scrim: rgba(10, 10, 10, 0.42);
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0c0c0c;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --line: #272727;
  --line-strong: #3a3a3a;
  --text: #f3f3f3;
  --muted: #909090;
  --faint: #6d6d6d;
  --bubble-in: #1d1d1d;
  --bubble-out: #f1f1f1;
  --on-out: #111111;
  --accent: #f1f1f1;
  --on-accent: #111111;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --scrim: rgba(0, 0, 0, 0.68);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body.modal-open, body.drawer-open { overflow: hidden; }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.42; cursor: not-allowed; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.app-shell {
  display: grid;
  grid-template-columns: 322px minmax(0, 1fr);
  height: 100dvh;
  height: 100vh;
}

/* ---------- sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; padding: 24px 22px 20px; border-bottom: 1px solid var(--line); }
.brand-mark {
  width: 38px; height: 38px; flex: none; border: 1.5px solid var(--text); border-radius: 50%;
  display: grid; place-items: center;
}
.brand-mark span { width: 11px; height: 11px; border-radius: 50%; background: var(--text); }
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.24em; }
.brand-text p { margin: 2px 0 0; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.icon-btn.drawer-close { display: none; margin-left: auto; }

.sidebar-block { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.block-label, .block-head { font-size: 11px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.block-head { display: flex; justify-content: space-between; align-items: center; }
.block-head .count { letter-spacing: 0; font-variant-numeric: tabular-nums; }

.search-field {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0 10px; height: 40px; transition: border-color 0.15s;
}
.search-field:focus-within { border-color: var(--text); }
.search-field .icon { color: var(--muted); width: 16px; height: 16px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--faint); }
.clear-btn { border: 0; background: transparent; padding: 2px; color: var(--muted); display: grid; place-items: center; }
.clear-btn .icon { width: 14px; height: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips button {
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; transition: all 0.15s;
}
.chips button:hover { color: var(--text); border-color: var(--text); }
.chips button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hint-small { margin: 12px 0 0; font-size: 11px; line-height: 1.6; color: var(--faint); }

.results-block { flex: 1; min-height: 0; display: flex; flex-direction: column; border-bottom: 0; }
.results { margin-top: 12px; overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.empty-hint { font-size: 12px; color: var(--faint); line-height: 1.8; padding: 16px 2px; }
.result-item {
  width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 6px; border-radius: 8px; transition: background 0.15s;
}
.result-item:hover { background: var(--panel-2); }
.result-icon { color: var(--muted); padding-top: 2px; }
.result-icon .icon { width: 16px; height: 16px; }
.result-main { min-width: 0; flex: 1; display: block; }
.result-title { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }
.result-item.locked .result-title { font-style: italic; color: var(--muted); }
.badge { font-size: 10px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; margin-left: 5px; font-style: normal; }
mark { background: var(--accent); color: var(--on-accent); border-radius: 2px; padding: 0 2px; }

.sidebar-foot { padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.wide-action {
  width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px;
  padding: 11px 12px; font-size: 12.5px;
}
.wide-action .icon { width: 16px; height: 16px; }
.wide-action .tail { margin-left: auto; }
.wide-action span { flex: 1; }
.stats { display: flex; gap: 7px; font-size: 11px; color: var(--faint); margin: 14px 0 10px; }
.theme-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: 0; border-top: 1px solid var(--line);
  padding: 12px 0 0; font-size: 12px; color: var(--muted);
}
.theme-value { display: inline-flex; align-items: center; gap: 6px; }
.theme-value .icon { width: 14px; height: 14px; }
.disclaimer { display: flex; gap: 7px; margin: 14px 0 0; font-size: 10.5px; line-height: 1.6; color: var(--faint); }
.disclaimer .icon { width: 13px; height: 13px; margin-top: 2px; }

.drawer-scrim { display: none; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 68px; flex: none; display: flex; align-items: center; gap: 12px;
  padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.icon-btn.only-mobile { display: none; }
.channel { display: flex; align-items: center; gap: 11px; }
.channel strong { display: block; font-size: 14px; letter-spacing: 0.06em; }
.channel small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status-dot.online { background: var(--text); box-shadow: 0 0 0 4px var(--panel-2); }
.status-dot.offline { background: transparent; border: 1.5px solid var(--faint); }
.top-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--muted);
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }

.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.message-list { max-width: 840px; margin: 0 auto; padding: 26px 26px 36px; }
.empty-state { text-align: center; padding: 90px 20px; color: var(--faint); }
.empty-state .icon { width: 34px; height: 34px; margin-bottom: 14px; }
.empty-state h3 { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 600; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.8; }

.day-sep { display: flex; align-items: center; gap: 12px; margin: 24px 0 20px; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.day-sep span {
  font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
}

.msg-row { display: flex; margin-bottom: 18px; animation: rise 0.22s ease-out; }
.msg-row.out { justify-content: flex-end; }
.msg-col { max-width: min(76%, 570px); min-width: 0; }
.bubble {
  background: var(--bubble-in); border-radius: 15px 15px 15px 4px;
  padding: 11px 14px; border: 1px solid transparent; overflow: hidden;
}
.out .bubble { background: var(--bubble-out); color: var(--on-out); border-radius: 15px 15px 4px 15px; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; }
.msg-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 10.5px; color: var(--faint); }
.msg-meta .icon { width: 11px; height: 11px; }
.out .msg-meta { justify-content: flex-end; }
.lock-tag { display: inline-flex; align-items: center; gap: 3px; }
.lock-tag .icon { width: 11px; height: 11px; }

.media-caption { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: 0.72; margin-bottom: 8px; }
.media-caption .icon { width: 14px; height: 14px; }
.media-image { display: block; padding: 0; border: 0; background: transparent; max-width: 100%; }
.media-image img { display: block; max-width: 100%; max-height: 340px; border-radius: 10px; object-fit: cover; }
.bubble audio { display: block; width: 100%; min-width: 230px; height: 38px; }
.bubble video { display: block; max-width: 100%; max-height: 330px; border-radius: 10px; background: #000; }

.bubble-secret {
  background: var(--panel); color: var(--text);
  border: 1px dashed var(--line-strong); padding: 14px; min-width: 240px;
}
.out .bubble-secret { background: var(--panel); color: var(--text); border-radius: 15px 15px 4px 15px; }
.secret-head { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.secret-head .icon { width: 15px; height: 15px; }
.secret-label { font-size: 14px; font-weight: 600; margin: 9px 0 0; word-break: break-word; }
.secret-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.secret-tags span { font-size: 10.5px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.secret-state {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line);
}
.secret-state .icon { width: 13px; height: 13px; }
.secret-content { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.secret-files { display: flex; flex-direction: column; gap: 12px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.secret-files .media-image img { max-height: 300px; }
.secret-files video { max-width: 100%; max-height: 300px; }
.secret-files audio { width: 100%; min-width: 210px; height: 38px; }
.secret-file-error { border: 1px dashed var(--line-strong); border-radius: 9px; padding: 9px; font-size: 11px; color: var(--muted); }
.secret-file-error .media-caption { margin-bottom: 4px; }
.secret-actions { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  background: transparent; color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 4px 9px;
}
.mini-btn .icon { width: 12px; height: 12px; }
.mini-btn:hover { color: var(--text); border-color: var(--text); }
.btn-unlock {
  width: 100%; margin-top: 11px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 9px; padding: 9px;
  font-size: 12.5px;
}
.btn-unlock .icon { width: 14px; height: 14px; }
.msg-row.flash .bubble { animation: flash 1.4s ease-out; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25% { box-shadow: 0 0 0 4px var(--line-strong); } }

/* ---------- composer ---------- */
.composer-wrap {
  flex: none; border-top: 1px solid var(--line); background: var(--bg);
  padding: 13px 26px calc(11px + env(safe-area-inset-bottom));
}
.composer { max-width: 840px; margin: 0 auto; }
.composer-note { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.tools { display: flex; align-items: center; gap: 3px; flex: none; }
.tool-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--muted);
}
.tool-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.tool-divider { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
#messageInput {
  flex: 1; min-width: 0; resize: none; max-height: 140px; min-height: 38px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 9px 12px; outline: 0; font-size: 13.5px; line-height: 1.5;
}
#messageInput:focus { border-color: var(--text); }
#messageInput::placeholder { color: var(--faint); }

.btn-primary, .btn-outline, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px; white-space: nowrap;
  transition: transform 0.12s, opacity 0.15s;
}
.btn-primary .icon, .btn-outline .icon, .btn-ghost .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-primary:not(:disabled):hover, .btn-outline:not(:disabled):hover, .btn-ghost:not(:disabled):hover { transform: translateY(-1px); }
.btn-ghost.small { padding: 6px 10px; font-size: 11.5px; }
.composer-foot {
  max-width: 840px; margin: 8px auto 0; display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--faint);
}

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: var(--scrim); backdrop-filter: blur(5px);
}
.modal-card {
  width: min(100%, 470px); max-height: min(90dvh, 780px); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: pop 0.18s ease-out;
}
.modal-card.wide { width: min(100%, 520px); }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--line);
}
.eyebrow { display: block; font-size: 10px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }
.modal-head h2 { margin: 4px 0 0; font-size: 17px; font-weight: 650; }
.modal-body { padding: 18px 22px 22px; }
.modal-note { margin: 0 0 18px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.modal-note.small { margin: 12px 0 0; font-size: 11px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
}
.form-label { display: block; font-size: 12px; font-weight: 600; margin: 16px 0 7px; }
.form-label:first-child { margin-top: 0; }
.req { font-size: 10px; font-weight: 400; color: var(--faint); margin-left: 5px; }
.opt { font-size: 10.5px; font-weight: 400; color: var(--faint); margin-left: 6px; }
.form-input, .form-area {
  display: block; width: 100%; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px;
  outline: 0; font-size: 13px;
}
.form-area { resize: vertical; min-height: 110px; line-height: 1.6; }
.form-input:focus, .form-area:focus { border-color: var(--text); }
.form-input::placeholder, .form-area::placeholder { color: var(--faint); }
.key-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.form-error { margin: 10px 0 0; font-size: 11.5px; color: var(--text); border-left: 2px solid var(--text); padding-left: 9px; }

.attach-picker { display: flex; }
.attach-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.attach-empty { font-size: 11px; color: var(--faint); }
.attach-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 11.5px;
}
.attach-item > .icon { width: 14px; height: 14px; color: var(--muted); }
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-size { color: var(--faint); font-size: 10.5px; flex: none; }
.attach-remove { display: grid; place-items: center; padding: 2px; border: 0; background: transparent; color: var(--muted); }
.attach-remove .icon { width: 13px; height: 13px; }
.attach-remove:hover { color: var(--text); }
.warning { margin: 10px 0 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.locked-badge {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  background: var(--panel-2); border-radius: 10px; padding: 11px 12px; margin-bottom: 16px;
}
.locked-badge .icon { width: 15px; height: 15px; }
.key-box {
  display: flex; align-items: center; gap: 10px; background: var(--panel-2);
  border: 1px dashed var(--line-strong); border-radius: 11px; padding: 11px 12px;
}
.key-box code { flex: 1; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; letter-spacing: 0.1em; }
.inline-field { display: flex; gap: 8px; }
.inline-field .form-input { flex: 1; min-width: 0; }
.qr-block { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.qr-frame { background: #fff; padding: 10px; border-radius: 12px; line-height: 0; flex: none; }
.qr-frame svg { width: 148px; height: 148px; display: block; }
.qr-loading { display: block; width: 148px; height: 148px; line-height: 148px; text-align: center; font-size: 11px; color: #888; }
.qr-block p { font-size: 12px; color: var(--muted); margin: 0; }
.qr-block small { font-size: 11px; color: var(--faint); }

.record-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.record-tabs button {
  flex: 1; border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
  border-radius: 9px; padding: 8px; font-size: 12px;
}
.record-tabs button.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.record-stage {
  position: relative; display: grid; place-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px;
  min-height: 190px; padding: 18px; overflow: hidden;
}
.record-stage video { max-width: 100%; max-height: 230px; border-radius: 8px; background: #000; }
.record-pulse { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); }
.record-pulse .icon { width: 26px; height: 26px; }
.record-pulse.recording { border-color: var(--text); animation: pulse 1.3s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 10px var(--panel); } }
.record-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: 0.1em; }

.media-modal { background: rgba(0, 0, 0, 0.88); }
.media-card { position: relative; max-width: min(94vw, 1100px); max-height: 90dvh; }
.media-card img, .media-card video { display: block; max-width: 100%; max-height: 86dvh; border-radius: 8px; }
.media-close { position: absolute; top: -44px; right: 0; color: #fff; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 8px; max-width: min(90vw, 360px);
  background: var(--accent); color: var(--on-accent); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; box-shadow: var(--shadow); animation: rise 0.2s ease-out;
}
.toast .icon { width: 15px; height: 15px; }
.toast.error { background: var(--panel-2); color: var(--text); border: 1px dashed var(--line-strong); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(88vw, 340px);
    transform: translateX(-102%); transition: transform 0.25s ease; box-shadow: var(--shadow);
  }
  body.drawer-open .sidebar { transform: none; }
  .icon-btn.drawer-close { display: inline-grid; }
  .drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim);
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
  }
  body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  .icon-btn.only-mobile { display: inline-grid; }
  .topbar { padding: 0 14px; height: 60px; }
  .message-list { padding: 20px 14px 28px; }
}

@media (max-width: 720px) {
  .composer-wrap { padding: 10px 12px calc(9px + env(safe-area-inset-bottom)); }
  .composer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .tools { grid-column: 1 / -1; justify-content: flex-start; }
  #messageInput { grid-column: 1 / -1; width: 100%; }
  .btn-outline, .send-btn { width: 100%; }
  .composer-foot { margin-top: 7px; }
  .composer-foot span:first-child { display: none; }
  .msg-col { max-width: 86%; }
  .bubble audio { min-width: 190px; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal-card { width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; }
  .modal-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .qr-block { flex-direction: column; align-items: flex-start; }
  .toasts { right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
