:root {
  color-scheme: dark;
  --nav: #181f25;
  --base: #1e252c;
  --paper: #232b32;
  --line: #36414a;
  --ink: #e7edf0;
  --muted: #a0adb6;
  --blue: #a1cade;
  font:
    15px/1.45 Inter,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  background: var(--base);
  color: var(--ink);
  display: grid;
  grid-template-columns: clamp(196px, 16vw, 254px) minmax(0, 1fr);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
svg,
i {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
i {
  display: inline-flex;
}
.icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--muted);
}
.icon:hover:not(:disabled),
.side-action:hover,
.ghost:hover {
  background: #ffffff0b;
  color: var(--ink);
}
.mobile,
.scrim {
  display: none;
}
aside {
  background: var(--nav);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  letter-spacing: -0.9px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  height: 77px;
  flex-shrink: 0;
  padding: 0 8px;
}
.brand img {
  width: 33px;
  height: 33px;
}
.compose,
.primary {
  background: var(--blue);
  color: #152e3b;
  border-radius: 7px;
  font-weight: 650;
}
.compose {
  margin: 20px 2px 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 41px;
  font-size: 14px;
}
.compose:hover,
.primary:hover {
  background: #badbee;
}
.nav-label,
.day {
  font-size: 11px;
  letter-spacing: 1.55px;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--muted);
}
.nav-label {
  margin: 0 12px 10px;
}
#folders {
  overflow: auto;
}
.folder,
.side-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #b9c3cb;
  text-align: left;
  border-radius: 6px;
  font-size: 14px;
}
.folder span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.folder svg {
  width: 17px;
}
.folder:hover {
  background: #ffffff08;
}
.folder.selected {
  color: #c5e1f1;
  background: #2c3b46;
}
.count {
  margin-left: auto;
  font-size: 12px;
  color: #b9d8e9;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 0;
}
.side-action {
  font-size: 13px;
  margin-bottom: 12px;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 4px 5px;
  width: 100%;
  border-top: 1px solid var(--line);
  text-align: left;
}
.account > .account-text {
  min-width: 0;
  flex: 1;
}
.account-text strong,
.account-text small {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.account-text strong {
  font-size: 13px;
}
.account-text small {
  font-size: 12px;
  color: var(--blue);
}
.account > i {
  color: var(--muted);
  width: 16px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #34474a;
  color: #c5dcd5;
  font-weight: 650;
}
main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 2.1vw, 36px);
  height: 72px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: #1b2229;
}
.location {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  min-width: 0;
  color: var(--muted);
}
.location strong {
  color: var(--ink);
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.separator {
  color: #60717d;
}
.search {
  width: min(32vw, 325px);
  height: 35px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  background: #222c34;
  border: 1px solid #3c4852;
  border-radius: 7px;
  color: var(--muted);
}
.search input {
  min-width: 0;
  width: 100%;
  background: transparent;
  border: 0;
  font-size: 13px;
  outline: 0;
}
.search input:focus-visible {
  outline: 0;
}
.search:focus-within {
  border-color: var(--blue);
}
.search input::placeholder {
  color: #9ba9b3;
}
.search svg {
  width: 16px;
}
kbd {
  font: 12px monospace;
  border: 1px solid #43515a;
  border-radius: 3px;
  padding: 0 5px;
}
.split {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: clamp(305px, 28vw, 440px) minmax(0, 1fr);
}
#listPane,
#readingPane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#listPane {
  border-right: 1px solid var(--line);
  background: var(--base);
}
.list-head {
  padding: 26px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.list-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.list-title h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0;
  overflow-wrap: anywhere;
}
.total {
  font-size: 12px;
  border: 1px solid #45525b;
  padding: 1px 7px;
  border-radius: 6px;
  color: #b7c5cf;
}
.list-title .icon {
  margin-left: auto;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 19px;
}
.tab {
  font-size: 12px;
  color: #aab8c3;
  padding: 5px 10px;
  border-radius: 5px;
}
.tab.on {
  background: #36444f;
  color: #e3edf4;
}
.tab:hover {
  color: white;
}
#rows {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0 9px 16px;
}
.day {
  margin: 18px 12px 6px;
  font-size: 10px;
}
.row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  text-align: left;
  padding: 13px 13px 15px;
  gap: 5px;
  border: 1px solid transparent;
  border-bottom-color: #ffffff0a;
  border-radius: 6px;
}
.row:hover {
  background: #263039;
}
.row[aria-pressed="true"] {
  background: #2c3a45;
  border-color: #485c6b;
}
.row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.row time {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stamp {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 7px;
  width: 25px;
  height: 25px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.3px;
}
.color-0 {
  background: #473e53;
  color: #d9c9e8;
}
.color-1 {
  background: #384b44;
  color: #c3dfca;
}
.color-2 {
  background: #4b4340;
  color: #e8cabb;
}
.color-3 {
  background: #374957;
  color: #bad6ed;
}
.color-4 {
  background: #524c36;
  color: #e0d6a5;
}
.color-5 {
  background: #4f4049;
  color: #e2c6d5;
}
.sender,
.subject,
.preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sender {
  font-size: 12px;
  color: #bcc8d0;
}
.subject {
  color: #e0e6ea;
  font-size: 14px;
  letter-spacing: -0.1px;
  padding-right: 24px;
}
.row.unread .subject {
  font-weight: 650;
  color: #f2f5f7;
}
.preview {
  font-size: 12px;
  color: #a3b0ba;
}
.indicators {
  position: absolute;
  right: 13px;
  top: 44px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.indicators svg {
  width: 12px;
  height: 12px;
  color: var(--blue);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a1cee8;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: auto;
}
#readingPane {
  background: var(--paper);
}
.read-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  min-height: 51px;
  padding: 0 18px;
}
.read-context {
  color: var(--muted);
  font-size: 12px;
}
.spacer {
  flex: 1;
}
.tool-divider {
  height: 17px;
  border-left: 1px solid var(--line);
  margin: 0 7px;
}
.reader {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.letter {
  max-width: 855px;
  padding: clamp(28px, 3.8vw, 65px) clamp(22px, 3.9vw, 66px);
  margin: auto;
}
.subject-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.subject-line h2,
.reading-empty h2 {
  font:
    normal clamp(27px, 2.5vw, 41px) / 1.13 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -1.1px;
  margin: 0;
  overflow-wrap: anywhere;
}
.subject-line .icon {
  margin-left: auto;
}
.letter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.letter-head .stamp {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  font-size: 13px;
}
.letter-meta {
  min-width: 0;
}
.letter-meta strong,
.letter-meta small {
  display: block;
  overflow-wrap: anywhere;
}
.letter-meta strong {
  font-size: 14px;
  font-weight: 620;
}
.letter-meta small,
.letter-head time {
  font-size: 11px;
  color: var(--muted);
}
.letter-head time {
  margin-left: auto;
  white-space: nowrap;
}
.msgbody {
  padding: 24px 0;
  overflow-wrap: anywhere;
}
.msgbody pre {
  margin: 0;
  color: #dde3e8;
  font:
    15px/1.68 Inter,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  white-space: pre-wrap;
}
.msgbody iframe {
  border: 0;
  width: 100%;
  height: 55vh;
}
.letter-footer,
.attachments {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.letter-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.letter-footer > .icon {
  margin-left: auto;
}
.tool,
.ghost,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #495a66;
  border-radius: 6px;
  font-size: 13px;
}
.tool:hover,
.chip:hover {
  background: #30404a;
}
.attachments {
  margin-bottom: 20px;
}
.empty,
.reading-empty {
  color: var(--muted);
  text-align: center;
  padding: 36px 16px;
}
.reading-empty {
  margin: auto;
}
.reading-empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
}
.reading-empty h2 {
  font-size: 26px;
  color: #ced8e0;
}
.reading-empty p {
  font-size: 13px;
}
.primary {
  padding: 9px 16px;
}
.toast {
  position: fixed;
  z-index: 5;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
  box-shadow: 0 2px 12px #0006;
  background: #343a41;
  padding: 10px 18px;
  max-width: min(90vw, 540px);
  display: none;
}
.toast.show {
  display: block;
}
dialog {
  background: #23272d;
  color: var(--ink);
  border: 1px solid #464d55;
  border-radius: 12px;
  box-shadow: 0 18px 80px #0008;
  width: min(510px, calc(100vw - 24px));
  padding: 0;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #080b10a8;
}
dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
dialog h2 {
  font-size: 18px;
  margin: 0;
}
dialog h3 {
  margin: 18px 0 7px;
  font-size: 14px;
}
dialog form,
.dialog-body {
  padding: 16px 20px 20px;
}
dialog label {
  display: block;
  font-size: 13px;
  color: #bfc7d0;
  margin-bottom: 10px;
}
dialog input,
dialog select,
dialog textarea {
  display: block;
  width: 100%;
  background: #191c20;
  color: var(--ink);
  border: 1px solid #424951;
  border-radius: 5px;
  padding: 8px 9px;
  margin-top: 4px;
  min-width: 0;
}
dialog textarea {
  resize: vertical;
  min-height: 210px;
}
dialog .server-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 100px;
  gap: 8px;
}
dialog .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 15px;
}
dialog .sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
dialog summary {
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
}
dialog .error {
  color: #ffb5a9;
  font-size: 13px;
  white-space: pre-line;
}
.write-dialog {
  width: min(690px, calc(100vw - 24px));
}
.write-dialog .actions {
  justify-content: space-between;
}
.save-note {
  color: var(--muted);
  font-size: 13px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.pinmark svg {
  width: 14px;
  color: var(--blue);
}
@media (max-width: 999px) {
  body {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .split {
    display: flex;
  }
  #listPane {
    flex: 1;
    border: 0;
  }
  #readingPane {
    display: none;
    flex: 1;
  }
  body.reading #readingPane {
    display: flex;
  }
  body.reading #listPane {
    display: none;
  }
  .search {
    width: min(35vw, 300px);
  }
  .letter {
    max-width: 710px;
  }
  .row {
    padding-inline: 16px;
  }
  .topbar {
    height: 60px;
  }
  .list-head {
    padding-top: 17px;
  }
}
@media (max-width: 680px) {
  body {
    display: flex;
  }
  main {
    width: 100%;
  }
  aside {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(270px, 83vw);
    z-index: 4;
  }
  .mobile {
    display: inline-grid;
  }
  .mobile-open aside {
    display: flex;
  }
  .mobile-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #080c11a8;
    z-index: 3;
  }
  .topbar {
    padding: 0 12px;
    height: 54px;
    gap: 8px;
  }
  .location {
    display: none;
  }
  .search {
    flex: 1;
    width: auto;
  }
  .list-head {
    padding: 20px 18px 13px;
  }
  .list-title h1 {
    font-size: 26px;
  }
  #rows {
    padding-inline: 7px;
  }
  .letter {
    padding: 24px 18px;
  }
  .subject-line h2 {
    font-size: 29px;
  }
  .read-tools {
    padding: 0 10px;
  }
  .letter-head {
    padding: 16px 0;
  }
  .msgbody {
    padding: 19px 0;
  }
  .msgbody pre {
    font-size: 15px;
  }
  .letter-head time {
    white-space: normal;
    text-align: right;
  }
  .brand {
    height: 70px;
  }
}
[hidden] {
  display: none !important;
}
#gate {
  display: none;
}
body.gated {
  display: block;
  overflow: auto;
  background: var(--nav);
}
body.gated > :is(#main, aside, .scrim) {
  display: none;
}
body.gated #gate {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background:
    radial-gradient(ellipse at 70% 5%, #28343c, transparent 58%), var(--nav);
}
.auth-card {
  width: min(100%, 414px);
  padding: 36px 36px 32px;
  background: var(--base);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 12px 48px #0d121629;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 38px;
  font:
    26px Georgia,
    serif;
  letter-spacing: -0.7px;
}
.auth-brand img {
  width: 34px;
  height: 34px;
}
.auth-card h1 {
  font:
    normal 32px/1.12 Georgia,
    serif;
  letter-spacing: -0.8px;
  margin: 0 0 24px;
}
.auth-card label {
  display: block;
  color: #cad3da;
  margin: 15px 0;
  font-size: 14px;
}
.auth-card input {
  display: block;
  width: 100%;
  margin-top: 5px;
  height: 43px;
  padding: 8px 11px;
  border: 1px solid #495762;
  border-radius: 5px;
  background: #1a2228;
  color: var(--ink);
}
.auth-card .primary {
  width: 100%;
  min-height: 43px;
}
.auth-card .error,
dialog .error,
.queue-item .error {
  color: #ffb5a9;
  font-size: 13px;
}
.auth-card .sub,
.file-tools small,
.schedule-options small {
  color: var(--muted);
  font-size: 13px;
}
.auth-logout {
  display: block;
  margin: 16px auto 0;
  color: var(--blue);
}
.auth-card summary {
  margin: 14px 0;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}
.folder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.folder-heading h2 {
  margin-bottom: 0;
}
.folder-heading .icon {
  font-size: 19px;
  width: 32px;
  height: 32px;
}
#folders {
  flex: 0 1 auto;
  min-height: 48px;
}
#queueNav {
  margin-top: 6px;
  flex-shrink: 0;
}
.extras-nav {
  overflow: auto;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  min-height: 48px;
}
.extras-nav .side-action {
  margin: 0;
  padding: 7px 12px;
}
.sidebar-bottom {
  flex-shrink: 0;
}
.sidebar-bottom .side-action {
  margin-bottom: 4px;
}
.headers {
  margin-bottom: 17px;
}
.headers summary {
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
}
.headers pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.letter-footer .tool,
.letter-footer .icon {
  min-height: 36px;
}
.account-info dt {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
.account-info dd {
  margin: 3px 0 12px;
  overflow-wrap: anywhere;
}
.keys {
  display: grid;
  grid-template-columns: max-content auto;
  gap: 10px 16px;
}
.keys dd {
  margin: 0;
}
.recipients,
.schedule-options {
  margin: 10px 0 15px;
}
.recipients label:first-of-type {
  margin-top: 10px;
}
.format-tools {
  display: flex;
  gap: 3px;
  background: #1d242a;
  border: 1px solid #495762;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 4px;
}
.format {
  min-width: 32px;
  min-height: 29px;
  border-radius: 3px;
}
.format i {
  display: inline;
}
.format:hover,
.format:focus-visible {
  background: #33434f;
}
.editor {
  min-height: 145px;
  max-height: 42dvh;
  overflow: auto;
  outline: none;
  padding: 12px;
  border: 1px solid #495762;
  border-radius: 0 0 6px 6px;
  background: #1b2228;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.editor:focus-visible,
.file-pick:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.editor a {
  color: var(--blue);
}
.file-tools,
.delivery-fields,
.file-list li,
.queue-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.file-tools {
  margin: 12px 0;
}
.file-tools .file-pick {
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--blue);
  padding: 6px 4px;
}
.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.file-list li {
  font-size: 13px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-left: 4px;
}
.file-list li span {
  overflow-wrap: anywhere;
  flex: 1;
}
.delivery-fields {
  margin: 12px 0 0;
}
.delivery-fields label {
  flex: 1;
  min-width: 130px;
}
.toast.show {
  display: flex;
  gap: 13px;
  align-items: center;
  max-width: min(94vw, 600px);
  width: max-content;
}
.toast-action {
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
}
.queue-view .split {
  display: block;
}
.queue-view #listPane {
  height: 100%;
  border: 0;
}
.queue-view #readingPane {
  display: none;
}
#queueItems {
  overflow: auto;
  padding: 8px clamp(14px, 3vw, 40px);
  flex: 1;
}
.queue-item {
  max-width: 900px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.queue-item header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.queue-item h2 {
  font-size: 17px;
  margin: 0;
  overflow-wrap: anywhere;
}
.queue-item header span {
  font-size: 13px;
  color: var(--blue);
}
.queue-item p,
.queue-item time {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.queue-item p {
  margin: 4px 0;
}
.queue-actions {
  margin-top: 10px;
}
dialog .actions {
  flex-wrap: wrap;
}
@media (max-width: 680px) {
  .auth-card {
    padding: 30px 24px;
  }
  .auth-card input,
  dialog input,
  dialog select,
  .editor,
  .search input {
    font-size: 16px;
  }
  .write-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .write-dialog header {
    position: sticky;
    top: 0;
    background: #23272d;
    z-index: 1;
  }
  .editor {
    min-height: 145px;
    max-height: 40dvh;
  }
  .toast.show {
    bottom: max(12px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .location:has(+ .search[hidden]) {
    display: flex;
  }
  .read-tools .icon,
  .topbar .icon {
    width: 40px;
    height: 42px;
  }
  .read-context {
    display: none;
  }
  .mobile-open aside {
    overflow: auto;
  }
}
@media (max-height: 660px) {
  .compose {
    margin-block: 5px 12px;
  }
  .brand {
    height: 54px;
  }
  .sidebar-bottom {
    padding: 6px 0;
  }
  .account {
    padding-top: 7px;
  }
}
.local-draft {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 5px 0;
}
.draft-title {
  flex: 1;
  text-align: left;
  overflow-wrap: anywhere;
  padding: 8px;
  color: var(--ink);
}
.draft-title :is(small, strong) {
  display: block;
}
.draft-title small {
  font-size: 12px;
  color: var(--muted);
}
.row-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.row-wrap .row {
  min-width: 0;
  flex: 1;
}
.row-check {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}
#bulkBar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
#bulkBar .ghost {
  padding: 4px 8px;
}
#bulkBar label {
  display: flex;
  align-items: center;
  gap: 4px;
}
#bulkBar input {
  accent-color: var(--blue);
}
.mail-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#commandItems {
  max-height: 50dvh;
  overflow: auto;
}
#commandsNav kbd {
  font-size: 10px;
  margin-left: auto;
}
.compact .row {
  gap: 3px;
  padding-block: 6px;
}
.compact .day {
  margin-block: 8px 4px;
}
.compact .row .preview {
  display: none;
}
.compact .indicators {
  top: 32px;
}
@media (min-width: 1000px) {
  body.single-pane .split {
    display: flex;
  }
  body.single-pane #listPane {
    flex: 1;
  }
  body.single-pane #readingPane {
    display: none;
  }
  body.single-pane.reading #listPane {
    display: none;
  }
  body.single-pane.reading #readingPane {
    display: flex;
    flex: 1;
  }
}
body[data-theme="light"] {
  color-scheme: light;
  --nav: #e9edeb;
  --base: #f1f3f0;
  --paper: #fbfcf9;
  --line: #c9d1cc;
  --ink: #23352f;
  --muted: #51655c;
  --blue: #a6cbd6;
}
[data-theme="light"]
  :is(
    .topbar,
    .auth-card,
    .format-tools,
    dialog,
    .write-dialog header,
    .auth-card input,
    .editor,
    dialog input,
    dialog textarea,
    dialog select,
    .search
  ) {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="light"]
  :is(
    .side-action,
    .folder,
    .sender,
    .subject,
    .preview,
    .icon,
    .tab,
    .location strong,
    .letter-meta strong,
    .dialog-body label,
    dialog label,
    .search input,
    .save-note,
    .search input::placeholder,
    .primary,
    .account-text small,
    .auth-card label,
    .file-pick
  ) {
  color: var(--ink);
}
[data-theme="light"] :is(.folder.selected, .row[aria-pressed="true"], .tab.on) {
  background: #d7e5df;
  color: #193e37;
}
[data-theme="light"]
  :is(
    .folder:hover,
    .row:hover,
    .side-action:hover,
    .tool:hover,
    .ghost:hover,
    .format:hover
  ) {
  background: #e2e8e4;
  color: #263c33;
}
[data-theme="light"] .row.unread .subject,
[data-theme="light"] .msgbody pre {
  color: var(--ink);
}
[data-theme="light"] :is(.reading-empty h2, .subject-line h2) {
  color: var(--ink);
}
[data-theme="light"]
  :is(
    dialog summary,
    .auth-card summary,
    .headers summary,
    .auth-logout,
    .queue-item header span,
    .file-tools .file-pick
  ) {
  color: #315d69;
}
[data-theme="light"] .toast {
  background: #234339;
  color: #fff;
}
[data-theme="light"] :is(.error, .auth-card .error, dialog .error) {
  color: #9e3327;
}
[data-theme="light"] :is(.dot) {
  background: #337582;
}
[data-theme="light"] .subject-line .icon,
[data-theme="light"] .indicators svg {
  color: #337582;
}
[data-theme="light"] .tool-divider {
  border-color: var(--line);
}
.standalone-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.offline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #273a41;
  color: #cae2ee;
  font-size: 13px;
  padding: 8px 14px;
}
.offline-bar span {
  margin-right: auto;
}
.offline-bar .ghost {
  padding: 4px 8px;
}
.offline
  :is(
    #compose,
    #newFolder,
    #queueNav,
    #extraActions,
    #commandsNav,
    #selectRows,
    #renameFolder
  ) {
  display: none;
}
.pane-grip,
#foldSidebar,
#contextGrip {
  display: none;
}
#contextPane {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  background: var(--base);
  color: var(--ink);
  border: 0;
}
#contextPane[open] {
  display: flex;
  flex-direction: column;
}
#contextPane header {
  padding: 8px 14px;
  flex-shrink: 0;
}
#contextPane h2 {
  font-size: 16px;
}
#contextContent {
  overflow: auto;
  padding: 12px 16px 20px;
}
.context-fields {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
}
.context-fields dt,
.context-message small,
#threadFiles small {
  color: var(--muted);
}
.context-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#threadSections section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
#threadSections h3 {
  margin: 0 0 8px;
}
#threadSections section > .ghost {
  display: block;
  margin-top: 8px;
}
.context-label {
  display: inline-block;
  background: var(--nav);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
}
.context-message,
.context-file {
  display: block;
  width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.context-message[aria-current="true"],
.context-message:hover,
.context-file:hover {
  background: #8095a319;
}
.context-message small,
#threadFiles small {
  display: block;
  font-size: 12px;
}
.memo-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 3px 0 8px;
}
#foldSidebar {
  flex-shrink: 0;
}
@media (min-width: 681px) {
  #foldSidebar {
    display: inline-grid;
  }
  body.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar-collapsed #sidebar {
    display: none;
  }
}
@media (min-width: 1000px) {
  body:not(.queue-view):not(.single-pane) .split {
    display: grid;
    grid-template-columns:
      clamp(210px, var(--listWidth, 28%), min(56%, 650px))
      5px minmax(0, 1fr);
    grid-template-areas: "list divider reader";
  }
  #listPane {
    grid-area: list;
  }
  #readingPane {
    grid-area: reader;
  }
  #listGrip {
    grid-area: divider;
  }
  #contextGrip {
    grid-area: detailsizer;
  }
  #contextPane {
    grid-area: details;
  }
  body:not(.queue-view):not(.single-pane) #listGrip,
  .with-context #contextGrip {
    display: block;
    background: var(--line);
    cursor: col-resize;
    touch-action: none;
  }
  .pane-grip:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -1px;
  }
  .pane-grip:hover {
    background: var(--blue) !important;
  }
  body.stacked-panes:not(.queue-view):not(.single-pane) .split {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(90px, var(--listHeight, 38%)) 5px minmax(0, 1fr);
    grid-template-areas: "list" "divider" "reader";
  }
  body.stacked-panes #listGrip {
    cursor: row-resize !important;
  }
}
@media (min-width: 1200px) {
  #contextPane[open] {
    position: static;
    border-radius: 0;
    height: 100%;
    min-height: 0;
    box-shadow: none;
  }
  body.with-context:not(.queue-view):not(.single-pane) .split {
    grid-template-columns:
      clamp(180px, var(--listWidth, 24%), 38%) 5px minmax(0, 1fr)
      5px clamp(215px, var(--contextWidth, 310px), 34%);
    grid-template-areas: "list divider reader detailsizer details";
  }
  body.with-context.stacked-panes:not(.queue-view):not(.single-pane) .split {
    grid-template-columns: minmax(0, 1fr) 5px clamp(
        215px,
        var(--contextWidth, 310px),
        34%
      );
    grid-template-areas: "list detailsizer details" "divider detailsizer details" "reader detailsizer details";
  }
  body.with-context.single-pane.reading .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5px clamp(
        215px,
        var(--contextWidth, 310px),
        34%
      );
    grid-template-areas: "reader detailsizer details";
  }
}
@media (max-width: 1199px) {
  .with-context #contextGrip {
    display: none;
  }
  #contextPane[open] {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(410px, 100%);
    height: 100dvh;
    border-left: 1px solid var(--line);
    border-radius: 0;
  }
}
body.reader-focused {
  grid-template-columns: minmax(0, 1fr);
}
body.reader-focused :is(#sidebar, .topbar, #listPane, #listGrip, #contextGrip) {
  display: none !important;
}
body.reader-focused:not(.queue-view) .split {
  display: flex !important;
}
body.reader-focused #readingPane {
  display: flex;
  flex: 1;
}
body.reader-focused #contextPane[open] {
  max-width: min(100%, 360px);
}
#draftRack {
  position: fixed;
  bottom: 8px;
  right: 12px;
  z-index: 3;
  max-width: min(92vw, 600px);
  display: flex;
  overflow: auto;
  gap: 6px;
  padding: 4px;
}
#draftRack button {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 210px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 12px;
  flex-shrink: 0;
}
body.gated #draftRack,
body.offline #draftRack {
  display: none;
}
.compose-view-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
}
#inlineComposer {
  min-height: 130px;
  overflow: auto;
  max-height: 70%;
  border-top: 2px solid var(--blue);
  background: var(--base);
}
#inlineComposer header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
#inlineComposer h2 {
  font-size: 16px;
  margin: 0;
}
#inlineComposer form {
  padding: 8px 16px;
}
#inlineComposer label {
  display: block;
  font-size: 13px;
  margin: 6px 0;
}
#inlineComposer input:not([type="file"]),
#inlineComposer select {
  display: block;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px;
}
#inlineComposer .editor {
  min-height: 90px;
}
#inlineComposer .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
body:has(#inlineComposer) .reader {
  flex: 1;
}
body:has(#draftRack:not([hidden])) #rows {
  padding-bottom: 54px;
}
@media (max-width: 680px) {
  #draftRack {
    max-width: 96vw;
    right: 2vw;
  }
  #focusReader {
    display: none;
  }
  #inlineComposer {
    max-height: 72%;
  }
}

.group-section {
  padding: 3px 8px 6px;
  border-bottom: 1px solid var(--line);
}
.group-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.group-toggle {
  flex: 1;
  text-align: left;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  padding: 8px 0;
}
.group-toggle::before {
  content: "▸";
  display: inline-block;
  width: 1em;
}
.group-toggle[aria-expanded="true"]::before {
  content: "▾";
}
.group-row {
  display: block;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.group-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
#groupRules fieldset {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid var(--line);
  min-width: 0;
}
#groupRules legend {
  color: var(--muted);
  padding: 0 4px;
}

.rich-options[open] {
  flex: 1 1 100%;
}
.rich-options summary {
  cursor: pointer;
}
.rich-options[open] label {
  display: inline-flex;
  gap: 0.4rem;
  margin: 0.25rem 0.4rem;
  align-items: center;
}
.editor img[data-inline-id] {
  max-width: 100%;
  max-height: 22rem;
}
.file-preview canvas,
.file-preview img,
.file-preview video {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
.file-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body[data-accent="green"] {
  --blue: #a7d7b4;
}
body[data-accent="violet"] {
  --blue: #d3b9eb;
}
body[data-accent="copper"] {
  --blue: #e4bc9f;
}
body[data-theme="light"][data-accent="green"] {
  --blue: #215635;
}
body[data-theme="light"][data-accent="violet"] {
  --blue: #5b3779;
}
body[data-theme="light"][data-accent="copper"] {
  --blue: #744125;
}
.msgbody pre,
.editor {
  font-size: var(--reading-size, 16px);
}
#archiveChoices {
  max-height: 28vh;
  overflow: auto;
}
#archiveSetup fieldset {
  border: 1px solid var(--line);
  min-width: 0;
  padding: 10px;
}
#archiveProgress p {
  overflow-wrap: anywhere;
}
#coverageStatus {
  display: block;
  font-size: 11px;
}

.conversation-reader {
  margin: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.conversation-reader details {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.conversation-reader summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}
.thread-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 1rem 0;
}
body.link-review {
  display: block;
  padding: 2rem;
}
.link-review main {
  max-width: 46rem;
  margin: 8vh auto;
  display: block;
  overflow-wrap: anywhere;
}
.link-review .primary {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
}
.link-review .primary[hidden] {
  display: none;
}
