/* ChatDesk components. Colours, font and primitives (.btn, .segmented, .card, …) come from theme.css. */

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm {
  width: 14px;
  height: 14px;
}
.muted {
  color: var(--muted-foreground);
}
.small {
  font-size: 12.5px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.spacer {
  flex: 1;
}
.danger {
  color: var(--destructive);
}
.error {
  color: var(--destructive);
  font-size: 13px;
}
.ok-text {
  color: var(--success);
}
.warn-text {
  color: var(--warning);
}
.boot {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted-foreground);
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
code {
  font: 12px ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--subtle);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- shell ---------- */

#app {
  height: 100%;
}
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100%;
  background: var(--background);
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px 12px;
  background: var(--sidebar);
  min-height: 0;
  overflow-y: auto;
}
.is-app .sidebar {
  padding-top: 48px;
  -webkit-app-region: drag;
}
.is-app .sidebar button {
  -webkit-app-region: no-drag;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.brand svg {
  width: 22px;
  height: 22px;
}
.accounts {
  display: flex;
  gap: 2px;
  padding: 3px;
  margin: 0 0 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.account {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.account:hover {
  color: var(--foreground);
}
.account.on {
  background: var(--subtle);
  color: var(--foreground);
  font-weight: 500;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--destructive);
  flex: none;
}
.dot.ok {
  background: var(--success);
}
.dot.right {
  margin-left: auto;
}
.mini-count,
.count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.mini-count {
  margin-left: 0;
}
.nav-item {
  justify-content: flex-start;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.nav-item .icon {
  color: var(--muted-foreground);
}
.nav-item:hover {
  background: var(--hover);
  color: var(--foreground);
}
.nav-item.active {
  background: var(--subtle);
  color: var(--foreground);
  font-weight: 500;
}
.nav-item.active .icon {
  color: var(--mod);
}
.nav-item.active .count {
  color: var(--foreground);
}
.nav-section {
  margin: 18px 10px 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
}
.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.tag-dot.big {
  width: 10px;
  height: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  display: grid;
  gap: 2px;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-line {
  padding: 8px 10px 0;
  font-size: 12px;
  color: var(--faint);
}

/* The content sits in a rounded panel next to the sidebar, like cal.com. */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 8px 8px 8px 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  color: var(--warning);
  background: var(--warning-bg);
  border-bottom: 1px solid var(--border);
}
.banner .link {
  color: inherit;
}

/* ---------- two-pane views ---------- */

.split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  min-height: 0;
}
.list-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
}
.is-app .pane-head,
.is-app .detail-head,
.is-app .page-head {
  -webkit-app-region: drag;
}
.is-app .pane-head :is(button, input, select),
.is-app .detail-head :is(button, input, select),
.is-app .page-head :is(button, input, select) {
  -webkit-app-region: no-drag;
}
.search {
  width: 170px;
  padding: 5px 10px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 12px 10px;
  padding: 3px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.filter {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.filter:hover {
  color: var(--foreground);
}
.filter.on {
  background: var(--subtle);
  color: var(--foreground);
  font-weight: 500;
}
.filter .n {
  margin-left: 2px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.filter.on .n {
  color: var(--mod);
}
.folder-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 10px;
  color: var(--muted-foreground);
}
.folder-filter select {
  flex: 1;
  padding: 4px 8px;
  font-size: 13px;
}
.hint-text {
  padding: 0 16px 8px;
  font-size: 12.5px;
  color: var(--faint);
}
.detail-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
/* Narrower panes: composer buttons show only their icons (the tooltip still names them). */
@container (max-width: 980px) {
  .composer-bar .tool-label {
    display: none;
  }
}
@container (max-width: 620px) {
  .detail-tools .btn-quiet {
    padding-inline: 6px;
  }
}
.empty {
  margin: auto;
  padding: 24px;
  color: var(--muted-foreground);
  text-align: center;
}

/* ---------- lists ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid var(--border);
}
.list-empty {
  padding: 32px 16px;
  color: var(--muted-foreground);
  text-align: center;
}
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.title {
  font-weight: 500;
  color: var(--foreground);
}
.title.unread {
  font-weight: 600;
}
.meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.meta-line.title {
  font-size: 14px;
  color: var(--foreground);
}
.row-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ticket-row {
  width: 100%;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
}
.ticket-row:hover,
.chat-row:hover {
  background: var(--hover);
}
.ticket-row.on,
.chat-row.on {
  background: var(--subtle);
}
.ticket-row.on {
  border-left-color: var(--mod);
}
.prio {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--faint);
}
.prio-dringend {
  color: var(--destructive);
}
.prio-hoch {
  color: var(--warning);
}
.resolved {
  font-size: 12.5px;
  color: var(--success);
}
.chat-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.chat-row > button {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 11px 6px 11px 16px;
  border-radius: 0;
}
.new-count {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: var(--background);
  background: var(--mod);
}
.tag-word {
  margin-right: 6px;
  font-size: 12px;
  font-weight: 500;
}

.switch {
  position: relative;
  width: 30px;
  height: 18px;
  margin: 0 14px 0 6px;
  flex: none;
}
.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--emphasis);
  transition: background 0.12s;
}
.switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--foreground);
  transition: transform 0.12s;
}
.switch input:checked + span {
  background: var(--mod);
}
.switch input:checked + span::after {
  transform: translateX(12px);
  background: var(--background);
}

/* ---------- detail ---------- */

.detail {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.detail.dragging::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--mod-line);
  border-radius: 12px;
  background: var(--mod-soft);
  pointer-events: none;
  z-index: 5;
}
.drop-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--popover);
  border: 1px solid var(--border-strong);
  color: var(--foreground);
  pointer-events: none;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.detail-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.detail-head .muted {
  font-size: 13px;
}
.detail-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.summary {
  display: grid;
  gap: 4px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-header);
}
.summary p {
  max-width: 75ch;
  color: var(--text);
}
.callout {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--success);
}
.notice {
  padding: 9px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  background: var(--card-header);
}
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px 1px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tag);
  background: color-mix(in srgb, var(--tag) 14%, transparent);
}
.chip-x {
  padding: 1px;
  border-radius: 50%;
  color: inherit;
  opacity: 0.7;
}
.chip-x:hover {
  opacity: 1;
}
.tag-add {
  padding: 2px 8px;
  font-size: 12.5px;
  border-style: dashed;
  background: transparent;
  color: var(--muted-foreground);
}
.tag-new input {
  width: 190px;
  padding: 3px 8px;
  font-size: 13px;
}
.reminder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--warning);
  background: var(--warning-bg);
  border-bottom: 1px solid var(--border);
}
.reminder-bar .link {
  color: inherit;
}
.chat-summary {
  display: grid;
  gap: 6px;
  max-height: 42%;
  overflow-y: auto;
  padding: 14px 20px;
  background: var(--card-header);
  border-bottom: 1px solid var(--border);
}
.chat-summary p,
.chat-summary li {
  color: var(--text);
  max-width: 80ch;
}
.chat-summary ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 2px;
}
.for-you {
  margin-top: 4px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--mod-soft);
  border: 1px solid var(--mod-line);
}
.for-you .label {
  color: var(--mod);
}
.for-you li {
  color: var(--foreground);
}

/* ---------- conversation ---------- */

.chatlog {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
}
.day {
  align-self: center;
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--faint);
}
.new-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--mod);
}
.new-line::before,
.new-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mod-line);
}
.msg {
  position: relative;
  max-width: min(560px, 76%);
  align-self: flex-start;
  padding: 8px 12px 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.msg.mine {
  align-self: flex-end;
  background: var(--subtle);
  border-color: transparent;
}
.msg.marked {
  border-color: var(--mod-line);
  box-shadow: inset 2px 0 0 var(--mod);
  background: var(--mod-soft);
}
.msg p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--foreground);
}
.sender {
  margin-bottom: 1px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mod);
}
.quote {
  margin: 2px 0 6px;
  padding: 1px 8px;
  max-height: 3.1em;
  overflow: hidden;
  font-size: 12.5px;
  color: var(--muted-foreground);
  border-left: 2px solid var(--border-strong);
}
.msg-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tag {
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--mod);
  background: var(--mod-soft);
}
.to-ticket {
  padding: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  visibility: hidden;
}
.to-ticket:hover {
  color: var(--foreground);
}
.msg:hover .to-ticket {
  visibility: visible;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.transcript {
  margin-top: 4px;
}
.transcript-state {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.media {
  display: block;
  max-width: 100%;
  max-height: 300px;
  margin: 2px 0 4px;
  border-radius: 8px;
}
.sticker {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
audio {
  display: block;
  width: 260px;
  max-width: 100%;
  height: 34px;
  margin: 2px 0;
}
.file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  text-decoration: none;
}
.file:hover {
  background: var(--hover);
}

/* ---------- composer ---------- */

.composer {
  display: grid;
  gap: 8px;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--border);
}
.composer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer-tools {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
}
.tool {
  padding: 5px 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.tool:hover:not(:disabled) {
  background: var(--hover);
  color: var(--foreground);
}
.tool.rec {
  color: var(--destructive);
  background: var(--destructive-bg);
  font-weight: 500;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--destructive);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.smart-text {
  position: relative;
}
.scheduled-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.scheduled-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--card-header);
  border: 1px solid var(--border);
}
.scheduled-list li.failed {
  color: var(--destructive);
  background: var(--destructive-bg);
}
.sched-time {
  font-weight: 500;
  white-space: nowrap;
  color: var(--foreground);
}
.scheduled-list .ellipsis {
  flex: 1;
}

/* ---------- popovers and menus ---------- */

.tool-wrap {
  position: relative;
  display: inline-flex;
}
.popover {
  position: absolute;
  z-index: 20;
  width: 300px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--popover);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.popover.down {
  top: calc(100% + 6px);
}
.popover.up {
  bottom: calc(100% + 6px);
}
.popover.right {
  right: 0;
}
.popover.left {
  left: 0;
}
.preset-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.preset-list .btn {
  justify-content: center;
}
.popover .inline-form input[type='datetime-local'] {
  flex: 1;
}
.snippet-menu {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: grid;
  gap: 1px;
}
.smart-text .snippet-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  z-index: 20;
  width: min(420px, 100%);
  background: var(--popover);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.snippet-menu.static {
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}
.snippet-menu button {
  width: 100%;
  display: grid;
  gap: 1px;
  text-align: left;
  padding: 7px 9px;
  color: var(--foreground);
}
.snippet-menu button:hover,
.snippet-menu button.on {
  background: var(--subtle);
}
.snippet-preview {
  font-size: 12.5px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

/* ---------- pages ---------- */

.page {
  height: 100%;
  overflow-y: auto;
}
.page-head {
  padding: 20px 28px 8px;
}
.page-body {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 780px;
  padding: 10px 28px 32px;
}
.page-body.wide {
  max-width: 1140px;
}
.page-body > .card,
.overview-grid > .card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.card-actions .link {
  font-weight: 400;
  color: var(--muted-foreground);
  text-decoration: none;
}
.card-actions .link:hover {
  color: var(--foreground);
}
.card-actions .link.danger:hover {
  color: var(--destructive);
}
.desc {
  max-width: 72ch;
  font-size: 13px;
  color: var(--muted-foreground);
}
.section-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}
.section-label {
  margin: 8px 0 -4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-form input {
  flex: 1;
  min-width: 0;
}
.row-end,
.actions-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.notice-text {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text);
}
.link.plain {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--foreground);
}
.choice.on {
  border-color: var(--border-strong);
  background: var(--subtle);
}
.choice input {
  margin: 3px 0 0;
  accent-color: var(--foreground);
}
.choice .sub {
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--foreground);
}
.check input {
  accent-color: var(--foreground);
}
.qr-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}
.qr {
  width: 248px;
  height: 248px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
}
.steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}
.steps b {
  color: var(--foreground);
  font-weight: 500;
}

/* ---------- overview ---------- */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.waiting {
  list-style: none;
  margin: 2px -8px 0;
  padding: 0;
  display: grid;
}
.waiting li + li {
  border-top: 1px solid var(--border);
}
.waiting button {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 9px 8px;
  border-radius: 8px;
}
.waiting button:hover {
  background: var(--hover);
}
.waiting li.due {
  background: var(--warning-bg);
  border-radius: 8px;
}
.note {
  color: var(--text);
}
.reminder-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.reminder-row > button:first-child {
  flex: 1;
  min-width: 0;
}
.reminder-row > button:not(:first-child) {
  width: auto;
  flex: none;
  padding: 4px 6px;
}
.due-text {
  color: var(--warning);
  font-weight: 500;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.folder-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.folder-card h3 {
  gap: 8px;
  font-size: 14.5px;
  color: var(--foreground);
}
.new-text {
  color: var(--foreground);
  font-weight: 500;
}
.folder-summary {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.folder-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.folder-summary li {
  display: grid;
  gap: 2px;
  padding-left: 10px;
  border-left: 2px solid var(--border-strong);
  font-size: 13px;
}
.folder-summary li.needs-you {
  border-left-color: var(--warning);
}
.folder-summary .link {
  justify-self: start;
}
.todo {
  color: var(--warning);
  font-weight: 500;
}

/* ---------- AI ---------- */

.ask {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ask-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ask-head h1 .icon {
  color: var(--mod);
}
.ask-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 28px;
}
.ask-intro {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin: 32px auto;
  text-align: center;
  color: var(--muted-foreground);
}
.ask-intro p:first-child {
  color: var(--text);
}
.ask-examples {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.ask-examples .btn {
  white-space: normal;
  text-align: left;
}
.ask-q {
  align-self: flex-end;
  max-width: min(620px, 80%);
  padding: 9px 13px;
  border-radius: 12px;
  white-space: pre-wrap;
  color: var(--foreground);
  background: var(--subtle);
}
.ask-a {
  align-self: flex-start;
  max-width: min(740px, 88%);
  display: grid;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}
.ask-a.muted {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ask-a p {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--foreground);
}
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.source {
  padding: 3px 9px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.source:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.source .icon {
  color: var(--src, var(--mod));
}

/* ---------- settings ---------- */

.snippet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.snippet-list li {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.snippet-form {
  display: grid;
  gap: 8px;
}
.snippet-form .shortcut {
  max-width: 180px;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 200px 1fr;
  }
  .split {
    grid-template-columns: 1fr;
    grid-template-rows: 42% 58%;
  }
  .list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .qr-wrap {
    grid-template-columns: 1fr;
  }
}

/* ---------- message actions, reactions, reply, files, in-chat search ---------- */

.msg-actions {
  position: absolute;
  top: -12px;
  right: 8px;
  display: none;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--popover);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 2;
}
.msg.mine .msg-actions {
  right: auto;
  left: 8px;
}
.msg:hover .msg-actions,
.msg:focus-within .msg-actions {
  display: flex;
}
.react-picker {
  position: absolute;
  top: -44px;
  left: 8px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--popover);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  z-index: 3;
}
.msg.mine .react-picker {
  left: auto;
  right: 8px;
}
.react-picker button {
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 17px;
  line-height: 1;
}
.react-picker button:hover,
.react-picker button.on {
  background: var(--subtle);
}
.reactions {
  width: fit-content;
  margin: 4px 0 0;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--background);
  border: 1px solid var(--border);
}
.msg.flash {
  animation: flash 1.6s ease-out;
}
@keyframes flash {
  0%,
  40% {
    box-shadow: 0 0 0 2px var(--mod);
  }
  100% {
    box-shadow: 0 0 0 2px transparent;
  }
}

.reply-bar,
.attach-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 8px 7px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: inset 2px 0 0 var(--mod);
}
.reply-bar > .icon,
.attach-chip > .icon {
  color: var(--mod);
}
.reply-text {
  display: grid;
  min-width: 0;
  flex: 1;
}
.attach-chip .ellipsis {
  color: var(--foreground);
}

.chat-search {
  display: grid;
  gap: 4px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}
.chat-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
}
.chat-search-field input {
  flex: 1;
  min-width: 0;
}
.search-hits {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}
.search-hits button {
  display: grid;
  gap: 1px;
  width: 100%;
  justify-items: start;
  padding: 6px 8px;
  text-align: left;
  white-space: normal;
}
.search-hits button:hover,
.search-hits button.on {
  background: var(--hover);
}
.search-hits .ellipsis {
  max-width: 100%;
  color: var(--text);
}
.older-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 20px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
}
.empty p + p {
  margin-top: 6px;
}

/* ---------- Dashboard shell: search, area groups, Heute, ⌘K, settings ---------- */

kbd {
  font: 11px ui-monospace, 'SF Mono', Menlo, monospace;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--faint);
}
.search-trigger {
  justify-content: flex-start;
  gap: 9px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--faint);
}
.search-trigger span {
  flex: 1;
  text-align: left;
}
.search-trigger:hover {
  color: var(--muted-foreground);
  border-color: var(--border-strong);
}
.nav-group {
  display: grid;
  gap: 1px;
  margin: 2px 0 8px 17px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}
.nav-group .accounts {
  margin: 4px 0 6px;
}
.nav-item.nav-sub {
  padding: 6px 10px;
  font-size: 13.5px;
}
.foot-line .dot:not(:first-child) {
  margin-left: 8px;
}

/* "Heute" is a bento grid: fixed tiles that fill the window; long lists scroll inside their tile. */
.today {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
}
.bento {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 6px 28px 28px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.bento-1 > .tile {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}
.bento-2 > .tile {
  grid-column: span 6;
  grid-row: 1 / -1;
}
.bento-3 > .tile:nth-child(1),
.bento-4 > .tile:nth-child(1) {
  grid-column: 1 / span 4;
  grid-row: 1 / -1;
}
.bento-3 > .tile:nth-child(2),
.bento-4 > .tile:nth-child(2) {
  grid-column: 5 / -1;
  grid-row: 1;
}
.bento-3 > .tile:nth-child(3) {
  grid-column: 5 / -1;
  grid-row: 2;
}
.bento-4 > .tile:nth-child(3) {
  grid-column: 5 / span 4;
  grid-row: 2;
}
.bento-4 > .tile:nth-child(4) {
  grid-column: 9 / -1;
  grid-row: 2;
}
@container (max-width: 599px) {
  .today {
    overflow-y: auto;
  }
  .bento {
    flex: none;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
  }
  .bento > .tile {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  .tile-body {
    max-height: 320px;
  }
}
.tile {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  container-type: inline-size;
}
/* Narrow tiles put the time above the title instead of next to it. */
@container (max-width: 300px) {
  .today-list button {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}
.tile-body:has(> .tile-empty) {
  align-content: center;
}
.tile-head {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 14px 16px 10px;
  border-radius: 0;
  color: var(--foreground);
}
.tile-head h3 {
  flex: 1;
  text-align: left;
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--mod-soft);
  color: var(--mod);
}
.tile-count {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.tile-go {
  display: grid;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.12s;
}
.tile-head:hover .tile-go,
.tile-head:focus-visible .tile-go {
  opacity: 1;
}
.tile-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 0 10px 12px 16px;
}
.tile-label {
  margin: 8px 0 2px;
}
.tile-empty {
  height: 100%;
  min-height: 90px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
}
.tile-empty .icon {
  width: 22px;
  height: 22px;
  color: var(--mod);
  opacity: 0.55;
}
.today-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.today-list button {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 7px 6px;
  text-align: left;
  white-space: normal;
  border-radius: 8px;
}
.today-list button:hover:not(:disabled) {
  background: var(--hover);
}
.today-when {
  padding-top: 1px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.today-when.urgent {
  color: var(--destructive);
}
.today-text {
  display: grid;
  min-width: 0;
  color: var(--foreground);
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 14vh;
  background: rgba(0, 0, 0, 0.45);
}
.palette {
  width: min(600px, calc(100vw - 32px));
  border-radius: 14px;
  background: var(--popover);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}
.palette-input input {
  flex: 1;
  border: 0;
  padding: 2px 0;
  background: none;
  font-size: 15px;
  outline: none;
}
.palette-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 50vh;
  overflow-y: auto;
}
.palette-list button {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  color: var(--text);
}
.palette-list button .ellipsis {
  flex: 1;
  text-align: left;
}
.palette-list button.on {
  background: var(--subtle);
  color: var(--foreground);
}
.palette-empty {
  padding: 10px;
}

.settings-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 200px 1fr;
}
.settings-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px;
  border-right: 1px solid var(--border);
}
.settings-body {
  min-height: 0;
  overflow-y: auto;
}
.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.area-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.area-list input[type='color'] {
  width: 32px;
  height: 30px;
  padding: 2px;
}
.area-list input:not([type]) {
  flex: 1;
}
.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.today .page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: none;
}
.settings-page {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.settings-page > .page-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

/* ---------- slim sidebar (⌘\ or small windows): icons only, names as tooltips ---------- */

.app {
  transition: grid-template-columns 0.15s ease;
}
.app.rail {
  grid-template-columns: 76px 1fr;
}
.rail .sidebar {
  padding-inline: 10px;
  align-items: stretch;
}
.rail .nav-label,
.rail .search-trigger span,
.rail .search-trigger kbd,
.rail .nav-section {
  display: none;
}
.rail .brand {
  flex-direction: column;
  gap: 10px;
  padding-inline: 0;
}
.rail .nav-item,
.rail .search-trigger {
  justify-content: center;
  position: relative;
  padding-inline: 0;
}
.rail .nav-item .count {
  position: absolute;
  top: 2px;
  right: 6px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  background: var(--mod, var(--subtle));
  color: var(--primary-foreground);
}
.rail .nav-group {
  margin: 2px 0 6px;
  padding-left: 0;
  border-left: 0;
}
.rail .foot-line {
  justify-content: center;
  padding-inline: 0;
}
.brand .rail-toggle {
  margin-left: auto;
}

/* ---------- Heute: all-day chips, medium windows ---------- */

.allday {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 8px;
}
.allday-chip {
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--mod-soft);
  border: 1px solid var(--mod-line);
  overflow: hidden;
  text-overflow: ellipsis;
}
.allday-chip:hover:not(:disabled) {
  color: var(--foreground);
  border-color: var(--mod);
}
@container (min-width: 600px) and (max-width: 940px) {
  .today {
    overflow: hidden;
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .bento > .tile:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }
  .bento-1 > .tile,
  .bento-2 > .tile {
    grid-row: 1 / -1;
  }
}

.waiting-pane {
  display: grid;
  place-content: center;
  gap: 14px;
}
.waiting-box {
  display: grid;
  gap: 6px;
  width: min(420px, 80vw);
  text-align: left;
}
.rail .nav-group {
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--card);
}

/* ---------- login ---------- */

.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-card {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 24px;
}
.login-card .brand {
  padding: 0 0 6px;
}
.head-tools {
  display: inline-flex;
  gap: 2px;
}
.mobile-only,
.mobile-back {
  display: none;
}
.push-banner {
  margin: 0 28px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card);
}
.device-cards {
  padding-bottom: 0;
}
.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.device-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.tabbar,
.mobile-chat-nav {
  display: none;
}

/* ---------- phone (installed on the home screen or in Safari) ---------- */

@media (max-width: 700px) {
  html,
  body {
    overscroll-behavior: none;
  }
  .app.mobile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: env(safe-area-inset-top);
  }
  .app.mobile > .sidebar {
    display: none;
  }
  .app.mobile > .main {
    flex: 1;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--background);
  }
  .tabbar {
    order: 2;
    display: flex;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--sidebar);
  }
  .tab {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0;
    font-size: 10.5px;
    color: var(--muted-foreground);
  }
  .tab .icon {
    width: 22px;
    height: 22px;
  }
  .tab.active {
    color: var(--foreground);
  }
  .tab.active .icon {
    color: var(--mod);
  }
  .tab-icon {
    position: relative;
    display: grid;
  }
  .tab-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    background: var(--destructive);
    color: #fff;
  }
  .mobile-chat-nav {
    display: grid;
    gap: 8px;
    padding: 10px 12px 4px;
  }
  .mobile-chat-nav .segmented {
    width: 100%;
  }
  .mobile-chat-nav .segmented button {
    flex: 1;
    justify-content: center;
  }
  .mobile-only,
  .mobile-back {
    display: inline-flex;
  }
  .mobile-back {
    margin: 0 4px 0 -6px;
  }
  /* list or detail, never both */
  .split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .split.has-detail > .list-pane,
  .split:not(.has-detail) > .detail-pane {
    display: none;
  }
  .list-pane {
    border: 0;
  }
  .page-head,
  .pane-head {
    padding: 14px 16px 8px;
  }
  .page-body {
    padding: 8px 16px 24px;
  }
  .bento {
    padding: 4px 12px 16px;
  }
  .push-banner {
    margin: 0 12px 8px;
  }
  /* empty tiles shrink to one line on the phone */
  .tile-empty {
    min-height: 0;
    grid-auto-flow: column;
    justify-content: start;
    gap: 8px;
    padding: 0 0 4px;
  }
  .tile-empty .icon {
    width: 16px;
    height: 16px;
  }
  .detail-head {
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .detail-tools {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }
  /* an open chat or ticket gets the whole screen; the back arrow returns to the list */
  .main:has(.split.has-detail) .mobile-chat-nav {
    display: none;
  }
  .composer {
    padding: 10px 12px;
  }
  /* 16 px keeps iOS from zooming into text fields */
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .settings-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .settings-nav .nav-item {
    flex: none;
  }
  .palette-backdrop {
    padding-top: calc(env(safe-area-inset-top) + 12px);
  }
  .msg {
    max-width: 88%;
  }
  /* no hover on touch: tapping a message shows its actions */
  .msg:focus-within .msg-actions,
  .msg:focus .msg-actions {
    display: flex;
  }
  .msg:focus {
    outline: none;
  }
}
.login-card .btn-primary {
  justify-content: center;
  padding-block: 9px;
}
.actions-row input {
  flex: 1;
  min-width: 0;
}
.login-form {
  display: grid;
  gap: 12px;
}
.login-card > .btn-primary {
  justify-content: center;
  padding-block: 9px;
}
.login-alt {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 4px;
}
.pair-code {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--subtle);
}
.pair-code .num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--foreground);
}

/* Inside the native iPhone app (/?embed=1#mail): only the area itself, the app brings its own navigation. */
.app.embedded {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.app.embedded > .sidebar,
.app.embedded > .tabbar {
  display: none;
}
.app.embedded > .main {
  flex: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--background);
}

/* ---------- phone: feel like an app ---------- */

html {
  -webkit-tap-highlight-color: transparent;
}
.tabbar,
.tab,
.nav-item,
.segmented,
.mobile-chat-nav {
  -webkit-user-select: none;
  user-select: none;
}
button {
  touch-action: manipulation;
}
@media (max-width: 700px) {
  .desktop-only {
    display: none;
  }
  .app.mobile {
    height: var(--app-height, 100%);
  }
  .keyboard-open .tabbar {
    display: none;
  }
  .tab {
    transition: none;
  }
  .tab:active {
    opacity: 0.6;
  }
}

/* ---------- menus, dialogs, ticks, voice recording ---------- */

.action-menu {
  display: grid;
  gap: 1px;
  min-width: 210px;
  padding: 4px;
  z-index: 20;
}
.menu-item {
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
}
.menu-item:hover {
  background: var(--hover);
  color: var(--foreground);
}
.menu-item.danger,
.menu-item.danger .icon {
  color: var(--destructive);
}
.msg .action-menu {
  top: 26px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(0, 0, 0, 0.45);
}
.modal {
  width: min(460px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  background: var(--popover);
}
.modal.wide {
  width: min(620px, 100%);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}
.modal-body {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
  overflow-y: auto;
}
.modal-body .btn-primary {
  justify-content: center;
}
.pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.pick-list button,
.pick-list .member {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  color: var(--text);
}
.pick-list button:hover:not(:disabled) {
  background: var(--hover);
  color: var(--foreground);
}
.pick-list .ellipsis {
  flex: 1;
}
.pick-list .icon {
  color: var(--mod, var(--muted-foreground));
}
.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
}
.info-list dt {
  color: var(--muted-foreground);
}
.info-list dd {
  margin: 0;
  color: var(--foreground);
}
.ticks {
  width: 15px;
  height: 10px;
  margin-left: 3px;
  fill: none;
  stroke: var(--muted-foreground);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -1px;
}
.ticks.read {
  stroke: var(--mod);
}
.voice-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 10px;
  border-radius: 999px;
  background: var(--destructive-bg);
  color: var(--destructive);
  font-size: 13px;
}
.slot-picker {
  display: grid;
  gap: 8px;
  width: 300px;
  padding: 10px 12px 12px;
}
.slot-picker .btn-primary {
  justify-content: center;
}
.new-count.dot-only {
  width: 10px;
  min-width: 10px;
  height: 10px;
  padding: 0;
}
.new-count.quiet {
  background: var(--subtle);
  color: var(--muted-foreground);
}
@media (max-width: 700px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .slot-picker {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: auto;
  }
}
