:root {
  --ink: #2a2440; --muted: #6f6a85; --paper: #fffdf8; --accent: #7c4fd0;
  --accent2: #e8a53d; --bg: #f4f1ec; --line: #e5e0d8; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
.topbar { background: linear-gradient(120deg, #6a3fc0, #9b5de5); color: #fff; padding: 14px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: .3px; }
.langs { display: flex; gap: 8px; }
.lang-btn { border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.lang-btn.active { background: #fff; color: #6a3fc0; font-weight: 600; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; padding-top: 24px; padding-bottom: 40px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.editor { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 2px 10px rgba(40,20,80,.06); }
.editor h2 { margin: 0 0 14px; font-size: 19px; }
.editor h3 { margin: 18px 0 8px; font-size: 15px; color: var(--muted); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid #b493e8; border-color: #b493e8; }
.fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.designs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.design-chip { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 4px; cursor: pointer; text-align: center; font-size: 12px; color: var(--ink); }
.design-chip .swatch { display: block; width: 100%; height: 26px; border-radius: 6px; margin-bottom: 5px; }
.design-chip.active { border-color: var(--accent); box-shadow: 0 0 0 2px #e5d6fa; }
.preview { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.card-holder { width: 100%; display: flex; justify-content: center; padding: 10px 0; overflow-x: auto; }
.card { width: 640px; max-width: 100%; aspect-ratio: 5/7; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(40,20,80,.14); overflow: hidden; transform-origin: top center; }
@media (max-width: 700px) { .card { width: 92vw; } }
.card-inner { width: 100%; height: 100%; position: relative; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn { border: 0; border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn.primary { background: var(--accent); color: #fff; border: 0; }
.btn.wa { background: #25d366; color: #fff; border: 0; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }
.footer { padding: 18px 0 30px; text-align: center; color: var(--muted); font-size: 13px; }

/* invitation card typography */
.card-inner { display: flex; flex-direction: column; text-align: center; padding: 7% 8%; }
.c-eyebrow { font-size: clamp(11px, 1.9vw, 15px); letter-spacing: .22em; text-transform: uppercase; opacity: .75; }
.c-title { font-size: clamp(26px, 6vw, 52px); line-height: 1.15; margin: 2% 0 1%; font-weight: 700; }
.c-names { font-size: clamp(20px, 4.6vw, 40px); line-height: 1.25; margin: 1% 0; font-weight: 600; }
.c-dates { font-size: clamp(13px, 2.6vw, 19px); line-height: 1.55; margin-top: 3%; }
.c-details { font-size: clamp(12px, 2.4vw, 17px); line-height: 1.6; margin-top: 4%; }
.c-msg { font-size: clamp(12px, 2.2vw, 16px); margin-top: 4%; font-style: italic; }
.c-host { font-size: clamp(12px, 2.4vw, 17px); margin-top: 4%; }
.c-rsvp { font-size: clamp(11px, 2.1vw, 15px); margin-top: 3%; }
.c-spacer { flex: 1; }
.card[dir="rtl"] .card-inner { direction: rtl; }
.hebrew-font, .card .he { font-family: 'David Libre', 'Frank Ruhl Libre', 'Noto Serif Hebrew', 'Times New Roman', serif; }

@media print {
  body * { visibility: hidden; }
  #card, #card * { visibility: visible; }
  #card { position: fixed; inset: 0; margin: auto; box-shadow: none; border-radius: 0; }
  .actions, .editor, .topbar, .footer { display: none !important; }
}
