:root {
  color-scheme: dark;
  --mp-bg: #050507;
  --mp-surface: rgba(255, 255, 255, 0.075);
  --mp-surface-strong: rgba(255, 255, 255, 0.11);
  --mp-line: rgba(255, 255, 255, 0.12);
  --mp-text: #f7f7fa;
  --mp-muted: rgba(235, 235, 245, 0.65);
  --mp-blue: #347cff;
  --mp-violet: #7958ff;
  --mp-green: #68d391;
  --mp-red: #ff7b8d;
  --mp-safe-bottom: max(14px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--mp-bg);
  scroll-behavior: smooth;
}

body.mail-pro-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--mp-text);
  background:
    radial-gradient(760px 520px at 8% -5%, rgba(52, 124, 255, 0.24), transparent 64%),
    radial-gradient(680px 480px at 96% 4%, rgba(121, 88, 255, 0.22), transparent 64%),
    linear-gradient(180deg, #090a0f 0%, var(--mp-bg) 44%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.mail-pro-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  min-width: 0;
  border: 0;
  border-radius: 15px;
  outline: 0;
  color: var(--mp-text);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

input {
  min-height: 50px;
  padding: 0 15px;
}

textarea {
  width: 100%;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.52;
}

input:focus,
textarea:focus {
  background: rgba(11, 18, 35, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(78, 137, 255, 0.85),
    0 0 0 4px rgba(52, 124, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(235, 235, 245, 0.32);
}

.mail-pro-app {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(112px + var(--mp-safe-bottom));
}

.mail-pro-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 8, 12, 0.7);
  backdrop-filter: blur(28px) saturate(150%);
}

.mail-pro-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mail-pro-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(52, 124, 255, 0.3);
}

.mail-pro-brand strong,
.mail-pro-brand span {
  display: block;
}

.mail-pro-brand strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.mail-pro-brand span {
  margin-top: 2px;
  color: var(--mp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mail-pro-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--mp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 850;
}

.mail-pro-sync-dot,
.mail-pro-status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mp-muted);
}

.mail-pro-sync-dot.is-ready,
.mail-pro-status-light {
  background: var(--mp-green);
  box-shadow: 0 0 16px rgba(104, 211, 145, 0.7);
}

.mail-pro-hero {
  padding: 54px 4px 38px;
}

.mail-pro-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(80, 137, 255, 0.36);
  border-radius: 999px;
  background: rgba(52, 124, 255, 0.12);
  color: #c9d9ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mail-pro-hero h1 {
  max-width: 12ch;
  margin: 18px 0 14px;
  font-size: clamp(2.6rem, 12vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.066em;
}

.mail-pro-hero > p {
  max-width: 640px;
  margin: 0;
  color: var(--mp-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.mail-pro-local-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: rgba(235, 235, 245, 0.72);
  font-size: 0.78rem;
  font-weight: 750;
}

.mail-pro-presets,
.mail-pro-card,
.mail-pro-preview-card,
.mail-pro-install-card {
  border: 1px solid var(--mp-line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, var(--mp-surface-strong), rgba(255, 255, 255, 0.025)),
    rgba(8, 9, 14, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(22px) saturate(135%);
}

.mail-pro-presets {
  padding: 20px;
}

.mail-pro-section-heading,
.mail-pro-card-head,
.mail-pro-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mail-pro-section-heading span,
.mail-pro-card-head > div > span,
.mail-pro-preview-top > div > span,
.mail-pro-summary-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--mp-muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mail-pro-section-heading h2,
.mail-pro-card-head h2,
.mail-pro-preview-top h2 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.025em;
}

.mail-pro-text-button {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.075);
  color: #c9d9ff;
  font-size: 0.8rem;
  font-weight: 850;
}

.mail-pro-preset-row {
  display: grid;
  grid-auto-columns: minmax(136px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  margin: 18px -4px -4px;
  padding: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.mail-pro-preset-row::-webkit-scrollbar {
  display: none;
}

.mail-pro-preset {
  display: flex;
  min-height: 82px;
  padding: 13px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.22);
  scroll-snap-align: start;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.mail-pro-preset span {
  color: var(--mp-muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.mail-pro-preset strong {
  font-size: 0.9rem;
}

.mail-pro-preset.is-active {
  border-color: rgba(111, 145, 255, 0.74);
  background: linear-gradient(135deg, rgba(52, 124, 255, 0.42), rgba(121, 88, 255, 0.36));
  box-shadow: 0 12px 34px rgba(52, 124, 255, 0.16);
  transform: translateY(-1px);
}

.mail-pro-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.mail-pro-card {
  padding: 20px;
}

.mail-pro-card-head {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.mail-pro-card-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(88, 139, 255, 0.52);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 124, 255, 0.25), rgba(121, 88, 255, 0.22));
  color: #d7e3ff;
  font-size: 0.8rem;
  font-weight: 950;
}

.mail-pro-grid {
  display: grid;
  gap: 13px;
}

.mail-pro-field {
  display: grid;
  gap: 7px;
}

.mail-pro-field > span {
  color: rgba(235, 235, 245, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.mail-pro-details {
  padding: 0;
  overflow: hidden;
}

.mail-pro-details summary {
  display: flex;
  min-height: 82px;
  padding: 18px 20px;
  align-items: center;
  gap: 13px;
  list-style: none;
  cursor: pointer;
}

.mail-pro-details summary::-webkit-details-marker {
  display: none;
}

.mail-pro-summary-copy {
  min-width: 0;
  flex: 1;
}

.mail-pro-summary-copy strong {
  display: block;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-pro-chevron {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-right: 2px solid var(--mp-muted);
  border-bottom: 2px solid var(--mp-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.mail-pro-details[open] .mail-pro-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.mail-pro-details-grid {
  padding: 0 20px 20px;
}

.mail-pro-preview-card {
  margin-top: 14px;
  padding: 20px;
}

.mail-pro-preview-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mail-pro-preview-chip {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(80, 137, 255, 0.24);
  border-radius: 999px;
  background: rgba(52, 124, 255, 0.12);
  color: #d6e5ff;
  font-size: 0.7rem;
  font-weight: 900;
}

.mail-pro-ready-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(104, 211, 145, 0.36);
  border-radius: 999px;
  background: rgba(104, 211, 145, 0.1);
  color: #aef0c7;
  font-size: 0.72rem;
  font-weight: 900;
}

.mail-pro-ready-badge.is-missing {
  border-color: rgba(255, 123, 141, 0.38);
  background: rgba(255, 123, 141, 0.1);
  color: #ffc2ca;
}

.mail-pro-preview-summary {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mail-pro-preview-summary-card {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid rgba(93, 152, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(180px 90px at 0% 0%, rgba(47, 124, 246, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.045);
}

.mail-pro-preview-summary-card span {
  color: var(--mp-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mail-pro-preview-summary-card strong,
.mail-pro-preview-summary-card p {
  margin: 0;
}

.mail-pro-preview-summary-card strong {
  font-size: 0.98rem;
  letter-spacing: -0.025em;
}

.mail-pro-preview-summary-card p {
  color: rgba(235, 235, 245, 0.68);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mail-pro-email-preview {
  --mail-pro-preview-accent: #347cff;
  --mail-pro-preview-accent-secondary: #7958ff;
  --mail-pro-preview-accent-soft: rgba(52, 124, 255, 0.12);
  --mail-pro-preview-secondary-soft: rgba(121, 88, 255, 0.14);
  --mail-pro-preview-accent-border: rgba(52, 124, 255, 0.18);
  --mail-pro-preview-title-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mail-pro-preview-body-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(47, 124, 246, 0.16);
  border-radius: 32px;
  color: #172033;
  background:
    radial-gradient(340px 220px at 0% 0%, rgba(47, 124, 246, 0.12), transparent 58%),
    radial-gradient(320px 220px at 100% 100%, rgba(122, 92, 255, 0.14), transparent 60%),
    #e7effb;
  box-shadow: 0 24px 70px rgba(12, 18, 34, 0.18);
  font-family: var(--mail-pro-preview-body-font);
}

.mail-pro-email-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px;
  background:
    radial-gradient(320px 180px at 0% 0%, rgba(47, 124, 246, 0.28), transparent 58%),
    radial-gradient(260px 180px at 100% 100%, rgba(122, 92, 255, 0.24), transparent 56%),
    radial-gradient(240px 160px at 76% 10%, rgba(0, 210, 255, 0.16), transparent 55%),
    linear-gradient(135deg, #080d17, #0f1730 42%, #1b1740 100%);
  color: #ffffff;
}

.mail-pro-email-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mail-pro-email-logo-shell {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.mail-pro-email-logo-shell img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  object-position: center;
  border-radius: 999px;
}

.mail-pro-email-brand strong,
.mail-pro-email-brand span {
  display: block;
}

.mail-pro-email-brand strong {
  overflow: hidden;
  font-family: var(--mail-pro-preview-title-font);
  font-size: 1.14rem;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-pro-email-brand span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.45;
}

.mail-pro-email-recipient-pill {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
}

.mail-pro-email-content {
  padding: 24px 22px 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%),
    rgba(255, 255, 255, 0.96);
}

.mail-pro-email-preheader {
  margin: 14px 0 0;
  color: #4f6790;
  font-size: 0.8rem;
  line-height: 1.58;
}

.mail-pro-email-preview h3 {
  margin: 14px 0 14px;
  color: #0e1420;
  font-family: var(--mail-pro-preview-title-font);
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.mail-pro-email-preview p {
  margin: 0 0 13px;
  color: #445068;
  font-size: 0.9rem;
  line-height: 1.66;
  white-space: pre-line;
}

.mail-pro-email-highlight {
  margin: 18px 0 22px;
  padding: 15px 16px;
  border: 1px solid var(--mail-pro-preview-accent-border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, var(--mail-pro-preview-accent-soft), var(--mail-pro-preview-secondary-soft)),
    linear-gradient(90deg, rgba(0, 210, 255, 0.08), transparent);
  color: var(--mail-pro-preview-accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.mail-pro-email-details-card {
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(47, 124, 246, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff, #f3f8ff);
  box-shadow: 0 12px 24px rgba(47, 124, 246, 0.06);
}

.mail-pro-email-details-heading {
  display: block;
  padding: 18px 22px 6px;
  color: var(--mail-pro-preview-accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mail-pro-email-preview dl {
  margin: 0;
}

.mail-pro-email-label {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 124, 246, 0.14);
  background: linear-gradient(135deg, rgba(47, 124, 246, 0.14), rgba(0, 210, 255, 0.1));
  color: var(--mail-pro-preview-accent);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mail-pro-email-detail {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 13px 22px;
  border-bottom: 1px solid #e4e9f1;
}

.mail-pro-email-detail:last-child {
  border-bottom: 0;
}

.mail-pro-email-detail dt,
.mail-pro-email-detail dd {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.mail-pro-email-detail dt {
  color: #758097;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mail-pro-email-detail dd {
  color: #1f293b;
  font-weight: 850;
  text-align: right;
}

.mail-pro-email-button {
  display: grid;
  min-height: 52px;
  margin: 20px 0 18px;
  padding: 0 18px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, var(--mail-pro-preview-accent), var(--mail-pro-preview-accent-secondary));
  box-shadow: 0 18px 34px rgba(69, 105, 255, 0.22);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.mail-pro-email-footer {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(47, 124, 246, 0.14);
  background:
    linear-gradient(180deg, rgba(239, 245, 255, 0.96), rgba(248, 250, 255, 0.92));
  color: #59657a;
  font-size: 0.72rem;
}

.mail-pro-email-footer-main {
  display: grid;
  gap: 4px;
}

.mail-pro-email-footer strong {
  color: #263147;
}

.mail-pro-email-footer p {
  margin: 0;
  color: #758097;
  font-size: 0.74rem;
  line-height: 1.5;
}

.mail-pro-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mail-pro-action-wide {
  grid-column: 1 / -1;
  border-color: transparent;
  background: linear-gradient(100deg, var(--mp-blue), var(--mp-violet));
  box-shadow: 0 16px 36px rgba(69, 105, 255, 0.24);
  color: #ffffff;
}

.mail-pro-secondary-button,
.mail-pro-generate-button,
.mail-pro-file-actions button,
.mail-pro-file-actions label {
  min-height: 48px;
  border: 1px solid var(--mp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 850;
}

.mail-pro-secondary-button {
  padding: 0 14px;
}

.mail-pro-install-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 18px 20px;
}

.mail-pro-install-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--mp-blue), var(--mp-violet));
  font-size: 1.4rem;
  font-weight: 300;
}

.mail-pro-install-card strong,
.mail-pro-install-card p {
  display: block;
  margin: 0;
}

.mail-pro-install-card p {
  margin-top: 4px;
  color: var(--mp-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mail-pro-footer {
  display: grid;
  gap: 4px;
  padding: 30px 4px 8px;
  color: rgba(235, 235, 245, 0.42);
  font-size: 0.7rem;
  text-align: center;
}

.mail-pro-action-bar {
  position: fixed;
  right: 12px;
  bottom: var(--mp-safe-bottom);
  left: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 10px;
  width: min(620px, calc(100% - 24px));
  min-height: 70px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(17, 18, 24, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(30px) saturate(165%);
}

.mail-pro-action-bar button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 17px;
  font-weight: 900;
}

.mail-pro-action-bar svg {
  width: 20px;
  height: 20px;
}

.mail-pro-action-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #d7deec;
  font-size: 0.76rem;
}

.mail-pro-action-primary {
  background: linear-gradient(100deg, var(--mp-blue), var(--mp-violet));
  box-shadow: 0 12px 32px rgba(69, 105, 255, 0.28);
  font-size: 0.94rem;
}

.mail-pro-sync-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--mp-text);
  background: transparent;
}

.mail-pro-sync-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
}

.mail-pro-sync-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(660px, 100%);
  max-height: calc(100% - max(18px, env(safe-area-inset-top)));
  margin: 0 auto;
  padding: 10px 18px calc(20px + var(--mp-safe-bottom));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(500px 280px at 10% 0%, rgba(52, 124, 255, 0.2), transparent 70%),
    #101116;
  box-shadow: 0 -30px 90px rgba(0, 0, 0, 0.6);
}

.mail-pro-sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.mail-pro-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mail-pro-sheet-head span {
  color: #b9cdfb;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@media (min-width: 700px) {
  .mail-pro-preview-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mail-pro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mail-pro-field-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .mail-pro-preview-top,
  .mail-pro-email-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .mail-pro-preview-chip-row {
    justify-content: flex-start;
  }

  .mail-pro-action-bar button {
    padding: 0 10px;
    gap: 6px;
  }

  .mail-pro-action-bar span {
    line-height: 1.1;
  }

  .mail-pro-email-detail {
    grid-template-columns: 1fr;
  }

  .mail-pro-email-detail dd {
    text-align: left;
  }
}

.mail-pro-sheet-head h2 {
  margin: 4px 0 0;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.mail-pro-close-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  font-size: 1.5rem;
  font-weight: 350;
}

.mail-pro-sync-explainer {
  margin: 18px 0;
  color: var(--mp-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.mail-pro-code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.mail-pro-code-control button {
  min-width: 88px;
  border: 1px solid var(--mp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.75rem;
  font-weight: 850;
}

.mail-pro-generate-button {
  width: 100%;
  margin-top: 10px;
}

.mail-pro-sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mail-pro-sync-actions button {
  display: grid;
  min-height: 76px;
  padding: 12px;
  place-content: center;
  border: 0;
  border-radius: 17px;
}

.mail-pro-sync-actions span,
.mail-pro-sync-actions small {
  display: block;
}

.mail-pro-sync-actions span {
  font-size: 0.92rem;
  font-weight: 900;
}

.mail-pro-sync-actions small {
  margin-top: 4px;
  opacity: 0.7;
  font-size: 0.67rem;
  font-weight: 750;
}

.mail-pro-pull-button {
  background: rgba(255, 255, 255, 0.09);
}

.mail-pro-push-button {
  background: linear-gradient(105deg, var(--mp-blue), var(--mp-violet));
}

.mail-pro-sync-status {
  min-height: 42px;
  margin: 14px 0 0;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--mp-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.mail-pro-sync-status.is-error {
  color: #ffc2ca;
}

.mail-pro-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mail-pro-file-actions button,
.mail-pro-file-actions label {
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.mail-pro-file-actions input {
  display: none;
}

.mail-pro-toast {
  position: fixed;
  right: 18px;
  bottom: calc(98px + var(--mp-safe-bottom));
  left: 18px;
  z-index: 60;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  opacity: 0;
  color: var(--mp-text);
  background: rgba(20, 21, 28, 0.94);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mail-pro-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 660px) {
  .mail-pro-app {
    padding-right: 24px;
    padding-left: 24px;
  }

  .mail-pro-header {
    margin-right: -24px;
    margin-left: -24px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .mail-pro-grid,
  .mail-pro-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mail-pro-field-wide {
    grid-column: 1 / -1;
  }

  .mail-pro-presets,
  .mail-pro-card,
  .mail-pro-preview-card {
    padding: 26px;
    border-radius: 28px;
  }

  .mail-pro-details {
    padding: 0;
  }

  .mail-pro-details summary {
    padding: 22px 26px;
  }

  .mail-pro-details-grid {
    padding: 0 26px 26px;
  }

  .mail-pro-email-preview {
    padding: 34px;
  }
}

@media (display-mode: standalone) {
  .mail-pro-install-card {
    display: none;
  }
}

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