:root {
  --bg: #f8f0e8;
  --paper: #fffdf8;
  --panel: rgba(255, 253, 248, 0.88);
  --line: #e5d5c7;
  --text: #1f2530;
  --muted: #6f6a66;
  --accent: #d7653c;
  --accent-deep: #8f3e25;
  --accent-soft: #ffd8be;
  --teal: #2f8f83;
  --gold: #d8a022;
  --danger: #cc4029;
  --shadow: 0 22px 55px rgba(83, 47, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(215, 101, 60, 0.14), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(47, 143, 131, 0.16), transparent 28%),
    linear-gradient(180deg, #fff7ee 0%, #f8f0e8 100%);
  color: var(--text);
  font-family: Manrope, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.brand,
.landing-nav,
.landing-actions,
.topbar-actions,
.toolbar-left,
.compose-tools,
.hero-actions,
.reader-tools,
.delivery-grid {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-family: Space Grotesk, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(215, 101, 60, 0.28);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-button svg,
.folder svg,
.compose-button svg,
.search-box svg,
.send-button svg,
.primary-button svg,
.ghost-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.marketing-shell,
.auth-screen {
  min-height: 100vh;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  backdrop-filter: blur(18px);
  background: rgba(255, 247, 238, 0.74);
  border-bottom: 1px solid rgba(229, 213, 199, 0.75);
}

.landing-nav {
  justify-content: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 700;
}

.landing-actions {
  justify-content: flex-end;
  gap: 12px;
}

.primary-button,
.ghost-button,
.send-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
}

.primary-button,
.send-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 28px rgba(215, 101, 60, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--line);
}

.linkish {
  text-decoration: none;
}

.hero-band,
.subscriptions-band,
.delivery-band {
  display: grid;
  gap: 28px;
  padding: 56px 28px;
}

.hero-band {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  min-height: calc(100vh - 86px);
}

.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-family: Space Grotesk, sans-serif;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.96;
}

.hero-text {
  max-width: 56ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.hero-stats article,
.info-band article,
.delivery-card,
.plan-card {
  border: 1px solid rgba(229, 213, 199, 0.95);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.hero-stats article {
  padding: 18px;
}

.hero-stats strong,
.delivery-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.hero-stats span,
.delivery-card p,
.plan-card p,
.info-band p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-preview {
  display: grid;
  place-items: center;
}

.preview-window {
  width: min(100%, 520px);
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(31, 37, 48, 0.08);
  box-shadow: 0 34px 70px rgba(78, 46, 30, 0.18);
  transform: rotate(2deg);
}

.preview-header {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid #f0e2d6;
}

.preview-header span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #efd5c0;
}

.preview-body {
  display: grid;
  grid-template-columns: 154px 1fr;
  min-height: 430px;
}

.preview-body aside {
  padding: 16px;
  background: #fff6ef;
  border-right: 1px solid #f0e2d6;
}

.mini-compose,
.mini-pill {
  border-radius: 999px;
  border: 0;
  font-weight: 800;
}

.mini-compose {
  width: 100%;
  min-height: 42px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.mini-folder {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.mini-folder.active {
  background: white;
  color: var(--text);
}

.preview-body section {
  padding: 18px;
}

.mini-toolbar {
  display: flex;
  gap: 8px;
}

.mini-pill {
  min-height: 34px;
  padding: 0 14px;
  background: #f8eee5;
  color: var(--muted);
}

.mini-mail {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fffaf5;
  border: 1px solid #f0e2d6;
}

.mini-mail.active {
  background: #fff;
}

.mini-mail strong {
  display: block;
  margin-bottom: 6px;
}

.mini-mail p {
  margin: 0;
  color: var(--muted);
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 28px 24px;
}

.info-band article {
  padding: 22px;
}

.info-band i {
  color: var(--accent);
}

.info-band h2,
.section-heading h2,
.settings-header h2 {
  margin: 16px 0 10px;
  font-family: Space Grotesk, sans-serif;
}

.section-heading h2 {
  margin-top: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.06;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  padding: 24px;
}

.plan-card.featured {
  background: linear-gradient(180deg, #fff8f1 0%, #fff1e4 100%);
  transform: translateY(-6px);
}

.plan-tier {
  margin: 0;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 12px 0 8px;
  font-family: Space Grotesk, sans-serif;
  font-size: 30px;
}

.plan-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.delivery-grid {
  gap: 18px;
}

.delivery-card {
  flex: 1;
  padding: 24px;
}

.auth-screen {
  display: grid;
  place-items: center;
  padding: 24px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(47, 143, 131, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 75%, rgba(215, 101, 60, 0.35) 0%, transparent 48%),
    radial-gradient(ellipse at 60% 10%, rgba(143, 62, 37, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 85%, rgba(26, 60, 90, 0.4) 0%, transparent 45%),
    linear-gradient(135deg, #0f1c2e 0%, #1a2d42 35%, #0e2230 65%, #12191f 100%);
  position: relative;
  overflow: hidden;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}

.auth-screen::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 101, 60, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.auth-frame {
  width: 100%;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 32px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 253, 250, 0.97);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  position: relative;
  z-index: 2;
}

.settings-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(229, 213, 199, 0.95);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
}

.auth-shell-copy {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.8);
}

.auth-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-copy {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.stepper,
.step-actions,
.name-grid,
.chooser-row,
.mail-suggestions {
  display: flex;
}

.signup-steps {
  display: grid;
  gap: 14px;
}

.stepper {
  gap: 10px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(31, 37, 48, 0.18);
}

.step-dot.active {
  background: var(--accent);
}

.signup-step {
  display: grid;
  gap: 12px;
  padding: 4px 0;
}

.name-grid,
.chooser-row,
.step-actions {
  gap: 12px;
}

.name-grid input,
.chooser-row input,
.chooser-row select {
  flex: 1;
}

.chooser-copy,
.selected-email {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.availability-note {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.availability-note.ok {
  color: var(--teal);
}

.availability-note.error {
  color: var(--danger);
}

.mail-suggestions {
  flex-wrap: wrap;
  gap: 10px;
}

.suggestion-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.suggestion-chip.active {
  border-color: rgba(215, 101, 60, 0.45);
  background: rgba(215, 101, 60, 0.1);
  color: var(--accent-deep);
}

.chooser-button {
  width: fit-content;
}

.step-actions {
  justify-content: flex-end;
  align-items: center;
  padding-top: 2px;
}

#signupPrev {
  min-width: 90px;
}

#signupNext {
  flex: 1;
}

.auth-card input,
.compose-panel input,
.compose-panel textarea,
.settings-form input,
.settings-form select,
.search-box input {
  outline: 0;
}

.auth-card input,
.settings-form input,
.settings-form select {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: white;
}

.auth-card input:focus,
.settings-form input:focus,
.settings-form select:focus,
.search-box:focus-within,
.compose-panel input:focus,
.compose-panel textarea:focus {
  border-color: rgba(215, 101, 60, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 101, 60, 0.12);
}

.form-error,
.settings-status {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.auth-submit,
.settings-save {
  width: 100%;
}

.auth-back {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.auth-back:hover {
  color: var(--text);
  background: white;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  padding: 0 14px;
  background: rgba(255, 253, 248, 0.98);
  position: relative;
  z-index: 1;
}

.link-button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  font-size: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.link-button:hover {
  background: rgba(215, 101, 60, 0.08);
}

.signin-fields {
  display: grid;
  gap: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  grid-template-rows: 76px minmax(0, calc(100vh - 76px));
  min-height: 100vh;
  background: rgba(255, 253, 248, 0.52);
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 220px minmax(220px, 720px) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.9);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.search-box {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

.topbar-actions,
.toolbar-left,
.compose-tools {
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5e605e;
}

.icon-button:hover {
  background: rgba(215, 101, 60, 0.08);
}

.profile-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #233543;
  color: white;
  font-weight: 800;
}

.mobile-menu {
  display: none;
}

.sidebar {
  padding: 18px 12px;
  border-right: 1px solid rgba(229, 213, 199, 0.9);
  background: rgba(255, 247, 238, 0.6);
  overflow-y: auto;
}

.compose-button {
  width: 168px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
  box-shadow: 0 12px 20px rgba(215, 101, 60, 0.15);
}

.folder-list {
  display: grid;
  gap: 4px;
  margin-top: 22px;
}

.folder {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: #454b4b;
  text-align: left;
}

.folder span {
  display: flex;
  align-items: center;
  gap: 14px;
}

.folder.active,
.folder:hover {
  background: rgba(215, 101, 60, 0.1);
  color: var(--accent-deep);
}

.storage {
  margin: 28px 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.storage-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 37, 48, 0.08);
}

.meter span {
  display: block;
  width: 1%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.provider-chip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}

.mail-area {
  display: grid;
  grid-template-columns: minmax(360px, 43%) minmax(0, 1fr);
  min-height: 0;
}

.list-pane,
.reader-pane {
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.7);
}

.list-pane {
  border-right: 1px solid rgba(229, 213, 199, 0.9);
}

.mail-toolbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.9);
}

.toolbar-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tab {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab.active,
.tab:hover {
  background: rgba(215, 101, 60, 0.1);
  color: var(--accent-deep);
}

.message-list {
  height: calc(100% - 58px);
  overflow-y: auto;
}

.message-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 92px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.72);
  background: rgba(255, 255, 255, 0.82);
}

.message-row:hover,
.message-row.active {
  background: rgba(255, 248, 240, 0.96);
}

.message-row.unread {
  background: #fffdf9;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  background: #3f6f8f;
}

.message-main {
  min-width: 0;
}

.message-sender,
.message-subject,
.reader-sender strong {
  font-weight: 800;
}

.message-row.unread .message-sender,
.message-row.unread .message-subject {
  color: #13202e;
}

.thread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.12);
  color: #1a73e8;
  font-size: 12px;
  font-weight: 800;
}

.message-subject {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-preview {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.message-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.star-button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a6a39f;
}

.star-button.starred {
  color: var(--gold);
}

.reader-pane {
  overflow-y: auto;
}

.reader-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.reader-empty svg {
  width: 62px;
  height: 62px;
  color: #c9b8ab;
}

.reader-empty h1 {
  margin: 0;
  color: var(--text);
  font-family: Space Grotesk, sans-serif;
  font-size: 24px;
}

.reader-content {
  padding: 26px 34px 44px;
}

.thread-stack {
  display: grid;
  gap: 18px;
}

.thread-message {
  padding: 18px;
  border: 1px solid rgba(229, 213, 199, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.thread-message.thread-unread {
  border-color: rgba(26, 115, 232, 0.22);
  box-shadow: inset 3px 0 0 #1a73e8;
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.reader-tools {
  gap: 6px;
}

.reader-content h1 {
  margin: 0 0 22px;
  font-family: Space Grotesk, sans-serif;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.1;
}

.reader-sender {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.95);
}

.reader-sender p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reader-body {
  max-width: 760px;
  margin-top: 26px;
  color: #283241;
  font-size: 16px;
  line-height: 1.72;
}

.attachment-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf4;
  font-weight: 700;
}

.attachment i {
  color: var(--accent);
}

.compose-panel {
  position: fixed;
  right: 28px;
  bottom: 0;
  z-index: 50;
  width: min(560px, calc(100vw - 28px));
  min-height: 520px;
  display: none;
  grid-template-rows: 48px 44px 44px minmax(220px, 1fr) 58px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 213, 199, 0.95);
}

.compose-panel.open {
  display: grid;
}

.compose-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 18px;
  background: #25343f;
  color: white;
}

.compose-panel header .icon-button {
  color: white;
}

.compose-reply-badge {
  margin-left: auto;
  margin-right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.compose-panel input,
.compose-panel textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(229, 213, 199, 0.95);
  padding: 0 18px;
  background: transparent;
}

.compose-panel textarea {
  resize: none;
  padding-top: 16px;
}

.compose-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.compose-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(229, 213, 199, 0.95);
}

.compose-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff5eb;
  border: 1px solid rgba(229, 213, 199, 0.95);
  font-size: 13px;
  font-weight: 700;
}

.mini-remove {
  width: 24px;
  height: 24px;
}

.send-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.overlay {
  display: none;
}

.overlay.show {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: block;
  background: rgba(27, 28, 30, 0.34);
  backdrop-filter: blur(4px);
}

.settings-panel,
.subscriptions-panel,
.account-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
}

.settings-panel,
.subscriptions-panel {
  display: grid;
  place-items: center;
}

.account-panel {
  display: block;
  pointer-events: none;
}

.account-card {
  width: min(360px, calc(100vw - 24px));
  margin-left: auto;
  margin-top: 74px;
  padding: 18px;
  border: 1px solid rgba(229, 213, 199, 0.95);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.account-hero,
.settings-profile-mark,
.account-actions,
.account-summary {
  display: flex;
  align-items: center;
}

.account-hero,
.settings-profile-mark {
  gap: 14px;
}

.account-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #233543;
  color: white;
  font-size: 24px;
  font-weight: 800;
}

.account-hero p,
.settings-profile-mark p {
  margin: 4px 0 0;
  color: var(--muted);
}

.account-actions {
  gap: 10px;
  margin-top: 18px;
}

.account-actions .ghost-button {
  flex: 1;
}

.account-summary {
  gap: 12px;
  margin-top: 16px;
}

.account-summary article {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.account-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.account-signout {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border: 1px solid rgba(204, 64, 41, 0.18);
  border-radius: 16px;
  background: rgba(204, 64, 41, 0.08);
  color: var(--danger);
  font-weight: 800;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.account-settings-card {
  width: min(760px, 100%);
}

.settings-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(229, 213, 199, 0.95);
  border-radius: 20px;
  background: #fffaf4;
}

.settings-avatar {
  width: 52px;
  height: 52px;
  font-size: 22px;
}

.settings-profile-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(215, 101, 60, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.inline-action {
  width: fit-content;
}

.settings-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(229, 213, 199, 0.95);
  border-radius: 20px;
  background: white;
}

.settings-block-head strong {
  display: block;
}

.settings-block-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.settings-form span {
  font-size: 14px;
}

.settings-status.ok {
  color: var(--teal);
}

.subscription-summary {
  display: grid;
  gap: 12px;
}

.summary-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.summary-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.compact-buy {
  min-height: 38px;
  padding: 0 14px;
}

.compact-buy:disabled {
  cursor: default;
  opacity: 0.6;
}

.admin-summary {
  display: grid;
  gap: 12px;
}

.summary-box strong {
  display: block;
  margin-bottom: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  display: none;
  padding: 13px 16px;
  border-radius: 16px;
  background: #25343f;
  color: white;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.show {
  display: block;
}

.toast[data-tone="success"] {
  background: #1d6d62;
}

.toast[data-tone="error"] {
  background: var(--danger);
}

@media (max-width: 1100px) {
  .hero-band,
  .info-band,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 13ch;
  }

  .hero-preview {
    padding-top: 12px;
  }
}

@media (max-width: 980px) {
  .landing-topbar {
    grid-template-columns: auto auto;
    gap: 14px;
  }

  .landing-nav {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 10px 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .search-box {
    min-width: 0;
  }

  .sidebar {
    position: fixed;
    inset: 76px auto 0 0;
    z-index: 40;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
    background: #fff7ee;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mail-area {
    grid-template-columns: 1fr;
  }

  .reader-pane {
    display: none;
  }

  .reader-pane.open {
    position: fixed;
    inset: 76px 0 0;
    z-index: 30;
    display: block;
    background: var(--paper);
  }
}

@media (max-width: 700px) {
  .hero-band,
  .subscriptions-band,
  .delivery-band,
  .landing-topbar,
  .info-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-band {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(40px, 15vw, 58px);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-body aside {
    border-right: 0;
    border-bottom: 1px solid #f0e2d6;
  }

  .topbar {
    grid-template-columns: auto auto 1fr;
    gap: 8px;
  }

  .topbar-actions .icon-button {
    display: none;
  }

  .mail-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toolbar-tabs,
  .toolbar-left {
    justify-content: space-between;
  }

  .tab {
    flex: 1;
    padding: 0 8px;
  }

  .message-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .message-meta {
    display: none;
  }

  .reader-content {
    padding: 18px 18px 36px;
  }

  .compose-panel {
    right: 0;
    width: 100vw;
    min-height: min(620px, calc(100vh - 76px));
  }

  .settings-panel,
  .subscriptions-panel,
  .account-panel {
    padding: 14px;
  }

  .auth-card,
  .settings-card {
    padding: 22px;
    border-radius: 18px;
  }

  .name-grid,
  .chooser-row,
  .step-actions {
    flex-direction: column;
  }

  .settings-profile,
  .account-summary,
  .account-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .account-card {
    margin-top: 66px;
  }
}

/* Boot loader */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff7ee 0%, #f8f0e8 100%);
}

.boot-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(215, 101, 60, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Topbar home button */
.topbar-home {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.topbar-home:hover {
  background: rgba(215, 101, 60, 0.08);
}

/* Coming Soon button */
.coming-soon-btn {
  opacity: 0.65;
  cursor: not-allowed;
  font-style: italic;
  font-size: 13px;
  border-style: dashed;
}

.coming-soon-btn:disabled {
  pointer-events: none;
}

/* Account switcher */
.account-switcher {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 6px;
}

.account-switcher-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-switch-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.account-switch-row:hover {
  background: rgba(215, 101, 60, 0.07);
}

.account-switch-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 800;
  font-size: 14px;
}

.account-switch-info {
  flex: 1;
  min-width: 0;
}

.account-switch-info strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-switch-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-switch-row svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.account-add-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
}
