/* Guest gallery pages (guest links, legacy public galleries): page shell and
 * palette. The gallery itself is styled by gallery.css. Shared with the native
 * clients: neutral surfaces, brand teal, photos first. */
:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --surface: #fafafa;
  --elevated: #fff;
  --muted: #f0f0f2;
  --border: #e4e4e7;
  --fg: #09090b;
  --secondary: #66666f;
  --accent: #64b6ae;
  --accent-text: #1f7a71;
  --gallery-surface: var(--surface);
  --gallery-elevated: var(--elevated);
  --gallery-muted: var(--muted);
  --gallery-border: var(--border);
  --gallery-fg: var(--fg);
  --gallery-secondary: var(--secondary);
  --gallery-accent: var(--accent);
  --gallery-accent-text: var(--accent-text);
  --gallery-on-accent: #092e2b;
  --gallery-danger: #be123c;
  color: var(--fg);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root { --surface: #09090b; --elevated: #18181b; --muted: #222225; --border: #303034; --fg: #fafafa; --secondary: #a1a1aa; --accent-text: #7fd0c6; --gallery-danger: #fb7185; }
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; inset: 12px auto auto 12px; z-index: 20; background: var(--elevated); padding: 16px; border-radius: 10px; }
.guest-shell { max-width: 1560px; margin: auto; padding: 0 max(32px, env(safe-area-inset-left)); }
.masthead { min-height: 88px; padding-block: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.guest-brand { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.guest-brand-logo .logo { display: block; width: 166px; height: 28px; fill: currentColor; }
.guest-brand-logo .logo__mark { fill: var(--accent-text); }
.guest-brand-name { font-size: 23px; font-weight: 650; letter-spacing: -.5px; line-height: 1.3; overflow-wrap: anywhere; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 32px 0 26px; }
.gallery-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.gallery-toolbar-actions:not(:has(> :not([hidden]))) { display: none; }
.gallery-toolbar [aria-busy="true"] { cursor: progress; opacity: .75; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 750; letter-spacing: -.9px; line-height: 1.2; }
img { color: transparent; }
.guest-footer { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 40px 0 max(24px, env(safe-area-inset-bottom)); color: var(--secondary); font-size: 11px; font-weight: 500; }
.guest-footer .guest-brand-logo .logo { width: 95px; height: 16px; }
.guest-footer .guest-brand-name { font-size: 13px; font-weight: 500; letter-spacing: 0; text-align: center; }
.unavailable { min-height: 68vh; }
.unavailable-icon { display: grid; place-items: center; width: 72px; height: 72px; background: var(--muted); color: var(--accent-text); border-radius: 24px; margin-bottom: 24px; }
.unavailable-icon svg { width: 30px; height: 30px; }

/* Legacy public galleries on organization subdomains: event list, password, single photo. */
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.event-card { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: var(--muted); color: #fff; isolation: isolate; }
.event-card img, .event-card-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.event-card img { object-fit: cover; transition: transform .5s ease; }
.event-card-placeholder { display: grid; place-items: center; background: linear-gradient(160deg, #3b6f6a, #18181b); color: #ffffff59; }
.event-card-placeholder svg { width: 40px; height: 40px; margin-top: -32px; }
.event-card::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, #000000bf, #0000 58%); }
.event-card-meta { position: absolute; inset: auto 0 0; z-index: 1; display: grid; gap: 4px; padding: 18px 20px; }
.event-card-title { font-size: 20px; font-weight: 700; letter-spacing: -.3px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.event-card-detail { color: #ffffffd9; font-size: 13px; font-variant-numeric: tabular-nums; }
.event-card:focus-visible { outline-offset: 3px; }
@media (hover: hover) { .event-card:hover img { transform: scale(1.03); } }
.gallery-password { max-width: 420px; margin: 0 auto; padding: 12vh 0 8vh; text-align: center; }
.gallery-password h1 { overflow-wrap: anywhere; }
.gallery-password-help { margin: 20px 0 24px; color: var(--secondary); font-size: 14px; line-height: 1.6; }
.gallery-password-form { display: flex; gap: 10px; }
.gallery-password-input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--elevated); color: var(--fg); font: inherit; font-size: 16px; }
.gallery-password-input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px #64b6ae40; }
.single-photo-image { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: 16px; background: var(--muted); }
@media (max-width: 1000px) { .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .event-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .event-card { border-radius: 16px; }
  .gallery-password-form { flex-direction: column; }
}

@media (max-width: 600px) {
  .guest-shell { padding: 0 max(16px, env(safe-area-inset-left)); }
  .masthead { min-height: 72px; padding-block: 18px; }
  .masthead .guest-brand-logo .logo { width: 142px; height: 24px; }
  .masthead .guest-brand-name { font-size: 21px; }
  .gallery-toolbar { padding: 25px 0 22px; gap: 12px; }
  .gallery-toolbar { flex-wrap: wrap; }
  .gallery-toolbar-actions { width: 100%; justify-content: stretch; }
  .gallery-toolbar-actions .button { flex: 1 1 0; }
  h1 { font-size: 24px; letter-spacing: -.7px; }
  .gallery-toolbar .button { min-height: 44px; padding: 11px 13px; font-size: 12px; border-radius: 12px; }
  .gallery-toolbar .button svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
