:root {
  --ink: #181a2f;
  --panel: #1e2440;
  --panel-2: #242e49;
  --line: #37415c;
  --text: #e9ecf5;
  --muted: #8f99b8;
  --mine: #37415c;
  --accent: #b4182d;
  --accent-soft: #fda481;
  --gold: #fda481;          /* историческое имя: везде, где был акцент */
  --danger: #e0596a;
  --radius: 14px;
  --sans: Calibri, Carlito, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --serif: Calibri, Carlito, "Segoe UI", -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.hidden { display: none !important; }

button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.brand {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
}
.brand.small { font-size: 1.25rem; }

/* ------------------------------------------------------------------ вход */

.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 360px;
}
.auth .brand { font-size: 2.6rem; margin-bottom: 6px; }
.auth-lead {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.5;
  max-width: 30ch;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 8px 2px;
  margin-right: 20px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.is-active { color: var(--text); border-bottom-color: var(--gold); }

.fields { display: grid; gap: 10px; }
.field {
  width: 100%;
  padding: 13px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.field::placeholder { color: var(--muted); }

.primary {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
}
.primary:disabled { opacity: .5; }
.error { color: var(--danger); min-height: 1.2em; margin: 12px 0 0; font-size: .9rem; }

/* ------------------------------------------------------------------ каркас */

.app { display: flex; height: 100%; }

.sidebar {
  width: 320px;
  flex: 0 0 320px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--panel);
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
}
.side-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.chat-list { flex: 1; overflow-y: auto; }
.chat-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.chat-row:hover { background: var(--panel-2); }
.chat-row.is-active { background: var(--panel-2); }
.avatar {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  background: #3a2f44;
  color: #e7dcea;
}
.avatar.group { border-radius: 12px; background: #2f3f47; }
.chat-meta { min-width: 0; flex: 1; }
.chat-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-last {
  color: var(--muted);
  font-size: .86rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

.badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------------ чат */

.room { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.empty { flex: 1; display: grid; place-items: center; color: var(--muted); }
.conversation { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.room-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
#room-name { font-family: var(--serif); font-size: 1.1rem; display: block; }
.room-sub {
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.back { display: none; font-size: 1.6rem; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.day {
  align-self: center;
  color: var(--muted);
  font-size: .78rem;
  margin: 14px 0 8px;
}
.msg {
  max-width: min(72%, 560px);
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { min-width: 0; }
.msg-more {
  flex: 0 0 24px;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: var(--muted);
  line-height: 1;
}
.msg-more:hover { background: var(--panel-2); color: var(--text); }
@media (hover: hover) {
  .msg-more { opacity: 0; }
  .msg:hover .msg-more { opacity: 1; }
}
.msg + .msg { margin-top: 3px; }
.msg.first { margin-top: 12px; }

.bubble {
  background: var(--panel-2);
  padding: 8px 12px 6px;
  border-radius: var(--radius);
  border-top-left-radius: 5px;
  line-height: 1.42;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.msg.mine .bubble {
  background: var(--mine);
  border-top-left-radius: var(--radius);
  border-top-right-radius: 5px;
}
.author {
  font-family: var(--serif);
  color: var(--gold);
  font-size: .88rem;
  margin-bottom: 3px;
}
.stamp {
  color: var(--muted);
  font-size: .7rem;
  float: right;
  margin: 6px 0 0 10px;
}
.msg.mine .stamp { color: rgba(255,255,255,.55); }
.tick { margin-left: 5px; letter-spacing: -2px; }
.tick.seen { color: #9fd3b8; }
.msg.sending { opacity: .55; }

.bubble img, .bubble video {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  margin-bottom: 4px;
}
.bubble audio { width: 240px; max-width: 100%; margin-bottom: 4px; }
.file-link {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 4px 0;
}
.file-icon {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  background: rgba(255,255,255,.09);
  display: grid; place-items: center;
}
.file-size { color: var(--muted); font-size: .78rem; }

.pending {
  padding: 8px 16px;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--line);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.input {
  flex: 1;
  resize: none;
  max-height: 140px;
  padding: 11px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  line-height: 1.4;
}
.input::placeholder { color: var(--muted); }
.send {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
}
.attach { flex: 0 0 36px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.search-icon { color: var(--muted); display: flex; }
.search-box .field { padding: 9px 12px; }
.found-date { color: var(--muted); font-size: .74rem; white-space: nowrap; align-self: flex-start; }
.edited { font-size: .68rem; opacity: .8; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.avatar { overflow: hidden; }
.room-title {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  padding: 0;
}
.room-title:hover #room-name { color: var(--gold); }
.danger-btn { background: transparent; color: var(--danger); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ ответы */

.quote {
  border-left: 2px solid var(--gold);
  padding: 2px 0 2px 8px;
  margin-bottom: 6px;
  cursor: pointer;
  opacity: .85;
}
.quote-author { font-family: var(--serif); font-size: .85rem; color: var(--gold); }
.quote-text {
  font-size: .85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msg.mine .quote-text { color: rgba(255,255,255,.7); }
.msg.flash .bubble { animation: flash 900ms ease-out; }
@keyframes flash { 0%, 40% { background: #4a4360; } }

.reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.reply-strip { width: 2px; align-self: stretch; background: var(--gold); border-radius: 1px; }
.reply-text { flex: 1; min-width: 0; font-size: .85rem; }
.reply-text > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reply-author { font-family: var(--serif); color: var(--gold); }
.reply-preview { color: var(--muted); }

.role-note { color: var(--gold); font-size: .76rem; margin-top: 1px; }
.row-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-act {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}
.row-act:hover { background: var(--panel-2); color: var(--text); }
.row-act.danger { color: var(--danger); }

.check-row { cursor: pointer; }
.check-row input { accent-color: var(--gold); width: 18px; height: 18px; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 4px;
}
.dialog-btn { padding: 9px 16px; border-radius: 9px; color: var(--muted); }
.dialog-btn:hover { background: var(--panel-2); color: var(--text); }
.dialog-btn.danger { color: var(--danger); }

.msg-menu {
  position: fixed;
  z-index: 30;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  min-width: 150px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.msg-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
}
.msg-menu button:hover { background: var(--line); }
.msg-menu .danger { color: var(--danger); }

/* ------------------------------------------------------------------ голос и кружки */

.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 2px 0 6px;
}
.voice-play {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  font-size: .8rem;
}
.voice-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.18);
  cursor: pointer;
}
.voice-fill { height: 100%; width: 0; border-radius: 2px; background: var(--gold); }
.voice-time { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.msg.mine .voice-time { color: rgba(255,255,255,.6); }

.circle { position: relative; width: 220px; max-width: 62vw; cursor: pointer; }
.circle video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: #000;
  display: block;
  margin: 0;
}
.circle-time {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .72rem;
}
.msg:has(.circle) .bubble { background: none; padding: 0; }

.rec-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.rec-preview {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  transform: scaleX(-1);
}
.rec-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; }
.rec-cancel { flex: 1; text-align: left; color: var(--muted); }
.rec-cancel:hover { color: var(--text); }

.round {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  font-size: 1.1rem;
}
.ghost { background: var(--panel-2); border: 1px solid var(--line); }
.ghost:hover { background: var(--line); }

/* ------------------------------------------------------------------ окно */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,7,13,.72);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}
.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin: 0; }
.modal-body { overflow-y: auto; padding: 8px 0 14px; }
.modal-body .field, .modal-body .primary { width: calc(100% - 36px); margin-left: 18px; margin-right: 18px; }

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
}
.person:hover { background: var(--panel-2); }
.person input { accent-color: var(--gold); width: 18px; height: 18px; }
.section-note { color: var(--muted); font-size: .85rem; padding: 6px 18px 10px; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0 18px;
  word-break: break-all;
  color: var(--gold);
}

@media (max-width: 720px) {
  .sidebar { width: 100%; flex: 1 0 100%; }
  .app.in-room .sidebar { display: none; }
  .room { display: none; }
  .app.in-room .room { display: flex; }
  .back { display: grid; }
  .msg { max-width: 84%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ аватарки в группе */

.msg-ava { width: 30px; height: 30px; flex: 0 0 30px; font-size: .82rem; align-self: flex-end; }
.msg-ava-gap { width: 30px; flex: 0 0 30px; }

/* ------------------------------------------------------------------ шапка списка */

.side-head { gap: 8px; padding: 10px 10px; }
.search-box { flex: 1; border-bottom: 0; padding: 0; }
.search-box .field { border-radius: 20px; }

/* ------------------------------------------------------------------ шапка чата */

.room-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 2px 4px;
  border-radius: 10px;
}
.room-title:hover { background: var(--panel-2); }
.room-title-text { min-width: 0; flex: 1; }
.head-ava { width: 40px; height: 40px; flex: 0 0 40px; }
.room-sub.is-online, .room-sub.is-live { color: var(--accent-soft); }

/* ------------------------------------------------------------------ закреплённое */

.pin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.pin-bar:hover { background: var(--panel-2); }
.pin-strip { width: 2px; align-self: stretch; background: var(--accent-soft); border-radius: 1px; }
.pin-text { flex: 1; min-width: 0; font-size: .85rem; }
.pin-label { color: var(--accent-soft); display: block; }
.pin-preview {
  color: var(--muted);
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ шторка */

.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(10,12,24,0); transition: background .2s; }
.drawer.open { background: rgba(10,12,24,.6); }
.drawer-panel {
  width: 290px;
  max-width: 84vw;
  height: 100%;
  background: var(--panel);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform .2s ease-out;
  display: flex;
  flex-direction: column;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-top { padding: 20px 18px 16px; border-bottom: 1px solid var(--line); }
.big-ava { width: 68px; height: 68px; flex: 0 0 68px; font-size: 1.7rem; margin-bottom: 12px; }
.drawer-name { font-size: 1.05rem; }
.drawer-user { color: var(--muted); font-size: .85rem; }
.drawer-nav { padding: 8px 0; overflow-y: auto; }
.drawer-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  color: var(--text);
}
.drawer-nav button:hover { background: var(--panel-2); }
.drawer-nav .danger { color: var(--danger); }

/* ------------------------------------------------------------------ карточка чата */

.info-head { text-align: center; padding: 8px 18px 16px; border-bottom: 1px solid var(--line); }
.info-head .big-ava { margin: 0 auto 10px; }
.info-name { font-size: 1.15rem; }
.info-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }

.section-tabs { padding: 0 12px; margin: 10px 0 6px; overflow-x: auto; }
.section-tabs .tab { margin-right: 14px; font-size: .88rem; white-space: nowrap; }
.section-pane { min-height: 120px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 0 12px;
}
.media-cell { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; cursor: pointer; }
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-badge {
  position: absolute;
  left: 5px; bottom: 5px;
  background: rgba(0,0,0,.6);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .7rem;
}

/* короткие сообщения не должны переносить время на новую строку */
.bubble { min-width: 84px; }

/* ------------------------------------------------------------------ ссылки в сообщениях */

.msg-link {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.msg-link:hover { text-decoration-thickness: 2px; }
.msg.mine .msg-link { color: #ffd9c2; }

/* ------------------------------------------------------------------ темы и палитры */

html[data-theme="light"] {
  --ink: #eef1f8;
  --panel: #ffffff;
  --panel-2: #e6ebf6;
  --line: #d3dae9;
  --text: #1b2136;
  --muted: #67718c;
  --mine: #dfe7fb;
}
html[data-theme="light"] .msg.mine .stamp,
html[data-theme="light"] .msg.mine .voice-time { color: #5c6684; }
html[data-theme="light"] .msg.mine .quote-text { color: #56607a; }
html[data-theme="light"] .msg.mine .msg-link { color: #a8451f; }

html[data-palette="graphite"] { --accent: #4a5568; --accent-soft: #a3b1c9; --gold: #a3b1c9; }
html[data-palette="forest"]   { --accent: #2f6f4f; --accent-soft: #9fd9b0; --gold: #9fd9b0; }
html[data-palette="ocean"]    { --accent: #2f6f8f; --accent-soft: #86cfe6; --gold: #86cfe6; }
html[data-palette="plum"]     { --accent: #7a3f8f; --accent-soft: #d7a8ee; --gold: #d7a8ee; }

/* ------------------------------------------------------------------ профиль в шторке */

.ava-btn { display: block; padding: 0; border-radius: 50%; }
.ava-btn:hover { opacity: .85; }
.name-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--text);
  font-size: 1.05rem;
}
.name-btn:hover .pencil { color: var(--accent-soft); }
.pencil { color: var(--muted); display: flex; }

/* ------------------------------------------------------------------ приглашение */

.code-row { display: flex; align-items: center; gap: 8px; padding: 0 18px; }
.code-row .code { flex: 1; margin: 0; }
.qr-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px 4px; }
.qr-slot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 220px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: .85rem;
}
.share-btn { width: 46px; height: 46px; }

/* ------------------------------------------------------------------ настройки */

.modal-card.wide { max-width: 560px; }
.set-head {
  color: var(--accent-soft);
  font-size: .85rem;
  padding: 16px 18px 4px;
  margin: 0;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
}
.set-label { flex: 1; }
.set-row input[type="range"] { flex: 0 0 180px; accent-color: var(--accent-soft); }

.switch {
  width: 44px; height: 25px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: var(--line);
  padding: 3px;
  display: flex;
  transition: background .15s;
}
.switch.on { background: var(--accent); }
.knob {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.switch.on .knob { transform: translateX(19px); }

.palette-row { display: flex; gap: 8px; }
.palette {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
}
.palette.is-active { border-color: var(--accent-soft); }
.palette .sw { width: 12px; height: 18px; border-radius: 3px; display: block; }
.palette[data-palette="tete"] .sw1 { background: #181a2f; }
.palette[data-palette="tete"] .sw2 { background: #b4182d; }
.palette[data-palette="tete"] .sw3 { background: #fda481; }
.palette[data-palette="graphite"] .sw1 { background: #1c1f26; }
.palette[data-palette="graphite"] .sw2 { background: #4a5568; }
.palette[data-palette="graphite"] .sw3 { background: #a3b1c9; }
.palette[data-palette="forest"] .sw1 { background: #16241c; }
.palette[data-palette="forest"] .sw2 { background: #2f6f4f; }
.palette[data-palette="forest"] .sw3 { background: #9fd9b0; }
.palette[data-palette="ocean"] .sw1 { background: #14232c; }
.palette[data-palette="ocean"] .sw2 { background: #2f6f8f; }
.palette[data-palette="ocean"] .sw3 { background: #86cfe6; }
.palette[data-palette="plum"] .sw1 { background: #221630; }
.palette[data-palette="plum"] .sw2 { background: #7a3f8f; }
.palette[data-palette="plum"] .sw3 { background: #d7a8ee; }

/* кнопки в окне приглашения не должны схлопываться */
.code-row .icon-btn, .qr-row .share-btn { flex: 0 0 auto; }
.qr-slot { margin: 0; }
