/* The guest page's own screens, over the invitation's palette. Every colour is a token from palettes.json. */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url(../fonts/vazirmatn-arabic-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url(../fonts/vazirmatn-arabic-latin-700-normal.woff2) format("woff2"); }

/* The open letter leaves room for the answer dock, and a long name stays on the envelope. */
.guest-page { --dock: 118px; }
.guest-page.guest-voice { --dock: 210px; }
.guest-page .hero { min-height: calc(min(100vh, 900px) - 32px - var(--frame) - var(--dock)); min-height: calc(min(100svh, 900px) - 32px - var(--frame) - var(--dock)); }
.guest-page #invite { padding-bottom: calc(44px + var(--dock)); }
.guest-page .guest { padding-inline: 8%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.gp, .gp *, .gp *::before, .gp *::after, .gp-dock, .gp-dock * { box-sizing: border-box; }
.gp, .gp-dock { font-family: Vazirmatn, Tahoma, sans-serif; font-size: 16px; line-height: 1.5; color: var(--ivory); }
.gp { min-height: 100vh; min-height: 100svh; background: linear-gradient(180deg, var(--guest-top) 0%, var(--guest-upper) 22%, var(--deep-800) 36%, var(--deep-900) 60%, var(--deep-950) 100%); }
.gp p, .gp h1, .gp-dock p { margin: 0; }
.gp a { color: inherit; text-decoration: none; }
.gp [tabindex="-1"]:focus { outline: none; }
.gp-col { width: min(100%, 430px); min-height: 100vh; min-height: 100svh; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px)); }
.gp-col.answered, .gp-col.deadline { padding-top: max(28px, env(safe-area-inset-top, 0px)); }
.gp-col.over { align-items: center; justify-content: center; text-align: center; gap: 18px; padding-inline: 24px; }
.gp-col.invalid, .gp-col.failed { align-items: center; justify-content: center; text-align: center; gap: 12px; padding-inline: 32px; }
.gp-col.failed .gp-btn { margin-top: 12px; }

.gp-head { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.gp-head.gp-gap { align-items: center; gap: 8px; }
.gp-title { font-family: var(--font-display); font-weight: 700; font-size: 25px; line-height: var(--lh-heading); color: var(--gold-hi); overflow-wrap: anywhere; }
.answer .gp-title { font-size: 24px; }
h1.gp-title { font-family: inherit; font-size: 24px; line-height: 1.3; color: var(--ivory); text-wrap: balance; }
.gp-muted { color: var(--guest-muted); }
.gp-strong { color: var(--ivory); white-space: nowrap; }
.gp-small { font-size: 13px; line-height: 1.5; }
.gp-center { text-align: center; }
.gp-h3 { font-size: 18px; font-weight: 700; line-height: 1.35; }
.gp-grow { flex: 1; min-width: 0; }
.gp-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gp-error { color: var(--guest-error); text-align: center; }

.gp-card { display: block; width: 100%; background: var(--guest-card); border: 1px solid var(--guest-line); border-radius: 26px; padding: 16px; color: var(--ivory); }
.gp-facts { padding-block: 2px; }
.gp-fact { min-height: 46px; }
.gp-fact b { text-align: end; overflow-wrap: anywhere; min-width: 0; }

.gp-choice { display: flex; flex-direction: column; gap: 14px; font: inherit; }
.gp-choice.on { box-shadow: 0 0 0 2px var(--guest-ring); }
.gp-choice-head { display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.gp-card.gp-choice-head { padding: 16px; background: var(--guest-card); border: 1px solid var(--guest-line); }

.gp-stepper { display: flex; align-items: center; gap: 6px; }
.gp-step { width: 48px; height: 48px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--guest-control); color: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--guest-line); cursor: pointer; }
.gp-step:disabled { opacity: .4; cursor: default; }
.gp-num { min-width: 32px; text-align: center; font-size: 32px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }

.gp-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.gp-tile { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--tile-on); }
.gp-tile .gp-ico { stroke-width: 2.3; }
.gp-tile.big { width: 60px; height: 60px; border-radius: 18px; }
.gp-tile.big .gp-ico { width: 30px; height: 30px; }
.t-green { background: var(--tile-green); }
.t-orange { background: var(--tile-orange); }
.t-gold { background: var(--tile-gold); color: var(--tile-on-gold); }

.gp-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 20px; border: 0; border-radius: 999px; background: var(--guest-primary); color: var(--guest-on-primary); font: inherit; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; }
.gp a.gp-btn.ghost, .gp-btn.ghost { background: var(--guest-fill); color: var(--ivory); }
.gp-btn:disabled { opacity: .6; cursor: default; }
.gp-link { background: none; border: 0; padding: 10px 4px; font: inherit; font-weight: 700; color: var(--guest-primary-text); cursor: pointer; }

.gp-dock { position: fixed; z-index: 25; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px max(16px, calc(50% - 215px + 16px)) max(12px, env(safe-area-inset-bottom, 0px)); background: var(--deep-900); box-shadow: 0 -1px 0 var(--line-gold), 0 -10px 30px var(--shadow); text-align: center; }
/* With the gift entry or the condolence card, the dock grows with what it holds (guest.js measures it) and scrolls when that is more than the screen can spare. */
.gp-dock.gp-extras { gap: 8px; max-height: 70vh; max-height: 70svh; overflow-y: auto; overscroll-behavior: contain; }

.gp-mini-frame { width: 220px; height: 322px; flex: none; align-self: center; box-shadow: 0 18px 40px var(--shadow); }
.gp-mini { display: block; width: 100%; height: 100%; }
.gp-mini-display { font-family: var(--font-display); font-weight: 700; }
.gp-mini-strong { font-family: Vazirmatn, Tahoma, sans-serif; font-weight: 700; }
.gp-mini-body { font-family: Vazirmatn, Tahoma, sans-serif; }

/* The voice message: a note on the closed envelope, and the player in the dock once the letter opens. */
.gp-voice-note { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 6px 16px; border-radius: 999px; background: var(--guest-fill); color: var(--ivory); font-family: Vazirmatn, Tahoma, sans-serif; font-size: 14px; line-height: 1.45; max-width: calc(100% - 32px); transition: opacity .3s; }
.gp-voice-note .gp-ico { width: 20px; height: 20px; color: var(--guest-primary-text); }
#stage.opening .gp-voice-note { opacity: 0; }
.gp-voice { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--guest-card); border: 1px solid var(--guest-line); border-radius: 22px; text-align: start; }
.gp-voice-row { display: flex; align-items: center; gap: 12px; }
.gp-play, .gp-mute { flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.gp-play { width: 48px; height: 48px; background: var(--guest-primary); color: var(--guest-on-primary); }
.gp-play[aria-busy="true"] { opacity: .7; }
.gp-mute { width: 44px; height: 44px; background: var(--guest-control); color: var(--ivory); }
.gp-mute[aria-pressed="true"] { background: var(--guest-fill); box-shadow: inset 0 0 0 1.5px var(--guest-ring); }
.gp-shape { width: 22px; height: 22px; fill: currentColor; display: block; }
.gp-wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.gp-wave i { width: 3px; flex: none; border-radius: 2px; background: var(--guest-wave-rest); }
.gp-wave i.on { background: var(--guest-primary-text); }
.gp-voice-text { font-weight: 700; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
