/* ════════════════════════════════════════════════════════════════
   Emma's Bubble Bash — soap-bubble afternoon sky
   Display: Baloo 2 · Body: Quicksand
   ════════════════════════════════════════════════════════════════ */

:root {
    --sky:       #BFE7FF;
    --sky-soft:  #E5F6FF;
    --mist:      #F4FBFF;
    --blush:     #FFE7F2;
    --ink:       #173F6B;
    --ink-soft:  #56799F;
    --aqua:      #2FB4E9;
    --aqua-deep: #1F8FC4;
    --aqua-soft: #CDEDFB;
    --pink:      #FF6FA5;
    --pink-deep: #E2477F;
    --card:      rgba(255, 255, 255, 0.78);
    --radius:    28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    background:
        radial-gradient(640px 420px at 88% -4%, rgba(255, 255, 255, 0.85), transparent 70%),
        linear-gradient(180deg, var(--sky) 0%, #DFF3FF 36%, var(--mist) 62%, var(--blush) 100%);
    background-attachment: fixed;
}

::selection { background: var(--sky); }

/* ── Floating soap bubbles ─────────────────────────────────────── */

.bubbles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bubbles span {
    position: absolute;
    bottom: -160px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    opacity: 0;
    background:
        radial-gradient(circle at 33% 28%, rgba(255,255,255,0.95) 0 6%, rgba(255,255,255,0.30) 18%, rgba(255,255,255,0.05) 34%, transparent 60%),
        radial-gradient(circle at 72% 76%, rgba(255,182,222,0.28) 0 16%, transparent 48%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 56%, rgba(173,229,255,0.32) 86%, rgba(255,255,255,0.70) 97%);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.35),
        inset -6px -8px 18px rgba(140, 205, 255, 0.28),
        0 8px 24px rgba(60, 140, 200, 0.08);
    animation: rise var(--d) linear infinite;
    animation-delay: var(--delay);
}

@keyframes rise {
    0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    6%   { opacity: var(--o, 0.75); }
    50%  { transform: translateY(-55vh) translateX(var(--sway, 30px)) rotate(8deg); }
    94%  { opacity: var(--o, 0.75); }
    100% { transform: translateY(-112vh) translateX(calc(var(--sway, 30px) * -0.6)) rotate(-6deg); opacity: 0; }
}

/* ── Layout ────────────────────────────────────────────────────── */

.wrap {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    padding: clamp(40px, 8vw, 72px) 20px 0;
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero { text-align: center; }

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pink-deep);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow: 0 4px 14px rgba(80, 150, 210, 0.12);
}

.hero h1 {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(2.5rem, 9vw, 3.6rem);
    line-height: 1.05;
    margin-top: 22px;
    letter-spacing: -0.01em;
}

.big-bubble {
    position: relative;
    width: clamp(150px, 38vw, 190px);
    height: clamp(150px, 38vw, 190px);
    margin: 18px auto 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 33% 26%, rgba(255,255,255,0.98) 0 8%, rgba(255,255,255,0.35) 22%, rgba(255,255,255,0.06) 40%, transparent 62%),
        radial-gradient(circle at 74% 78%, rgba(255,182,222,0.35) 0 18%, transparent 52%),
        radial-gradient(circle at 50% 50%, rgba(229,246,255,0.55) 52%, rgba(173,229,255,0.45) 84%, rgba(255,255,255,0.85) 97%);
    box-shadow:
        inset 0 0 22px rgba(255, 255, 255, 0.5),
        inset -10px -14px 30px rgba(140, 205, 255, 0.35),
        0 24px 50px rgba(60, 140, 200, 0.22);
    animation: bob 8s ease-in-out infinite;
}

.big-bubble::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #9BE0FF, #FFC1E0, #D9C6FF, #B5F0D8, #9BE0FF);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
    opacity: 0.9;
    animation: spin 14s linear infinite;
}

.big-bubble span {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(86px, 22vw, 112px);
    color: var(--ink);
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.65);
    transform: rotate(-4deg);
}

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-10px) rotate(2deg); }
}

@keyframes spin { to { transform: rotate(1turn); } }

.sub {
    margin-top: 20px;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.sub strong { color: var(--pink-deep); }

/* ── Cards ─────────────────────────────────────────────────────── */

.card {
    position: relative;
    margin-top: 28px;
    padding: clamp(24px, 6vw, 36px);
    background: var(--card);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(80, 150, 210, 0.18);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 26px;
    right: 26px;
    height: 4px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, #8ED9FF, #FFB7DB, #D7C4FF, #A4ECCF, #8ED9FF);
    opacity: 0.9;
}

/* ── Details list ──────────────────────────────────────────────── */

.details ul { list-style: none; display: grid; gap: 18px; }

.details li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: center;
}

.chip {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 21px;
    background: linear-gradient(160deg, #FFFFFF, var(--sky-soft));
    border: 1px solid #FFFFFF;
    box-shadow: inset 0 -4px 10px rgba(140, 205, 255, 0.25), 0 4px 10px rgba(80, 150, 210, 0.10);
}

.details strong {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 1.07rem;
    line-height: 1.3;
}

.details small {
    display: block;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

.details a {
    color: var(--aqua-deep);
    text-decoration: underline wavy rgba(47, 180, 233, 0.55) 1.5px;
    text-underline-offset: 4px;
}

.details a:hover { color: var(--pink-deep); text-decoration-color: rgba(226, 71, 127, 0.5); }

/* ── RSVP form ─────────────────────────────────────────────────── */

.deadline {
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--pink-deep);
    background: var(--blush);
    border: 1px solid #FFD3E5;
    border-radius: 999px;
    padding: 7px 16px;
}

.rsvp h2, .thanks h2 {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 1.6rem;
    margin-top: 14px;
    line-height: 1.2;
}

.rsvp form { margin-top: 20px; display: grid; gap: 18px; }

.label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.label em { font-weight: 500; font-style: normal; color: var(--ink-soft); }

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    background: #FFFFFF;
    border: 2px solid var(--aqua-soft);
    border-radius: 16px;
    padding: 13px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder, textarea::placeholder { color: #9FBBD6; font-weight: 500; }

input:focus, textarea:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 4px rgba(53, 182, 232, 0.18);
}

input.has-error, textarea.has-error { border-color: #F2A5BD; }

textarea { resize: vertical; min-height: 84px; }

.error {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #D14063;
}

/* Honeypot — visually gone, still in the DOM for bots */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 4px;
    background: #FFFFFF;
    border: 2px solid var(--aqua-soft);
    border-radius: 999px;
    padding: 4px;
}

.stepper button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    background: var(--sky-soft);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.stepper button:hover { background: var(--sky); }
.stepper button:active { transform: scale(0.92); }

.stepper input[type="number"] {
    border: none;
    padding: 0;
    text-align: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 1.5rem;
    background: transparent;
}

.stepper input:focus { box-shadow: none; }

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ── Buttons ───────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    background: linear-gradient(135deg, #FF7FAE, var(--pink-deep));
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(226, 71, 127, 0.32);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(226, 71, 127, 0.38); }
.btn:active { transform: translateY(0); }

.btn-submit { width: 100%; padding: 16px 28px; font-size: 1.18rem; }

.btn-ghost {
    color: var(--pink-deep);
    background: #FFFFFF;
    border: 2px solid #FFD3E5;
    box-shadow: none;
}

.btn-ghost:hover { box-shadow: 0 8px 18px rgba(226, 71, 127, 0.15); }

/* ── Thanks / closed ───────────────────────────────────────────── */

.thanks { text-align: center; }

.pop {
    font-size: 64px;
    line-height: 1;
    animation: popin 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes popin {
    0%   { transform: scale(0.2); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.thanks p { margin-top: 10px; color: var(--ink-soft); font-weight: 600; }
.thanks .btn { margin-top: 22px; }

/* ── Footer ────────────────────────────────────────────────────── */

footer {
    text-align: center;
    padding: 44px 0 64px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
}

footer .quiet {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    opacity: 0.55;
    text-decoration: none;
}

footer .quiet:hover { opacity: 1; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════
   Admin — guest list
   ════════════════════════════════════════════════════════════════ */

body.admin {
    background:
        radial-gradient(520px 320px at 90% -6%, rgba(255, 255, 255, 0.9), transparent 70%),
        linear-gradient(180deg, #EAF6FF 0%, #F7FBFF 44%, #FFF4F9 100%);
    background-attachment: fixed;
}

.admin-wrap {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 20px 80px;
}

.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-head h1 {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 1.7rem;
}

.admin-head form { display: inline; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 22px;
}

.stat {
    background: #FFFFFF;
    border: 1px solid #DFF0FB;
    border-radius: 20px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(80, 150, 210, 0.08);
}

.stat b {
    display: block;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1.1;
}

.stat span {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 20px 0 14px;
}

.btn-small { padding: 10px 20px; font-size: 0.95rem; }

.list-card {
    background: #FFFFFF;
    border: 1px solid #DFF0FB;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(80, 150, 210, 0.08);
}

.table-scroll { overflow-x: auto; }

.list-card table { width: 100%; border-collapse: collapse; min-width: 560px; }

.list-card th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    background: #F4FAFF;
    padding: 12px 16px;
}

.list-card td {
    padding: 13px 16px;
    border-top: 1px solid #EEF6FC;
    vertical-align: top;
}

.list-card tbody tr:hover { background: #F6FBFF; }

td.num {
    text-align: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 1.05rem;
}

td.note-cell { color: var(--ink-soft); font-size: 0.9rem; max-width: 320px; }

td.when { white-space: nowrap; color: var(--ink-soft); font-size: 0.85rem; }

.del {
    border: none;
    background: transparent;
    color: #C2D4E4;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    padding: 5px 9px;
    transition: color 0.15s ease, background 0.15s ease;
}

.del:hover { color: var(--pink-deep); background: #FFEDF4; }

.empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--ink-soft);
    font-weight: 600;
}

.empty .pop { font-size: 44px; margin-bottom: 10px; }

/* ── Admin login ───────────────────────────────────────────────── */

.login { max-width: 420px; margin: 12vh auto 0; padding: 0 20px; position: relative; z-index: 1; }

.login .card { text-align: center; }

.login .pop { font-size: 52px; }

.login h1 {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 1.5rem;
    margin-top: 8px;
}

.login p { color: var(--ink-soft); font-size: 0.92rem; margin-top: 4px; }

.login form { margin-top: 20px; display: grid; gap: 14px; }

/* ── Small screens & motion ────────────────────────────────────── */

@media (max-width: 560px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .bubbles span, .big-bubble, .big-bubble::before, .pop { animation: none !important; }
    .bubbles span { opacity: 0.4; bottom: auto; top: calc(var(--x) * 0.8); }
}

:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
