/* The royal guest flow is a single illustrated invitation, not a short card
   vertically centered inside a taller maroon phone shell. */
body[data-theme="royal-burgundy"] .flow-wrap .phone-shell,
body[data-theme="royal-burgundy"] .desktop-stage .phone-shell.invitation-phone {
  border:0;
  border-radius:24px;
  padding:0;
  background:transparent;
  box-shadow:0 26px 70px #21000780;
}
body[data-theme="royal-burgundy"] .phone-shell .notch {display:none}
body[data-theme="royal-burgundy"] .desktop-stage .phone-shell.invitation-phone .phone-content.cover-content {
  min-height:min(100dvh,844px);
  height:auto;
  border:0;
  border-radius:24px;
  overflow:hidden;
  background:#fff4df url('/assets/celebration-frame-tall.png') center center/cover no-repeat;
}
body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.form-page {
  min-height:min(100dvh,844px);
  height:auto;
  border:0;
  border-radius:24px;
  overflow:hidden;
  background:#fff4df url('/assets/celebration-frame-tall.png') center center/cover no-repeat;
  padding:62px 34px 115px;
}
body[data-theme="royal-burgundy"] .form-page .step-back {
  position:absolute;
  top:20px;
  left:20px;
  z-index:5;
  min-height:30px;
  margin:0;
  padding:4px 12px;
  border:1px solid #d8bc8b;
  border-radius:999px;
  background:#fffaf0e8;
  color:#651323;
  font:12px Georgia,serif;
  box-shadow:0 3px 12px #4b130f24;
}
body[data-theme="royal-burgundy"] .form-page .progress-meta {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  margin:0 auto 9px;
  color:#9f773d;
  font:11px Georgia,serif;
  letter-spacing:.14em;
}
body[data-theme="royal-burgundy"] .form-page .progress {display:none}
body[data-theme="royal-burgundy"] .form-page .crown {margin:6px auto 7px;font-size:24px;color:#ae833d}
body[data-theme="royal-burgundy"] .form-page h2 {
  margin:4px auto 8px;
  max-width:14ch;
  font:400 clamp(28px,7.5vw,36px)/1.05 Georgia,serif;
  letter-spacing:-.035em;
  text-wrap:balance;
}
body[data-theme="royal-burgundy"] .form-page h4 {font:400 19px/1.2 Georgia,serif}
body[data-theme="royal-burgundy"] .form-page p {font:15px/1.4 Georgia,serif;max-width:29ch}
body[data-theme="royal-burgundy"] .form-page .primary-btn {
  min-height:51px;
  transition:transform .22s ease,filter .22s ease,box-shadow .22s ease;
}
body[data-theme="royal-burgundy"] .form-page .primary-btn:hover {transform:translateY(-2px);filter:brightness(1.1);box-shadow:0 9px 20px #510b1e42}
body[data-theme="royal-burgundy"] .form-page .primary-btn:active {transform:translateY(1px) scale(.99)}
body[data-theme="royal-burgundy"] .form-page .primary-btn[disabled] {position:relative;opacity:.9;cursor:progress}
body[data-theme="royal-burgundy"] .form-page .primary-btn[disabled]::after {
  content:'';
  display:inline-block;
  width:13px;
  height:13px;
  margin-left:10px;
  vertical-align:-2px;
  border:2px solid #fff9;
  border-top-color:#fff;
  border-radius:50%;
  animation:kislap-send-spin .85s linear infinite;
}
@keyframes kislap-send-spin {to {transform:rotate(360deg)}}
body[data-theme="royal-burgundy"] .screen.active .form-page {animation:kislap-step-in .42s cubic-bezier(.2,.7,.2,1) both}
@keyframes kislap-step-in {from {opacity:.45;transform:translateY(12px)} to {opacity:1;transform:translateY(0)}}

@media(max-width:750px) {
  body[data-theme="royal-burgundy"] .flow-wrap {
    display:block;
    min-height:0;
    padding:0;
  }
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell {
    width:min(100%,440px);
    max-width:440px;
    min-height:0;
    border-radius:0;
    box-shadow:none;
  }
  body[data-theme="royal-burgundy"] .desktop-stage .phone-shell.invitation-phone .phone-content.cover-content {
    min-height:100dvh;
    border-radius:0;
  }
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.form-page {
    min-height:100dvh;
    border-radius:0;
    padding:70px 29px calc(115px + env(safe-area-inset-bottom));
  }
  body[data-theme="royal-burgundy"] [data-screen="name"] .royal-scrapbook,
  body[data-theme="royal-burgundy"] [data-screen="prayer"] .circle-photo.small {display:none}
  body[data-theme="royal-burgundy"] [data-screen="name"] .royal-paper-panel {margin:0;padding:0}
  body[data-theme="royal-burgundy"] [data-screen="name"] .form-page h2 {margin-top:14px}
  body[data-theme="royal-burgundy"] [data-screen="name"] .entry-label {margin:30px 0 6px}
  body[data-theme="royal-burgundy"] [data-screen="name"] .input-card {min-height:53px;margin:0 0 22px}
  body[data-theme="royal-burgundy"] [data-screen="name"] .primary-btn {margin-top:2px}
  body[data-theme="royal-burgundy"] .verse-page .search-box {min-height:52px;margin-top:18px;background:#fffaf3ec}
  body[data-theme="royal-burgundy"] .verse-page .verse-results {max-height:clamp(155px,29dvh,250px);overscroll-behavior:contain}
  body[data-theme="royal-burgundy"] .verse-page .verse-item {min-height:47px;padding:8px 11px;background:#fffaf2ed}
  body[data-theme="royal-burgundy"] .verse-page .empty-note {background:#fffaf2ed;border:1px solid #e5cfaa;border-radius:10px;padding:13px}
  body[data-theme="royal-burgundy"] .verse-page .version-tabs {margin:12px 0}
  body[data-theme="royal-burgundy"] .verse-page #verseNext {margin-top:16px}
  body[data-theme="royal-burgundy"] .selfie-page h2 {font-size:clamp(27px,7vw,32px)}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle {width:112px;height:112px;margin:7px auto 5px}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle .camera {font-size:25px}
  body[data-theme="royal-burgundy"] .selfie-page .role-card {margin-top:5px}
  body[data-theme="royal-burgundy"] .selfie-page .role-card h4 {margin:6px auto 8px;font-size:17px}
  body[data-theme="royal-burgundy"] .selfie-page .role-option {min-height:37px;margin:4px 0;padding:5px 13px}
  body[data-theme="royal-burgundy"] .selfie-page .accept-row {margin:7px auto;padding:6px 8px}
  body[data-theme="royal-burgundy"] .selfie-page #submitResponse {margin-top:8px}
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.selfie-page {padding-bottom:calc(85px + env(safe-area-inset-bottom))}
  body[data-theme="royal-burgundy"] .done-page {justify-content:flex-start;padding-top:92px!important}
  body[data-theme="royal-burgundy"] .done-page .done-card {margin:15px auto 10px}
  body[data-theme="royal-burgundy"] .invitation-footer {padding:18px 12px calc(22px + env(safe-area-inset-bottom));gap:3px;background:#3c0612}
  body[data-theme="royal-burgundy"] .invitation-footer span {font-size:11px}
}

@media(max-width:380px) {
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.form-page {padding-inline:24px}
  body[data-theme="royal-burgundy"] .selfie-page .role-option {font-size:13px}
}

@media(prefers-reduced-motion:reduce) {
  body[data-theme="royal-burgundy"] .screen.active .form-page,
  body[data-theme="royal-burgundy"] .form-page .primary-btn[disabled]::after {animation:none}
}

.invitation-quiet-links{display:flex;align-items:center;justify-content:center;gap:9px;margin:9px 0 0;font:10px Georgia,serif;letter-spacing:.025em}
.invitation-quiet-links a{color:#6d3d30;text-decoration:none;border-bottom:1px solid #9e7c5966;padding:3px 0}
.invitation-quiet-links a:hover,.invitation-quiet-links a:focus-visible{color:#6e0920;border-color:#9e7c59}
.invitation-quiet-links span{color:#9e7c59}
.gallery-loading,.gallery-error{display:block;width:min(100%,470px);margin:30px auto;padding:26px 20px;border:1px solid #cba46e88;border-radius:15px;background:#32071199;color:#f8e8cb;text-align:center;font:italic 18px Georgia,serif}
.gallery-loading::before{content:'✦';display:block;margin-bottom:9px;color:#e8c787;animation:loadingSpark 1.5s ease-in-out infinite alternate}
.gallery-error button{margin-top:12px;padding:8px 20px;border:1px solid #d3af78;border-radius:22px;background:#f9ebd1;color:#5e1322}
.response-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.response-card-footer button{border:1px solid #bfa99e;border-radius:7px;background:#fff9f3;color:#7b2932;padding:7px 10px;font-size:11px}
.response-card-footer button:hover,.response-card-footer button:focus-visible{border-color:#8d303c;background:#f8e9e5}

@media(max-width:750px){
  body[data-theme="royal-burgundy"][data-active-screen]:not([data-active-screen="gallery"]){height:100dvh;overflow-y:hidden}
  body[data-theme="royal-burgundy"][data-active-screen]:not([data-active-screen="gallery"]) .app-shell{height:100dvh;min-height:0}
  body[data-theme="royal-burgundy"][data-active-screen]:not([data-active-screen="gallery"]) .screen.active{height:100dvh;min-height:0;overflow:hidden}
  body[data-theme="royal-burgundy"] .invitation-footer{display:none}
  body[data-theme="royal-burgundy"] .desktop-stage{height:100dvh;min-height:0;padding:0}
  body[data-theme="royal-burgundy"] .desktop-stage .phone-shell.invitation-phone,
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell{height:100dvh;min-height:0}
  body[data-theme="royal-burgundy"] .desktop-stage .phone-shell.invitation-phone .phone-content.cover-content{
    display:flex;flex-direction:column;height:100dvh;min-height:0;overflow-y:auto;
    padding:clamp(8px,2dvh,18px) 16px calc(12px + env(safe-area-inset-bottom));
  }
  body[data-theme="royal-burgundy"] .cover-photo-wrap{height:clamp(170px,35dvh,285px);min-height:0;flex:none;margin:clamp(8px,2dvh,18px) 5px 0}
  body[data-theme="royal-burgundy"] .cover-copy-mobile{margin:0 3px;padding:3px 7px 0}
  body[data-theme="royal-burgundy"] .flow-wrap{height:100dvh;min-height:0;padding:0}
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.form-page{
    height:100dvh;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    padding:clamp(30px,5dvh,48px) 25px calc(22px + env(safe-area-inset-bottom));
  }
  body[data-theme="royal-burgundy"] .done-page{padding-top:clamp(48px,7dvh,72px)!important}
}
@media(max-width:750px) and (max-height:720px){
  body[data-theme="royal-burgundy"] .flow-wrap .phone-shell .phone-content.form-page{padding-top:31px;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  body[data-theme="royal-burgundy"] .verse-page .verse-results{max-height:clamp(100px,21dvh,155px)}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle{width:84px;height:84px;margin:4px auto 2px}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle{gap:2px}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle .camera{font-size:21px;line-height:1}
  body[data-theme="royal-burgundy"] .selfie-page .selfie-circle small{max-width:65px;font-size:9px;line-height:1.05}
  body[data-theme="royal-burgundy"] .selfie-page .role-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px;margin-top:2px}
  body[data-theme="royal-burgundy"] .selfie-page .role-card h4,
  body[data-theme="royal-burgundy"] .selfie-page .accept-row{grid-column:1/-1}
  body[data-theme="royal-burgundy"] .selfie-page .role-card h4{margin:2px auto 4px}
  body[data-theme="royal-burgundy"] .selfie-page .role-option{display:flex;align-items:center;gap:5px;min-height:38px;margin:0;padding:4px 6px;font-size:12px}
  body[data-theme="royal-burgundy"] .selfie-page .role-option input{flex:none}
  body[data-theme="royal-burgundy"] .selfie-page .accept-row{margin:4px 0;padding:4px 6px;font-size:10px}
  body[data-theme="royal-burgundy"] .selfie-page #submitResponse{margin-top:6px}
  body[data-theme="royal-burgundy"] .done-page{padding-top:44px!important}
  body[data-theme="royal-burgundy"] .done-page .done-card{margin:8px auto}
}
@media(prefers-reduced-motion:reduce){.gallery-loading::before{animation:none}}
