:root {
  color-scheme: dark;
  --bg: #080a0d;
  --bg-deep: #050608;
  --panel: #0c0f13;
  --panel-raised: #11151a;
  --panel-soft: #151a20;
  --line: #202731;
  --line-strong: #303945;
  --text: #f4f6f8;
  --text-soft: #cad1d9;
  --muted: #7f8a97;
  --faint: #525c67;
  --blue: #60a5fa;
  --blue-strong: #3182f6;
  --violet: #a78bfa;
  --green: #4ade80;
  --red: #fb7185;
  --amber: #fbbf24;
  --sidebar: 244px;
  --list: 410px;
  --topbar: 68px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 6%, rgb(58 86 135 / 12%), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

kbd {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgb(255 255 255 / 3%);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1;
  padding: 4px 6px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  height: 100vh;
  min-height: 620px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(300px, 620px) 1fr;
  align-items: center;
  height: var(--topbar);
  border-bottom: 1px solid var(--line);
  background: rgb(8 10 13 / 88%);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-left: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark,
.auth-brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #4a5564;
  border-radius: 50%;
}

.brand-mark::before,
.auth-brand-mark::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 18px rgb(96 165 250 / 80%);
  content: "";
}

.brand-mark span,
.auth-brand-mark span {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--bg);
  border-radius: 50%;
  background: var(--violet);
}

.brand-name {
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.brand-product {
  margin-left: -3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.beta-pill {
  border: 1px solid #2f3844;
  border-radius: 999px;
  color: #8793a1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.11em;
  padding: 4px 7px;
  white-space: nowrap;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(100%, 620px);
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1216;
  transition: border-color 160ms ease, background 160ms ease;
}

.global-search:focus-within {
  border-color: #3b70ac;
  background: #11161c;
}

.global-search svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-soft);
}

.global-search input::placeholder {
  color: #636d79;
}

.account-area {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 22px;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 11px rgb(251 191 36 / 45%);
}

.connection-dot.online {
  background: var(--green);
  box-shadow: 0 0 11px rgb(74 222 128 / 45%);
}

.connection-label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  padding: 5px 7px;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

.account-button:hover {
  background: rgb(255 255 255 / 4%);
}

.avatar,
.sender-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #35404c;
  border-radius: 9px;
  background: linear-gradient(145deg, #1c2631, #11161c);
  color: #dce5ef;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.account-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.account-copy small {
  color: var(--faint);
  font-size: 9px;
}

.account-button > svg {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  height: calc(100vh - var(--topbar));
  min-height: calc(620px - var(--topbar));
}

.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgb(255 255 255 / 1%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 1%) 1px, transparent 1px),
    #090c10;
  background-size: 28px 28px;
}

.compose-button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d6dbe1;
  border-radius: 10px;
  background: #eef1f4;
  color: #090b0e;
  font-weight: 710;
  transition: transform 160ms var(--ease), box-shadow 160ms ease, background 160ms ease;
}

.compose-button:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 22%);
}

.compose-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.compose-button span {
  flex: 1;
  text-align: left;
}

.compose-button kbd {
  border-color: #c6ccd3;
  background: #dfe4e9;
  color: #68717b;
}

.mail-nav {
  margin-top: 24px;
}

.nav-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.nav-label {
  padding: 0 11px 8px;
  color: #58626e;
}

.nav-label-spaced {
  margin-top: 22px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 39px;
  margin: 2px 0;
  padding: 0 11px;
  border-radius: 8px;
  background: transparent;
  color: #7f8995;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.nav-item::before {
  position: absolute;
  left: -14px;
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.nav-item:hover {
  background: rgb(255 255 255 / 3.5%);
  color: var(--text-soft);
}

.nav-item.active {
  background: linear-gradient(90deg, rgb(66 132 211 / 14%), rgb(66 132 211 / 4%));
  color: #dce9f9;
}

.nav-item.active::before {
  background: var(--blue);
  box-shadow: 0 0 12px rgb(96 165 250 / 80%);
}

.nav-item svg {
  width: 17px;
  height: 17px;
}

.nav-item span {
  flex: 1;
  font-size: 12px;
}

.nav-item b {
  min-width: 19px;
  border-radius: 999px;
  background: #18212b;
  color: #8fb8e8;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line);
}

.storage-row {
  display: flex;
  justify-content: space-between;
  color: #68727e;
  font-size: 9px;
}

.storage-track {
  height: 2px;
  margin: 9px 0 14px;
  overflow: hidden;
  border-radius: 2px;
  background: #1e252d;
}

.storage-track span {
  display: block;
  width: 31%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: width 300ms var(--ease);
}

.sidebar-settings {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 0;
  background: transparent;
  color: #69737e;
  font-size: 10px;
  text-align: left;
}

.sidebar-settings:hover {
  color: var(--text-soft);
}

.sidebar-settings svg {
  width: 14px;
  height: 14px;
}

.mail-main {
  display: grid;
  grid-template-columns: var(--list) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.message-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #0b0e12;
}

.column-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 98px;
  padding: 24px 20px 17px;
  border-bottom: 1px solid var(--line);
}

.column-header h1 {
  margin: 5px 0 0;
  font-size: 25px;
  font-weight: 590;
  letter-spacing: -0.04em;
}

.header-actions,
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7c8794;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: rgb(255 255 255 / 3%);
  color: var(--text-soft);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.list-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 20px;
  border-bottom: 1px solid #181e25;
  background: #0a0d11;
  color: #636e7b;
  font-size: 9px;
}

.list-status > span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.list-status > span span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-status i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.list-status.online i {
  background: var(--green);
}

.list-status button {
  background: transparent;
  color: var(--blue);
  font-size: 9px;
}

.message-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #252d36 transparent;
  scrollbar-width: thin;
}

.message-item {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  column-gap: 11px;
  min-height: 104px;
  width: 100%;
  padding: 15px 17px 14px 19px;
  border-bottom: 1px solid #191f26;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 140ms ease;
}

.message-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: transparent;
  content: "";
}

.message-item:hover {
  background: #0f1318;
}

.message-item.selected {
  background: linear-gradient(90deg, rgb(73 137 214 / 10%), #10151a 70%);
}

.message-item.selected::before {
  background: var(--blue);
  box-shadow: 0 0 12px rgb(96 165 250 / 65%);
}

.message-item.unread {
  background-color: #0e1217;
}

.message-avatar {
  display: grid;
  place-items: center;
  grid-row: 1 / span 3;
  width: 35px;
  height: 35px;
  border: 1px solid #2b343f;
  border-radius: 9px;
  background: var(--avatar-bg, #18212b);
  color: var(--avatar-color, #a9c3df);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.message-sender {
  align-self: center;
  overflow: hidden;
  color: #c6ced7;
  font-size: 11px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item.unread .message-sender,
.message-item.unread .message-subject {
  color: #eef3f8;
  font-weight: 720;
}

.message-time {
  align-self: center;
  color: #58636f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.message-subject,
.message-snippet {
  grid-column: 2 / 4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-subject {
  margin-top: 8px;
  color: #aeb7c1;
  font-size: 11px;
  font-weight: 560;
}

.message-snippet {
  margin-top: 5px;
  color: #5d6874;
  font-size: 10px;
}

.message-flags {
  position: absolute;
  right: 15px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-icon {
  width: 12px;
  height: 12px;
  color: #4e5965;
}

.mini-icon.starred {
  fill: var(--amber);
  stroke: var(--amber);
}

.message-empty,
.message-loading {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.message-empty strong,
.message-loading strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 13px;
}

.message-empty p,
.message-loading p {
  max-width: 240px;
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.pulse-loader {
  display: flex;
  gap: 5px;
  margin: 0 auto 15px;
}

.pulse-loader i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 900ms ease-in-out infinite;
}

.pulse-loader i:nth-child(2) { animation-delay: 120ms; }
.pulse-loader i:nth-child(3) { animation-delay: 240ms; }

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.load-more {
  height: 38px;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: #0d1115;
  color: var(--blue);
  font-size: 10px;
}

.reader-column {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 87% 4%, rgb(80 89 145 / 9%), transparent 32%),
    #090c10;
}

.reader-empty {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  padding: 44px;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 25px;
  border: 1px solid #252d36;
  border-radius: 50%;
}

.empty-orbit::before,
.empty-orbit::after {
  position: absolute;
  border: 1px solid #1a2027;
  border-radius: 50%;
  content: "";
}

.empty-orbit::before { width: 92px; height: 92px; }
.empty-orbit::after { width: 122px; height: 122px; opacity: 0.6; }

.empty-orbit i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 22px rgb(96 165 250 / 65%);
}

.reader-empty h2 {
  margin: 9px 0 8px;
  font-size: 24px;
  font-weight: 520;
  letter-spacing: -0.04em;
}

.reader-empty > p:not(.eyebrow) {
  margin: 0;
  color: #626d79;
  font-size: 11px;
}

.shortcut-row {
  display: flex;
  gap: 18px;
  margin-top: 30px;
  color: #4f5964;
  font-size: 9px;
}

.shortcut-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reader {
  height: 100%;
  overflow-y: auto;
  scrollbar-color: #252d36 transparent;
  scrollbar-width: thin;
}

.reader-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 54px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgb(9 12 16 / 88%);
  backdrop-filter: blur(12px);
}

.reader-content {
  width: min(100%, 830px);
  margin: 0 auto;
  padding: 42px clamp(28px, 5vw, 72px) 70px;
}

.reader-heading h2 {
  max-width: 700px;
  margin: 12px 0 28px;
  color: #f0f3f6;
  font-size: clamp(26px, 3vw, 41px);
  font-weight: 510;
  letter-spacing: -0.048em;
  line-height: 1.08;
}

.sender-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sender-avatar {
  width: 38px;
  height: 38px;
}

.sender-meta {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
}

.sender-meta strong {
  color: #d7dde4;
  font-size: 11px;
}

.sender-meta span,
.sender-meta small {
  overflow: hidden;
  color: #697480;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-meta small {
  grid-column: 1 / 3;
}

.sender-card time {
  color: #5d6773;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  text-align: right;
}

.message-body {
  min-height: 160px;
  padding: 34px 0 18px;
  color: #b9c1ca;
  font-size: 13px;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
  padding: 12px 0 20px;
}

.attachment-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1116;
  color: var(--text-soft);
  text-align: left;
}

.attachment-button:hover {
  border-color: #344151;
  background: #11171d;
}

.attachment-button > svg {
  width: 19px;
  height: 19px;
  margin: auto;
  color: var(--blue);
}

.attachment-button span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.attachment-button strong,
.attachment-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-button strong { font-size: 9px; }
.attachment-button small { color: var(--muted); font-size: 8px; }

.reader-reply-row {
  display: flex;
  gap: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.reply-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 110px;
  height: 36px;
  border: 1px solid #35404c;
  border-radius: 8px;
  background: #11161c;
  color: #c8d0d8;
  font-size: 10px;
}

.reply-button:hover {
  border-color: #496078;
  background: #151c23;
}

.reply-button svg {
  width: 15px;
  height: 15px;
}

.auth-gate,
.compose-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(2 4 7 / 73%);
  backdrop-filter: blur(14px);
}

.auth-backdrop-grid {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgb(255 255 255 / 2.8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2.8%) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 66%);
}

.auth-card {
  position: relative;
  width: min(100%, 480px);
  padding: 44px 46px 36px;
  border: 1px solid #2a333e;
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 0, rgb(83 104 171 / 12%), transparent 36%),
    linear-gradient(145deg, #11161b, #0a0d11 66%);
  box-shadow: 0 40px 100px rgb(0 0 0 / 48%);
  animation: enter-card 400ms var(--ease) both;
}

@keyframes enter-card {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  color: #5d6874;
}

.auth-close:hover { background: rgb(255 255 255 / 4%); color: var(--text); }
.auth-close svg { width: 15px; height: 15px; }

.auth-brand-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 30px;
}

.auth-brand-mark::before {
  width: 10px;
  height: 10px;
}

.auth-brand-mark span {
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
}

.auth-card h2 {
  max-width: 360px;
  margin: 10px 0 13px;
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.auth-intro {
  margin: 0;
  color: #8b96a2;
  font-size: 11px;
  line-height: 1.7;
}

.auth-intro strong { color: #c7d0d9; font-weight: 600; }

.auth-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-features div {
  min-width: 0;
}

.auth-features span {
  display: block;
  margin-bottom: 9px;
  color: var(--violet);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.auth-features p {
  margin: 0;
  color: #65707c;
  font-size: 8px;
  line-height: 1.55;
}

.auth-features strong {
  display: block;
  margin-bottom: 3px;
  color: #b7c0ca;
  font-size: 9px;
}

.google-connect {
  display: grid;
  grid-template-columns: 27px 1fr 16px;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d8dee5;
  border-radius: 10px;
  background: #eff2f5;
  color: #0b0d10;
  font-size: 11px;
  font-weight: 680;
  text-align: left;
}

.google-connect:hover { background: #fff; }
.google-connect svg { width: 14px; height: 14px; transform: rotate(-90deg); }

.google-g {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #ccd2d8;
  border-radius: 50%;
  color: #346ed4;
  font-size: 12px;
  font-weight: 800;
}

.demo-link {
  display: block;
  width: 100%;
  margin-top: 11px;
  padding: 8px;
  background: transparent;
  color: #789cc5;
  font-size: 9px;
}

.demo-link:hover { color: var(--blue); }

.auth-footnote {
  margin: 16px 0 0;
  color: #4e5863;
  font-size: 8px;
  line-height: 1.55;
  text-align: center;
}

.compose-overlay {
  justify-items: end;
  padding: 20px;
}

.compose-modal {
  width: min(100%, 620px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #2a333e;
  border-radius: 16px;
  background: #0d1115;
  box-shadow: 0 32px 100px rgb(0 0 0 / 52%);
  animation: compose-in 320ms var(--ease) both;
}

@keyframes compose-in {
  from { opacity: 0; transform: translateX(18px) scale(0.99); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.compose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #10151a;
}

.compose-header h2 {
  margin: 3px 0 0;
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -0.035em;
}

#composeForm {
  position: relative;
  padding: 12px 22px 20px;
}

.compose-field {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 45px;
  border-bottom: 1px solid var(--line);
}

.compose-field > span {
  color: #6f7a86;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.compose-field input,
.compose-field select,
#composeBody {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.compose-field input,
.compose-field select {
  height: 43px;
  color: #cbd3dc;
  font-size: 11px;
}

.compose-field input::placeholder,
#composeBody::placeholder { color: #4c5662; }

.compose-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64707c 50%), linear-gradient(135deg, #64707c 50%, transparent 50%);
  background-position: calc(100% - 14px) 18px, calc(100% - 10px) 18px;
  background-repeat: no-repeat;
  background-size: 4px 4px, 4px 4px;
}

.cc-toggle {
  position: absolute;
  top: 69px;
  right: 24px;
  padding: 5px;
  background: transparent;
  color: #5f7896;
  font-size: 8px;
}

.cc-toggle:hover { color: var(--blue); }

#composeBody {
  min-height: 270px;
  resize: vertical;
  padding: 24px 2px;
  color: #bdc6cf;
  font-size: 12px;
  line-height: 1.7;
}

.compose-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 12px;
}

.compose-file-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11161c;
  color: #8c97a3;
  font-size: 8px;
}

.compose-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-file-chip button {
  margin-left: auto;
  padding: 0;
  background: transparent;
  color: var(--faint);
}

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.compose-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #56616c;
  font-size: 8px;
}

.file-picker input { display: none; }

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 142px;
  height: 39px;
  border-radius: 8px;
  background: #e9edf1;
  color: #0a0c0f;
  font-size: 10px;
  font-weight: 730;
}

.send-button:hover { background: #fff; }
.send-button:disabled { cursor: wait; opacity: 0.55; }
.send-button svg { width: 15px; height: 15px; }

.account-menu {
  position: fixed;
  z-index: 90;
  top: 59px;
  right: 21px;
  display: grid;
  min-width: 176px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #11161b;
  box-shadow: 0 18px 50px rgb(0 0 0 / 35%);
}

.account-menu button {
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  color: #8994a0;
  font-size: 9px;
  text-align: left;
}

.account-menu button:hover { background: rgb(255 255 255 / 4%); color: var(--text); }

.toast-region {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 260px;
  max-width: 380px;
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid #2c3641;
  border-radius: 9px;
  background: #12181e;
  box-shadow: 0 16px 40px rgb(0 0 0 / 35%);
  color: #aeb8c2;
  font-size: 9px;
  animation: toast-in 260ms var(--ease) both;
}

.toast::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.toast.error::before { background: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-only { display: none; }

@media (max-width: 1120px) {
  :root { --sidebar: 218px; --list: 370px; }
  .connection-label { display: none; }
  .account-copy { display: none; }
  .account-button { padding: 3px; }
  .reader-content { padding-inline: 38px; }
}

@media (max-width: 860px) {
  :root { --sidebar: 220px; --list: min(42vw, 390px); }

  .topbar {
    grid-template-columns: auto minmax(180px, 1fr) auto;
  }

  .brand-lockup { padding-left: 14px; }
  .beta-pill, .brand-product { display: none; }
  .global-search { width: 100%; }
  .account-area { padding: 0 14px; }
  .connection-dot { display: none; }
  .mobile-only { display: grid; }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: var(--topbar);
    bottom: 0;
    left: 0;
    width: var(--sidebar);
    transform: translateX(-102%);
    box-shadow: 20px 0 60px rgb(0 0 0 / 45%);
    transition: transform 240ms var(--ease);
  }

  .sidebar.open { transform: translateX(0); }
  .mail-main { grid-template-columns: var(--list) minmax(0, 1fr); }
}

@media (max-width: 670px) {
  :root { --topbar: 60px; }
  .app-shell { min-height: 540px; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .global-search { display: none; }
  .brand-name { font-size: 12px; }
  .account-area { grid-column: 3; }
  .mail-main { grid-template-columns: 1fr; }
  .message-column { border-right: 0; }
  .reader-column {
    position: fixed;
    z-index: 45;
    top: var(--topbar);
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(102%);
    transition: transform 260ms var(--ease);
  }
  .reader-column.mobile-open { transform: translateX(0); }
  .reader-toolbar::before {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-right: auto;
    color: var(--muted);
    content: "←";
    cursor: pointer;
  }
  .reader-content { padding: 30px 22px 60px; }
  .reader-heading h2 { font-size: 28px; }
  .auth-card { padding: 38px 28px 30px; }
  .auth-card h2 { font-size: 31px; }
  .auth-features { grid-template-columns: 1fr; gap: 11px; }
  .auth-features div { display: grid; grid-template-columns: 24px 1fr; }
  .auth-features span { margin: 2px 0 0; }
  .compose-overlay { padding: 0; }
  .compose-modal { width: 100%; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  #composeForm { padding-inline: 16px; }
  .compose-header { padding-inline: 16px; }
  .compose-footer { align-items: flex-end; }
  #composeHint { display: none; }
  .toast-region { right: 12px; bottom: 12px; left: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
