[v-cloak] { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

fieldset.form-section {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1.5px solid #e7e0d8;
  margin: 0;
  min-width: 0;
}
legend.section-title {
  float: left;
  width: 100%;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-caramel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
legend.section-title + * { clear: both; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-espresso);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.optional-tag {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #767676;
}

.sig-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #e7e0d8;
  border-radius: 0.5rem;
  font-size: 0.925rem;
  color: var(--color-cocoa);
  background: #fefcfa;
  transition: border-color 0.2s;
  outline: none;
}
.sig-input:focus {
  border-color: var(--color-mocha);
  box-shadow: 0 0 0 3px rgba(163, 105, 66, 0.18);
}
.sig-input::placeholder { color: #8a6a44; }

.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-brand:focus-visible {
  outline: 2px solid var(--color-espresso);
  outline-offset: 2px;
}
.btn-primary-brand { background: var(--color-caramel); color: white; }
.btn-primary-brand:hover { background: var(--color-espresso); }
.btn-primary-brand:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary-brand {
  background: transparent;
  color: var(--color-caramel);
  border: 1.5px solid var(--color-mocha);
}
.btn-secondary-brand:hover { background: var(--color-caramel); color: white; }
.btn-ghost-brand {
  background: transparent;
  color: var(--color-caramel);
  border: 1.5px solid #e7e0d8;
}
.btn-ghost-brand:hover { border-color: var(--color-mocha); color: var(--color-espresso); }
.btn-sm-brand { padding: 0.35rem 0.85rem; font-size: 0.8rem; }

/* Template picker cards */
.template-card {
  width: 100%;
  text-align: left;
  background: #fefcfa;
  border: 2px solid #e7e0d8;
  border-radius: 0.85rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.template-card:hover { transform: translateY(-2px); border-color: var(--color-mocha); }
.template-card:focus-visible {
  outline: 2px solid var(--color-espresso);
  outline-offset: 2px;
}
.template-card[aria-pressed="true"] {
  border: 2px solid var(--color-mocha);
  box-shadow: 0 0 0 3px rgba(163, 105, 66, 0.18);
  background: #fff;
}

/* Collapsible sections */
details.sig-details { border-top: 1.5px dashed #e7e0d8; padding-top: 0.85rem; margin-top: 0.85rem; }
details.sig-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-caramel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
details.sig-details summary::-webkit-details-marker { display: none; }
details.sig-details summary::before { content: '+'; font-size: 1rem; line-height: 1; }
details.sig-details[open] summary::before { content: '\2212'; }
details.sig-details summary:focus-visible {
  outline: 2px solid var(--color-espresso);
  outline-offset: 2px;
  border-radius: 4px;
}
details.sig-details > div { margin-top: 0.85rem; }

/* Social add-pills */
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1.5px dashed #d3c7b6;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-caramel);
  cursor: pointer;
}
.social-pill:hover { border-color: var(--color-mocha); color: var(--color-espresso); }
.social-pill:focus-visible { outline: 2px solid var(--color-espresso); outline-offset: 2px; }

/* Photo drop zone */
.drop-zone {
  border: 2px dashed #d6cbb8;
  border-radius: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
  display: block;
}
.drop-zone.drag-over, .drop-zone:hover { border-color: var(--color-mocha); background: #fef3e2; }
.drop-zone:focus-within {
  outline: 2px solid var(--color-espresso);
  outline-offset: 2px;
}

/* ====== The email compose window ====== */
.compose-window {
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1.5px solid #ddd3c6;
  box-shadow: 0 18px 40px -18px rgba(61, 43, 31, 0.35);
  overflow: hidden;
}
.compose-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f4ede3;
  border-bottom: 1.5px solid #e7dccb;
  padding: 0.6rem 0.9rem;
}
.compose-dot { width: 11px; height: 11px; border-radius: 50%; }
.compose-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7c6f5e;
  letter-spacing: 0.02em;
  margin-right: 2.4rem;
}
.compose-field {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #f0e9dd;
  font-size: 0.82rem;
  color: #6b6257;
}
.compose-field .cf-label { color: #a39682; min-width: 3.4rem; }
.compose-body {
  padding: 1rem 1.1rem 1.35rem;
  font-size: 0.9rem;
  color: #44403c;
  line-height: 1.55;
}
.compose-sig { margin-top: 0.9rem; position: relative; }
.sample-badge {
  position: absolute;
  top: -0.6rem;
  right: 0;
  background: var(--color-coral-deep);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
}
.signature-preview { font-family: Arial, Helvetica, sans-serif; line-height: 1.4; overflow-x: auto; }

/* Setup tabs */
.setup-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid #e7e0d8;
  background: transparent;
  color: var(--color-caramel);
  cursor: pointer;
}
.setup-tab:hover { border-color: var(--color-mocha); }
.setup-tab:focus-visible { outline: 2px solid var(--color-espresso); outline-offset: 2px; }
.setup-tab[aria-selected="true"] {
  background: var(--color-caramel);
  border-color: var(--color-caramel);
  color: #fff;
}

.toast-msg {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 22rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: var(--color-caramel);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-actionbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: white;
  border-top: 1.5px solid #e7e0d8;
  z-index: 50;
}
@media (min-width: 1024px) { .mobile-actionbar { display: none; } }
@media (max-width: 1023px) {
  #main-content { padding-bottom: 6.5rem !important; }
  .toast-msg { bottom: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .toast-msg { animation: none; }
  .template-card, .drop-zone, .btn-brand { transition: none; }
  .template-card:hover { transform: none; }
}
