:root {
  color-scheme: light dark;
  --bg: #f1eff8;
  --card: #ffffff;
  --text: #1c1d21;
  --muted: #7a7f8c;
  --line: #e6e8ec;
  --accent: #5b5bd6;
  --accent-soft: #ececfb;
  --mine: #dcdafb;
  --danger: #d64545;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* protection: no selection, no callout, no drag */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

img, video { -webkit-user-drag: none; user-drag: none; pointer-events: auto; }
textarea, input { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; font: inherit; }

#app { height: 100%; display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }  /* a wide window on a computer */

#watermark {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-repeat: repeat;
  opacity: 0.09;
}

.screen { flex: 1; padding: 24px; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.center h2 { margin: 0; font-size: 19px; }
.center p { margin: 0; color: var(--muted); max-width: 320px; }

.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

header.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 6px 16px 0;
}
header.top .title { font-weight: 600; font-size: 16px; }
header.top .sub { color: var(--muted); font-size: 13px; }
header.top select {
  margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--card);
}

.tabs { display: flex; gap: 4px; margin-top: 4px; }
.tabs button {
  flex: 1; border: 0; background: none; padding: 8px 0; font-size: 15px; color: var(--muted);
  border-bottom: 2px solid transparent; cursor: pointer;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* materials */
.feed { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.post { background: var(--card); border-radius: var(--radius); padding: 14px; }
.post .date { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.post .date .soon { color: var(--accent); }
.post .text { white-space: pre-wrap; word-wrap: break-word; }
.post img, .post video, .bubble img { max-width: 100%; border-radius: 10px; display: block; margin-top: 8px; }
img.zoomable { height: auto; cursor: zoom-in; }
/* a tall photo stays a preview (a tap opens it whole), also on a wide computer window */
.bubble img.zoomable { max-height: 420px; width: auto; }
.post img.zoomable, .post-sheet img.zoomable { max-height: 80vh; width: auto; }
/* a picture full screen, zoomed with fingers; under the watermark (z 50) */
.viewer { position: fixed; inset: 0; z-index: 45; background-color: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.viewer img { max-width: 100%; max-height: 100%; transform-origin: center; will-change: transform; }
/* at the bottom: the top right corner is MAX's own «close the app» */
.viewer-close { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; border: 0; border-radius: 22px; padding: 10px 20px 10px 16px; background: rgba(255, 255, 255, 0.92); color: #111; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.viewer-close svg { width: 20px; height: 20px; }
.post audio, .bubble audio { width: 100%; margin-top: 8px; }
.file-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); }
a.ext { color: var(--accent); text-decoration: underline; }

.composer-post { background: var(--card); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fmt { display: inline-flex; gap: 2px; }
.fmt button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.fmt button:active { background: var(--accent-soft); color: var(--accent); }
.composer-post textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 80px; resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 10px; padding: 9px 14px; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer;
}
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn:disabled { opacity: 0.5; }

/* chat */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.messages { flex: 1; overflow-y: auto; padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 4px; }
.loader-top { text-align: center; color: var(--muted); font-size: 12px; padding: 6px; }
.unread-line { align-self: stretch; text-align: center; color: var(--accent); font-size: 12px; font-weight: 600; background: var(--accent-soft); border-radius: 8px; padding: 3px 0; margin: 8px 0 4px; }
.day { align-self: center; color: var(--muted); font-size: 12px; background: var(--card); border-radius: 10px; padding: 2px 10px; margin: 8px 0 4px; }
.msg { display: flex; flex-direction: column; max-width: 86%; align-self: flex-start; }
.msg.mine { align-self: flex-end; }
.bubble { background: var(--card); border-radius: 14px; padding: 7px 10px; position: relative; cursor: pointer; }
.msg.mine .bubble { background: var(--mine); }
.msg .who { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.msg .who.owner::after { content: " · ведущая"; color: var(--muted); font-weight: 400; }
.msg .body { white-space: pre-wrap; word-wrap: break-word; }
/* avatars: theirs beside the bubble, in the people list */
.msg:not(.mine) { flex-direction: row; align-items: flex-end; gap: 6px; }
.msg:not(.mine) .bubble { min-width: 0; }
.ava { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.person .ava { width: 38px; height: 38px; font-size: 14px; }
.msg .meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
.msg.deleted .body { color: var(--muted); font-style: italic; }
.quote { border-left: 3px solid var(--accent); padding: 2px 8px; margin-bottom: 4px; background: rgba(91, 91, 214, 0.06); border-radius: 4px; font-size: 13px; }
.quote b { display: block; color: var(--accent); font-weight: 600; }

.new-pill {
  position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}

.back-pill { bottom: 116px; }
.quote[data-to] { cursor: pointer; }
.msg.flash .bubble { animation: msgflash 1.6s ease-out; }
@keyframes msgflash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

.composer { background: var(--card); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--safe-bottom)); }
/* typing: the keyboard covers the home bar, and the club's name can wait */
body.typing .composer { padding-bottom: 8px; }
/* the header is just the tabs: MAX shows the club's name above anyway; the run picker
   stays for those who have several runs, and steps aside while she types */
header.top .title, header.top .sub { display: none; }
header.top { padding-top: 2px; }
header.top select { margin-top: 4px; }
body.typing header.top select { display: none; }
.reply-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 0 4px 6px; }
.reply-bar .q { flex: 1; border-left: 3px solid var(--accent); padding-left: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.input-row { display: flex; align-items: flex-end; gap: 6px; }
.input-row textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 18px; padding: 8px 12px; max-height: 120px; resize: none; background: var(--bg);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn.send { background: var(--accent); color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 40; display: flex; align-items: flex-end; }
.sheet { background: var(--card); width: 100%; border-radius: 16px 16px 0 0; padding: 8px 8px calc(12px + var(--safe-bottom)); }
.sheet button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 14px 12px; font-size: 16px; text-align: left; cursor: pointer; }
.sheet button.danger { color: var(--danger); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(28, 29, 33, 0.92); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 60; font-size: 14px; }

/* materials: view toggle, post menu, edit mode */
.seg { display: flex; background: var(--card); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 0; border-radius: 9px; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.post-head .date { margin-bottom: 6px; }
.post-menu { width: 32px; height: 32px; margin: -6px -6px 0 0; }
.composer-post.editing { outline: 2px solid var(--accent); }
.edit-note { font-size: 13px; color: var(--accent); font-weight: 600; }
.sheet-q { padding: 12px 12px 4px; color: var(--muted); font-size: 14px; }

/* emoji */
.emoji-panel {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  max-height: 180px; overflow-y: auto; padding: 6px 2px 8px;
}
.emoji-panel[hidden] { display: none; }
.emoji-panel button { border: 0; background: none; font-size: 24px; line-height: 1; padding: 6px 0; border-radius: 8px; cursor: pointer; }
.emoji-panel button:active { background: var(--accent-soft); }

.seg.small button { padding: 6px 0; font-size: 13px; }
.row[hidden], .input-row[hidden], .rec-row[hidden], .icon-btn[hidden] { display: none !important; }

/* voice recording */
.rec-row { display: flex; align-items: center; gap: 8px; }
.rec-info { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.voice-preview { display: flex; align-items: center; gap: 6px; }
.voice-preview[hidden] { display: none !important; }
.voice-preview audio { flex: 1; margin: 0; }

/* voice player */
.voice { display: flex; align-items: center; gap: 8px; min-width: 230px; margin-top: 6px; }
.vplay {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer;
}
.vbar { flex: 1; height: 16px; background: #cfd3dc; border-radius: 2px; position: relative; cursor: pointer; padding: 6px 0; background-clip: content-box; }
.vfill { position: absolute; left: 0; top: 6px; height: 4px; width: 0; background: var(--accent); border-radius: 2px; }
.vtime { font-size: 12px; color: var(--muted); min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.vspeed { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 8px; font-size: 12px; padding: 3px 6px; cursor: pointer; flex: none; }
.voice-preview .vslot { flex: 1; }
.voice-preview .voice { margin-top: 0; }

/* rules */
.terms { overflow-y: auto; }
.terms h2 { margin: 8px 0 12px; }
.terms ol { padding-left: 20px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.terms .agree { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0; }
.terms .agree input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.terms .btn { width: 100%; }

/* complaints */
.complaints-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; width: 100%;
  background: #fdecec; color: var(--danger); padding: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.complaints-bar[hidden] { display: none; }
.sheet.tall { max-height: 85vh; overflow-y: auto; }
.complaint { border-top: 1px solid var(--line); padding: 10px 12px; }
.complaint .c-head { font-size: 13px; color: var(--muted); }
.complaint .c-head b { color: var(--text); }
.complaint .c-body { margin: 4px 0; white-space: pre-wrap; }
.complaint .c-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.complaint .c-actions button { width: auto; padding: 8px 10px; font-size: 14px; border-radius: 8px; background: var(--bg); }

/* transcript */
.transcript { margin-top: 6px; font-size: 13px; color: var(--muted); }
.transcript summary { cursor: pointer; color: var(--accent); list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::before { content: "▸ "; }
.transcript[open] summary::before { content: "▾ "; }
.transcript div { margin-top: 4px; white-space: pre-wrap; color: var(--text); }

/* discuss a material */
.discuss {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--accent-soft);
  color: var(--accent); border-radius: 10px; padding: 7px 12px; font-size: 14px; cursor: pointer;
}
.post-ref {
  display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px 6px 6px; margin-bottom: 4px; border-radius: 8px;
  border-left: 3px solid var(--accent); background: rgba(91, 91, 214, 0.08); cursor: pointer; min-width: 200px;
}
.post-ref img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; margin: 0; }
.post-ref .pr-icon {
  width: 48px; height: 48px; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.post-ref .pr-icon svg { width: 22px; height: 22px; }
.post-ref .pr-text { min-width: 0; }
.post-ref .pr-label { font-size: 11px; color: var(--accent); font-weight: 600; }
.post-ref .pr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.post-ref .pr-excerpt {
  font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-sheet { padding: 8px 12px 4px; }
.post-sheet .date { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.post-sheet .text { white-space: pre-wrap; }
.post-sheet img, .post-sheet video { max-width: 100%; border-radius: 10px; margin-top: 8px; }
/* the generic «.sheet button» rule must not stretch the voice player's buttons */
.sheet .vplay { width: 36px; padding: 0; justify-content: center; background: var(--accent); border-radius: 50%; }
.sheet .vspeed { width: auto; padding: 3px 6px; font-size: 12px; }
.post.flash { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow 0.3s; }

/* payment check */
.center .btn { margin-top: 6px; min-width: 220px; }
.center .hint { font-size: 13px; }

/* manage: participants and runs */
.manage .search {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--card); font-size: 15px;
}
.m-sec { color: var(--muted); font-size: 13px; font-weight: 600; margin: 6px 2px 0; }
.person { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.person[hidden] { display: none; }
.person .p-main { flex: 1; min-width: 0; }
.p-name { font-weight: 600; }
.p-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
.chip.danger { background: #fdecec; color: var(--danger); }
.chip.live { background: #e6f6ec; color: #1f8a4c; }
.waiting summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 6px 2px; }
.waiting .person { margin-top: 6px; }
.btn.small { padding: 6px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.btn svg { flex: none; }
#newrun { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.run { background: var(--card); border-radius: 12px; padding: 12px; }
.run-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.run-actions { display: flex; gap: 8px; margin-top: 10px; }
.run-form { display: flex; flex-direction: column; gap: 12px; padding: 4px 12px 8px; }
.run-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.run-form input, .run-form select {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 15px; font-weight: 400; background: var(--card); color: var(--text);
}
.run-form small { color: var(--muted); font-weight: 400; font-size: 12px; }
.run-form [hidden] { display: none !important; }
.ended-bar { background: #fff6e0; color: #8a5a00; font-size: 13px; padding: 8px 12px; text-align: center; }
.composer[hidden] { display: none !important; }
.chat-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 12px; font-size: 13px; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--line); }
.chat-state.closed { background: #fff6e0; color: #8a5a00; }
.chat-state button { flex: none; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; padding: 6px 8px; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check-row input { width: 18px; height: 18px; flex: none; }
.sheet-field { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; font-size: 13px; color: var(--muted); }
.sheet-field input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 15px; background: var(--card); color: var(--text); }
/* materials: the picture or video on top, the text under it */
.post > .text, .post-sheet > .text { margin-top: 8px; }
.post > .post-head + .text, .post-sheet > .date + .text { margin-top: 0; }
.post > .post-head + img, .post > .post-head + video { margin-top: 2px; }
.run-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.run-form label.check input { width: 18px; height: 18px; }
.run-actions { flex-wrap: wrap; }

/* wallpaper: the chat and the materials sit on a soft patterned background */
.messages, .feed {
  background-color: var(--wall);
  background-image: var(--wall-pattern);
  background-size: 160px 160px;
}
:root { --wall: #ece9f7; --wall-pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><g fill='none' stroke='%235b5bd6' stroke-opacity='0.09' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 56c0-18 14-30 34-32 2 20-12 34-32 32z'/><path d='M20 56l22-20'/><circle cx='120' cy='28' r='9'/><path d='M102 112c0-6 8-9 11-3 3-6 11-3 11 3 0 7-11 13-11 13s-11-6-11-13z'/><path d='M40 112l4 9 9 4-9 4-4 9-4-9-9-4 9-4z'/><path d='M128 70c6 0 10 6 6 11'/><circle cx='78' cy='78' r='3'/><path d='M72 20l6 6m0-6l-6 6'/><path d='M66 140c4-6 12-6 16 0'/></g></svg>"); }

/* dark theme follows the phone's setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121216; --card: #1e1e25; --text: #ececf1; --muted: #9a9cab; --line: #2d2e37;
    --accent: #8d8df2; --accent-soft: #2b2b48; --mine: #2f2f58; --danger: #ef6b6b;
    --wall: #15151b; --wall-pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><g fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 56c0-18 14-30 34-32 2 20-12 34-32 32z'/><path d='M20 56l22-20'/><circle cx='120' cy='28' r='9'/><path d='M102 112c0-6 8-9 11-3 3-6 11-3 11 3 0 7-11 13-11 13s-11-6-11-13z'/><path d='M40 112l4 9 9 4-9 4-4 9-4-9-9-4 9-4z'/><path d='M128 70c6 0 10 6 6 11'/><circle cx='78' cy='78' r='3'/><path d='M72 20l6 6m0-6l-6 6'/><path d='M66 140c4-6 12-6 16 0'/></g></svg>");
  }
  textarea, input, select { color: var(--text); }
  .vbar { background-color: #3a3b46; }
  .complaints-bar, .chip.danger { background: #3a1f22; }
  .chip.live { background: #193324; color: #6fd39a; }
  .ended-bar, .chat-state.closed { background: #3a3020; color: #e7c27a; }
  .msg.mine .bubble, .bubble.mine { color: var(--text); }
}
/* primary buttons inside sheets keep their look (the generic .sheet button rule wipes it) */
.sheet .btn { background: var(--accent); color: #fff; justify-content: center; border-radius: 10px; padding: 11px 14px; }
.sheet .btn.ghost { background: var(--accent-soft); color: var(--accent); }

/* replies to me */
.tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.replies-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; width: 100%;
  background: var(--accent-soft); color: var(--accent); padding: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.replies-bar[hidden] { display: none; }
.reply-item { border-top: 1px solid var(--line); padding: 10px 12px; }
.reply-item.unread { background: var(--accent-soft); }
.reply-item .c-head { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.reply-item .c-head b { color: var(--text); }
.reply-item .c-body { margin: 4px 0 6px; white-space: pre-wrap; }
.reply-item .quote { margin: 0 0 4px; }
.reply-item .btn.small, .reply-notify .btn.small { width: auto; display: inline-flex; padding: 6px 10px; font-size: 13px; margin-top: 6px; }
.reply-notify { border-top: 1px solid var(--line); padding: 10px 12px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; flex: none; }
.run.setting .p-meta { margin-top: 6px; }

/* reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.react {
  display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid transparent; border-radius: 14px; padding: 2px 9px 2px 7px;
  background: var(--accent-soft); color: var(--accent); font-size: 17px; line-height: 22px; cursor: pointer;
}
.react span { font-size: 13px; font-weight: 600; }
.react.mine { border-color: var(--accent); }
.msg.mine .react:not(.mine) { background: rgba(255, 255, 255, 0.6); }
.react-row { display: flex; justify-content: space-between; padding: 6px 2px 10px; border-bottom: 1px solid var(--line); }
.sheet .react-row button {
  width: 34px; height: 38px; flex: none; padding: 0; justify-content: center; font-size: 23px; border-radius: 10px;
}
.sheet .react-row button.on { background: var(--accent-soft); }
@media (prefers-color-scheme: dark) { .msg.mine .react:not(.mine) { background: rgba(255, 255, 255, 0.12); } }
