/* ============ Save the date tab: the editor beside its preview ============ */
.iv-wrap{display:grid; grid-template-columns:minmax(330px, 450px) minmax(0, 1fr); gap:30px; align-items:start}
.iv-form{display:flex; flex-direction:column; gap:12px; min-width:0}
.iv-jump{display:none}

/* each part of the page is a card that folds away */
.iv-group{background:var(--card); border:1px solid var(--line); border-radius:10px; box-shadow:0 1px 0 var(--line-soft)}
.iv-group > summary{list-style:none; cursor:pointer; padding:14px 44px 14px 18px; position:relative; display:flex; flex-direction:column; gap:1px; border-radius:10px}
.iv-group > summary::-webkit-details-marker, .iv-step > summary::-webkit-details-marker{display:none}
.iv-group > summary::after{content:''; position:absolute; right:20px; top:50%; width:8px; height:8px; margin-top:-7px;
  border-right:1.5px solid var(--ink-soft); border-bottom:1.5px solid var(--ink-soft); transform:rotate(45deg); transition:transform .2s ease}
.iv-group[open] > summary::after{transform:rotate(-135deg); margin-top:-2px}
.iv-group-title{font-family:var(--serif); font-weight:600; font-size:20px; line-height:1.2; color:var(--ink)}
.iv-group-sub{font-size:12.5px; color:var(--ink-soft)}
.iv-group > summary:hover .iv-group-title{color:var(--accent-deep)}
.iv-group-body{padding:4px 18px 18px; display:flex; flex-direction:column; gap:14px}
.iv-form .field textarea{width:100%; padding:8px 10px; font-size:14px; line-height:1.45; resize:vertical; min-height:60px}
.iv-two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.iv-check{display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--ink); cursor:pointer; padding:3px 0}
.iv-check input{width:16px; height:16px; accent-color:var(--accent); flex:none}
#iv-rsvp-more{display:flex; flex-direction:column; gap:14px}

/* envelope colours */
.iv-themes{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px}
.iv-theme{display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 4px 7px; background:#fff;
  border:1px solid var(--line); border-radius:8px; font-size:12px; color:var(--ink-soft)}
.iv-theme svg{width:44px; height:32px; display:block; filter:drop-shadow(0 2px 3px rgba(46,44,38,.18))}
.iv-theme:hover{border-color:var(--accent)}
.iv-theme.on{border-color:var(--accent-deep); box-shadow:0 0 0 1px var(--accent-deep); color:var(--ink)}

/* the seal and its wax: small pictures of the real seal, made by js/invite-seals.js */
@font-face{font-family:'Great Vibes'; font-style:normal; font-weight:400; font-display:swap; src:url(../fonts/great-vibes-normal-400-latin.woff2) format('woff2')}
.iv-pick-name{font-style:normal; font-weight:400; color:var(--ink-soft); text-transform:none; letter-spacing:0; margin-left:6px}
.iv-seals{display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:6px}
.iv-waxes{display:grid; grid-template-columns:repeat(8, minmax(0, 1fr)); gap:6px}
.iv-seal, .iv-wax{position:relative; display:flex; align-items:center; justify-content:center; padding:5px 2px; background:#fff;
  border:1px solid var(--line); border-radius:8px; min-height:44px}
.iv-seal img{width:48px; height:48px; max-width:100%; object-fit:contain; display:block; filter:drop-shadow(0 1.5px 2px rgba(46,44,38,.35))}
.iv-wax img{width:34px; height:34px; max-width:100%; object-fit:contain; display:block; filter:drop-shadow(0 1px 1.5px rgba(46,44,38,.35))}
.iv-wax i{position:absolute; left:0; right:0; bottom:2px; font-style:normal; font-size:9px; line-height:1; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); text-align:center}
.iv-wax[data-wax=""]{padding-bottom:12px}
.iv-seal:hover, .iv-wax:hover{border-color:var(--accent)}
.iv-seal.on, .iv-wax.on{border-color:var(--accent-deep); box-shadow:0 0 0 1px var(--accent-deep)}

/* heading designs: each a small live picture with the couple's own heading */
.iv-heads{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px}
.iv-head{display:flex; align-items:center; justify-content:center; padding:7px 5px; min-height:58px; border:1px solid var(--line); border-radius:8px;
  background:linear-gradient(180deg, #dcebf0, #f2eee2)}
.iv-head[data-tone="dark"]{background:linear-gradient(180deg, #17363e, #275451)}
.iv-head-art{display:block; width:100%; pointer-events:none}
.iv-head-art svg{display:block; width:100%; height:auto; overflow:visible}
.iv-head:hover{border-color:var(--accent)}
.iv-head.on{border-color:var(--accent-deep); box-shadow:0 0 0 1px var(--accent-deep)}

/* lettering styles for the names and date, each shown with the couple's names */
.iv-letters{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px}
.iv-letter{display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 6px 6px; background:#fff; border:1px solid var(--line); border-radius:8px; min-width:0}
.iv-letter-n{display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#33322c; line-height:1.25}
.iv-letter-n i{font-style:normal}
.iv-letter-n[data-l="script"]{font-family:'Great Vibes', cursive; font-size:24px}
.iv-letter-n[data-l="italic"]{font-family:'Cormorant Garamond', Georgia, serif; font-style:italic; font-weight:500; font-size:21px}
.iv-letter-n[data-l="italic"] i{font-family:'Great Vibes', cursive}
.iv-letter-n[data-l="capitals"]{font-family:'Cormorant Garamond', Georgia, serif; font-weight:600; font-size:14.5px; text-transform:uppercase; letter-spacing:.14em; padding:5px 0 4px}
.iv-letter-n[data-l="capitals"] i{font-family:'Great Vibes', cursive; text-transform:none; letter-spacing:0; font-size:1.45em; line-height:0; font-weight:400}
.iv-letter-n[data-l="roman"]{font-family:'Cormorant Garamond', Georgia, serif; font-size:21px}
.iv-letter-n[data-l="roman"] i{font-style:italic}
.iv-letter-l{font-size:11px; color:var(--ink-soft)}
.iv-letter:hover{border-color:var(--accent)}
.iv-letter.on{border-color:var(--accent-deep); box-shadow:0 0 0 1px var(--accent-deep)}

/* a two- or three-way switch */
.iv-seg{display:inline-flex; flex-wrap:wrap; border:1px solid var(--line); border-radius:7px; overflow:hidden; background:#fff}
.iv-seg button{border:none; background:transparent; padding:7px 12px; font-size:12.5px; color:var(--ink-soft); border-right:1px solid var(--line)}
.iv-seg button:last-child{border-right:none}
.iv-seg button:hover{background:var(--accent-tint)}
.iv-seg button.on{background:var(--accent-deep); color:#fdfcf7}

/* a picture slot: small view, choose or replace, remove */
.iv-img{display:flex; gap:12px; align-items:center; min-width:0}
.iv-thumb{flex:none; width:64px; height:64px; border-radius:7px; border:1px dashed var(--line);
  background-color:var(--accent-tint); background-position:center; background-size:cover; background-repeat:no-repeat;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='42' cy='22' r='6' fill='%23c9bfa6'/%3E%3Cpath d='M8 50l14-18 9 11 7-8 18 15z' fill='%23c9bfa6'/%3E%3C/svg%3E")}
.iv-img.has .iv-thumb{border-style:solid; background-color:#e9e2d2}
.iv-img.busy .iv-thumb{opacity:.45}
.iv-img-main{display:flex; flex-direction:column; gap:3px; min-width:0}
.iv-img-label{font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--ink-soft); font-weight:700}
.iv-img-main .hint{margin:0}
.iv-img-actions{display:flex; flex-wrap:wrap; gap:6px; margin-top:3px}

/* the steps of the story */
.iv-steps{display:flex; flex-direction:column; gap:8px}
.iv-none{margin:0}
.iv-step{border:1px solid var(--line); border-radius:8px; background:#fff}
.iv-step > summary{list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; padding:7px 6px 7px 10px}
.iv-step-n{flex:none; width:22px; height:22px; border-radius:50%; border:1px solid var(--sand); color:var(--sand);
  display:flex; align-items:center; justify-content:center; font-family:var(--serif); font-size:13px; line-height:1}
.iv-step[open] .iv-step-n{background:var(--sand); color:#fff}
.iv-step-title{flex:1; min-width:0; font-size:14px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.iv-step-tools{flex:none; display:flex; gap:0}
.iv-step-tools .icon-btn{min-width:30px; min-height:30px}
.iv-step-body{padding:6px 12px 14px; display:flex; flex-direction:column; gap:12px; border-top:1px solid var(--line-soft)}
.iv-photos{display:flex; flex-direction:column; gap:10px}
.iv-photos .iv-thumb{width:52px; height:52px}

/* the seam where publishing will plug in */
.iv-publish{border:1px solid var(--sand); border-radius:10px; padding:18px; background:var(--sand-tint)}
.iv-publish h3{margin-bottom:4px}
.iv-publish p{font-size:13.5px; color:var(--ink); margin:0 0 8px; max-width:46ch}
.iv-publish .iv-price strong{font-family:var(--serif); font-size:24px; font-weight:500; margin-right:4px}
.iv-publish .btn{margin:4px 0 8px}
.iv-publish .hint{margin:0}

/* ---------- the preview ---------- */
.iv-preview{position:sticky; top:14px; min-width:0}
.iv-bar{display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; margin-bottom:12px}
.iv-bar a.btn{text-decoration:none; display:inline-flex; align-items:center}
.iv-stage{position:relative; width:100%; overflow:hidden; min-height:200px}
/* a true phone or desktop viewport, scaled to fit by the script */
.iv-device{position:absolute; left:50%; top:0; width:390px; height:780px; transform-origin:top left; translate:calc(-50% * var(--k, 1)) 0;
  background:#f4efe3; border:1px solid var(--line); overflow:hidden;
  box-shadow:0 30px 60px -34px rgba(46,44,38,.55), 0 2px 0 var(--line-soft)}
.iv-device{box-sizing:content-box}
.iv-stage[data-size="phone"] .iv-device{border-radius:30px; border:7px solid #2e2c26}
.iv-stage[data-size="desktop"] .iv-device{border-radius:8px}
.iv-device iframe{width:100%; height:100%; border:0; display:block; background:#f4efe3}
.iv-preview-note{text-align:center; margin:10px auto 0}

@media (max-width:1000px){
  .iv-wrap{grid-template-columns:minmax(0, 1fr); gap:22px}
  .iv-preview{position:static}
  .iv-jump{display:block}
}
@media (max-width:480px){
  .iv-two{grid-template-columns:1fr}
  .iv-seals{grid-template-columns:repeat(4, minmax(0, 1fr))}
  .iv-waxes{grid-template-columns:repeat(5, minmax(0, 1fr))}
  .iv-seal img{width:54px; height:54px}
  .iv-heads{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .iv-group > summary{padding:13px 40px 13px 14px}
  .iv-group-body{padding:4px 14px 16px}
  .iv-step-tools .icon-btn{min-width:36px; min-height:36px}
}
