/* The messenger's screens: one page, a list beside the open conversation (one at a time on a phone). */
:root {
  /* Eve's design (DESIGN.md, section 2), on the app's names: --bg is its --app (the background), --panel its --bg (the
     surfaces), --mine and --theirs its bubbles, --accent-text its --on-accent. */
  --bg: #f4f6f5;
  --panel: #ffffff;
  --rail: #fafbfa;
  --text: #111815;
  --muted: #56605b;
  --faint: #66706b;
  --line: #e2e7e4;
  --accent: #1e7a52;
  --accent-text: #ffffff;
  --soft: #e4f1ea;
  --soft-text: #155e3d;
  --hover: #edf0ee;
  --mine: #ddefe5;
  --theirs: #ffffff;
  --online: #1e9a62;
  --away: #c98a1b;
  --offline: #9aa29e;
  --switch-off: #b9c2bd;
  --warn-bg: #fdf3e1;
  --warn-text: #7a4b00;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --live: #d92d20;
  /* Unread counts: red, as Facebook's and Slack's, so they stand out. */
  --badge: #e0245e;
  --shadow: 0 16px 40px rgba(16, 24, 20, 0.16), 0 2px 6px rgba(16, 24, 20, 0.06);
  --scrim: rgba(16, 24, 20, 0.32);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1211;
    --panel: #161a18;
    --rail: #131715;
    --text: #e9edeb;
    --muted: #a6afaa;
    --faint: #949e99;
    --line: #2a312e;
    --accent: #3fb07f;
    --accent-text: #04130c;
    --soft: #183a2b;
    --soft-text: #8adbb3;
    --hover: #202724;
    --mine: #1a3a2c;
    --theirs: #1c2220;
    --online: #3fb07f;
    --away: #e0a43a;
    --offline: #66706b;
    --switch-off: #4a534f;
    --warn-bg: #3a2e16;
    --warn-text: #f2cf8b;
    --danger: #f59a92;
    --danger-bg: #3a1e1c;
    --live: #f04438;
    --badge: #f0476f;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
    --scrim: rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme='dark'] {
  --bg: #0f1211;
  --panel: #161a18;
  --rail: #131715;
  --text: #e9edeb;
  --muted: #a6afaa;
  --faint: #949e99;
  --line: #2a312e;
  --accent: #3fb07f;
  --accent-text: #04130c;
  --soft: #183a2b;
  --soft-text: #8adbb3;
  --hover: #202724;
  --mine: #1a3a2c;
  --theirs: #1c2220;
  --online: #3fb07f;
  --away: #e0a43a;
  --offline: #66706b;
  --switch-off: #4a534f;
  --warn-bg: #3a2e16;
  --warn-text: #f2cf8b;
  --danger: #f59a92;
  --danger-bg: #3a1e1c;
  --live: #f04438;
  --badge: #f0476f;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --scrim: rgba(0, 0, 0, 0.5);
}
/* Inter, kept here (no font service called): Latin and its accents, every weight. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* A person's pick (light or dark) wins over the device's. */
:root[data-theme='light'] {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
/* Hidden means hidden, whatever display a class gives it. */
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
/* DESIGN.md section 5: one button shape. Plain is the secondary button; .primary, .ghost and .danger the others. */
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
button:hover:not(:disabled) {
  background: var(--hover);
}
button.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}
button.primary:hover:not(:disabled) {
  background: var(--accent);
  filter: brightness(1.08);
}
button.ghost {
  border-color: transparent;
  background: none;
}
button.danger {
  color: var(--danger);
}
button.link {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--soft-text);
}
button.link:hover:not(:disabled) {
  background: none;
  text-decoration: underline;
}
/* DESIGN.md section 6: a visible focus ring on everything. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.link.danger {
  color: var(--danger);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
/* Waiting on the service: a second click does nothing meanwhile. */
button[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
}
input[type='text'],
input[type='password'],
input[type='url'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='search'],
input[type='date'],
input[type='time'],
input[type='datetime-local'],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  line-height: 20px;
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
}
/* A few digits: as narrow as they need (the trim's seconds). */
input[type='number'] {
  width: 6em;
}
h1,
h2,
h3 {
  margin: 0;
}
/* Section labels ("CHANNELS", "NOTIFICATIONS"). */
h2,
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 16px 0 6px;
}

.app {
  display: grid;
  grid-template-columns: 340px 1fr;
  /* One row, the screen's height: a long list scrolls inside the sidebar, never the page. */
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  padding: 0 12px 16px;
}
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.topbar h1 {
  font-size: 20px;
  flex: 1;
}
.topbar button {
  flex: none;
  white-space: nowrap;
  min-width: 40px;
}
.empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  max-width: 420px;
}

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  gap: 12px;
  background: none;
}
.item:hover:not(:disabled) {
  background: var(--hover);
}
.item.current,
.item.current:hover:not(:disabled) {
  background: var(--soft);
}
.item .avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hover);
  color: var(--muted);
  font-size: 18px;
}
.item .avatar {
  position: relative;
}
.item .avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.item .avatar .initial {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.item .text {
  flex: 1;
  min-width: 0;
}
.item .name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item .sub {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  background: var(--badge);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  font-size: 12px;
  min-width: 20px;
  padding: 1px 7px;
  text-align: center;
}
.request {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}
.request .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header .titles {
  flex: 1;
  min-width: 0;
}
.header .title {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header .sub {
  color: var(--muted);
  font-size: 13px;
}
.back {
  display: none;
}
.live-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--live);
  color: #fff;
}
.live-banner a {
  color: inherit;
  font-weight: 700;
}
.catch-up-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--mine);
  border-bottom: 1px solid var(--line);
}
.catch-up-banner span {
  flex: 1;
}
.attachments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0;
}
.photo {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
}
.attachments audio {
  width: min(280px, 100%);
}
.file {
  color: var(--soft-text);
}
.attach {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 14px;
  background: var(--panel);
}
button.recording {
  background: var(--live);
  color: #fff;
}
.mention {
  color: var(--soft-text);
  font-weight: 600;
}
.forwarded {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}
.face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.face.big {
  width: 96px;
  height: 96px;
  display: block;
  margin: 4px auto 8px;
}
.note-bar {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}
.pinned-bar {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  padding: 8px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Search boxes: the search icon inside, on the left (DESIGN.md section 5). */
input[type='search'] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel) no-repeat 12px center / 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366706b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  border-radius: 10px;
  padding: 9px 12px 9px 38px;
  margin-bottom: 4px;
}
.ticks {
  letter-spacing: -2px;
}
.ticks.read {
  color: var(--accent);
  font-weight: 700;
}
.highlight {
  outline: 3px solid var(--accent);
}
/* The timeline: on the app background, its bubbles at most 70% wide (DESIGN.md section 5, Chat timeline). */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px max(16px, calc((100% - 820px) / 2));
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
}
.message {
  max-width: 70%;
  align-self: flex-start;
  background: var(--theirs);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 12px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.message.mine {
  align-self: flex-end;
  background: var(--mine);
  border-color: transparent;
  border-radius: 16px 16px 4px 16px;
}
.message .sender,
.poll-card .sender,
.event-card .sender {
  font-size: 12px;
  font-weight: 600;
  color: var(--soft-text);
}
.message .body {
  white-space: pre-wrap;
}
.message .meta,
.poll-card .meta,
.event-card .meta,
.live-card .meta {
  font-size: 12px;
  color: var(--faint);
  text-align: right;
}
.message .deleted {
  color: var(--muted);
}
/* A reported message, whole: who reads it decides about it. */
.quote.report-quote {
  white-space: normal;
  overflow-wrap: anywhere;
}
.quote {
  border-left: 3px solid var(--accent);
  padding: 2px 8px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.reaction {
  border-radius: 999px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 22px;
}
.reaction.mine {
  border-color: var(--accent);
  background: var(--soft);
}
.live-card {
  align-self: center;
  border: 2px solid var(--live);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--panel);
  text-align: center;
}
.live-card.ended {
  border-color: var(--line);
  color: var(--muted);
}
.plan-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  margin: 6px 0;
}
.plan-meter progress {
  grid-column: 1 / -1;
  width: 100%;
}
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.plan-card.current {
  border-color: var(--accent);
}
.plan-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}
.plan-price {
  font-size: 18px;
  font-weight: 600;
}
.plan-limits {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.plan-limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
}
.emoji-picker {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 12px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 24px));
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.emoji-picker-head {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.emoji-picker-body {
  overflow-y: auto;
  padding: 4px 8px 8px;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}
.emoji-choice {
  padding: 4px 0;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
.emoji-choice:hover {
  background: var(--hover);
}
/* The composer: one box on the timeline's background, text on top, its tools under it (DESIGN.md section 5). */
.composer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px max(16px, calc((100% - 820px) / 2)) 16px;
  background: var(--bg);
}
.composer .row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.composer textarea {
  resize: none;
  /* About six lines; past that it scrolls, the newest line in sight. */
  max-height: 160px;
  overflow-y: auto;
}
.composer .note {
  color: var(--muted);
  font-size: 13px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.status-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.status-presets button {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}
.emoji-input {
  width: 56px;
  flex: 0 0 56px;
  text-align: center;
}
.chip span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 10;
}
/* "Report a problem", while the team tries the app: small, in the bottom left corner, under any window. */
.bug-button {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 9;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  opacity: 0.55;
}
.bug-button:hover {
  opacity: 1;
}
.bug-button[hidden] {
  display: none;
}
/* On a phone (or a narrow window) the corner button would cover the tab bar: it is in the profile window instead. */
@media (max-width: 760px) {
  .bug-button {
    display: none;
  }
}
@media (min-width: 761px) {
  .report-in-profile {
    display: none;
  }
}
.problem-shot img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  display: block;
}
.modal[hidden] {
  display: none;
}
/* Dialogs: 560 wide for forms (DESIGN.md section 5), title 18/700, the close button on the right. */
.dialog {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 8px 24px 24px;
}
.dialog .head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px -24px 8px;
  padding: 20px 16px 8px 24px;
  /* A long window keeps its title and close button in sight while it scrolls. */
  position: sticky;
  top: -8px;
  background: var(--panel);
  z-index: 1;
}
.dialog .head h3 {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
}
.dialog form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.dialog .inline {
  flex-direction: row;
  /* A phone: the boxes take the line, the buttons go under them, nothing past the edge. */
  flex-wrap: wrap;
  align-items: center;
}
.dialog .inline > input:not([type='number'], [type='checkbox'], [type='radio'], [type='file']),
.dialog .inline > textarea,
.dialog .inline > select {
  flex: 1 1 160px;
  min-width: 0;
}
.dialog .inline > button {
  white-space: nowrap;
}
.row-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.row-list > div > .grow {
  /* Its words keep a readable width: the buttons beside go under them on a phone. */
  flex: 1 1 200px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.role {
  font-size: 13px;
  color: var(--muted);
}
.emoji-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.emoji-row button {
  font-size: 22px;
  padding: 4px 10px;
}
.qr {
  display: block;
  margin: 8px auto;
  image-rendering: pixelated;
  width: 180px;
  height: 180px;
  background: #fff;
  padding: 6px;
  border-radius: 8px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.event-card {
  align-self: center;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-card.cancelled {
  border-color: var(--line);
  color: var(--muted);
}
.event-card .question {
  font-weight: 700;
}
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 20px;
}
.poll-card {
  align-self: center;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poll-card .question {
  font-weight: 700;
}
.poll-option {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: linear-gradient(to right, var(--mine) var(--share), var(--panel) var(--share));
}
/* A long answer wraps inside the card; its count stays in sight. */
.poll-option > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.poll-option > :last-child {
  flex: none;
}
.poll-option.chosen {
  border-color: var(--accent);
  font-weight: 600;
}
.poll-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.invite-link {
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: center;
}
.actions-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--panel);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: var(--shadow);
  z-index: 20;
  max-width: calc(100% - 32px);
}
/* A field's label above it: 13/600, muted (DESIGN.md section 5). */
label.stacked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
label.stacked > :is(input, select, textarea) {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}
input[type='file'] {
  max-width: 100%;
  min-width: 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: auto;
  width: min(440px, calc(100% - 32px));
  text-align: center;
}

@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .main {
    display: none;
  }
  .app.show-main .sidebar {
    display: none;
  }
  .app.show-main .main {
    display: flex;
  }
  .back {
    display: inline-block;
  }
  .sidebar {
    border-right: 0;
  }
}

.status-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 8px;
}
.status-circle {
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 64px;
  flex: none;
}
.status-circle .ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hover);
  border: 2px solid var(--line);
  font-weight: 600;
}
.status-circle.unseen .ring {
  border-color: var(--accent);
}
.status-circle .label {
  font-size: 12px;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-body {
  font-size: 18px;
  white-space: pre-wrap;
}

.view-once {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: none;
  font-weight: 600;
  color: var(--muted);
}
button.view-once {
  color: var(--soft-text);
}
.link.on {
  font-weight: 700;
}

#call {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  display: grid;
  place-items: center;
}
#call .sub {
  color: #ddd;
}
.call-card,
.call-screen {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 24px;
}
.call-screen {
  position: relative;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}
.call-screen .call-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
  z-index: -1;
}
.call-screen:not(.video) .call-remote {
  display: none;
}
.call-local {
  position: absolute;
  right: 16px;
  bottom: 96px;
  width: 28%;
  max-width: 200px;
  border-radius: 12px;
  border: 2px solid #fff;
}
.call-top {
  margin-top: 24px;
}
.call-name {
  font-size: 24px;
  font-weight: 600;
}
.call-buttons {
  display: flex;
  gap: 16px;
}
.call-buttons button {
  border-radius: 999px;
  padding: 12px 20px;
}
.call-answer {
  background: #1f9d55;
  color: #fff;
  border: 0;
}
.call-decline {
  background: #d64545;
  color: #fff;
  border: 0;
}
/* Full screen and back, in the call's top right corner. */
.call-expand {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
#call .call-expand {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.call-expand:hover {
  opacity: 1;
}
/* A shared screen shown whole, not cut to fill the frame. */
.call-screen .call-remote {
  object-fit: contain;
}
/* The call, small and floating at the bottom right while the app is used beside it (dragged anywhere). */
#call.floating {
  inset: auto 16px 16px auto;
  width: 360px;
  height: 250px;
  display: block;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  cursor: move;
  touch-action: none;
  /* Bigger or smaller by its bottom right corner, too. */
  resize: both;
  min-width: 260px;
  min-height: 160px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
}
#call.floating:has(.call-screen:not(.video)) {
  height: auto;
}
#call.floating .call-screen {
  padding: 8px;
  gap: 6px;
}
#call.floating .call-top {
  margin-top: 0;
}
#call.floating .call-name {
  font-size: 15px;
}
#call.floating .call-buttons {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
#call.floating .call-buttons button {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
#call.floating .call-local {
  width: 30%;
  right: 8px;
  bottom: 48px;
  border-width: 1px;
}
@media (max-width: 480px) {
  #call.floating {
    width: calc(100% - 32px);
  }
}
/* System events (calls, joins): a centred pill (DESIGN.md section 5, Chat timeline). */
.call-line {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.call-line.missed {
  color: var(--danger);
}
#call button {
  color: #111;
  background: #fff;
  border: 0;
}
#call button.call-answer,
#call button.call-decline {
  color: #fff;
}
#call button.call-answer {
  background: #1f9d55;
}
#call button.call-decline {
  background: #d64545;
}
.poll-option.right {
  border-color: var(--online);
  box-shadow: inset 0 0 0 1px var(--online);
}
.poll-option.wrong {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}
.request.suspicious {
  border-color: var(--danger);
}
.warning {
  color: var(--danger);
  font-size: 13px;
  margin: 4px 0;
}
.translation {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 4px;
}
.suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.suggestion {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 20px;
}
.video-note {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #111;
}
/* A note's ▶ until it plays (an iPhone draws no picture before), and why not when this device cannot play it. */
.video-note-wrap {
  position: relative;
  display: inline-block;
}
.video-note-play,
.video-note-cannot {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #fff;
}
.video-note-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  font-size: 24px;
}
.video-note-wrap.playing .video-note-play,
.video-note-wrap.unplayable .video-note-play,
.video-note-cannot {
  display: none;
}
.video-note-wrap.unplayable .video-note-cannot {
  display: grid;
  padding: 0 32px;
  text-align: center;
  font-size: 14px;
}
.recording-preview {
  margin: 0 auto 8px;
  border: 3px solid #d64545;
}
.clips {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  color: #fff;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}
.clip {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
}
.clip video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.clip-text {
  position: absolute;
  left: 16px;
  right: 80px;
  bottom: 24px;
  text-shadow: 0 1px 3px #000;
}
.clip-like {
  position: absolute;
  right: 16px;
  bottom: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 0;
  padding: 10px 14px;
}
.clip-like.on {
  background: rgba(214, 69, 69, 0.8);
}
.clips-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 41;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 0;
  width: 40px;
  height: 40px;
}
.empty-clips {
  color: #ccc;
}
.folder-tabs {
  display: flex;
  gap: 6px;
  /* Every tab and its ✎ and ＋ in reach: they go on more lines rather than past the edge. */
  flex-wrap: wrap;
  padding: 2px 0 6px;
}
.folder-tab {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 20px;
  flex: none;
}
.folder-tab.on,
.folder-tab.on:hover:not(:disabled) {
  background: var(--soft);
  color: var(--soft-text);
  border-color: var(--soft);
}
.wallpapers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.wallpaper-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid var(--line);
}
.wallpaper-swatch.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.wallpaper-none {
  background: var(--bg);
}
.wallpaper-mint {
  background: linear-gradient(160deg, #e3f6ec, #c8ecd9);
}
.wallpaper-sky {
  background: linear-gradient(160deg, #e4f0fb, #c6def5);
}
.wallpaper-sand {
  background: linear-gradient(160deg, #f8f1e3, #ecdcbc);
}
.wallpaper-blush {
  background: linear-gradient(160deg, #fbe9ee, #f3cdd8);
}
.wallpaper-night {
  background: linear-gradient(160deg, #1f2533, #2c3446);
}
.wallpaper-dots {
  background-color: #f4f5f7;
  background-image: radial-gradient(#d3d7de 1.2px, transparent 1.2px);
  background-size: 16px 16px;
}
.share-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin: 4px 0;
}

.install-bar {
  width: 100%;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 7px 12px;
}
.live-banner.failed {
  background: var(--danger-bg);
  color: var(--danger);
}
.topics-bar {
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.sticker-choice {
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.sticker-choice img {
  max-width: 100%;
  max-height: 100%;
}
.sticker-choice.add {
  font-size: 24px;
}
.sticker-message img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
}
.composer .row.tools {
  gap: 4px;
  align-items: center;
  /* A narrow phone or window: the buttons go on a second line, not off the screen. */
  flex-wrap: wrap;
}
.composer .row.tools button,
.composer .row.tools .attach {
  padding: 4px 8px;
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
}
/* Recording (a voice message, a video note, talking to type): the stop button shows, red. */
.composer .row.tools button.recording {
  white-space: nowrap;
  background: var(--live);
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}
.composer .row textarea {
  flex: 1;
  min-width: 0;
}
.link.edited {
  font-size: inherit;
  color: inherit;
  padding: 0;
}

/* Dark screens: the wallpapers and the warning banner in deep tones, so nothing glares. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .wallpaper-mint {
    background: linear-gradient(160deg, #10241b, #163126);
  }
  :root:not([data-theme='light']) .wallpaper-sky {
    background: linear-gradient(160deg, #111e2c, #17293d);
  }
  :root:not([data-theme='light']) .wallpaper-sand {
    background: linear-gradient(160deg, #26211a, #322a1f);
  }
  :root:not([data-theme='light']) .wallpaper-blush {
    background: linear-gradient(160deg, #2a1820, #36202a);
  }
  :root:not([data-theme='light']) .wallpaper-dots {
    background-color: #14171d;
    background-image: radial-gradient(#2a2f39 1.2px, transparent 1.2px);
  }
}
:root[data-theme='dark'] .wallpaper-mint {
  background: linear-gradient(160deg, #10241b, #163126);
}
:root[data-theme='dark'] .wallpaper-sky {
  background: linear-gradient(160deg, #111e2c, #17293d);
}
:root[data-theme='dark'] .wallpaper-sand {
  background: linear-gradient(160deg, #26211a, #322a1f);
}
:root[data-theme='dark'] .wallpaper-blush {
  background: linear-gradient(160deg, #2a1820, #36202a);
}
:root[data-theme='dark'] .wallpaper-dots {
  background-color: #14171d;
  background-image: radial-gradient(#2a2f39 1.2px, transparent 1.2px);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px;
}
.media-tile {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg);
}
.media-tile img,
.media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 70vw);
}
.voice-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 16px;
  cursor: pointer;
}
.voice-bar {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}
.voice-time {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.voice-speed {
  min-width: 40px;
  font-weight: 600;
}
.rules-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-wrap;
}
.rules-card button {
  align-self: flex-start;
}

.code-block {
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--code-bg, rgba(127, 127, 127, 0.12));
  font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

/* Link previews: an inset box, the domain small and muted, the title 14/600 (DESIGN.md section 5). */
.link-preview {
  display: block;
  margin: 6px 0 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  max-width: 420px;
}
.link-preview strong {
  display: block;
  margin: 2px 0;
  font-size: 14px;
  font-weight: 600;
}

.app-badge {
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(127, 127, 127, 0.18);
  color: var(--muted);
}
.webhook-url {
  display: block;
  padding: 6px 8px;
  word-break: break-all;
  user-select: all;
  background: rgba(127, 127, 127, 0.12);
  border-radius: 4px;
}

.app-title,
.workspace-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  height: 28px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 4px;
}
.brand-logo.big {
  display: block;
  height: 64px;
  max-width: 200px;
  margin: 6px 0;
}
/* Logos are fitted inside their rounded square, never cropped (DESIGN.md section 3). */
.workspace-logo {
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 9px;
}
/* A business's name and logo head its section: bigger than its channels, not a small grey heading. */
h2.workspace-heading,
.phone-app h2.workspace-heading {
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin: 10px 0 4px;
}
h2.workspace-heading .section-open {
  text-decoration: none;
}

/* View switches as the segmented control (DESIGN.md section 5): a track, the one on raised. */
.tabs,
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--hover);
}
.tab,
.segmented > button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.tab:hover:not(:disabled),
.segmented > button:hover:not(:disabled) {
  background: none;
  color: var(--text);
}
.tab.on,
.tab.on:hover:not(:disabled),
.segmented > button.on,
.segmented > button.on:hover:not(:disabled) {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.people-heading {
  margin: 8px 12px 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.item.coworker {
  padding-top: 4px;
  padding-bottom: 4px;
}
.item.coworker .avatar {
  width: 28px;
  height: 28px;
  font-size: 15px;
}

.custom-emoji {
  height: 1.3em;
  width: auto;
  vertical-align: -0.3em;
}
.emoji-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 8px 2px 0;
  font-size: 13px;
}

.bookmarks-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
}
.bookmark {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.bookmark:hover {
  text-decoration: underline;
}

.quote {
  margin: 4px 0;
  padding: 2px 10px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.message-list {
  margin: 4px 0;
  padding-left: 22px;
  white-space: normal;
}
.format-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.format-bar button {
  min-width: 36px;
  padding: 7px 8px;
  border-color: transparent;
  background: none;
}

.unreads-link {
  display: block;
  margin: 6px 12px 0;
  font-weight: 600;
}

/* A heading of the list that folds its conversations away. */
.section-heading {
  cursor: pointer;
  user-select: none;
}

.section-heading .caret {
  font-size: 0.8em;
  opacity: 0.6;
}

.section-heading .section-edit {
  margin-left: 6px;
  font-size: 0.85em;
}

/* A workspace's analytics: headline numbers, then messages a day as thin bars from the baseline. */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
}

.stat-value {
  font-size: 1.6em;
  font-weight: 600;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85em;
}

.day-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  border-bottom: 1px solid var(--line);
}

.day-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.day-bar:hover .day-bar-fill {
  opacity: 0.8;
}

.day-bar-fill {
  width: 100%;
  min-height: 1px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
}

.day-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8em;
}

.plain-table td {
  padding: 2px 12px 2px 0;
}

/* Canvases: a page of text with headings, and its contents beside it; lists: tasks ticked off. */
.canvas-toc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 2px solid var(--line);
  padding-left: 10px;
  margin: 8px 0;
}

.canvas-page {
  line-height: 1.5;
}

.canvas-heading {
  margin: 14px 0 4px;
}

.canvas-editor {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.done-item .grow {
  text-decoration: line-through;
  color: var(--muted);
}

/* Videos: the recording bar and countdown, the player, a shared video in a message, the watch page. */
.countdown {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 120px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.recording-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 40;
}

.recording-bar .live-dot {
  color: var(--live);
}

/* A voice message, video note or clip being recorded: the time, the voice's bars, Start over and Don't send beside them. */
.recording-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}
.recording-strip .live-dot {
  color: var(--live);
  animation: recording-blink 1s infinite;
}
@keyframes recording-blink {
  50% {
    opacity: 0.2;
  }
}
.recording-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.recording-strip .levels {
  flex: 0 1 200px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 28px;
  /* Room for every bar on a phone too. */
  min-width: 96px;
}
.recording-choice {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  white-space: nowrap;
}
.recording-strip .levels span {
  flex: 1;
  min-width: 1px;
  max-width: 6px;
  height: 10%;
  border-radius: 3px;
  background: var(--live);
  transition: height 0.1s;
}

.video-player {
  /* As big as fits, in the video's own shape: no black bars around it. */
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 8px;
}

.video-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.video-card-play {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
}

.dialog.dialog-wide {
  width: min(1200px, 100%);
}

/* Ibeazy Passwords alone, in the desktop app's menu-bar window (#passwords-quick). */
.passwords-frame.passwords-quick {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}
/* Ibeazy Mail, in its wide window: as tall as the screen allows, for the folders, list and message side by side. */
.mail-frame {
  display: block;
  width: 100%;
  height: min(86vh, 960px);
  border: 0;
  border-radius: 10px;
}
/* Ibeazy Passwords, in its wide window. */
.passwords-frame {
  display: block;
  width: 100%;
  height: min(80vh, 820px);
  border: 0;
  border-radius: 10px;
}

.watch-frame {
  display: block;
  width: 100%;
  height: min(82vh, 900px);
  border: 0;
}

.watch-page {
  overflow-y: auto;
  height: 100%;
}

.watch {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.watch h1 {
  font-size: 22px;
  margin: 6px 0;
}

.watch-brand {
  font-weight: 600;
  color: var(--soft-text);
}

.watch-tools {
  justify-content: flex-start;
  margin: 8px 0;
}

.watch-cta {
  display: inline-block;
  margin: 8px 0;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}

a.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

a.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.watch-tools select {
  width: auto;
}

/* Drawing on the screen while recording: the frozen picture, and the tools over it. */
.draw-board {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: #111;
  display: flex;
  flex-direction: column;
}

.draw-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.draw-tools .on {
  outline: 2px solid var(--accent);
}

.draw-group {
  display: flex;
  gap: 4px;
}

.draw-colour {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  padding: 0;
}

.draw-canvas {
  flex: 1;
  cursor: crosshair;
  touch-action: none;
}

/* The recording's floating window: the camera's bubble over the recording's buttons. */
.floating-recorder {
  margin: 0;
  padding: 8px;
  background: var(--panel);
  overflow: auto;
}

.floating-camera-tools {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.floating-camera video {
  display: block;
  width: 240px;
  height: 240px;
  margin: 0 auto 8px;
  border-radius: 50%;
  object-fit: cover;
}

.floating-recorder .recording-bar {
  position: static;
  transform: none;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 12px;
  box-shadow: none;
}

.draw-tools button {
  padding: 4px 8px;
}

.draw-note {
  font-size: 12px;
  color: var(--muted);
}

.floating-hint {
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--mine);
  font-size: 13px;
}

.draw-typing {
  position: fixed;
  width: 240px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  border: 2px dashed currentColor;
  z-index: 46;
}

.size-dot {
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
}

.video-cover {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--hover);
  flex: none;
}

.folders button.on {
  outline: 2px solid var(--accent);
}

/* The business sign-up page (/business): what a business gets, and Start free. */
.business-landing {
  max-width: 560px;
  margin: 48px auto;
  padding: 0 16px;
}
.business-landing h1 {
  font-size: 26px;
  margin-bottom: 16px;
}
.business-landing ul {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 16px;
}
.business-landing .button.primary {
  display: inline-block;
  padding: 12px 24px;
  font-size: 17px;
  border-radius: 10px;
  text-decoration: none;
}

/* The setup guide after a workspace is made: its steps, the link to send the team, what next. */
.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.setup-step.on {
  color: var(--soft-text);
  font-weight: 600;
}
.setup-step.done {
  color: var(--text);
}
.setup-link {
  padding: 10px 12px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  margin: 8px 0;
}
.setup-next {
  justify-content: flex-end;
  margin-top: 12px;
}
.setup-tips {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Buttons side by side in a window: apart, and on a second line when narrow. */
.dialog .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The booking link: my hours a row a weekday; the page people book from. */
.booking-day {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.booking-day .toggle {
  width: 130px;
}
.booking-day input[type='time'] {
  width: auto;
}
.book-page {
  display: block;
  overflow-y: auto;
  height: 100%;
}
.book {
  max-width: 640px;
  margin: 32px auto;
  padding: 0 16px;
}
.book-head .face {
  width: 56px;
  height: 56px;
}
.book-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.book-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.book-times button {
  padding: 10px;
  font-weight: 600;
  color: var(--soft-text);
  border-color: var(--accent);
}
.book-chosen {
  font-size: 18px;
  font-weight: 600;
}
.book-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.book-error {
  color: var(--danger);
}
.book-done h2 {
  text-transform: none;
  font-size: 22px;
  color: var(--text);
}

.book .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.book-days .link {
  font-size: 22px;
  padding: 0 8px;
}

/* A business's home: its name, what is left to set up, a card for each part. */
/* Pages (Business home, Videos, admin): on the app background, at most 1040 wide (DESIGN.md section 3). */
.business-home {
  padding: 32px max(24px, calc((100% - 1040px) / 2));
  overflow-y: auto;
  background: var(--bg);
}
.home-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.home-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.home-head .workspace-logo,
.home-head .brand-logo {
  width: 64px;
  height: 64px;
  max-width: none;
  object-fit: contain;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.home-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-text);
}
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.home-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.home-card > p {
  color: var(--muted);
}
.home-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-step {
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 0;
  font-size: 14px;
  cursor: pointer;
}
.home-step.done {
  color: var(--muted);
  text-decoration: line-through;
}
.section-heading .section-open {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0 2px;
  text-decoration: underline dotted;
}

/* GVO admin: headline tiles, a day a bar, tables. */
.admin-stats {
  padding: 32px max(24px, calc((100% - 1040px) / 2));
  overflow-y: auto;
  background: var(--bg);
}
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.stat-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  border-bottom: 1px solid var(--line);
}
.bar-slot {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.bar {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
}
.bar-slot:hover .bar {
  opacity: 0.75;
}
.bars-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.stat-table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 4px 6px;
}
.stat-table td {
  padding: 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

/* Cards on the business home and GVO admin: left-aligned, filling their column. */
.home-card,
.stat-chart,
.admin-stats .card {
  text-align: left;
  margin: 0;
  max-width: none;
  width: auto;
}
.home-cards {
  align-items: start;
}
.empty-conversation {
  margin: auto;
  max-width: 420px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.book-who {
  font-weight: 600;
  color: var(--muted);
}

.app.landing .sidebar {
  display: none;
}

.admin-stats .card {
  overflow-x: auto;
}

/* A list item with its ⋯ quick actions: shown on hover or keyboard focus, always on touch screens. */
.item-row {
  position: relative;
}
.item-row .item {
  padding-right: 34px;
}
.item-more {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 2px 8px;
  background: none;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}
.item-row:hover .item-more,
.item-more:focus-visible {
  opacity: 1;
}
.item-more:hover {
  background: var(--hover);
}
@media (hover: none) {
  .item-more {
    opacity: 0.6;
  }
}
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-actions button {
  text-align: left;
}

/* A screenshot from the desktop app, before picking where it goes. */
.screenshot-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 0 auto 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* The list on the left, compact: more conversations in view, the same text size. */
#sidebar .item {
  padding: 6px 10px;
}
/* Room on the right for its ⋯. */
#sidebar .item-row .item {
  padding-right: 34px;
}
#sidebar .item .avatar {
  width: 32px;
  height: 32px;
  font-size: 15px;
}
/* On a touch screen, rows stay tall enough for a finger. */
@media (hover: none) {
  #sidebar .item {
    padding: 8px;
  }
}

/* A shared screenshot's page (/s/<code>): the picture first, who shared it above, the messenger below. */
.shot-page {
  --shot-accent: var(--accent);
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}
.shot-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--shot-accent);
  margin-bottom: 16px;
}
.shot-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}
.shot-business {
  font-weight: 700;
  font-size: 18px;
}
.shot-download {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--shot-accent);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.shot-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.shot-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.shot-missing {
  padding: 48px 16px;
  text-align: center;
}

/* The phone app (mobile/), not the desktop app or a browser: made for fingers on a phone. */
/* Clear of the status bar at the top and the home bar at the bottom: the page fills the whole screen (viewport-fit). */
.phone-app .app {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--panel);
}
.phone-app .main {
  background: var(--bg);
}
/* The conversation's header, with its bigger buttons: the name and its line below on one line each. */
.phone-app .header {
  gap: 6px;
  padding: 8px 12px;
}
.phone-app .header .sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/*
 * Text the size the iPhone's Settings › Display › Text Size asks for, as Facebook's Messenger does: 17pt as it comes,
 * larger for someone who set it larger (-apple-system-body; 17px elsewhere). 1rem is that size; the chat and the list
 * of conversations follow Messenger's own proportions of it.
 */
html.phone-app {
  font-size: 17px;
  font: -apple-system-body;
}
.phone-app body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.45;
}
.phone-app .message .body,
.phone-app .composer textarea {
  font-size: 1rem;
}
.phone-app .message .sender {
  font-size: 0.82rem;
}
.phone-app .message .quote {
  font-size: 0.88rem;
}
.phone-app .message .meta {
  font-size: 0.76rem;
}
.phone-app .header .title {
  font-size: 1rem;
}
/* The list: Messenger's rows, a 60-point photo, the name in semibold at the text size and its line a size down. */
.phone-app .topbar h1 {
  font-size: 1.3rem;
}
.phone-app #sidebar input {
  font-size: 1rem;
  padding: 0.55em 1em;
  border-radius: 999px;
}
/* The search box: room on its left for its magnifying glass, at the phone's text size. */
.phone-app #sidebar input[type='search'] {
  padding-left: 2.5em;
  background-position: 0.85em center;
  background-size: 1.1em 1.1em;
}
.phone-app #sidebar .item {
  gap: 12px;
  padding: 8px 12px;
}
.phone-app #sidebar .item .avatar {
  width: 60px;
  height: 60px;
  font-size: 28px;
}
.phone-app #sidebar .item .name {
  font-size: 1rem;
}
.phone-app #sidebar .item .sub {
  font-size: 0.88rem;
}
.phone-app .section-heading {
  font-size: 0.82rem;
}
.phone-app .status-circle {
  width: 88px;
}
.phone-app .status-circle .ring {
  width: 64px;
  height: 64px;
}
.phone-app .status-circle .label {
  font-size: 0.76rem;
  max-width: 88px;
}
/* Typing boxes at 16px or more: below that, iOS zooms the page in on a tap, pushing Send off the screen. */
.phone-app input,
.phone-app select,
.phone-app textarea {
  font-size: max(16px, 1em);
}
/* Buttons a fingertip can hit: Apple's 44 points. */
.phone-app .topbar button,
.phone-app .header button,
.phone-app .composer .row button,
.phone-app .composer .row.tools .attach {
  min-width: 44px;
  min-height: 44px;
}
.phone-app .composer .row.tools .attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.phone-app .item-more {
  min-width: 44px;
  min-height: 44px;
}
.phone-app #sidebar .item-row .item {
  padding-right: 52px;
}
/* Windows clear of the status bar and home bar, so their ✕ can be tapped; their ‹ and ✕ the size of a fingertip. */
.phone-app .modal {
  padding: calc(env(safe-area-inset-top) + 8px) 8px calc(env(safe-area-inset-bottom) + 8px);
}
.phone-app .dialog .head button {
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
}
.phone-app .dialog .head .dialog-back {
  font-size: 30px;
  line-height: 1;
  margin-left: -12px;
}
/* Every back arrow the size of a fingertip; on a card (an invite, a join link) at its top left. */
.phone-app .back {
  min-width: 44px;
  min-height: 44px;
}
.phone-app .card > .back {
  display: block;
}

/* ---------- The list as WhatsApp's: every row with its newest message and when, newest first. */
.item .name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.item .name-row .name {
  flex: 1;
  min-width: 0;
}
.item .when {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}
/* Unread: the time in the unread count's colour, as WhatsApp's. */
.item .when.fresh {
  color: var(--badge);
  font-weight: 600;
}
.archived-row .archived-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.archived-row .name {
  font-weight: 600;
}
.archived-back {
  display: block;
  padding: 8px 4px;
}
.archived-note {
  padding: 0 4px 8px;
}
.empty-filter {
  padding: 24px 8px;
  text-align: center;
}

/* ---------- Wide screens: a rail of places beside the list, as WhatsApp's on a computer. */
.app.wa {
  grid-template-columns: 460px 1fr;
}
.app.wa .sidebar {
  padding: 0;
  overflow: hidden;
}
.wa-sidebar {
  display: flex;
  height: 100%;
}
/* The personal side's rail (DESIGN.md section 3): 72 wide, icon and 11px label buttons, the open one in --soft. */
.rail {
  flex: none;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--rail);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.rail-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 56px;
  min-height: 52px;
  padding: 6px 2px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.rail-item:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
.rail-item.on,
.rail-item.on:hover:not(:disabled) {
  background: var(--soft);
  color: var(--soft-text);
}
.rail-icon {
  font-size: 22px;
  line-height: 1;
}
.rail-item .icon {
  width: 22px;
  height: 22px;
}
.rail-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
.rail-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--badge);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.rail-heading {
  margin: 10px 0 2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}
.rail-spacer {
  flex: 1;
}
.wa-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0 16px 16px;
  background: var(--panel);
}
.wa-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
  background: var(--panel);
}
.wa-head h1 {
  flex: 1;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wa-new {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}
/* The search box as every input (DESIGN.md section 5), the filters small pills. */
.wa-list input[type='search'] {
  width: 100%;
  border-radius: 10px;
  padding: 9px 12px 9px 38px;
}
.wa-list .folder-tab {
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
}
/* Two-line rows with a 40px picture. */
.wa-list .item {
  padding: 8px 10px;
}
.wa-list .item .avatar {
  width: 40px;
  height: 40px;
  font-size: 18px;
}
/* A very wide screen: the rail's labels beside its icons, as WhatsApp's Mac app. */
@media (min-width: 1500px) {
  .app.wa {
    grid-template-columns: 580px 1fr;
  }
  .rail {
    width: 190px;
    padding: 12px 10px;
  }
  .rail-item {
    flex-direction: row;
    gap: 12px;
    padding: 9px 12px;
  }
  .rail-label {
    font-size: 15px;
    text-align: left;
  }
  .rail-badge {
    position: static;
    margin-left: auto;
  }
  .rail-heading {
    text-align: left;
    padding-left: 12px;
  }
}
/* On a phone the places stay a row of icons above the list. */
.topbar .rail-label,
.topbar .rail-badge {
  display: none;
}
.topbar .rail-item {
  flex-direction: row;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--panel);
}
.topbar .rail-icon {
  font-size: 16px;
}

/* A message's ⌄, opening its menu, as WhatsApp's: in the corner, shown on hover (always on a touch screen). */
.message {
  position: relative;
}
/*
 * A message's toolbar on hover, as Rocket.Chat's, never over its words (a one-word answer is copied with it showing):
 * beside it where there is room (.tools-beside, placeTools), else just above it. It touches the bubble, so the pointer
 * goes into it without the hover ending.
 */
.message-tools {
  position: absolute;
  bottom: calc(100% - 1px);
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  opacity: 0;
  /* Hidden, it takes no clicks: outside its message, it would steal them from the one next to it. */
  pointer-events: none;
}
.message-tools button {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.message-tools button:hover {
  background: var(--bg);
  color: var(--text);
}
.message:hover .message-tools,
.message-tools:focus-within {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .message.tools-beside .message-tools {
    top: 0;
    bottom: auto;
    right: auto;
    left: calc(100% - 1px);
  }
  .message.mine.tools-beside .message-tools {
    left: auto;
    right: calc(100% - 1px);
  }
}
@media (hover: none) {
  /* No hover on a phone: only the ⋯, always there. */
  .message-tools {
    opacity: 0.8;
    pointer-events: auto;
    top: 4px;
    bottom: auto;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .message-tools button:not([data-testid='message-more']) {
    display: none;
  }
}
.message-more {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 1;
  width: 26px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.message:hover .message-more,
.message-more:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .message-more {
    opacity: 0.7;
  }
}

/* Inviting from the phone's contacts: a list to tick, then one invite to send each. */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 50vh;
  overflow-y: auto;
  margin: 8px 0 12px;
}
.contact-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.contact-pick[hidden] {
  display: none;
}
.contact-pick > span {
  display: flex;
  flex-direction: column;
}
.contact-send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.contact-how {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.contact-send.sent .contact-how::before {
  content: '✓ Sent · ';
  color: var(--muted);
}

/* The round video note's button: its camera-in-a-circle icon in the recording red. */
.note-icon-button .note-icon {
  display: inline-flex;
  color: #e5484d;
}
/* The keyboard is over the home bar: no room kept for it meanwhile. */
.phone-app.keyboard-up .app {
  padding-bottom: 0;
}

/* Signing in by email: the email, then the code; one column, as wide as a phone. */
.email-sign-in {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  margin: 12px auto;
  text-align: left;
}

.email-sign-in input {
  font-size: 16px;
}

.email-sign-in .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.paste-link {
  margin-top: 8px;
}

/* Joining by invitation (Joel, 2026-11-28): who invited them, or asking for an invitation; in the sign-in's place. */
.invitation-step,
.invitation-step .stacked-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin: 12px auto;
  text-align: left;
}

.invitation-step input,
.invitation-step textarea {
  font-size: 16px;
}

.invited-by-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  margin: 0 auto 16px;
  text-align: center;
}

.network-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

/* A business's conversations, for its owner: the list beside the one being read. */
.business-columns {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 16px;
  margin-top: 12px;
}

.business-conversation {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
}

.business-conversation:hover {
  background: var(--hover);
}

.business-message {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .business-columns {
    grid-template-columns: 1fr;
  }
}

/* A business's chat page, alone or inside the bubble on its website. */
.chat-page {
  display: block;
  height: 100%;
  overflow: hidden;
}
.chat-box {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  height: 100%;
  margin: 0 auto;
  background: var(--panel);
}
.chat-page:not(.embedded) .chat-box {
  height: calc(100% - 32px);
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.chat-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
/* Book a time, at the right of the chat page's header. */
.chat-book {
  margin-left: auto;
  flex-shrink: 0;
}
.chat-head h1 {
  margin: 0;
  font-size: 18px;
}
.chat-head .role {
  color: inherit;
  opacity: 0.85;
}
.chat-logo {
  height: 40px;
  max-width: 100px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.chat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 12px 16px;
}
.chat-start {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.member-accounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: var(--bg);
}
.member-account.picked {
  font-weight: 600;
}
.chat-emoji {
  display: flex;
  flex-wrap: wrap;
  padding: 4px 8px;
}
.chat-emoji[hidden] {
  display: none;
}
.chat-emoji-button {
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
.chat-topic {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.chat-topic:hover {
  border-color: var(--accent);
}
.chat-topic-picked {
  font-weight: 600;
}
.chat-start input,
.chat-start textarea,
.chat-compose textarea {
  font-size: 16px;
}
.chat-lines {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.chat-line {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-line.theirs {
  align-self: flex-start;
  background: var(--bg);
}
.chat-line.mine {
  align-self: flex-end;
  background: var(--mine);
}
.chat-compose {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}
/* The customer's side of the help desk (Joel, 2026-11-26): Home, Messages and Help tabs under the header; on a wide
   screen (the page alone, or the bubble at full screen) the conversation beside the articles read most. */
.chat-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.chat-tab {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.chat-tab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}
.chat-expand {
  flex-shrink: 0;
  margin-left: auto;
  color: inherit;
}
.chat-book:not([hidden]) + .chat-expand {
  margin-left: 0;
}
/* Call us, then Book a time: side by side at the right. */
.chat-call-us {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.chat-call-us + .chat-book {
  margin-left: 0;
}
/* A call from the bubble: ringing, on, or nobody answered (a voicemail, or a number to call back on). */
.chat-call {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}
.chat-call label {
  align-self: stretch;
  text-align: left;
}
.chat-call-status {
  font-size: 16px;
  margin: 0;
}
.chat-leave-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}
.chat-leave-word .row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.chat-leave-word input {
  max-width: 180px;
}
.chat-main {
  display: flex;
  flex: 1;
  min-height: 0;
}
.chat-main .chat-body {
  flex: 1;
  min-width: 0;
}
.chat-side {
  display: none;
}
.chat-page:not(.embedded) .chat-box,
.chat-page.full .chat-box {
  max-width: 1100px;
}
@media (min-width: 860px) {
  .chat-page:not(.embedded) .chat-side:not([hidden]),
  .chat-page.full .chat-side:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 300px;
    padding: 16px;
    border-left: 1px solid var(--line);
    overflow-y: auto;
  }
}
.chat-side h3,
.chat-section {
  margin: 8px 0 4px;
  font-size: 15px;
}
.chat-popular-link {
  padding: 6px 0;
  text-align: left;
}
.chat-article {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chat-article:hover {
  border-color: var(--accent);
}
.chat-article .sub {
  color: var(--muted);
  font-size: 13px;
}
.chat-article-view h2,
.chat-ticket h2 {
  margin: 4px 0;
  font-size: 20px;
}
.chat-article-body {
  white-space: pre-wrap;
  line-height: 1.5;
}
.chat-helpful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.chat-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}
.chat-ticket label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.chat-ticket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}
.chat-status {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
}
.chat-status.solved {
  background: #d9f2e4;
  color: #1f6b45;
}
.chat-agent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
}
.chat-agent img,
.chat-agent-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.chat-agent-letter {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
}
.chat-rating {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* What the team sends with the app's tools, in the visitor's chat: pictures, players, files to download. */
.chat-line a {
  color: inherit;
  text-decoration: underline;
}
.chat-image,
.chat-video {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
}
.chat-video {
  aspect-ratio: 16 / 9;
}
.chat-sticker {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.chat-line audio {
  display: block;
  max-width: 100%;
  margin-top: 6px;
}
.chat-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  white-space: normal;
}
.chat-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
}
.chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
}
.chat-compose textarea {
  flex: 1;
  resize: none;
}
.chat-error {
  color: var(--danger);
}
.chat-powered {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
/* A business's lead form (/f/<code>): its chat page's box, as tall as the form. */
.form-page {
  overflow-y: auto;
}
.form-page:not(.embedded) .chat-box {
  height: auto;
}
.form-page .chat-start {
  gap: 12px;
  overflow: visible;
}
.form-page .chat-start h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
}
.bubble-live {
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 8px;
  background: var(--bg);
}
.bubble-builders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bubble-builders button.active {
  background: var(--soft);
  color: var(--soft-text);
}
.bubble-steps ol {
  padding-left: 20px;
}
.bubble-snippet {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
}

/* Setting up the chat bubble, step by step: the steps in a row (DESIGN.md, "Steps"), and the first step's boxes beside
   a preview of the bubble in the business's colour. */
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wizard-steps li.current {
  color: var(--text);
}
.wizard-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--hover);
  font-size: 12px;
}
.wizard-steps li.current .wizard-step-number {
  background: var(--accent);
  color: var(--accent-text);
}
.wizard-steps li.done .wizard-step-number {
  background: var(--soft);
  color: var(--soft-text);
}
.dialog:has([data-testid='bubble-wizard']) {
  width: min(760px, 100%);
}
.dialog-footer .wizard-skip {
  margin-right: auto;
}
.wizard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}
.wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wizard-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.wizard-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.wizard-suggestions .inline {
  display: flex;
  gap: 6px;
}
.wizard-suggestions .inline input {
  flex: 1;
  min-width: 0;
}
.bubble-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  position: sticky;
  top: 48px;
}
.bubble-preview-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.bubble-preview-window .chat-body {
  gap: 8px;
}
.bubble-preview-window .chat-topic {
  align-self: flex-end;
  padding: 6px 12px;
  border-color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  cursor: default;
}
.bubble-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .wizard-columns {
    grid-template-columns: 1fr;
  }
  .bubble-preview {
    position: static;
  }
}

/* A person's status, as a ring around their picture (or their initial): green available, yellow away, red busy, grey
   offline (Joel: different, and seen at a glance). A thin gap of the surface between the ring and the picture. */
.avatar {
  position: relative;
}
.presence-dot {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 3.5px solid var(--offline);
  pointer-events: none;
}
.presence-dot.available {
  border-color: var(--online);
}
.presence-dot.away {
  border-color: var(--away);
}
.presence-dot.busy {
  border-color: var(--live);
}
.presence-dot.offline {
  border-color: var(--offline);
}
/* In a member list, the dot sits before the name. */
.row-list .presence-dot {
  position: static;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
  border-width: 3px;
}

/* Me, at the top right on a computer: my picture with my status's dot, and my name. */
.me-chip {
  position: fixed;
  top: 8px;
  right: 12px;
  /* Under dialogs (10): never clicked through one. */
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.app.wa .main {
  padding-top: 52px;
}
.me-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 700;
}
.me-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.me-name {
  font-weight: 600;
}
.presence-picker {
  display: block;
  margin: 8px auto 12px;
  font-size: 16px;
}

/* The phone's tabs at the bottom, as on WhatsApp: on the list, not over an open conversation. */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.app.show-main .tab-bar {
  display: none;
}
.app:not(.wa) .sidebar {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.tab-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
}
.tab-item.on {
  color: var(--accent);
  font-weight: 600;
}
.tab-icon {
  font-size: 22px;
  line-height: 1;
}
.tab-item .me-face {
  width: 26px;
  height: 26px;
  font-size: 13px;
}
.tab-item .rail-badge {
  position: absolute;
  top: 0;
  right: 8px;
}
.name.missed {
  color: var(--danger);
}

/* An internal note in a lead's chat: soft yellow, labelled, never seen by the visitor. */
.message.internal {
  background: var(--warn-bg);
  border: 1px solid var(--away);
  color: var(--text);
}
.internal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--warn-text);
  margin-bottom: 2px;
}
.whisper-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.whisper-choice {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}
.whisper-choice.on {
  background: var(--soft);
  border-color: var(--soft);
  color: var(--soft-text);
}
.whisper-choice.whisper.on {
  background: var(--warn-bg);
  border-color: var(--away);
  color: var(--warn-text);
}
textarea.whispering {
  background: var(--warn-bg);
  border-color: var(--away);
}

/* ---------- The workstation (Work mode): a thin dark bar, then the list, the chat, and its details. */
/* Its colours, in one place: each mode keeps its own, on the bar, the list and the chat's band. */
:root {
  --mode-staff: var(--accent);
  --mode-customers: var(--accent);
  --mode-leads: var(--accent);
}
.app.workstation {
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  grid-template-rows: 56px minmax(0, 1fr);
}
.workbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  /* Joel's header, in Eve's colours: a surface with a line under it, not a dark bar. */
  background: var(--panel);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.workbar button {
  color: inherit;
  background: none;
  border: 0;
}
.work-business {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
}
.work-business .workspace-logo {
  height: 32px;
}
/* The three tabs as Eve's segmented control: a track, the one on raised in the surface colour. */
.work-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--hover);
}
.workbar .work-tab {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.workbar .work-tab.on {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.work-count {
  margin-left: 6px;
  padding: 0 7px;
  line-height: 18px;
  border-radius: 999px;
  background: var(--badge);
  color: #fff;
  font-size: 12px;
}
.workbar-spacer {
  flex: 1;
}
.work-link {
  padding: 4px 8px;
}
.work-me {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app.workstation .sidebar,
.app.workstation .main {
  grid-row: 2;
  padding-top: 0;
}
.work-column {
  padding: 8px 0 16px;
}
/* On a computer, the work side's rail beside its list (Joel, 2026-11-25), as the personal side's: the column is 72
   wider, the rail runs its full height, and the list scrolls on its own. The list of names is 360 (Joel, later that
   day: 20% wider than its 300). */
.app.workstation.with-rail {
  grid-template-columns: 432px minmax(0, 1fr) 260px;
}
/* Room at its foot for the 🐞 (Report a problem), which floats over the bottom left corner. */
.work-rail {
  padding-bottom: 60px;
}
.app.workstation.with-rail .sidebar {
  padding: 0;
  overflow: hidden;
}
@media (max-width: 1180px) {
  .app.workstation.with-rail {
    grid-template-columns: 394px minmax(0, 1fr) 260px;
  }
}
/* A very wide screen: the rail is 190 wide, its labels beside its icons (as the personal side's), and the list keeps
   its 300 beside it (Joel: the list of names must never be the skinny one). */
@media (min-width: 1500px) {
  .app.workstation.with-rail {
    grid-template-columns: 562px minmax(0, 1fr) 320px;
  }
}
.work-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0 12px 16px;
}
.context {
  grid-row: 2;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* The conversation's header carries its tab's colour as a thin line on top: calm, still telling the three apart. */
.app.workstation[data-work-tab='staff'] .main .header {
  box-shadow: inset 0 3px 0 var(--mode-staff);
}
.app.workstation[data-work-tab='customers'] .main .header {
  box-shadow: inset 0 3px 0 var(--mode-customers);
}
.app.workstation[data-work-tab='leads'] .main .header {
  box-shadow: inset 0 3px 0 var(--mode-leads);
}
.customer-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-kind {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
}
.customer-card.lead .card-kind,
.card-kind.lead {
  background: var(--warn-bg);
  color: var(--warn-text);
}
.customer-card.customer .card-kind,
.card-kind.customer {
  background: var(--soft);
  color: var(--soft-text);
}
/* A lead's or customer's notes, tags, lost mark and history, on its card. */
.lead-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.lead-extras .section-label {
  margin-top: 8px;
}
.lead-extras textarea {
  width: 100%;
  resize: vertical;
}
.lead-warmth-line,
.lead-lost,
.history-entry {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead-lost {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
}
.lead-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lead-tags input {
  flex: 1 1 140px;
  height: 36px;
}
.badge.neutral.lead-tag {
  gap: 4px;
  color: var(--text);
}
.lead-tag-remove {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.lead-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-entry {
  font-size: 13px;
  align-items: flex-start;
  color: var(--text);
}
.history-entry .icon {
  flex: none;
  margin-top: 2px;
  color: var(--muted);
}
.history-entry .when {
  flex: none;
  font-size: 12px;
  color: var(--faint);
}
.sub .badge.warmth {
  margin-right: 8px;
  vertical-align: middle;
}
.segmented.lead-sort {
  margin: 0 0 8px;
}

/* The leads report: bar rows, a label, a bar and its count. */
.leads-report .segmented {
  margin: 16px 0 8px;
}
.report-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.report-custom input {
  width: auto;
  flex: 0 1 180px;
}
.bar-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 160px) 1fr 32px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.bar-row-track {
  height: 8px;
  border-radius: 999px;
  background: var(--hover);
  overflow: hidden;
}
.bar-row-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.bar-row-count {
  text-align: right;
  font-weight: 600;
}
@media (max-width: 899px) {
  .app.workstation {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .workbar {
    flex-wrap: wrap;
    padding: 6px 10px;
  }
  .work-tabs {
    order: 10;
    width: 100%;
  }
  .workbar .work-tab {
    flex: 1;
    min-height: 40px;
  }
}
@media (max-width: 760px) {
  .app.workstation {
    grid-template-columns: 1fr;
  }
  .app.workstation.show-main .workbar {
    display: none;
  }
}

/* A conversation with unread messages: its name in bold beside the red count, as Rocket.Chat's. */
.item.unread .name {
  font-weight: 700;
}

/* "Start a meeting": the coworkers to tick, each with their face. */
.meeting-people {
  max-height: 45vh;
  overflow-y: auto;
}
.meeting-person {
  align-items: center;
  gap: 8px;
}
.avatar.small {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--bg);
  font-size: 12px;
  flex: none;
}
.avatar.small img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ⚡ Automations: one card each, its icon, what it does, a button to its settings. */
.automation {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.automation-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--hover);
  color: var(--muted);
  font-size: 18px;
}

/* A team video's page: its business's logo beside its name. */
.watch-logo {
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 4px;
}

/* A video's insights: the share still watching at each tenth of it, as bars rising from the baseline. */
.retention {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 90px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.retention-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  opacity: 0.85;
}
.retention-axis {
  display: flex;
  justify-content: space-between;
}

/* Correcting a transcript: each line's time, then its words. */
.transcript-line {
  display: flex;
  gap: 8px;
  align-items: center;
}
.transcript-line input {
  flex: 1;
}

.watch-reply {
  padding-left: 28px;
}

.watch-made-with {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

.automated-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}

/* A business's own links in its header, beside its tabs. */
.work-links {
  display: flex;
  gap: 6px;
  margin-left: 12px;
  min-width: 0;
  overflow: hidden;
}
.work-header-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.work-header-link:hover {
  background: var(--hover);
}
@media (max-width: 760px) {
  .work-links {
    display: none;
  }
}

/* The business menu's settings: one button a line. */
.business-settings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

/* A web address in a message: a link, wrapping anywhere so a long one never widens the bubble. */
.message-link {
  color: var(--soft-text);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* A channel being dragged to a new place in my list, and where it would land. */
[draggable='true'].dragging {
  opacity: 0.5;
}
[draggable='true'].drop-here {
  box-shadow: inset 0 3px 0 var(--accent);
}

/* A message's menu as a small one beside its button (Facebook Messenger's), not a window in the middle. */
.modal.popover-mode {
  background: transparent;
  display: block;
  padding: 0;
}
.dialog.dialog-compact {
  width: 280px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.dialog-compact .head,
.dialog-compact .actions-emoji {
  display: none;
}
.dialog-compact .row-list > div {
  padding: 0;
  border: 0;
}
.dialog-compact .row-list > div {
  min-height: 0;
}
.dialog-compact .row-list button.link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.dialog-compact .row-list button.link:hover {
  background: var(--hover);
  text-decoration: none;
}
.dialog-compact .emoji-row {
  margin: 0;
}

/* A link preview's picture, above its words, as on Rocket.Chat and Slack. */
.link-preview-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

/* Files dragged over the open conversation: where they will go when let go. */
#main.drop-files {
  outline: 3px dashed var(--accent);
  outline-offset: -8px;
}
#main.drop-files::after {
  content: 'Drop to attach';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--panel) 75%, transparent);
  pointer-events: none;
  z-index: 5;
}

#main.drop-files {
  position: relative;
}

/* A new profile photo, placed in its circle before it is saved. */
.photo-crop {
  display: grid;
  place-items: center;
  margin: 8px 0;
}
.photo-crop-canvas {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--line);
}
.photo-progress {
  width: 100%;
}

/* My reminders, in the free space beside the conversation at work. */
.reminders-card {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.reminder-add {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.reminder-add .row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- DESIGN.md section 5: the shared components, styled once. */
.icon {
  flex: none;
  vertical-align: middle;
}
button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* Buttons whose words read from the left stay so. */
button.item,
button.menu-item,
button.link,
.composer .row.tools button,
.quick-actions button,
.home-step,
.business-conversation,
.chat-topic,
.dialog-compact .row-list button.link {
  justify-content: flex-start;
  text-align: left;
}
/* A one-line bar that ends in "…" when long. */
button.pinned-bar {
  display: block;
  width: 100%;
}
button.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  flex: none;
}
button.icon-button:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
button.icon-button.on,
button.icon-button.on:hover:not(:disabled) {
  background: var(--soft);
  color: var(--soft-text);
}
@media (hover: none) {
  button.icon-button {
    width: 44px;
    height: 44px;
  }
}
.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--hover);
  color: var(--muted);
}
.icon-tile.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Send, joined to its options' chevron. */
.split-send {
  display: inline-flex;
  flex: none;
}
.split-send > button.primary:first-child {
  border-radius: 10px 0 0 10px;
}
.split-send > button.split-chevron {
  width: 32px;
  padding: 0;
  border-radius: 0 10px 10px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

/* Menus and popovers. */
.menu {
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100vw - 32px));
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font-size: 14px;
}
.menu-item:hover:not(:disabled) {
  background: var(--hover);
}
.menu-item.danger {
  color: var(--danger);
}
.menu-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.menu-label {
  font-weight: 500;
}
.menu-hint {
  font-size: 12px;
  line-height: 16px;
  color: var(--faint);
}
/* A menu shown in a dialog (a phone, or a menu with a title): the dialog is its box, not a second one. */
.dialog .menu {
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}
.dialog:not(.dialog-compact):has(> .menu, > .head + .menu) {
  width: min(380px, 100%);
}
.menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}
.menu .section-label {
  margin: 8px 10px 4px;
}

/* Settings rows: words on the left, one control on the right. */
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.settings-row .grow {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}
/* Its choice shares the row with its name: never wider than half, its long words cut short (Joel, 2026-11-27: on a
   phone, "Who sees when I am online" ran past the edge). */
.settings-row select {
  min-width: 0;
  max-width: 50%;
  text-overflow: ellipsis;
}
.settings-row .grow small,
.settings-row .description {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.settings-row select {
  width: auto;
  padding-top: 7px;
  padding-bottom: 7px;
}
/* A value typed in a settings row (the bubble's nudge): compact, at the right. */
.bubble-nudge .settings-row input[type='number'] {
  width: 88px;
}
.bubble-nudge .settings-row input[type='text'] {
  width: 45%;
  max-width: 240px;
}
.bubble-nudge .settings-row input[type='number'],
.bubble-nudge .settings-row input[type='text'] {
  height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Switches for on/off; checkboxes only for picking from a list. */
input[type='checkbox'].switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 40px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--switch-off);
  cursor: pointer;
  transition: background 0.15s;
}
input[type='checkbox'].switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
input[type='checkbox'].switch:checked {
  background: var(--accent);
}
input[type='checkbox'].switch:checked::after {
  transform: translateX(16px);
}
input[type='checkbox']:not(.switch),
input[type='radio'] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

/* Cards. */
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card > h3 {
  font-size: 15px;
  font-weight: 600;
}

/* Badges: pills, positive, warning or neutral (the plain .badge is the red unread count). */
.badge.positive,
.badge.warn,
.badge.neutral {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
}
.badge.positive {
  background: var(--soft);
  color: var(--soft-text);
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}
.badge.neutral {
  background: var(--hover);
  color: var(--muted);
}

/* Empty states: an icon tile, a title, one sentence, the action. Never a single grey line. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px auto;
  padding: 32px 24px;
  max-width: 560px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.empty-state .icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--soft-text);
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
}
.empty-state p {
  max-width: 420px;
  margin: 0 0 8px;
  color: var(--muted);
}

/* The composer's box: the words on top, the tools under them. */
.composer-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.composer-box:focus-within {
  border-color: var(--accent);
}
.composer-box textarea {
  border: 0;
  padding: 4px 6px;
  background: none;
  box-shadow: none;
}
.composer-box textarea:focus {
  box-shadow: none;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.composer-tools .split-send {
  margin-left: auto;
}
/* The voice message, beside Send, never scrolled away with the other tools. */
.composer-tools > [data-testid='record'] {
  margin-left: auto;
  flex-shrink: 0;
}
.composer-tools > [data-testid='record'] + .split-send {
  margin-left: 0;
  flex-shrink: 0;
}

/* The chat header's icon buttons, on its right. */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* Day divider: a small label between two lines. */
.day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
}
.day-divider::before,
.day-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Lead follow-ups' steps: when (after N days or hours) over the message, one under the other. */
.follow-up-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.follow-up-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.follow-up-when {
  display: flex;
  align-items: center;
  gap: 8px;
}
.follow-up-when input,
.follow-up-when select {
  height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.follow-up-when input {
  width: 72px;
}
.follow-up-when select {
  width: auto;
}
.follow-up-when .icon-button {
  margin-left: auto;
}

/* A dialog's footer: a line above, Cancel then the action, on the right. */
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 16px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

/* Links read in the link colour, never the browser's blue. */
a {
  color: var(--soft-text);
}
/* A list's filters (leads, customers): small pills on one line, scrolled sideways when they do not fit. */
.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.filters .filter {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}
.filters .filter.on,
.filters .filter.on:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--soft);
  color: var(--soft-text);
}
/* A list section's label with its "+" on the right. */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-head .icon-button {
  width: 28px;
  height: 28px;
}

/* Action rows (Pin, Archive, Block…): a settings row that is a button; danger ones in red, grouped at the bottom. */
button.settings-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  padding: 8px 0;
  text-align: left;
  justify-content: flex-start;
}
button.settings-row:hover:not(:disabled) {
  background: var(--hover);
}
.settings-row.danger {
  color: var(--danger);
}
.settings-row .sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
label.settings-row {
  cursor: pointer;
}
.quick-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
/* Fields side by side (Date and Time). */
.dialog .row > label.stacked.grow {
  flex: 1 1 140px;
}

/* Business home's header: the logo in its rounded square, its edit button on the corner. */
.home-logo {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
}
.home-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.home-logo-initial {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 26px;
  font-weight: 700;
}
.home-logo .logo-edit,
.profile-photo .photo-edit {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}
.home-logo .logo-edit .icon,
.profile-photo .photo-edit .icon {
  width: 16px;
  height: 16px;
}
.home-head .grow {
  flex: 1;
  min-width: 0;
}
/* The profile's photo, its camera button on the corner. */
.profile-photo {
  position: relative;
  width: 96px;
  margin: 4px auto 8px;
}
.profile-photo .face.big {
  margin: 0;
}
.profile-photo span.face.big {
  display: grid;
  place-items: center;
  background: var(--hover);
  font-size: 36px;
  font-weight: 700;
}
.profile-photo .photo-edit {
  right: 0;
  bottom: 0;
}

/* A small picture (people pickers) wears its ring too, thinner. */
.avatar.small .presence-dot,
.row-list .avatar.small .presence-dot {
  position: absolute;
  inset: -4px;
  width: auto;
  height: auto;
  margin: 0;
  border-width: 3px;
}
/* A card's buttons on one line, the same height. */
.card .row,
.card .actions-row,
.home-card .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.card .row > button,
.card .actions-row > button,
.card .row > a.button {
  margin: 0;
}
/* Beside its button, a menu is its own width (DESIGN.md: about 280–300). */
.dialog.dialog-compact {
  width: 300px;
}
/* A colour picker in a settings row: a round swatch. */
.settings-row input[type='color'] {
  width: 36px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
}
.settings-row .row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The message box's tools, every one an icon (Joel: one click, no menu): on a narrow screen they scroll sideways,
   Send stays in sight on the right. */
.tool-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tool-icons::-webkit-scrollbar {
  display: none;
}
/* The tools used less, in the row on a wide screen; on a phone, under More (+). */
.tool-extra {
  display: contents;
}
.tool-more {
  display: none;
}
@media (max-width: 760px) {
  .tool-extra,
  .composer-tools .phone-extra {
    display: none;
  }
  .tool-more {
    display: inline-flex;
  }
  /* Send as its arrow alone, as on WhatsApp: room for the tools. */
  .composer-tools .send-label {
    display: none;
  }
  .composer-tools .icon-button {
    width: 38px;
  }
  /* Filters wrap onto a second line on a phone, rather than run past the edge out of sight. */
  .filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}
/* A choice with long words never runs past the box it is in. */
select {
  max-width: 100%;
}

/* A button's hover label: small, dark, just above it. */
.hover-tip {
  position: fixed;
  z-index: 60;
  max-width: 260px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--text);
  color: var(--panel);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

/* The video player (public/js/player.js), as on Loom (Joel, 2026-11-25): the picture, and one slim row of controls on
   a light frosted pill floating over its bottom, gone while it plays and the pointer rests. White on the glass over the
   picture, in light and dark themes alike. */
.vp {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  outline: none;
  line-height: 0;
}
.vp video {
  display: block;
  width: 100%;
  max-height: 70vh;
  margin: 0;
  border-radius: 0;
  background: #000;
  cursor: pointer;
}
.vp-big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  padding: 0 0 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  transition: transform 0.15s, background 0.15s;
}
.vp-big svg {
  fill: currentColor;
}
.vp-big:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.36);
  transform: scale(1.04);
}
.vp-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 8px 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(70, 70, 70, 0.34);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}
.vp:not(.playing) .vp-bar,
.vp.awake .vp-bar,
.vp:focus-within .vp-bar {
  opacity: 1;
  transform: none;
}
.vp.playing:not(.awake) {
  cursor: none;
}
.vp-button {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
}
.vp-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}
.vp-button[hidden] {
  display: none;
}
/* Play: a white disc with the dark sign, at the left of the pill. */
.vp-button.vp-play,
.vp-button.vp-play:hover:not(:disabled) {
  width: 34px;
  height: 34px;
  background: #fff;
  color: #161a18;
}
.vp-play svg {
  fill: currentColor;
}
.vp-time {
  flex: none;
  margin: 0 6px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}
.vp-sound,
.vp-settings {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
}
/* The speed beside ⚙ when it is not normal. */
.vp-rate {
  font-size: 12px;
  font-weight: 600;
}
.vp-menu {
  position: absolute;
  right: -8px;
  bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(40, 40, 40, 0.78);
  line-height: 1.2;
  text-shadow: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.vp-menu[hidden] {
  display: none;
}
.vp-menu-label {
  padding: 4px 8px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.vp-speeds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.vp-menu button {
  justify-content: flex-start;
  height: auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.vp-speeds button {
  justify-content: center;
  padding: 6px 0;
}
.vp-menu button[hidden] {
  display: none;
}
.vp-menu button:hover:not(:disabled),
.vp-menu button[aria-checked='true'] {
  background: rgba(255, 255, 255, 0.18);
}
/* The line: thin, what has played in white, what has loaded lighter, the rest faint; a little thicker under the pointer. */
.vp-seek,
.vp-volume {
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(to right, #fff var(--at, 0%), rgba(255, 255, 255, 0.5) var(--at, 0%), rgba(255, 255, 255, 0.5) var(--loaded, 0%), rgba(255, 255, 255, 0.25) var(--loaded, 0%));
  cursor: pointer;
  transition: height 0.15s;
}
.vp-seek {
  flex: 1;
  min-width: 40px;
}
.vp-seek:hover {
  height: 5px;
}
.vp-volume {
  width: 64px;
  margin: 0 6px 0 2px;
  background: linear-gradient(to right, #fff var(--level, 100%), rgba(255, 255, 255, 0.3) var(--level, 100%));
}
.vp-seek::-webkit-slider-thumb,
.vp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s;
}
.vp-seek::-moz-range-thumb,
.vp-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}
.vp-seek:hover::-webkit-slider-thumb,
.vp-volume:hover::-webkit-slider-thumb,
.vp-seek:focus-visible::-webkit-slider-thumb,
.vp-volume:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}
.vp-seek:hover::-moz-range-thumb,
.vp-volume:hover::-moz-range-thumb {
  opacity: 1;
}
.vp-seek:focus,
.vp-volume:focus {
  box-shadow: none;
}
@media (max-width: 520px) {
  .vp-volume,
  .vp-time[data-testid='vp-length'] {
    display: none;
  }
}
520px) {
  .vp-sound,
  .vp-time {
    display: none;
  }
}

/* Talking to type (or recording): its button red while it listens. */
button.icon-button.recording,
button.icon-button.recording:hover:not(:disabled) {
  background: var(--live);
  color: #fff;
}

/* A call's buttons stay on top and clickable: my own small picture never covers them (it lets clicks through). */
.call-buttons {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  justify-content: center;
}
.call-local {
  pointer-events: none;
}

/* A choice among a few, as cards side by side (the recorder's Screen + camera / Screen / Camera). */
.choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 8px 0 16px;
}
button.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-align: left;
}
button.choice-card .choice-title {
  font-weight: 600;
}
button.choice-card .choice-about {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
button.choice-card.on,
button.choice-card.on:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--accent);
}
button.choice-card.on .icon-tile {
  background: var(--panel);
  color: var(--soft-text);
}

/* The status circles: soft, with the unseen ones ringed in the accent. */
.status-circle .ring {
  border-color: var(--line);
}
.status-circle .label {
  color: var(--muted);
}

/* Videos as a grid: a card each, its cover on top with its length, its title and date under it. */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
button.video-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  width: auto;
  padding: 0 0 12px;
  overflow: hidden;
  text-align: left;
}
.video-tile-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--hover);
  color: var(--muted);
}
.video-tile-cover .video-cover {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.video-tile-cover .badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
}
.video-tile .name,
.video-tile .sub {
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-tile .name {
  font-weight: 600;
}
.video-tile .sub {
  font-size: 13px;
  color: var(--muted);
}
/* A request (an invitation, a chat request): a card in the list. */
.card.request {
  display: block;
  margin: 0 0 8px;
  width: auto;
  padding: 12px;
  text-align: left;
  gap: 8px;
}
.card.request .actions {
  justify-content: flex-end;
}
/* A list line's preview icon (Photo, Voice message…). */
.item .sub .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}
.section-heading .caret .icon {
  width: 14px;
  height: 14px;
}

/* A list section's small buttons beside its name (+ and ⋯). */
.section-actions {
  display: inline-flex;
  gap: 2px;
}
.section-head .section-actions .icon-button {
  width: 28px;
  height: 28px;
}

/* A clip's like: the heart outlined, filled red once liked. */
.clip-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.clip-like.on .icon {
  fill: #e0245e;
  stroke: #e0245e;
}
/* Booking a time, on the right at work: my link, Send or Copy it, my next bookings. */
.booking-card .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.booking-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminders-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* "Waiting on me" at the top of the work list, its count on the right. */
.waiting-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  padding: 6px 10px;
  font-weight: 600;
}
.waiting-link .badge {
  margin-left: auto;
}

/* The leads board: a column for each status, cards dragged between them. */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.board-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  padding: 12px;
  border-radius: 14px;
  background: var(--hover);
}
.board-column.drop-here {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.board-column-head .section-label {
  margin: 0;
}
button.board-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  text-align: left;
  cursor: grab;
}
.board-card .sub {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.board-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* The team's statuses at a glance: a tile each, the picture in its status ring, the status in words. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
button.team-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 16px 8px 12px;
  border-radius: 14px;
  text-align: center;
}
.team-tile .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hover);
  margin-bottom: 6px;
  font-weight: 600;
}
.team-tile .avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.team-tile .sub {
  font-size: 12px;
  color: var(--muted);
}
.team-status {
  font-size: 12px;
  font-weight: 600;
}
.team-status.available {
  color: var(--online);
}
.team-status.away {
  color: var(--away);
}
.team-status.busy {
  color: var(--live);
}
.team-status.offline {
  color: var(--offline);
}

/* "New here?": a small card at the top of the work list until the tour is taken or closed. */
.tour-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.tour-card .grow {
  flex: 1 1 140px;
  min-width: 0;
}
/* Its buttons on their own line in a narrow list: Take the tour wide, the close button beside it. */
.tour-card [data-testid='tour-start'] {
  flex: 1 1 auto;
}
.tour-card .sub {
  font-size: 13px;
  color: var(--muted);
}
.tour-step {
  border: 0;
  margin: 0;
}

/* A row being swiped on a phone: what letting go does shows behind it. */
.item-row[data-swipe] {
  border-radius: 10px;
  overflow: hidden;
}
.item-row[data-swipe='unread'] {
  background: var(--soft);
}
.item-row[data-swipe='archive'] {
  background: var(--hover);
}
.item-row .item {
  transition: transform 0.15s;
}

/* A message assigned to a teammate: its badge (Assigned to Ben, Done by Ben) and Mark done. */
.assignment-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.assignment-line .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Assigned to me: the row opens the message, Mark done beside it. */
.assigned-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.assigned-row .item {
  flex: 1;
  min-width: 0;
}

/* A new conversation at work: the coworkers picked, as Messenger's "To:" names, each with its × (Joel). */
.picked-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.picked-people:empty {
  display: none;
}
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 13px;
}
.person-chip .link {
  display: inline-flex;
  padding: 2px;
}
/* Who is in a group conversation, beside it. */
.member-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
/* Under a work chat's name: its status, then "+ Add people". */
.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.add-people-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  white-space: nowrap;
}
/* One copy of Message everyone: a small line above it (the megaphone of announcements), and, answering it, a note
   over the message box that the answer goes to its sender alone (Joel). */
.broadcast-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.broadcast-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* Sticky notes beside the conversation at work: Mine and Team, each note a soft square of its color. */
.sticky-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.sticky-tabs button {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sticky-tabs button.on {
  background: var(--soft);
  border-color: transparent;
  color: var(--text);
  font-weight: 600;
}
.sticky-tabs .count {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
}
.sticky-card textarea {
  width: 100%;
  resize: vertical;
}
.sticky-colors {
  display: flex;
  flex: 1;
  gap: 6px;
  align-items: center;
}
.sticky-swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.sticky-swatch.on {
  border-color: var(--text);
}
.sticky-swatch[data-color='yellow'],
.sticky-note[data-color='yellow'] {
  background: color-mix(in srgb, #f2c94c 35%, var(--panel));
}
.sticky-swatch[data-color='green'],
.sticky-note[data-color='green'] {
  background: color-mix(in srgb, #6fcf97 35%, var(--panel));
}
.sticky-swatch[data-color='blue'],
.sticky-note[data-color='blue'] {
  background: color-mix(in srgb, #6fa8dc 35%, var(--panel));
}
.sticky-swatch[data-color='pink'],
.sticky-note[data-color='pink'] {
  background: color-mix(in srgb, #f2a0c0 35%, var(--panel));
}
.sticky-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sticky-note {
  padding: 8px 10px 4px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
}
.sticky-words {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: none;
}
.sticky-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* "New messages": a line across the chat above the first message not read yet, its words in the accent colour. */
.unread-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.unread-divider::before,
.unread-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

/* The help desk's AI: Draft with AI beside the reply/note choice; the knowledge base's articles. */
.whisper-choice.ai-draft {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
}
.knowledge-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.knowledge-article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}

/* A ticket's priority on its card, as the customer set it. */
.ticket-priority {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
}
.ticket-priority.high,
.ticket-priority.urgent {
  background: #fde2e1;
  color: #a1251b;
}

/* A customer's page (Joel, 2026-11-26, after Salesforce's account page): details, timeline, conversations. */
.customer-page {
  padding-left: max(24px, calc((100% - 1280px) / 2));
  padding-right: max(24px, calc((100% - 1280px) / 2));
}
/* Side by side as the page's width allows (the chat's details may take the right), one under another when narrow. */
.customer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.customer-columns > .customer-about {
  flex: 1 1 260px;
}
.customer-columns > .customer-timeline {
  flex: 2 1 340px;
}
.customer-columns > .customer-side {
  flex: 1 1 260px;
}
.customer-columns .card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 16px;
  text-align: left;
}
.customer-about .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.customer-columns h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.customer-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.customer-icon {
  width: 48px;
  height: 48px;
}
.customer-conversation {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.customer-conversation:hover {
  border-color: var(--accent);
}
.customer-conversation .sub {
  color: var(--muted);
  font-size: 13px;
}
.customers-list {
  margin-top: 12px;
}
[data-testid='customers-search'] {
  width: 100%;
}

.customer-conversation .row {
  align-items: center;
  gap: 8px;
}
/* The pipeline's forecast above its board. */
[data-testid='pipeline-page'] .stat-tiles {
  margin-bottom: 16px;
}
/* The pipeline's six stages wrap onto a second row when the page is narrow, rather than out of sight to the right. */
[data-testid='pipeline-page'] .board {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  overflow-x: visible;
}
[data-testid='pipeline-page'] .board-column {
  min-height: 160px;
}
/* A customer's tasks: a tick each, then what and when; done ones struck through, late ones in red. */
.customer-task {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.customer-task input {
  margin-top: 3px;
}
.customer-task .link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--text);
  text-align: left;
}
.customer-task .sub {
  color: var(--muted);
  font-size: 13px;
}
.customer-task .sub.late {
  color: var(--danger);
}
.customer-task.done .link > span:first-child {
  text-decoration: line-through;
  color: var(--muted);
}
/* A customer's name keeps its room; their buttons go under it when the page is narrow. */
.customer-page .home-head {
  flex-wrap: wrap;
}
.customer-page .home-head .grow {
  flex: 1 1 220px;
  min-width: 0;
}
/* GVO admin → Feedback: each problem or idea, its sender, its words as written, its screenshot. */
.feedback-list {
  margin-top: 12px;
}
.feedback-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: auto;
  margin: 0;
  text-align: left;
}
.feedback-item .row {
  align-items: center;
  gap: 8px;
}
.feedback-text {
  white-space: pre-wrap;
}
.feedback-shot {
  max-width: 320px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
/* A sent file's ⬇ (Joel, 2026-11-26): beside a document's name; over a picture's or video's corner. */
.attachment-save {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.attachment-save.image .save-file,
.attachment-save.video .save-file {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
}
/* The red banner while this device holds notifications back for one of a business that needs them (Joel, 2026-11-26). */
.alerts-banner {
  display: flex;
  box-sizing: border-box;
  height: 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  /* The same red in dark mode (its --danger, pale there, left the white words hard to read). */
  background: #c0392b;
  color: #fff;
  font-size: 14px;
}
.alerts-banner[hidden] {
  display: none;
}
/* Its button on the red: dark words on white (it inherited the banner's white). */
.alerts-banner button {
  color: var(--text);
  flex-shrink: 0;
}
.alerts-banner .grow {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body:has(> .alerts-banner:not([hidden])) > .app {
  height: calc(100% - 44px);
}

/* Link in bio (Joel, 2026-11-26): a person's or a business's page, a card in the middle of the screen, in its colour. */
.bio-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 32px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, var(--bg)) 0%, var(--bg) 60%);
}
.bio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: center;
}
.bio-card h1 {
  margin: 8px 0 0;
  font-size: 24px;
}
.bio-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
.bio-photo.logo {
  border-radius: 20px;
  object-fit: contain;
  background: #fff;
}
.bio-photo.letter {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 40px;
  font-weight: 700;
}
.bio-words {
  margin: 4px 0 8px;
  white-space: pre-wrap;
}
.bio-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.bio-actions .button {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-size: 15px;
}
.bio-made {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.bio-made-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bio-qr {
  width: 160px;
  height: 160px;
  align-self: center;
}
.bio-link-row input {
  min-width: 0;
}

/* Help desk roles: each of the staff, their name, their side of the desk. */
.desk-role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.desk-role-name {
  flex: 1;
  min-width: 0;
}
.desk-role-row select {
  width: auto;
}
.section-head .take-next {
  margin-left: auto;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Support email: the business's own address, to copy. */
.support-email-address {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Business stats: a card for each of the staff, their numbers in a grid, the main ones with their trend. */
.staff-stats {
  display: grid;
  gap: 12px;
}
.staff-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.staff-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.staff-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.staff-stat {
  padding: 8px;
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.08);
}
.staff-stat.warn {
  box-shadow: inset 3px 0 0 #c0392b;
}
.staff-stat-value {
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.staff-stat-label {
  font-size: 12px;
  color: var(--muted);
}
.trend {
  font-size: 12px;
  font-weight: 600;
}
.trend.up {
  color: #1f9d55;
}
.trend.down {
  color: #c0392b;
}

/* Import contacts: the first rows, a choice over each column of what it is; wide tables scroll inside. */
.import-table {
  overflow-x: auto;
  margin: 8px 0;
}
.import-table table {
  border-collapse: collapse;
  font-size: 13px;
}
.import-table th,
.import-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.import-table select {
  font-size: 12px;
  min-width: 110px;
}
/* Your fields: adding one, under the list. */
.field-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.field-add h3 {
  margin: 0;
}

/* Quotes and invoices: the lines to send (what, how many, price), and the customer's own page. */
.doc-form-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-form-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 100px 32px;
  gap: 6px;
  align-items: center;
}
.doc-form-head {
  font-size: 12px;
  color: var(--muted);
}
.doc-form-total {
  margin: 8px 0;
  font-size: 16px;
}
.doc-card {
  width: min(560px, 100%);
}
.doc-lines {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
  text-align: left;
}
.doc-lines th,
.doc-lines td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}
.doc-lines td:not(:first-child),
.doc-lines th:not(:first-child) {
  text-align: right;
}
.doc-total td {
  font-weight: 700;
  border-bottom: 0;
}
.doc-note {
  white-space: pre-wrap;
  color: var(--muted);
}
.doc-status {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 13px;
  font-weight: 600;
}
.doc-status.accepted,
.doc-status.paid {
  background: #1f9d55;
  color: #fff;
}
.doc-status.declined {
  background: #c0392b;
  color: #fff;
}
.doc-pay {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  text-align: left;
  white-space: pre-wrap;
}
.doc-pay p {
  margin: 4px 0 0;
}

/* Your own rule, as a sentence: "When [a lead is marked] [Hot], then [tell] [Olga]". */
.rule-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rule-sentence select,
.rule-sentence input {
  width: auto;
  max-width: 100%;
}
.rule-sentence input[type='text'] {
  flex: 1 1 220px;
}

/* A monthly sales goal: deals won this month against it. */
.goal-bar {
  height: 6px;
  margin: 4px 0;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.goal-bar span {
  display: block;
  height: 100%;
  background: #1f9d55;
}

/* Explore: communities as cards in a grid, events as a date and a line. */
.explore-search {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.explore-card,
.explore-event,
.post-card,
.post-new {
  text-align: left;
}
.explore-card .row {
  display: flex;
}
.explore-event {
  justify-content: flex-start;
}
.explore-search input[type='search']:first-child {
  flex: 2;
}
.explore-search input {
  flex: 1;
  min-width: 0;
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.explore-card .row {
  gap: 10px;
  align-items: center;
}
.explore-description {
  margin: 8px 0 0;
  color: var(--muted);
}
.explore-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.explore-event {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.explore-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 4px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 12px;
}
.explore-date strong {
  font-size: 18px;
}
.explore-tabs {
  margin-bottom: 12px;
}
.explore-event[role='button'] {
  cursor: pointer;
}

/* Tickets: the code, big enough to read at the door. */
.ticket-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.ticket-code {
  font-family: ui-monospace, monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  padding: 12px 20px;
  border: 2px dashed var(--line);
  border-radius: 12px;
}
.ticket-code.small {
  font-size: 13px;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-width: 1px;
  border-radius: 6px;
}
.ticket-pay {
  margin: 0;
  white-space: pre-wrap;
}

/* Following: posts, one under another, a readable width. */
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}
.post-new {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.post-new .row {
  gap: 8px;
  align-items: center;
}
.post-head {
  gap: 10px;
  align-items: center;
}
.post-body {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post-photo {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--soft);
}
.post-like.on {
  color: #e0245e;
}
.post-foot {
  margin-top: 6px;
}

/* Invite rewards: the badge one's link earned, and the way to the next. */
.invite-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.invite-badge.bronze {
  background: #a0612b;
}
.invite-badge.silver {
  background: #7b8794;
}
.invite-badge.gold {
  background: #b8860b;
}
.invite-rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invite-rewards .row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.invite-rewards progress {
  width: 100%;
}

/* A chat's header on a phone (Joel, 2026-11-27: "Daniel Ku…" and "onl…" confused his staff): the whole name, a little
   smaller and on two lines if it must, its status and "+ Add people" one under the other, and the icons closer. */
@media (max-width: 560px) {
  .header .title,
  .phone-app .header .title {
    font-size: 0.94rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .header .sub-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  /* Its status on up to two lines within the column, never under the icons ("last seen today at 06:22 AM"). */
  .header .sub,
  .phone-app .header .sub {
    font-size: 0.75rem;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .header .add-people-link {
    align-self: flex-start;
  }
  .header .add-people-link,
  .phone-app .header .add-people-link {
    min-width: 0;
    min-height: 0;
    padding: 2px 0;
    font-size: 0.75rem;
  }
  .chat-header-actions {
    gap: 0;
  }
}

/* Switch to (the profile's top): where I am now, ticked and not a button to press. */
.account-switcher .menu-item.current {
  background: var(--soft);
  cursor: default;
}

/* Link in bio, Linktree Pro (Joel, 2026-11-28): a themed page takes its own background, words, buttons and font. */
.bio-page.bio-themed {
  background: var(--bio-bg, var(--bg));
  color: var(--bio-text, var(--text));
  font-family: var(--bio-font, inherit);
}
.bio-themed .bio-card {
  border: 0;
  background: transparent;
  color: inherit;
}
.bio-themed .bio-card .role,
.bio-themed .bio-made {
  color: inherit;
  opacity: 0.75;
}
.bio-themed .bio-actions .button {
  border-radius: var(--bio-radius, 12px);
  box-shadow: var(--bio-shadow, none);
  font-family: inherit;
}
.bio-themed[data-button-style='fill'] .bio-actions .button {
  background: var(--bio-button, var(--accent));
  color: var(--bio-button-text, var(--accent-text));
  border: 2px solid var(--bio-button, var(--accent));
}
.bio-themed[data-button-style='outline'] .bio-actions .button {
  background: transparent;
  color: var(--bio-button, var(--accent));
  border: 2px solid var(--bio-button, var(--accent));
}
.bio-themed[data-button-style='soft'] .bio-actions .button {
  background: color-mix(in srgb, var(--bio-button, var(--accent)) 22%, transparent);
  color: var(--bio-text, var(--text));
  border: 2px solid transparent;
}
.bio-section {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.bio-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 8px;
}
.bio-socials a {
  color: inherit;
}
.bio-link.with-thumbnail {
  position: relative;
}
.bio-thumb {
  position: absolute;
  left: 6px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.bio-thumb.small {
  position: static;
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.bio-link.spotlight {
  animation: bio-spotlight 2.4s ease-in-out infinite;
}
@keyframes bio-spotlight {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(-2deg); }
  88% { transform: rotate(2deg); }
  92% { transform: rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bio-link.spotlight {
    animation: none;
    outline: 3px solid var(--bio-button, var(--accent));
    outline-offset: 2px;
  }
}
.bio-embed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.bio-embed-title {
  font-weight: 600;
  text-align: center;
}
.bio-embed iframe {
  width: 100%;
  border: 0;
  border-radius: 12px;
}
.bio-embed iframe.video {
  aspect-ratio: 16 / 9;
  height: auto;
}
.bio-embed-later {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.bio-sensitive {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bio-subscribe {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  box-sizing: border-box;
}
.bio-subscribe-title {
  font-weight: 700;
}

/* The editor: the settings on the left, the page as visitors see it on the right (one column on a phone). */
.dialog .bio-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.bio-editor-main,
.bio-editor-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.bio-editor-side {
  position: sticky;
  top: 0;
}
.bio-preview {
  min-height: 0;
  max-height: 70vh;
  padding: 20px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow-y: auto;
  zoom: 0.85;
}
@media (max-width: 760px) {
  .dialog .bio-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .bio-editor-side {
    position: static;
  }
}
.bio-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bio-link-card.off {
  opacity: 0.55;
}
.bio-link-card .row,
.bio-look-row,
.bio-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bio-link-card input[type='text'],
.bio-link-card input[type='url'] {
  min-width: 0;
}
.pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 12px;
  font-weight: 600;
}
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.chip-toggle.on {
  border-color: var(--accent);
  background: var(--soft);
}
.bio-themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.bio-theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}
.bio-theme.on {
  border-color: var(--accent);
}
.bio-theme-button {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}
.bio-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 90px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.bio-bar {
  flex: 1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
.bio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bio-table th,
.bio-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.bio-themed .bio-section {
  color: inherit;
}
