:root {
  --sidebar: clamp(260px, 19vw, 340px);
  --sidebar-collapsed: 96px;
  --heading-font: "Wix Madefor Display", "Metropolis", "Noto Sans Simplified Chinese", "Arimo", "Geologica", "Roboto", system-ui, Arial, sans-serif;
  --body-font: "Wix Madefor Text", "Metropolis", "Noto Sans Simplified Chinese", "Arimo", "Geologica", "Roboto", system-ui, Arial, sans-serif;
  --text-color: #202124;
  --link-color: #1a0dab;
  --background-color: #f2f2f2;
  --card-background: #fff;
  --border-color: #dadce0;
  --snippet-color: #4d5156;
  --green: #60d937;
  --canvas: var(--background-color);
  --ink: var(--text-color);
  --muted: var(--snippet-color);
  --placeholder: #d7d7db;
  --search-border: var(--border-color);
  --link: var(--link-color);
  --red: #ff2618;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text-color: #ddd;
    --link-color: #4e9af1;
    --background-color: #000;
    --card-background: #111;
    --border-color: #333;
    --snippet-color: #bbb;
    --placeholder: #777;
    --search-border: var(--border-color);
  }
}

* {
  box-sizing: border-box;
}

::selection {
  background-color: color-mix(in srgb, var(--green) 60%, transparent);
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  --sidebar-current: var(--sidebar);
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-current) minmax(0, 1fr);
  background: var(--canvas);
}

.app.is-sidebar-collapsed {
  --sidebar-current: var(--sidebar-collapsed);
}

.sidebar {
  position: relative;
  min-width: 0;
  height: 100vh;
  padding: 19px clamp(22px, 2.4vw, 38px) 96px;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  width: 62px;
  height: 52px;
  margin: 0 0 55px;
  display: block;
}

.brand img {
  width: 62px;
  height: 52px;
  object-fit: contain;
}

.brand-logo {
  display: block;
}

.brand span {
  display: none;
}

.sidebar-toggle {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-current) - 52px);
  z-index: 25;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  background: #fff;
  color: #202124;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: left 140ms ease, transform 140ms ease, background 140ms ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: #f4f4f4;
}

.app.is-sidebar-collapsed .sidebar-toggle i,
.app.is-sidebar-collapsed .sidebar-toggle .svg-inline--fa {
  transform: rotate(180deg);
}

.account-link {
  position: fixed;
  top: 16px;
  right: clamp(24px, 2.5vw, 44px);
  z-index: 20;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-link img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #000;
}

.searchWrap {
  position: fixed;
  top: 15px;
  left: calc(var(--sidebar-current) + 34px);
  right: 19vw;
  z-index: 15;
  min-width: 300px;
  max-width: 700px;
  display: flex;
  padding: 10px 15px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
}

.searchWrap input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: #fff;
  color: #202124;
  font-family: var(--body-font);
  font-size: 16px;
  outline: none;
}

.compose {
  width: min(258px, 100%);
  min-height: 52px;
  margin: 0 0 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #000;
  font-family: var(--body-font);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.compose:hover {
  filter: brightness(0.97);
}

.compose i {
  font-size: 24px;
  flex: 0 0 auto;
}

.remote-content-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #f7f8fa;
  color: #2f3338;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.35;
}

.remote-content-notice i {
  color: var(--link);
}

.remote-content-notice span {
  min-width: min(240px, 100%);
  flex: 1 1 auto;
}

.remote-content-help {
  color: var(--link);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.remote-content-help:hover,
.remote-content-help:focus-visible {
  text-decoration: underline;
}

.remote-content-notice button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #202124;
  font-size: 13px;
  font-weight: 800;
}

.remote-content-notice button:hover,
.remote-content-notice button:focus-visible {
  border-color: color-mix(in srgb, var(--link) 38%, #dfe1e5);
  color: var(--link);
}

.folders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(15px, 2.7vh, 30px);
}

.folder {
  width: min(258px, 100%);
  min-height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  color: #000;
  font-family: var(--body-font);
  font-size: 20px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.folder-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.folder-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.folder-count {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding-top: 4px;
}

.folder.active,
.folder:hover {
  background: #d9d9d9;
}

.quota {
  margin-top: clamp(20px, 3vh, 34px);
  width: min(258px, calc(var(--sidebar) - 54px));
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f4f4f4;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
}

.quota-content {
  display: grid;
  gap: 7px;
}

.quota-head,
.quota-detail {
  min-width: 0;
}

.quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quota-head span,
.quota-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.quota-head strong {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.quota-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-color) 70%, transparent);
}

.quota-meter span {
  display: block;
  width: var(--quota-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.quota-detail {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--green);
  color: #000;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: filter 140ms ease, transform 140ms ease;
}

.quota-upgrade:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.quota-upgrade i {
  font-size: 13px;
}

.quota-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.quota-plan span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-plan-action {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--green) 72%, var(--text-color));
  font-weight: 800;
}

.quota-plan:hover .quota-plan-action {
  text-decoration: underline;
}

.content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  height: 100vh;
  padding: 126px clamp(34px, 3.6vw, 56px) 82px;
  overflow: auto;
  background: var(--canvas);
}

.view {
  display: none;
}

.app[data-view="list"] .list-view,
.app[data-view="read"] .read-view,
.app[data-view="compose"] .compose-view,
.app[data-view="subscriptions"] .subscriptions-view {
  display: block;
}

.mail-count {
  margin: 0 0 18px;
  color: #25272b;
  font-size: 16px;
}

@keyframes web2-spin {
  to {
    transform: rotate(360deg);
  }
}

.mailbox-actions {
  margin-bottom: 18px;
}

.selection-count {
  color: #25272b;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.selection-tool {
  display: inline-flex;
}

.message-list {
  display: grid;
  gap: 4px;
  transition: opacity 140ms ease;
}

.is-list-loading .message-list {
  opacity: 0.58;
}

.message-row-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 12px;
}

.message-row-wrap.selected {
  background: rgba(18, 0, 166, 0.08);
}

.message-row {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(104px, 150px) minmax(170px, 270px) minmax(220px, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--muted);
  border: 0;
  background: transparent;
  text-align: left;
  transition: background 140ms ease;
}

.message-row:hover,
.message-row-wrap.selected .message-row {
  background: rgba(255, 255, 255, 0.46);
}

.message-select {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ea3ad;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.message-select.active {
  color: var(--link);
}

.message-marker {
  width: 18px;
  height: 18px;
  border: 1.5px solid #9ea3ad;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.message-marker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--link);
}

.sender,
.subject,
.preview {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sender {
  color: #202226;
  font-size: 14px;
  font-weight: 700;
}

.subject {
  color: var(--link);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subject-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.subject-attachment-indicator {
  flex: 0 0 auto;
}

.thread-pill {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(18, 0, 166, 0.12);
  color: var(--link);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.preview {
  color: var(--muted);
  font-size: 14px;
}

.message-row.unread .sender,
.message-row.unread .preview {
  font-weight: 800;
}

.pager {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.pager button,
.icon-action,
.sender-more,
.compose-actions button,
.cc-actions button {
  border: 0;
  background: transparent;
  color: #000;
}

.pager button {
  font-size: 20px;
  font-weight: 800;
}

.read-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.toolbar-side,
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-side {
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar-left {
  justify-content: flex-start;
}

.toolbar-right {
  justify-content: flex-end;
  margin-left: auto;
}

.toolbar-split {
  width: 10px;
  height: 1px;
  flex: 0 0 10px;
}

.icon-action {
  position: relative;
  padding: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.icon-action:hover::after,
.icon-action:focus-visible::after {
  content: attr(title);
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 5px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 230px;
  padding: 8px;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.more-wrap {
  position: relative;
  display: inline-flex;
}

.action-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #202226;
  text-align: left;
  font-size: 14px;
}

.action-menu button:hover:not(:disabled),
.action-menu button:focus-visible:not(:disabled) {
  background: #f0f2f5;
}

.menu-break {
  height: 8px;
}

.menu-label {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
}

.confirm-dialog {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.confirm-dialog h2 {
  margin: 0 0 8px;
  font-family: var(--heading-font);
  font-size: 22px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.confirm-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-actions button {
  padding: 8px 12px;
  border: 1px solid #d9dbe1;
  border-radius: 6px;
  background: #fff;
  color: #202226;
  font-weight: 700;
}

.confirm-actions .confirm-ok {
  background: #202226;
  color: #fff;
}

.confirm-actions .confirm-ok.danger {
  border-color: #b42318;
  background: #b42318;
}

.password-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.password-value {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9dbe1;
  border-radius: 6px;
  background: #f6f7f9;
  font-size: 15px;
  overflow-wrap: anywhere;
  user-select: all;
}

.password-copy {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #d9dbe1;
  border-radius: 6px;
  background: #fff;
  color: #202226;
  font-weight: 700;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .password-value,
  .password-copy {
    background: #1a1a1a;
    border-color: #333;
    color: var(--text-color);
  }
}

.source-dialog {
  width: min(960px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 14px;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.source-actions {
  display: flex;
  justify-content: flex-end;
}

.source-close {
  padding: 0;
  font-size: 20px;
}

.source-dialog pre {
  max-height: calc(100vh - 150px);
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e4e6eb;
  background: #f7f8fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.searchWrap.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid #d9dbe1;
  border-top-color: #202124;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: web2-spin 0.75s linear infinite;
}

.is-list-loading .refresh-action i {
  animation: web2-spin 0.75s linear infinite;
}

.read-subject,
.compose-subject {
  width: 100%;
  margin: 0 0 20px;
  color: #000;
  font-family: var(--heading-font);
  font-size: clamp(38px, 3.6vw, 56px);
  font-weight: 800;
  line-height: 1.02;
}

.sender-line {
  position: relative;
  min-height: 28px;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: 24px auto auto 24px 1fr;
  gap: 10px;
  align-items: center;
  color: #23252a;
  font-size: 14px;
}

.sender-line time {
  justify-self: end;
  font-size: 13px;
  font-weight: 400;
}

.message-stack,
.thread-stack {
  display: grid;
  gap: 18px;
}

.thread-message {
  padding-top: 18px;
  border-top: 1px solid #e4e6eb;
}

.thread-message:first-child {
  padding-top: 0;
  border-top: 0;
}

.thread-subject {
  margin: 0 0 12px;
  color: #202226;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.avatar-dark {
  background: #000;
  color: #fff;
}

.avatar-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sender-more {
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.sender-popover {
  position: absolute;
  top: 30px;
  left: 32px;
  z-index: 20;
  min-width: 260px;
  max-width: min(460px, calc(100vw - 64px));
  padding: 12px;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 8px;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.detail-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.detail-row b {
  color: #202226;
}

.detail-row span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.message-frame {
  width: 100%;
  min-height: max(420px, calc(100vh - 310px));
  border: 0;
  display: block;
  overflow: hidden;
  background: #fff;
}

.plain-body {
  min-height: 420px;
  margin: 0;
  padding: 14px;
  background: #fff;
  white-space: pre-wrap;
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.4;
}

.reply-line {
  margin-top: 32px;
}

.compose-form input,
.compose-form textarea,
.compose-form [contenteditable="true"] {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
}

.compose-form input::placeholder,
.compose-form textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.compose-subject {
  height: 64px;
  padding: 0;
}

.recipient-row {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.recipient-field {
  position: relative;
  min-width: 0;
  display: block;
}

.recipient-control {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.recipient-chips {
  display: contents;
}

.recipient-chip {
  max-width: min(320px, 100%);
  min-height: 30px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--link) 12%, transparent);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
}

.recipient-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.recipient-chip button:hover,
.recipient-chip button:focus-visible {
  color: var(--text-color);
}

.recipient-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 35;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-background);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.recipient-suggestions[hidden] {
  display: none;
}

.recipient-suggestions button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-color);
  display: grid;
  gap: 2px;
  text-align: left;
}

.recipient-suggestions button:hover,
.recipient-suggestions button:focus-visible {
  background: color-mix(in srgb, var(--link) 10%, transparent);
}

.recipient-suggestions span {
  color: var(--muted);
  font-size: 12px;
}

.optional-recipient[hidden] {
  display: none;
}

.attachment-input {
  display: none;
}

.attachment-list {
  margin: -8px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-list[hidden] {
  display: none;
}

.attachment-indicator {
  margin-left: 7px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-chip {
  max-width: min(360px, 100%);
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 8px;
  color: #202124;
  font-size: 13px;
}

.attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip small {
  color: var(--muted);
  font-size: 12px;
}

.attachment-chip button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.attachment-chip button:hover,
.attachment-chip button:focus-visible {
  color: #000;
}

.message-attachments {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-attachment {
  max-width: min(420px, 100%);
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 9px;
  color: #202124;
  font-size: 13px;
  text-decoration: none;
}

.message-attachment:hover,
.message-attachment:focus-visible {
  border-color: color-mix(in srgb, var(--link) 38%, #dfe1e5);
  color: var(--link);
}

.message-attachment span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment small {
  color: var(--muted);
  font-size: 12px;
}

.recipient-input {
  width: min(280px, 100%);
  min-width: 180px;
  height: 34px;
  padding: 0;
  color: #000;
  font-size: 16px;
  font-weight: 800;
}

.cc-actions {
  display: none;
  gap: 8px;
}

.recipient-row:focus-within .cc-actions {
  display: flex;
}

.cc-actions button,
.rich-action {
  color: var(--placeholder);
  font-size: 16px;
  font-weight: 800;
}

.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.rich-action {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease, color 120ms ease;
}

.rich-action:hover,
.rich-action:focus-visible {
  color: #000;
  background: rgba(17, 24, 39, 0.08);
}

.rich-action.active {
  color: #000;
  background: rgba(17, 24, 39, 0.12);
}

.body-input {
  min-height: 360px;
  padding: 0;
  color: #000;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rich-body:empty::before {
  content: attr(data-placeholder);
  color: var(--placeholder);
  pointer-events: none;
}

.rich-body p {
  margin: 0 0 12px;
}

.rich-body blockquote {
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 3px solid #d9dbe1;
  color: var(--muted);
}

.send-action,
.save-draft-action {
  color: #000;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

.top-bar {
  position: fixed;
  left: var(--sidebar-current);
  right: 0;
  z-index: 12;
  background: #fff;
  top: 0;
  height: 67px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .brand-logo {
    filter: invert(1) brightness(1.85);
  }

  .sidebar,
  .top-bar,
  .searchWrap,
  .searchWrap input,
  .action-menu,
  .confirm-dialog,
  .source-dialog,
  .sender-popover,
  .attachment-chip,
  .plain-body {
    background: var(--card-background);
    color: var(--text-color);
  }

  .sidebar-toggle,
  .quota,
  .action-menu button:hover:not(:disabled),
  .action-menu button:focus-visible:not(:disabled),
  .confirm-actions button,
  .source-dialog pre,
  .folder.active,
  .folder:hover {
    background: #1a1a1a;
  }

  .quota,
  .quota-head,
  .quota-head span,
  .quota-head strong {
    color: var(--text-color);
  }

  .quota-detail {
    color: var(--snippet-color);
  }

  .sidebar-toggle,
  .searchWrap,
  .action-menu,
  .confirm-dialog,
  .source-dialog,
  .sender-popover,
  .attachment-chip,
  .confirm-actions button,
  .source-dialog pre {
    border-color: var(--border-color);
  }

  .folder,
  .mail-count,
  .selection-count,
  .sender,
  .thread-subject,
  .sender-line,
  .read-subject,
  .compose-subject,
  .recipient-input,
  .body-input,
  .detail-row b,
  .action-menu button,
  .confirm-actions button,
  .pager button,
  .icon-action,
  .sender-more,
  .compose-actions button,
  .cc-actions button,
  .rich-action,
  .send-action,
  .save-draft-action {
    color: var(--text-color);
  }

  .message-row:hover,
  .message-row-wrap.selected .message-row {
    background: rgba(255, 255, 255, 0.06);
  }

  .message-row-wrap.selected {
    background: rgba(78, 154, 241, 0.14);
  }

  .thread-pill {
    background: rgba(78, 154, 241, 0.18);
  }

  .message-marker {
    border-color: #777;
  }

  .searchWrap.loading::after {
    border-color: var(--border-color);
    border-top-color: var(--text-color);
  }

  .source-dialog pre,
  .rich-body blockquote,
  .thread-message {
    border-color: var(--border-color);
  }

  .confirm-actions .confirm-ok {
    background: var(--text-color);
    color: var(--background-color);
  }

  .confirm-actions .confirm-ok.danger {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
  }

  .attachment-chip button:hover,
  .attachment-chip button:focus-visible,
  .rich-action:hover,
  .rich-action:focus-visible,
  .rich-action.active {
    color: var(--text-color);
  }

  .rich-action {
    color: #9fb0c7;
  }

  .rich-action:hover,
  .rich-action:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }

  .rich-action.active {
    background: rgba(78, 154, 241, 0.22);
  }
}

@media (max-width: 1100px) {
  :root {
    --sidebar: 260px;
  }

  .sidebar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .searchWrap {
    left: calc(var(--sidebar-current) + 24px);
    right: 74px;
  }

  .message-row {
    grid-template-columns: minmax(92px, 120px) minmax(140px, 190px) minmax(160px, 1fr);
  }

  .folder {
    font-size: 20px;
  }

  .mailbox-actions {
    margin-right: 64px;
  }
}

@media (min-width: 761px) {
  .app.is-sidebar-collapsed .brand {
    left: 17px;
  }

  .app.is-sidebar-collapsed .sidebar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .app.is-sidebar-collapsed .compose {
    width: 60px;
    min-width: 60px;
    justify-content: center;
    padding: 0;
  }

  .app.is-sidebar-collapsed .compose span,
  .app.is-sidebar-collapsed .folder-label,
  .app.is-sidebar-collapsed .folder-count,
  .app.is-sidebar-collapsed .quota {
    display: none;
  }

  .app.is-sidebar-collapsed .folders {
    align-items: center;
  }

  .app.is-sidebar-collapsed .folder {
    width: 60px;
    min-width: 60px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
    gap: 0;
  }

  .app.is-sidebar-collapsed .folder-icon {
    font-size: 20px;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-current: 100vw;
  }

  html,
  body {
    height: auto;
    overflow: auto;
  }

  .app {
    width: 100%;
    min-height: 100vh;
    height: auto;
    display: block;
    background: var(--canvas);
  }

  .brand,
  .account-link,
  .sidebar-toggle,
  .searchWrap,
  .quota,
  .top-bar {
    position: static;
  }

  .top-bar,
  .sidebar-toggle {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 64px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    align-content: start;
    overflow: hidden;
    box-shadow: none;
    transition: height 160ms ease, box-shadow 160ms ease;
  }

  .app.is-mobile-menu-open .sidebar {
    height: 100dvh;
    overflow: auto;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  }

  .brand {
    width: 42px;
    height: 38px;
    margin: 0;
    z-index: 2;
    cursor: pointer;
  }

  .brand img {
    width: 42px;
    height: 38px;
  }

  .compose,
  .folders,
  .quota {
    display: none;
  }

  .app.is-mobile-menu-open .compose {
    display: inline-flex;
  }

  .app.is-mobile-menu-open .folders {
    display: grid;
  }

  .app.is-mobile-menu-open .quota {
    display: block;
  }

  .account-link {
    grid-column: 3;
    grid-row: 1;
    width: 36px;
    height: 36px;
    justify-self: end;
  }

  .account-link img {
    width: 36px;
    height: 36px;
  }

  .searchWrap {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border-radius: 22px;
  }

  .compose {
    grid-column: 1 / -1;
    order: 2;
    width: 100%;
    min-height: 46px;
    margin: 0;
    border-radius: 10px;
    font-size: 17px;
    justify-content: center;
  }


  .folders {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 8px;
    overflow: visible;
  }

  .folder {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 10px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    font-size: 16px;
    font-weight: 750;
  }

  .folder-label {
    max-width: none;
  }

  .folder-count {
    padding-top: 0;
    font-size: 12px;
  }

  .quota {
    grid-column: 1 / -1;
    order: 4;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 9px 10px;
    border-color: var(--border-color);
  }

  .quota-content {
    gap: 6px;
  }

  .quota-meter {
    height: 6px;
  }

  .content {
    height: auto;
    min-height: 70vh;
    padding: 82px 14px 32px;
    overflow: visible;
  }

  .mailbox-actions {
    margin-right: 0;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .mailbox-actions::-webkit-scrollbar {
    display: none;
  }

  .read-actions {
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .read-actions::-webkit-scrollbar {
    display: none;
  }

  .toolbar-side,
  .toolbar-group {
    flex: 0 0 auto;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .toolbar-right {
    margin-left: 0;
  }

  .toolbar-split {
    flex-basis: 8px;
    width: 8px;
  }

  .icon-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .message-row-wrap {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 4px 0;
  }

  .message-row {
    grid-template-columns: 1fr;
    min-height: 92px;
    gap: 6px;
    padding: 12px 46px 12px 12px;
    border-radius: 10px;
    background: var(--card-background);
  }

  .message-select {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    z-index: 2;
  }

  .message-marker {
    width: 16px;
    height: 16px;
  }

  .message-marker-dot {
    width: 7px;
    height: 7px;
  }

  .message-row:hover,
  .message-row-wrap.selected .message-row {
    background: var(--card-background);
  }

  .sender {
    font-size: 13px;
  }

  .subject {
    font-size: 16px;
  }

  .preview {
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .read-subject,
  .compose-subject {
    margin-bottom: 14px;
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.05;
  }

  .sender-line {
    grid-template-columns: 24px auto 1fr 24px;
    gap: 8px;
    margin-bottom: 16px;
  }

  .sender-line time {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .sender-popover {
    left: 0;
    min-width: 0;
    width: min(100%, calc(100vw - 28px));
  }

  .message-frame,
  .plain-body {
    min-height: 320px;
  }

  .thread-message {
    padding-top: 14px;
  }

  .compose-form {
    padding-bottom: 28px;
  }

  .recipient-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 18px;
  }

  .recipient-field {
    display: block;
  }

  .recipient-suggestions {
    left: 0;
  }

  .cc-actions {
    display: flex;
  }

  .recipient-input,
  .body-input {
    font-size: 16px;
  }

  .body-input {
    min-height: 300px;
  }

  .attachment-chip {
    max-width: 100%;
  }

  .action-menu {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    width: auto;
    max-height: min(520px, calc(100vh - 28px));
    overflow: auto;
  }

  .confirm-backdrop {
    padding: 14px;
    align-items: end;
  }

  .confirm-dialog,
  .source-dialog {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .remote-content-notice,
  .remote-content-notice button {
    background: var(--card-background);
    color: var(--text-color);
    border-color: var(--border-color);
  }

  .remote-content-help {
    color: var(--link);
  }
}

.folders-tools {
  margin-top: clamp(15px, 2.7vh, 30px);
  padding-top: clamp(15px, 2.7vh, 30px);
  border-top: 1px solid var(--border-color);
}

.subscriptions-view {
  max-width: 860px;
}

.subscriptions-optin {
  max-width: 520px;
  margin: 8vh auto 0;
  padding: 32px 28px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--card-background);
  text-align: center;
}

.subscriptions-optin-icon {
  font-size: 34px;
  color: var(--green);
  margin-bottom: 14px;
}

.subscriptions-optin h2,
.subscriptions-head h2 {
  margin: 0 0 10px;
  font-family: var(--heading-font);
  font-size: 26px;
}

.subscriptions-optin p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.5;
}

.subscriptions-optin-note {
  color: var(--muted) !important;
  font-size: 14px;
}

.subscriptions-enable {
  margin-top: 10px;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #000;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.subscriptions-enable:hover {
  filter: brightness(0.94);
}

.subscriptions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subscriptions-summary {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.subscriptions-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.subscriptions-head-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-background);
  color: var(--ink);
  font-family: var(--body-font);
  font-weight: 700;
  cursor: pointer;
}

.subscriptions-head-actions button:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--border-color));
}

.subscription-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-background);
  overflow: hidden;
}

.subscription-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.subscription-row + .subscription-row {
  border-top: 1px solid var(--border-color);
}

.subscription-row.unsubscribed .subscription-info {
  opacity: 0.55;
}

.subscription-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.subscription-name {
  font-weight: 700;
  font-size: 17px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.subscription-email,
.subscription-meta {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.subscription-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.subscription-unsubscribe {
  padding: 9px 16px;
  border: 1px solid #b42318;
  border-radius: 999px;
  background: transparent;
  color: #b42318;
  font-family: var(--body-font);
  font-weight: 700;
  cursor: pointer;
}

.subscription-unsubscribe:hover:not(:disabled) {
  background: #b42318;
  color: #fff;
}

.subscription-unsubscribe:disabled {
  opacity: 0.6;
  cursor: default;
}

.subscription-state {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.subscription-row.unsubscribed .subscription-state {
  color: var(--green);
}

@media (max-width: 760px) {
  .subscription-row {
    flex-wrap: wrap;
  }

  .subscription-info {
    flex: 1 1 0;
  }

  .subscription-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .subscriptions-head {
    flex-direction: column;
    align-items: stretch;
  }
}

.subscriptions-sort {
  display: inline-flex;
  align-items: center;
}

.subscriptions-sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-background);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.subscriptions-sort-select:hover,
.subscriptions-sort-select:focus-visible {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--border-color));
}

.subscription-icon {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-background);
  color: var(--muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.subscription-icon img {
  width: 32px;
  height: 32px;
  display: block;
}

.subscription-icon img ~ i {
  display: none;
}

.subscription-row.unsubscribed .subscription-icon {
  opacity: 0.55;
}
