/* Shared look, lifted from wedding.philsfitnesscult.com so it feels like the same event. */
:root {
  --bg: #f7f3ec; --card: #fffdf9; --ink: #26302a; --muted: #6b7570; --line: #e4ddd1;
  --accent: #3f6b4f; --accent-ink: #ffffff; --accent-soft: #e6efe8; --danger: #a63d2f; --gold: #c9a227;
  --radius: 14px; --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); overflow-x: hidden; }
:focus-visible { outline: 3px solid #8fb39d; outline-offset: 2px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.top { text-align: center; padding: 22px 20px 6px; }
.top h1 { font: 500 clamp(30px, 8vw, 40px)/1.05 var(--serif); margin: 0; }
.top h1 em { font-style: italic; }
.top p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 96px; }
.intro { text-align: center; margin-bottom: 24px; }
.intro h2 { font: 600 28px/1.15 var(--serif); margin: 0 0 6px; }
.intro p { margin: 0; color: var(--muted); }

label.field { display: block; font: 600 22px/1.2 var(--serif); margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
input[type=text], input[type=password] { width: 100%; font: inherit; color: inherit; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 14px; min-height: 52px; }
input:focus { border-color: var(--accent); }
.error { display: none; color: var(--danger); font-size: 14px; margin: 8px 0 0; font-weight: 500; }
.invalid .error { display: block; }
.invalid input { border-color: var(--danger); }

button.primary { width: 100%; font-weight: 600; font-size: 17px; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 12px; padding: 16px 20px; cursor: pointer; min-height: 52px; transition: background .15s, transform .05s; }
button.primary:hover { background: #355c43; }
button.primary:active { transform: translateY(1px); }
button.primary[disabled] { opacity: .7; cursor: progress; }
button.secondary { width: 100%; font-weight: 600; font-size: 16px; color: var(--accent); background: transparent; border: 1.5px solid var(--accent); border-radius: 12px; padding: 14px 20px; cursor: pointer; min-height: 48px; }
button.secondary.danger { color: var(--danger); border-color: var(--danger); }
button.link { background: none; border: 0; padding: 8px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }
.stack { display: grid; gap: 10px; margin-top: 18px; }

/* bottom nav: two segments, Card / Wall */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(247,243,236,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.nav .seg { max-width: 400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.nav a { text-align: center; text-decoration: none; color: var(--muted); font-weight: 600; padding: 10px; border-radius: 999px; min-height: 44px; }
.nav a[aria-current=page] { background: var(--accent); color: var(--accent-ink); }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 15px; display: flex; gap: 14px; align-items: center; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast button { background: none; border: 0; color: #ffd98a; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.toast[hidden] { display: none; }

dialog { border: 0; border-radius: 20px 20px 0 0; padding: 0; width: 100%; max-width: 640px; margin: auto auto 0; background: var(--card); color: var(--ink); box-shadow: 0 -8px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(20,30,25,.5); }
dialog.center { border-radius: 20px; margin: auto; width: calc(100% - 32px); }
.sheet { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.sheet h2 { font: 600 30px/1.1 var(--serif); margin: 0 0 6px; }
.sheet h2 .e { font-size: 30px; margin-right: 8px; }
.sheet p { color: var(--muted); margin: 0 0 18px; }
.sheet .preview { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; margin-bottom: 14px; background: var(--line); }
.sheet .close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
