/* Share pages (friendship quiz, giveaway, wedding invitation): the public pages at /s/<code>, their manage pages,
   and the parts of the maker tools they share (result panel, "made on this device" list). Loaded only on those pages. */

/* ---------- colour themes (quiz and giveaway) ---------- */
.sh-t-coral { --sh-a: #FF5B35; --sh-b: #FF9F43; --sh-ink: #B8380F; --sh-soft: #FFF1EC; }
.sh-t-violet { --sh-a: #7C3AED; --sh-b: #DB2777; --sh-ink: #6D28D9; --sh-soft: #F4EEFF; }
.sh-t-ocean { --sh-a: #0284C7; --sh-b: #4F46E5; --sh-ink: #0369A1; --sh-soft: #EAF6FF; }
.sh-t-emerald { --sh-a: #059669; --sh-b: #0D9488; --sh-ink: #047857; --sh-soft: #E8FBF3; }
.sh-t-rose { --sh-a: #E11D48; --sh-b: #F472B6; --sh-ink: #BE123C; --sh-soft: #FFEEF2; }
.sh-t-midnight { --sh-a: #4F46E5; --sh-b: #0EA5E9; --sh-ink: #4338CA; --sh-soft: #EEF0FF; }
.sh-t-sunset { --sh-a: #EA580C; --sh-b: #DB2777; --sh-ink: #C2410C; --sh-soft: #FFF4EA; }
[data-theme="dark"] .sh-page { --sh-soft: color-mix(in srgb, var(--sh-a) 16%, var(--surface)); --sh-ink: color-mix(in srgb, var(--sh-a) 55%, #fff); }

/* ---------- page ---------- */
.sh-page { --sh-a: #FF5B35; --sh-b: #FF9F43; --sh-ink: #B8380F; --sh-soft: #FFF1EC; min-height: 70vh; padding: 28px 16px 40px;
  background: radial-gradient(900px 420px at 10% -10%, color-mix(in srgb, var(--sh-a) 16%, transparent), transparent 70%),
              radial-gradient(800px 420px at 100% 0%, color-mix(in srgb, var(--sh-b) 14%, transparent), transparent 70%), var(--bg); }
.sh-wrap { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.sh-wrap.sh-wide { max-width: 980px; }
.sh-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 10px 40px rgba(20, 20, 40, .08); display: flex; flex-direction: column; gap: 14px; position: relative; }
.sh-card h1, .sh-card h2 { margin: 0; color: var(--ink); }
.sh-card h1 { font: 800 clamp(28px, 6vw, 40px)/1.12 var(--f-body); letter-spacing: -.02em; }
.sh-card h2 { font: 700 20px/1.25 var(--f-body); }
.sh-card h1 em { font-style: normal; background: linear-gradient(90deg, var(--sh-a), var(--sh-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sh-card p { margin: 0; }
.sh-center { align-items: center; text-align: center; }
.sh-center > svg { width: 46px; height: 46px; color: var(--sh-a); }
.sh-kicker { font: 700 12.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--sh-ink); }
.sh-hero { text-align: center; align-items: center; overflow: hidden; }
.sh-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--sh-a), var(--sh-b)); }
.sh-avatar { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font: 800 38px/1 var(--f-body); color: #fff; background: linear-gradient(135deg, var(--sh-a), var(--sh-b)); box-shadow: 0 8px 24px color-mix(in srgb, var(--sh-a) 40%, transparent); }
.sh-btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 14px 26px; border-radius: 999px;
  font: 700 16.5px/1 var(--f-body); color: #fff; background: linear-gradient(90deg, var(--sh-a), var(--sh-b)); box-shadow: 0 8px 22px color-mix(in srgb, var(--sh-a) 35%, transparent); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.sh-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px color-mix(in srgb, var(--sh-a) 42%, transparent); }
.sh-btn:active { transform: translateY(1px); }
.sh-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.sh-btn.wide { width: 100%; }
.sh-btn.soft { background: var(--sh-soft); color: var(--sh-ink); box-shadow: none; }
.sh-btn svg { width: 20px; height: 20px; }
.sh-input { width: 100%; box-sizing: border-box; min-height: 54px; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 500 17px/1.2 var(--f-body); }
.sh-input:focus { outline: none; border-color: var(--sh-a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sh-a) 15%, transparent); }
.sh-form { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.sh-form label { display: flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.sh-form label small { font-weight: 500; color: var(--muted); }
.sh-err { color: var(--bad); font-weight: 600; font-size: 14.5px; }
.sh-meta { color: var(--muted); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.sh-meta b { color: var(--ink); }

/* ---------- quiz ---------- */
.qz-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.qz-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--sh-a), var(--sh-b)); border-radius: 99px; transition: width .35s; }
.qz-count { font: 700 13px/1 var(--f-body); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.qz-q { font: 800 clamp(22px, 5vw, 28px)/1.25 var(--f-body); color: var(--ink); margin: 4px 0 2px; letter-spacing: -.01em; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-opts.one { grid-template-columns: 1fr; }
.qz-opt { appearance: none; text-align: left; cursor: pointer; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 16px; font: 600 16.5px/1.3 var(--f-body); min-height: 64px; display: flex; align-items: center; gap: 10px; transition: transform .1s, border-color .15s, background .15s; }
.qz-opt:hover:not(:disabled) { border-color: var(--sh-a); background: var(--sh-soft); transform: translateY(-1px); }
.qz-opt:disabled { cursor: default; }
.qz-opt.ok { border-color: #16A34A; background: #E9F9EF; color: #14532D; animation: qz-pop .3s; }
.qz-opt.no { border-color: #DC2626; background: #FDECEC; color: #7F1D1D; animation: qz-shake .3s; }
.qz-opt.mine { border-color: var(--sh-a); background: var(--sh-soft); }
.qz-opt.dim { opacity: .55; }
[data-theme="dark"] .qz-opt.ok { background: #12351F; color: #BBF7D0; }
[data-theme="dark"] .qz-opt.no { background: #3B1414; color: #FECACA; }
@keyframes qz-pop { 50% { transform: scale(1.04); } }
@keyframes qz-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.qz-ring { --p: 0; width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--sh-a) calc(var(--p) * 1%), var(--surface-2) 0); }
.qz-ring b { font: 800 44px/1 var(--f-body); color: var(--ink); }
.qz-ring small { display: block; font: 600 14px/1 var(--f-body); color: var(--muted); margin-top: 4px; text-align: center; }
.qz-rate { font: 800 24px/1.25 var(--f-body); color: var(--ink); text-align: center; }
.qz-review { display: flex; flex-direction: column; gap: 8px; }
.qz-review div { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; }
.qz-review div b { flex: none; }
.qz-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qz-board li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 600; }
.qz-board li.me { background: var(--sh-soft); outline: 2px solid var(--sh-a); }
.qz-board .rk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--surface); color: var(--muted); flex: none; }
.qz-board li:nth-child(1) .rk { background: #FCD34D; color: #78350F; }
.qz-board li:nth-child(2) .rk { background: #E5E7EB; color: #374151; }
.qz-board li:nth-child(3) .rk { background: #FDBA74; color: #7C2D12; }
.qz-board .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-board .sc { font-family: var(--f-num); color: var(--sh-ink); }

/* ---------- giveaway ---------- */
.gv-img { width: calc(100% + 52px); margin: -26px -26px 4px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px 22px 0 0; background: var(--surface-2); }
.gv-gift { width: 88px; height: 88px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, var(--sh-a), var(--sh-b)); color: #fff; box-shadow: 0 10px 26px color-mix(in srgb, var(--sh-a) 40%, transparent); }
.gv-gift svg { width: 46px; height: 46px; }
.gv-prize { font-size: 17px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.gv-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; margin: 0 auto; }
.gv-clock div { background: linear-gradient(160deg, var(--sh-a), var(--sh-b)); color: #fff; border-radius: 16px; padding: 12px 4px 10px; text-align: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--sh-a) 30%, transparent); }
.gv-clock b { display: block; font: 800 clamp(26px, 7vw, 36px)/1 var(--f-num); }
.gv-clock span { font: 700 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.gv-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.gv-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 600; }
.gv-steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sh-a); color: #fff; font-size: 14px; }
.gv-steps li.done::before { content: "✓"; background: #16A34A; }
.gv-steps a { margin-left: auto; flex: none; font-size: 14px; font-weight: 700; color: var(--sh-ink); text-decoration: none; padding: 7px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.gv-desc { white-space: pre-line; color: var(--ink); line-height: 1.6; }
.gv-win { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gv-win li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(90deg, #FEF3C7, #FDE68A); color: #713F12; font: 700 17px/1.3 var(--f-body); }
.gv-win li small { display: block; font: 600 13px/1.3 var(--f-body); opacity: .8; }
.gv-win li::before { content: "🏆"; font-size: 24px; }
.gv-fair { font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- shared: maker result, share buttons, secret code ---------- */
.sh-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sh-share a, .sh-share button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--f-body); text-decoration: none; cursor: pointer; }
.sh-share a:hover, .sh-share button:hover { border-color: var(--sh-a, var(--accent)); }
.sh-share .wa { background: #25D366; border-color: #25D366; color: #fff; }
.sh-share svg { width: 17px; height: 17px; }
.sh-link { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.sh-link input { flex: 1; min-width: 0; font: 600 15px/1.2 var(--f-num) !important; }
.sh-secret { border: 2px dashed color-mix(in srgb, var(--sh-a, var(--accent)) 60%, var(--line)); background: color-mix(in srgb, var(--sh-a, var(--accent)) 6%, var(--surface)); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.sh-secret .code { font: 800 clamp(19px, 6.4vw, 34px)/1.1 var(--f-num); letter-spacing: .06em; color: var(--ink); user-select: all; white-space: nowrap; }
.sh-secret p { font-size: 14px; color: var(--muted); margin: 0; }
.sh-done { display: flex; flex-direction: column; gap: 14px; }
.sh-done h3 { margin: 0; font: 800 24px/1.2 var(--f-body); }
.sh-mine { display: flex; flex-direction: column; gap: 8px; }
.sh-mine a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.sh-mine a small { margin-left: auto; color: var(--muted); font-weight: 500; }
.sh-open { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 560px) { .sh-open { grid-template-columns: 1fr; } }

/* ---------- manage pages ---------- */
.sh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sh-stats div { background: var(--surface-2); border-radius: 14px; padding: 14px; }
.sh-stats b { display: block; font: 800 26px/1.1 var(--f-body); color: var(--ink); }
.sh-stats span { font-size: 13px; color: var(--muted); }
.sh-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sh-table th, .sh-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sh-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sh-table tr.win td { background: #FEF9C3; }
[data-theme="dark"] .sh-table tr.win td { background: #3A3110; }
.sh-scroll { overflow-x: auto; }
.sh-x { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.sh-x:hover { color: var(--bad); background: var(--surface-2); }
.sh-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- footer on public pages ---------- */
.sh-foot { max-width: 640px; margin: 22px auto 0; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.sh-make { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; background: var(--surface); border: 2px solid var(--sh-a, var(--accent)); color: var(--sh-ink, var(--accent-text)); font: 800 16px/1 var(--f-body); text-decoration: none; }
.sh-make svg { width: 20px; height: 20px; }
.sh-foot .linkbtn { appearance: none; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- confetti ---------- */
.sh-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ---------- maker tools (quiz builder) ---------- */
.qb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.qb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: q; }
.qb-list li { counter-increment: q; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; }
.qb-list li::before { content: counter(q); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sh-soft, var(--accent-soft)); color: var(--sh-ink, var(--accent-text)); font-weight: 700; font-size: 12.5px; }
.qb-list li span { flex: 1; min-width: 0; }
.qb-list li b { color: var(--sh-ink, var(--accent-text)); }
.sh-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-themes label { cursor: pointer; }
.sh-themes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sh-themes span { display: block; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--sh-a), var(--sh-b)); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); }
.sh-themes input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.sh-themes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.rows-list { display: flex; flex-direction: column; gap: 8px; }
.rows-list .row { display: grid; gap: 8px; align-items: end; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }

/* ---------- wedding ---------- */
.wd-t-royal { --wd-bg1: #5B0E1B; --wd-bg2: #2E050C; --wd-ink: #F7E7C1; --wd-acc: #D9B25F; --wd-card: rgba(255, 240, 210, .06); }
.wd-t-emerald { --wd-bg1: #0B4D3B; --wd-bg2: #04261C; --wd-ink: #F3EBD3; --wd-acc: #D4AF37; --wd-card: rgba(255, 245, 210, .06); }
.wd-t-navy { --wd-bg1: #13254A; --wd-bg2: #070F24; --wd-ink: #F2E8CF; --wd-acc: #C9A54C; --wd-card: rgba(255, 245, 220, .06); }
.wd-t-mehndi { --wd-bg1: #2C5A1F; --wd-bg2: #152D0F; --wd-ink: #FFF6D6; --wd-acc: #F2C94C; --wd-card: rgba(255, 246, 200, .07); }
.wd-t-blush { --wd-bg1: #FFF4F2; --wd-bg2: #F6D6DE; --wd-ink: #5A2A3A; --wd-acc: #B76E79; --wd-card: rgba(255, 255, 255, .6); }
.wd-t-ivory { --wd-bg1: #FFFDF8; --wd-bg2: #EFE3CC; --wd-ink: #3B2F2A; --wd-acc: #9A7537; --wd-card: rgba(255, 255, 255, .65); }
.wd-t-sage { --wd-bg1: #FBFAF4; --wd-bg2: #DDE6D6; --wd-ink: #2F3B2E; --wd-acc: #5E7D56; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-nikah { --wd-bg1: #0F4A4F; --wd-bg2: #062A2E; --wd-ink: #F4EEDD; --wd-acc: #D2AE62; --wd-card: rgba(255, 245, 220, .06); }
.wd-t-truckart { --wd-bg1: #B0154F; --wd-bg2: #5E0A2F; --wd-ink: #FFF4DC; --wd-acc: #FFD54F; --wd-card: rgba(255, 240, 210, .08); }
.wd-t-garden { --wd-bg1: #FFFBF8; --wd-bg2: #F7E4E2; --wd-ink: #4A3A44; --wd-acc: #A9566F; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-editorial { --wd-bg1: #F7F4EE; --wd-bg2: #ECE5DA; --wd-ink: #1C1B1A; --wd-acc: #9C4A2F; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-monogram { --wd-bg1: #1A3F37; --wd-bg2: #0D241F; --wd-ink: #F3EBDD; --wd-acc: #D9BD7C; --wd-card: rgba(255, 245, 220, .06); }
.wd-t-noir { --wd-bg1: #1B1B1B; --wd-bg2: #050505; --wd-ink: #ECE4D2; --wd-acc: #D4AF37; --wd-card: rgba(255, 240, 200, .05); }
.wd-t-savedate { --wd-bg1: #F6F1EA; --wd-bg2: #E6DACB; --wd-ink: #2E2A26; --wd-acc: #8E5F43; --wd-card: rgba(255, 255, 255, .65); }
.wd-t-photo { --wd-bg1: #F7F1EA; --wd-bg2: #E6D8C6; --wd-ink: #3B302A; --wd-acc: #9C774C; --wd-card: rgba(255, 255, 255, .65); }
.wd-t-cover { --wd-bg1: #3A1F2B; --wd-bg2: #140B10; --wd-ink: #F4EADF; --wd-acc: #E0BF7A; --wd-card: rgba(255, 240, 220, .06); }
.wd-t-archway { --wd-bg1: #B65D3E; --wd-bg2: #8E3F25; --wd-ink: #FFF5EC; --wd-acc: #FCE3C8; --wd-card: rgba(255, 245, 230, .1); }
.wd-t-atelier { --wd-bg1: #F4F0E8; --wd-bg2: #E8E1D5; --wd-ink: #1A1917; --wd-acc: #1A1917; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-palace { --wd-bg1: #FCEAE0; --wd-bg2: #E6DAF0; --wd-ink: #4B2E3E; --wd-acc: #7A3E5E; --wd-card: rgba(255, 255, 255, .6); }
.wd-t-nikahline { --wd-bg1: #FBF8F1; --wd-bg2: #EFE7D6; --wd-ink: #2C3A36; --wd-acc: #1F4D45; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-bordeaux { --wd-bg1: #6A1F29; --wd-bg2: #3E0E15; --wd-ink: #F6EDE3; --wd-acc: #F3D7B8; --wd-card: rgba(255, 240, 230, .07); }
.wd-t-stone { --wd-bg1: #EEE8DE; --wd-bg2: #D6CEC1; --wd-ink: #3B3631; --wd-acc: #5F6D4A; --wd-card: rgba(255, 255, 255, .6); }
.wd-t-goldline { --wd-bg1: #FBF7F0; --wd-bg2: #EFE4CF; --wd-ink: #3F3A34; --wd-acc: #8E6A2B; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-wildflower { --wd-bg1: #FDFBF6; --wd-bg2: #E8EFDF; --wd-ink: #2F3A2C; --wd-acc: #4E6942; --wd-card: rgba(255, 255, 255, .7); }
.wd-t-noirink { --wd-bg1: #1A1A1A; --wd-bg2: #080808; --wd-ink: #F1EEE8; --wd-acc: #F1EEE8; --wd-card: rgba(255, 255, 255, .05); }
.wd-t-mehndipop { --wd-bg1: #D81E6A; --wd-bg2: #8A0D40; --wd-ink: #FFF4E6; --wd-acc: #FFD54F; --wd-card: rgba(255, 240, 220, .1); }
.wd-t-retro { --wd-bg1: #F6E9D6; --wd-bg2: #EBC9A8; --wd-ink: #4A2C1D; --wd-acc: #B5502B; --wd-card: rgba(255, 255, 255, .6); }
.wd-t-magazine { --wd-bg1: #2B2F38; --wd-bg2: #101217; --wd-ink: #F4F2EE; --wd-acc: #F1E2C8; --wd-card: rgba(255, 255, 255, .05); }
.sh-wedding.sh-page { background: radial-gradient(120% 80% at 50% 0%, var(--wd-bg1), var(--wd-bg2)); color: var(--wd-ink); --sh-a: var(--wd-acc); --sh-b: var(--wd-acc); --sh-ink: var(--wd-acc); }
.sh-wedding .sh-wrap { max-width: 720px; }
.sh-wedding .sh-wide { max-width: 980px; }
.sh-wedding .sh-card:not(.plain) { background: var(--wd-card); border: 1px solid color-mix(in srgb, var(--wd-acc) 45%, transparent); color: var(--wd-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); backdrop-filter: blur(6px); }
.sh-wedding .sh-card:not(.plain) h1:not(.wd-title), .sh-wedding .sh-card:not(.plain) h2 { color: var(--wd-ink); }
.sh-wedding .sh-foot { color: color-mix(in srgb, var(--wd-ink) 70%, transparent); }
.sh-wedding .sh-foot a { color: var(--wd-acc); }
.sh-wedding .sh-make { background: transparent; color: var(--wd-acc); border-color: var(--wd-acc); }
.sh-wedding .sh-btn { color: var(--wd-bg2); background: linear-gradient(90deg, var(--wd-acc), color-mix(in srgb, var(--wd-acc) 70%, #fff)); }
.sh-wedding .sh-btn.soft { background: transparent; color: var(--wd-acc); border: 1px solid var(--wd-acc); box-shadow: none; }
.sh-card .wd-title, .wd-title { font: 400 clamp(44px, 11vw, 76px)/1.05 "Great Vibes", cursive; color: var(--wd-acc); text-align: center; margin: 0; }
.wd-ur .sh-card .wd-title, .wd-ur .wd-title { font: 700 clamp(34px, 8vw, 54px)/1.9 "Noto Nastaliq Urdu", serif; }
.wd-sub { font: 500 15px/1.4 "Cinzel", serif; letter-spacing: .18em; text-transform: uppercase; text-align: center; color: color-mix(in srgb, var(--wd-ink) 85%, transparent); }
.wd-new:not(.wd-ur) .wd-title, .wd-new:not(.wd-ur) .sh-card .wd-title { font: 400 clamp(46px, 11vw, 78px)/1.02 "Instrument Serif", Georgia, serif; letter-spacing: -.01em; }
.wd-new:not(.wd-ur) .wd-sub { font: 500 13px/1.5 "Jost", system-ui, sans-serif; letter-spacing: .24em; }
.wd-new:not(.wd-ur) .wd-ev h3 { font-family: "Jost", system-ui, sans-serif; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; font-size: 15px; }
.wd-cardimg { width: 100%; max-width: 460px; margin: 0 auto; display: block; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.wd-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 0 auto; width: 100%; }
.wd-clock div { text-align: center; border: 1px solid color-mix(in srgb, var(--wd-acc) 55%, transparent); border-radius: 14px; padding: 12px 4px; }
.wd-clock b { display: block; font: 600 clamp(26px, 7vw, 38px)/1 "Cormorant Garamond", serif; color: var(--wd-acc); }
.wd-clock span { font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.wd-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.wd-ev { border: 1px solid color-mix(in srgb, var(--wd-acc) 50%, transparent); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.wd-ev h3 { margin: 0; font: 600 24px/1.2 "Cinzel", serif; color: var(--wd-acc); letter-spacing: .06em; }
.wd-ur .wd-ev h3 { font: 700 24px/1.9 "Noto Nastaliq Urdu", serif; }
.wd-ev p { margin: 0; font: 500 18px/1.4 "Cormorant Garamond", serif; }
.wd-ev .wd-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.wd-ev .wd-btns a, .wd-ev .wd-btns button { font: 600 13px/1 var(--f-body); padding: 9px 12px; border-radius: 99px; border: 1px solid var(--wd-acc); color: var(--wd-acc); background: transparent; text-decoration: none; cursor: pointer; }
.sh-wedding .sh-input { background: rgba(255, 255, 255, .92); color: #2A1F1A; border-color: transparent; }
.sh-wedding .sh-form label { color: var(--wd-ink); }
.wd-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-pills label { flex-direction: row !important; align-items: center; cursor: pointer; }
.wd-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-pills span { padding: 11px 16px; border-radius: 99px; border: 1px solid var(--wd-acc); font-weight: 700; }
.wd-pills input:checked + span { background: var(--wd-acc); color: var(--wd-bg2); }
.wd-pills input:focus-visible + span { outline: 2px solid var(--wd-ink); }
.wd-ur { direction: rtl; }
.wd-ur .wd-sub, .wd-ur .wd-ev p { font-family: "Noto Nastaliq Urdu", serif; letter-spacing: 0; line-height: 2; }

/* the envelope that opens on a wedding invitation */
.wd-env { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(120% 80% at 50% 0%, var(--wd-bg1), var(--wd-bg2)); cursor: pointer; transition: opacity .6s .9s, visibility 0s 1.5s; }
.wd-env.open { opacity: 0; visibility: hidden; }
.wd-env-box { position: relative; width: min(340px, 82vw); aspect-ratio: 3 / 2; perspective: 900px; }
.wd-env-back, .wd-env-front, .wd-env-flap { position: absolute; inset: 0; border-radius: 10px; }
.wd-env-back { background: color-mix(in srgb, var(--wd-acc) 70%, #000); }
.wd-env-letter { position: absolute; left: 7%; right: 7%; top: 8%; bottom: 8%; background: #FFFBF2; border-radius: 6px; transition: transform .8s .35s ease; display: grid; place-items: center; font: 400 34px/1 "Great Vibes", cursive; color: #8A6D3B; }
.wd-env-front { background: linear-gradient(160deg, var(--wd-acc), color-mix(in srgb, var(--wd-acc) 65%, #000)); clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 100%, 0 100%); }
.wd-env-flap { background: linear-gradient(180deg, color-mix(in srgb, var(--wd-acc) 85%, #fff), var(--wd-acc)); clip-path: polygon(0 0, 100% 0, 50% 62%); transform-origin: top; transition: transform .6s ease; z-index: 3; }
.wd-env-seal { position: absolute; left: 50%; top: 52%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #C2333F, #7A0F18); color: #F7D9A0; display: grid; place-items: center; font: 400 28px/1 "Great Vibes", cursive; z-index: 4; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transition: opacity .3s; }
.wd-env-tap { position: absolute; left: 0; right: 0; bottom: -64px; text-align: center; font: 600 15px/1.3 "Cinzel", serif; letter-spacing: .14em; color: var(--wd-ink); animation: wd-pulse 1.8s infinite; }
.wd-env.open .wd-env-flap { transform: rotateX(180deg); z-index: 1; }
.wd-env.open .wd-env-seal { opacity: 0; }
.wd-env.open .wd-env-letter { transform: translateY(-62%); }
@keyframes wd-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .wd-env, .wd-env * { transition: none !important; animation: none !important; } }

/* wedding maker: template swatches and the live preview */
.wd-cats { margin: 2px 0 10px; }
.wd-cats .chip { padding: 7px 11px; font-size: 13px; }
.wd-tpls label[hidden] { display: none; }
.wd-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.wd-tpls label { cursor: pointer; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.wd-tpls input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-tpls i { display: block; aspect-ratio: 2 / 3; border-radius: 10px; background: radial-gradient(120% 80% at 50% 0%, var(--wd-bg1), var(--wd-bg2)); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); position: relative; }
.wd-tpls i::after { content: "&"; position: absolute; inset: 0; display: grid; place-items: center; font: 400 30px/1 "Great Vibes", cursive; color: var(--wd-acc); }
.wd-tpls i.shot { background-size: cover; background-position: center; }
.wd-tpls i.shot::after { content: none; }
.wd-tpls input:checked + i { box-shadow: 0 0 0 3px var(--accent); }
.wd-tpls input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.wd-preview { width: 100%; max-width: 420px; margin: 0 auto; display: block; border-radius: 8px; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); background: var(--surface-2); }

/* ---------- resource pages (/r/<slug>, /resources) written in the admin panel ---------- */
.res-page { max-width: 860px; padding-top: 10px; padding-bottom: 40px; }
.res-head { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 20px; }
.res-head h1 { font: 400 clamp(40px, 7vw, 64px)/1 var(--f-display); color: var(--slate); margin: 0; letter-spacing: .01em; }
.res-sum { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0; }
.res-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 8px; }
.res-links { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; }
.res-link { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(90deg, var(--accent), #FF8A5B); color: #fff; text-decoration: none; box-shadow: 0 8px 22px rgba(255, 91, 53, .3); transition: transform .12s; }
.res-link:hover { transform: translateY(-1px); }
.res-link-t { font: 800 18px/1.3 var(--f-body); }
.res-link small { grid-column: 1; font-size: 14px; opacity: .92; }
.res-go { grid-row: 1 / span 2; grid-column: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.res-go svg { width: 20px; height: 20px; }
.res-body { margin-bottom: 20px; }
.res-more { margin-top: 36px; }
.res-more h2 { font: 700 22px/1.25 var(--f-body); color: var(--ink); margin: 0 0 14px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.res-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.res-card img, .res-noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.res-noimg { display: grid; place-items: center; color: var(--accent); }
.res-noimg svg { width: 40px; height: 40px; }
.res-card b { font-size: 17px; line-height: 1.3; }
.res-card small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.res-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.res-tools a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.res-tools a span { display: flex; flex-direction: column; min-width: 0; }
.res-tools small { color: var(--muted); font-size: 13px; }
/* The quiz builder's question card is filled by script: keep its room so the page doesn't jump while loading. */
.qb-q { min-height: 380px; }
@media (max-width: 700px) { .qb-q { min-height: 470px; } }
