/* Framebyte Mail application chrome. Message-supplied HTML retains native rendering. */
:root {
  --fb-canvas: #f5f6f8;
  --fb-panel: #f8f9fb;
  --fb-card: #fff;
  --fb-fill: #f0f2f5;
  --fb-hover: #eceef2;
  --fb-selected: #f1ecfb;
  --fb-text: #20232b;
  --fb-muted: #555e6c;
  --fb-dim: #646d7a;
  --fb-line: #e2e5eb;
  --fb-edge: #c5cad4;
  --fb-accent: #5839a0;
  --fb-button: #6447b2;
  --fb-button-hover: #52369c;
  --fb-button-text: #fff;
  --fb-danger: #a42d4b;
  --fb-shadow: 0 12px 36px #20232b21;
  --fb-radius: 7px;
  --fb-ui: "FB DM Sans", system-ui, sans-serif;
}

:root.dark-mode {
  --fb-canvas: #17191d;
  --fb-panel: #1b1d21;
  --fb-card: #202227;
  --fb-fill: #26292f;
  --fb-hover: #2d3037;
  --fb-selected: #2f293e;
  --fb-text: #f2f3f5;
  --fb-muted: #bdc2cd;
  --fb-dim: #a1a8b6;
  --fb-line: #343740;
  --fb-edge: #535865;
  --fb-accent: #cbb8ff;
  --fb-button: #b39aef;
  --fb-button-hover: #c4aff7;
  --fb-button-text: #23193b;
  --fb-danger: #ffacba;
  --fb-shadow: 0 12px 36px #08090d75;
}

html body:not(.task-login),
html body:not(.task-login) #layout {
  background: var(--fb-canvas);
  color: var(--fb-text);
  font-family: var(--fb-ui);
  font-size: 14px;
}

html #layout :is(#layout-menu, #layout-sidebar, #layout-list, #layout-content) {
  min-height: 0;
  color: var(--fb-text);
  background: var(--fb-panel);
  border-color: var(--fb-line);
}

html #layout #layout-list,
html #layout #layout-content,
html #layout #layout-content .iframe-wrapper {
  background: var(--fb-card);
}

html #layout :is(.header, .footer) {
  color: var(--fb-text);
  background: var(--fb-panel);
  border-color: var(--fb-line);
}

html #layout :is(#layout-list, #layout-content) > :is(.header, .footer) {
  background: var(--fb-card);
}

html #layout .header-title {
  color: var(--fb-text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.025em;
}

html #layout :is(.header, .footer) a { color: var(--fb-muted); }
html #layout :is(.header, .footer) a:not(.disabled):is(:hover, :focus-visible) {
  color: var(--fb-accent);
  background-color: var(--fb-hover);
}

html #layout :is(.header, .footer) .toolbar a.disabled { opacity: .48; }
html #layout .header .toolbar a:not(.hidden) { border-radius: var(--fb-radius); }

html #layout-menu .fb-brand {
  position: relative;
  height: 64px;
  padding: 0 16px !important;
  align-items: center;
  gap: 9px;
  color: var(--fb-text);
  background: var(--fb-panel) !important;
  border: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.045em;
}

html #layout-menu .fb-brand b { color: var(--fb-dim); font-weight: 560; }
html #layout-menu .fb-brand #logo { width: 30px; height: 30px; margin: 0; opacity: 1; }
html #layout-menu .fb-brand .cancel { margin-inline-start: auto; }

html #layout-menu #taskmenu { width: 100%; }
html #layout-menu #taskmenu :is(.action-buttons, .fb-app-links, .special-buttons) a {
  color: var(--fb-muted);
  background: transparent;
  border-radius: var(--fb-radius);
}

html #layout-menu #taskmenu a:not(.compose):is(:hover, :focus-visible, .selected),
html #layout-menu .fb-account summary:is(:hover, :focus-visible) {
  color: var(--fb-accent);
  background: var(--fb-hover);
}

html #layout-menu #taskmenu a.compose {
  color: var(--fb-button-text);
  background: var(--fb-button);
  font-weight: 750;
}

html #layout-menu #taskmenu a.compose:is(:hover, :focus-visible) { background: var(--fb-button-hover); }
html #layout-menu #taskmenu a::before { color: inherit; }
html #layout-menu #taskmenu .special-buttons a.logout { color: var(--fb-danger); }
html body.task-mail.action-none #layout-menu .fb-app-links .mail { display: none; }

.fb-account { position: relative; margin: 8px 0 0; }
.fb-account summary {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 6px 9px;
  align-items: center;
  gap: 9px;
  color: var(--fb-text);
  border-radius: var(--fb-radius);
  cursor: pointer;
  list-style: none;
}
.fb-account summary::-webkit-details-marker, .fb-more summary::-webkit-details-marker { display: none; }
.fb-account summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -4px 2px 0 auto;
  flex: none;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.fb-account-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  color: var(--fb-accent);
  background: var(--fb-selected);
  border-radius: 50%;
}
.fb-account-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("icons/user.svg") center / contain no-repeat;
}
.fb-account-text {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html #layout-menu #taskmenu .special-buttons {
  position: absolute;
  inset: auto 0 calc(100% + 4px);
  z-index: 110;
  padding: 4px;
  color: var(--fb-text);
  background: var(--fb-card);
  border: 1px solid var(--fb-edge);
  border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow);
}

html #folderlist-content { padding: 3px 10px 10px; }
html #mailboxlist li { background: transparent; border-color: transparent; }
html #mailboxlist li > a {
  min-height: 40px;
  margin-block: 1px;
  color: var(--fb-muted);
  border-radius: var(--fb-radius);
  font-size: 14px;
  font-weight: 560;
}
html #mailboxlist li > a:is(:hover, :focus-visible) { color: var(--fb-text); background: var(--fb-hover); }
html #mailboxlist li.selected > a { color: var(--fb-accent); background: var(--fb-selected); font-weight: 750; }
html #mailboxlist .unreadcount {
  min-width: 23px;
  color: var(--fb-accent);
  background: var(--fb-selected);
  border-radius: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
html #mailboxlist li.selected .unreadcount { background: var(--fb-card); }

html .fb-inbox .searchbar {
  margin: 8px 12px 10px;
  padding-inline: 4px;
  height: 40px;
  min-height: 40px;
  color: var(--fb-muted);
  background: var(--fb-fill);
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius);
}
html .fb-inbox .searchbar:focus-within { border-color: var(--fb-accent); }
html .fb-inbox .searchbar input {
  min-width: 0;
  color: var(--fb-text);
  background: transparent;
  font-size: 14px;
  outline: none;
  box-shadow: none;
}
html .fb-inbox .searchbar form { min-width: 0; align-items: center; }
html .fb-inbox .searchbar form::before { height: auto; margin-inline: 7px 1px; color: var(--fb-dim); font-size: 15px; }
html .fb-inbox .searchbar a::before { width: 28px; font-size: 15px; }
html .fb-inbox .searchbar input::placeholder { color: var(--fb-dim); }
html .fb-inbox .searchbar a { color: var(--fb-muted); }

html #messagelist tr td { color: var(--fb-muted); background: var(--fb-card); border-color: var(--fb-line); }
html #messagelist tr td a { color: var(--fb-text); }
html #messagelist tr:hover td { background: var(--fb-panel); }
html #messagelist tr.selected td { background: var(--fb-selected); }
html #messagelist tr.selected td:first-child { box-shadow: inset 2px 0 var(--fb-accent); }
html #messagelist tr.unread :is(.fromto, .fb-subject-text) { color: var(--fb-text); font-weight: 760; }
html #messagelist :is(.msgicon.unread, .attachment span)::before { color: var(--fb-accent); }
html #messagelist :is(.fromto, .date, .size) { color: var(--fb-muted); }
html #messagelist td.subject { min-width: 0; padding-block: 8px 9px; }
html #messagelist td.subject .fromto { font-size: 14px; font-weight: 600; }
html #messagelist td.subject :is(.date, .size) {
  flex: none;
  padding-inline-end: 2px;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
html #messagelist td.subject .subject a { display: block; min-width: 0; }
html #messagelist td.subject :is(.fb-subject-text, .fb-excerpt) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html #messagelist td.subject .fb-subject-text { line-height: 1.35; font-size: 14px; }
html #messagelist td.subject .fb-excerpt {
  margin-block-start: 3px;
  color: var(--fb-dim);
  font-size: 13px;
  font-weight: 440;
  line-height: 1.4;
}

html body.task-mail:is(.action-preview, .action-show) .fb-message {
  width: min(100%, 56rem);
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 28px;
  color: var(--fb-text);
  background: var(--fb-card);
}
html body.task-mail:is(.action-preview, .action-show) { background: var(--fb-card); }

html #message-header {
  margin: 0;
  padding: clamp(20px, 4vw, 40px) 0 16px;
  color: var(--fb-text);
  background: var(--fb-card);
  border: 0;
}
html #message-header .subject {
  margin: 0 0 17px;
  color: var(--fb-text);
  font-size: clamp(23px, 3.8vw, 32px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.037em;
  overflow-wrap: anywhere;
}
html #message-header .header { padding: 0; background: none; }
html #message-header .contactphoto { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; }
html #message-header .header-content { min-width: 0; overflow-wrap: anywhere; }
html #message-header :is(.header-links a, .header-content a, .fb-recipient a) { color: var(--fb-accent); }
html #message-header .header-links a { margin: 5px 12px 0 0; }
.fb-recipient { margin: 4px 0 0; color: var(--fb-muted); font-size: 13px; overflow-wrap: anywhere; }
.fb-recipient > span:first-child { margin-inline-end: 4px; }

.fb-reader-actions {
  display: none;
  position: relative;
  z-index: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 0;
  border-block: 1px solid var(--fb-line);
}
html body .fb-reader-actions :is(button, summary).fb-action {
  display: inline-flex;
  min-height: 36px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  color: var(--fb-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--fb-radius);
  font: 650 13px var(--fb-ui);
  cursor: pointer;
}
html body .fb-reader-actions :is(button, summary).fb-action::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  mask: var(--fb-icon) center / contain no-repeat;
}
html body .fb-reader-actions :is(button, summary).fb-action[hidden] { display: none; }
html body .fb-reader-actions :is(button, summary).fb-action:hover { color: var(--fb-text); background: var(--fb-hover); }
html body .fb-reader-actions :is(button, summary).fb-action.delete:hover { color: var(--fb-danger); }
html body .fb-reader-actions :is(button, summary).fb-action-primary { color: var(--fb-accent); background: var(--fb-selected); }
.fb-more { position: relative; }
.fb-more summary { list-style: none; }
.fb-dropdown {
  position: absolute;
  z-index: 3;
  top: calc(100% + 5px);
  inset-inline-end: 0;
  width: max-content;
  min-width: 166px;
  padding: 4px;
  color: var(--fb-text);
  background: var(--fb-card);
  border: 1px solid var(--fb-edge);
  border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow);
}
html body .fb-reader-actions .fb-dropdown button {
  display: block;
  width: 100%;
  min-height: 37px;
  padding: 5px 10px;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}
html body .fb-reader-actions .fb-dropdown button:hover { background: var(--fb-hover); }

html #message-content {
  display: block;
  margin: 0;
  padding: 22px 0 10px;
  color: var(--fb-text);
  background: transparent;
  border: 0;
}
html #message-content > :is(.leftcol, .rightcol) {
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
}
html #message-content #attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  background: transparent;
  border: 0;
}
html #message-content #attachment-list:empty { display: none; }
html #message-content #attachment-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 2px 5px 2px 9px;
  color: var(--fb-text);
  background: var(--fb-panel);
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius);
}
html #message-content #attachment-list a { color: var(--fb-accent); }
html #message-content #attachment-list .filename { min-width: 0; overflow-wrap: anywhere; }
html #message-content #attachment-list .attachment-size { color: var(--fb-muted); }
html #message-content #messagebody { padding: 0; background: transparent; }
html body.task-mail #messagebody .pre { font: 400 15px/1.7 var(--fb-ui); }

html body:not(.task-login) :is(.form-control, .custom-select, .input-group-text, .recipient-input, textarea) {
  color: var(--fb-text);
  background-color: var(--fb-card);
  border-color: var(--fb-edge);
  border-radius: var(--fb-radius);
}
html body:not(.task-login) :is(.form-control, .custom-select, textarea):focus {
  border-color: var(--fb-accent);
  box-shadow: none;
}
html body:not(.task-login) :is(.popupmenu, .popover, .modal-content, .ui-dialog) {
  color: var(--fb-text);
  background: var(--fb-card);
  border: 1px solid var(--fb-edge);
  border-radius: 9px;
  box-shadow: var(--fb-shadow);
}
html body:not(.task-login) .ui-dialog :is(.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane),
html body:not(.task-login) .popover .popover-header {
  color: var(--fb-text);
  background: var(--fb-card);
  border-color: var(--fb-line);
}
html :is(.popupmenu, .popover) .listing li { border-color: var(--fb-line); }
html .popupmenu .listing li > a { color: var(--fb-text); }
html .popupmenu .listing li > a:not(.disabled):hover { color: var(--fb-accent); background: var(--fb-hover); }
html body:not(.task-login) .btn-primary,
html .floating-action-buttons :is(a, button) {
  color: var(--fb-button-text);
  background: var(--fb-button);
  border-color: var(--fb-button);
  border-radius: var(--fb-radius);
}
html body:not(.task-login) .btn-primary:hover,
html .floating-action-buttons :is(a, button):hover {
  color: var(--fb-button-text);
  background: var(--fb-button-hover);
  border-color: var(--fb-button-hover);
}
html body:not(.task-login) .btn-secondary {
  color: var(--fb-text);
  background: var(--fb-fill);
  border-color: var(--fb-edge);
  border-radius: var(--fb-radius);
}
html body:not(.task-login) :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 2px solid var(--fb-accent);
  outline-offset: -2px;
}

html #layout #compose-content,
html #layout #compose-body { color: var(--fb-text); background: var(--fb-card); }
html body.action-compose #layout #compose-content {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden !important;
}
html body.action-compose #layout .fb-composer .formcontent {
  min-height: 0;
  flex: 1;
  overflow: auto !important;
}
html body.action-compose #layout-content > .footer { display: none; }
html #layout .fb-composer .formcontent {
  padding: clamp(12px, 2vw, 28px) clamp(14px, 3vw, 38px) 10px;
}
html .fb-recipient-controls button {
  min-width: 34px;
  padding: 0 5px;
  color: var(--fb-muted);
  background: var(--fb-card);
  border: 1px solid var(--fb-edge);
  border-inline-start: 0;
  border-radius: 0;
  font: 650 13px var(--fb-ui);
  cursor: pointer;
}
html .fb-recipient-controls button:is(:hover, [aria-expanded="true"]) {
  color: var(--fb-accent);
  background: var(--fb-selected);
}
html .fb-composer .compose-headers .form-group { margin-block-end: 7px; }
html .fb-composer .compose-headers label { color: var(--fb-muted); font-size: 14px; font-weight: 650; }
html .fb-composer :is(.recipient-input, #compose-subject .form-control) { min-height: 40px; }
html body.task-mail.action-compose #composebodycontainer.html-editor {
  display: flex;
  flex-direction: column;
}
html body.task-mail.action-compose #composebodycontainer > .editor-toolbar {
  position: static;
  order: -1;
  flex: none;
  background: var(--fb-panel);
  border: 1px solid var(--fb-edge);
  border-radius: var(--fb-radius) var(--fb-radius) 0 0;
}
html body.task-mail.action-compose #composebody {
  padding: 13px;
  font: 400 15px/1.65 var(--fb-ui);
}
html body.task-mail.action-compose #composebodycontainer.html-editor:not(.mailvelope) > #composebody {
  border-top: 0;
  border-start-start-radius: 0;
  border-start-end-radius: 0;
}
html #layout .fb-send-bar {
  display: flex;
  flex: none;
  min-height: 62px;
  padding: 9px clamp(14px, 3vw, 38px);
  align-items: center;
  gap: 8px;
  color: var(--fb-text);
  background: var(--fb-card);
  border-top: 1px solid var(--fb-line);
}
.fb-send-bar .btn { min-height: 39px; margin: 0; font-weight: 650; }
.fb-send-bar .fb-extwin { margin-inline-start: auto; }
.fb-send-bar .fb-discard { color: var(--fb-muted); }
.fb-send-bar .fb-discard:hover { color: var(--fb-danger); background: var(--fb-hover); }

html body.action-compose #layout-sidebar .file-upload {
  min-height: 88px;
  padding: 14px;
  color: var(--fb-muted);
  background: var(--fb-panel);
  border: 1px dashed var(--fb-edge);
  border-radius: var(--fb-radius);
}
html body.action-compose #layout-sidebar .file-upload:is(.active, .hover) {
  background: var(--fb-selected);
  border-color: var(--fb-accent);
}
html body.action-compose #layout-sidebar .file-upload::after { content: none; }
html body.action-compose #layout-sidebar .file-upload .upload-form { padding: 0; }
html body.action-compose #layout-sidebar .file-upload .hint { color: var(--fb-muted); }
html body:not(.task-login) .tox :is(.tox-toolbar-overlord, .tox-toolbar, .tox-toolbar__primary, .tox-statusbar) {
  background: var(--fb-panel);
  border-color: var(--fb-line);
}
html body:not(.task-login) .tox :is(.tox-tbtn, .tox-statusbar a) { color: var(--fb-text); }
html body:not(.task-login) .tox .tox-tbtn svg { fill: currentColor; }
html body:not(.task-login) .tox .tox-tbtn:hover { background: var(--fb-hover); }
html #messagestack .alert { border-radius: var(--fb-radius); box-shadow: var(--fb-shadow); }

.fb-reader-actions .reply { --fb-icon: url("icons/reply.svg"); }
.fb-reader-actions .archive { --fb-icon: url("icons/archive.svg"); }
.fb-reader-actions .delete { --fb-icon: url("icons/trash.svg"); }
.fb-reader-actions .more { --fb-icon: url("icons/more.svg"); }
#taskmenu .compose { --fb-icon: url("icons/compose.svg"); }
#taskmenu .mail { --fb-icon: url("icons/mail.svg"); }
#taskmenu .contacts { --fb-icon: url("icons/contacts.svg"); }
#taskmenu .settings { --fb-icon: url("icons/settings.svg"); }
#taskmenu .theme { --fb-icon: url("icons/theme.svg"); }
#taskmenu .logout { --fb-icon: url("icons/logout.svg"); }

html #layout-menu #taskmenu a:is(.compose, .mail, .contacts, .settings, .theme, .logout)::before {
  content: "";
  width: 18px !important;
  min-width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  mask: var(--fb-icon) center / contain no-repeat;
}

@media (min-width: 1201px) {
  html.layout-large body.task-mail.action-none #layout {
    display: grid;
    grid-template-columns: 232px clamp(330px, 25vw, 390px) minmax(0, 1fr);
    grid-template-rows: 64px 55px minmax(0, 1fr) auto;
  }

  html.layout-large body.task-mail.action-none #layout-menu,
  html.layout-large body.task-mail.action-none #layout-menu #taskmenu { display: contents; }
  html.layout-large body.task-mail.action-none :is(.fb-brand, #taskmenu .action-buttons, .fb-account-area, .fb-folders) {
    grid-column: 1;
    width: auto !important;
    min-width: 0;
    max-width: none;
    background: var(--fb-panel);
    border-inline-end: 1px solid var(--fb-line);
  }
  html.layout-large body.task-mail.action-none .fb-brand { display: flex; grid-row: 1; }
  html.layout-large #layout-menu .fb-brand .cancel { display: none; }
  html.layout-large body.task-mail.action-none #taskmenu .action-buttons { grid-row: 2; }
  html.layout-large body.task-mail.action-none .fb-folders { grid-row: 3; }
  html.layout-large body.task-mail.action-none .fb-account-area { grid-row: 4; border-top: 1px solid var(--fb-line); }
  html.layout-large body.task-mail.action-none #layout-list {
    grid-area: 1 / 2 / -1 / 3;
    width: auto !important;
    min-width: 0;
    max-width: none;
  }
  html.layout-large body.task-mail.action-none #layout-content {
    grid-area: 1 / 3 / -1 / 4;
    min-width: 0;
  }
  html.layout-large body.task-mail.action-none .column-resizer { display: none; }
  html.layout-large body.task-mail.action-none #layout .fb-folders > .header {
    height: 37px;
    min-height: 37px;
    line-height: 37px;
    border-bottom: 0;
  }
  html.layout-large body.task-mail.action-none #layout .fb-folders > .header .header-title {
    margin: 0 !important;
    padding-inline-start: 19px;
    text-align: left;
    color: var(--fb-dim);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
  }
  html.layout-large #layout .fb-inbox > .header .header-title {
    display: block;
    margin: 0 !important;
    padding-inline-start: 16px;
    text-align: left;
    font-size: 19px;
  }
  html.layout-large #messagelist-header {
    align-items: center;
    justify-content: flex-end;
    padding-inline: 0 9px;
  }
  html.layout-large #messagelist-header .toolbar {
    display: flex;
    flex: none;
    align-items: center;
    border: 0;
  }
  html.layout-large #messagelist-header .toolbar li { display: flex; align-items: center; }
  html.layout-large #messagelist-header :is(.toolbar a, .refresh) {
    display: grid;
    width: 31px;
    min-width: 0;
    height: 34px;
    padding: 0;
    place-items: center;
    border-radius: var(--fb-radius);
  }
  html.layout-large #messagelist-header :is(.toolbar a, .refresh)::before {
    width: 16px;
    height: auto !important;
    margin: 0;
    font-size: 15px;
    line-height: 1;
  }
  html.layout-large #messagelist-header :is(.toolbar, .refresh) .inner {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  html.layout-large body.task-mail.action-none .fb-folders > .footer { border-top: 0; }

  html.layout-large #layout-menu { width: 200px; min-width: 200px; }
  html.layout-large #layout-menu .fb-brand { display: flex; }
  html.layout-large #layout-menu #taskmenu {
    display: flex;
    min-height: 0;
    height: calc(100% - 64px);
    flex-direction: column;
    justify-content: space-between;
  }
  html.layout-large #layout-menu #taskmenu .action-buttons { padding: 4px 12px 8px; }
  html.layout-large #layout-menu #taskmenu .fb-account-area { padding: 9px 10px 12px; }
  html.layout-large #layout-menu #taskmenu :is(.action-buttons, .fb-app-links, .special-buttons) a {
    display: flex;
    width: 100%;
    max-width: none;
    height: 38px;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 9px;
    font-size: 14px;
    line-height: 1.25;
    text-align: start;
  }
  html.layout-large #layout-menu #taskmenu :is(.action-buttons, .fb-app-links, .special-buttons) a::before {
    display: block;
    height: 18px !important;
    margin: 0;
  }
  html.layout-large #layout-menu #taskmenu a.compose { min-height: 41px; }
  html.layout-large body.task-mail.action-none #layout-menu #taskmenu .fb-app-links .mail { display: none; }
  html.layout-large #layout-menu #taskmenu a .inner { display: inline; font-size: inherit; }

  html.layout-large body.task-mail.action-none.fb-reading:not(.fb-show-tools):not(.fb-selection) #layout-content > .header,
  html.layout-large body.task-mail.action-none:not(.fb-reading):not(.fb-selection) #layout-content > .header { display: none; }

  html.layout-large body.action-compose #layout #layout-content > .header { align-items: center; }
  html.layout-large body.action-compose #layout #layout-content .header-title {
    display: block;
    margin: 0 !important;
    padding-inline-start: clamp(14px, 3vw, 38px);
    text-align: left;
    font-size: 18px;
  }
  html.layout-large body.action-compose #layout-sidebar.sidebar-right { flex: 2; max-width: 320px; }

  html.layout-large #layout #layout-content .header .toolbar {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding-inline: 8px;
  }
  html.layout-large #layout #layout-content .header .toolbar li { display: flex; align-items: center; }
  html.layout-large #layout #layout-content .header .toolbar a:not(.hidden) {
    display: inline-flex;
    min-width: 31px;
    max-width: none;
    height: 35px;
    padding: 0 7px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
  }
  html.layout-large #layout #layout-content .header .toolbar a:not(.hidden)::before {
    height: auto !important;
    font-size: 15px;
    line-height: 1;
  }
  html.layout-large #layout #layout-content .header .toolbar a .inner { font-size: inherit; }
  html.layout-large #layout #layout-content .header .toolbar .spacer { width: 3px; }
}

/* The iframe's layout class follows the outer viewport, so the native mobile toolbar
   stays the only message-action surface on phones and tablets. */
html.fb-enterprise-reader .fb-reader-actions { display: flex; }

@media (max-width: 1200px) {
  html #layout-menu .fb-brand { display: flex; }
  html #layout-menu #taskmenu .fb-account-area { padding: 6px 8px 12px; }
  html #layout-menu #taskmenu .action-buttons a.compose { min-height: 44px; }
  html #layout-menu #taskmenu .fb-app-links a { min-height: 43px; }
  html #layout-menu .fb-account summary { padding: 6px; }
}
@media (min-width: 481px) and (max-width: 1200px) {
  html #layout-menu:not(.popover) .fb-brand { height: 54px; justify-content: center; padding: 0 !important; }
  html #layout-menu:not(.popover) .fb-brand :is(span, .cancel),
  html #layout-menu:not(.popover) .fb-account summary :is(.fb-account-text),
  html #layout-menu:not(.popover) .fb-account summary::after { display: none; }
  html #layout-menu:not(.popover) .fb-account summary { justify-content: center; }
  html #layout-menu:not(.popover) #taskmenu .special-buttons { inset-inline: 0 auto; width: 150px; }
}
@media (max-width: 767px) {
  html #layout .header :is(a.button, .toolbar a) { min-height: 44px; }
  html #layout-menu #taskmenu a:is(.compose, .mail, .contacts, .settings, .theme, .logout)::before {
    height: 18px !important;
    margin-inline: 4px 10px;
  }
  html #mailboxlist li > a { min-height: 45px; }
  html #messagelist td.subject { padding-block: 10px; }
  html #messagelist td.subject :is(.date, .size) { margin-inline-end: 26px; }
  html #messagelist td.flags { bottom: auto; top: 9px; }
  html .fb-inbox #messagelist-content { padding-bottom: 54px; }
  html .fb-inbox #messagelist-header .header-title { font-size: 16px; }
  html .fb-inbox .searchbar { margin-inline: 9px; }
  html body .floating-action-buttons a.button { background: var(--fb-button); color: var(--fb-button-text); }
  html #message-header .contactphoto { width: 34px; height: 34px; }
  html #layout .fb-composer .formcontent { padding-inline: 12px; }
  html #layout .fb-send-bar { gap: 5px; padding: 7px 10px; }
  .fb-send-bar .btn { min-height: 44px; padding-inline: 8px; }
  .fb-send-bar .fb-extwin { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.fb-action, .fb-account summary, #layout-menu #taskmenu a, #mailboxlist li > a, #messagelist td) {
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  }
  .fb-more[open] .fb-dropdown, .fb-account[open] .special-buttons { animation: fb-appear 120ms ease-out; }
  @keyframes fb-appear { from { opacity: 0; transform: translateY(3px); } }
}
@media (prefers-reduced-motion: reduce) {
  html body:not(.task-login) :is(.popover, .ui-dialog, .alert) { transition: none; animation: none; }
}
