:root {
  --bg: #f6f5ff;
  --ink: #2b2440;
  --muted: #6b6580;
  --brand: #7048e8;
  --card: #ffffff;
  --ring: rgba(112, 72, 232, .25);
  --shadow: 0 10px 30px rgba(43, 36, 64, .12);
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 10% -8%, rgba(112,72,232,.10), transparent 60%),
    radial-gradient(900px 480px at 108% 8%, rgba(112,72,232,.07), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); }
/* Page width follows the viewport; short account forms retain their own cap. */
:root { --page-width: 70%; }
@media (max-width: 1199px) { :root { --page-width: 90%; } }
@media (max-width: 767px) { :root { --page-width: 100%; } }
.wrap { width: var(--page-width); max-width: none; margin: 0 auto; padding: 22px 18px 60px; min-width: 0; }

.wrap-narrow { max-width: 560px; }

/* Unified site navigation: one centered pill bar, shown on every page. */
.site-nav-wrap { display: flex; justify-content: center; width: var(--page-width); margin: 0 auto; padding: 14px 18px 6px; }
.site-nav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; width: 100%; min-width: 0; max-width: 100%;
  background: rgba(255,255,255,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 10px 28px rgba(43,36,64,.14);
  border-radius: 999px; padding: 8px 10px 8px 20px;
}
.site-nav .brand { margin: 0; flex-shrink: 0; }
.site-nav .brand-logo { width: 132px; }
.site-nav-links { display: flex; align-items: center; gap: 20px; }
.site-nav-links a { color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: none; padding: 6px 2px; white-space: nowrap; }
.site-nav-links a:hover { color: var(--brand); }
.site-nav-right { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; min-width: 0; flex-shrink: 1; }
.site-auth { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; }
.site-auth a { text-decoration: none; font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; }
.site-auth a:hover { color: var(--brand); }
.site-auth .acct-hi { color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.site-auth .nav-signup { background: var(--brand); color: #fff; padding: 9px 18px; border-radius: 999px; box-shadow: 0 8px 18px var(--ring); }
.site-auth .nav-signup:hover { color: #fff; opacity: .92; }
.site-nav .lang-switch { margin: 0; }
.site-nav .lang-switch select {
  font: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
  padding: 5px 8px; border: 1px solid #e7e1fb; border-radius: 999px;
  background: rgba(255,255,255,.7); cursor: pointer; -webkit-appearance: none; appearance: none;
}
@media (max-width: 860px) { .site-nav-links { display: none; } }
@media (max-width: 640px) {
  .site-auth .acct-hi, .site-auth .nav-feedback, .site-auth .nav-admin { display: none; }
  .site-nav { gap: 12px; padding: 8px 8px 8px 14px; }
}

.alert { background: #ffe3e3; color: #a61e1e; border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-weight: 600; }

/* dashboard */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dash-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.dash-card:hover { transform: translateY(-1px); }
.dash-emoji { font-size: 30px; }
.dash-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dash-info .muted { font-size: 13px; }
.dash-status { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.status-open { background: #e7f5ff; color: #1971c2; }
.status-sealed { background: #ebfbee; color: #2f9e44; }

/* invitations */
.invite-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.invite-row { padding: 14px 16px; margin: 0; }
.invite-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.inv-status { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.inv-invited { background: #f1f3f5; color: #868e96; }
.inv-opened  { background: #fff3bf; color: #b08900; }
.inv-signed  { background: #ebfbee; color: #2f9e44; }
.invite-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.inv-qr summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 13px; }
.inv-qr .qr-box { margin-top: 10px; }
.inv-del { margin: 0; }
.inv-del .link-clear { color: #e03131; }

/* admin */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.admin-tabs a { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.admin-tabs a.active { color: #fff; background: var(--brand); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px;
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.stat-n { font-size: 30px; font-weight: 800; color: var(--brand); }
.stat-l { color: var(--muted); font-weight: 700; font-size: 13px; }
.stat-link:hover { transform: translateY(-1px); }

.table-wrap { overflow-x: auto; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid #eee; white-space: nowrap; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr:last-child td { border-bottom: 0; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.you { color: var(--muted); font-weight: 600; }
.uform { margin: 0; }
button.mini { font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; border: 2px solid #e7e1fb;
  background: #f6f2ff; color: var(--brand); padding: 5px 10px; border-radius: 999px; }
button.mini.danger { border-color: #ffc9c9; background: #fff5f5; color: #e03131; }

.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-item { margin: 0; }
.fb-item.fb-new { border-inline-start: 4px solid var(--brand); }
.fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.fb-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 10px; }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checkline input { width: auto; }

/* RTL adjustments */
[dir="rtl"] .note .author,
[dir="rtl"] .note { text-align: right; }
[dir="rtl"] .btn.block { direction: rtl; }
[dir="rtl"] .create-arrow { transform: scaleX(-1); }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 20px; text-decoration: none; color: var(--ink);
}
.brand-logo { display: block; width: 240px; max-width: 100%; height: auto; }
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.05; margin: 14px 0 8px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 auto; max-width: 46ch; }
.grad { color: var(--brand); }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 18px 0;
  border: 1px solid rgba(112,72,232,.07);
}
label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 15px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--ink);
  border: 2px solid #eae7f5; border-radius: 12px; background: #fbfaff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
textarea { min-height: 96px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* "Help me write" assist */
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assist-btn {
  font: inherit; font-weight: 800; font-size: 13px; cursor: pointer;
  border: 2px solid #e7e1fb; background: #f6f2ff; color: var(--brand);
  padding: 6px 12px; border-radius: 999px; margin-top: 8px;
}
.assist-btn:hover { background: #efe8ff; }
.assist {
  background: #faf8ff; border: 2px solid #efeafc; border-radius: 12px;
  padding: 12px; margin: 8px 0 10px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 10px;
}
.assist-label { font-weight: 700; font-size: 14px; }
.assist .chips { gap: 6px; }
.assist .chip span { padding: 7px 11px; font-size: 13px; }
.assist .btn.secondary { padding: 9px 15px; font-size: 14px; }
.assist-hint { color: var(--muted); font-size: 12px; flex-basis: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 16px;
  padding: 14px 22px; border-radius: 999px; color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 20px var(--ring); text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px var(--ring); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.secondary { background: #fff; color: var(--brand); border: 2px solid #e7e1fb; box-shadow: none; }
.btn.block { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

/* occasion & color pickers */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px;
  border: 2px solid #eae7f5; border-radius: 999px; background: #fff; font-weight: 700; font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.chip input:checked + span { border-color: var(--brand); background: #f3efff; }
.chip:hover span { border-color: var(--brand); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 12px; cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.05); transition: transform .12s ease; }
.swatch:hover { transform: scale(1.1); }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch.active { outline: 3px solid var(--brand); outline-offset: 2px; }

/* template cover gallery */
.tpl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tpl { padding: 0; border: 3px solid transparent; border-radius: 12px; background: none; cursor: pointer;
  overflow: hidden; line-height: 0; box-shadow: 0 4px 12px rgba(43,36,64,.12); }
.tpl img { width: 100%; aspect-ratio: 564 / 400; object-fit: cover; display: block; }
.tpl:hover { transform: translateY(-2px); }
.tpl.sel { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* signing wall */
.wall-head { text-align: center; }
.wall-head .emoji { font-size: 46px; }
.cover-banner { margin: 0 auto 6px; max-width: 460px; }
.cover-banner img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); display: block; }
.wall-head h1 { margin: 6px 0 2px; font-size: clamp(26px, 6vw, 40px); }
.count-pill { display: inline-block; background: #fff; border-radius: 999px; padding: 6px 14px;
  font-weight: 800; color: var(--brand); box-shadow: var(--shadow); }
.masonry { columns: 2 220px; column-gap: 14px; margin-top: 18px; }
.note {
  break-inside: avoid; margin: 0 0 14px; padding: 16px; border-radius: 14px;
  box-shadow: 0 6px 16px rgba(43,36,64,.10); transform: rotate(var(--r, -1deg));
}
.note .body { font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note .sig { margin-top: 8px; }
.note .sig img { max-height: 70px; }
.note .photo img { width: 100%; border-radius: 10px; margin-bottom: 8px; }
.note .author { font-family: 'Caveat', cursive; font-size: 24px; font-weight: 700; margin-top: 6px; }

/* signature pad */
.pad-wrap { border: 2px dashed #d9d2f2; border-radius: 12px; background: #fff; }
canvas.pad { width: 100%; height: 150px; display: block; touch-action: none; border-radius: 12px; }
.pad-tools { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; }
.link-clear { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }

/* share box */
.share { display: flex; gap: 10px; align-items: center; }
.share input { font-size: 14px; }
.qr { text-align: center; margin: 10px 0; }
.qr img { width: 190px; height: 190px; border-radius: 14px; box-shadow: var(--shadow); background:#fff; padding:8px;}

.center { text-align: center; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.divider { height: 1px; background: #eae7f5; margin: 20px 0; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; opacity: 0;
  transition: opacity .3s; pointer-events: none; font-weight: 700; }
.toast.show { opacity: 1; }

/* reveal / envelope */
.stage { min-height: 82vh; display: grid; place-items: center; }
.envelope { text-align: center; cursor: pointer; }
.envelope .flap { font-size: 96px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.18)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.envelope h1 { font-size: clamp(28px, 7vw, 46px); margin: 8px 0; }
.reveal-note { opacity: 0; transform: translateY(16px) rotate(var(--r,-1deg)); animation: pop .6s forwards; }
@keyframes pop { to { opacity: 1; transform: translateY(0) rotate(var(--r,-1deg)); } }
@media (prefers-reduced-motion: reduce) {
  .envelope .flap { animation: none; } .reveal-note { animation: none; opacity: 1; transform: none; }
}
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); } }


.verification-banner { margin: 4px auto 0; width: var(--page-width); padding: 14px 18px; background: #eee8ff; color: var(--ink); border-radius: 12px; }
.verification-banner + .wrap { padding-top: 20px; }
.smtp-fields { display: grid; gap: 8px; }

/* Custom covers use the same landscape proportions as the design gallery. */
.custom-cover { margin-top: 24px; padding-top: 16px; border-top: 1px solid #ddd8ec; }
#coverCanvas { display: block; width: 100%; height: auto; aspect-ratio: 141 / 100; border-radius: 12px; touch-action: none; cursor: grab; }
#coverCanvas:active { cursor: grabbing; }
#coverControls input[type="range"] { width: 100%; padding: 0; accent-color: var(--accent, #7048e8); }
#coverControls .btn { margin-top: 12px; }
.cover-error { color: #a52332; }

.studio-thumbnail { width: min(100%, 280px); display: block; border-radius: 10px; }
.card-video { width: 100%; max-height: 70vh; display: block; background: #201c2d; border-radius: 12px; }
.card-playback { max-width: 700px; margin: 20px auto; }
audio { display: block; max-width: 100%; margin: 12px 0; }
.celebration { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 50; }
.particle { position: absolute; top: -60px; font-size: 28px; color: #7048e8; animation: card-fall 4s ease-in both; }
.particle-balloons, .particle-hearts { top: auto; bottom: -60px; animation-name: card-rise; }
.particle-stars { top: 35%; animation-name: card-sparkle; }
.particle-waves { top: 35%; animation-name: card-wave; }
.particle-petals, .particle-leaves { animation-name: card-drift; }
.particle-leaves { animation-duration: 4.4s; }
@keyframes card-fall { to { transform: translate(var(--drift), 110vh) rotate(300deg); opacity: 0; } }
@keyframes card-rise { to { transform: translate(var(--drift), -110vh) rotate(15deg); opacity: 0; } }
@keyframes card-drift { 40% { transform: translate(60px, 40vh) rotate(90deg); } to { transform: translate(var(--drift), 110vh) rotate(180deg); opacity: 0; } }
@keyframes card-sparkle { 0%,100% { transform: scale(0); opacity: 0; } 30% { transform: translateY(-70px) scale(1.6); opacity: 1; } 70% { transform: translateY(60px) scale(.8); } }
@keyframes card-wave { 0%,100% { opacity: 0; } 20%,60% { transform: rotate(-25deg); opacity: 1; } 40%,80% { transform: rotate(25deg); opacity: 1; } }
.animation-none .reveal-note { animation: none; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .celebration { display: none; }
  .reveal-note, .envelope { animation: none !important; transition: none !important; }
}


.legal-document { line-height: 1.7; }
.legal-document h2 { margin-top: 30px; }
.legal-document table { width: 100%; border-collapse: collapse; }
.legal-document th, .legal-document td { padding: 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #ddd; overflow-wrap: anywhere; }
.legal-document dd { margin: 0 0 14px; }
.legal-document dt { font-weight: 800; }
.legal-accept { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; font-size: 14px; line-height: 1.6; }
.legal-accept input { flex: 0 0 auto; margin-top: 5px; }

/* Group footer links into readable columns, including on narrow account pages. */
footer.site { margin-top: 44px; padding: 28px; color: var(--muted); background: var(--card); border: 1px solid #e5dff4; border-radius: 18px; text-align: start; font-size: 13px; line-height: 1.6; }
.footer-top { padding-bottom: 22px; border-bottom: 1px solid #eeeaf6; }
.footer-brand { display: inline-block; }
.footer-brand img { display: block; width: 174px; max-width: 100%; height: auto; }
.footer-top p { margin: 8px 0 0; }
.legal-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 24px 0; }
.footer-column { min-width: 0; }
.footer-column h2 { color: var(--ink); font-size: 14px; line-height: 1.4; font-weight: 800; margin: 0 0 12px; }
.footer-column ul { list-style: none; margin: 0; padding: 0; }
.footer-column li + li { margin-top: 4px; }
.footer-column a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-column a:hover, .footer-column a:focus-visible { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
footer.site a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 18px; border-top: 1px solid #eeeaf6; font-size: 11px; }
.footer-bottom p { flex: 1 1 260px; margin: 0; }
.footer-bottom a { color: var(--muted); text-underline-offset: 3px; }
.footer-bottom span { white-space: nowrap; }
.wrap-narrow .legal-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wrap-narrow .footer-column:last-child { grid-column: 1 / -1; }
@media (max-width: 600px) {
  footer.site { padding: 22px; margin-top: 32px; }
  .legal-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .footer-column:last-child { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .legal-links, .wrap-narrow .legal-links { grid-template-columns: 1fr; }
}

.activity-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 24px 0; }
.activity-filters label { flex: 1 1 180px; margin: 0; }
.activity-filters input, .activity-filters select { margin-bottom: 0; }
.activity-list { list-style: none; padding: 0; }
.activity-list li { margin: 14px 0; }
.activity-list time { color: var(--muted); font-size: 12px; }
.activity-list h3 { margin: 8px 0; }
.activity-list p { margin: 4px 0; overflow-wrap: anywhere; }
.activity-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.activity-summary dd { margin: 0; }
.activity-card { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid #e5dff4; }
.activity-card span { font-size: 13px; color: var(--muted); }
.activity-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }



/* Native disclosure controls support touch, mouse and keyboard. */
.occasion-group { border: 1px solid #e5dff4; border-radius: 10px; padding: 0; margin: 10px 0; min-width: 0; }
.occasion-group summary { cursor: pointer; font-size: .95rem; font-weight: 700; padding: 14px; }
.occasion-group summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.occasion-group[open] .chips { padding: 0 14px 14px; }
.occasion-group .chips { gap: 8px; }
.occasion-group .chip { max-width: 100%; }
.occasion-group .chip span { white-space: normal; overflow-wrap: anywhere; }

.password-control { position: relative; }
.password-control input { padding-inline-end: 52px; }
.password-toggle { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { color: var(--brand); }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.help-topics { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.help-page section { scroll-margin-top: 20px; }
.help-page li { margin-block: 10px; }
.help-page details { padding: 14px 0; border-bottom: 1px solid #e5dff4; }
.help-page summary { cursor: pointer; font-weight: 700; }
.help-page p, .help-page li { line-height: 1.65; }

.thread-message { overflow-wrap: anywhere; }
.thread-message time { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.thread-message p { line-height: 1.6; }
.thread-support { border-inline-start: 4px solid var(--brand); }

.feedback-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.5; vertical-align: middle; }

.home-faq { scroll-margin-top: 20px; }
.home-faq h3 { margin-top: 28px; }
.home-faq details { border-bottom: 1px solid #e5dff4; }
.home-faq summary { cursor: pointer; padding: 16px 4px; font-weight: 700; overflow-wrap: anywhere; }
.home-faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.home-faq .faq-answer { padding: 0 4px 12px; line-height: 1.65; overflow-wrap: anywhere; }

/* Reusable kicker badge (small pill above a heading) */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; background: #f3efff; color: var(--brand);
  font-weight: 800; font-size: 13px; padding: 7px 14px; border-radius: 999px; margin-bottom: 14px; }

/* Numbered section dividers inside long forms — no copy, just structure */
.step-mark { display: flex; align-items: center; gap: 10px; margin: 30px 0 6px; }
.step-mark span { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-mark::after { content: ''; flex: 1; height: 1px; background: #eae7f5; }

/* Round icon above login/signup card headings */
.auth-icon { width: 52px; height: 52px; border-radius: 50%; background: #f3efff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 14px; }

/* Help page topic nav as pills instead of plain links */
.help-topics a { padding: 8px 14px; border-radius: 999px; background: #f6f2ff; color: var(--brand);
  font-weight: 700; font-size: 13px; text-decoration: none; transition: background .15s ease, color .15s ease; }
.help-topics a:hover { background: var(--brand); color: #fff; }


#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
#back-to-top:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.18); }
#back-to-top[hidden] { display: none; }
[dir="rtl"] #back-to-top { right: auto; left: 22px; }
@media (max-width: 640px) {
  #back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  [dir="rtl"] #back-to-top { left: 14px; }
}

/* Shared admin layout, including settings and SMTP forms. */
.wrap.admin-layout { max-width: none; width: var(--page-width); }
.admin-layout .admin-tabs { gap: 8px; }
.studio-sections { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; padding: 12px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.studio-sections a { display: block; padding: 12px 16px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 800; }
.studio-sections a:hover { background: #eee8ff; }
.studio-sections a[aria-current="page"] { background: var(--brand); color: #fff; }
.studio-sections a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.studio-section { min-width: 0; }
.studio-library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; align-items: start; }
.studio-library-grid > .card { margin-top: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .studio-sections { gap: 6px; padding: 8px; }
  .studio-sections a { flex: 1 1 140px; padding: 10px; text-align: center; }
}

/* Occasion choices use the same compact two-column rhythm as the form fields. */
.occasion-groups-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; margin: 10px 0 18px; }
.occasion-groups-grid .occasion-group { margin: 0; }
.occasion-groups-grid summary { overflow-wrap: anywhere; }
@media (max-width: 600px) { .occasion-groups-grid { grid-template-columns: 1fr; } }

/* Plan comparison keeps prices and actions readable on small screens. */
.wrap.billing-wrap { max-width: 1120px; }
.billing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 28px; }
.billing-plan { display: flex; flex-direction: column; margin: 0; }
.billing-plan h2 { margin-top: 0; }
.billing-plan form { margin-top: auto; padding-top: 16px; }
.billing-plan .btn { width: 100%; }
.billing-plan .btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 900px) { .billing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .billing-grid { grid-template-columns: 1fr; } }

