
/* Full photo preview: opaque backdrop, shared type, viewport-safe media. */
html:has(.lb:not([hidden])) { scrollbar-gutter: auto; }
body:has(.lb:not([hidden])) { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: 44px minmax(0, 1fr) auto; gap: 14px; padding: 20px; background: #19171f; color: #f4f3f7; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.lb[hidden] { display: none; }
.lb-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.lb-count { color: #e9e7ef; border: 1px solid #ffffff20; border-radius: 999px; padding: 8px 13px; font-size: 12px; font-weight: 600; }
.lb-actions { display: flex; align-items: center; gap: 10px; }
.lb button { width: auto; min-width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid #ffffff14; border-radius: 999px; color: #f4f3f7; background: #ffffff12; box-shadow: none; }
.lb button:hover { transform: none; background: #ffffff20; box-shadow: none; }
.lb button:focus-visible { outline: 2px solid var(--brand-on-dark); outline-offset: 3px; }
.lb .lb-dl { padding: 0 16px; gap: 8px; background: var(--brand-primary); color: #fff; border-color: transparent; font-size: 13px; font-weight: 600; }
.lb .lb-dl:hover { background: var(--brand-hover); }
.lb .lb-dl:disabled { background: #393540; color: #c2becb; }
.lb-dl svg { width: 18px; height: 18px; }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; }
.lb-view { display: flex; align-items: center; justify-content: center; min-height: 0; gap: 28px; }
.lb-frame { min-width: 0; max-width: min(1000px, calc(100vw - 184px)); line-height: 0; }
.lb-stage img, .lb-stage video { display: block; max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto; object-fit: contain; border-radius: 8px; -webkit-user-drag: none; animation: lbfade .2s ease; }
.lb-cap { justify-self: center; width: min(700px, 100%); max-height: 72px; overflow: auto; text-align: center; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.lb-caption, .lb-credit { margin: 0; }
.lb-credit { color: #bdb9c8; font-size: 12px; }
.lb-hint { display: none; margin: 0; }
.lb-single .lb-nav, .lb-single .lb-hint { display: none; }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbopen { from { opacity: 0; } to { opacity: 1; } }
.view-in { animation: viewin .28s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lb.lb-open { animation: lbopen .22s ease; }
@media (min-width: 821px) {
  /* Keep navigation anchored to the viewer, independent of media/caption dimensions. */
  .lb { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 440px) 44px minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr) 72px; }
  .lb-toolbar { grid-column: 1 / -1; grid-row: 1; }
  .lb-view { display: contents; }
  .lb-frame { grid-column: 1 / -1; grid-row: 2; place-self: center; }
  .lb-stage img, .lb-stage video { max-height: calc(100dvh - 184px); }
  .lb-nav { grid-row: 3; align-self: center; }
  .lb-nav.left { grid-column: 2; }
  .lb-nav.right { grid-column: 4; }
  .lb-cap { grid-column: 3; grid-row: 3; align-self: center; width: 100%; }
}
@media (max-width: 820px) {
  .lb { grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 44px minmax(0, 1fr) auto 44px; gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .lb-toolbar { grid-column: 1 / -1; grid-row: 1; }
  .lb .lb-dl { width: 44px; padding: 0; }
  .lb-dl span { display: none; }
  .lb-view { display: contents; }
  .lb-frame { grid-column: 1 / -1; grid-row: 2; place-self: center; max-width: 100%; }
  .lb-stage img, .lb-stage video { max-height: calc(100dvh - 224px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .lb-cap { grid-column: 1 / -1; grid-row: 3; }
  .lb-nav.left { grid-column: 1; grid-row: 4; }
  .lb-nav.right { grid-column: 3; grid-row: 4; }
  .lb-hint { display: block; grid-column: 2; grid-row: 4; align-self: center; text-align: center; color: #bdb9c8; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .lb.lb-open, .lb-stage img, .lb-stage video { animation: none; } }
    .tile .sel { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; padding: 0; background: transparent; border: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; color: transparent; font-size: 12px; font-weight: 800; }
    .tile .sel::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 19px; height: 19px; border-radius: 50%; background: rgba(255,255,255,.92); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.28); z-index: -1; }
    .tile.selected { outline: 3px solid var(--brand-primary); outline-offset: -3px; }
    .tile.selected .sel { color: #fff; }
    .tile.selected .sel::before { background: var(--brand-primary); border-color: var(--brand-primary); }
    #seltools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 14px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
    #seltools[hidden] { display: none; }
    .sel-clear { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-tint); color: var(--muted); border: 0; box-shadow: none; padding: 0; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
    .sel-clear:hover { background: var(--brand-border); color: var(--ink); box-shadow: none; transform: none; }
    #sel-count { font-weight: 700; font-size: 13px; margin-left: auto; }
    .seltool { width: auto; padding: 8px 12px; font-size: 13px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--brand-primary); border: 1.5px solid var(--brand-border); box-shadow: var(--shadow-sm); }
    .seltool:hover { background: var(--bg-tint); box-shadow: var(--shadow-sm); }
    .seltool svg { width: 16px; height: 16px; }
    .seltool[hidden] { display: none; }
    .seltool:disabled, .seltool.danger:disabled { background: #f1f1f5; color: #b6b6c0; border-color: transparent; box-shadow: none; cursor: default; }
    .seltool:disabled:hover, .seltool.danger:disabled:hover { background: #ececf1; color: #b6b6c0; border-color: transparent; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
    .seltool.danger { color: #e0556e; border-color: #f3c2cb; }
    .seltool.danger:hover { background: #e0556e; color: #fff; border-color: #e0556e; }
    .seltool.subtle { color: var(--muted); border-color: transparent; box-shadow: none; background: transparent; }
    .seltool.subtle:hover { background: var(--bg-tint); box-shadow: none; }
    .pwwrap { position: relative; }
    .pwwrap input { padding-right: 46px; }
    .pwtoggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; background: transparent; border: 0; box-shadow: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
    .pwtoggle:hover { color: var(--brand-primary); background: transparent; box-shadow: none; transform: translateY(-50%); }
    .pwtoggle svg { width: 20px; height: 20px; }
    .nav { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 18px 22px; }
    .brandwrap { display: flex; align-items: center; gap: 3px; text-decoration: none; }
    .logomark { width: 27px; height: 27px; flex: none; }
    .nav .links { display: flex; gap: 10px; align-items: center; }
    .navgroup { position: relative; display: flex; gap: 10px; align-items: center; }
    .navgroup[hidden] { display: none; }
    /* account menu — styles now live in /shared/styles.css (single source) */
    .authtabs { display: flex; gap: 10px; margin: 0 0 20px; }
    .authtab { flex: 1; width: auto; background: #fff; border: 1.5px solid var(--line); box-shadow: none; color: var(--ink); font-size: 15px; font-weight: 700; padding: 12px; border-radius: 999px; cursor: pointer; }
    .authtab:hover { background: var(--bg-tint); box-shadow: none; transform: none; }
    .authtab.on { background: #eef0fb; border-color: var(--brand-primary); color: var(--brand-primary); }
    .authtab.on:hover { background: #eef0fb; box-shadow: none; }
    #toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(40px); background: var(--brand-fill); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 12px 34px rgba(76,47,176,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 200; }
    #toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
    .empty { text-align: center; padding: 34px 20px; color: var(--muted); }
    .empty .eico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--bg-tint); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    .empty .eico svg { width: 28px; height: 28px; }
    .empty .eart { width: 158px; height: auto; margin: 0 auto 6px; display: block; }
    .empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .empty p { margin: 0 auto; font-size: 14px; max-width: 26em; line-height: 1.5; }
    #tier-info { margin-top: 12px; }
    .tinfo-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ink); padding: 3px 0; line-height: 1.4; }
    .tinfo-item .tcheck { color: var(--brand-primary); flex: none; margin-top: 1px; }
    .tinfo-item .tcheck svg { width: 15px; height: 15px; display: block; }
    .tinfo-keep { color: var(--brand-primary); font-weight: 700; }
    .modal { position: fixed; inset: 0; background: rgba(20,18,30,.5); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; z-index: 300; overflow-y: auto; }
    .modal[hidden] { display: none; }
    .modal-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 26px; width: 100%; max-width: 420px; }
    .modal-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .sign-return-link { color:var(--brand-primary); font-size:13px; font-weight:600; text-decoration:none; text-underline-offset:3px; }
    .sign-return-link:not([hidden]) { display:inline-flex; align-items:center; min-height:36px; }
    .sign-return-link:hover { text-decoration:underline; }
    #cf-ok.cf-danger { background: #e0556e; box-shadow: 0 8px 20px rgba(224,85,110,.3); }
    #reset-modal .modal-card { padding: 28px; }
    #reset-title:focus { outline: none; } /* Programmatic announcement target, not a control. */
    #reset-description { font-size: 14px; line-height: 1.6; margin: 0; }
    #reset-form label { margin-top: 22px; }
    #reset-msg { margin-top: 10px; font-size: 13px; line-height: 1.5; }
    #reset-msg:empty { display: none; }
    .reset-actions { display: flex; gap: 10px; margin-top: 22px; }
    .reset-actions button { flex: 1; min-width: 0; padding: 11px 12px; font-size: 14px; }
    .reset-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 18px; color: var(--brand-primary); background: var(--brand-soft); }
    .reset-icon[hidden], #reset-form[hidden], #reset-success[hidden] { display: none; }
    .reset-icon svg { width: 26px; height: 26px; }
    .reset-help { color: var(--muted); font-size: 13px; margin: 12px 0 24px; }
    #reset-done { padding: 11px 16px; font-size: 14px; }
    #reset-another { display: block; width: auto; min-height: 44px; margin: 8px auto -8px; padding: 8px; border: 0; background: none; box-shadow: none; color: var(--brand-primary); font-size: 13px; }
    #reset-another:hover { background: var(--brand-tint); transform: none; }
    @media (max-width: 380px) { #reset-modal .modal-card { padding: 22px; } }
    #bv-title, #co-title-line, .evcard-body b { overflow-wrap:anywhere; min-width:0; }
    .reset-err { color: var(--warn); font-weight: 600; }
    /* compact controls + mobile fixes */
    #copy, #slideshow-link, #selectall, #back { padding: 10px 16px; font-size: 14px; }
    #share { font-size: 13px; }
    .brand { white-space: nowrap; }
    .acct { white-space: nowrap; }
    .photoora-header .acct .avatar { background:#f5f5f8; color:#343844; }
    #acct-name { white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
    .gear-btn { width: auto; background: none; border: none; padding: 6px; cursor: pointer; color: var(--muted); line-height: 0; border-radius: 8px; box-shadow: none; transition: color .15s ease, background .15s ease; }
    .gear-btn:hover { color: var(--brand-primary); background: var(--bg-tint, rgba(0,0,0,.05)); box-shadow: none; }
    .share-corner { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; padding: 0; border-radius: 11px; background: var(--bg-tint); border: 1px solid var(--line); box-shadow: none; color: var(--brand-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease; }
    .share-corner:hover { background: var(--brand-border); box-shadow: none; transform: none; }
    .share-corner svg { width: 22px; height: 22px; }
    .bx-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: bxspin .7s linear infinite; vertical-align: -2px; margin-right: 7px; }
    @keyframes bxspin { to { transform: rotate(360deg); } }
    #create.loading { cursor: progress; }
    #gallery .tile { background: linear-gradient(100deg, #e9ebf3 25%, #f4f5fb 50%, #e9ebf3 75%); background-size: 200% 100%; animation: tileshim 1.3s ease-in-out infinite; }
    #gallery .tile.loaded { animation: none; background: var(--bg-tint); }
    #gallery .tile img, #gallery .tile video { opacity: 0; transition: opacity .4s ease, transform .35s ease; }
    #gallery .tile img.loaded, #gallery .tile video.loaded { opacity: 1; }
    @keyframes tileshim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
    .boxcover { width: 52px; height: 52px; border-radius: 12px; background: var(--bg-tint) center/cover no-repeat; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
    .sk { background: linear-gradient(100deg, #e9ebf3 25%, #f4f5fb 50%, #e9ebf3 75%); background-size: 200% 100%; animation: tileshim 1.3s ease-in-out infinite; border-radius: 8px; }
    .sk-cover { width: 52px; height: 52px; border-radius: 12px; flex: none; }
    .sk-line { height: 13px; border-radius: 7px; }
    .sk-btn { width: 74px; height: 38px; border-radius: 999px; flex: none; }
    /* Desktop: the host dashboard gets room to breathe (the shared 600px wrap
       is phone-first and stays for the guest page). */
    .wrap { max-width: 1080px; }   /* match the marketing home page column */
    /* the dashboard (pricing cards) uses the extra room; the event view and
       sign-in keep their familiar narrower feel */
    #auth { max-width: 745px; margin-left: auto; margin-right: auto; }
    #boxview { max-width: none; }  /* the shell already sets the column */
    #createview { max-width: 980px; margin-left: auto; margin-right: auto; }  /* keep the create form contained */
    /* header uses the same 1080px centred column as the marketing home page (base .nav rule),
       so the logo and account pill land in the exact same positions across both pages */
    /* control panel row (link power + moderation mode) */
    @media (max-width: 460px) {
      #mod-seg .seg-btn { padding: 7px 9px; font-size: 12px; }
    }
    .ctlcap { font-size: 11px; font-weight: var(--fw-emphasis); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
    .ctlcol { display: flex; gap: 12px; align-items: flex-start; justify-content: center; padding-right: 14px; }
    .ctlicon { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
    .ctlicon img { display: block; width: 28px; height: 28px; object-fit: contain; }
    .ctlname { font-size: 15px; font-weight: var(--fw-subheading); margin: 2px 0 9px; line-height: var(--lh-subheading); }
    .ctl-heading-icon { display: none; }
    /* Balance the photo artwork while keeping the icon slot and title aligned. */
    #boxview .ctl-memory-icon { transform: scale(1.2); }
    .swtrack { width: 46px; height: 26px; border-radius: 999px; border: 0; background: #d3d7e3; position: relative; cursor: pointer; transition: background .2s ease; padding: 0; flex: none; }
    .swtrack::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s ease; }
    .swtrack.on { background: var(--ok); }
    .swtrack.on::after { left: 23px; }
    button.copymini { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: #8a8fa3; display: flex; align-items: center; justify-content: center; cursor: pointer; }
    button.copymini:hover { background: var(--bg-tint); color: var(--brand-primary); transform: translateY(-50%); box-shadow: none; }
    button.copymini:active { transform: translateY(-50%); }
    button.copymini svg { display: block; }
    button.backlink { background: none; border: 0; box-shadow: none; color: var(--brand-primary); font-weight: 700; width: auto; padding: 6px 2px; }
    button.backlink:hover { transform: none; box-shadow: none; background: none; text-decoration: underline; }
    .event-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .event-nav .backlink, #cv-back { min-height: 44px; }
    .sbtn { width: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 13px; padding: 10px 12px; font-size: 13px; white-space: nowrap; }

    /* One event workspace: QR/date beside the title, controls and sharing. */
    .event-overview { margin-top: 12px; }
    .event-overview, .event-memories { border-color: var(--line); box-shadow: 0 8px 28px #24263806; }
    .ev3-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "qr title" "qr content"; grid-template-rows: auto 1fr; gap: 22px 28px; align-items: start; }
    .ev3-qr { grid-area: qr; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #fff, var(--brand-tint)); }
    .ev3-title { grid-area: title; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .ev3-title h1 { flex: 1; min-width: 0; font-size: 30px; line-height: var(--lh-heading); text-align: left; font-weight: var(--fw-heading); }
    .event-nav .gear-btn { position: static; display: inline-flex; align-items: center; gap: 7px; flex: none; border: 1px solid var(--line); background: #fff; padding: 9px 11px; font-size: 12px; font-weight: 500; line-height: 1.4; min-height: 44px; white-space: nowrap; }
    .event-nav .gear-btn:hover { background: var(--brand-tint); }
    .ev3-qr img { width: 190px; max-width: 100%; height: auto; }
    .ev3-right { grid-area: content; min-width: 0; display: flex; flex-direction: column; }
    .ev3-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 0; margin-bottom: 22px; }
    .ev3-settings .ctlcol { justify-content: flex-start; min-width: 0; }
    .ev3-settings .ctlcol > div { min-width: 0; }
    .event-memories { margin-top: 22px; }
    .event-memories #count { margin: 0 0 14px; font-size: 21px; }
    .event-memories .memtoolbar { flex-wrap: wrap; }
    /* A refunded / disputed event collapses to just the closed-notice banner —
       hide the whole event body (share card, settings, review queue, gallery). */
    #boxview.boxview--closed > .card { display: none !important; }
    #boxview.boxview--closed #theme-gear { display: none !important; }
    /* Ended free trials retain their title and locked controls. Suppress the
       sharing/editing tools and empty gallery toolbar, including keyboard use. */
    #boxview.boxview--trial-ended :is(#qr, #sharerow, #theme-gear, #theme-card, #evdate-info, #pending-card, #count, .memtoolbar, #seltools, #gallery) { display: none !important; }
    #boxview.boxview--trial-ended .ev3-grid { grid-template-columns: 1fr; grid-template-areas: "title" "content"; gap: 24px; }
    #boxview.boxview--trial-ended .ev3-qr { display: none; }
    #boxview.boxview--trial-ended .ev3-title { justify-content: flex-start; }
    #boxview.boxview--trial-ended .ev3-title h1 { text-align: left; overflow-wrap: anywhere; }
    #boxview.boxview--trial-ended .ev3-settings { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
    #boxview.boxview--trial-ended #empty { padding: 38px 20px 26px; }
    #boxview.boxview--trial-ended #empty p { max-width: 36em; }
    #trial-create { display: inline-flex; width: auto; max-width: 100%; margin-top: 22px; padding: 12px 22px; }
    #trial-create[hidden] { display: none; }
    /* Share button sits on the link row, to the right of the field. */
    .ev3-linkrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
    .ev3-inputwrap { position: relative; flex: 1; min-width: 0; }
    .ev3-sharebtn { width: 44px; height: 44px; flex: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; }
    /* Desktop: the title spans the card, with QR and controls aligned below.
       The existing phone and tablet layouts retain their spacing. */
    @media (min-width: 901px) {
      #boxview:not(.boxview--trial-ended) .ev3-grid { grid-template-areas: "title title" "qr content"; grid-template-rows: auto auto; row-gap: 16px; }
      #boxview .ev3-title h1 { overflow-wrap: anywhere; }
      #boxview .ev3-settings { margin-bottom: 16px; }
      #boxview .ev3-settings .ctlicon { display: none; }
      #boxview .ev3-settings .ctlname { display: flex; align-items: center; gap: 2px; min-height: 22px; margin: 0 0 2px; }
      #boxview .ctl-heading-icon { display: block; flex: none; width: 32px; height: 32px; object-fit: contain; }
      #boxview .ev3-linkrow { margin-bottom: 10px; }
      #boxview #copy-feedback:empty { min-height: 0; margin: 0; }
    }
    @media (max-width: 760px) {
      .ev3-grid { grid-template-columns: 1fr; grid-template-areas: "title" "qr" "content"; gap: 18px; }
      .ev3-title h1 { font-size: 25px; }
      .ev3-title { flex-wrap: wrap; }
      .ev3-title h1 { flex-basis: 180px; }
      .ev3-qr { justify-self: center; width: 218px; max-width: 100%; }
      .event-overview, .event-memories { padding: 18px 12px; }
      .ev3-settings .ctlcol { justify-content: center; }
      .ev3-qr img { max-width: 200px; margin: 0 auto; }
      #album-btn { flex: 1 0 100%; }
    }
    @media (max-width: 520px) {
      .ctlicon { display: none; }
      .ev3-settings .ctlcol { display: block; text-align: center; padding: 0 8px !important; }
      .ctlcol .ctlname { justify-content: center; }
      .ctlcol #box-status { white-space: normal; overflow-wrap: anywhere; font-size: 11px !important; }
      .ctlcol #mod-hint { font-size: 11px !important; }
    }
    /* Native dialog keeps keyboard focus and background interaction contained. */
    body.settings-open { overflow:hidden; }
    .settings-dialog { width:min(560px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; margin:auto; color:var(--ink); background:#fff; border:1px solid var(--brand-soft); border-radius:24px; box-shadow:0 24px 90px #27164130; overflow:auto; overscroll-behavior:contain; }
    .settings-dialog:not([open]) { display:none; }
    .settings-dialog::backdrop { background:#25203455; backdrop-filter:blur(5px); }
    .settings-dialog[open] { animation:settings-in .18s ease-out; }
    @keyframes settings-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
    .settings-heading { position:relative; display:flex; gap:12px; align-items:flex-start; padding:26px 56px 22px 26px; background:linear-gradient(120deg,var(--brand-tint),var(--brand-tint)); border-bottom:1px solid var(--brand-soft); }
    .settings-heading h2 { font-size:24px; margin:0 0 6px; letter-spacing:-.6px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .settings-heading p { font-size:12px; line-height: var(--lh-help); margin:0; color: var(--muted); }
    .settings-close { display:grid; place-items:center; position:absolute; top:18px; right:16px; width:34px; height:34px; padding:0; background:#ffffffc9; border:1px solid var(--brand-border); border-radius:50%; color:#83738f; box-shadow:none; }
    .settings-close:hover { background: #f0f0f4; color: var(--ink); transform: none; box-shadow: none; }
    .settings-close svg { width:16px; height:16px; }
    .settings-body { padding:22px 26px 26px; }
    .settings-body label { font-size:13px; margin:20px 0 8px; }
    .settings-body > label:first-child { margin-top:0; }
    .settings-body input, .settings-body textarea { font-size:14px; border-radius:12px; padding:12px 14px; }
    .settings-body textarea { min-height:90px; resize:vertical; }
    .settings-optional { font-weight:400; color:var(--muted); }
    .settings-help { font-size:12px; line-height:1.6; margin:8px 0 0; color:var(--muted); }
    .event-photo-settings { margin-top:22px; }
    .event-photo-settings h3 { margin:0; font-size:15px; font-weight:var(--fw-subheading); }
    .event-photo-preview { display:block; width:100%; height:160px; object-fit:contain; background:var(--brand-tint); border:1px solid var(--line); border-radius:14px; margin-top:12px; }
    .event-photo-preview[hidden], .event-photo-actions [hidden] { display:none; }
    .event-photo-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
    .event-photo-actions button { width:auto; min-height:44px; }
    #event-photo-status[data-state="error"] { color:#a52839; }

    .photo-crop-dialog { width:min(680px, calc(100vw - 28px)); max-width:none; max-height:calc(100dvh - 28px); padding:0; border:1px solid var(--line); border-radius:24px; background:#fff; color:var(--ink); overflow:auto; overscroll-behavior:contain; box-shadow:0 24px 70px #191b2440; }
    .photo-crop-dialog::backdrop { background:#191b245c; backdrop-filter:blur(4px); }
    .photo-crop-heading { position:relative; padding:24px 64px 20px 24px; background:var(--brand-tint); border-bottom:1px solid var(--line); }
    .photo-crop-heading h2 { margin:0 0 6px; font-size:24px; font-weight:var(--fw-heading); line-height:1.25; letter-spacing:-.6px; }
    .photo-crop-heading p { margin:0; font-size:14px; line-height:1.5; color:var(--muted); }
    .photo-crop-heading .settings-close { width:40px; height:40px; font-size:24px; }
    .photo-crop-body { padding:20px 24px 12px; }
    .photo-crop-devices { display:flex; width:max-content; margin:0 auto; padding:4px; gap:4px; border:1px solid var(--line); border-radius:12px; }
    .photo-crop-devices button { min-height:40px; padding:8px 18px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:14px; box-shadow:none; }
    .photo-crop-devices button[aria-pressed="true"] { background:var(--brand-soft); color:var(--brand); }
    .photo-crop-caption { margin:16px 0 10px; font-size:13px; text-align:center; color:var(--muted); }
    .photo-crop-preview-host { width:100%; display:flex; justify-content:center; }
    .photo-crop-window { overflow:hidden; border-radius:14px; background:#f5f4f8; }
    /* Keep these banner metrics aligned with guest/index.html; scale the whole preview together. */
    .photo-crop-banner { position:relative; isolation:isolate; display:flex; align-items:flex-end; box-sizing:border-box; min-height:220px; padding:22px 24px 34px; overflow:hidden; transform-origin:top left; cursor:grab; touch-action:none; user-select:none; background:#fff; }
    .photo-crop-banner:active { cursor:grabbing; }
    .photo-crop-banner:focus-visible { outline:3px solid var(--brand); outline-offset:-3px; }
    .photo-crop-banner::after { content:''; position:absolute; z-index:2; bottom:0; left:0; right:0; height:16px; border-radius:24px 24px 0 0; background:white; pointer-events:none; }
    .photo-crop-image { position:absolute; display:block; max-width:none; pointer-events:none; }
    .photo-crop-copy { position:relative; z-index:1; min-width:0; width:100%; pointer-events:none; }
    .photo-crop-copy::before { content:''; position:absolute; z-index:-1; inset:-26px -24px -34px; background:linear-gradient(180deg, transparent, rgba(17,15,25,.68) 26px, rgba(17,15,25,.86)); }
    .photo-crop-eyebrow { margin:0 0 6px; font-size:10px; font-weight:600; letter-spacing:.12em; line-height:1.5; text-transform:uppercase; color:#fff; }
    .photo-crop-title { margin:0; font-family:var(--font-sans); font-size:28px; font-weight:var(--fw-heading); letter-spacing:var(--heading-tracking); line-height:1.25; overflow-wrap:anywhere; color:#fff; text-shadow:0 1px 8px rgba(0,0,0,.16); }
    .photo-crop-welcome { margin:8px 0 0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; color:#fff; }
    .photo-crop-welcome[hidden] { display:none; }
    .photo-crop-banner[data-device="phone"] { min-height:180px; padding:18px 18px 30px; }
    .photo-crop-banner[data-device="phone"] .photo-crop-title { font-size:24px; }
    .photo-crop-banner[data-device="phone"] .photo-crop-copy::before { inset:-26px -18px -30px; }
    .photo-crop-hint { margin:8px 0 20px; font-size:12px; line-height:1.5; color:var(--muted); }
    .photo-crop-zoom-label { display:flex; justify-content:space-between; align-items:center; font-size:14px; }
    .photo-crop-zoom-label label { margin:0; color:var(--ink); }
    .photo-crop-zoom-label output { color:var(--muted); font-variant-numeric:tabular-nums; }
    .photo-crop-dialog input[type="range"] { width:100%; height:32px; margin:4px 0; padding:0; accent-color:var(--brand); border:0; box-shadow:none; background:transparent; cursor:pointer; }
    .photo-crop-reset { min-height:40px; padding:4px 0; border:0; background:none; box-shadow:none; color:var(--brand); font:inherit; font-size:13px; }
    .photo-crop-status { margin:4px 0 0; font-size:13px; color:var(--muted); }
    .photo-crop-status:empty { display:none; }
    .photo-crop-footer { position:sticky; bottom:0; display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--line); background:var(--brand-tint); z-index:3; }
    .photo-crop-footer button { min-height:44px; }
    @media (max-width:480px) {
      .photo-crop-heading { padding:20px 60px 16px 18px; }
      .photo-crop-heading h2 { font-size:21px; }
      .photo-crop-body { padding:16px 18px 12px; }
      .photo-crop-footer { padding:14px 18px; }
      .photo-crop-footer button { flex:1; padding:10px 12px; font-size:14px; }
    }
    .settings-appearance { padding-top:20px; margin-top:20px; border-top:1px solid var(--line); }
    .settings-appearance h3 { margin:0; font-size:14px; font-weight: var(--fw-subheading); line-height: var(--lh-subheading); }
    #theme-picker { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:14px; }
    #theme-picker[hidden] { display:none; }
    .theme-choice { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; padding:9px 4px; border:1px solid transparent; border-radius:12px; box-shadow:none; background:#fff; color:var(--muted); font-size:11px; font-weight:500; }
    .settings-dialog .theme-choice:not(:disabled):hover { background: var(--brand-tint); border-color: var(--brand-border); color: var(--ink); transform: none; box-shadow: none; }
    .settings-dialog .theme-choice[aria-pressed="true"]:hover { border-color: var(--brand-border-strong); color: var(--brand-primary); }
    .settings-footer .btn-ghost:hover { transform: none; }
    .theme-choice .theme-swatch { display:block; width:32px; height:32px; border-radius:50%; box-shadow:inset 0 0 0 1px #00000008; }
    .theme-choice[aria-pressed="true"] { color:#7543b3; background:var(--brand-tint); border-color:var(--brand-border-strong); }
    .theme-choice[aria-pressed="true"] .theme-swatch { outline:2px solid #bc9ce6; outline-offset:3px; }
    .settings-footer { display:flex; align-items:center; gap:10px; padding:18px 26px; border-top:1px solid var(--line); background:var(--brand-tint); }
    .settings-footer #theme-saved { flex:1; min-width:0; font-size:12px; line-height:1.5; }
    .settings-footer button { width:auto; flex:none; min-height:44px; padding:10px 17px; font-size:13px; border-radius:12px; }
    .settings-dialog :is(button,input,textarea):focus-visible { outline:2px solid #9b77d6; outline-offset:3px; }
    .settings-dialog :is(input,textarea):focus { border-color:var(--brand-primary); outline:none; box-shadow:none; }
    @media (max-width:580px) {
      .settings-heading { padding:22px 48px 20px 20px; gap:10px; }
      .settings-heading h2 { font-size:21px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
      .settings-body { padding:20px; }
      #theme-picker { gap:3px; }
      .theme-choice { font-size:10px; padding:9px 2px; }
      .theme-choice .theme-swatch { width:29px; height:29px; }
      .settings-footer { flex-wrap:wrap; padding:16px 20px; }
      .settings-footer #theme-saved { flex-basis:100%; }
      .settings-footer #theme-saved:empty { display:none; }
      .settings-footer button { flex:1; }
      .settings-footer #theme-done { flex:.65; }
    }
    @media (prefers-reduced-motion:reduce) { .settings-dialog[open] { animation:none; } }
    /* pending-review queue tiles */
    #pending-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
    #pending-grid:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-radius: 12px; }
    .pmem { flex: 0 0 150px; min-width: 0; align-self: flex-start; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
    .pmem .pmedia { position: relative; aspect-ratio: 1; background: var(--bg-tint); cursor: zoom-in; }
    .pmem .pmedia.loading { background-image: linear-gradient(100deg, var(--brand-soft) 25%, var(--brand-tint) 50%, var(--brand-soft) 75%); background-size: 200% 100%; animation: tileshim 1.3s ease-in-out infinite; }
    .pmem .pmedia:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -3px; }
    .pmem img, .pmem video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s ease; }
    .pmem .pmedia.loaded img, .pmem .pmedia.loaded video { opacity: 1; }
    .pmem .pmedia-error { position: absolute; inset: 0; align-content: center; text-align: center; padding: 12px; font-size: 12px; color: var(--muted); }
    @media (prefers-reduced-motion: reduce) {
      .pmem .pmedia.loading { animation: none; }
      .pmem img, .pmem video { transition: none; }
    }
    .pmem .pcap { font-size: 12px; color: var(--muted); padding: 6px 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pmem .pact { display: flex; gap: 5px; padding: 7px; }
    .pmem .pact button { flex: 1; min-height: 40px; font-size: 12px; font-weight: 700; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #4b5563; cursor: pointer; box-shadow: none; white-space: nowrap; }
    .pmem .pact button:hover { transform: none; box-shadow: none; }
    .pmem .pact .ok { background: var(--brand-soft); color: var(--brand-primary); border: 0; }
    .pmem .pact .ok:hover:not(:disabled) { background: var(--brand-border); filter: none; }
    .free-banner { background: var(--bg-tint); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
    .free-banner b { color: var(--brand-primary); }
    .free-banner .up { margin-top: 6px; font-size: 13px; color: var(--muted); }
    .free-banner.capped { background: #fff5e9; border-color: #ffd9a8; }
    .free-banner.capped b { color: #c2731a; }
    .seg { display: inline-flex; gap: 2px; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 999px; padding: 3px; width: auto; }
    .seg[hidden] { display: none; }
    .seg-btn { width: auto; background: none; border: 0; box-shadow: none; color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
    .seg-btn:hover { background: none; box-shadow: none; transform: none; }
    .seg-btn.on { background: #fff; color: var(--brand-primary); box-shadow: var(--shadow-sm); }
    .seg-btn.on:hover { background: #fff; box-shadow: var(--shadow-sm); }
    /* mockup style: white track, thin dividers, selected = soft lavender square */
    .seg { gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 4px; }
    .seg .seg-btn { border-left: 1px solid transparent; border-radius: 9px; background: none; box-shadow: none; }
    .seg .seg-btn + .seg-btn { border-left: 1px solid var(--line); }
    .seg .seg-btn.on { background: var(--brand-soft); color: var(--brand-primary); box-shadow: none; }
    .seg .seg-btn.on:hover { background: var(--brand-soft); box-shadow: none; }
    /* New-memories toggle: rectangular segments — square where the two meet, only outer corners rounded */
    #mod-seg { border-radius: 9px; }
    #mod-seg .seg-btn { border-radius: 0; }
    #mod-seg .seg-btn:first-child { border-radius: 7px 0 0 7px; }
    #mod-seg .seg-btn:last-child { border-radius: 0 7px 7px 0; }
    /* Memories filters, including the separate Hidden collection. */
    #gallery-filter { border-radius: 9px; max-width: 100%; }
    #gallery-filter .seg-btn { border-radius: 0; }
    #gallery-filter .seg-btn:first-child { border-radius: 7px 0 0 7px; }
    #gallery-filter .seg-btn:last-child { border-radius: 0 7px 7px 0; }
    #gallery-filter .seg-btn:focus-visible, .tile .sel:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
    .gallery-hint { grid-column: 1 / -1; margin: 0 0 2px; font-size: 13px; line-height: 1.6; }
    @media (max-width: 560px) {
      #gallery-filter .seg-btn { padding-inline: 10px; }
    }
    /* Memories search box (client-side filter over captions + guest names) */
    .mem-search { width: 260px; max-width: 100%; margin: 0 0 0 auto; padding: 9px 14px; font-size: 14px; border-radius: 12px; }
    .mem-search[hidden] { display: none; }
    @media (max-width: 560px) {
      .memtoolbar { flex-wrap: wrap; }
      .mem-search { order: 3; flex: 1 0 100%; width: auto; margin: 6px 0 0; }
    }
    /* dashboard redesign (Jul 8 mockup) */
    .cardhead { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
    /* Event title + date: the two primary inputs. Darker labels + a tinted, firmer
       border so they read as the fields to fill, and side-by-side on desktop. */
    .create-2col { display: flex; flex-direction: column; gap: 0; }
    .create-2col .cf { display: flex; flex-direction: column; min-width: 0; }
    .create-2col label { color: var(--ink); font-size: 14px; }
    .create-2col input { border: 1.5px solid var(--brand-border-strong); background: var(--brand-tint); }
    .create-2col input:focus { border-color: var(--brand-primary); background: var(--card); }
    #event-date { text-transform: uppercase; }
    #event-date::-webkit-datetime-edit { text-transform: uppercase; }
    #event-date.date-needed { border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 10%, transparent); }
    /* A visible breathing glow keeps attention on the required date. */
    #event-date.date-needed:not(:focus) { animation: eventDateAttention 1.6s ease-in-out infinite; }
    @keyframes eventDateAttention {
      0%, 100% {
        transform: scale(1);
        background-color: var(--brand-tint);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 14%, transparent), 0 0 0 color-mix(in srgb, var(--brand-primary) 0%, transparent);
      }
      50% {
        transform: scale(1.025);
        background-color: var(--brand-soft);
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-primary) 24%, transparent), 0 0 22px color-mix(in srgb, var(--brand-primary) 38%, transparent);
      }
    }
    @media (prefers-reduced-motion: reduce) {
      #event-date.date-needed:not(:focus) { animation: none; }
    }
    @media (min-width: 720px) {
      .create-2col { flex-direction: row; gap: 16px; align-items: flex-start; }
      .create-2col .cf-title { flex: 1 1 auto; }
      .create-2col .cf-date { flex: 0 0 220px; }
    }
    /* Small round close-X for cards — resets the base button's shadow + hover lift
       so it sits flush and quiet in the corner. */
    .card-x { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); box-shadow: none; cursor: pointer; }
    .card-x:hover { background: var(--bg-tint); color: var(--ink); transform: none; box-shadow: none; }
    .cardicon { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    /* The heading block sits to the RIGHT of the icon and shrinks (subtitle wraps
       inside it) instead of dropping to its own line below the icon on phones. */
    .createcard .cardhead > div { flex: 1; min-width: 0; }
    #tier-info { display: grid; grid-template-columns: 1fr; gap: 11px; margin: 16px 0 14px; }
    #tier-info .tinfo-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; }
    #tier-info .tcheck { margin-top: 3px; }
    .pkgrow select { flex: 1; min-width: 0; margin: 0; }
    #tier-info .tcheck { width: 15px; height: 15px; flex: none; background: none; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    #tier-info .tcheck svg { width: 14px; height: 14px; }
    @media (max-width: 640px) { #tier-info { grid-template-columns: 1fr; } }
    .card.evrow { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; }
    .evrow button[data-open] { align-self: center; }
    .evrow .boxcover { width: 76px; height: 50px; flex: none; border-radius: 10px; background: #eef0fb center/cover no-repeat; }
    .boxcover.loaded { animation: covfade .45s ease; }
    @keyframes covfade { from { opacity: .3; } to { opacity: 1; } }
    /* While a cover is still being fetched (and there's no instant blur
       preview), shimmer like the gallery tiles so the wait looks deliberate.
       Stops as soon as the cover loads — or `covdone` says there isn't one. */
    .boxcover.shim:not(.loaded):not(.covdone) { background-image: linear-gradient(100deg, #e9ebf3 25%, #f4f5fb 50%, #e9ebf3 75%); background-size: 200% 100%; animation: tileshim 1.3s ease-in-out infinite; }
    .covwrap { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
    .covcount { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
    .evbody b { font-size: 15px; }
    .evmeta { margin-top: 4px; }
    .evmeta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
    .tierpill { background: var(--brand-soft); color: var(--brand-primary); font-weight: 800; font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
    button.evgear { width: 28px; height: 28px; min-height: 0; flex: none; padding: 0; border: 0; border-radius: 8px; background: none; box-shadow: none; color: #b7bbca; display: flex; align-items: center; justify-content: center; }
    button.evgear:hover { transform: none; box-shadow: none; background: var(--bg-tint); color: var(--brand-primary); }
    /* sign-in redesign (Jul 8 mockup) */
    .authcard { max-width: 600px; margin: 26px auto 0; padding: 30px 28px 26px; }
    .authcard .authtabs { display: flex; gap: 14px; background: none; border: 0; padding: 0; }
    .authcard .authtab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 10px; border-radius: 13px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; font-size: 15px; box-shadow: none; }
    .authcard .authtab svg { width: 18px; height: 18px; flex: none; }
    .authcard .authtab.on { background: var(--brand-soft); border-color: var(--brand-primary); color: var(--brand-primary); }
    .authcard .authtab:hover { transform: none; box-shadow: none; }
    .authcard #auth-submit { border-radius: 13px; }
    .authsep { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--brand-border-strong); }
    .authsep span { flex: 1; height: 1px; background: var(--line); }
    .authsep[hidden] { display: none; }
    .inwrap { position: relative; }
    .inwrap .infld { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--brand-primary); opacity: .8; pointer-events: none; }
    .inwrap input { padding-left: 43px; }
    @media (max-width: 480px) {
      .authcard { padding: 22px 18px 22px; }
      .authcard .authtabs { gap: 9px; }
      .authcard .authtab { font-size: 13.5px; padding: 12px 6px; gap: 6px; white-space: nowrap; }
      .authcard .authtab svg { width: 15px; height: 15px; }
    }
    /* ===== Login view redesign (matches the 2 Aug mockup) =====================
       ALL scoped with :has() so it ONLY affects the logged-out sign-in view —
       the dashboard is untouched, and it degrades to a plain card without :has(). */
    /* Sign-in inherits the same backdrop as the public homepage. */
    /* Sign-in keeps its full white surface within the space above the footer.
       Let the content determine the minimum height on smaller screens. */
    .page-content:has(#auth:not([hidden])) { display: flex; flex-direction: column; }
    .appshell:has(#auth:not([hidden])) { flex: 1 0 auto; width: 100%; }
    .wrap:has(> #auth:not([hidden])) {
      display: flex; flex-direction: column; align-items: center;
    }
    .wrap:has(> #auth:not([hidden])) .authcard {
      margin: 0; width: 100%; max-width: 520px; position: relative; z-index: 1;
      border-radius: 22px; padding: 30px 30px 28px;
    }
    /* hero heading + subtitle */
    .login-extra { display: none; }
    .wrap:has(> #auth:not([hidden])) .login-hero { display: block; }
    .wrap:has(> #auth:not([hidden])) .login-newhere { display: block; }
    .wrap:has(> #auth:not([hidden])) .login-secure { display: block; }
    .login-hero { text-align: center; margin: 15vh 0 22px; position: relative; z-index: 1; }
    .login-hero h1 { font-family: var(--font-sans); font-weight: var(--fw-heading); font-size: var(--fs-page-title); line-height: var(--lh-heading); letter-spacing: -0.01em; color: var(--ink); margin: 0 0 var(--space-title-copy); }
    .login-hero .login-sub { color: var(--muted); font-size: 16px; margin: 0; }
    /* taller + squarer fields and button (V: "more square, the height") */
    #auth .inwrap input { padding-top: 15px; padding-bottom: 15px; border-radius: 10px; }
    #auth #auth-submit { border-radius: 12px; padding: 16px; font-size: 15.5px; margin-top: 2px; }
    #auth .authtab { border-radius: 12px; }
    /* remember-me + forgot row (between password and the button) */
    .auth-extras { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 16px; }
    .auth-extras[hidden] { display: none; }
    /* Create-account mode hides the remember/forgot row — re-add the space above the
       button so it isn't jammed against the password field. (High specificity so it
       beats the base #auth #auth-submit margin.) */
    #auth .auth-extras[hidden] + #auth-submit { margin-top: 18px; }
    .auth-remember { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--label-ink); cursor: pointer; }
    .auth-remember input { width: 17px; height: 17px; padding: 0; margin: 0; flex: none; accent-color: var(--brand-primary); cursor: pointer; }
    .auth-forgot { color: var(--brand-primary); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
    .auth-forgot:hover { text-decoration: underline; }
    /* "or" divider + Google button (shown in both Sign-in and Create-account modes) */
    .auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
    .auth-or span { flex: 1; height: 1px; background: var(--line); }
    .auth-or em { font-style: normal; font-size: 13px; color: var(--muted); }
    #auth .auth-google { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
      background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none;
      border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; }
    #auth .auth-google:hover { background: var(--bg-tint); transform: none; box-shadow: none; }
    #auth .auth-google svg { flex: none; }
    /* below-card links + trust line */
    .login-newhere { text-align: center; margin: 20px 0 0; font-size: 15px; color: var(--muted); position: relative; z-index: 1; }
    .login-newhere a { color: var(--brand-primary); font-weight: 700; text-decoration: none; }
    .login-newhere a:hover { text-decoration: underline; }
    .login-secure { text-align: center; max-width: 340px; margin: 26px auto 0; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
    .login-secure svg { color: var(--ok); vertical-align: -2px; margin-right: 4px; }
    @media (max-width: 560px) {
      .login-hero { margin-top: 24px; }
      .login-hero h1 { font-size: var(--fs-page-title); margin: 0 0 var(--space-title-copy); }
      .login-hero .login-sub { font-size: 15px; }
      .wrap:has(> #auth:not([hidden])) .authcard { padding: 24px 20px 22px; }
    }
    .evbody { flex: 1; min-width: 0; }
    @media (max-width: 560px) {
      /* event rows: title spans the full width; compact Open pill sits bottom-right */
      .evrow { flex-wrap: nowrap; gap: 11px; position: relative; }
      .evrow .boxcover { width: 82px; height: 64px; }
      .evbody { flex: 1 1 0; min-width: 0; }
      .evrow button[data-open] { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); padding: 9px 15px !important; font-size: 13px; }
      .evrow button[data-open]:hover, .evrow button[data-open]:active { transform: translateY(-50%); }
      .evrow .evmeta { padding-right: 84px; } /* room for .evrow's absolute Open button */
      /* let titles use the full width and wrap instead of cutting off */
      .evbody b { font-size: 15px !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.25; }
      .evrow .evmeta { flex-direction: column; align-items: flex-start; gap: 4px; }
      .evrow .evmeta .tierpill { font-size: 9.5px; padding: 2px 7px; letter-spacing: .4px; }
      .evrow .evmeta .muted { font-size: 12px !important; }
      /* package picker: select on top, create button full-width below */
      .pkgrow { flex-wrap: wrap; }
      .pkgrow select { flex: 1 1 100%; }
      .pkgrow #create { flex: 1 1 100% !important; width: 100% !important; justify-content: center; }
      #free-cta #create-free { flex: 1 1 100% !important; width: 100% !important; justify-content: center; }
    }
    .tile-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; z-index: 3; pointer-events: none; }
    .tile-badges span { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
    .tile-badges svg { width: 14px; height: 14px; }
    .tile-badges .vbadge svg { margin-left: 1px; }
    .statuspill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; vertical-align: 1px; margin-left: 2px; }
    .statuspill.active { background: #e7f9f0; color: #0c9d63; }
    .statuspill.prelive { background: #fbf3e0; color: #9a7b1e; }
    .statuspill.closed, .statuspill.archived, .statuspill.ended, .statuspill.expired { background: #f1f1f5; color: #6b7280; }
    /* ---- BUTTON LANGUAGE (decided with V, 28 Jul 2026) ----
       Two shapes, two meanings:
       1. GRADIENT PILL (999px)      = the one primary commitment per view.
          "Create new event", "Continue to checkout", "Try it free" (marketing),
          slideshow link, tour CTA. At most one per screen.
       2. RECTANGLE (11-13px radius) = everything else.
          - dashed border  = invitation / suggestion (.evcta-btn, empty state)
          - solid border   = secondary & utility (plan choosers, banner actions,
                             Print sign / Copy link, ghosts)
       If adding a button: default to rectangle; earn the pill. */
    /* pricing cards */
    /* ---- app shell: nav + every host view share one rounded surface ---- */
    .appshell { max-width: 1080px; margin: 20px auto 34px; background: #fff; border: 1px solid var(--brand-soft); border-radius: 26px;
      box-shadow: 0 18px 50px rgba(36,49,109,.07), 0 2px 8px rgba(36,49,109,.04); overflow: hidden; }
    .appshell .nav { max-width: none; margin: 0; padding: 15px 26px; border-bottom: 1px solid var(--brand-soft); }
    .appshell .wrap { max-width: none; padding: 0 26px 30px; }
    .site-legal-footer .host-footer-tagline { display: none; }
    .site-legal-footer .host-footer-flag { display: none; flex: none; }
    .appshell > .host-footer .footer-copy { display: flex; align-items: flex-start; gap: 8px; }
    .appshell > .host-footer .host-footer-flag { margin-top: .35em; }
    .appshell:has(#dash:not([hidden]), #createview:not([hidden])) > .host-footer .host-footer-flag { display: block; }
    .appshell > footer.host-footer { width: calc(100% - 52px); margin: 0 auto; padding: 12px 0 calc(18px + env(safe-area-inset-bottom, 0px)); grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 16px; color: var(--text-copy); }
    .appshell > .host-footer nav { position: relative; justify-content: flex-start; text-align: left; }
    .appshell > .host-footer nav::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: currentColor; opacity: .35; pointer-events: none; }
    .appshell > .host-footer .host-footer-tagline { display: block; margin: 0; text-align: right; font-size: 11px; letter-spacing: .01em; color: inherit; }
    @media (max-width: 760px) {
      .appshell > footer.host-footer { width: calc(100% - 32px); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 0 12px; padding-top: 16px; text-align: left; }
      .appshell > .host-footer .footer-copy { grid-column: 1; grid-row: 1; }
      .appshell > .host-footer nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; text-align: left; }
      .appshell > .host-footer nav::before { display: none; }
      .appshell > .host-footer .host-footer-tagline { grid-column: 2; grid-row: 1; text-align: right; }
    }
    @media (max-width: 380px) {
      .appshell > footer.host-footer { font-size: 10px; column-gap: 10px; }
    }
    /* The events view no longer draws its own panel — the shell is the panel. */
    .dash-panel { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
    .dash-head { position: relative; margin: 0 -26px; padding: 30px 26px 50px; min-height: 158px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-radius: 0; }
    /* Decorative header art bleeds off the top-right and dissolves to the left so
       the title always sits on clean white. Gradient is the fallback if the file 404s. */
    .dh-art { position: absolute; inset: 0 0 0 auto; width: 62%; pointer-events: none;
      background:
        linear-gradient(to bottom, transparent 52%, #fff 100%),
        linear-gradient(to right, #fff 0%, rgba(255,255,255,.94) 20%, rgba(255,255,255,0) 60%),
        url('/img/dash-hero-photoora-v3.webp') right center/cover no-repeat,
        linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(243,236,255,.8) 42%, rgba(252,231,243,.8) 100%); }
    .dh-titlerow { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
    .dash-head h1 { font-family: var(--font-sans); font-size: var(--fs-page-title); font-weight: var(--fw-heading); letter-spacing: -1px; line-height: var(--lh-heading); margin: 0; }
    button.dh-new { position: relative; overflow: visible; width: auto; flex: none; display: inline-flex; align-items: center; gap: 9px;
      border-radius: var(--r-pill); min-height: 48px; padding: 11px 20px; font-size: 15.5px; }
    button.dh-new svg { width: 17px; height: 17px; }
    .dh-sub { position: relative; color: var(--muted); font-size: 14.5px; margin: 12px 0 0; line-height: var(--lh-help); }
    @media (min-width: 901px) {
      .dash-head { padding-top: 15px; padding-bottom: 36px; min-height: 198px; justify-content: flex-start; align-items: flex-start; }
      .dh-titlerow { display: contents; }
      .dash-head h1 { position: relative; }
      .dh-sub { order: 1; }
      button.dh-new { order: 2; min-width: 280px; min-height: 60px; justify-content: center; margin-top: 18px; padding: 16px 30px; font-size: 17px; }
    }
    /* toolbar: sort + view toggle */
    .dt-sort { display: flex; align-items: center; gap: 6px; color: var(--muted); }
    .dt-sort .dt-select { border: 0; background: none; padding-left: 0; min-width: 132px; }
    .dt-view { display: flex; gap: 6px; flex: none; }
    button.dtv { width: 40px; height: 40px; min-height: 0; flex: none; padding: 0; display: flex; align-items: center; justify-content: center;
      background: #fff; border: 1px solid var(--brand-border); border-radius: 11px; box-shadow: none; color: #9a93b5; }
    button.dtv:hover { transform: none; box-shadow: none; background: var(--bg-tint); color: var(--brand-primary); }
    button.dtv.on { background: var(--brand-fill); border-color: transparent; color: #fff; }
    button.dtv.on:hover { background: var(--brand-fill); color: #fff; }
    /* filter tabs */
    /* overflow-y must be pinned: `overflow-x:auto` alone promotes the Y axis to
       auto too, and the tabs' -1px bottom margin then draws a stray scrollbar. */
    .dash-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--brand-border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
    .dash-tabs::-webkit-scrollbar { display: none; }
    button.dtab { width: auto; flex: none; min-height: 0; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none;
      color: var(--muted); font-weight: 700; font-size: 14px; padding: 12px 14px; margin-bottom: -1px; white-space: nowrap; }
    button.dtab:hover { transform: none; box-shadow: none; background: none; color: #4a4360; }
    button.dtab.on { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
    .dtab-n { color: #a9a2c2; font-weight: 700; margin-left: 5px; font-size: 13px; }
    button.dtab.on .dtab-n { color: var(--brand-primary); }
    /* events dashboard: toolbar + stats + card grid (V's mockup, Jul 13) */
    .dash-toolbar { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: -20px; margin-bottom: 12px; flex-wrap: wrap; background: #fff; }
    .dt-search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--muted); }
    .dt-search input, .dt-search input:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; padding: 10px 0; flex: 1; min-width: 0; font: inherit; background: none; }
    .dt-search:focus-within { border-color: var(--brand-border-strong); } /* the WRAPPER shows focus instead */
    select.dt-select { width: auto; flex: none; padding: 10px 32px 10px 12px; font-size: 13.5px; }
    .dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 18px; padding: 12px 0; border-radius: 18px; }
    .dstat { display: flex; align-items: center; gap: 15px; padding: 14px 28px; background: none; border: 0; border-radius: 0; box-shadow: none; }
    .dstat + .dstat { border-left: 1px solid var(--brand-soft); }
    .dstat-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
    .dstat-ico img { display: block; width: 100%; height: 100%; object-fit: contain; }
    .dstat b { font-size: 24px; line-height: 1.15; display: block; }
    .dstat-l { color: var(--muted); font-size: 12.5px; }
    .dl-s { display: none; } /* short stat label is phone-only */
    .evgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
    @media (max-width: 1180px) { .evgrid { grid-template-columns: repeat(3, 1fr); } }
    /* --- event-window popover under the QR (rebuilt 31 Jul to V's mockup) ---
       The old version was inline-styled with `white-space:nowrap` and `left:0`,
       so three lines of dates ran straight out of the card. Now a proper card:
       fixed width, wrapping text, centred on its trigger, icon per row. */
    .dpop { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 8px);
      z-index: 30; width: 302px; max-width: min(302px, 86vw); text-align: left;
      background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px;
      box-shadow: 0 18px 44px rgba(36,49,109,.15), 0 4px 12px rgba(36,49,109,.06); }
    .dpop[hidden] { display: none; }   /* author display: beats the UA rule */
    .dpop-pill { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 4px;
      background: var(--bg-tint); color: var(--brand-primary); border-radius: 999px;
      padding: 6px 13px; font-size: 12.5px; font-weight: 700; }
    .dpop-pill svg { width: 12px; height: 12px; }
    .dpop-row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; }
    .dpop-row + .dpop-row { border-top: 1px solid var(--brand-soft); }
    .dpop-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--bg-tint);
      color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    .dpop-ic svg { width: 18px; height: 18px; }
    .dpop-tx { font-size: 13px; line-height: 1.5; color: var(--muted); }
    .dpop-tx b { color: var(--ink); font-weight: 700; white-space: nowrap; }

    .evcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px #24263804; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; cursor: pointer; }
    /* The whole card is clickable, so it needs a visible keyboard focus ring. */
    .evcard:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
    .evcover { transition: transform .35s ease; }
    @media (hover: hover) {
      .evcard:hover { transform: translateY(-2px); border-color: var(--brand-border-strong); box-shadow: 0 8px 20px #2426380b; }
      .evcard:hover .evcover { transform: scale(1.015); }
    }
    .evcover { height: 178px; margin: 8px 8px 0; border-radius: 10px; background: var(--brand-soft) center/cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; }
    .evcover.loaded { animation: covfade .45s ease; }
    .evcover.shim:not(.loaded):not(.covdone)::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(100deg, var(--brand-soft) 25%, var(--brand-tint) 50%, var(--brand-soft) 75%); background-size: 200% 100%; animation: tileshim 1.3s ease-in-out infinite; }
    .evcover.shim:not(.loaded):not(.covdone) .evph { visibility: hidden; }
    /* One entry sweep also covers cached photos and empty-event artwork.
       It never hides ready media, intercepts clicks, or waits for a download. */
    .evcard { position: relative; }
    .evcard.entry-shimmer::before, .pmedia.entry-shimmer::before {
      content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
      background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.85) 47%, rgba(233,225,255,.75) 53%, transparent 75%);
      background-size: 200% 100%; opacity: 0; animation: entry-sweep 1s ease-in-out both paused;
    }
    .evcard.entry-shimmer::before {
      z-index: 3; animation-duration: 1.6s;
      background-image: linear-gradient(105deg, transparent 20%, rgba(175,140,255,.3) 40%, rgba(255,255,255,.92) 50%, rgba(175,140,255,.3) 60%, transparent 80%);
    }
    .evcard.entry-shimmer.entry-visible::before,
    .pmedia.entry-shimmer.entry-visible:not(.loading)::before { animation-play-state: running; }
    @keyframes entry-sweep {
      0% { background-position: 200% 0; opacity: 0; }
      15%, 80% { opacity: 1; }
      100% { background-position: -200% 0; opacity: 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .sk, .boxcover.shim, .evcover.loaded, .evcover.shim:not(.loaded):not(.covdone)::after { animation: none; }
      .evcard.entry-shimmer::before, .pmedia.entry-shimmer::before { animation: none; }
    }
    .evph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #b6aee2; font-size: 12px; }
    .evcover.loaded .evph { display: none; }
    .evph-ready { position: relative; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; justify-content: center; gap: 2px; padding: 10px 8px; text-align: center;
      background: radial-gradient(ellipse at 85% 5%, rgba(255,255,255,.75), transparent 55%), linear-gradient(140deg, #eee6ff, #f8f5ff 70%, #f2edfc); }
    .evph-ready::before, .evph-ready::after { position: absolute; pointer-events: none; line-height: 1; }
    .evph-ready::before { content: '✦'; color: #fff; font-size: 17px; top: 20%; left: 15%; text-shadow: 140px 26px 0 #ddd0fb; }
    .evph-ready::after { content: '◆'; color: #e4d9fc; font-size: 18px; top: 60%; left: 10%; }
    .evph-ready .evtype-art { position: relative; width: 112px; height: 95px; flex: none; object-fit: contain; transform: scale(1.22); margin: -3px 0 -2px; }
    .evph-ready strong { position: relative; color: #8462d7; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
    .evph-ready > span { position: relative; color: #85819e; font-size: 10.5px; line-height: 1.4; }
    .evcard-body { padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
    .evcard-heading { min-width: 0; }
    .evcard-heading .evmeta { margin-top: 2px; }
    .evcard-body > div:first-child b { font-family: var(--font-sans); font-size: 16px !important; font-weight: var(--fw-emphasis); letter-spacing: -.2px; }
    /* Meta stays on ONE line. Only the DIRECT children may shrink — a plain
       `span:last-child` also matches the inner count span, which then collapses
       to zero width and the number vanishes. */
    .evinfo { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; flex-wrap: nowrap; white-space: nowrap; }
    .evinfo > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
    .evinfo > span:last-child { overflow: hidden; text-overflow: ellipsis; }
    .evinfo > span:first-child { flex: none; }
    .evinfo [data-mcount] { flex: none; overflow: visible; }
    .evinfo svg { color: #b9b2d4; flex: none; }
    /* "Open event ->" as a quiet text link on its own row, divided from the meta. */
    button.evopen { width: 100%; margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
      background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
      color: var(--brand-primary); font-weight: 700; font-size: 13.5px; min-height: 0; padding: 12px 2px 12px; margin-left: -2px; margin-right: -2px; }
    button.evopen:hover { transform: none; box-shadow: none; background: none; color: var(--brand-hover); }
    button.evopen:hover svg { transform: translateX(3px); }
    button.evopen svg { transition: transform .18s ease; }
    .test-head { font-weight: var(--fw-subheading); font-size: 13.5px; margin: 18px 0 10px; color: #3f4658; line-height: var(--lh-subheading); }
    /* ---- tail "create your next event" panel ---- */
    /* display:flex on the class silently defeats the `hidden` attribute (author
       styles beat the UA's [hidden]{display:none}) - which is why "No more events
       yet" showed even on a zero-event dashboard. This rule restores hidden. */
    .ev-cta[hidden] { display: none; }
    .ev-cta { position: relative; display: flex; align-items: center; gap: 22px; margin-top: 20px; padding: 22px 26px; min-height: 132px;
      border: 1px solid var(--brand-soft); border-radius: 20px; overflow: hidden; background: var(--brand-tint); }
    .evcta-art { position: absolute; left: 0; top: 0; bottom: 0; width: 32%; pointer-events: none;
      background:
        linear-gradient(to right, rgba(251,249,255,0) 45%, #fbf9ff 100%),
        url('/img/dash-cta.webp') left center/cover no-repeat,
        linear-gradient(90deg, #f3ecff, rgba(255,255,255,0)); }
    .evcta-txt { position: relative; flex: 1; min-width: 0; margin-left: 30%; }
    .evcta-txt b { font-family: var(--font-sans); font-size: 21px; font-weight: var(--fw-heading); display: block; line-height: var(--lh-heading); }
    .evcta-txt p { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; }
    button.evcta-btn { position: relative; width: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      background: #fff; border: 1.5px dashed var(--brand-border); border-radius: 14px; box-shadow: none; color: var(--brand-primary); font-weight: 700; font-size: 14px; padding: 15px 30px; }
    button.evcta-btn:hover { transform: none; box-shadow: none; background: var(--bg-tint); border-color: var(--brand-primary); }
    /* ---- list view (the toolbar's second view button) ---- */
    .evgrid.list { grid-template-columns: 1fr; gap: 10px; }
    .evgrid.list .evcard { flex-direction: row; align-items: stretch; }
    .evgrid.list .evcover { width: 168px; height: auto; min-height: 96px; flex: none; border-radius: 14px; margin: 12px 0 12px 12px; }
    .evgrid.list .evph-ready { padding: 6px; }
    .evgrid.list .evtype-art { width: 76px; height: 52px; margin: 0; }
    .evgrid.list .evph-ready strong { font-size: 10.5px; }
    .evgrid.list .evph-ready > span { font-size: 9px; }
    .evgrid.list .evcard-body { flex-direction: row; align-items: center; gap: 18px; padding: 14px 18px; }
    .evgrid.list .evcard-body > div:first-child { flex: 1 1 34%; }
    .evgrid.list .evmeta { margin-top: 0; flex: none; }
    .evgrid.list .evinfo { flex: none; }
    .evgrid.list button.evopen { width: auto; flex: none; align-self: flex-end; margin-top: auto; margin-left: auto; border-top: 0; padding: 8px 0; gap: 6px; }
    /* First-time event welcome tips. */
    #event-tour { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(35,29,55,.20); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: tourfade .25s ease; }
    #event-tour[hidden] { display: none; }
    @keyframes tourfade { from { opacity: 0; } to { opacity: 1; } }
    .tour-card { position: relative; background: #fff; border: 1px solid var(--brand-border); border-radius: 22px; padding: 32px; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(30,20,80,.16); text-align: left; }
    .tour-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
    .tour-x:hover { transform: none; background: #f2f2f7; color: var(--ink); }
    .tour-card h2 { margin: 0 24px 8px 0; font-size: 26px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .tour-sub { margin: 0 0 22px; color: var(--text-copy); font-size: 15px; line-height: 1.5; }
    .tour-tip { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
    .tour-tip:first-of-type { border-top: 0; padding-top: 0; }
    .tour-ico { width: 56px; height: 56px; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    .tour-ico img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.2); }
    .tour-ico .tour-memory-art { transform: scale(1.45); }
    .tour-ico-qr { width: 44px; height: 44px; margin: 6px; border-radius: 12px; background: var(--brand-soft); }
    .tour-tip b { font-size: 16px; font-weight: var(--fw-subheading); }
    .tour-tip p { margin: 5px 0 0; color: var(--text-copy); font-size: 15px; line-height: 1.6; }
    .tour-tip p b { font-size: inherit; color: var(--ink); }
    button.tour-cta { width: 100%; margin-top: 8px; min-height: 48px; font-size: 15px; box-shadow: none; }
    @media (max-width: 540px) {
      .tour-card { padding: 28px 20px 20px; border-radius: 18px; }
      .tour-card h2 { font-size: 23px; }
      .tour-tip { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
      .tour-ico { width: 48px; height: 48px; }
      .tour-ico-qr { width: 40px; height: 40px; margin: 4px; }
    }
    /* welcome / empty state (first-time host, zero events) */
    .empty-hero { background: #fff; border: 1px solid var(--brand-border); border-radius: 20px; box-shadow: 0 10px 30px rgba(36,49,109,.06); padding: 34px 36px 26px; }
    .eh-top { display: flex; align-items: center; gap: 32px; }
    .eh-art { flex: none; width: 42%; max-width: 420px; }
    .eh-art svg { width: 100%; height: auto; display: block; }
    .eh-right { flex: 1; min-width: 0; }
    .eh-spark { color: var(--brand-primary); display: inline-flex; margin-bottom: 2px; }
    .eh-right h2 { margin: 0 0 8px; font-size: 30px; line-height: var(--lh-heading); letter-spacing: -.5px; font-weight: var(--fw-heading); }
    .eh-right > p { margin: 0 0 20px; color: var(--muted); font-size: 15px; max-width: 420px; line-height: 1.5; }
    .eh-btns { display: flex; gap: 12px; flex-wrap: wrap; }
    button.eh-cta { border-radius: 13px; width: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 26px; font-size: 15px; }
    /* 13px, not 999px: V prefers rectangular over pill for these (28 Jul). The
       .eh-cta beside it gets the same radius via the rule below. */
    button.eh-ghost { width: auto; min-height: 48px; padding: 12px 22px; border-radius: 13px; border: 1px solid var(--brand-border); background: #fff; color: var(--brand-primary); font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: none; }
    button.eh-ghost:hover { background: var(--brand-tint); transform: none; border-color: var(--brand-border-strong); }
    .eh-steps { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; margin-top: 22px; background: var(--brand-tint); }
    .eh-step { flex: 1; display: flex; align-items: flex-start; gap: 11px; }
    .eh-sico { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    .eh-sico svg { width: 19px; height: 19px; }
    .eh-step b { font-size: 13.5px; display: block; margin-bottom: 2px; }
    .eh-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
    .eh-arrow { flex: none; color: var(--brand-border-strong); font-size: 22px; line-height: 1; }
    .eh-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
    .eh-feat { display: flex; align-items: flex-start; gap: 10px; }
    .eh-fico { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
    .eh-fico svg { width: 16px; height: 16px; }
    .eh-feat b { font-size: 12.5px; display: block; }
    .eh-feat p { margin: 1px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
    @media (max-width: 820px) {
      .empty-hero { padding: 26px 18px 20px; }
      .eh-top { flex-direction: column; text-align: center; gap: 16px; }
      .eh-art { width: 280px; max-width: 78%; }
      .eh-right > p { margin-left: auto; margin-right: auto; }
      .eh-btns { justify-content: center; }
      .eh-steps { flex-direction: column; align-items: stretch; gap: 14px; text-align: left; }
      .eh-arrow { display: none; }
      .eh-features { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 520px) { .eh-features { grid-template-columns: 1fr; } .eh-right h2 { font-size: 24px; font-weight: var(--fw-heading); line-height: var(--lh-heading); } }
    @media (max-width: 900px) { .evgrid { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 640px) {
      /* phone dashboard (V's mockup): CTA on top, search below, compact stat
         trio, horizontal event cards with the cover as a left thumbnail */
      .dash-toolbar { flex-direction: column; align-items: stretch; padding: 5px 10px; margin-top: -8px; }
      .dash-panel { padding: 0 0 16px; border-radius: 18px; }
      .dash-head { margin: -16px -14px 0; padding: 18px 14px 24px; border-radius: 18px 18px 0 0; }
      .dh-art { width: 74%; }
      .dash-head h1 { font-size: var(--fs-page-title); }
      .dh-titlerow { gap: 12px; align-items: stretch; }
      button.dh-new { width: 100%; justify-content: center; border-radius: var(--r-pill); }
      .dh-sub { font-size: 13px; color: var(--muted); line-height: var(--lh-help); }
      /* the selects are hidden on phones, so the sort wrapper would leave a
         lone icon attached to nothing — hide the whole control. */
      .dt-sort { display: none; }
      .dt-view { display: none; } /* phones are single-column already */
      .dash-tabs { gap: 0; margin-bottom: 14px; }
      button.dtab { font-size: 12.5px; padding: 10px 9px; }
      /* Wrapper kept on phones (V prefers the framed look). Even margin all
         round so the top reads as an intentional frame, not a stray gap. */
      /* a 50px-blur shadow on a page-sized box forces a big repaint layer while
         scrolling — barely visible at this size anyway. */
      /* Rounded frame on all four corners, sitting on the shared tinted body
         background (the pink/purple radial washes in shared/styles.css). */
      .appshell { margin: 6px 6px 20px; border-radius: 16px; box-shadow: 0 2px 10px rgba(36,49,109,.06); }
      .appshell:has(#auth:not([hidden])) { width: calc(100% - 12px); }
      .appshell .nav { padding: 10px 12px; }
      .appshell .wrap { padding: 0 8px 20px; }
      .dash-head { min-height: 0; margin: 0 -8px; padding: 20px 12px 26px; }
      button.dh-new { min-height: 48px; padding: 12px 18px; font-size: 14px; }
      .ev-cta { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; padding: 18px; min-height: 0; }
      .evcta-art { position: relative; left: auto; top: auto; bottom: auto; width: 100%; height: 88px; border-radius: 14px;
        background-position: center; -webkit-mask-image: none; mask-image: none; }
      .evcta-txt { margin-left: 0; }
      button.evcta-btn { width: 100%; }
      .dt-search { flex-basis: auto; border: 0; padding: 0 2px; } /* the card already provides the frame */
      .dt-search input { padding: 9px 0; font-size: 14px; }
      select.dt-select { display: none; }
      .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 2px 0; }
      .dstat { flex-direction: row; align-items: center; justify-content: center; gap: 9px; padding: 13px 6px; }
      .dstat-ico { width: 32px; height: 32px; border-radius: 10px; }
      .dstat b { font-size: 16px; line-height: 1.1; }
      .dstat-l { font-size: 10.5px; }
      .dl-f { display: none; }
      .dl-s { display: inline; } /* the short "Memories" label takes over */
      .evgrid { grid-template-columns: 1fr; gap: 10px; }
      .evcard { flex-direction: row; align-items: stretch; }
      .evcover { width: clamp(60px, calc(100vw - 260px), 116px); min-height: 118px; height: auto; flex: none; border-radius: 12px; margin: 9px 0 9px 9px; }
      .evph { font-size: 9.5px; gap: 4px; text-align: center; padding: 4px; }
      .evph svg { width: 18px; height: 18px; }
      .evph-ready { padding: 6px 4px; gap: 2px; }
      /* Keep the decorative diamond in the artwork area, above the captions. */
      .evph-ready::after { top: 12%; left: auto; right: 10%; font-size: 12px; }
      .evph-ready .evtype-art { width: 95px; height: 72px; margin: -3px 0 -2px; }
      .evph-ready strong { font-size: 10px; }
      .evph-ready > span { font-size: 9px; }
      .evcard-body { padding: 12px 10px 10px; gap: 7px; }
      .evcard .evmeta { flex-direction: row; align-items: center; gap: 5px; flex-wrap: nowrap; padding-right: 0; }
      .evcard .evmeta .tierpill, .evcard .evmeta .statuspill { white-space: nowrap; font-size: 10px; padding: 3px 5px; letter-spacing: 0; margin-left: 0; }
      .evcard-body > div:first-child b { font-size: 16.5px !important; font-weight: var(--fw-emphasis); }
      .evcard .evinfo { font-size: 11px; flex-direction: column; align-items: flex-start; gap: 5px; }
      .evcard .evinfo > .evdate { order: -1; display: inline-flex; overflow: visible; }
      button.evopen { width: auto; align-self: flex-end; justify-content: flex-end; min-height: 30px; padding: 6px 2px 2px; font-size: 12.5px; border-top: 0; gap: 5px; }
      .test-head { margin: 14px 0 8px; font-weight: var(--fw-subheading); line-height: var(--lh-subheading); }
    }
    button.freepill { width: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; box-shadow: none; white-space: nowrap; min-height: 0; }
    button.freepill .fp-spark, button.freepill .fp-arrow { color: var(--brand-primary); }
    button.freepill .fp-lead { color: #6b7280; }
    button.freepill b { font-weight: 800; color: var(--brand-primary); }
    button.freepill:hover { transform: none; background: none; }
    button.freepill:hover b { text-decoration: underline; }
    button.freepill:hover .fp-arrow { transform: translateX(2px); transition: transform .15s ease; }
    /* z-index 2 so the card paints OVER the hero art (1) and clips it simply by
       being opaque. Safe to make this a stacking context now that the free-trial
       pill lives inside .cardhead and no longer needs to escape the card. */
    .createcard { position: relative; z-index: 2; }
    /* A flex child of .cardhead, pushed right. NOT absolute any more - the hero art
       overlaps the card's top-right corner, so anything pinned there vanishes. */
    .cardhead > .freepill { margin-left: auto; width: auto; flex: none; align-self: center; }
    /* Phone: .cardhead wraps so the pill drops to its own right-aligned row rather
       than squeezing the title. */
    @media (max-width: 620px) {
      .cardhead { flex-wrap: wrap; }
      /* "New here? Try free" drops to its own row, CENTERED under the heading (mockup). */
      .cardhead > .freepill { flex-basis: 100%; margin: 10px 0 0; justify-content: center; font-size: 12.5px; padding: 6px 12px; }
      #event-date { max-width: 100% !important; }   /* full-width date field on phones */
      /* Constrain the hero copy to a centred column so the heading breaks to ~3 lines
         and reads big like the mockup — it was spanning the full bleed width. */
      .store-h1 { font-size: 35px; max-width: 350px; margin-left: auto; margin-right: auto; }
      .store-lead { max-width: 350px; color: var(--text-copy); line-height: var(--lh-copy); }
      /* Smaller eyebrow pill (was reading too large on phones). */
      .store-eyebrow { font-size: 10.5px; padding: 4px 11px; }
      /* Shorter title/date fields — less tall, same width (keep 15px sides). */
      #title, #event-date { padding-top: 9px; padding-bottom: 9px; }
    }
    /* ---- store page: hero, event-type chips, preview, trust, FAQ ---- */
    /* The background reaches the shell edge; copy stays within the form column. */
    .store-band, .store-hero-mob { --store-bleed: clamp(26px, calc((100vw - 982px) / 2), 49px); }
    .store-band { position: relative; margin: -10px calc(-1 * var(--store-bleed)) 0; padding: 0 var(--store-bleed); }
    .store-band::before { content: ''; position: absolute; inset: -40px 0 -60px; z-index: 0; background:
        linear-gradient(180deg, rgba(255,255,255,0) 62%, #fff 100%),
        radial-gradient(560px 300px at 50% 40%, rgba(255,255,255,.94), rgba(255,255,255,0) 72%),
        radial-gradient(680px 380px at 16% 22%, rgba(178,142,232,.34), transparent 68%),
        radial-gradient(720px 400px at 88% 30%, rgba(255,146,190,.24), transparent 66%),
        linear-gradient(180deg, #f4edfc 0%, #faf6fe 45%, rgba(255,255,255,0) 100%); }
    .store-hero { position: relative; z-index: 1; text-align: center; max-width: 660px; margin: 4px auto 20px; }
    .store-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-primary); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; background: var(--bg-tint); padding: 5px 13px; border-radius: 999px; margin-bottom: 12px; }
    /* Tracking is in em, not px, so it stays visually identical to .dash-head h1
       (-1px at 46px) even though this heading is smaller. */
    .store-h1 { font-family: var(--font-sans); font-weight: var(--fw-heading); font-size: var(--fs-page-title); line-height: var(--lh-heading); letter-spacing: -.022em; margin: 0 0 12px; color: var(--ink); }
    .store-grad { background: var(--brand-fill); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    .store-lead { color: var(--text-copy); font-size: 15px; line-height: var(--lh-copy); max-width: 560px; margin: 0 auto; }
    .store-hero-mob { display: none; }
    @media (max-width: 899px) {
      .store-h1, .store-lead { display: none; }
      /* Keep the complete phone and QR sign in view by cropping the empty left side. */
      .store-hero-mob {
        display: block; margin: 8px calc(-1 * var(--store-bleed)) -20px;
        aspect-ratio: 3 / 2;
        background:
          linear-gradient(180deg, rgba(255,255,255,0) calc(100% - 32px), #fff 100%),
          url('/img/checkout-hero-v1.webp') 90% center / cover no-repeat;
        position: relative; z-index: 1;
      }
    }
    @media (max-width: 640px) {
      .store-band, .store-hero-mob { --store-bleed: 8px; }
    }
    @media (min-width: 900px) {
      /* Tuck the form into the scene; its existing stacking order keeps it above the fade. */
      .store-band { min-height: 320px; padding-top: 12px; padding-bottom: 30px; margin-bottom: -24px; }
      .store-band::before {
        inset: -40px 0 0;
        background:
          linear-gradient(180deg, rgba(255,255,255,0) calc(100% - 48px), #fff 100%),
          radial-gradient(ellipse 30% 44% at 33% 70%, rgba(255,255,255,.85), rgba(255,255,255,.5) 55%, transparent),
          url('/img/checkout-hero-v1.webp') center / cover no-repeat;
      }
      /* Center the copy in the photo's open left area, clear of the handset. */
      .store-hero { width: 49%; max-width: 480px; margin: 4px 0 0 6%; }
      .store-h1 { font-size: 36px; }
    }
    .evtype-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
    button.evtype { width: auto; min-height: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #3f4658; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: none; }
    button.evtype:hover { transform: none; border-color: var(--brand-border-strong); background: var(--brand-tint); }
    button.evtype.on { background: var(--brand-soft); border-color: #d8b4fe; color: var(--brand-primary); font-weight: 800; }
    .pv-band { display: flex; align-items: center; gap: 26px; margin-top: 16px; }
    .pv-media { flex: none; width: 44%; max-width: 360px; }
    .pv-media img { width: 100%; border-radius: 14px; display: block; aspect-ratio: 1; object-fit: cover; }
    .pv-copy { flex: 1; min-width: 0; }
    .pv-eyebrow { color: var(--brand-primary); font-weight: 800; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
    .pv-copy h3 { font-size: 21px; margin: 6px 0 8px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .pv-copy > p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 12px; }
    .pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
    .pv-list li { position: relative; padding-left: 24px; font-size: 13.5px; color: #3f4658; }
    .pv-list li::before { content: '✓'; position: absolute; left: 2px; color: var(--brand-primary); font-weight: 800; }
    .trust-band, .faq-band { margin-top: 16px; }
    .tb-head { text-align: center; font-size: 19px; margin: 4px 0 18px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .tb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .tb-item { text-align: center; padding: 4px 8px; }
    .tb-ico { display: inline-flex; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-primary); align-items: center; justify-content: center; margin-bottom: 8px; }
    .tb-item b { display: block; font-size: 14.5px; margin-bottom: 4px; }
    .tb-item p { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
    .faq-band details { border-top: 1px solid var(--line); padding: 13px 2px; }
    .faq-band details:first-of-type { border-top: 0; }
    .faq-band summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
    .faq-band summary::-webkit-details-marker { display: none; }
    .faq-band summary::after { content: '+'; color: var(--brand-primary); font-size: 20px; font-weight: 400; line-height: 1; }
    .faq-band details[open] summary::after { content: '–'; }
    .faq-band details p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 9px 0 0; }
    @media (max-width: 760px) {
      .store-h1 { font-size: 26px; }
      .pv-band { flex-direction: column; text-align: center; gap: 16px; }
      .pv-media { width: 260px; max-width: 76%; }
      .pv-list { align-items: flex-start; text-align: left; max-width: 240px; margin: 0 auto; }
      .tb-grid { grid-template-columns: 1fr; gap: 18px; }
      /* even 2-col grid so the chips align neatly instead of ragged-wrapping */
      .evtype-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      button.evtype { width: 100%; justify-content: center; text-align: center; padding: 10px 8px; }
      button.evtype:last-child { grid-column: 1 / -1; }
    }
    .pick-head { margin: 26px 0 6px; font-size: 21px; letter-spacing: -.4px; scroll-margin-top: 24px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
    .pick-sub { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
    .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
    .plan { position: relative; min-width: 0; border: 1px solid var(--brand-border); border-radius: 18px; padding: 22px 18px 18px; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--brand-tint), #fff 45%); transition: border-color .18s ease, box-shadow .18s ease; }
    .plan[data-plan="wedding"] { background: #fff; }
    .plan[data-plan="heirloom"] { background: #fff; }
    .plan.sel { border-color: var(--brand-primary); box-shadow: 0 0 0 1px var(--brand-border), 0 10px 28px color-mix(in srgb, var(--brand-primary) 11%, transparent); }
    .plan-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-fill); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
    .plan-head, .plan-hmid, .plan-hend { display: contents; }
    .pb-mob { display: none; }
    .plan-name { font-weight: var(--fw-subheading); font-size: 17px; line-height: var(--lh-subheading); }
    .plan-price { font-size: 29px; font-weight: 800; color: var(--brand-primary); margin: 6px 0 0; letter-spacing: -.6px; }
    .plan-billing { display: block; color: var(--muted); font-size: 11.5px; margin: 2px 0 12px; }
    .plan-tag { color: var(--text-copy); font-size: 12.5px; line-height: var(--lh-copy); min-height: 61px; margin: 0 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
    .plan-list { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; }
    .plan-list li { font-size: 12.5px; line-height: 1.55; padding: 7px 0 7px 19px; position: relative; }
    .plan-list strong { font-weight: var(--fw-emphasis); color: var(--ink); }
    .plan-list li::before { content: '✓'; position: absolute; left: 1px; color: var(--brand-primary); font-weight: 800; }
    .plan-list small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.5; margin-top: 2px; }
    .plan-list .plan-preview::before { content: '–'; color: var(--muted); }
    button.plan-btn { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--brand-border-strong); background: #fff; color: var(--brand-primary); font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: none; }
    button.plan-btn:hover { transform: none; background: var(--brand-tint); }
    button.plan-btn:focus-visible, .package-compare > summary:focus-visible, .package-back:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 4px; }
    .plan.sel button.plan-btn { background: var(--brand-fill); color: #fff; border-color: transparent; }
    .package-notes { color: var(--muted); font-size: 13px; line-height: var(--lh-help); margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); }
    .package-notes p { margin: 8px 0; }
    .package-notes strong { font-weight: var(--fw-emphasis); color: var(--ink); }
    .package-compare { border: 1px solid var(--brand-border); border-radius: 14px; margin: 16px 0 4px; overflow: clip; }
    .package-compare > summary { padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; color: var(--brand-primary); font-size: 13px; font-weight: 800; background: var(--brand-tint); }
    .package-compare > summary::-webkit-details-marker { display: none; }
    .package-compare > summary:focus-visible { outline-offset: -3px; }
    .package-compare > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 3px; flex: none; }
    .package-compare[open] > summary::after { transform: rotate(225deg); }
    .checkout-guarantee { max-width: 560px; margin: 20px auto 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-tint); text-align: center; }
    .checkout-guarantee h3 { margin: 0 0 5px; color: var(--ink); font-size: 14px; line-height: var(--lh-subheading); font-weight: var(--fw-subheading); }
    .checkout-guarantee p { margin: 0; color: var(--text-copy); font-size: 12.5px; line-height: var(--lh-copy); }
    .checkout-guarantee a { color: var(--brand-primary); font-weight: 600; text-underline-offset: 3px; }
    .package-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 1.45; color: var(--ink); }
    .package-table caption { padding: 16px 20px; text-align: left; color: var(--muted); font-size: 13px; }
    .package-table th, .package-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; text-align: center; overflow-wrap: anywhere; }
    .package-table th:first-child { text-align: left; width: 36%; padding-left: 20px; }
    .package-table th { font-weight: 600; }
    .package-table td:nth-child(3), .package-table thead th:nth-child(3) { background: #fcf7ff; }
    .package-table thead th { padding-top: 14px; padding-bottom: 14px; font-weight: 700; color: var(--ink); }
    .package-table small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
    .package-table .compare-emphasis td { font-weight: 700; }
    .package-table .compare-popular { display: table; margin: 5px auto 0; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-primary); font-size: 11px; font-weight: 600; }
    .compare-check { display: inline-block; color: var(--brand-primary); font-size: 19px; line-height: 1; }
    .package-table .compare-plan { display: none; }
    .package-table .compare-group th { padding: 9px 20px; background: var(--brand-tint); color: #645181; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
    .package-benefits { padding: 24px 18px; border-bottom: 1px solid var(--line); }
    .package-eyebrow { color: var(--brand-primary); font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
    .package-benefits h3, .keepsake-copy h3 { font-size: 23px; line-height: var(--lh-heading); letter-spacing: -.5px; margin: 7px 0; font-weight: var(--fw-heading); }
    .package-intro { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0 0 22px; }
    .benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
    .benefit { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
    .benefit-ico { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-primary); }
    .benefit h4 { font-size: 13px; margin: 0 0 4px; line-height: var(--lh-subheading); font-weight: var(--fw-subheading); }
    .benefit p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: var(--lh-help); }
    .keepsake-band { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 22px; background: linear-gradient(125deg, var(--brand-tint), #fff8fc); }
    .keepsake-figure { margin: 0; min-width: 0; }
    .keepsake-figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #e4dced; box-shadow: 0 12px 26px rgba(64,38,97,.10); }
    .keepsake-figure figcaption { font-size: 10.5px; line-height: 1.6; margin-top: 9px; color: #777083; text-align: center; }
    .keepsake-copy p { font-size: 13px; line-height: 1.8; color: #666478; margin: 10px 0; }
    .keepsake-copy .keepsake-detail { font-size: 11.5px; }
    button.package-back { display: inline-flex; align-items: center; color: var(--brand-primary); font-weight: 800; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; width: auto; padding: 0; background: none; border: 0; box-shadow: none; }
    button.package-back:hover { transform: none; background: none; box-shadow: none; }
    @media (max-width: 900px) and (min-width: 701px) {
      .plans { gap: 10px; }
      .plan { padding: 20px 12px 14px; }
      .plan-tag { min-height: 80px; color: var(--text-copy); line-height: var(--lh-copy); }
      .plan-list li { font-size: 12px; }
    }
    button.plancta { position: relative; width: 100%; max-width: 560px; margin: 4px auto 0; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; font-size: 16px; padding: 0 46px; }
    button.plancta > svg:last-of-type { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); margin: 0 !important; }
    .checkout-agreement { order: 1; width: 100%; max-width: 560px; margin: 18px auto 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; box-sizing: border-box; }
    .checkout-agreement-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 13px; font-weight: 400; line-height: 1.6; }
    .checkout-agreement label { display: inline; margin: 0; color: inherit; font: inherit; cursor: pointer; }
    .checkout-agreement input[type="checkbox"] { appearance: auto; flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--brand-primary); cursor: pointer; }
    .checkout-agreement input:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
    .checkout-agreement a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
    .checkout-agreement.needs-attention { background: #fff7fb; border-color: #d95095; }
    .checkout-agreement-error { margin: 6px 0 0 28px; color: #a12661; font-size: 13px; line-height: 1.5; }
    .checkout-agreement-error[hidden] { display: none; }
    @media (max-width: 700px) {
      .pick-head { font-size: 20px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
      .plans { grid-template-columns: minmax(0, 1fr); gap: 22px; }
      .plan { padding: 20px 16px 16px; }
      .plan-head { display: flex; align-items: center; gap: 10px; }
      .plan-hmid { display: block; flex: 1; min-width: 0; }
      .plan-hend { display: block; text-align: right; }
      .plan-name { font-size: 16px; font-weight: var(--fw-subheading); line-height: var(--lh-subheading); }
      .plan-price { margin: 0; font-size: 24px; }
      .plan-billing { font-size: 10px; margin: 2px 0 0; }
      .plan-tag { min-height: 0; margin: 14px 0 10px; padding-bottom: 12px; color: var(--text-copy); line-height: var(--lh-copy); }
      .plan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; margin-bottom: 14px; }
      .plan-list li { font-size: 12px; padding-top: 6px; padding-bottom: 6px; }
      .plan-list li:last-child { grid-column: 1 / -1; }
      .plan-list small { font-size: 11px; }
      .package-notes { font-size: 12px; color: var(--muted); line-height: var(--lh-help); }
      .package-table, .package-table tbody { display: block; }
      .package-table caption { display: block; }
      .package-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
      .package-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .package-table th:first-child { grid-column: 1 / -1; width: auto; padding: 12px 14px 5px; font-weight: 600; }
      .package-table td { border-top: 0; padding: 7px 7px 13px; font-size: 14px; }
      .package-table td small { font-size: 10px; }
      .package-table .compare-plan { display: block; color: #74618d; font-size: 10px; font-weight: 700; margin-bottom: 5px; }
      .package-table .compare-group th { padding: 10px 14px; }
      .benefit-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
      .package-benefits h3, .keepsake-copy h3 { font-size: 21px; font-weight: var(--fw-heading); line-height: var(--lh-heading); }
      .keepsake-band { grid-template-columns: minmax(0, 1fr); gap: 22px; }
      .paytrust { flex-wrap: wrap; text-align: center; line-height: 1.6; }
    }
    @media (max-width: 380px) {
      .plan-list { grid-template-columns: minmax(0, 1fr); }
      .plan-head { flex-wrap: wrap; }
      .plan-hend { flex: 0 0 100%; text-align: left; margin-top: 4px; }
      .plan-billing { display: inline; margin-left: 8px; }
      .plan-price { display: inline; }
    }
    /* checkout modal. PayPal official palette:
       yellow #FFC439, "Pay" navy #003087, "Pal" light blue #009CDE */
    .paytrust { display: block; text-align: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
    .paytrust svg { display: inline-block; vertical-align: -2px; margin-right: 6px; }
    .co-sum { display: flex; align-items: center; gap: 13px; padding-bottom: 4px; }
    .co-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; }
    .co-divider span { flex: 1; height: 1px; background: var(--line); }
    .co-divider em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; }
    button.cobtn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 0; border-radius: 14px; font-size: 15.5px; font-weight: 800; cursor: pointer; box-shadow: none; }
    button.cobtn[hidden] { display: none; }
    button.cobtn:hover { transform: none; filter: brightness(1.04); }
    button.cobtn.loading { opacity: .7; pointer-events: none; }
    button.co-pp { background: #ffc439; color: #003087; }
    .pp-word { font-weight: 800; font-style: italic; font-size: 1.12em; letter-spacing: .1px; }
    .pp-word i { font-style: italic; color: #003087; }
    .pp-word b { font-style: italic; color: #009cde; }
    button.co-stripe { background: var(--brand-fill); color: #fff; }
    /* checkout = modal over the dimmed dashboard */
    #checkout { position: fixed; inset: 0; background: rgba(28,30,58,.45); display: flex; align-items: center; justify-content: center; z-index: 95; padding: 20px; overflow: auto; }
    #checkout[hidden] { display: none; }
    .comodal { position: relative; background: #fff; border-radius: 20px; padding: 28px 34px 22px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: 0 28px 80px rgba(30,20,80,.3); text-align: center; }
    #co-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
    #co-close:hover { transform: none; background: #f2f2f7; color: var(--ink); }
    .co-sum { background: var(--brand-tint); border: 1px solid #ebe4fd; border-radius: 12px; padding: 12px 14px; }
    /* phone: the modal becomes a full-screen sheet — full width, no wasted
       margins, safe-area padding, everything reachable with less scrolling */
    @media (max-width: 640px) {
      #checkout { padding: 0; align-items: stretch; }
      .comodal { max-width: none; width: 100%; max-height: none; height: 100%; border-radius: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    }
    @media (hover: hover) {
      #gallery .tile .cap { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
      #gallery .tile:hover .cap { opacity: 1; transform: translateY(0); }
    }
    .swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: none; padding: 2px; cursor: pointer; width: auto; flex: 0 0 auto; box-shadow: none; }
    .swatch:hover, .swatch:active { transform: none; box-shadow: none; }
    .swatch .chip { width: 46px; height: 46px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .12s ease, border-color .12s ease; }
    .swatch:hover .chip { transform: scale(1.06); }
    .swatch.sel .chip { border-color: var(--ink, #1a1a1a); transform: scale(1.06); }
    .swatch .slabel { font-size: 12px; color: var(--muted); font-weight: 600; }
    .swatch.sel .slabel { color: var(--ink, #1a1a1a); }
    @media (max-width: 560px) {
      .nav { padding: 10px 16px; }
      /* Account control sizing lives in shared/styles.css. */
      #sharerow { flex-direction: column; align-items: stretch !important; gap: 14px; }
      #qr { align-self: center; }
      #copy, #slideshow-link { flex: 1; }
    }

