@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-latin-wght-normal.woff2") format("woff2");
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: #202b3d; background: #f8fafc; font-family: "Manrope Variable", Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
button { cursor: pointer; }
.preview-page { width: 100%; max-width: 1200px; margin: auto; padding: 48px 40px 64px; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 32px; }
.preview-kicker { margin: 0 0 10px; color: #6e87a6; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; }
h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.8px; line-height: 36px; }
.preview-subtitle { margin: 8px 0 0; font-size: 13px; line-height: 21px; color: #738094; }
.locale-switch { display: inline-flex; padding: 3px; border: 1px solid #e0e5ec; border-radius: 8px; background: #f0f3f7; flex: none; }
.locale-switch button { height: 32px; min-width: 62px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #758195; font-size: 12px; }
.locale-switch button[aria-pressed="true"] { background: white; color: #315f9e; box-shadow: 0 1px 4px #233d6020; }
.preview-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 36px; align-items: start; }
.template-sidebar { position: sticky; top: 28px; padding-top: 18px; }
.nav-label { margin: 0 12px 16px; color: #8c98a7; font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; }
.nav-group { margin: 22px 12px 8px; color: #000000; font-size: 12px; line-height: 18px; font-weight: 700; }
.nav-group:first-child { margin-top: 0; }
.template-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px 11px 40px; margin: 2px 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #657185; font-size: 12px; line-height: 18px; text-align: left; }
.template-option:hover { background: #eef1f5; }
.template-option[aria-pressed="true"] { border-color: #e1e9f5; color: #315f9e; background: #eaf1fa; font-weight: 600; }
.sample-note { padding: 16px 12px 0; margin: 22px 0 0; border-top: 1px solid #e7ebf0; color: #8d97a5; font-size: 10px; line-height: 17px; }
.preview-content { min-width: 0; overflow: hidden; border: 1px solid #dfe5ec; border-radius: 12px; background: #fff; box-shadow: 0 10px 32px #253f6210; }
.design-switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px 16px; border-bottom: 1px solid #edf0f4; background: #f8fafd; }
.design-option { min-width: 0; min-height: 36px; padding: 8px 6px; border: 1px solid #e0e7f0; border-radius: 6px; background: #fff; color: #657185; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.design-option:hover { border-color: #a6beda; color: #315f9e; background: #f0f5fc; }
.design-option[aria-pressed="true"] { border-color: #315f9e; background: #eaf1fa; color: #254f88; font-weight: 700; box-shadow: inset 0 0 0 1px #315f9e; }
.design-option:focus-visible { outline: 2px solid #315f9e; outline-offset: 3px; }
.envelope { display: flex; gap: 12px; align-items: center; padding: 23px 26px; border-bottom: 1px solid #edf0f4; }
.envelope-avatar { display: flex; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; overflow: hidden; background: #fff; color: #315f9e; border: 0; border-radius: 50%; font-size: 17px; font-weight: 600; }
.envelope-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; }
.envelope-details { min-width: 0; }
.envelope h2 { margin: 0; font-size: 13px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.envelope p { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 0; font-size: 10px; line-height: 16px; color: #8b95a4; }
.envelope p strong { color: #697486; font-weight: 500; }
.email-badge { margin-left: auto; padding-left: 12px; color: #9ba5b3; font-size: 9px; letter-spacing: 1px; }
#email-preview { display: block; width: 100%; height: 850px; border: 0; background-color: #edf5ff; }
button:focus-visible, a:focus-visible { outline: 2px solid #315f9e; outline-offset: 3px; }
@media (max-width: 900px) {
  .preview-page { padding: 32px 24px 40px; }
  .preview-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 20px; }
  .template-option { font-size: 11px; padding: 9px 9px 9px 32px; gap: 5px; }
  .envelope { padding: 18px; }
  .email-badge { display: none; }
}
@media (max-width: 680px) {
  .preview-page { padding: 24px 16px 36px; }
  .preview-toolbar { align-items: flex-start; padding-bottom: 22px; gap: 18px; flex-wrap: wrap; }
  h1 { font-size: 24px; line-height: 32px; }
  .preview-layout { display: block; }
  .template-sidebar { position: static; padding: 0; margin-bottom: 20px; }
  .nav-label, .nav-group, .sample-note { display: none; }
  #template-list { display: flex; overflow-x: auto; gap: 6px; padding: 3px 2px 8px; scrollbar-width: thin; }
  .template-option { flex: none; width: auto; padding: 9px 12px; min-height: 40px; white-space: nowrap; margin: 0; background: #fff; border-color: #e4e8ef; }
  .envelope { padding: 18px 16px; gap: 9px; }
  .design-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 10px 8px; }
  .design-option { padding: 8px 4px; font-size: 10px; }
  .envelope h2 { font-size: 12px; line-height: 18px; }
  .envelope-avatar { width: 30px; height: 30px; font-size: 14px; }
}
