/*
 * HexaVox Mail — Gmail-parity presentation boundary.
 * This file is intentionally loaded last. It keeps team-work features available
 * while making the default Mail view a clean, consumer-mail interaction model.
 */

:root {
  --gmail-bg: #f6f8fc;
  --gmail-surface: #fff;
  --gmail-ink: #202124;
  --gmail-muted: #5f6368;
  --gmail-line: #e7e9ec;
  --gmail-hover: #eef2f7;
  --gmail-blue: #0b57d0;
  --gmail-blue-soft: #d3e3fd;
  --gmail-shadow: 0 8px 30px rgba(60, 64, 67, .22);
}

html body.mail-body {
  color: var(--gmail-ink);
  background: var(--gmail-bg);
  font-family: Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

html body.mail-body.mail-simple-mode .mail-topbar {
  min-height: 64px;
  padding: 8px 16px;
  border: 0;
  background: var(--gmail-bg);
  box-shadow: none;
}

html body.mail-body.mail-simple-mode .mail-brand-title {
  font-family: Roboto, Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
}

html body.mail-body.mail-simple-mode #mail-session-meta {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell {
  position: relative;
  max-width: 720px;
  min-height: 48px;
  border: 0;
  border-radius: 24px;
  background: #eaf1fb;
  box-shadow: none;
}

html body.mail-body.mail-simple-mode .mail-search-shell::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transform: translateY(-50%);
  background: #444746;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 1 0 3.98 11.64L19.85 21 21 19.85l-6.36-6.37A6.5 6.5 0 0 0 9.5 3Zm0 2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 1 0 3.98 11.64L19.85 21 21 19.85l-6.36-6.37A6.5 6.5 0 0 0 9.5 3Zm0 2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

html body.mail-body.mail-simple-mode .mail-search-shell:focus-within {
  background: #fff;
  box-shadow: 0 1px 3px rgba(60, 64, 67, .3);
}

html body.mail-body.mail-simple-mode .mail-search-token-strip {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-filter-btn {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
}

html body.mail-body.mail-simple-mode .mail-search-filter-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

html body.mail-body.mail-simple-mode .mail-sidebar-toggle-button {
  display: inline-grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  border-color: transparent !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-sidebar-toggle-button:hover { background: var(--gmail-hover) !important; }
html body.mail-body.mail-simple-mode .mail-sidebar-toggle-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

html body.mail-body.mail-simple-mode .mail-app-menu-btn {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-app-menu-btn::before {
  content: "⠿";
  color: #5f6368;
  font-size: 23px;
}

html body.mail-body.mail-simple-mode .mail-app-menu-btn:hover,
html body.mail-body.mail-simple-mode .mail-profile-menu-btn:hover { background: var(--gmail-hover) !important; }

/* Advanced search follows Gmail's compact two-column dialog and never covers its footer. */
html body.mail-body.mail-simple-mode #mail-search-filter-popover {
  top: calc(100% + 8px);
  right: 0;
  width: min(620px, calc(100vw - 32px));
  max-height: min(460px, calc(100dvh - 88px));
  padding: 14px 20px 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--gmail-shadow);
  overflow: visible;
}

html body.mail-body.mail-simple-mode #mail-search-filter-popover .mail-search-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  max-height: none;
  overflow: visible;
}

html body.mail-body.mail-simple-mode #mail-search-filter-popover label {
  gap: 4px;
  color: var(--gmail-muted);
  font-size: 12px;
  font-weight: 400;
}

html body.mail-body.mail-simple-mode #mail-search-filter-popover input,
html body.mail-body.mail-simple-mode #mail-search-filter-popover select {
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid #bdc1c6;
  border-radius: 0;
  background: #fff;
  font-size: 13px;
  box-shadow: none;
}

html body.mail-body.mail-simple-mode #mail-search-filter-popover label:has(#mail-filter-filename),
html body.mail-body.mail-simple-mode #mail-search-filter-popover label:has(#mail-filter-read-state),
html body.mail-body.mail-simple-mode #mail-search-filter-popover label:has(#mail-filter-label),
html body.mail-body.mail-simple-mode #mail-search-filter-popover label:has(#mail-filter-category),
html body.mail-body.mail-simple-mode #mail-search-filter-popover label:has(#mail-filter-message-state) {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-search-filter-popover .mail-search-filter-actions {
  position: static;
  margin: 10px -6px 0;
  padding: 8px 6px 0;
  border-top: 1px solid var(--gmail-line);
  background: #fff;
}

/* Left navigation remains scannable and keeps labels in the visible scroll region. */
html body.mail-body.mail-simple-mode .mail-sidebar {
  overflow-y: auto !important;
  scrollbar-width: thin;
}

html body.mail-body.mail-simple-mode .mail-labels-sidebar-section {
  display: block !important;
  visibility: visible !important;
  min-height: 96px;
}

html body.mail-body.mail-simple-mode .mail-sidebar-more {
  display: flex;
  justify-content: space-between;
}

html body.mail-body.mail-simple-mode .mail-sidebar-more-folders { display: none; }
html body.mail-body.mail-simple-mode .mail-sidebar-more-folders.is-expanded { display: contents; }

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-shell.mail-pane.is-active {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-sidebar {
  width: 72px !important;
  padding-inline: 6px !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-sidebar .mail-workspace-nav-item span,
html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-sidebar .mail-workspace-nav-item strong,
html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-sidebar .mail-sidebar-section,
html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-compose-cta strong {
  display: none !important;
}

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed .mail-compose-cta {
  width: 48px !important;
  min-width: 48px !important;
  padding: 0 !important;
  justify-content: center !important;
}

html body.mail-body.mail-simple-mode .mail-custom-labels:empty::after {
  content: "Create labels to organize mail";
  display: block;
  padding: 5px 18px 9px;
  color: #80868b;
  font-size: 11px;
}

html body.mail-body.mail-simple-mode .mail-workspace-nav-item,
html body.mail-body.mail-simple-mode .folder-btn {
  min-height: 32px;
  border-radius: 0 16px 16px 0;
  font-size: 14px;
  font-weight: 400;
}

html body.mail-body.mail-simple-mode .mail-workspace-nav-item[aria-pressed="true"],
html body.mail-body.mail-simple-mode .folder-btn[aria-pressed="true"] {
  background: var(--gmail-blue-soft);
  color: #001d35;
  font-weight: 700;
}

/* Inbox toolbar: icon-first and visually quiet. */
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls {
  min-height: 48px !important;
  padding: 4px 12px !important;
  gap: 4px !important;
  border-bottom: 1px solid var(--gmail-line) !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls button {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: transparent !important;
  font-size: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls button:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls button::before {
  color: #444746;
  font-size: 18px;
  line-height: 1;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > [data-mail-select-visible-page]::before { content: "□"; }
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > [data-mail-simple-refresh]::before { content: "↻"; }
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > [data-mail-simple-ai]::before { content: "✦"; color: #6b3fa0; }
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > [data-mail-simple-settings]::before { content: "⚙"; }

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-page-range {
  margin-left: auto;
  color: var(--gmail-muted);
  font-size: 12px;
}

/* Category tabs and message rows. */
html body.mail-body.mail-simple-mode .mail-smart-category-strip {
  min-height: 64px !important;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
  border-bottom: 1px solid var(--gmail-line) !important;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip button {
  display: grid !important;
  min-height: 64px !important;
  padding: 7px 14px !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 9px !important;
  border-radius: 0 !important;
  color: var(--gmail-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-icon {
  font-size: 18px;
  text-align: center;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-copy strong {
  font-size: 14px;
  font-weight: 500;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-copy small {
  overflow: hidden;
  color: #80868b;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-count {
  padding: 2px 7px;
  border-radius: 10px;
  background: #e8eaed;
  color: #5f6368;
  font-size: 10px;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip button.is-active {
  color: var(--gmail-blue) !important;
  box-shadow: inset 0 -3px var(--gmail-blue) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open {
  min-height: 40px !important;
  height: 40px !important;
  border-bottom: 1px solid #e7e7e7 !important;
  border-radius: 0 !important;
  background: #f2f6fc !important;
  box-shadow: inset 0 -1px transparent !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open.is-unread {
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy {
  grid-template-columns: minmax(170px, .75fr) minmax(240px, 1.6fr) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy-line::before {
  content: "—";
  margin-right: 5px;
  color: #80868b;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open.is-unread .mail-gmail-row-sender,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open.is-unread .mail-gmail-row-copy > strong {
  font-weight: 700 !important;
}

/* Selected mail uses one compact icon toolbar, matching the list toolbar rhythm. */
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-selection-toolbar {
  min-height: 48px !important;
  height: 48px !important;
  padding: 4px 12px !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  border-bottom: 1px solid var(--gmail-line);
  background: #fff;
  overflow: visible !important;
}

html body.mail-body.mail-simple-mode .mail-gmail-selection-actions,
html body.mail-body.mail-simple-mode .mail-gmail-action-group {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

html body.mail-body.mail-simple-mode .mail-gmail-selection-toolbar button,
html body.mail-body.mail-simple-mode .mail-gmail-bulk-move-shell {
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-gmail-selection-toolbar button:hover,
html body.mail-body.mail-simple-mode .mail-gmail-bulk-move-shell:hover { background: var(--gmail-hover) !important; }
html body.mail-body.mail-simple-mode .mail-gmail-selection-toolbar svg,
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-selection-summary {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-select-match-btn {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  border-radius: 18px !important;
  color: var(--gmail-blue) !important;
  font-size: 12px !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-bulk-move-shell { position: relative; }
html body.mail-body.mail-simple-mode .mail-gmail-bulk-move-shell select {
  position: absolute;
  inset: 0;
  width: 36px !important;
  min-width: 0 !important;
  opacity: 0;
  cursor: pointer;
}
html body.mail-body.mail-simple-mode .mail-gmail-shortcuts-hint { display: none !important; }
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more {
  position: relative !important;
  display: inline-grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more > summary {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #444746 !important;
  cursor: pointer !important;
  list-style: none !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more > summary::-webkit-details-marker { display: none !important; }
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more > summary:hover { background: var(--gmail-hover) !important; }
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more-menu {
  position: absolute !important;
  z-index: 30 !important;
  top: 38px !important;
  left: 0 !important;
  display: grid !important;
  min-width: 188px !important;
  padding: 8px 0 !important;
  border: 1px solid #dadce0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(60, 64, 67, .24) !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more-menu button {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  padding: 0 18px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}
html body.mail-body.mail-simple-mode .mail-gmail-bulk-more-menu button:hover { background: #f1f3f4 !important; }
.mail-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open:hover,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open:focus-within {
  z-index: 2;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 -1px 1px rgba(60, 64, 67, .1) !important;
}

html body.mail-body.mail-simple-mode .mail-gmail-row-chips .is-info,
html body.mail-body.mail-simple-mode .mail-gmail-row-chips .is-warn:not(.is-risk),
html body.mail-body.mail-simple-mode .mail-gmail-row-chips .is-owner,
html body.mail-body.mail-simple-mode .mail-gmail-row-chips .is-read {
  display: none !important;
}

/* Reader toolbar mirrors Gmail: icons up front, secondary commands in More. */
html body.mail-body.mail-simple-mode .mail-reader-primary-actions {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 48px !important;
  padding: 5px 14px !important;
  border-bottom: 1px solid var(--gmail-line) !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode .mail-reader-action-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

html body.mail-body.mail-simple-mode .mail-reader-action-group > button,
html body.mail-body.mail-simple-mode .mail-reader-more-menu > summary,
html body.mail-body.mail-simple-mode .mail-reader-nav-button {
  display: inline-flex !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-reader-action-group > button:hover,
html body.mail-body.mail-simple-mode .mail-reader-more-menu > summary:hover,
html body.mail-body.mail-simple-mode .mail-reader-nav-button:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode .mail-reader-action-group svg,
html body.mail-body.mail-simple-mode .mail-reader-more-menu svg,
html body.mail-body.mail-simple-mode .mail-reader-move-shell > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body.mail-body.mail-simple-mode .mail-reader-action-divider {
  width: 1px;
  height: 24px;
  margin: 0 5px;
  background: #dadce0;
}

html body.mail-body.mail-simple-mode .mail-reader-move-shell {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

html body.mail-body.mail-simple-mode .mail-reader-move-shell:hover { background: var(--gmail-hover); }

html body.mail-body.mail-simple-mode .mail-reader-move-shell select {
  position: absolute;
  inset: 0;
  width: 100% !important;
  min-width: 0 !important;
  opacity: 0;
  cursor: pointer;
}

html body.mail-body.mail-simple-mode .mail-reader-more-menu {
  position: relative;
}

html body.mail-body.mail-simple-mode .mail-reader-more-menu > summary {
  list-style: none;
  cursor: pointer;
}

html body.mail-body.mail-simple-mode .mail-reader-more-menu > summary::-webkit-details-marker { display: none; }

html body.mail-body.mail-simple-mode .mail-reader-more-menu > div {
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 60;
  display: grid;
  min-width: 210px;
  padding: 6px 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--gmail-shadow);
}

html body.mail-body.mail-simple-mode .mail-reader-more-menu > div button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--gmail-ink);
  text-align: left;
  box-shadow: none;
}

html body.mail-body.mail-simple-mode .mail-reader-more-menu > div button:hover { background: var(--gmail-hover); }

html body.mail-body.mail-simple-mode .mail-reader-more-menu > div button svg {
  width: 18px;
  min-width: 18px;
  height: 18px;
}

html body.mail-body.mail-simple-mode .mail-reader-ai-button { color: #6b3fa0 !important; }

/* Scan internals remain available in Team work; Mail view only interrupts for real risk. */
html body.mail-body.mail-simple-mode .mail-message-status .pill,
html body.mail-body.mail-simple-mode .mail-message-security {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-trust-warning {
  margin: 12px 18px !important;
  border: 1px solid #f4b400 !important;
  border-radius: 4px !important;
  background: #fef7e0 !important;
  color: #3c4043 !important;
}

/* Conversation AI is an on-demand side drawer, not a permanent banner. */
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open {
  position: fixed !important;
  top: 72px !important;
  right: 48px !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 88 !important;
  display: block !important;
  width: min(380px, calc(100vw - 60px)) !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-left: 1px solid var(--gmail-line) !important;
  background: #fff !important;
  box-shadow: -4px 0 16px rgba(60, 64, 67, .14) !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-ai-workbench {
  width: 100% !important;
  min-height: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-panel-header {
  min-height: 64px;
  padding: 10px 14px !important;
  align-items: center !important;
  border-bottom: 1px solid var(--gmail-line);
}

html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-panel-header h2 { font-size: 16px; }
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-panel-header p { display: none; }
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open #mail-ai-thread-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open #mail-ai-thread-btn::before {
  content: "×";
  color: #5f6368;
  font-size: 22px;
}
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-ai-panel-workbench {
  display: grid !important;
  height: calc(100% - 64px);
  padding: 12px !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  overflow-y: auto !important;
}
html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open .mail-ai-card {
  padding: 12px !important;
  border: 1px solid var(--gmail-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer {
  position: fixed !important;
  top: 72px;
  right: 52px;
  bottom: 12px;
  z-index: 90;
  display: flex !important;
  width: min(360px, calc(100vw - 24px));
  padding: 0 !important;
  flex-direction: column;
  border: 1px solid #dadce0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--gmail-shadow) !important;
  overflow: hidden;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer.hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer > header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  min-height: 64px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid var(--gmail-line);
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer > header > button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gmail-muted);
  font-size: 20px;
  box-shadow: none;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer .mail-thread-ai-command-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  padding: 12px;
  gap: 8px;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer .mail-thread-ai-command-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 19px;
  background: #eee7f7;
  color: #4f2877;
  box-shadow: none;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer .mail-thread-ai-context-body {
  display: grid !important;
  flex: 1 1 auto;
  padding: 0 12px 12px;
  overflow-y: auto;
}

html body.mail-body.mail-simple-mode .mail-thread-ai-drawer > footer {
  padding: 10px 14px;
  border-top: 1px solid var(--gmail-line);
  color: var(--gmail-muted);
  font-size: 11px;
}

/* Native right rail: no embedded full workspace. */
html body.mail-body .mail-context-rail {
  position: fixed !important;
  top: 72px !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 70 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 48px !important;
  padding: 8px 6px !important;
  background: var(--gmail-bg) !important;
}

html body.mail-body .mail-context-rail button {
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body .mail-context-rail button:hover,
html body.mail-body .mail-context-rail button[aria-pressed="true"] {
  background: #e1e7ef !important;
}

.mail-context-calendar-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #4285f4;
  border-top: 6px solid #4285f4;
  border-radius: 3px;
  color: #174ea6;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

html body.mail-body .mail-context-panel {
  position: fixed !important;
  top: 72px !important;
  right: 48px !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 69 !important;
  display: block !important;
  height: auto !important;
  width: min(340px, calc(100vw - 60px)) !important;
  border-left: 1px solid var(--gmail-line) !important;
  background: #fff !important;
  box-shadow: -2px 0 10px rgba(60, 64, 67, .08) !important;
}

html body.mail-body .mail-context-panel.hidden {
  display: none !important;
}

html body.mail-body .mail-context-panel > header {
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gmail-line);
}

html body.mail-body .mail-context-panel-content {
  height: calc(100% - 56px);
  padding: 14px;
  overflow-y: auto;
}

.mail-context-native-panel { display: grid; gap: 16px; }
.mail-context-native-panel h3 { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.mail-context-primary-action {
  min-height: 38px;
  border: 0 !important;
  border-radius: 19px !important;
  background: #c2e7ff !important;
  color: #001d35 !important;
  box-shadow: none !important;
}

.mail-context-date {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mail-context-date > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1967d2;
  font-size: 20px;
}

.mail-context-date > div,
.mail-context-task-list button > span:last-child,
.mail-context-contact-list button > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mail-context-date small,
.mail-context-task-list small,
.mail-context-contact-list small {
  color: var(--gmail-muted);
  font-size: 11px;
}

.mail-context-agenda,
.mail-context-task-list,
.mail-context-contact-list,
.mail-context-note-list {
  display: grid;
  gap: 4px;
}

html body.mail-body .mail-context-panel .mail-context-agenda > button,
html body.mail-body .mail-context-panel .mail-context-task-list > button,
html body.mail-body .mail-context-panel .mail-context-contact-list > button {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  align-items: center;
  gap: 8px;
  border: 0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--gmail-ink) !important;
  text-align: left;
  box-shadow: none !important;
}

html body.mail-body .mail-context-panel .mail-context-agenda > button { grid-template-columns: 74px minmax(0, 1fr); }
html body.mail-body .mail-context-panel .mail-context-task-list > button { grid-template-columns: 22px minmax(0, 1fr); }
html body.mail-body .mail-context-panel .mail-context-contact-list > button { grid-template-columns: 36px minmax(0, 1fr); }
html body.mail-body .mail-context-panel .mail-context-agenda > button:hover,
html body.mail-body .mail-context-panel .mail-context-task-list > button:hover,
html body.mail-body .mail-context-panel .mail-context-contact-list > button:hover { background: var(--gmail-hover) !important; }
.mail-context-agenda time { color: var(--gmail-muted); font-size: 11px; }
.mail-context-task-check { width: 17px; height: 17px; border: 2px solid #5f6368; border-radius: 50%; }
.mail-context-contact-list button > span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #d3e3fd;
  color: #174ea6;
  font-weight: 700;
}

.mail-context-note-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
}

.mail-context-note-form textarea { resize: vertical; border: 0; outline: 0; }
.mail-context-note-form button { justify-self: end; min-height: 32px; border: 0; border-radius: 16px; }
.mail-context-note-list article { padding: 12px; border: 1px solid #dadce0; border-radius: 8px; }
.mail-context-note-list article p { margin: 0; white-space: pre-wrap; }
.mail-context-note-list article footer { display: flex; margin-top: 8px; justify-content: space-between; color: var(--gmail-muted); font-size: 11px; }
.mail-context-note-list article footer button { border: 0; background: transparent; color: var(--gmail-muted); }
.mail-context-empty { margin: 18px 0; color: var(--gmail-muted); font-size: 12px; text-align: center; }

.mail-context-task-form,
.mail-context-event-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 44px;
  gap: 6px;
}

.mail-context-task-form input,
.mail-context-event-form input {
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 12px;
}

.mail-context-task-form button,
.mail-context-event-form button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 18px;
  background: #d3e3fd;
  color: #0b57d0;
  box-shadow: none;
}

.mail-context-task-list.is-personal article {
  display: grid;
  min-height: 52px;
  padding: 5px 0;
  grid-template-columns: 28px minmax(0, 1fr) 28px 28px;
  align-items: center;
  gap: 3px;
  border-bottom: 1px solid var(--gmail-line);
}

.mail-context-task-list.is-personal article > button {
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

.mail-context-task-list.is-personal .mail-context-task-copy {
  display: grid !important;
  width: 100% !important;
  justify-items: start !important;
  border-radius: 4px !important;
  text-align: left !important;
}

.mail-context-task-list.is-personal article.is-complete .mail-context-task-copy {
  color: #80868b !important;
  text-decoration: line-through;
}

.mail-context-task-list.is-personal article.is-complete .mail-context-task-check {
  border-color: #188038;
  background: #188038;
  color: #fff;
}

.mail-context-event-list { display: grid; gap: 3px; }
.mail-context-event-list article {
  display: grid;
  min-height: 42px;
  padding: 6px 8px;
  grid-template-columns: 80px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px;
  border-left: 3px solid #4285f4;
  border-radius: 4px;
  background: #f8fafd;
}
.mail-context-event-list time { color: #5f6368; font-size: 11px; }
.mail-context-event-list button { border: 0; background: transparent; color: #5f6368; }

html body.mail-body .mail-context-panel > header button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--gmail-muted) !important;
  font-size: 20px !important;
  box-shadow: none !important;
}

html body.mail-body .mail-context-panel > header button:hover {
  background: var(--gmail-hover) !important;
}

/* Quick settings use visual previews while retaining native selects for accessibility. */
html body.mail-body .mail-quick-settings {
  width: min(360px, calc(100vw - 16px)) !important;
}

html body.mail-body .mail-quick-settings-body {
  gap: 12px !important;
  padding: 16px !important;
}

html body.mail-body .mail-setting-preview-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: -6px;
}

html body.mail-body .mail-setting-preview-group > button {
  display: grid;
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  gap: 6px;
  border: 1px solid #dadce0 !important;
  border-radius: 8px;
  background: #fff !important;
  color: var(--gmail-muted) !important;
  box-shadow: none !important;
}

html body.mail-body .mail-setting-preview-group > button.is-active {
  border: 2px solid var(--gmail-blue) !important;
  background: #eef4ff !important;
  color: var(--gmail-blue) !important;
}

html body.mail-body .mail-quick-settings-body > label:has(#mail-quick-density),
html body.mail-body .mail-quick-settings-body > label:has(#mail-quick-theme) {
  position: relative;
  font-weight: 500;
}

html body.mail-body .mail-quick-settings-body > label:has(#mail-quick-density) select,
html body.mail-body .mail-quick-settings-body > label:has(#mail-quick-theme) select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

html body.mail-body .mail-quick-settings fieldset {
  display: grid !important;
  padding: 0 !important;
  gap: 0 !important;
  border: 0 !important;
}

html body.mail-body .mail-quick-settings fieldset legend {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 500;
}

html body.mail-body .mail-quick-settings fieldset label,
html body.mail-body .mail-quick-settings-check {
  display: flex !important;
  min-height: 36px;
  padding: 5px 2px;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13px;
}

html body.mail-body .mail-quick-settings fieldset input,
html body.mail-body .mail-quick-settings-check input {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px;
}

/* Keep primary navigation present in the full-message reader. */
html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion {
  position: fixed !important;
  top: 72px !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 24 !important;
  display: block !important;
  width: 256px !important;
  min-height: 0 !important;
  background: var(--gmail-bg) !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion > .mail-sidebar {
  display: block !important;
  width: 256px !important;
  height: 100% !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion > .mail-thread-list {
  display: none !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-reader-shell.is-active {
  width: calc(100% - 304px) !important;
  margin-left: 256px !important;
  margin-right: 48px !important;
}

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion,
html body.mail-body.mail-simple-mode.mail-sidebar-collapsed[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion > .mail-sidebar {
  width: 72px !important;
}

html body.mail-body.mail-simple-mode.mail-sidebar-collapsed[data-mail-pane="thread"] .mail-reader-shell.is-active {
  width: calc(100% - 120px) !important;
  margin-left: 72px !important;
}

html body.mail-body.mail-simple-mode .mail-message-head {
  padding: 12px 18px 8px !important;
}

html body.mail-body.mail-simple-mode .mail-message-status {
  flex-wrap: nowrap !important;
}

html body.mail-body.mail-simple-mode .mail-message-quick-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

html body.mail-body.mail-simple-mode .mail-message-quick-actions button,
html body.mail-body.mail-simple-mode .mail-message-reaction-quick > summary,
html body.mail-body.mail-simple-mode .mail-message-collapse {
  display: inline-grid !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  font-size: 17px !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick {
  position: relative;
  display: inline-grid !important;
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick > summary {
  list-style: none;
  cursor: pointer;
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick > summary::-webkit-details-marker {
  display: none;
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick > div {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 70;
  display: flex;
  min-width: 266px;
  padding: 8px;
  gap: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--gmail-shadow);
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick > div button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  font-size: 18px !important;
}

html body.mail-body.mail-simple-mode .mail-message-reaction-quick > div button:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode .mail-message-star-action.is-starred {
  color: #f4b400 !important;
}

html body.mail-body.mail-simple-mode .mail-message-collapse {
  color: transparent !important;
  font-size: 0 !important;
}
html body.mail-body.mail-simple-mode .mail-message-collapse::before { content: "⌃"; color: #5f6368; font-size: 16px; }
html body.mail-body.mail-simple-mode .mail-message-collapse[aria-expanded="false"]::before { content: "⌄"; }

html body.mail-body.mail-simple-mode .mail-message-body {
  padding: 14px 18px 18px !important;
}

html body.mail-body.mail-simple-mode .mail-thread-actions {
  margin: 12px 18px 18px !important;
}

.mail-setting-preview-group strong { font-size: 11px; font-weight: 500; }
.mail-setting-preview { display: grid; align-content: center; gap: 3px; height: 34px; padding: 5px; background: #f6f8fc; }
.mail-setting-preview i { display: block; height: 3px; border-radius: 2px; background: #9aa0a6; }
.mail-setting-preview.is-comfortable { gap: 5px; }
.mail-setting-preview.is-spacious { gap: 9px; }
.mail-setting-theme { height: 34px; border: 1px solid #dadce0; border-radius: 4px; background: #fff; }
.mail-setting-theme.is-dark { background: #202124; }
.mail-setting-theme.is-system { background: linear-gradient(135deg, #fff 0 50%, #202124 50%); }

/* Compact Gmail-style composer. Delivery checks still run in JavaScript and APIs. */
html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-compose-modal:not(.is-fullscreen) {
  right: 62px !important;
  bottom: 0 !important;
  width: min(540px, calc(100vw - 74px)) !important;
  height: min(560px, calc(100dvh - 40px)) !important;
  max-height: min(560px, calc(100dvh - 40px)) !important;
  border-radius: 8px 8px 0 0 !important;
  box-shadow: 0 8px 28px rgba(60, 64, 67, .36) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-card {
  display: flex !important;
  height: 100% !important;
  flex-direction: column !important;
  border-radius: inherit !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-hero {
  min-height: 40px !important;
  padding: 0 8px 0 14px !important;
  background: #f2f6fc !important;
  color: #041e49 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-hero h2 {
  font-size: 13px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .hvx126-compose-title-policy {
  margin: 0 !important;
  color: #5f6368 !important;
  font-size: 10px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-layout,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-main,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-main > .mail-compose-section:not(.mail-compose-ai-strip) {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-section-head,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-quickbar,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-send-blocker-banner,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-pre-send-assurance,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-field-group-label,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-field-validation,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-editor-hint,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-advanced,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-check,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-delivery-footnote,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-delivery-checks,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-send-state-panel,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-readiness-aside,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-save-draft-btn,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-decision-safety,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-footer-readiness {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-mailbox),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-to),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-subject),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-body) {
  display: grid !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-cc-bcc-visible .mail-compose-grid > div:has(#compose-cc),
html body.mail-body.mail-simple-mode #mail-compose-modal.is-cc-bcc-visible .mail-compose-grid > div:has(#compose-bcc) {
  display: grid !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-mailbox),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-to),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-cc),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-bcc) {
  grid-template-columns: 44px minmax(0, 1fr) !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 2px 12px !important;
  align-items: center !important;
  gap: 4px !important;
  border-bottom: 1px solid var(--gmail-line) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-to) {
  padding-right: 84px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-subject) {
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border-bottom: 1px solid var(--gmail-line) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-body) {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 170px !important;
  padding: 0 12px !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-editor-shell {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  flex-direction: column !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-rich-editor {
  order: 1;
  flex: 1 1 auto !important;
  min-height: 132px !important;
  padding: 12px 0 !important;
  overflow-y: auto !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar {
  order: 2;
  min-height: 38px !important;
  padding: 3px 0 !important;
  border-top: 1px solid var(--gmail-line) !important;
  border-bottom: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar button {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar button:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-attachment-toolbar] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-format="createLink"] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-inline-image] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-emoji-toggle] svg {
  display: none;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-attachment-toolbar]::before { content: "📎"; font-size: 16px; filter: grayscale(1); }
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-format="createLink"]::before { content: "🔗"; font-size: 15px; filter: grayscale(1); }
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-inline-image]::before { content: "▧"; font-size: 18px; }
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-emoji-toggle]::before { content: "☺"; font-size: 18px; }

html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-options-open) [data-compose-format="underline"],
html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-options-open) [data-compose-inline-image],
html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-options-open) [data-compose-cloud-link],
html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-options-open) [data-compose-confidential-toggle] {
  display: inline-flex !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-actions.mail-modal-actions {
  position: static !important;
  display: flex !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
  border-top: 1px solid var(--gmail-line) !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-send-ready) .mail-compose-actions.mail-modal-actions::after {
  content: "Add recipient, subject, and message";
  order: 3;
  margin-left: 10px;
  color: #5f6368;
  font-size: 10px;
  white-space: nowrap;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-send-btn {
  order: 1 !important;
  min-width: 88px !important;
  height: 36px !important;
  border-radius: 18px 0 0 18px !important;
  background: var(--gmail-blue) !important;
  color: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-send-btn[disabled] {
  background: #e8f0fe !important;
  color: #174ea6 !important;
  cursor: help !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-schedule-menu {
  order: 2 !important;
  margin: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-schedule-menu > summary {
  display: grid !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center;
  border-left: 1px solid rgba(255,255,255,.35) !important;
  border-radius: 0 18px 18px 0 !important;
  background: var(--gmail-blue) !important;
  color: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn {
  order: 99 !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  margin-left: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn:hover { background: var(--gmail-hover) !important; }
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn > span:first-child { font-size: 18px; }
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn .mail-compose-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-ai-strip {
  max-height: 250px;
  overflow-y: auto;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.has-submit-attempted #compose-send-disabled-reason {
  display: inline-grid !important;
  max-width: 240px;
  margin-left: 10px;
  color: #a14200;
  font-size: 11px;
  line-height: 1.25;
}

@media (max-width: 760px) {
  html body.mail-body .mail-context-rail {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode .mail-page {
    padding-right: 0 !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row,
  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open {
    min-height: 64px !important;
    height: 64px !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: center !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy > strong,
  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy-line {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body.mail-body.mail-simple-mode .mail-smart-category-strip {
    grid-template-columns: repeat(4, minmax(118px, 1fr)) !important;
    overflow-x: auto !important;
  }

  html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-copy small {
    display: none;
  }

  html body.mail-body.mail-simple-mode #mail-search-filter-popover {
    position: fixed;
    inset: 70px 8px auto;
    width: auto;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }

  html body.mail-body.mail-simple-mode #mail-search-filter-popover .mail-search-filter-grid {
    grid-template-columns: 1fr;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-compose-modal:not(.is-fullscreen) {
    right: 0 !important;
    width: 100vw !important;
  }

  html body.mail-body.mail-simple-mode .mail-thread-ai-drawer {
    right: 8px;
    bottom: 8px;
  }

  html body.mail-body.mail-simple-mode .mail-ai-shell.is-contextual-open {
    right: 8px !important;
    bottom: 8px !important;
    width: calc(100vw - 16px) !important;
    border: 1px solid var(--gmail-line) !important;
    border-radius: 12px !important;
  }

  html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-shell.is-thread-nav-companion {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-reader-shell.is-active {
    width: calc(100% - 48px) !important;
    margin-left: 0 !important;
  }

  .mail-context-task-form,
  .mail-context-event-form {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .mail-context-task-form input[type="date"],
  .mail-context-event-form input[type="date"] {
    grid-column: 1 / -1;
  }
}

/*
 * Gmail parity closeout — full-bleed shell, one-level toolbar hierarchy,
 * consistent vector iconography, and content-first list/compose geometry.
 */
html body.mail-body.mail-simple-mode:not(.mail-embedded) {
  width: 100% !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-page {
  width: 100% !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 40px 0 0 !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-topbar {
  grid-template-columns: 232px minmax(320px, 720px) minmax(0, 1fr) !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 8px !important;
  gap: 16px !important;
}

html body.mail-body.mail-simple-mode .mail-brand {
  min-width: 0 !important;
  gap: 8px !important;
}

html body.mail-body.mail-simple-mode .mail-brand-media,
html body.mail-body.mail-simple-mode .mail-brand-media .brand-logo,
html body.mail-body.mail-simple-mode .mail-brand-media .brand-logo-fallback {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
}

html body.mail-body.mail-simple-mode .mail-brand-media .brand-logo,
html body.mail-body.mail-simple-mode .mail-brand-media .brand-logo-fallback {
  border-radius: 10px !important;
}

html body.mail-body.mail-simple-mode .mail-brand-copy {
  min-width: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-brand-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-simple-mode .mail-topbar-actions {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

html body.mail-body.mail-simple-mode .mail-header-action-btn,
html body.mail-body.mail-simple-mode .mail-app-menu-btn,
html body.mail-body.mail-simple-mode .mail-profile-menu-btn {
  display: inline-grid !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-header-action-btn:hover,
html body.mail-body.mail-simple-mode .mail-app-menu-btn:hover,
html body.mail-body.mail-simple-mode .mail-profile-menu-btn:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode .mail-header-action-btn svg,
html body.mail-body.mail-simple-mode .mail-app-menu-btn svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode .mail-app-menu-btn svg circle {
  fill: currentColor !important;
  stroke: none !important;
}

html body.mail-body.mail-simple-mode .mail-app-menu-btn::before {
  content: none !important;
}

html body.mail-body.mail-simple-mode .mail-header-ai-btn {
  color: #6b3fa0 !important;
}

html body.mail-body.mail-simple-mode .mail-profile-menu-btn {
  background: #5f3dc4 !important;
  color: #fff !important;
  font-size: 12px !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-pane-stack {
  min-height: 0 !important;
  height: calc(100dvh - 64px) !important;
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active {
  grid-template-columns: 256px minmax(0, 1fr) !important;
  min-height: calc(100dvh - 64px) !important;
  height: calc(100dvh - 64px) !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-sidebar-panel {
  max-height: calc(100dvh - 64px) !important;
  padding: 0 0 16px !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-thread-panel {
  height: calc(100dvh - 64px) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 16px 0 0 0 !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads {
  height: 100% !important;
  overflow-y: auto !important;
}

html body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-body.mail-simple-mode #mail-compose-btn.mail-compose-cta.mail-compose-cta-workspace {
  width: 142px !important;
  min-width: 142px !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 8px 0 12px 8px !important;
  padding: 0 20px 0 16px !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  border-radius: 16px !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-btn .mail-compose-pencil,
html body.mail-body.mail-simple-mode #mail-compose-btn .mail-compose-pencil svg {
  display: block !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-btn .mail-compose-pencil svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode .mail-workspace-nav {
  width: 240px !important;
}

html body.mail-body.mail-simple-mode .mail-workspace-nav-item,
html body.mail-body.mail-simple-mode .folder-btn {
  display: grid !important;
  width: 240px !important;
  min-height: 32px !important;
  padding: 0 12px 0 24px !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
  border-radius: 0 16px 16px 0 !important;
}

html body.mail-body.mail-simple-mode .mail-sidebar-more {
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
}

html body.mail-body.mail-simple-mode .mail-nav-icon {
  display: inline-grid !important;
  width: 20px !important;
  height: 20px !important;
  place-items: center !important;
  color: currentColor !important;
}

html body.mail-body.mail-simple-mode .mail-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.65 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-consensus-toolbar,
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls {
  min-height: 48px !important;
  height: 48px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-consensus-toolbar {
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls {
  display: flex !important;
  width: 100% !important;
  padding: 4px 12px !important;
  align-items: center !important;
  gap: 4px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > button,
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > summary {
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  list-style: none !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-cluster {
  display: inline-flex !important;
  height: 36px !important;
  align-items: center !important;
  gap: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-cluster > [data-mail-select-visible-page] {
  display: inline-grid !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% 0 0 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-menu > summary {
  width: 18px !important;
  min-width: 18px !important;
  height: 36px !important;
  border-radius: 0 18px 18px 0 !important;
  color: #444746 !important;
  font-size: 11px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-cluster:hover {
  border-radius: 18px !important;
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-menu > div {
  left: -30px !important;
  width: 164px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > button::before {
  content: none !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-list-controls > button svg,
html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > summary svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu {
  position: relative !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > summary::-webkit-details-marker {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > div {
  position: absolute !important;
  top: 40px !important;
  left: 0 !important;
  z-index: 80 !important;
  display: grid !important;
  width: 190px !important;
  padding: 6px 0 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: var(--gmail-shadow) !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > div button {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 36px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #202124 !important;
  font-size: 13px !important;
  text-align: left !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu > div button:hover {
  background: var(--gmail-hover) !important;
}

/* Gmail labels read as colored tags rather than tiny decorative dots. */
html body.mail-body.mail-simple-mode .mail-label-nav-item .mail-label-dot {
  display: inline-block !important;
  width: 15px !important;
  min-width: 15px !important;
  height: 12px !important;
  border-radius: 2px 0 0 2px !important;
  clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%) !important;
  opacity: .9 !important;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(200px, 250px)) minmax(0, 1fr) !important;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-icon svg {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode .mail-smart-category-strip .mail-category-count {
  white-space: nowrap !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open {
  grid-template-columns: minmax(184px, .72fr) minmax(340px, 3fr) minmax(0, auto) 84px !important;
  gap: 8px !important;
  padding-right: 12px !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-sender,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy strong,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy-line,
html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy-line em {
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy {
  display: grid !important;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 5px !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy strong {
  display: block !important;
  max-width: none !important;
}

html body.mail-body.mail-simple-mode .mail-gmail-row-chips .is-file {
  max-width: 180px !important;
  padding: 2px 7px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #5f6368 !important;
  font-size: 11px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .hvx126-compose-title-policy {
  display: none !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-compose-modal:not(.is-fullscreen) {
  height: min(600px, calc(100dvh - 32px)) !important;
  max-height: min(600px, calc(100dvh - 32px)) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-recipient-field,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-recipient-field input,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-subject {
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-body),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-editor-shell {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-rich-editor {
  flex: 1 1 auto !important;
  min-height: 180px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-ai-strip {
  display: none !important;
  max-height: 250px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-ai-open .mail-compose-ai-strip {
  display: block !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-attachment-toolbar] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-format="createLink"] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-inline-image] svg,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-emoji-toggle] svg {
  display: block !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-attachment-toolbar]::before,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-format="createLink"]::before,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-inline-image]::before,
html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-emoji-toggle]::before {
  content: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-ai-open] {
  background: #f3e8ff !important;
  color: #6b3fa0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal [data-compose-ai-open] svg {
  display: block !important;
  opacity: 1 !important;
  stroke: currentColor !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal:not(.is-send-ready) .mail-compose-actions.mail-modal-actions::after {
  content: "Add a recipient" !important;
}

@media (max-width: 1080px) and (min-width: 901px) {
  html body.mail-body.mail-simple-mode .mail-header-action-btn {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode .mail-smart-category-strip {
    grid-template-columns: repeat(4, minmax(160px, 1fr)) !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open {
    grid-template-columns: minmax(130px, .65fr) minmax(240px, 2.5fr) 74px !important;
  }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded),
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-page {
    height: 100dvh !important;
    padding: 0 !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-topbar {
    position: relative !important;
    display: block !important;
    height: 64px !important;
    padding: 8px 10px !important;
  }

  html body.mail-body.mail-simple-mode .mail-brand {
    position: absolute !important;
    top: 12px !important;
    left: 14px !important;
    z-index: 90 !important;
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
  }

  html body.mail-body.mail-simple-mode .mail-brand-media,
  html body.mail-body.mail-simple-mode .mail-brand-copy {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode .mail-search-shell {
    width: calc(100% - 48px) !important;
    margin: 0 48px 0 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-search-input {
    padding-left: 48px !important;
  }

  html body.mail-body.mail-simple-mode .mail-topbar-actions {
    position: absolute !important;
    top: 12px !important;
    right: 6px !important;
    z-index: 5 !important;
    display: flex !important;
  }

  html body.mail-body.mail-simple-mode .mail-header-action-btn,
  html body.mail-body.mail-simple-mode .mail-app-menu-btn,
  html body.mail-body.mail-simple-mode .mail-app-menu {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode .mail-profile-menu-btn {
    display: inline-grid !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  html body.mail-body.mail-simple-mode #mail-profile-menu-btn.mail-profile-menu-btn {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex: 0 0 36px !important;
  }

  html body.mail-body.mail-simple-mode #mail-sidebar-toggle.mail-sidebar-toggle-button {
    border-radius: 50% !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-pane-stack,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-thread-panel {
    height: calc(100dvh - 64px) !important;
    min-height: calc(100dvh - 64px) !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-thread-panel {
    border-radius: 0 !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-simple-consensus-toolbar {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-simple-more-menu {
    display: block !important;
  }

  html body.mail-body.mail-simple-mode .mail-smart-category-strip {
    grid-template-columns: repeat(4, 132px) !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-open {
    grid-template-columns: 32px minmax(0, 1fr) 58px !important;
    grid-template-areas:
      "avatar sender time"
      "avatar copy copy" !important;
    min-height: 72px !important;
    height: 72px !important;
    padding: 7px 10px 7px 12px !important;
    align-content: center !important;
    gap: 3px 8px !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-avatar {
    display: grid !important;
    grid-area: avatar !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-sender {
    grid-area: sender !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy {
    display: block !important;
    grid-area: copy !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-copy strong {
    display: block !important;
    max-width: 100% !important;
  }

  html body.mail-body.mail-simple-mode #mail-threads .mail-gmail-row-time {
    grid-area: time !important;
  }
}

@media (max-width: 760px) {
  html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header {
    height: 56px !important;
    min-height: 56px !important;
    padding: 10px 14px !important;
    align-items: center !important;
  }

  html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header > div {
    min-width: 0 !important;
    align-self: center !important;
  }

  html body.mail-body.mail-simple-mode .mail-view-title-row,
  html body.mail-body.mail-simple-mode #mail-view-subject {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html body.mail-body.mail-simple-mode #mail-view-subject {
    height: 32px !important;
    max-height: 32px !important;
    overflow: hidden !important;
    line-height: 32px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header > div:first-child {
    flex: 1 1 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-view-subject-actions {
    width: 76px !important;
    min-width: 76px !important;
    flex: 0 0 76px !important;
  }

  html body.mail-body.mail-simple-mode .mail-reader-primary-actions-slot .mail-reader-primary-actions {
    width: auto !important;
    min-width: 0 !important;
    margin-left: 4px !important;
    flex: 1 1 0 !important;
    gap: 4px !important;
  }

  html body.mail-body.mail-simple-mode .mail-reader-action-group {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  html body.mail-body.mail-simple-mode .mail-reader-action-group::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-reader-action-group > [data-archive-email-id] { order: 1; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > [data-spam-email-id] { order: 2; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > [data-delete-email-id] { order: 3; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > .mail-reader-more-menu { order: 4; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > [data-mark-unread-email-id] { order: 5; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > .mail-reader-move-shell { order: 6; }
  html body.mail-body.mail-simple-mode .mail-reader-action-group > .mail-reader-action-divider { display: none !important; }
}

/* Sender-authored email canvas.
   Preserve the source template like Gmail while keeping it inside the reader. */
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html body.mail-body.mail-simple-mode .hvx10-message-stack,
html body.mail-body.mail-simple-mode .mail-message-card,
html body.mail-body.mail-simple-mode .mail-message-card > [data-message-content-email-id],
html body.mail-body.mail-simple-mode .mail-message-body,
html body.mail-body.mail-simple-mode .mail-message-body > .mail-message-body-main {
  min-width: 0 !important;
  max-width: 100% !important;
}

html body.mail-body.mail-simple-mode .mail-message-card {
  width: 100% !important;
}

html body.mail-body.mail-simple-mode .mail-message-body,
html body.mail-body.mail-simple-mode .mail-message-body > .mail-message-body-main {
  width: 100% !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html > table {
  margin-right: auto;
  margin-left: auto;
}

html body.mail-body.mail-simple-mode .mail-sender-html-canvas {
  width: fit-content;
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  transform-origin: top center;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html table {
  display: table !important;
  width: auto;
  max-width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  font-size: inherit;
  table-layout: auto !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html tr {
  display: table-row !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html td,
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html th {
  display: table-cell !important;
  padding: 0;
  border: 0;
  text-align: inherit;
  vertical-align: inherit;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html table[align="center"],
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html td[align="center"] > table,
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html th[align="center"] > table {
  margin-right: auto !important;
  margin-left: auto !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html table[align="right"],
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html td[align="right"] > table,
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html th[align="right"] > table {
  margin-right: 0 !important;
  margin-left: auto !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html > :not(.mail-remote-image-notices),
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html > :not(.mail-remote-image-notices) * {
  box-sizing: content-box;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html .mail-remote-image-notices,
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html .mail-remote-image-notices * {
  box-sizing: border-box;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html img.mail-remote-image-placeholder,
html body.mail-body.mail-simple-mode .mail-message-rendered-layout-body.is-primary-html img.mail-remote-image-tracker {
  display: none !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-notices {
  width: 100% !important;
  margin: 0 0 16px !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border: 1px solid #d2e3fc !important;
  border-radius: 4px !important;
  background: #f8fbff !important;
  color: #3c4043 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-copy strong {
  font-size: 13px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-copy span {
  color: #5f6368 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions button {
  width: auto !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 4px 10px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: transparent !important;
  color: #0b57d0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions button:hover,
html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions button:focus-visible {
  background: #e8f0fe !important;
}

html body.mail-body.mail-simple-mode .mail-remote-image-banner.is-collapsed {
  display: none !important;
}

@media (max-width: 760px) {
  html body.mail-body.mail-simple-mode .mail-message-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    align-items: start !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-persona {
    width: 100% !important;
    min-width: 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-copy {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-primary-row {
    display: block !important;
    min-width: 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-primary-row strong,
  html body.mail-body.mail-simple-mode .mail-message-email,
  html body.mail-body.mail-simple-mode .mail-message-copy > .meta {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-break: normal !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-status {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }

  html body.mail-body.mail-simple-mode .mail-remote-image-banner {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  html body.mail-body.mail-simple-mode .mail-remote-image-banner-copy,
  html body.mail-body.mail-simple-mode .mail-remote-image-banner-copy span {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  html body.mail-body.mail-simple-mode .mail-remote-image-banner-actions button {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
}

/* Deployed inbox continuity contract.
 * Keep this at the end of the final parity layer: older enterprise rules use a
 * higher-specificity #mail-threads selector and otherwise restore flex gaps and
 * stretched category tabs.
 */
html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads {
  display: block !important;
  gap: 0 !important;
}

@media (min-width: 901px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-smart-category-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(200px, 250px)) minmax(0, 1fr) !important;
    min-height: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-smart-category-strip button {
    flex: none !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 56px !important;
    height: 56px !important;
  }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-smart-category-strip {
    display: grid !important;
    grid-template-columns: repeat(4, 132px) !important;
    min-height: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow-x: auto !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-smart-category-strip button {
    flex: none !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 56px !important;
    height: 56px !important;
  }
}

/* Live Gmail comparison closeout: July 2026.
 * These rules intentionally sit after every legacy enterprise layer.
 */
@media (min-width: 901px) {
  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-shell.mail-pane.is-active {
    column-gap: 8px !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) .mail-thread-panel {
    border-radius: 16px 0 0 16px !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-gmail-row,
  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-gmail-row-open {
    min-height: 40px !important;
    height: 40px !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-gmail-row {
    grid-template-columns: 98px minmax(0, 1fr) !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-gmail-row-select {
    grid-template-columns: 26px 32px 24px !important;
    width: 98px !important;
    min-width: 98px !important;
    height: 40px !important;
    gap: 0 !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-threads .mail-gmail-row-open {
    grid-template-columns: minmax(191px, .72fr) minmax(340px, 3fr) minmax(0, auto) 84px !important;
  }
}

html body.mail-body.mail-simple-mode .mail-search-shell:focus-within {
  background: #eaf1fb !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover {
  top: calc(100% - 1px) !important;
  right: auto !important;
  left: 0 !important;
  width: min(720px, calc(100vw - 32px)) !important;
  max-height: min(440px, calc(100dvh - 64px)) !important;
  padding: 10px 24px 8px !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 0 0 4px 4px !important;
  box-shadow: 0 8px 18px rgba(60, 64, 67, .28) !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-grid {
  display: block !important;
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label {
  display: grid !important;
  min-height: 36px !important;
  margin: 0 !important;
  grid-template-columns: 120px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0 !important;
  color: #5f6368 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover input,
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover select {
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #9aa0a6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-size {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(76px, .7fr) minmax(72px, .7fr) !important;
  align-items: center !important;
  gap: 24px !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-filename),
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-read-state),
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-label),
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-category),
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-message-state),
html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label:has(#mail-filter-before) {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-check {
  display: flex !important;
  min-height: 38px !important;
  margin-left: 0 !important;
  align-items: center !important;
  gap: 12px !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-check input {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  border: 1px solid #5f6368 !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-actions {
  display: flex !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 8px 0 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  border: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-filter-clear-btn {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-filter-create-rule-btn {
  border: 0 !important;
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-filter-apply-btn {
  min-width: 92px !important;
  min-height: 40px !important;
  border-radius: 20px !important;
  background: #0b57d0 !important;
  color: #fff !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-quick-settings.mail-quick-settings {
  top: 64px !important;
  right: 55px !important;
  width: min(320px, calc(100vw - 55px)) !important;
  height: calc(100dvh - 64px) !important;
  border-left: 1px solid #e0e3e7 !important;
  box-shadow: -8px 0 20px rgba(60, 64, 67, .16) !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-head {
  min-height: 48px !important;
  padding: 0 14px !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-overview-kicker {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-head h2 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings #mail-quick-settings-close {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  font-size: 24px !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-footer {
  min-height: 56px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  order: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings #mail-quick-settings-full {
  min-height: 36px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #0b57d0 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-body {
  display: grid !important;
  padding: 0 16px 24px !important;
  gap: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-body > label,
html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-body > fieldset,
html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-check {
  padding-top: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #e0e3e7 !important;
  color: #3c4043 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] {
  display: grid !important;
  grid-template-columns: 1fr !important;
  margin: 0 !important;
  padding-bottom: 12px !important;
  gap: 0 !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] > button {
  display: grid !important;
  min-height: 48px !important;
  padding: 4px 2px !important;
  grid-template-columns: 24px minmax(0, 1fr) 74px !important;
  align-items: center !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #3c4043 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] > button::before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #5f6368 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] > button.is-active::before {
  border: 5px solid #1a73e8 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] > button strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  font-size: 13px !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="density"] > button .mail-setting-preview {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="theme"] {
  margin: 0 !important;
  padding: 0 0 16px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="theme"] > button {
  min-height: 60px !important;
  padding: 6px !important;
  border-radius: 4px !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-reader-shell.is-active {
  position: fixed !important;
  top: 64px !important;
  right: 48px !important;
  bottom: 0 !important;
  left: 264px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-reader-shell.is-active .mail-view-panel {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 16px 0 0 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  -webkit-overflow-scrolling: touch !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-view-sticky-chrome {
  display: contents !important;
  position: static !important;
}

html body.mail-body.mail-simple-mode .mail-reader-primary-actions-slot {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  display: flex !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  align-items: center !important;
  border-bottom: 1px solid #e0e3e7 !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode .mail-reader-primary-actions-slot .mail-view-back-btn {
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-reader-primary-actions-slot .mail-reader-primary-actions {
  position: static !important;
  min-height: 47px !important;
  height: 47px !important;
  padding: 5px 0 !important;
  flex: 1 1 auto !important;
  margin-left: 20px !important;
  border: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header {
  display: flex !important;
  min-height: 56px !important;
  height: 56px !important;
  padding: 0 64px !important;
  align-items: center !important;
  border: 0 !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header > div {
  align-self: center !important;
}

html body.mail-body.mail-simple-mode .mail-view-title-row {
  gap: 8px !important;
}

html body.mail-body.mail-simple-mode #mail-view-subject {
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
}

html body.mail-body.mail-simple-mode #mail-view-meta {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-view-folder-pill {
  display: inline-flex !important;
  min-height: 20px !important;
  padding: 1px 7px !important;
  align-items: center !important;
  border-radius: 3px !important;
  background: #e0e0e0 !important;
  color: #5f6368 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode .mail-view-folder-pill[hidden] {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-head {
  min-height: 40px !important;
  padding: 0 8px !important;
  align-items: center !important;
}

html body.mail-body.mail-simple-mode .mail-message-card {
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-message-avatar {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
}

html body.mail-body.mail-simple-mode .mail-message-body {
  padding: 8px 64px 18px !important;
}

html body.mail-body.mail-simple-mode .mail-inline-reply-mode select {
  min-height: 32px !important;
  padding: 4px 28px 4px 8px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background-color: transparent !important;
  color: #202124 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-inline-reply-mode select:hover,
html body.mail-body.mail-simple-mode .mail-inline-reply-mode select:focus-visible,
html body.mail-body.mail-simple-mode .mail-inline-signature-toggle[aria-pressed="true"] {
  background-color: #e8f0fe !important;
  color: #174ea6 !important;
}

html body.mail-body.mail-simple-mode .mail-inline-reply-body .hexavox-email-signature {
  margin-top: 16px !important;
  color: #5f6368 !important;
}

html body.mail-body.mail-simple-mode .mail-message-readable-summary,
html body.mail-body.mail-simple-mode .mail-reader-advanced-workflow {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-thread-actions {
  margin: 12px 64px 18px !important;
}

html body.mail-body.mail-simple-mode .mail-thread-actions > button,
html body.mail-body.mail-simple-mode .mail-message-more-actions > summary {
  min-height: 36px !important;
  padding: 0 16px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #3c4043 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-more-actions > summary {
  display: grid !important;
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  list-style: none !important;
  font-size: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-message-more-actions > summary::-webkit-details-marker {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-message-more-actions > summary::before {
  content: "⋮";
  font-size: 20px;
  line-height: 1;
}

html body.mail-body.mail-simple-mode .mail-message-reactions {
  position: relative;
  display: inline-flex !important;
  min-width: 0 !important;
  min-height: 36px !important;
  margin: 0 !important;
  align-items: center !important;
  gap: 6px !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-chip,
html body.mail-body.mail-simple-mode .mail-reaction-picker summary {
  display: inline-grid !important;
  min-height: 32px !important;
  padding: 3px 9px !important;
  place-items: center !important;
  border: 1px solid #dadce0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3c4043 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker {
  position: relative !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker summary {
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  list-style: none !important;
  font-size: 18px !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker summary::-webkit-details-marker {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker > div {
  position: absolute !important;
  z-index: 80 !important;
  right: 0 !important;
  bottom: 42px !important;
  display: flex !important;
  gap: 4px !important;
  padding: 6px !important;
  border: 1px solid #e0e3e7 !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 4px 18px rgba(60, 64, 67, .24) !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker > div button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  font-size: 18px !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-reaction-picker > div button:hover,
html body.mail-body.mail-simple-mode .mail-reaction-picker > div button:focus-visible {
  background: #f1f3f4 !important;
}

html body.mail-body.mail-simple-mode #mail-thread-detail.mail-thread-detail {
  padding: 0 0 36px !important;
}

html body.mail-body.mail-simple-mode .mail-thread-structure,
html body.mail-body.mail-simple-mode .mail-reader-thread-structure,
html body.mail-body.mail-simple-mode [aria-label="Conversation thread structure"] {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-thread-toolbar,
html body.mail-body.mail-simple-mode .mail-thread-case-header,
html body.mail-body.mail-simple-mode .mail-thread-next-step,
html body.mail-body.mail-simple-mode .mail-thread-inline-back {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal[hidden],
html body.mail-body.mail-simple-mode #mail-compose-modal.hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-compose-modal:not(.is-fullscreen) {
  right: 72px !important;
  height: min(508px, calc(100dvh - 16px)) !important;
  max-height: min(508px, calc(100dvh - 16px)) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-card {
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-modal-hero {
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-mailbox) {
  grid-template-columns: 36px minmax(0, 1fr) !important;
  padding-right: 16px !important;
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-to),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-cc),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-bcc) {
  grid-template-columns: 20px minmax(0, 1fr) !important;
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-subject),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-body) {
  padding-right: 16px !important;
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-actions.mail-modal-actions {
  padding-right: 16px !important;
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-quickbar::before,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-actions.mail-modal-actions::before {
  content: none !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] #mail-threads {
  display: none !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-gmail-row-copy-line::before {
  content: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-send-btn:not([disabled]) {
  border-color: #0b57d0 !important;
  background: #0b57d0 !important;
  color: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal:not(.has-submit-attempted) .mail-compose-actions.mail-modal-actions::after {
  content: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.has-submit-attempted:not(.is-send-ready) .mail-compose-actions.mail-modal-actions::after {
  content: "Add a recipient" !important;
}

/* Live Gmail parity: compact search header and one-row date/search controls. */
html body.mail-body.mail-simple-mode .mail-search-shell {
  min-height: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover {
  max-height: min(442px, calc(100dvh - 56px)) !important;
  padding-top: 10px !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover label {
  min-height: 40px !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-date {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.1fr) !important;
  align-items: center !important;
  gap: 24px !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover input[type="hidden"] {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-check {
  display: inline-flex !important;
  width: auto !important;
  min-height: 40px !important;
  margin-right: 28px !important;
  grid-template-columns: none !important;
}

html body.mail-body.mail-simple-mode .mail-search-shell #mail-search-filter-popover .mail-search-filter-check + .mail-search-filter-check {
  margin-left: 28px !important;
}

html body.mail-body.mail-simple-mode #mail-filter-create-rule-btn:disabled {
  color: #9aa0a6 !important;
  cursor: default !important;
  opacity: 1 !important;
}

/* Quick settings use Gmail-style preview rows while retaining HexaVox options. */
html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps {
  display: grid !important;
  padding: 16px 0 14px !important;
  gap: 14px !important;
  border-bottom: 1px solid #e0e3e7 !important;
  color: #3c4043 !important;
  font-size: 13px !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps > strong {
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps > div {
  display: grid !important;
  min-height: 54px !important;
  grid-template-columns: minmax(0, 1fr) 72px !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps button,
html body.mail-body.mail-simple-mode #mail-quick-settings #mail-quick-theme-view {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #0b57d0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps button {
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: start !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps-preview {
  display: grid !important;
  width: 72px !important;
  height: 50px !important;
  padding: 8px !important;
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  gap: 5px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 3px !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-apps-preview i {
  display: block !important;
  height: 4px !important;
  border-radius: 2px !important;
  background: #d6d9de !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-theme-label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-theme-label select {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="theme"] {
  display: grid !important;
  min-height: 82px !important;
  padding: 8px 0 16px !important;
  grid-template-columns: 62px !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="theme"]:not(.is-expanded) > button:not(.is-active) {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings [data-setting-preview-group="theme"].is-expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-quick-settings-body > label:has(#mail-quick-inbox-type) {
  padding-bottom: 6px !important;
  border-bottom: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings #mail-quick-inbox-type {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview-group {
  display: grid !important;
  padding: 0 0 12px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  border-bottom: 1px solid #e0e3e7 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview-group > button {
  display: grid !important;
  min-height: 54px !important;
  padding: 4px 2px !important;
  grid-template-columns: 24px minmax(0, 1fr) 74px !important;
  align-items: center !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #3c4043 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview-group > button::before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #5f6368 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview-group > button.is-active::before {
  border: 5px solid #1a73e8 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview-group strong {
  justify-self: start !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview {
  display: grid !important;
  width: 72px !important;
  height: 42px !important;
  padding: 6px !important;
  gap: 4px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 3px !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview i {
  display: block !important;
  height: 3px !important;
  border-radius: 2px !important;
  background: #d5d9df !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview.is-important i:first-child,
html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview.is-starred i:first-child {
  background: #f6c244 !important;
}

html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview.is-unread i:first-child,
html body.mail-body.mail-simple-mode #mail-quick-settings .mail-inbox-type-preview.is-priority i:first-child {
  background: #8ab4f8 !important;
}

/* Compose mirrors Gmail's formatting rail, footer tools, menus, and live size. */
html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-compose-modal:not(.is-fullscreen) {
  right: 71px !important;
  width: min(584px, calc(100vw - 84px)) !important;
  max-width: min(584px, calc(100vw - 84px)) !important;
  height: min(547px, calc(100dvh - 16px)) !important;
  max-height: min(547px, calc(100dvh - 16px)) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-channel),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-template),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-signature),
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-classification) {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar {
  display: none !important;
  min-height: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  align-items: center !important;
  gap: 1px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: #f2f6fc !important;
  overflow: hidden !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar {
  display: flex !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #mail-compose-popout {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-sidebar-archive {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-view-subject-actions {
  display: inline-flex !important;
  margin-left: auto !important;
  align-items: center !important;
  gap: 4px !important;
}

html body.mail-body.mail-simple-mode .mail-view-subject-actions[hidden] {
  display: none !important;
}

html body.mail-body.mail-simple-mode .mail-view-subject-actions button {
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode .mail-view-subject-actions button:hover {
  background: var(--gmail-hover) !important;
}

html body.mail-body.mail-simple-mode .mail-view-subject-actions svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode #mail-threads .mail-simple-select-cluster > [data-mail-select-visible-page] svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-format="createLink"],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-inline-image],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-attachment-toolbar],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-cloud-link],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-confidential-toggle],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-emoji-toggle],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-format="removeFormat"],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-ai-open],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-plain-text],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-spellcheck],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-print],
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-format-toolbar [data-compose-more-options-toggle] {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > select {
  display: inline-block !important;
  width: auto !important;
  min-width: 72px !important;
  height: 30px !important;
  padding: 0 18px 0 6px !important;
  border: 0 !important;
  background: transparent !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format-color] {
  display: inline-block !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 6px !important;
  border: 0 !important;
  background: transparent !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="underline"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="insertUnorderedList"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="insertOrderedList"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="outdent"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="indent"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="justifyLeft"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format="justifyCenter"],
html body.mail-body.mail-simple-mode #mail-compose-modal.is-formatting-open .mail-compose-format-toolbar > [data-compose-format-value="formatBlock"] {
  display: inline-flex !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools {
  display: flex !important;
  min-width: 0 !important;
  order: 3 !important;
  align-items: center !important;
  gap: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools > button,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools > details > summary {
  display: inline-grid !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  font-size: 17px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  list-style: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools > button:hover,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools > details > summary:hover {
  background: #eef2f7 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools svg,
html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools .mail-compose-formatting-toggle {
  width: 38px !important;
  min-width: 38px !important;
  border-radius: 15px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools details {
  position: relative !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools details > div {
  position: absolute !important;
  right: 0 !important;
  bottom: 38px !important;
  z-index: 8 !important;
  display: grid !important;
  min-width: 180px !important;
  padding: 8px 0 !important;
  border: 1px solid #dadce0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(60, 64, 67, .28) !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools details:not([open]) > div {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools details > div button {
  min-height: 36px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #3c4043 !important;
  text-align: left !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-footer-tools details > div button:hover {
  background: #f1f3f4 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-actions.mail-modal-actions {
  min-height: 52px !important;
  height: 52px !important;
  padding-right: 12px !important;
  padding-left: 16px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn {
  order: 4 !important;
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #444746 !important;
  margin-left: auto !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-reset-btn .mail-compose-action-label {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options:not(.hidden) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 4000 !important;
  display: grid !important;
  width: min(560px, calc(100vw - 32px)) !important;
  min-height: 424px !important;
  max-height: calc(100dvh - 32px) !important;
  margin: 0 !important;
  padding: 24px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 22px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 0 0 100vmax rgba(32, 33, 36, .45), 0 16px 48px rgba(32, 33, 36, .32) !important;
  transform: translate(-50%, -50%) !important;
  overflow-y: auto !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options > div:first-child {
  display: grid !important;
  gap: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options > div:first-child strong {
  font-size: 24px !important;
  font-weight: 400 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options > div:first-child span {
  color: #3c4043 !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options > label {
  display: grid !important;
  gap: 8px !important;
  color: #174ea6 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options input[type="datetime-local"] {
  min-height: 56px !important;
  padding: 0 14px !important;
  border: 1px solid #9aa0a6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #202124 !important;
  font-size: 15px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options fieldset {
  display: grid !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 12px !important;
  border: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options fieldset legend {
  margin-bottom: 8px !important;
  color: #174ea6 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options fieldset label {
  display: flex !important;
  min-height: 32px !important;
  align-items: center !important;
  gap: 10px !important;
  color: #3c4043 !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-options fieldset input {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-confidential-actions {
  display: flex !important;
  margin-top: auto !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-confidential-actions button {
  min-width: 76px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  border-radius: 20px !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-disable {
  border: 0 !important;
  background: transparent !important;
  color: #0b57d0 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal #compose-confidential-save {
  border: 0 !important;
  background: #0b57d0 !important;
  color: #fff !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-grid > div:has(#compose-attachment-list:not(:empty)) {
  display: block !important;
  flex: 0 0 auto !important;
  min-height: 54px !important;
  max-height: 70px !important;
  padding: 0 16px 6px !important;
  overflow-y: auto !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-attachment-toolbar,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-attachment-dropzone,
html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-attachment-meta {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-compose-modal .mail-compose-attachment-list {
  display: flex !important;
  min-height: 46px !important;
  max-height: 54px !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  overflow-y: auto !important;
}

/* Keep legacy policy/readiness helpers available to compose logic without
   allowing author-level display rules to override their hidden state. */
html body.mail-body.mail-simple-mode #mail-compose-modal [hidden] {
  display: none !important;
}

/* Full settings keeps Gmail's navigation context and compact table rhythm. */
html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-pane-stack {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  grid-template-columns: 264px minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: calc(100dvh - 64px) !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-shell.is-settings-nav-companion {
  display: block !important;
  width: 264px !important;
  min-width: 264px !important;
  height: calc(100dvh - 64px) !important;
  min-height: 0 !important;
  grid-column: 1 !important;
  overflow: hidden !important;
  background: #f6f8fc !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-shell.is-settings-nav-companion > .mail-sidebar {
  display: flex !important;
  width: 264px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding-top: 8px !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f6f8fc !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-shell.is-settings-nav-companion > .mail-thread-list {
  display: none !important;
}

html body.mail-body.mail-simple-mode[data-mail-pane="settings"] #mail-settings-panel {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: calc(100dvh - 64px) !important;
  min-height: 0 !important;
  grid-column: 2 !important;
  overflow: auto !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-card {
  width: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 16px 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-head {
  min-height: 54px !important;
  padding: 12px 8px 6px !important;
  align-items: center !important;
  border: 0 !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-head .mail-overview-kicker,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-head .meta {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-head .card-title {
  margin: 0 !important;
  color: #202124 !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 22px !important;
  font-weight: 400 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel #mail-settings-back-btn {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-primary-tabs {
  position: sticky !important;
  top: 0 !important;
  z-index: 14 !important;
  display: flex !important;
  min-height: 42px !important;
  padding: 0 8px !important;
  align-items: stretch !important;
  gap: 0 !important;
  overflow-x: auto !important;
  border-bottom: 1px solid #dadce0 !important;
  background: rgba(255, 255, 255, .98) !important;
  scrollbar-width: thin !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-primary-tabs button {
  position: relative !important;
  display: inline-flex !important;
  min-width: max-content !important;
  min-height: 42px !important;
  padding: 0 7px !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #3c4043 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-primary-tabs button.is-active {
  color: #0b57d0 !important;
  font-weight: 500 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-primary-tabs button.is-active::after {
  content: "" !important;
  position: absolute !important;
  right: 7px !important;
  bottom: 0 !important;
  left: 7px !important;
  height: 3px !important;
  border-radius: 3px 3px 0 0 !important;
  background: #0b57d0 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-navigation-shell {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-form {
  display: block !important;
  margin: 0 8px !important;
  padding: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-form.hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-section {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-section.is-settings-tab-hidden,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-section.is-search-hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-section-head {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-row {
  display: grid !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 9px 8px !important;
  grid-template-columns: 216px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 8px !important;
  border: 0 !important;
  border-top: 1px solid #e8eaed !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-row > label:first-child,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-row > legend,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-row > span:first-child {
  padding: 3px 0 !important;
  color: #202124 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel fieldset.mail-settings-row {
  min-width: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel fieldset.mail-settings-row > legend {
  float: left !important;
  width: 216px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-control,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-options {
  display: flex !important;
  min-width: 0 !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 5px 14px !important;
  color: #3c4043 !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-options-stack {
  flex-direction: column !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-control select,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-inline-control select {
  width: auto !important;
  min-width: 120px !important;
  max-width: 520px !important;
  min-height: 30px !important;
  padding: 2px 28px 2px 8px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-control input:not([type="checkbox"]):not([type="radio"]) {
  width: min(620px, 100%) !important;
  min-height: 34px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-control textarea {
  width: min(680px, 100%) !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-control .meta {
  width: 100% !important;
  margin: 2px 0 0 !important;
  color: #5f6368 !important;
  font-size: 12px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-style-preview {
  min-width: 410px !important;
  min-height: 54px !important;
  padding: 12px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 2px !important;
  background: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-actions {
  position: static !important;
  display: flex !important;
  margin: 0 !important;
  padding: 18px 8px !important;
  gap: 10px !important;
  border-top: 1px solid #e8eaed !important;
  background: #fff !important;
  backdrop-filter: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-management-note,
html body.mail-body.mail-simple-mode #mail-settings-panel #mail-settings-automation,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-special-panel {
  margin: 18px 8px !important;
  padding: 18px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 2px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-special-panel.hidden,
html body.mail-body.mail-simple-mode #mail-settings-panel #mail-settings-automation.hidden,
html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-management-note.hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-special-panel h3 {
  margin: 0 0 8px !important;
  color: #202124 !important;
  font-size: 18px !important;
}

html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-special-panel p {
  max-width: 760px !important;
  margin: 0 0 16px !important;
  color: #5f6368 !important;
}

html body.mail-body.mail-simple-mode .mail-sidebar-more-folders .mail-workspace-nav-item > span:not(.mail-nav-icon) {
  width: auto !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  white-space: nowrap !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal.mail-compose-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  display: grid !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  padding: 16px !important;
  place-items: center !important;
  background: rgba(32, 33, 36, .45) !important;
  overflow: auto !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal.mail-compose-modal.hidden {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-dialog {
  width: min(640px, calc(100vw - 32px)) !important;
  max-width: 640px !important;
  max-height: calc(100dvh - 32px) !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(32, 33, 36, .32) !important;
  overflow-y: auto !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal.is-create-mode .mail-parity-dialog {
  width: min(500px, calc(100vw - 32px)) !important;
  min-height: 356px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-dialog-head {
  display: flex !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  border: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-overview-kicker {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal #mail-label-dialog-title {
  margin: 0 !important;
  color: #202124 !important;
  font-size: 24px !important;
  font-weight: 400 !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal.is-create-mode #mail-label-modal-close {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-form {
  display: grid !important;
  gap: 12px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-form > label {
  display: grid !important;
  gap: 8px !important;
  color: #3c4043 !important;
  font-size: 14px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-name-field input,
html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-parent-field select {
  width: 100% !important;
  min-height: 56px !important;
  padding: 0 14px !important;
  border: 1px solid #9aa0a6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #202124 !important;
  font-size: 15px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-name-field input:focus {
  border: 2px solid #0b57d0 !important;
  outline: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-form > .mail-label-nest-toggle {
  display: flex !important;
  min-height: 32px !important;
  align-items: center !important;
  grid-template-columns: none !important;
  gap: 12px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-nest-toggle input {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-parent-field {
  color: transparent !important;
  font-size: 0 !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-label-parent-field select:disabled {
  background: #f8f9fa !important;
  color: #9aa0a6 !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal.is-create-mode .mail-label-color-field,
html body.mail-body.mail-simple-mode #mail-label-modal.is-create-mode #mail-label-list,
html body.mail-body.mail-simple-mode #mail-label-modal.is-create-mode #mail-label-status {
  display: none !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-form .actions {
  display: flex !important;
  margin-top: 10px !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal .mail-parity-form .actions button {
  min-width: 84px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  border-radius: 20px !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal #mail-label-reset {
  order: 1 !important;
  border: 0 !important;
  background: transparent !important;
  color: #0b57d0 !important;
  box-shadow: none !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal #mail-label-save {
  order: 2 !important;
  border: 0 !important;
  background: #0b57d0 !important;
  color: #fff !important;
}

html body.mail-body.mail-simple-mode #mail-label-modal #mail-label-save:disabled {
  background: #f1f3f4 !important;
  color: #9aa0a6 !important;
}

/* Gmail-style snooze picker replaces blocking browser prompts. */
.mail-snooze-choice-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 16px;
  place-items: center;
  background: rgba(32, 33, 36, .34);
}
.mail-snooze-choice-card {
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(32, 33, 36, .3);
}
.mail-snooze-choice-card > header {
  display: flex;
  min-height: 64px;
  padding: 0 16px 0 24px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8eaed;
}
.mail-snooze-choice-card h2 {
  margin: 0;
  color: #202124;
  font-size: 20px;
  font-weight: 400;
}
html body .mail-snooze-choice-card > header button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5f6368 !important;
  font-size: 22px;
  box-shadow: none !important;
}
html body .mail-snooze-choice-card > header button:hover { background: #f1f3f4 !important; }
.mail-snooze-presets { display: grid; padding: 8px 0; }
html body .mail-snooze-presets button,
html body .mail-snooze-custom-toggle {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 0 24px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #202124 !important;
  font-size: 14px;
  text-align: left;
  box-shadow: none !important;
}
html body .mail-snooze-presets button:hover,
html body .mail-snooze-custom-toggle:hover { background: #f1f3f4 !important; }
.mail-snooze-presets small { color: #5f6368; font-size: 12px; }
.mail-snooze-custom-toggle {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 12px;
  border-top: 1px solid #e8eaed;
}
.mail-snooze-custom-form {
  display: grid;
  gap: 16px;
  padding: 20px 24px 24px;
}
.mail-snooze-custom-form.hidden { display: none !important; }
.mail-snooze-custom-form label {
  display: grid;
  gap: 8px;
  color: #3c4043;
  font-size: 13px;
}
.mail-snooze-custom-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #9aa0a6;
  border-radius: 4px;
  background: #fff;
  color: #202124;
}
.mail-snooze-custom-form input:focus {
  border: 2px solid #0b57d0;
  outline: 0;
}
.mail-snooze-custom-form .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mail-snooze-custom-form .actions button {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 18px;
}
.mail-snooze-custom-form .status { margin: 0; color: #b3261e; font-size: 12px; }

/* Shortcut reference uses the same dense, scannable taxonomy as Gmail. */
html body.mail-body.mail-simple-mode #mail-shortcut-modal {
  padding: 16px !important;
  place-items: center !important;
  background: rgba(32, 33, 36, .42) !important;
}
html body.mail-body.mail-simple-mode #mail-shortcut-modal .mail-shortcut-dialog {
  width: min(980px, calc(100vw - 32px)) !important;
  max-height: min(720px, calc(100dvh - 32px)) !important;
  margin: 0 !important;
  padding: 24px !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(32, 33, 36, .32) !important;
}
html body.mail-body.mail-simple-mode #mail-shortcut-modal .mail-parity-dialog-head {
  display: flex !important;
  margin-bottom: 22px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
}
html body.mail-body.mail-simple-mode #mail-shortcut-modal h2 {
  color: #202124 !important;
  font-size: 22px !important;
  font-weight: 400 !important;
}
html body.mail-body.mail-simple-mode #mail-shortcut-modal #mail-shortcut-close {
  min-width: 72px !important;
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  color: #0b57d0 !important;
}
.mail-shortcut-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
}
.mail-shortcut-sections section { min-width: 0; }
.mail-shortcut-sections h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dadce0;
  color: #202124;
  font-size: 14px;
  font-weight: 600;
}
.mail-shortcut-sections .mail-shortcut-grid {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(0, 1fr);
  gap: 0;
}
.mail-shortcut-sections .mail-shortcut-grid dt,
.mail-shortcut-sections .mail-shortcut-grid dd {
  min-height: 38px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f4;
  color: #3c4043;
  font-size: 13px;
}
.mail-shortcut-sections .mail-shortcut-grid kbd {
  display: inline-block;
  min-width: 28px;
  padding: 2px 7px;
  border: 1px solid #bdc1c6;
  border-radius: 4px;
  background: #f8f9fa;
  color: #202124;
  font: 12px/18px Arial, sans-serif;
  text-align: center;
  box-shadow: 0 1px 0 #dadce0;
}

@media (max-width: 760px) {
  .mail-shortcut-sections { grid-template-columns: 1fr; gap: 24px; }
  html body.mail-body.mail-simple-mode #mail-shortcut-modal .mail-shortcut-dialog { padding: 18px !important; }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode .mail-search-shell::before {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-pane-stack {
    display: block !important;
  }

  html body.mail-body.mail-simple-mode[data-mail-pane="settings"] .mail-shell.is-settings-nav-companion {
    display: none !important;
  }

  html body.mail-body.mail-simple-mode[data-mail-pane="settings"] #mail-settings-panel {
    height: calc(100dvh - 64px) !important;
  }

  html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-card {
    padding-right: 8px !important;
    padding-left: 8px !important;
  }

  html body.mail-body.mail-simple-mode #mail-settings-panel #mail-settings-back-btn {
    display: inline-flex !important;
  }

  html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.mail-body.mail-simple-mode #mail-settings-panel fieldset.mail-settings-row > legend {
    float: none !important;
    width: auto !important;
  }

  html body.mail-body.mail-simple-mode #mail-settings-panel .mail-settings-style-preview {
    min-width: 0 !important;
    width: 100% !important;
  }

  html body.mail-body.mail-simple-mode:not(.mail-embedded) #mail-quick-settings.mail-quick-settings {
    top: 0 !important;
    right: 0 !important;
    width: min(320px, 100vw) !important;
    height: 100dvh !important;
  }

  html body.mail-body.mail-simple-mode[data-mail-pane="thread"] .mail-reader-shell.is-active {
    position: fixed !important;
    top: 64px !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  html body.mail-body.mail-simple-mode .mail-view-sticky-chrome > .mail-panel-header {
    padding: 0 14px !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-head {
    padding: 10px 12px 8px !important;
  }

  html body.mail-body.mail-simple-mode .mail-message-body {
    padding: 10px 14px 18px !important;
  }

  html body.mail-body.mail-simple-mode .mail-thread-actions {
    margin: 12px 14px 18px !important;
  }
}
