:root {
  --ink: #2d2923;
  --muted: #716a60;
  --honey: #f7be17;
  --honey-soft: #fff3bd;
  --cream: #fffaf0;
  --white: #fff;
  --green: #35785a;
  --red: #a4413b;
  --shadow: 0 18px 50px rgba(79, 58, 12, .13);
  --radius: 26px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; font-size: 18px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.shell { overflow: hidden; min-height: 100vh; }
.hero { min-height: 92svh; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr); background: #f7c51f; position: relative; }
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.18); top: -180px; left: -90px; }
.hero-copy { padding: clamp(42px, 7vw, 110px); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 8px 14px; border: 1px solid rgba(45,41,35,.25); border-radius: 999px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 12px; }
h1, h2 { font-family: 'Fraunces', Georgia, serif; margin: 0; line-height: 1.02; }
h1 { font-size: clamp(58px, 8.5vw, 126px); letter-spacing: -.055em; margin: 24px 0; max-width: 760px; }
.hero-sub { max-width: 560px; font-size: clamp(20px, 2vw, 27px); margin: 0 0 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.meta-pill { background: rgba(255,255,255,.72); border-radius: 18px; padding: 12px 17px; font-weight: 700; display: inline-flex; gap: 9px; align-items: center; }
.hero-photo-wrap { min-height: 520px; padding: 24px; position: relative; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; border-radius: 36px; box-shadow: var(--shadow); display: block; }
.bee { position: absolute; font-size: 46px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.15)); animation: float 4s ease-in-out infinite; }
.bee-one { left: 1%; top: 17%; transform: rotate(-12deg); }
.bee-two { right: 2%; bottom: 12%; animation-delay: -2s; transform: rotate(15deg) scale(.75); }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.content { width: min(1140px, calc(100% - 32px)); margin: 0 auto; padding: 80px 0; }
.intro { text-align: center; margin-bottom: 44px; }
.intro h2 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -.035em; }
.intro p { color: var(--muted); max-width: 620px; margin: 15px auto 0; }
.rsvp-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.card { background: var(--white); border: 1px solid rgba(45,41,35,.08); border-radius: var(--radius); padding: clamp(24px, 4vw, 42px); box-shadow: var(--shadow); }
.card h2 { font-size: clamp(34px, 4.5vw, 51px); }
.card-lead { color: var(--muted); margin: 10px 0 28px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; }
.field input, .field select { width: 100%; min-height: 58px; border: 2px solid #ded8ca; border-radius: 14px; padding: 12px 15px; color: var(--ink); background: #fff; outline: none; }
.field input:focus, .field select:focus { border-color: var(--honey); box-shadow: 0 0 0 4px rgba(247,190,23,.18); }
.password-input { position: relative; }
.password-input input { padding-right: 62px; }
.password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 11px; display: grid; place-items: center; background: transparent; color: var(--muted); }
.password-toggle:hover { background: #f5f1e8; color: var(--ink); }
.password-toggle:focus-visible { outline: 3px solid rgba(247,190,23,.55); outline-offset: 1px; }
.password-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.stepper { display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; gap: 10px; }
.stepper button { width: 58px; height: 58px; border: 0; border-radius: 15px; background: var(--honey-soft); color: var(--ink); font-size: 30px; font-weight: 700; }
.stepper output { display: grid; place-items: center; height: 58px; border: 2px solid #ded8ca; border-radius: 14px; font-size: 24px; font-weight: 700; }
.primary, .secondary, .ghost, .danger { min-height: 56px; border-radius: 15px; border: 0; padding: 13px 20px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; gap: 9px; text-decoration: none; }
.primary { width: 100%; background: var(--ink); color: white; box-shadow: 0 8px 0 #0e0d0b; }
.primary:active { transform: translateY(5px); box-shadow: 0 3px 0 #0e0d0b; }
.primary:disabled { opacity: .65; cursor: wait; }
.secondary { background: var(--honey); color: var(--ink); }
.ghost { background: #f5f1e8; color: var(--ink); }
.danger { background: #fff0ef; color: var(--red); }
.side-stack { display: grid; gap: 24px; }
.info-card { background: #2d2923; color: white; position: relative; overflow: hidden; }
.info-card::after { content: '🐝'; position: absolute; right: -18px; top: -28px; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: rgba(247,190,23,.12); font-size: 42px; transform: rotate(14deg); }
.info-card > * { position: relative; z-index: 1; }
.info-card h3 { font-family: 'Fraunces', Georgia, serif; font-size: 31px; margin: 0 0 10px; }
.info-card p { color: #d7d1c7; }
.map-link { margin-top: 18px; width: 100%; }
.gift-card { background: var(--honey-soft); }
.gift-card h3 { font-family: 'Fraunces', Georgia, serif; font-size: 31px; margin: 0 0 16px; }
.gifts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.gifts li { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.68); border-radius: 13px; padding: 11px 13px; }
.success { text-align: center; padding: 30px 0; }
.success-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #dff3e7; color: var(--green); font-size: 40px; margin: 0 auto 20px; }
.footer { text-align: center; padding: 32px 16px 44px; color: var(--muted); font-size: 14px; }
.admin-link { border: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 4px; padding: 10px; font-size: 14px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 80px)); opacity: 0; visibility: hidden; pointer-events: none; background: var(--ink); color: white; border-radius: 14px; padding: 13px 18px; max-width: calc(100% - 32px); transition: transform .25s ease, opacity .2s ease, visibility 0s linear .25s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.admin-page { min-height: 100vh; background: #f5f2eb; }
.admin-header { background: var(--ink); color: white; padding: 28px max(20px, calc((100vw - 1140px) / 2)); display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-header h1 { font-size: clamp(30px, 4vw, 48px); margin: 0; letter-spacing: -.03em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-main { width: min(1140px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 80px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: white; border-radius: 20px; padding: 22px; border: 1px solid #e8e2d8; }
.stat strong { display: block; font-family: 'Fraunces', serif; font-size: 42px; line-height: 1; }
.stat span { color: var(--muted); display: block; margin-top: 5px; font-weight: 500; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 25px 0 14px; }
.admin-toolbar h2 { font-size: 31px; }
.rsvp-list { display: grid; gap: 12px; }
.rsvp-row { display: grid; grid-template-columns: 1.2fr .8fr .7fr auto; gap: 18px; align-items: center; background: white; padding: 18px; border-radius: 18px; border: 1px solid #e8e2d8; }
.rsvp-row h3 { margin: 0; font-size: 19px; }
.rsvp-row p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.companion-summary strong { font-size: 20px; }
.companion-summary p { font-weight: 500; }
.status { width: fit-content; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 700; background: #fff3c8; color: #725900; }
.status.confirmed { background: #dff3e7; color: #246345; }
.row-actions { display: flex; gap: 8px; }
.icon-btn { width: 46px; height: 46px; border: 1px solid transparent; border-radius: 14px; display: grid; place-items: center; text-decoration: none; background: #f1eee7; color: var(--ink); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:focus-visible { outline: 3px solid rgba(247,190,23,.5); outline-offset: 2px; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.icon-btn.whatsapp { background: #25D366; color: #fff; border-color: #25D366; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }
.icon-btn.whatsapp:hover { background: #20c35f; border-color: #20c35f; }
.icon-btn.whatsapp svg.whatsapp-original-icon { width: 27px; height: 27px; display: block; fill: none; stroke: none; transform: translate(0, 0); }
.icon-btn.confirm-action { background: #f0eee8; color: #4d493f; }
.icon-btn.confirm-action:hover, .icon-btn.confirm-action.confirmed { background: #e1f3e8; color: #28704d; border-color: #c8e6d4; }
.icon-btn.edit-action { background: #eef5ff; color: #2b5d9b; border-color: #d7e7fb; }
.icon-btn.edit-action:hover { background: #deedff; }
.icon-btn.delete-action { background: #fff1ef; color: #a4413b; }
.icon-btn.delete-action:hover { background: #fbe0dd; border-color: #f2c5c0; }
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(45, 41, 35, .48); backdrop-filter: blur(4px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(520px, 100%); max-height: calc(100svh - 36px); overflow: auto; background: var(--cream); border: 1px solid rgba(45,41,35,.14); border-radius: 26px; padding: clamp(22px, 4vw, 34px); box-shadow: 0 28px 90px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.modal-head h2 { font-size: clamp(31px, 5vw, 42px); margin: 10px 0 0; }
.modal-head .icon-btn { flex: 0 0 auto; background: white; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; margin-top: 10px; }
.modal-actions .primary { width: 100%; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--honey); }
.login-card { width: min(440px, 100%); background: white; border-radius: 28px; padding: 36px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 48px; margin: 10px 0; }
.empty { text-align: center; background: white; border-radius: 20px; padding: 50px 20px; color: var(--muted); }
.install-banner { display: none; position: fixed; z-index: 15; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 520px; margin: auto; background: white; border-radius: 20px; padding: 15px; box-shadow: 0 15px 70px rgba(0,0,0,.24); align-items: center; gap: 12px; }
.install-banner.show { display: flex; }
.install-banner.ios-install { border: 1px solid rgba(247,190,23,.55); }
.install-banner span { flex: 1; font-size: 14px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 48px 22px 34px; }
  h1 { font-size: clamp(58px, 18vw, 86px); }
  .hero-photo-wrap { min-height: 58svh; padding: 0 14px 14px; }
  .hero-photo { border-radius: 26px; }
  .content { padding: 58px 0; }
  .rsvp-grid { grid-template-columns: 1fr; }
  .rsvp-row { grid-template-columns: 1fr auto; }
  .rsvp-row > :nth-child(2), .rsvp-row > :nth-child(3) { grid-column: 1; }
  .row-actions { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .meta-pill { padding: 10px 12px; font-size: 15px; }
  .card { padding: 24px 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-actions { width: 100%; }
  .admin-actions > * { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
