/* Gmail web, light theme, one email open. Scoped under .gm; the shared pieces at the top
   (icons, buttons, avatars) are used by the iPhone screen too.
   Layout numbers are CSS pixels at 100% browser zoom. */

.gm {
  --bg: #f6f8fc;
  --text: #1f1f1f;
  --icon: #444746;
  --meta: #5e5e5e;
  --sans: 'Google Sans', Roboto, Arial, sans-serif;
  --roboto: Roboto, Arial, sans-serif;

  position: relative;
  display: grid;
  grid-template: 64px minmax(0, 1fr) / 256px minmax(0, 1fr) 56px;
  width: 1440px;
  height: 900px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/20px var(--roboto);
  text-align: left;
  cursor: default;
}
.screen *, .screen *::before, .screen *::after { box-sizing: border-box; margin: 0; padding: 0; }
.screen ul { list-style: none; }

/* Icons are inline SVGs filled from public/icons.js */
.screen .ic { display: inline-flex; flex: none; width: 20px; height: 20px; color: var(--icon); }
.screen .ic24 { width: 24px; height: 24px; }
.screen .ic svg { width: 100%; height: 100%; fill: currentColor; }
.screen .flip svg { transform: scaleX(-1); }
.screen .btn { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.screen .btn.off .ic { opacity: .38; }

/* Letter avatar, like a Google account with no photo */
.screen .av {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden;
  background: #5c6bc0 center / cover no-repeat;
  color: #fff; font-family: var(--sans); font-weight: 400;
}
.screen .av.photo { color: transparent; }
.screen .av32 { width: 32px; height: 32px; font-size: 18px; }
.screen .av40 { width: 40px; height: 40px; font-size: 22px; }

/* Top bar */
.gm-hdr { grid-column: 1 / -1; display: flex; align-items: center; padding: 8px; }
.gm-hdr-left { display: flex; flex: 0 0 238px; align-items: center; }
.gm-hdr-left .btn { width: 48px; height: 48px; margin: 0 4px; }
.gm-logo { width: 109px; height: 40px; margin-left: 4px; }
.gm-search {
  display: flex; flex: 1 1 auto; align-items: center; max-width: 720px; height: 48px;
  padding: 0 4px; border-radius: 24px; background: #eaf1fb;
}
.gm-search .ph { flex: 1; margin-left: 4px; font: 16px/24px var(--sans); color: var(--icon); }
.gm-hdr-right { display: flex; align-items: center; gap: 4px; margin-left: auto; padding-left: 16px; }
.gm-acct { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; }

/* Left navigation */
.gm-nav { padding-right: 16px; overflow: hidden; }
.gm-compose { padding: 8px 0 16px 8px; }
.gm-compose span {
  display: inline-flex; align-items: center; height: 56px; padding: 0 24px 0 16px;
  border-radius: 16px; background: #c2e7ff; color: #001d35;
  font: 500 14px/20px var(--sans); letter-spacing: .25px;
}
.gm-compose .ic { margin-right: 12px; color: #001d35; }
.gm-nav li {
  display: flex; align-items: center; height: 32px; padding: 0 12px 0 26px;
  border-radius: 0 16px 16px 0;
  font: 14px/20px var(--sans); letter-spacing: .2px; color: #202124;
}
.gm-nav li .ic { margin-right: 18px; }
.gm-nav li b { margin-left: auto; font-size: 12px; font-weight: inherit; letter-spacing: .3px; }
.gm-nav li.bold { font-weight: 700; }
.gm-nav li.on { background: #d3e3fd; color: #001d35; font-weight: 700; }
.gm-nav li.on .ic { color: #001d35; }
.gm-labels {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; margin-top: 16px; padding-left: 16px;
  font: 500 16px/24px var(--sans); color: var(--text);
}

/* Main white panel */
.gm-main {
  display: flex; flex-direction: column; min-width: 0;
  margin: 0 0 16px 0; border-radius: 16px; background: #fff; overflow: hidden;
}
.gm-tb { display: flex; flex: 0 0 48px; align-items: center; padding: 0 8px; }
.gm-tb > .btn { margin: 0 2px; }
.gm-tb > .back { margin-right: 16px; }
.gm-tb .sep { flex: none; width: 1px; height: 20px; margin: 0 8px; background: #c4c7c5; }
.gm-pager { display: flex; align-items: center; margin-left: auto; font: 12px/16px var(--roboto); letter-spacing: .3px; color: var(--meta); }
.gm-pager span { margin-right: 8px; }

.gm-scroll { flex: 1; min-height: 0; overflow: hidden; }

.gm-subj { display: flex; align-items: flex-start; padding: 20px 16px 8px 72px; }
.gm-subj h2 { flex: 1; min-width: 0; font: 400 22px/28px var(--sans); color: var(--text); overflow-wrap: anywhere; }
.gm-chip {
  display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 2px 0 4px;
  border-radius: 4px; background: #ddd; color: #666;
  font: 12px/18px var(--roboto); vertical-align: 4px; letter-spacing: 0;
}
.gm-chip .ic { width: 14px; height: 14px; margin-left: 2px; color: #666; }
.gm-subj-tools { display: flex; margin: -6px 0 0 16px; }

.gm-msg { position: relative; padding: 16px 16px 0 72px; }
.gm-msg > .av { position: absolute; top: 16px; left: 16px; }
.gm-msg-hd { display: flex; align-items: center; height: 20px; }
.gm-from { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-name { font: 700 14px/20px var(--sans); letter-spacing: .2px; color: var(--text); }
.gm-addr { font: 12px/20px var(--roboto); letter-spacing: .3px; color: var(--meta); }
.gm-meta { display: flex; align-items: center; margin-left: 16px; font: 12px/20px var(--roboto); letter-spacing: .3px; color: var(--meta); white-space: nowrap; }
.gm-meta .when { margin-right: 4px; }
.gm-meta .btn { margin: -10px 0; }
.gm-to { display: flex; align-items: center; font: 12px/20px var(--roboto); letter-spacing: .3px; color: var(--meta); }
.gm-to .ic { color: var(--meta); }

/* Gmail renders message bodies as `small/1.5 Arial` (13px) in #222 */
.gm-body {
  margin-top: 16px; padding: 0 56px 20px 0;
  font: 13px/1.5 Arial, Helvetica, sans-serif; color: #222;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.gm-body a { color: #1155cc; text-decoration: underline; }

.gm-reply { display: flex; gap: 12px; padding: 16px 0 24px 72px; }
.gm-pill {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px 0 12px;
  border: 1px solid #747775; border-radius: 18px;
  font: 500 14px/20px var(--sans); letter-spacing: .25px; color: var(--icon);
}
.gm-pill .ic { margin-right: 8px; }
.gm-pill.round { width: 36px; padding: 0; justify-content: center; }
.gm-pill.round .ic { margin: 0; }

.gm-foot {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 16px 16px 24px;
  font: 12px/16px var(--roboto); letter-spacing: .3px; color: var(--meta);
}
.gm-foot .act { text-align: right; }

/* Right-hand app strip: Calendar, Keep, Tasks, Contacts, Get add-ons */
.gm-side { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 8px; }
.gm-side img { width: 20px; height: 20px; }
.gm-side .div { width: 20px; height: 1px; background: #c4c7c5; }
.gm-side .hide { margin: auto 0 16px; }
